Skip to content

Ship agent-facing instructions with the shape: a pinned AGENTS-shape.md, pointer stubs in the root and legs, and update-shape.py support for a NEW pinned file #28

Closed

Description

@brettheap

(lane codex-intake-shape, filed on Brett Heap's word, 2026-09-04 — see the RULING comment below for the assignment)

Why

A scaffolded or adopted project gets human READMEs in all four roots and no agent-facing file. Agents open AGENTS.md/CLAUDE.md, not the README — this repository itself follows that convention (CLAUDE.md = "Read AGENTS.md."). The assembly-root README already carries the lockstep rule, the layout, "these are copies, edit upstream" and "the election confers nothing", but as prose for people mixed with CI-credential detail. The adopt policy already keeps a source's AGENTS.md/CLAUDE.md at the root because an agent reading them from inside the code leg "would be told about specifications it cannot see" — the same hazard applies to the shape's own rules, which today an agent in a leg never sees.

What to ship (proposed design; the lane decides the details)

  1. A digest-PINNED shape file with a NEW name at the assembly root — working name AGENTS-shape.md — carrying the procedures an agent needs, in the repository's voice:
    • advancing a leg: commit in the leg, push, then ONE commit in the root moving the gitlink, contracts/<role>-pin.yaml commit: and every workflow @<sha> together; never a bare git submodule update + commit;
    • never edit a copied shape file (drift is refused); the exit is upstream, then update-shape.py run from the standard, landed as a pull request;
    • what goes where (spec leg / code leg / root), and that mounts are role-named: spec/, code/, members/<Project> in a family;
    • make bootstrap / make validate / make pins, and that bootstrap places legs on the tracking branch AT the pinned commit;
    • never --admin, never a direct push to the default branch, never --allow-upstream-org / --yes on the agent's own initiative (the rules AGENTS.md here already states for the scaffold);
    • role: and every manifest field confer nothing; a consumer deriving permission from them is defective;
    • how descent is declared (neutral_product_pins: + contracts/<product>-pin.yaml, one commit), and what shape: / reference: mean.
      Pinned, so the standard's text stays current and drift-detected; a new name, so adopt has no collision.
  2. Templated pointer stubs for a fresh scaffold: a small AGENTS.md (and CLAUDE.md = "Read AGENTS.md.") at the assembly root whose first line points at the pinned file, leaving the rest for the project's own instructions. Rendered, not pinned — the project edits them freely.
  3. A pointer in each leg (spec-root, code-root): the leg's own AGENTS.md saying this is the leg of , the project's rules are in the assembly root, the other leg is at ../<path> from the root, and advancing this leg does not advance the project. The leg READMEs already say "clone the assembly root, not this"; put the same sentence where an agent reads.
  4. The family holder gets the same: a pinned agent file (or the same file, if it generalises) covering family.py add/bump/remove, members/, and "a family pins assembly roots, never legs".
  5. Adopt: adopt-project.py writes the pinned file and emits a follow_ups: entry to add the pointer line to the source's existing AGENTS.md/CLAUDE.md (never overwriting them — the existing collision rule).
  6. update-shape.py must be able to ADD a pinned file. Today it re-copies only files with a row in the project's contracts/shape-pin.yaml ("a file with no row is not a shape copy and is none of your business"), so a NEW upstream file never reaches MedxEHR, MedxGlass, MedxScribe or the InkRouter members. Proposed: check reports upstream-added for a file the upstream copy list names and the pin lacks; apply adds it only with an explicit flag (e.g. --add <path>), so the existing "only the pin's own rows" refusal stays deliberate for files a project merged away. Without this, the rollout to existing projects is a hand-run per project.

Constraints already in force here

Python 3 stdlib only; tests/test_repo_hygiene.py line caps (README/AGENTS) move by exactly the lines added; digest-pinned files are listed in scripts/shape_materialize.py (COPIED_VERBATIM / FAMILY_COPIED_VERBATIM) and the assembly-root shape-pin.yaml files: grows a row; the doctrine's sentence that the shape confers nothing must appear in the agent file too. Nothing here may read as a governance boundary.

Activity

  1. brettheap commented on Sep 4, 2026

    @brettheap
    ContributorAuthor

    (lane codex-intake-shape, 2026-09-04T05:36Z)

    RULING for lane repo-shape on this object (agent-facing instructions shipped by the shape + update-shape.py support for a new pinned file) — Brett Heap, 2026-09-04, in lane codex-intake-shape's session, on the recommendation above: "can you assign it to that lane and prompt it to do this?" — ASSIGNED to lane repo-shape, which owns openRepoShape.

    Rule 1 still applies: repo-shape posts its own CLAIMED comment here when it picks this up (sibling search: no branch or PR exists for it as of 2026-09-04T05:36Z; codex-intake-shape holds no claim and will not author on it). Lane codex-intake-shape is available for the codexFactory side if the intake profile later needs to reference the file.

  2. brettheap commented on Sep 4, 2026

    @brettheap
    ContributorAuthor

    (lane codex-intake-shape, 2026-09-04T13:06Z)

    RULING, superseding the assignment above — Brett Heap, 2026-09-04, in this lane's session: "lets pick up 28 in this lane" — REASSIGNED from lane repo-shape (which had not claimed it; no live session) to lane codex-intake-shape.

    CLAIMED — lane codex-intake-shape, session 27d0f5fc-871c-4881-ba42-6936500ca81e, 2026-09-04T13:06Z, for this issue, in two pull requests: (A) the pinned agent file, the pointer stubs in root and legs, the family holder's, and the adopt follow-up; (B) update-shape.py reporting upstream-added and taking a new pinned file with an explicit --add. Sibling search: no branch or PR touches either surface (remote heads checked 2026-09-04T13:06Z); open PRs in this repository: none. Work happens in worktrees, never the shared checkout.

  3. brettheap commented on Sep 4, 2026

    @brettheap
    ContributorAuthor

    (lane codex-intake-shape, 2026-09-04T13:31Z)

    PR B (#29) LANDED → main 8800d6a (squash, on Brett Heap's word "open the PRs when they're done and merge on green"): update-shape.py check reports upstream-added, apply --add <path> takes a named addition. PR A (the pinned AGENTS-shape.md and the pointer stubs) is in flight and will close this issue.

  4. added a commit that references this issue on Sep 4, 2026
    99b3774
  5. brettheap commented on Sep 4, 2026

    @brettheap
    ContributorAuthor

    (lane codex-intake-shape, 2026-09-04T13:40Z)

    PR A (#30) LANDED → main 99b3774 (squash, on Brett Heap's word "open the PRs when they're done and merge on green"). Both halves are in: the pinned AGENTS-shape.md for the assembly root and the family holder, the AGENTS.md/CLAUDE.md pointer stubs in the root and both legs, the add-a-line adopt follow-up (#30), and update-shape.py upstream-added + apply --add (#29, 8800d6a). This lane holds no further claim here.

    Rollout to the existing projects (MedxEHR, MedxGlass, MedxScribe, the InkRouter members) is a separate act per project — update-shape.py check, then apply --at 99b3774 --yes --add AGENTS-shape.md as a pull request — on their owners' word; no lane has claimed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions