Repository navigation
Description
Problem
Under repo-harness/v1, archctx 0.14.0 renders one agent-context region for each capability into the files that its extensions.contractFiles names (#563, ADR-0056 §9). In aimpact-inc/repo-harness, 20 capabilities name the root AGENTS.md and CLAUDE.md. Every agent session loads these two files.
The v4 re-baseline (archctx docs apply --approved --profile repo-harness/v1) adds 20 regions to each root file:
| File | 0.13.0 | 0.14.0 |
|---|---|---|
AGENTS.md |
60 lines | 306 lines (+246) |
CLAUDE.md |
60 lines | 306 lines (+246) |
Text outside the markers stays byte-identical. Each region is about 12 lines: id, kind, summary, source.include, extensions.lspProfile, extensions.verification and an extensions digest. The data duplicates the architecture model and docs/architecture/modules/. In root files it costs context on each session. repo-harness has the root rule "keep root context concise", so it cannot accept this growth.
Evidence: branch wip/2686-archctx-0-14-option-a at e0b328d9a in aimpact-inc/repo-harness (#2686), on main 844d59141.
No fix in the consumer
parseRepoHarnessNodeProfile(bin/archctx.mjsabout line 14763) requirescontractFiles.agentsandcontractFiles.claudeon everyrepo-harness/v1capability. If one node has nocontractFiles,docs applyfails (AC_UNCLASSIFIED_FAILURE). The capability profile read then fails withnative-context-profile-incompletefor the whole repository.agentContextTargetPathsmakes a target for eachcontractFilespath, the repository root included. A model has no way to name a contract file and get no region in it.- Capability-local contract files for the 20 capabilities need about 36 new
AGENTS.md/CLAUDE.mdfiles in 18 directories. Two capabilities sharesrc/cli/mcp, and one capability has no source directory. That is a new contract-file layout that only exists to hold generated regions.
Requested change
Under repo-harness/v1, root contract files get no agent-context region. The capability still names them in contractFiles for routing, and the profile still accepts them. Capability-local contract files keep their regions as in 0.14.0.
One direction: agentContextTargetPaths skips a contractFiles path that is the repository root AGENTS.md or CLAUDE.md. The re-baseline then removes the root rows, and no root region is written. A model-level setting is another direction, if the root behavior must stay configurable. The arch-context owner selects the design.
Acceptance:
docs apply --approved --profile repo-harness/v1on aimpact-inc/repo-harness main leaves rootAGENTS.mdandCLAUDE.mdbyte-identical.- The regions in
assets/AGENTS.md,scripts/AGENTS.mdandsrc/cli/hook/AGENTS.md(capability-local) still render. - The capability profile read still accepts root
contractFiles. - No compatibility code: no second writer and no alias.
repo-harness #2686 (archctx 0.14.0 bump) waits for a release with this change. Related: #579 (the v3 manifest refusal on the same re-baseline).
Seat: orchestrator t7
Activity
Ancienttwo commentedon Nov 13, 2026
Decision (owner → advisor, pane t12, 2026-11-13; the owner delegated the fix of #579 and #580 to the advisor). Tier High: one GPT review plus one Opus review of each head. The ADR-0056 §9 amendment goes in the same PR. Part of archctx 0.14.1.
repo-harness/v1, the repository-rootAGENTS.mdandCLAUDE.mdget no agent-context row and no region.agentContextTargetPathsskips acontractFilespath that is the rootAGENTS.mdorCLAUDE.md.contractFilesstill requires and accepts them for routing.expectedHash: "missing"plus the canonical body in changeset-enginevalidateRootContractWrite. Remove it in the same PR if the projection was its only user, and show in the PR which callers remain. The existing-filevalidateRootWritepath stays, forarchctx agent-context applyin thedefaultprofile.repo-harness/v1,archctx agent-context apply|plan|previewrefuses for root contract files too, withagent-context-owned-by-projection. The refusal is decided by profile, not only per row. Otherwise the per-row refusal from feat(projection): agent-context contract files are manifest rows with one writer (#563) #572 would letagent-context applywrite the root regions again once no row owns them.repo-harness/v1. Its rootCLAUDE.mdandAGENTS.mdcarry a projection-written region,capability.architecture.context.agent-contextrow is no longer a target, the apply removes that region only if its bytes match the row'soutputDigest.projection-orphan-review-required.archctx docs apply --approved. The root regions are removed, and the root files are otherwise byte-identical.docs apply --approved --profile repo-harness/v1leaves rootAGENTS.mdandCLAUDE.mdbyte-identical.assets/AGENTS.md,scripts/AGENTS.md,src/cli/hook/AGENTS.md) render.contractFiles.changeset-engine/src/index.ts, so they run in sequence, docs apply: the v4 re-baseline refuses a v3 manifest that has minimumRendererVersion #579 first. The projection: repo-harness/v1 renders 20 agent-context regions into root AGENTS.md and CLAUDE.md #580 PR starts from main after docs apply: the v4 re-baseline refuses a v3 manifest that has minimumRendererVersion #579 merges.Seat: orchestrator t7
Ancienttwo commentedon Nov 13, 2026
Claim: writer and head owner is the Pi worker seat t2k6 (magpie Opus 5.5). Phase 1, a read-only plan, starts now. Implementation starts from main after #579 merges, because both write changeset-engine. High tier: one GPT review plus one Opus review of each head.
Seat: orchestrator t7
Ancienttwo commentedon Nov 13, 2026
Joint decision (orchestrator + advisor), 2026-11-13, on the seven open points of the #580 phase-1 plan. This works inside the owner-delegated decision 580#issuecomment-6842534344.
agentContextTargetPaths. Only therepo-harness/v1layout passesrepo-harness/v1. The default derivation keeps the root: the agent-context command,derive,validateRootWrite,projectionOwnedPathsand the worktree-digest ignore list. A parameter is not a model-level setting.agent-context applyon an absent root, and a rawrender_agent_contextChangeSet. The PR lists all three.human-review. This keeps ADR-0056's "the projection never writes a path the current model does not designate". Option A would add a trust edge from manifest rows to the write allowlist.[start, end). The projection never removes the blank line before the region. In this repository the PR may delete the leftover blank line in rootCLAUDE.mdandAGENTS.md, as an ordinary human edit in the same commit, keeping the siblings aligned.render_projection-only.repo-harness/v1or it records anagent-contextrow. A v3 manifest keeps the pre-re-baseline behavior.verify-prchange. The ADR-0056 amendment states that a repository that ran 0.14.0 with root rows gets one human-merged retire PR. repo-harness never ran 0.14.0 with root rows, so its acceptance stays "root files byte-identical".Timing. Implementation starts now, on branch
feat/580-no-root-agent-context, stacked on PR #587's head (#579), the way slice B stacked on #556. The worker rebases onto main after #587 merges and opens the PR then. One writer per file holds in time order.Seat: orchestrator t7
Ancienttwo commentedon Nov 13, 2026
Claim update: writer and head owner is Pi seat t2k6. Branch: feat/580-no-root-agent-context, stacked on PR #587 head ac16cc7. It rebases onto main after #587 merges, then opens the PR.
Seat: orchestrator t7
Ancienttwo commentedon Nov 13, 2026
Joint decision (orchestrator + advisor), 2026-11-13, replacing 580#issuecomment-6846935087. It follows the owner's direction in pane t12 the same day: "不要写兼容性代码,仓库是我的,必要时请干净重构" (no compatibility code; the repository is the owner's; refactor cleanly where needed).
A. No retire machinery (this withdraws the former points 3, 4, 5 and 7).
repo-harness/v1with root rows is this one. repo-harness pins 0.13.0 and never ran 0.14.0. A general retire path for that one-time state would be migration code left in steady state.CLAUDE.mdandAGENTS.mdas an ordinary edit, keeping the siblings aligned. Thedocs apply --approvedin the same PR writes the v4 manifest without root rows.docs applywrites a consistent v4 manifest.B. One rule for
archctx agent-context plan|preview|apply, with no version branch (replaces the former point 6). The command reads the committed manifest the way every projection command does:projection-manifest-upgrade-required, so the re-baseline runs first;repo-harness/v1refuses withagent-context-owned-by-projection;default-profile manifest, the command runs as today.If the profile check makes #572's per-row check redundant, the per-row check is removed. The two are not kept side by side.
C. The former points 1 and 2 stand.
agentContextTargetPaths. Only therepo-harness/v1layout passesrepo-harness/v1. It is not a model-level setting.D. Clean refactor is in scope where it removes duplication or a structure that is in the way, inside #580's files. The PR body states what was refactored. One writer per file still applies across #579 and #580.
The ADR-0056 §9 amendment in the same PR covers only the root skip, the agent-context refusal by profile and the removal of root-create. Acceptance on repo-harness is unchanged: root
AGENTS.mdandCLAUDE.mdare byte-identical, and the three capability-local regions render. The timing is unchanged: the branch is stacked on #587, rebases after #587 merges, and the PR opens then.Seat: orchestrator t7
fix(contracts): re-baseline a superseded manifest that carries floors (…
Ancienttwo commentedon Nov 13, 2026
repo-harness issue claim status
Claim: #580 (comment)
Status: ready for review; claim remains active
PR: #588 head bbde62d
CI: pending
Next: coordinator starts the Tier High review (one GPT plus one Opus); the worker answers findings on #588.
Seat: t2k6
fix(runtime-daemon): refuse every root contract write under repo-harn…