Repository navigation
docs: the project structure lists folders and DESIGN.md keeps a card per component, with details beside the code - #2177
Merged
Merged
Conversation
…s its first-line comment
…on gets its own file
…ive descriptions say what the code holds
yw0nam
marked this pull request as ready for review
November 29, 2026 14:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two foundation documents shrink to what stays true when code moves, and the detail goes beside the code. No behaviour changes.
project-structure.mdheld for them, unchanged; 34 had no line and get one sentence written from the file. Every non-test.ts,.tsx,.cssand.rssource file now opens with its description.project-structure.md. The Stack table stays. The map keeps every folder (26 bare lines got a description, 17 source folders that had no line got one) and the files that cannot hold a comment (the HTML entries, the JSON underconfigs/). No existing folder description was reworded.DESIGN.md. Sections 1 to 4, section 6, the frontmatter and every Named Rules block are byte-identical. In section 5 each component keeps a card: its heading, the opening sentence of its specification, aSpeclink and itsSurfacefolder. A tool that readsDESIGN.mdby###section still finds 22 entries (checked with the design parser the design-review skill uses).src/ui/tokens.test.tsfails when a card drifts from its file, when aSpeclink orSurfacefolder stops existing, when headings differ, when a file has no card, or when a card has no paragraph.AGENTS.md,docs/agent-guide/design-context.mdandCONTRIBUTING.mdsay what to read:DESIGN.mdalways, a component file when its surface is touched.CONTRIBUTING.md§ Review checklist gains one item:pnpm map:checkchecks paths and shape, so a review grepsmap.jsfor what the diff moved.Proof that source changed by first-line comments only (test file aside):
git diff main --numstat -- src src-tauri plugins vite.config.ts ':!src/ui/tokens.test.ts' | awk '$1!=1 || $2!=0'prints nothing: 186 files, one added line each.git diff -U0 main -- src src-tauri plugins vite.config.ts ':!src/ui/tokens.test.ts' | grep '^@@' | grep -v -E '^@@ -0,0 \+1 @@$'prints nothing: every hunk is an insertion at line 1.main:DESIGN.mdexcept the heading line, and one cross-reference inspeech-bubble.mdthat said "see Trigger line below" and now namestrigger-line.md.Related issues
Closes #2176
Related decisions / docs
project-structure.mdgoes to folder level;DESIGN.mdkeeps principles and a summary card per component; the architecture map keeps its structure and the review checklist gains one line.docs/agent-guide/project-structure.md,DESIGN.md,docs/agent-guide/design/*.md,docs/agent-guide/design-context.md,AGENTS.md,CONTRIBUTING.md.Surfacefolders, two folder lines, two comments, one cross-reference, the empty-paragraph case). Left as is by decision: a comment insrc/ui/surfaces/surfaces.cssthat says a rule is "permitted by DESIGN.md" (the card there leads to the rule), and the card test's place intokens.test.ts.Runtime evidence (required for UI / DOM / runtime behavior)
N/A: no runtime behavior change. Comments and documents only.
Merge danger
Door: two-way (a revert restores both documents). Blast radius: none at runtime. #2173's branch edits
project-structure.md; it takes this structure when it merges main.Verification
pnpm buildpasses (includes tsc typecheck)pnpm testpassespnpm lintpasses (biome format + lint)cargo test/cargo clippypass (Rust changes)TEST_GUARD_SKIP=1 pnpm gatesexits 0 with all 18 gates at d375842; the commit after it adds one assertion, checked withvitest run src/ui/tokens.test.ts(9 passed),biome checkandpnpm typecheck:test.Checklist (YUI principles)
docs/reference/client-context.mdalongside the code: nonedocs/agent-guide/architecture/map.js: none changedskip-testslabel justified: 186 comment-only source lines count as source change fortest-guard; the only behaviour under test is the card check, which ships its test