feat: add knowledge wiki schema#75
Conversation
Adds a new bundled schema for LLM-maintained knowledge wikis. Supports source_summary, concept, synthesis, personal, and index node types with a flat entity model, wikilinks for cross-referencing, aliases, and validation rules for provenance and coherence. Based on the pattern described in Karpathy's LLM Wiki (2026).
|
Claude finished @mindsocket's task in 53s —— View job Code Review
|
mindsocket
left a comment
There was a problem hiding this comment.
Improvements needed to naming, flexibility and specific properties.
| "description": "Lightweight schema for LLM-maintained knowledge wikis. Supports source summaries, concept pages, syntheses, and personal notes. Designed for compounding knowledge bases where the LLM creates and maintains wiki pages from raw sources.\n\nFlat entity model — no hierarchy, no required parent links. Wikilinks between any pages are valid for arbitrary cross-referencing. The schema validates structure and provenance; it does not constrain meaning.\n\nBased on the pattern described in Karpathy's LLM Wiki (2026).", | ||
| "$metadata": { | ||
| "aliases": { | ||
| "study": "source_summary", |
There was a problem hiding this comment.
"source" should be the canonical type name. source_summary can be an alias.
| "article": "source_summary", | ||
| "paper": "source_summary", | ||
| "research": "source_summary", | ||
| "note": "personal", |
There was a problem hiding this comment.
"note" should be the canonical. "personal" should not be an alias.
| "framework": "concept", | ||
| "model": "concept", | ||
| "chat_transcript": "source_summary", | ||
| "chat-transcript": "source_summary" |
There was a problem hiding this comment.
"framework" and "model" are not direct synonyms of concept as they imply too much, and as such shouldn't be aliases.
If they were entity types they'd be explicit and distinct
| "category": "validation", | ||
| "description": "Source summaries should reference their origin via url, author, or book field", | ||
| "type": "source_summary", | ||
| "check": "current.url != null or current.author != null or current.book != null" |
There was a problem hiding this comment.
This shouldn't be a rule. Instead, url should be required in the schema def. Assumption: any source of any kind has some kind of url as a reference.
| { "$ref": "ost-tools://_ost_tools_base#/$defs/ostEntityProps" } | ||
| ], | ||
| "properties": { | ||
| "type": { "const": "source_summary" }, |
| }, | ||
| "sources": { | ||
| "type": "array", | ||
| "items": { "type": "string" }, |
There was a problem hiding this comment.
... and add a relationship metadata entry
| "items": { "type": "string" }, | ||
| "description": "Wikilinks to source_summary or concept pages that this synthesis draws from" | ||
| }, | ||
| "related": { |
There was a problem hiding this comment.
This feels too loose. Synthesis should related sources via sources property and concepts via a concepts property ... instead of a general "related".
Page content is still free to link elsewhere.
| { "$ref": "ost-tools://_ost_tools_base#/$defs/ostEntityProps" } | ||
| ], | ||
| "properties": { | ||
| "type": { "const": "personal" }, |
| "journal": "personal", | ||
| "framework": "concept", | ||
| "model": "concept", | ||
| "chat_transcript": "source_summary", |
There was a problem hiding this comment.
Remove chat_transcript and chat-transcript as aliases. If anything they're an alias for a note, but don't need to be explicitly defined as an alias - they an just be notes.
| { "$ref": "ost-tools://_ost_tools_base#/$defs/baseNodeProps" }, | ||
| { "$ref": "ost-tools://_ost_tools_base#/$defs/ostEntityProps" } | ||
| ], | ||
| "properties": { |
There was a problem hiding this comment.
Add an optional property that is a wikilink to a local copy of the source.
- Rename source_summary → source (canonical); source_summary becomes alias - Rename personal → note (canonical); remove personal alias - Remove framework, model, chat_transcript aliases - Remove source-has-origin rule; make url required on source type - Use wikilink $ref for all wikilink array items - Add local_copy property (wikilink) to source type - Split synthesis related → sources + concepts properties - Add relationship metadata entries for sources/concepts fields - Replace examples with generic design/UX domain content
|
Claude finished @mindsocket's task in 39s —— View job Code Review: knowledge_wiki.jsonOverviewI've analyzed the current state of ✅ All Review Comments Addressed1. "source" as canonical type name (line 64)
2. "note" as canonical type, "personal" removed (line 182)
3. "framework" and "model" aliases removed (lines 7-14)
4. URL required in schema definition (line 95)
5-6. Wikilink def used for
7. Relationship metadata entries added (lines 15-36)
8. Synthesis has separate
9. "note" renamed from "personal" (line 182)
10. Chat transcript aliases removed (lines 7-14)
11.
Additional ObservationsStrengths of the Current Implementation:
Schema Philosophy: RecommendationsAll requested improvements have been implemented. The schema is production-ready. Optional enhancements (not required):
Summary✅ All review comments have been addressed The knowledge wiki schema is well-designed and ready for use. Nice work on the iterative improvements! |
|
Claude finished @mindsocket's task in 50s —— View job Code Review: knowledge_wiki.jsonTask Checklist:
✅ All Review Comments AddressedI've verified that all 11 review comments from the previous review have been correctly implemented:
✅ Schema Quality AssessmentStructure & Conventions:
Type Design:
Validation Rules:
Both use correct JSONata syntax and enforce meaningful constraints. Aliases:
✅ Test ResultsAll 340 unit tests pass successfully, confirming the schema integrates well with the existing codebase. 📝 ObservationsIntentional Design Choices:
Relationship Metadata:
🔒 Security & Safety
Summary✅ All review comments addressed Recommendation: ✅ Approve The knowledge wiki schema is production-ready. The iterative improvements have addressed all feedback while maintaining the schema's core philosophy of flexible, LLM-maintained knowledge bases with validated structure and provenance. |

Summary
schemas/knowledge_wiki.json— a new bundled schema for LLM-maintained knowledge wikissource_summary,concept,synthesis,personal, plus anindextypeTest plan
article→source_summary,note→personal)source-has-origin,synthesis-references-sources,concept-has-summary)bun run test