Repository navigation
Naming families are six everywhere: handbook.html said five and four, the assembly-root README template said four; a hygiene test now ties every count to the policy (#87) - #88
Conversation
… the assembly-root README template said four; a hygiene test now ties every count to the policy (#87) #87: found while landing #86 (the sixth form, `workspace` = `<user>-wip`). Three places quoted the naming-families count in prose and none of them agreed with `contracts/repository-naming.yaml`, or with each other. docs/handbook.html (the designed one-page reading of the README, #69/#71): - "The three legs" section, the families sentence: "five" -> "six", and the sentence now names the sixth form the same way it names the other five — "`<user>-wip`, the person's workspace repository, unambiguous by construction" — appended after "family holders" (the README's own Layout block, lines ~509-517, is the wording source). - The Layout reference table: "the four naming families, as data" -> "the six naming families, as data" (matches the README's own Layout block, line 1188). - Dropped the `<p class="aside">` note saying the README's line reads "the four naming families" against a naming section that counts five — both halves are now false (the README says six in both places), so there is nothing left for the aside to explain. The page has no changelog/"what changed" block, so none was invented for the still-pending Families workstation layout / "Carrying in-flight work" / park and resume sections #87 calls out — those stay a separate, larger regeneration, not this object. - `<dt>`/`</dt>` balance unchanged (23/23 before and after); `<p>`/`</p>` count moved from 148/113 to 147/112, the same 35-open-without-close offset the file already carried, since the removed aside was one closed `<p>...</p>` pair. Fed the file through `html.parser.HTMLParser` with no exception. templates/assembly-root/README.md, line 150: "the four naming families (copied from the shape)" -> "the six naming families (copied from the shape)". THIS FILE IS TEMPLATED: its bytes are materialized into every newly scaffolded project's own README.md, so this fix reaches NEW projects only — an existing project's README is project-owned and is not re-synced by `update-shape.py`. `templates/family-root/README.md` carries no "naming families" sentence at all (checked; nothing to fix there). tests/test_repo_hygiene.py gains `test_every_naming_families_count_matches_the_policy`: loads `contracts/repository-naming.yaml` through `scripts/repo_shape.py`'s own `NamingPolicy.load()` (the same top-level `families` list `validate-repository-naming.py --explain` counts and that `test_naming_policy.py` parametrizes over as `FAMILY_IDS` — `project-leg`'s three `roles:` sub-entries nest one level deeper and are not counted again), maps the count to its spelled word for a small range (one..ten), then walks every `git ls-files`-tracked `.md`/`.html` file tree-wide, in `test_no_committed_file_names_a_host_absolute_path`'s style (a decode failure is skipped, not failed), asserting every `(\w+) naming families` match spells that word. Grepping the tree once while writing it found the phrase in exactly three of the repository's eighteen tracked `.md`/`.html` files — README.md, docs/handbook.html, templates/assembly-root/README.md — all three fixed above; templates/family-root/README.md has none today but is still walked, so a copy landing there later is caught the same way with no test change required. Confirmed red on origin/main's content: stashed just the two doc fixes (`git stash push -- docs/handbook.html templates/assembly-root/README.md`) with the new test in place, and it failed — `{'docs/handbook.html': ['five', 'four', 'four'], 'templates/assembly- root/README.md': ['four']}` — against the policy's six; popped the stash and it passed. README.md and AGENTS.md are untouched — their line-count caps in this same test file (1219 and 374 respectively) still hold exactly, so neither cap needed moving. docs/handbook.html carries no line-count cap in this suite. 45 passed (tests/test_repo_hygiene.py); 888 passed, 1 skipped for the full suite (`python3 -m pytest tests -q`). Lane: xfactory-2 (xFactory-2) Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
@codex review |
There was a problem hiding this comment.
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 10 hours and 31 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
Reviewer's GuideThe PR resolves naming-family count drift by updating the handbook and assembly-root README template to six families, documenting Flow diagram for policy-driven naming-family count validationflowchart LR
P["repository-naming.yaml policy"] --> L[NamingPolicy loader]
L --> T[test_every_naming_families_count_matches_the_policy]
T --> F["Tracked .md and .html files"]
F --> V["Every <word> naming families count"]
V --> R["Count matches six"]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
There was a problem hiding this comment.
🟢 Approval recommended
The changes are documentation-alignment plus a targeted hygiene test, with only a minor maintainability improvement suggested for clearer future test failures.
Pull request overview
This PR aligns all prose references to the repository-naming policy’s six top-level naming families across the handbook and assembly-root README template, and adds a hygiene test to prevent future drift by deriving the expected count directly from NamingPolicy.
Changes:
- Update
docs/handbook.htmlto consistently state “six naming families”, include the<user>-wipworkspace form, and remove an obsolete aside. - Update
templates/assembly-root/README.mdto say “the six naming families (copied from the shape)”. - Add a repo hygiene test that loads
contracts/repository-naming.yamlviaNamingPolicyand asserts any tracked.md/.htmlprose count matches the policy.
File summaries
| File | Description |
|---|---|
| tests/test_repo_hygiene.py | Adds a policy-derived guard test that prevents naming-family count drift in tracked .md/.html prose. |
| templates/assembly-root/README.md | Updates the assembly-root README template’s layout table to reflect six naming families. |
| docs/handbook.html | Fixes inconsistent naming-family counts, adds the workspace form to the list, and removes a now-false aside. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| policy = NamingPolicy.load(REPO / "contracts" / "repository-naming.yaml") | ||
| expected = NAMING_FAMILIES_NUMBER_WORDS[len(policy.families)] | ||
| tracked = subprocess.run(["git", "ls-files"], cwd=str(REPO), |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a36113012d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if not rel.lower().endswith((".md", ".html")): | ||
| continue |
There was a problem hiding this comment.
Include the policy's own family count in the scan
When another family is added, contracts/repository-naming.yaml:5 can remain the six live naming families without failing this test because the extension filter skips YAML entirely; even after every Markdown/HTML count is updated, the policy's own stale prose count survives. Include that policy comment in the scan and account for its intervening live wording so the claimed every-count invariant covers all existing count statements.
Useful? React with 👍 / 👎.
…he family workstation layout, --family, park/resume and the user commands, the workspace form; a guard that the page follows the README's outline (#89) (#90) * docs/handbook.html: the designed reading of the README at cbca5b4 — the family workstation layout, --family, park/resume and the user commands, the workspace form; a guard that the page follows the README's outline (#89) The page was cut from README.md at `c093813` (#69, PR #71) and #88 fixed one word in it. Everything the README gained in between was missing, so the designed page told a newcomer less than the file it is a reading of. This is the regeneration, at `cbca5b4`, in the page's own design and voice. WHAT THE PAGE GAINED - `#park`, a new section between "Keeping shape current" and "The degrade rule" — the whole of `## Carrying in-flight work to another workstation` (#80): the two root verbs and `ARGS=--dry-run`; `### park <Name>` and `resume <Name>`, from anywhere (#83) with the estate resolution, `--repo`, the fresh-machine `resume --workspace`, and what the two leave behind (including READ THE LINES, not the exit code); `### Who implements it, and what the record is` — the Speckit git extension rather than this repository, the person's record named once in `~/.agents/workspace.yaml`, `<user>-wip` with the home-org default and the opt-in `orgs:` map (#86), nothing under `worktrees/` ever committed, `resume` refusing on divergence, the family holder's dispatch into the WORKING clones, and native Windows parking nothing. One rail entry, `Park and resume`. - `#families` gained two `<h3>`s: "The workstation layout: a plain folder, and two copies of every member" (#79) — the plain `<Family>/`, the holder at `<Family>/<Family>`, `--into` as the PARENT and `--work-dir` as the override, `make siblings`, which copy you work in, and that nothing ever moves a checkout — and "The InkRouter example", whose five `family.py` commands and two trees are the README's current ones (the block it replaced still named `../InkRouter` as the holder). Plus the holder's own `make validate` and its COPY pin. - `#start` gained "Joining a family" (`--family <Family>`, and that standing in the folder needs no flag at all — AGENTS.md) and "What setup.sh actually runs", the seven-command flow including `mkdir -p <into>/<Family>` (#78), with the developer path from a checkout. The install step and the masthead's fastest path now say THREE commands, `unchanged` per file, and what `park` and `resume` are (#83). The rehearsal flag's Windows spelling is the README's own `py setup-project.py … --local-remote-dir .\rehearsal` (#70), replacing an aside that told the reader to go and read `--help`. - `#legs` links `<user>-wip` to where such a repository lives, and gained the paragraph a reader of `openDox` needs: a neutral product may elect the shape and be its own assembly root, `also_matches` recorded rather than thrown away. `#layout` lists `park` and `resume`. `#agents` gained the rule that a refused `park` or `resume` is never worked around with a reset, a stash or a force-push, and that `--workspace` is nobody else's flag to pass. FIDELITY. 39 code blocks on the page: 31 byte-identical to a README block (whole, or a contiguous run of its lines), 0 re-wrapped, 5 quoted from README prose, 2 from README inline code, 1 assembled by the page from three quoted commands (the masthead). Every one of the 13 GitHub anchors resolves to a real README or AGENTS.md heading, all 27 in-page hrefs resolve to an id on the page, and the file still parses with `html.parser` with every tag balanced: one file, inline CSS and one inline script, one Google Fonts link with real fallback stacks, no images and no other network call. THE GUARD. `tests/test_repo_hygiene.py::test_the_handbook_follows_the_readmes_outline` ties the two files together, because nothing did: an explicit `README_HEADING_TO_HANDBOOK_ID` maps every `## ` heading of README.md to the id of the page element that carries it, so a new README section with no entry fails NAMING THE HEADING and a heading deliberately folded into a neighbour is a named decision; `HANDBOOK_SECTION_WITHOUT_A_README_H2` accounts for the four page sections that are not a README `## ` at all, so a page section cannot become unexplained. And the page names the README commit it is a reading of, exactly once, whose README must be byte-identical to the one in the tree — `git diff <sha> -- README.md`, against the working tree, so the page goes stale the moment the README changes rather than one commit later. That last check is skipped, and only that one, when the named commit is not in the clone: a `fetch-depth: 1` CI checkout has one commit and the object is absent there, while the outline checks are tree-only and run everywhere. Evidence: `python3 -m pytest tests/test_repo_hygiene.py -q` 46 passed; `python3 -m pytest tests -q` 889 passed, 1 skipped (`SHAPE_MEDXEHR_CLONE` is unset — pre-existing and unrelated). The five ways the new guard can fail were each exercised in a throwaway clone. Docs and one test only; no README, script, template or workflow change, and both size caps are untouched. Lane: xfactory-2 (xFactory-2) Co-Authored-By: Claude Fable 5.1 <[email protected]> * tests.yml: fetch full history so the handbook's staleness check bites in CI (#89) Ruled by Brett Heap on 2026-09-10: *set fetch-depth 0 so the staleness check bites in CI.* `test_the_handbook_follows_the_readmes_outline` compares README.md against the commit `docs/handbook.html` says it is a reading of, which needs that commit's OBJECT present. `actions/checkout`'s default `fetch-depth: 1` fetches one commit, so the object was absent and that one check skipped itself: green in CI, red only on the machine where the page would be regenerated, which is the wrong way round. All three jobs — `tests`, `tests-windows`, `tests-macos`, the only three `actions/checkout` steps in the file — now check out with `fetch-depth: 0`, and each says why in a comment naming the test. The test's BEHAVIOUR is unchanged: the "skipped when the named commit is not in this clone" branch stays, because a `git clone --depth 1` still hits it and a failure about the clone is not a failure about the page. Only its docstring moves, to say that CI is no longer such a clone. Evidence: `python3 -m pytest tests/test_repo_hygiene.py -q` 46 passed (with tests/test_windows_paths.py, 84 passed). The workflow parses under PyYAML and compares equal to HEAD's parse with the three checkout `with:` blocks removed — nothing else in the file moved. No actionlint on this machine; CI's own actionlint step lints `templates/assembly-root/.github/workflows/validate.yml` only, which is untouched. Lane: xfactory-2 (xFactory-2) Co-Authored-By: Claude Fable 5.1 <[email protected]> --------- Co-authored-by: Claude Fable 5.1 <[email protected]>



Lane: xfactory-2 (xFactory-2)
Claim: #87 (CLAIMED comment, 2026-09-10, on Brett Heap's "fix the naming-families drift in handbook.html and the assembly-root README")
Closes #87.
docs/handbook.htmlsaid "five naming families" in its Layout paragraph and "four" in its file table, with an aside about the README having said four;templates/assembly-root/README.mdhas said "the four naming families (copied from the shape)" since #1. The policy has SIX since #86. This makes every count six, extends the handbook's Layout paragraph with the sixth form in the README's own wording (<user>-wip, the person's workspace repository, unambiguous by construction), and drops the aside, both halves of which were now false. The handbook's markup stays balanced (dt/dd counts unchanged; one matched<p>pair removed;html.parserfeeds it cleanly). The assembly-root README is a TEMPLATED file — new projects only; existing projects' READMEs are project-owned and not re-synced.templates/family-root/README.mdcarries no such phrase.A hygiene test now ties the count to the policy:
test_every_naming_families_count_matches_the_policyloads the six top-level forms through the project's ownNamingPolicyloader and asserts every<word> naming familiesin every tracked.md/.htmlspells that number. Red on main (it foundfive,four,fourandfour), green here. Full suite: 888 passed, 1 skipped.Not here, as #87 records: the handbook is also missing the sections the README gained since #71 (the Families workstation layout, "Carrying in-flight work to another workstation", the
park/resumecommands) — a regeneration of the designed page, its own object.🤖 Generated with Claude Code
Summary by Sourcery
Align all naming-family documentation with the six-family policy and add a repository-wide guard against future count drift.
Bug Fixes:
<user>-wipworkspace form.Enhancements:
Documentation:
Tests:
NamingPolicyand checks all tracked Markdown and HTML prose for stale counts.