Context
From the memory-wiki comparison (issue #100). A memory-wiki-strict schema variant would allow spaces to enforce memory-wiki-compatible frontmatter conventions via sctx's schema validation. This is useful for teams interoperating with openclaw/memory-wiki tooling, or for any space that wants stricter epistemic discipline than the default knowledge_wiki schema.
Decision: add as a new top-level schema file that builds on _knowledge_wiki.json with extra required fields.
Schema design
New file: schemas/memory_wiki_strict.json
Builds on _knowledge_wiki partial and enforces:
| Field |
Requirement |
Notes |
id |
Required on all types |
Stable machine identifier, e.g. entity.alpha |
confidence |
Required on concept, entity, synthesis |
Page-level confidence score (0–1) |
updatedAt |
Required on all types |
ISO 8601 datetime for freshness tracking |
pageType compatibility: memory-wiki uses pageType instead of type for page kind. Spaces using this schema with openclaw-sourced content should configure the markdown plugin's fieldMap in space config to map pageType → type. Document this in the schema description.
The id, confidence, and updatedAt requirements should be expressed as additional required constraints layered on top of the _knowledge_wiki $defs, or via a new set of $defs that extend them.
Potential structure
{
"$id": "sctx://memory_wiki_strict",
"title": "Memory Wiki Strict",
"description": "...",
"allOf": [{ "$ref": "sctx://_knowledge_wiki" }],
"oneOf": [
{ "$ref": "#/$defs/source" },
{ "$ref": "#/$defs/concept" },
// ...
],
"$defs": {
// Each $def extends the _knowledge_wiki version with additional required fields
"concept": {
"allOf": [
{ "$ref": "sctx://_knowledge_wiki#/$defs/concept" },
{ "required": ["id", "confidence", "updatedAt"] }
]
},
// ...
}
}
Acceptance criteria
memory_wiki_strict.json is a valid top-level sctx schema
- Pages missing
id, confidence (on concept/entity/synthesis), or updatedAt fail validation
knowledge_wiki.json is unaffected (no required field changes there)
- Schema description documents the
fieldMap config pattern for pageType compatibility
- Smoke test or fixture covers the strict schema
Reference
docs/memory-wiki-research.md — "Is a memory-wiki schema worth adding?" section and decision note
Context
From the memory-wiki comparison (issue #100). A
memory-wiki-strictschema variant would allow spaces to enforce memory-wiki-compatible frontmatter conventions via sctx's schema validation. This is useful for teams interoperating with openclaw/memory-wiki tooling, or for any space that wants stricter epistemic discipline than the defaultknowledge_wikischema.Decision: add as a new top-level schema file that builds on
_knowledge_wiki.jsonwith extra required fields.Schema design
New file:
schemas/memory_wiki_strict.jsonBuilds on
_knowledge_wikipartial and enforces:identity.alphaconfidenceupdatedAtpageTypecompatibility: memory-wiki usespageTypeinstead oftypefor page kind. Spaces using this schema with openclaw-sourced content should configure the markdown plugin'sfieldMapin space config to mappageType→type. Document this in the schema description.The
id,confidence, andupdatedAtrequirements should be expressed as additionalrequiredconstraints layered on top of the_knowledge_wiki$defs, or via a new set of$defsthat extend them.Potential structure
Acceptance criteria
memory_wiki_strict.jsonis a valid top-level sctx schemaid,confidence(on concept/entity/synthesis), orupdatedAtfail validationknowledge_wiki.jsonis unaffected (no required field changes there)fieldMapconfig pattern forpageTypecompatibilityReference
docs/memory-wiki-research.md— "Is a memory-wiki schema worth adding?" section and decision note