Repository navigation
Description
Goal
Deliver the contract-propagation design agreed with the operator (2026-08-25, superseding a physical _latest shadow file — rejected for authority confusion, side-effect writes, and messenger staleness): the current contract is always available from the installed binary, so make _latest virtual. init stamps each scaffolded contract with a provenance header naming the release and upstream path; codecrew status reports when a local roles/ contract differs from the embedded one, pointing at codecrew roles diff; new verbs roles diff and roles show --latest give the comparison and full upstream text on demand; the provenance stamp lets an agent fetch the base version from the upstream repo at its tag for a three-way judgment. The AGENTS.md scaffold gains the standing reconciliation instruction: when status reports contract drift, the coordination layer compares, decides what to adopt, and routes the reconciliation through a normal task and PR with the decision recorded. Contracts stay project-owned forks — nothing is ever overwritten. Tests ride along per #46.
Requirements
None directly.
Plan
- Provenance stamp:
scaffold()prefixes each writtenroles/*.mdwith<!-- scaffolded by codecrew <version>; upstream: radiusred/gh-codecrew roles/<name> -->— the version is the installed release (devfor source builds), andstripStampremoves exactly that line (plus its blank) so comparisons see the contract alone. - Drift detection in
status: when run in the hub with a localroles/dir, each contract is compared (stamp-stripped) against the binary's embedded copy; differing files are reported with a pointer atcodecrew roles diff <role>. Purely local — no network beyond what status already does. rolesverbs:codecrew roles diff <role>prints a unified line diff (small LCS, no external tools) of local vs embedded;codecrew roles show <role> --latestprints the embedded contract whole, for the three-way judgment the provenance stamp enables (base fetchable from the upstream repo at the stamped tag).- The standing reconciliation instruction joins the AGENTS.md scaffold: on a drift report, the coordination layer compares, decides what to adopt — contracts are the project's own fork; local conventions are legitimate — and routes the reconciliation through a normal task and PR with the decision recorded; never overwrite blindly.
- Surface: cli dispatch + usage, SPEC §6 verb-table row, and the init row notes the stamp. Tests per feat: request review from the reviewer-role holder #46: stamp round-trip (fresh scaffold shows zero drift), local-edit drift detection, diff output, show --latest fidelity.
Ask-the-human points
None — design agreed with the operator on 2026-08-25 (virtual _latest; physical shadow file rejected).
Activity
radiusred-cody commentedon Aug 25, 2026
Started by @radiusred-cody[bot].
feat: detect contract drift and serve the latest virtually (#85)
feat: detect contract drift and serve the latest virtually (#85)