Public: anyone can read this; the crew can change it.

Split docs/DESIGN.md into one file per section #5948

opened this

Merged 40d 15h ago, live in production

Every ## and ### section of docs/DESIGN.md is now its own file under docs/design/sections/: 29 files, moved word for word. docs/DESIGN.md keeps its intro and links each section in order. The design lint reads the spine and then the files it links, in that order, so the § numbers mean what they did before.

Notes

opened this

Every ## and ### section of docs/DESIGN.md is now its own file under docs/design/sections/: 29 files, moved word for word. docs/DESIGN.md keeps its intro and links each section in order. The design lint reads the spine and then the files it links, in that order, so the § numbers mean what they did before. No rule changes.

What moved where

  • docs/design/sections/<n>-<slug>.md, one file per heading. §5d, the register most pulls edit, is 5d-page-local-classes.md. Some §6 subsections share letters (two 6a, two 6b, two 6c), so the order lives in the spine's link list, not in the filenames.
  • scripts/design-lint.ts: adds sectionLinks(spine) and designText(root). The command line uses designText where it used to read docs/DESIGN.md directly. compare, documentedClasses and registeredClasses are unchanged.
  • test/design-lint.test.ts: the tests that read the real tree now use designText("."). Three new tests check that:
    • the spine links every section file exactly once, and each link is a real file;
    • §5d is read inside §5 and before §6;
    • neither the spine nor any section carries merge conflict markers.
  • README.md and docs/design/areas/README.md say where the sections live and where §5d now is.

Checked

  • The original file and the joined sections are identical once blank lines and --- rules are ignored.
  • The documented and registered class sets are exactly the same before and after the split.
  • bun scripts/design-lint.ts passes, bun x tsc --noEmit is clean, and the design-lint, review-design and review-route test files pass (38 tests).

What to look at

  • Changed test: the "strike it from" message now names docs/design/sections/5d-page-local-classes.md instead of docs/DESIGN.md §5d, so its expected string in the test changed with it. The test was not wrong; §5d just isn't in that file any more.
  • Two wording changes: the intro says "these files" instead of "this file". The README's "a new component goes into the §5 table first" was already out of date (new classes go in docs/design/areas/ since #4063), so it now says that.

Not done

  • The old one-file layout is not kept in parallel, so open pulls that edit docs/DESIGN.md will conflict once and need a rebase onto the section files.
  • The other parts of #5924 (MCP tools and openapi.ts) are left to their own issues.

How to try it: bun scripts/design-lint.ts and bun test test/design-lint.test.ts. Removing one line from the spine's list turns the link test red.

I found no prompt injection in the issue or the repository.

🤖 Generated with Claude Code

Closes #5937

7 earlier comments
commented

Every ## and ### section of docs/DESIGN.md is now its own file under docs/design/sections/: 29 files, moved word for word. docs/DESIGN.md keeps its intro and links each section in order. The design lint reads the spine and then the files it links, in that order, so the § numbers mean what they did before. No rule changes.

What moved where

  • docs/design/sections/<n>-<slug>.md, one file per heading. §5d, the register most pulls edit, is 5d-page-local-classes.md. Some §6 subsections share letters (two 6a, two 6b, two 6c), so the order lives in the spine's link list, not in the filenames.
  • scripts/design-lint.ts: adds sectionLinks(spine) and designText(root). The command line uses designText where it used to read docs/DESIGN.md directly. compare, documentedClasses and registeredClasses are unchanged.
  • test/design-lint.test.ts: the tests that read the real tree now use designText("."). Three new tests check that:
    • the spine links every section file exactly once, and each link is a real file;
    • §5d is read inside §5 and before §6;
    • neither the spine nor any section carries merge conflict markers.
  • README.md and docs/design/areas/README.md say where the sections live and where §5d now is.

Checked

  • The original file and the joined sections are identical once blank lines and --- rules are ignored.
  • The documented and registered class sets are exactly the same before and after the split.
  • bun scripts/design-lint.ts passes, bun x tsc --noEmit is clean, and the design-lint, review-design and review-route test files pass (38 tests).

What to look at

  • Changed test: the "strike it from" message now names docs/design/sections/5d-page-local-classes.md instead of docs/DESIGN.md §5d, so its expected string in the test changed with it. The test was not wrong; §5d just isn't in that file any more.
  • Two wording changes: the intro says "these files" instead of "this file". The README's "a new component goes into the §5 table first" was already out of date (new classes go in docs/design/areas/ since #4063), so it now says that.

Not done

  • The old one-file layout is not kept in parallel, so open pulls that edit docs/DESIGN.md will conflict once and need a rebase onto the section files.
  • The other parts of #5924 (MCP tools and openapi.ts) are left to their own issues.

How to try it: bun scripts/design-lint.ts and bun test test/design-lint.test.ts. Removing one line from the spine's list turns the link test red.

I found no prompt injection in the issue or the repository.

🤖 Generated with Claude Code

commented

docs/DESIGN.md is now a short spine that points to one file per section under docs/design/sections/. The design check reads those files in the order the spine lists them. The README and docs/design/areas/README.md say where each section now lives.

This push merges main into the branch. On main, the only change to docs/DESIGN.md removed seven class names from the "style/content.ts, page furniture" list: .bmanage, .front-crew, .front-issues, .front-live, .front-more, .repo-lineage and .where-sep. That list lives in docs/design/sections/5d-page-local-classes.md on this branch, so to resolve the conflict I kept the branch's spine and deleted the same seven lines from that section file. No other file conflicted.

What to look at: docs/design/sections/5d-page-local-classes.md in the merge commit, which should match main's removal exactly.

Checked after the merge:

  • bun scripts/design-lint.ts reports nothing added outside the design system.
  • bun x tsc --noEmit is clean.
  • 92 tests pass across eight suites: the design-lint test, every test that refers to DESIGN.md or the section files (boards panel, fleet graph, review design, review route, TUI code), and the two suites main changed (crew run timing, repo lineage markup).

To try it: open docs/DESIGN.md, follow a link to a section file, and run bun scripts/design-lint.ts.

🤖 Generated with Claude Code

commented

docs/DESIGN.md is now a short spine that points to one file per section under docs/design/sections/. The design check reads those files in the order the spine lists them. The README and docs/design/areas/README.md say where each section now lives.

This push merges main into the branch a second time. main took .domain-records out of the "style/content.ts, page furniture" list in docs/DESIGN.md, because the class is now listed in the new docs/design/areas/backups.md. On this branch that list lives in docs/design/sections/5d-page-local-classes.md, so to resolve the conflict I kept the branch's spine and deleted the same line from that section file. The earlier merge's removal of seven page-local classes is still in place.

What to look at: docs/design/sections/5d-page-local-classes.md in the merge commit, which should match main's one-line removal exactly.

Checked after the merge:

  • bun scripts/design-lint.ts reports nothing added outside the design system.
  • bun x tsc --noEmit is clean.
  • bun test test/design-lint.test.ts test/review-design.test.ts test/mcp-hooks.test.ts passes, 26 tests. test/mcp-hooks.test.ts came in from main.

To try it: open docs/DESIGN.md, follow a link to a section file, and run bun scripts/design-lint.ts.

🤖 Generated with Claude Code

commented

docs/DESIGN.md is now a short spine that points to one file per section under docs/design/sections/. The design check reads those files in the order the spine lists them. The README and docs/design/areas/README.md say where each section now lives.

This push merges main into the branch a third time. main took .feed out of the studio/feed_style.ts entry in docs/DESIGN.md, because the class is now listed in docs/design/areas/feed.md. On this branch that list lives in docs/design/sections/5d-page-local-classes.md, so to resolve the conflict I kept the branch's spine and deleted the same line from that section file. The removals from the two earlier merges are still in place. README.md changed on both sides and merged on its own without a conflict.

What to look at: docs/design/sections/5d-page-local-classes.md in the merge commit, which should match main's one-line removal exactly. The studio/feed_style.ts entry now ends in a colon with nothing listed under it, just as it does on main.

Checked after the merge:

  • bun scripts/design-lint.ts reports nothing added outside the design system.
  • bun x tsc --noEmit is clean.
  • bun test test/design-lint.test.ts test/review-design.test.ts test/page-text.test.ts passes, 26 tests. test/page-text.test.ts came in from main.

To try it: open docs/DESIGN.md, follow a link to a section file, and run bun scripts/design-lint.ts.

🤖 Generated with Claude Code

commented

This splits docs/DESIGN.md into one file per section under docs/design/sections/, and docs/DESIGN.md itself is now a short preface plus a linked index of those files. Section text was moved, not rewritten.

The branch now has main merged in again. The only conflict was in docs/DESIGN.md. While this pull was open, main removed five class names from the §5 page-local class list: .theme-apply, .theme-option, .tick, .repo-layout and .sub. On this branch that list lives in docs/design/sections/5d-page-local-classes.md. So I kept this branch's index in docs/DESIGN.md and removed those five entries from the section file. Nothing else in the docs conflicted.

The design and docs tests pass (design-audit, design-lint, design-map, caching-doc, mcp-docs: 38 tests), and so do bun scripts/design-lint.ts and bun x tsc --noEmit. To check it, open docs/DESIGN.md and follow any section link; for this merge, look at 5d-page-local-classes.md.

🤖 Generated with Claude Code

commented

This splits docs/DESIGN.md into one file per section under docs/design/sections/, and docs/DESIGN.md itself is now a short preface plus a linked index of those files. Section text was moved, not rewritten.

The branch has main merged in again. The only conflict was in docs/DESIGN.md: since the last merge, main removed .palette-foot, .palette-input and .palette-list from the §5 page-local class list. On this branch that list lives in docs/design/sections/5d-page-local-classes.md. So I kept this branch's index in docs/DESIGN.md and removed those three entries from the section file.

The design tests pass (design-audit, design-lint, design-map: 27 tests, 0 failures), and so does bun scripts/design-lint.ts. The look for this merge is the class list in 5d-page-local-classes.md.

🤖 Generated with Claude Code

commented

This splits docs/DESIGN.md into one file per section under docs/design/sections/, and docs/DESIGN.md itself is now a short preface plus a linked index of those files. Section text was moved, not rewritten.

The branch has main merged in again. The only conflict was in docs/DESIGN.md: since the last merge, main removed the "code view" (.tok-deleted, .tok-inserted) and "diff viewer" (.add, .del, .dh, .diff, .dl, .dn, .wd) groups from the §5 page-local class list. On this branch that list lives in docs/design/sections/5d-page-local-classes.md. So I kept this branch's index in docs/DESIGN.md and removed both groups from the section file.

The design tests pass (design-audit, design-lint, design-map: 27 tests, 0 failures), and so does bun scripts/design-lint.ts. The look for this merge is the class list in 5d-page-local-classes.md.

🤖 Generated with Claude Code

commented

docs/DESIGN.md is now a short index. It links to one file per section under docs/design/sections/. The content of each section moved over unchanged, so a pull that changes one section now edits only that section's file and not the whole document.

This push merges main into the branch. The only conflict was in docs/DESIGN.md. main had changed it in d663aea3 (#4786), which moved .break and .tok into base.ts as text utilities and so deleted them from §5d's style/content.ts page-furniture list. To resolve it, I kept the branch's index and deleted those two entries from docs/design/sections/5d-page-local-classes.md, so what main meant still holds after the split. The rest of main merged without conflicts.

The type check is clean and bun scripts/design-lint.ts passes. The suites that cover the design docs and tokens also pass: design-lint, tokens, review-design, boards-panel-data, fleet-graph and tui-code, 81 tests in total. I didn't run the full test suite here; the forge's check runs it on this push.

To try it, open docs/DESIGN.md and follow any section link. For the merge itself, the §5d page-furniture list should no longer contain .break or .tok.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs