Repository navigation
Closed
Labels
Description
Overview
Add a merge-gate check that components/node-types.md in nodespace-docs matches the core schemas the code seeds, so the per-type reference can't drift from the code again.
Problem Statement
components/node-types.md is the single per-type reference (ADR-086, development/node-type-sequence.md). Before the 2026-10-01 rewrite it covered 12 of 21 core types, and most of its field tables were stale. Nothing checks it against get_core_schemas() (packages/core/src/models/core_schemas.rs).
Proposed Solution
- A check (a script under
scripts/, TypeScript, run in the merge gate) that reads../nodespace-docs/components/node-types.mdand the seeded core schemas. A small Rust example or test can export the schemas as JSON. - It verifies that every core type, core subtype and abstract base has a sheet, and that each sheet's field table lists exactly the schema's fields, with matching storage key, type and enum values.
node-types.mdhas no status labels: it describes the decided design. So the check can only pass once the code matches that design. It lands after the issues that change core type shapes (see Dependencies), and from then on it keeps code and docs equal.- Locating the docs. Worktrees, including the merge gate's
.claude/worktrees/_gate, live under.claude/worktrees/, so a path relative to the checkout (../nodespace-docs) doesn't reach the docs repo from them. Resolve it from the primary checkout's parent, or from an explicitNODESPACE_DOCS_DIR. Otherwise the check silently skips in the gate. - When the docs checkout is missing, the check skips with a warning rather than failing, matching how other cross-repo checks behave.
Architecture Impact
Supports decisions/086-core-node-types-defined-once-typed-by-category.md and development/node-type-sequence.md ("Docs, in the same change"). No ADR change.
Acceptance Criteria
- The check fails when a core schema gains, loses or renames a field and
node-types.mddoesn't (fixture tests) - It passes on main plus docs once the dependencies below have landed
- It finds the docs repo from inside the merge gate's worktree (test), not only from the primary checkout
- It runs in the merge gate; a missing docs checkout skips with a warning
-
bun run test:scriptscovers it;bun run quality:fixclean
Technical Specifications
Reference Files
packages/core/src/models/core_schemas.rs(get_core_schemas)scripts/test-gate.ts,scripts/gate-scope.ts,scripts/check-code-references.ts(a similar check, as the pattern)../nodespace-docs/components/node-types.md
Dependencies
- Add the core node type registry, shared envelope, closed schemas and extends-aware rules #3439 (registry; the check can key on
CoreNodeType) - The type-shape issues, which bring the code to the documented design: Seed built-ins from fixed-UUID tables with Markdown bodies, order agent guidance, and link skills to their schemas #3418, Give collections a declared description that the CLI, agent and workspace context use #3421, Define the task types once and route the typed task update through the shared pipeline #3441, Make SchemaNode one wire type that the store fills, with extends and relationships #3442, Give plays a user-owned enabled switch and persist engine suspensions #3444, Drop project.status archived and the AI chat viewer's archived read-only gate #3445, Split ai-chat into an abstract base with ai-chat-native and ai-chat-pty subtypes #3446, Store AI chat messages as ai-chat-message child nodes with real edges #3448, Make tool an abstract base with a tool-native subtype and drop source #3450, Give collection, skill and database-settings typed wire types and updates, and close project and query's gaps #3453, Make PTY capture store a prose summary and the harness's own session id #3454
Non-Goals
- Checking other docs
Activity
malibio commentedon Oct 2, 2026
Frontend baseline: 309 test files passed, 5606 tests passed
Check node-types.md against the seeded core schemas in the merge gate (…