Skip to content

Check node-types.md against the seeded core schemas in the merge gate #3451

Closed

Description

@malibio

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

  1. A check (a script under scripts/, TypeScript, run in the merge gate) that reads ../nodespace-docs/components/node-types.md and the seeded core schemas. A small Rust example or test can export the schemas as JSON.
  2. 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.
  3. node-types.md has 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.
  4. 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 explicit NODESPACE_DOCS_DIR. Otherwise the check silently skips in the gate.
  5. 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.md doesn'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:scripts covers it; bun run quality:fix clean

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

Non-Goals

  • Checking other docs

Activity

  1. malibio commented on Oct 2, 2026

    @malibio
    CollaboratorAuthor

    Frontend baseline: 309 test files passed, 5606 tests passed

  2. self-assigned this
    on Oct 2, 2026
  3. added a commit that references this issue on Oct 2, 2026
    bfe5a45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions