Schemas can declare materialized structure (the synthesis spine); added a schema-generation tool¶
Angelo › zettelkasten › Phase: Grounded Extraction Pipeline + Reusable Schemas (coordinator capability)
Type: Decision · Status: active · Created: 2026-06-24 · Updated: 2026-06-26
Extended extraction schemas so a schema can declare its OWN materialized structure instead of producing a hub-and-spokes dandelion. Deliberately avoided a new "scaffold" noun (that word stays the outline feature's); it's all "the schema" and "the schema's structure", and the scribe "instantiates the schema's structure."
What changed:
1. Schema format (extraction_schemas.py + extraction-schemas.yaml): new optional top-level synthesis block { graph, node (apex), dimension_node, optional spec } plus per-dimension materialize. All fields default, so synthesis: {graph: "..."} works. Validated against VALID_TYPES/VALID_RELATIONS. When present, top-level relations are wired between MATERIALIZED dimension nodes, not representative claims. Factored expand_schema -> expand_spec; added save_schema + _project_schema_write_path. Shipped a worked example pm-decision-profile-spine.
2. Prep (coordinator/extraction.py): prep_structure idempotently creates a DEDICATED synthesis graph (registered as a project source via add_to_project), the apex synthesis node, an optional spec stub, and one node per materialized dimension; wires dimension->apex, spec->apex, apex->each per-source hub (cross-graph). Threads a STRUCTURE block (synthesis graph + apex id + attach_relation + tag->node-id map) into every trio task's context. create_extraction_graph gained synthesis_label (defaults to project) and returns a structure record.
3. Scribe persona: attaches each claim cross-graph to its materialized dimension node (input-to) instead of the hub; backbone relations wired between stable dimension nodes. Falls back to hub behavior when no structure.
4. Auditor persona: verifies claim->dimension->synthesis->hub spine (new SPINE_ISSUES output) when structure is declared.
5. New zettelkasten schema MCP tool: list/get/validate/save. The agent drafts dimensions+backbone+synthesis from a focus goal (sources optional); validate/save guarantees a valid block lands in the project extraction-schemas.yaml. save is write-gated and reminds to restart MCP servers (registry cached at load).
6. Rule grounded-extraction.mdc (+ both CLI copies) document the synthesis spine and the generate-a-schema workflow.
Placement decision (user-chosen): dedicated per-run synthesis graph added as a normal project source -- NOT the _cross allowlist (avoids allowlist growth).
Tests: +23 in tests/test_grounded_extraction.py (synthesis expansion/validation, expand_spec/save_schema round-trips, STRUCTURE threading, prep_structure with the zettelkasten lib stubbed). 46 pass in the file; 120 with outline; clean lint + imports. Shipped as v1.2.13 (pyproject bump) with the zettelkasten dashboard frontend rebuilt.
Referenced files¶
zettelkasten/extraction_schemas.py@c598965zettelkasten/extraction-schemas.yaml@c598965zettelkasten/coordinator_agents.py@c598965zettelkasten/server.py@c598965coordinator/extraction.py@c598965coordinator/server.py@c598965tests/test_grounded_extraction.py@c598965- .cursor/rules/grounded-extraction.mdc@c598965
angelo_cli/data/rules/grounded-extraction.mdc@c598965angelo_cli/data/claude/rules/grounded-extraction.md@c598965pyproject.toml@c598965
Source: memory entry deci-718b67b4.