Skip to content

docs: make the architecture page and ADR-0005 match the real package graph - #96

Merged
csdev19 merged 2 commits into
mainfrom
feature/niw2-340-make-the-architecture-page-and-adr-0005-match-the-real
Oct 25, 2026
Merged

csdev19 merged 2 commits into
mainfrom
feature/niw2-340-make-the-architecture-page-and-adr-0005-match-the-real

Conversation

@csdev19

@csdev19 csdev19 commented Oct 25, 2026

Copy link
Copy Markdown
Owner

What changed and why

The architecture page's package graph had drifted from the code. It said generate "depends on no workspace package at all" and that "nothing below [the CLI] reaches sideways". The manifests say otherwise: generate depends on core and schema, editor on core, generate, schema and tokens, and mcp on generate. ADR-0005 also assumed core runs on the edge, while core imports node:fs, node:path and node:crypto in eight modules (only server is free of node: imports).

  • Test first (scripts/docs/architecture-graph.test.ts, committed before the doc fix): derives every @laqi/* edge from all workspace package.json files and compares it with the edge list in the <!-- graph:edges --> block on the architecture page, in both directions. It also checks the graph has no cycle, since the page promises that.
  • Architecture page: new diagram with per-box annotations, the edge list as data, corrected invariant text, and a Node-bound note on core. When NIW2-335 changes the editor -> core edge, that is a one-line edit to the block.
  • ADR-0005: a dated note (2026-10-24) saying core is Node-bound today, apps/relay does not exist (ADR-0007 defers it) and the relay needs a storage port in core first. The decision itself is not rewritten.

No package code changed.

Two details differ from the ticket text: core has 8 node: modules, not 5, and apps/site -> tokens and examples/todo-app -> apps/cli are real edges, so they are in the list too.

Verification

  • bun run verify run twice in a row: both passed (119 files, 1628 tests). The local worktree has an untracked, git-excluded Gas City file (.claude/skills/.gc-skill-ownership.json) that oxfmt --check flags, so I moved it aside for these runs and restored it; CI never sees it.
  • The new test failed before the doc fix (empty documented list) and passes after.

How to test it yourself

  1. bun run test scripts/docs/architecture-graph.test.ts passes.
  2. In packages/mcp/package.json, remove @laqi/generate from dependencies and rerun it: it fails and names mcp -> generate as the missing edge. Restore the file.
  3. Read the architecture page (apps/documentation/src/content/docs/architecture/index.md) and the note at the top of ADR-0005 (apps/documentation/src/content/docs/decisions/0005-monorepo.md).

Refs NIW2-340

Run: Gas City session ni-wisp-usvasbi, bead la-79o, Mac mini

🤖 Generated with Claude Code

csdev19 and others added 2 commits October 24, 2026 23:26
…nifests

Refs NIW2-340

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The page said generate depends on no workspace package and that nothing
reaches sideways. generate depends on core and schema, editor depends on
generate, schema, tokens and core, and mcp depends on generate. The page
now carries the edge list the new test checks, and ADR-0005 notes that
core is Node-bound today and that apps/relay does not exist yet.

Refs NIW2-340

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@csdev19
csdev19 merged commit 6d02dc9 into main Oct 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant