Repository navigation
Description
Lane: openreposhape-2 (openRepoShape-2)
What was asked
Brett Heap, 2026-09-10, in session:
what tools do we have to check a repo to make sure it is compliant with openRepoShape?
The answer today is: several, and none of them is the answer. A person
holding an arbitrary repository has to know that validate-repository-naming.py
classifies the three names, that the project's OWN scripts/validate-manifest.py
and scripts/validate-pins.py are the pinned gate, that update-shape.py check
is what says whether the copies have fallen behind the standard, that a family
holder runs scripts/validate-family.py instead of the first two, and that a
directory carrying none of those is not a shape root at all and wants
adopt-project.py plan or setup.sh. Five commands, one order, and the order
is tribal knowledge.
add that
What this issue is for
ONE command that takes an arbitrary repository and answers one question —
is this compliant with openRepoShape, and if not, what is missing — by
running the existing checks in sequence and printing ONE verdict.
It REIMPLEMENTS NOTHING. Every row is an existing validator or
update-shape.py's own verdict machinery; this is the sequence, the table and
the verdict, and nothing else.
The design, as the record
check-shape.py at the repository root (Python 3 standard library, like
update-shape.py), run from a checkout of the standard:
./check-shape.py [--root <path>] [--json] # default --root .It never fetches, never writes, and needs no gh: the upstream it compares a
project's copies against is THE CHECKOUT IT IS RUN FROM, which is what makes
the whole run offline.
Detection. Read the root: project.yaml with kind: project-manifest ->
PROJECT; family.yaml with kind: family-manifest -> FAMILY; neither ->
NOT A SHAPE ROOT.
PROJECT rows, in this order.
- naming —
validate-repository-naming.py --project project.yaml
semantics, against the standard's owncontracts/repository-naming.yaml. - manifest — the PROJECT'S OWN
scripts/validate-manifest.pywhen it is
there (it is the pinned copy, and that is the point), else the standard's
template copy against the tree; the row says which was used. - pins — the project's own
scripts/validate-pins.pylikewise: the
lockstep invariant and the shape-copy digests. - shape currency —
update-shape.py check's per-file verdicts,
summarised (n unchanged / n upstream-changed / n locally-modified / n both
/ n upstream-added), with the standard's commit against the pinned commit. - legs — for each leg in
project.yaml: mounted (gitlink present,
directory populated) or not, and whether the checked-out commit equals the
pin. No fetch. - agent files —
AGENTS-shape.md,AGENTS.md,CLAUDE.mdpresent or
absent at the root. They are shape copies, so rows 3 and 4 already digest
them; this row is for a reader.
FAMILY rows. The holder's own scripts/validate-family.py;
update-shape.py check; each member in family.yaml — pinned copy under
members/<Project> present and detached at the pin — and whether a working
clone sits beside the holder (family.py siblings is what places one).
NOT A SHAPE ROOT. Classify the directory name (and origin's repository
name, if there is one) under the naming policy with --explain; report what
IS there (a .gitmodules? spec//code/? a contracts/?); and name the way
in — adopt-project.py plan --source <path> --project <Name> for an existing
repository, setup.sh for a new one. Exit 2.
Output. A table of rows, each ok / FINDING / n/a with a one-line
reason, and for every FINDING the exact next command — the house rule that a
refusal names its fix. Then ONE verdict line:
| verdict | when |
|---|---|
COMPLIANT |
every row ok and the shape is current |
COMPLIANT, SHAPE BEHIND (n upstream-changed, m upstream-added) |
valid, but the standard has moved |
DRIFTED (n locally-modified or both) |
the project edited its own copies |
INVALID (<which validator>) |
a validator went red |
NOT A SHAPE ROOT |
neither manifest is there |
--json emits the same as one object (rows + verdict + exit).
Exit codes, documented in the module docstring the way update-shape.py
documents its own: 0 compliant and current · 1 findings (behind, drifted,
invalid, a leg off its pin) · 2 not a shape root · 3 usage or environment.
The shim. openRepoShape --check [<path>]. Run from a file inside a
checkout of the standard it execs check-shape.py --root <path>; run from
stdin or installed it fetches a checkout of $OPENREPOSHAPE_REPO@$OPENREPOSHAPE_REF
the way setup.sh self-bootstraps one and runs it there, then cleans up.
--check takes no other flags. --install is untouched.
templates/ is UNTOUCHED. Acceptance: git diff --stat origin/main -- templates/ is empty. Nothing here may give an existing project an
upstream-changed row.
Docs. A README subsection under an existing ## (no new ## heading —
the handbook guard's tables map ## headings), the Layout block gains
check-shape.py, docs/handbook.html gains the matching region and its
footer is re-cut to git hash-object README.md, and AGENTS.md gains a short
"Checking a repository's compliance" section: when to run it, how to read the
verdict, that a FINDING names its fix and the agent runs THAT rather than
improvising, and that NOT A SHAPE ROOT means adopt or scaffold — the human
decides.
House rules
Per #92: one governing issue, one claim, a pull request (never a push to
main), commits with the lane trailer, templates/ proved untouched, and the
caps in tests/test_repo_hygiene.py moved with a dated docstring entry naming
this issue.
Activity
brettheap commentedon Sep 10, 2026
CLAIMED — lane openreposhape-2 (openRepoShape-2), session 8fa66b30-4cf5-4b80-b40c-ac3640cf45ab, 2026-09-10T22:54:50Z, for the whole of this issue, branch
feat/check-shape.Reads before claiming:
gh issue view 95 --comments— no comments, nobody else on it.gh pr list --repo opensoft/openRepoShape --state open— empty; no open pull request touches this.git ls-remote --heads origin | grep -i check—fix/private-leg-checkoutandneutral-pin-recheck-and-leg-gitignoresonly, neither of them this work; nofeat/check-shapeon the remote.Work happens in a linked worktree off
origin/mainat 0fa73b7; the shared checkout is another lane's and is never switched.README, the handbook and AGENTS.md learn the doctor; both caps move w…
The doctor's suite: a standard this file commits, and a project scaff…
The shim's two remaining edges: a bare run says what it does, and `--…
brettheap commentedon Sep 11, 2026
RULING 2026-09-10, Brett Heap, in session, superseding two names in the design above:
So, in PR #96:
shape-doctor.py, notcheck-shape.py;openRepoShape --doctor [<path>], not--check, and a later repair becomes--doctor <path> --fix;--doctorsince The preflight offers to install what is missing and starts the login: a guided first run, --doctor (after #50) #59/The preflight offers to install what is missing, starts the login, and --doctor runs just that (#59) #62, "check this machine and stop; creates nothing" — is renamed--preflighteverywhere, because that is literally what it is: section (1) of the scaffold run and nothing else.--doctorappeared 38 times before that commit and--preflightappears 38 times after it.Everything else in the design stands: same rows, same registry, same verdicts, same exit codes, same
--json,templates/untouched. The branch is stillfeat/check-shape— it was cut and claimed before the ruling, and renaming a pushed branch under an open claim buys nothing.Three later additions, also on Brett's word and also in #96:
the checks are a registry (
id,applies_to,run(ctx) -> Row, and afixslot that isNonein every one of them) so the repair mode hangs off a slot rather than a rewrite; manifest validation is a second registry keyed bykind:, so acontracts/*.yamlnothing validates is a FINDING by name; aleg shape filesrow; and--jsonrows carryid;a read-only
machinerow,n/aby status so it can never move the verdict;— a bare
openRepoShapeprints its usage and exits 1, and--installends with a read-onlymachine:block that installs nothing and changes no exit code.Recorded here rather than edited into the body above, so the sequence of decisions stays readable.
Lane: openreposhape-2 (openRepoShape-2)