Repository navigation
v0.4: spec-only adoption seeds the empty leg; the FAMILY shape (a holder that pins member assembly roots) - #16
Conversation
A repository can honestly have nothing for one leg. Brett Heap, 2026-09-04,
on InkRouter's IRRS and IRSS: "We do not have any code yet for either service
and this is just 2 of what will be 8 services."
`git filter-repo` over an empty path list rewrites every commit to nothing
and leaves an empty HISTORY, which is not the same thing as an empty
repository and is not something to push at a project. So a leg no plan entry
assigns a path to is SEEDED from `templates/<role>-root/` as one initial
commit, with the identity the invocation carries, and the split commit mounts
and pins it exactly like an extracted one.
* `plan` records `seeding.<leg>.seeded_from_template` and the template it
would use, and warns.
* `check` WARNS and still passes: a spec-only repository is a legitimate
thing to adopt. Where the recorded block and the entries disagree — a
human answered an ambiguous path INTO the empty leg, which is the plan
working — it is a NOTE and the entries win.
* `execute` refuses without `--allow-empty-leg <leg>`, in the plan or on
its own command line. A plan that lost its code paths to a bad edit looks
identical from here, so the consent is a human's word, never an
inference.
* the verification table reads `code: 0 of N source paths (seeded from
template)` and still accounts for every source path by blob sha: the
template bytes were never in the source, so they count as added.
`conftest.make_source_repo` takes its second and third commits as data, so a
tree with no `src/app/main.py` can still be given a history to verify.
Lane: repo-shape
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_015WekBEXf55Xv64psGe5t3T
Ruled by Brett Heap on 2026-09-04, for InkRouter: "InkRouter is a set of
microservices and they deploy separately as api's. so maybe they each need
their own assembly repo. So probably InkRouter is only something that can
download all the others easily? like a holder folder and some utilities for
the family of services."
So a family is NOT a project. It has no spec leg and no code leg. It pins
other projects' ASSEMBLY ROOTS as submodules under `members/` and carries the
utilities to fetch and bootstrap them together, and it confers nothing:
membership is navigation, exactly as the three legs are.
* `scripts/family.py` — `init` (with `--reuse-empty-repo`, for the empty
`InkRouter` repository that exists today), `add`, `bump`, `remove`. Each
of the last three writes ONE commit with explicit pathspecs, moving the
gitlink and `members[].pin` together, which is the same lockstep rule an
assembly root applies to its legs.
* `templates/family-root/` — `family.yaml`, README, Makefile, the
`validate` workflow (the assembly root's private-legs pattern, unchanged,
because a member is a private assembly root that mounts two private legs
of its own), `scripts/validate-family.py` and `scripts/bootstrap.py`.
* a `family` naming form, precedence 5, `declared_only: true`. `InkRouter`
is spelled exactly like an assembly root and `family.yaml` is what tells
them apart — so the classifier reports the form only when it is asked
for. That is not a convenience: without it, adding the form would have
widened `also_matches` for every bare CamelCase name in every manifest
already in the wild, and `validate-manifest.py` compares that list
exactly.
* `update-shape.py` re-syncs a family root like an assembly root — same
copy pin, mirrored into `family.yaml`, green against
`validate-family.py`. The copy-source tables are SEPARATE because both
roots hold a `scripts/bootstrap.py` and they are different files.
* `materialize_family_root` is a third caller of the one materializer, so
the digest-writing loop has one implementation.
Lane: repo-shape
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_015WekBEXf55Xv64psGe5t3T
…absent README gains a "Families" section — when a family beats one project (the parts deploy separately), the InkRouter example of eight services and one holder, and what membership does NOT confer — and a paragraph on adopting a repository whose code leg is empty. AGENTS.md gains the two procedures an assistant would otherwise perform from memory: the `--allow-empty-leg` word is the human's, not the tool's, and `family.py init` has no prompt of its own, which makes getting the yes the assistant's job. `validate-family.py --no-members` is the complement of `--pins`: the envelope, the naming form and the copied shape files, with every member skipped. The family workflow runs it when the members could not be checked out, so the checks that do not need them still run and the ones that do are skipped out loud rather than passing on an unreadable surface — the previous step name claimed "envelope only" and ran nothing at all. Both workflow templates are actionlint-clean. Lane: repo-shape Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_015WekBEXf55Xv64psGe5t3T
There was a problem hiding this comment.
Sorry @brettheap, your pull request is larger than the review limit of 150,000 diff characters
There was a problem hiding this comment.
🟡 Changes recommended
update-shape.py’s PR-creation path has correctness/safety issues (ambiguous root-kind handling, missing checked_value validation, and invalid gh pr create --body argv construction) that should be fixed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR extends the repo-shape toolchain to support (1) adopting spec-only repositories by seeding an empty leg from templates (with explicit human consent), and (2) introducing the FAMILY shape: a non-project holder repo that pins member assembly roots as submodules under members/ and provides bootstrap/validation utilities.
Changes:
- Add spec-only adoption behavior: empty
spec/codelegs are seeded fromtemplates/<role>-root/, recorded in the plan, warned oncheck, and gated by--allow-empty-legonexecute. - Introduce the FAMILY holder shape (template + validator + bootstrap + workflow) and a management CLI (
scripts/family.py) forinit/add/bump/remove. - Update naming policy + validators +
update-shape.pyso family holders are declared-only by manifest and can be re-pinned like assembly roots.
File summaries
| File | Description |
|---|---|
| update-shape.py | Teach shape re-sync to detect and operate on both project roots and family roots. |
| tests/test_repo_hygiene.py | Extend hygiene checks to include new family scripts/templates and update doc caps. |
| tests/test_naming_policy.py | Expand naming-policy tests to cover declared-only family classification. |
| tests/test_family.py | Add end-to-end tests for family init/add/bump/remove/bootstrap/update-shape behavior. |
| tests/test_adopt_spec_only.py | Add tests covering “seed empty leg” adoption behavior and consent gating. |
| tests/conftest.py | Generalize synthetic repo creation to allow spec-only commit sequences. |
| templates/family-root/scripts/validate-family.py | New family gate validator: envelope + member lockstep + copied-shape drift. |
| templates/family-root/scripts/bootstrap.py | New family bootstrap: fetch submodules (with optional credential rewrite) and delegate to members. |
| templates/family-root/README.md | New family-holder README explaining semantics, lockstep pins, and CI credentialing. |
| templates/family-root/Makefile | New family targets for bootstrap/validate/pins delegating to Python utilities. |
| templates/family-root/family.yaml | New family manifest template (declared-only naming; members rewritten wholesale). |
| templates/family-root/contracts/shape-pin.yaml | New family copy-pin template for digest-pinning copied shape files. |
| templates/family-root/.gitignore | New family-root gitignore. |
| templates/family-root/.github/workflows/validate.yml | New validate workflow for family holders, including credentialed recursive submodule fetch. |
| scripts/validate-repository-naming.py | Add --role family and declared-only reporting behavior in CLI output. |
| scripts/shape_materialize.py | Add family-root materializer lists and shared materialization support. |
| scripts/repo_shape.py | Add declared-only family matching logic to naming policy classification. |
| scripts/family.py | New CLI to create and maintain family holders and their member pins. |
| README.md | Document seeded-leg adoption and the family-holder concept and workflows. |
| contracts/repository-naming.yaml | Add the fifth naming family (family) as declared-only, precedence below project-leg. |
| AGENTS.md | Extend agent procedure documentation for seeded-leg adoption and family-holder workflows. |
| adopt-project.py | Implement seeded-leg adoption (plan record, warnings, execute gating, verification output updates). |
Review details
Suppressed comments (1)
update-shape.py:857
- The
gh pr createinvocation passes the PR body as multiple argv items after--body, which will be parsed as extra positional arguments rather than a single body string. Also, when updating a family root the body currently hard-codesproject.yaml; it should reference the kind’s manifest.
url = run(["gh", "pr", "create", "--repo", repository, "--base", base,
"--head", branch, "--title",
f"Re-sync the shape copies to {upstream.repository} @ "
f"{target[:12]}",
"--body",
"Written by openRepoShape's `update-shape.py`: the copied "
"shape files were re-copied from the upstream and "
"`contracts/shape-pin.yaml` and `project.yaml` re-pinned onto "
f"{target}. No copy was hand-edited and every digest was "
"recomputed."], cwd=root)
- Files reviewed: 22/22 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if (root / "family.yaml").is_file() and not (root / "project.yaml").is_file(): | ||
| return FAMILY_KIND | ||
| return PROJECT_KIND |
| if not repository: | ||
| raise Refusal("update-pr-no-repository", | ||
| "project.yaml declares no assembly leg, so there is no " | ||
| "repository to open a pull request against") | ||
| raise Refusal("update-pr-no-repository", missing) |
The two changes touch disjoint files; the only conflict is the README line-count cap's docstring in `tests/test_repo_hygiene.py`, where both raised it and both argued why. Both arguments are kept and the cap is the higher of the two, 508 — the README is 503 lines with both sets of prose in it. Merged rather than rebased because the branch protection refuses a force-push, which is the same posture this standard takes everywhere: a ruleset that refuses is doing its job and is not to be worked around. Lane: repo-shape Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_015WekBEXf55Xv64psGe5t3T
|
There was a problem hiding this comment.
🔵 Needs a closer look
update-shape.py still needs hardening to refuse ambiguous roots and to validate manifest-derived values before passing them to gh arguments (stored review comments).
Review details
Suppressed comments (2)
update-shape.py:159
root_kind()treats a root that contains bothfamily.yamlandproject.yamlas a project, even though the docstring says the manifests are mutually exclusive. In that ambiguous stateupdate-shape.pycould re-pin and validate the wrong manifest/validator set; it’s safer to refuse and force the user to resolve the inconsistency.
if (root / "family.yaml").is_file() and not (root / "project.yaml").is_file():
return FAMILY_KIND
return PROJECT_KIND
update-shape.py:832
open_pull_request()passesrepository(from the root manifest) andtracking_branchdirectly into aghcommand. Since manifest content is repo-controlled input, validate these withchecked_value()before they becomegharguments to prevent argument-injection via values starting with-or otherwise unsafe spellings.
manifest = load_yaml(root / kind.manifest)
base = str((manifest or {}).get("tracking_branch") or "main")
if kind is FAMILY_KIND:
# A family declares its own repository: it has no legs to read one
# from, being a holder rather than a project.
- Files reviewed: 22/22 changed files
- Comments generated: 0 new
- Review effort level: Lite
…lag's Windows spelling (#68) (#70) Brett Heap, 2026-09-06: "fix the two readme lines and merge on green too", after a designed reading of the README surfaced both. The Layout block's line for contracts/repository-naming.yaml still said four naming families; the naming section has said five since the FAMILY shape (v0.4, #16). One word. "Rehearse first, creating nothing" documented --local-remote-dir only on openRepoShape and setup.sh, so a Windows reader had no rehearsal. One sentence gives `py setup-project.py Atlas --org <your-org> --local-remote-dir .\rehearsal` and says what it still does over the network: run from a download it self-bootstraps a temporary clone of the standard first, from a checkout nothing (checked against setup-project.py). The hygiene test that collects every `py <file>` run still holds. The command sits on one line, per Copilot's review. README 967 -> 971; cap moved with the dated rationale. 621 passed, 1 skipped; tests, tests-macos and tests-windows green. Lane: xfactory-2 (xFactory-2) Co-Authored-By: Claude Fable 5.1 <[email protected]>
…5 cites the 34 pull requests merged since #343, section 6 drops the 13 known-limit issues that closed and adds the 63 checklist lines the five parents gained, section 7 lists the 12 open milestone issues, and the preflight sentence offers only what the preflight offers (#472) Refresh round 1 of the draft, against main d41cc29 (#402, merged 2026-10-13T21:17:39Z). GitHub was read between 21:23 and 21:43 UTC: the merged pull requests, the v1.0.0 milestone open and closed, every open issue, and the five tracking parents with their sub-issues, bodies and comments. Every merge commit of the 217 merged pull requests is on main. Section 5 places each of the 34 pull requests merged after #343 (2026-10-12T22:31:20Z) in its area, from its own body, one clause each; all 217 merged pull requests are now cited, with #16, #53 and #57 still in two areas. Three earlier sentences are made true of main: `check` has more verdicts than the four it named, and #465's docs and #505's accuracy pass show that `validate-pins.py` may ask `gh api` and that `openRepoShape --preflight` offers only `gh`, its login and its credential helper (`setup-project.py --preflight` also offers `git`). Section 6 lists the 47 open, unmilestoned sub-issues (it listed 60). It drops #189, #293, #303, #328, #386, #286, #259, #275, #322, #324, #338, #339 and #359, which closed. #389 is reworded now that #305's refusal has landed. #420 and the `a=b` line are narrowed to a hand-edited `adopt_branch:`, because an offline probe on d41cc29 shows #493's `plan-tracking-branch-missing` now stops a bad `tracking_branch:` at `check`, with no leg made, while `adopt_branch: "a..b"` still passes `check` and fails after both legs exist. The family annotated-tag line says `bump --to` now refuses one (#466). The 63 new lines are the parents' checklist lines posted or added since the first build, each checked against the code at d41cc29. Left out, and said so in the refresh record: docstring, comment and wording nits (as L2-7 was), lines that describe a branch not on main (#504's, #507's, #511's, #515's and #517's), lines filed into the milestone (#485, #514, #516), and three with no effect a person meets. Section 7 lists the 12 open milestone issues; 24 of the 30 it listed have closed. Lane 4's #510, #511, #512 and #513 have not landed, so #471, #499, #500, #501 and #502 stay open here and the Windows qualifier stays. Lane: openreposhape-4 (openRepoShape-4) Co-Authored-By: Claude Opus 5.5 <[email protected]>



Lane: repo-shape
Two additions, one ruling. Brett Heap, 2026-09-04, on the InkRouter org:
A. A leg with nothing in it is SEEDED, not extracted
git filter-repoover an empty path list rewrites every commit to nothingand leaves an empty HISTORY, which is not the same thing as an empty
repository. So a leg no plan entry assigns a path to is seeded from
templates/<role>-root/as one initial commit — the same bytes a freshscaffold writes, with the identity the invocation carries — and the split
mounts and pins it exactly like an extracted one.
planrecordsseeding.<leg>.seeded_from_templateand the template, andwarns.
checkWARNS and still passes: a spec-only repository is alegitimate thing to adopt.
executerefuses without--allow-empty-leg <leg>, in the plan or on itsown command line. A plan that lost its code paths to a bad edit looks
identical from here, so the consent is a human's word, never an inference.
code: 0 of N source paths (seeded from template)and still accounts for every source path by blob sha: thetemplate bytes were never in the source, so they count as added.
answered an ambiguous path INTO the empty leg, which is the plan working —
the entries win and it is a note, not a refusal.
B. The FAMILY shape: a holder that pins member assembly roots
A family is not a project: no spec leg, no code leg, no
project.yaml.It pins other projects' ASSEMBLY ROOTS as submodules under
members/andcarries the utilities to fetch and bootstrap them together. It confers
nothing — a project in no family is reviewed identically to one in this
family; membership is navigation, exactly as the three legs are.
scripts/family.py—init(with--reuse-empty-repo),add,bump,remove. The last three each write ONE commit with explicit pathspecs,moving the gitlink and
members[].pintogether: the same lockstep rule anassembly root applies to its legs. A family pins assembly roots, never
legs, and refuses one.
templates/family-root/—family.yaml(kind: family-manifest, theshape pin,
members:last so the tool rewrites by truncation rather thansplice), README, Makefile,
scripts/validate-family.py,scripts/bootstrap.py, and avalidateworkflow that is the assemblyroot's private-legs pattern unchanged, since a member is a private assembly
root that mounts two private legs of its own.
validate-family.pychecks the envelope, the family name, and every memberthree ways: gitlink ==
pin.commit, the tree digest recomputed from themember's object store, and the mounted
project.yaml'sid— a repositoryat the right commit is not by itself the project the row claims. It also
checks the copied shape files against their digests.
--pinsand--no-membersare complements.familynaming form, precedence 5,declared_only: true.InkRouteris spelled exactly like an assembly root and
family.yamlis what tellsthem apart. Declaring it is not a convenience: without it, adding the form
would have widened
also_matchesfor every bare CamelCase name in everymanifest already in the wild, and
validate-manifest.pycompares that listexactly.
update-shape.pyre-syncs a family root like an assembly root — same copypin, mirrored into
family.yaml, green againstvalidate-family.py. Thecopy-source tables are SEPARATE because both roots hold a
scripts/bootstrap.pyand they are different files.The InkRouter plan this serves
InkRouter/IRRSandInkRouter/IRSSin place, each with--allow-empty-leg code: they keep their names, their identities andtheir histories, the spec leg is extracted and the code leg is seeded.
IRRS's.claude/is still areview_requiredquestion a human answersin the plan.
family.py init --org InkRouter --family InkRouter --reuse-empty-repo—the
InkRouterrepository exists today with zero commits, which is areserved name rather than a started project.
family.py add --member InkRouter/IRRSand--member InkRouter/IRSS, onecommit each, and six more services as they arrive.
Nothing here creates a repository: the tests use local bare repositories via
--local-remote-dir, and no real repository was touched.Tests
python3 -m pytest tests -q→ 330 passed, 0 failed (mainis at 279after #15; +51 here: 13 for the spec-only adoption, 38 for the family,
including the naming-form cases).
actionlintis clean on both workflowtemplates. No test creates a real repository; every one of them scaffolds
into bare repositories in a temporary directory.
origin/mainis merged in rather than rebased onto, because branchprotection refuses a force-push — the same posture this standard takes
everywhere. The only conflict was the README line-count cap's docstring in
tests/test_repo_hygiene.py, where #15 and this branch both raised it: botharguments are kept and the cap is 508 for a 503-line README.
🤖 Generated with Claude Code
https://claude.ai/code/session_015WekBEXf55Xv64psGe5t3T