Skip to content

Backlog capture: the hub's .codecrew/AGENTS.md has drifted from the v2.1.1 scaffold and roles sync cannot bring it up to date #414

Open

Description

@davison

Found 2026-10-11 running gh codecrew roles sync in the hub after v2.1.1 was installed.

What happened

The four contracts in .codecrew/roles/ all match the embedded v2.1.1 text, but roles sync refuses AGENTS_FORKED on .codecrew/AGENTS.md: the hub's own agents file differs from the v2.1.1 scaffold and from every release's text, so the CLI correctly treats it as the project's fork (SPEC §7) and will not write it. gh codecrew roles diff .codecrew/AGENTS.md shows the whole file as a rewrite, because the two texts share no lines.

The fork is deliberate — #257 moved the hub's entry point here and #372 last edited it — but it has not been reconciled with the scaffold since, and the scaffold has grown.

What the scaffold carries that the hub's file does not

  • Version check in a spoke. How a spoke reads the hub's .codecrew/config.yml through the API, and the fall-back of minting the seat identity and retrying when that read is refused.
  • Contract drift. What gh codecrew status reports, when roles sync is the right tool (housekeeping PR, no task) and when a fork needs a task with a Decision recorded, and the rule that a project's own instructions belong in the root AGENTS.md.
  • Dispatch authorization. The operator's primary session may dispatch a clean-context sub-agent as a routed App; a session dispatched as a role never dispatches another role and never chooses its own judge.
  • gh codecrew status / gh codecrew help / the refused[CODE] shape, and the model-review rule for pure solo.

What the hub's file carries that the scaffold does not

  • The hub-specific floor: "this repo is the hub, so that is the floor" in the version check.
  • Numbered steps with relative links to the four contracts, and the .local.md composition order (hub then spoke).
  • The identity resolution order (orchestrator-injected env vars, then ~/.config/codecrew/, operator gh auth only for an unrouted role).
  • The protocol summary (plan before first commit, (#123) references, structured Decision/Deviation comments, never verify your own work, stop on cc:needs-decision).
  • The commitlint line.

Questions for whoever picks it up

  1. Should the hub's .codecrew/AGENTS.md stay a fork at all? The scaffold's own text says the project's instructions belong in the root AGENTS.md, which today is a one-paragraph pointer into .codecrew/AGENTS.md. The clean shape may be the inverse: .codecrew/AGENTS.md becomes the release scaffold so roles sync governs it, and the hub-specific material (hub floor, identity resolution order, commitlint) moves to the root AGENTS.md.
  2. If it stays a fork, which of the three scaffold paragraphs above does the hub want, brought in by hand in a task with a Decision, as the CLI's refusal message directs.
  3. Whichever shape is chosen, the dispatch-authorization paragraph is the one the hub's own sessions act on daily and is currently only in the scaffold, not in the file they read.

Scope

Hub-local reconciliation of one file; no protocol text changes. It can be done at any time under the 2.1 bedding-in rule, but the question of what .codecrew/AGENTS.md is for in a hub (fork versus release text) is one for the 2.2 scoping conversation alongside #378.

Activity

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