repo-harness 0.35.2 → 0.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -1
- package/CLAUDE.md +1 -1
- package/README.md +1 -1
- package/agents/fleet/deep-reasoner.md +2 -2
- package/agents/fleet/explorer.md +4 -4
- package/assets/reference-configs/agentic-development-flow.md +9 -6
- package/assets/reference-configs/external-tooling.md +43 -28
- package/assets/reference-configs/global-working-rules.md +2 -1
- package/assets/reference-configs/herdr-notify.md +39 -33
- package/assets/reference-configs/hook-operations.md +6 -4
- package/assets/released-managed-values.v1.json +2 -1
- package/assets/skill-commands/repo-harness-check/references/architecture-evidence.md +34 -16
- package/assets/skill-version.json +2 -2
- package/assets/skills/repo-harness-advisor/SKILL.md +19 -0
- package/assets/skills/repo-harness-issue-flow/SKILL.md +15 -17
- package/assets/skills/repo-harness-issue-flow/references/acceptor.md +80 -25
- package/assets/skills/repo-harness-issue-flow/references/advisor.md +106 -17
- package/assets/skills/repo-harness-issue-flow/references/board.md +5 -4
- package/assets/skills/repo-harness-issue-flow/references/orchestrator.md +123 -73
- package/assets/skills/repo-harness-issue-flow/references/templates.md +23 -7
- package/assets/skills/repo-harness-issue-flow/references/worker.md +30 -50
- package/dist/hook-entry.js +7417 -5271
- package/dist/oar-review-host.js +298 -51
- package/package.json +4 -4
- package/scripts/check-agent-tooling.sh +1 -1
- package/scripts/check-ci.sh +1 -1
- package/scripts/check-tarball-install-smoke.sh +28 -0
- package/scripts/contract-worktree-runtime.ts +3 -0
- package/scripts/contract-worktree.sh +21 -56
- package/scripts/install-agent-fleet.sh +6 -5
- package/src/cli/candidate-runtime-reconciliation.ts +4 -4
- package/src/cli/commands/arch-verify.ts +5 -22
- package/src/cli/commands/arch.ts +1 -1
- package/src/cli/commands/architecture-debt-report.ts +14 -222
- package/src/cli/commands/architecture-debt.ts +2 -1
- package/src/cli/commands/architecture-projection-actions.ts +65 -4
- package/src/cli/commands/architecture-projection.ts +5 -0
- package/src/cli/commands/board.ts +77 -7
- package/src/cli/commands/config.ts +3 -3
- package/src/cli/commands/doctor.ts +41 -2
- package/src/cli/commands/global-runtime.ts +44 -5
- package/src/cli/commands/install.ts +47 -22
- package/src/cli/commands/refactor-actions.ts +89 -5
- package/src/cli/commands/refactor.ts +169 -20
- package/src/cli/commands/review.ts +9 -3
- package/src/cli/commands/rules.ts +24 -4
- package/src/cli/commands/seats.ts +336 -82
- package/src/cli/commands/upgrade.ts +3 -2
- package/src/cli/commands/validators.ts +13 -8
- package/src/cli/hook/handler-registry.ts +7 -4
- package/src/cli/hook/hook-protocol.ts +2 -2
- package/src/cli/hook/host-adapter.ts +145 -0
- package/src/cli/hook/mutation-guard.ts +11 -2
- package/src/cli/hook/route-registry.ts +2 -2
- package/src/cli/hook/runtime.ts +45 -23
- package/src/cli/hook/safety-hook.ts +2 -1
- package/src/cli/hook/stop-handler.ts +73 -17
- package/src/cli/hook-entry.ts +23 -7
- package/src/cli/index.ts +59 -19
- package/src/cli/installer/global-context.ts +67 -21
- package/src/cli/installer/install-profile.ts +156 -28
- package/src/cli/installer/install-state-migration.ts +27 -11
- package/src/cli/installer/managed-entries.ts +36 -4
- package/src/cli/installer/replaced-agents-migration.ts +6 -5
- package/src/cli/installer/targets/antigravity.ts +564 -0
- package/src/cli/installer/targets/registry.ts +9 -16
- package/src/cli/installer/types.ts +27 -9
- package/src/cli/installer/uninstall.ts +88 -25
- package/src/core/architecture/arch-verify.ts +1 -1
- package/src/core/architecture/projection.ts +74 -14
- package/src/core/board/attention.ts +54 -4
- package/src/core/board/board.ts +6 -11
- package/src/core/board/cluster.ts +682 -0
- package/src/core/board/dispatch.ts +3 -2
- package/src/core/board/model-catalog.ts +263 -0
- package/src/core/board/planner-consult.ts +79 -0
- package/src/core/board/protocol-comments.ts +25 -6
- package/src/core/board/quota.ts +61 -6
- package/src/core/board/recommended-models.ts +64 -27
- package/src/core/board/review-rules.ts +89 -26
- package/src/core/board/review.ts +74 -40
- package/src/core/board/seat-launch.ts +200 -29
- package/src/core/board/seat-pool.ts +243 -0
- package/src/core/board/seat-reset.ts +23 -8
- package/src/core/board/seat-routing.ts +101 -61
- package/src/core/board/seats-settings.ts +315 -67
- package/src/core/board/triage-apply.ts +405 -0
- package/src/core/ci/rule-proposals.ts +221 -0
- package/src/core/host-config/types.ts +11 -4
- package/src/core/operator/architecture-map-model.ts +11 -4
- package/src/core/operator/architecture-map.ts +12 -1
- package/src/core/operator/architecture.ts +92 -1
- package/src/core/refactor/provider-contract.ts +117 -19
- package/src/core/review/module-review-prompt.ts +16 -0
- package/src/core/review/review-publish.ts +5 -2
- package/src/effects/architecture/archctx-provider.ts +125 -8
- package/src/effects/architecture/architecture-read.ts +50 -64
- package/src/effects/architecture/model-reader.ts +35 -6
- package/src/effects/board/cluster.ts +353 -0
- package/src/effects/board/collect.ts +0 -16
- package/src/effects/board/dispatch.ts +22 -8
- package/src/effects/board/pi-fleet-roles.ts +24 -18
- package/src/effects/board/planner-consult.ts +195 -0
- package/src/effects/board/quota.ts +33 -5
- package/src/effects/board/review.ts +13 -6
- package/src/effects/board/seat-reset-store.ts +71 -21
- package/src/effects/board/seat-reset.ts +81 -28
- package/src/effects/board/seats-configuration.ts +287 -30
- package/src/effects/board/triage-apply.ts +283 -0
- package/src/effects/configuration/agents-configuration.ts +36 -0
- package/src/effects/host-config/gate.ts +664 -95
- package/src/effects/host-config/inspect.ts +17 -7
- package/src/effects/host-config/path-records.ts +25 -44
- package/src/effects/host-config/repository.ts +16 -23
- package/src/effects/host-config/store.ts +72 -19
- package/src/effects/host-config/tools.ts +2 -2
- package/src/effects/host-config/whole-path.ts +70 -3
- package/src/effects/host-skill-roots.ts +5 -0
- package/src/effects/operator/agents-settings-route.ts +4 -0
- package/src/effects/operator/architecture-map-worker.ts +82 -27
- package/src/effects/operator/architecture.ts +93 -1
- package/src/effects/operator/seats-settings-route.ts +17 -4
- package/src/effects/operator/server.ts +13 -2
- package/src/effects/refactor/archctx-provider.ts +174 -20
- package/src/effects/refactor/recommendations.ts +135 -48
- package/src/effects/review/acceptance-receipt-store.ts +52 -98
- package/src/effects/review/acceptance-receipt.ts +29 -21
- package/src/effects/review/review-collect.ts +7 -3
- package/src/effects/review/review-publish.ts +5 -3
- package/src/effects/rules/proposals.ts +157 -0
- package/src/effects/state/coordination-worktree-topology.ts +98 -8
- package/src/effects/terminal/task-role-profiles.ts +2 -2
- package/src/pi/extension.ts +58 -4
- package/agents/fleet/deep-worker.md +0 -15
- package/agents/fleet/fast-worker.md +0 -15
- package/agents/fleet/gatekeeper.md +0 -24
- package/agents/fleet/root-cause-prover.md +0 -23
package/AGENTS.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
- Read `tasks/lessons.md` at session start and apply its active lessons. Current repo state and evidence override a lesson.
|
|
14
14
|
- Ordinary tasks use the PR description: goal, scope, changes, verification, risk and rollback. No plan, contract, review, notes or approval artifact is mandatory. Record a one-time decision in the issue.
|
|
15
15
|
- GitHub operations (PRs, reviews, merges, labels, releases, comments) go only through the gh/git CLI or the GitHub API. Never use simulated browser clicks on github.com: the account can be banned.
|
|
16
|
-
- Preserve `agents/fleet
|
|
16
|
+
- Preserve the retained read-only `agents/fleet/` scaffolding (`explorer`, `deep-reasoner`), release checklists and downstream `assets/templates`. `.ai/harness/workflow-contract.json` is the opt-in marker. `assets/workflow-contract.v1.json` is the contract. `_ops/` is ignored private operations state: never commit it. It has no per-directory allowlist and no Bash write denial; I2 covers any existing file in it. `_ref/` is an ignored reference cache; cite influential revisions. Follow deploy SQL policy, otherwise use ascending 4-digit files under `deploy/sql/`.
|
|
17
17
|
|
|
18
18
|
## Code Optimization Principles
|
|
19
19
|
- Identify observable conditions, controllable inputs, the invariant and the actual pressure point before changing structure.
|
package/CLAUDE.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
- Read `tasks/lessons.md` at session start and apply its active lessons. Current repo state and evidence override a lesson.
|
|
14
14
|
- Ordinary tasks use the PR description: goal, scope, changes, verification, risk and rollback. No plan, contract, review, notes or approval artifact is mandatory. Record a one-time decision in the issue.
|
|
15
15
|
- GitHub operations (PRs, reviews, merges, labels, releases, comments) go only through the gh/git CLI or the GitHub API. Never use simulated browser clicks on github.com: the account can be banned.
|
|
16
|
-
- Preserve `agents/fleet
|
|
16
|
+
- Preserve the retained read-only `agents/fleet/` scaffolding (`explorer`, `deep-reasoner`), release checklists and downstream `assets/templates`. `.ai/harness/workflow-contract.json` is the opt-in marker. `assets/workflow-contract.v1.json` is the contract. `_ops/` is ignored private operations state: never commit it. It has no per-directory allowlist and no Bash write denial; I2 covers any existing file in it. `_ref/` is an ignored reference cache; cite influential revisions. Follow deploy SQL policy, otherwise use ascending 4-digit files under `deploy/sql/`.
|
|
17
17
|
|
|
18
18
|
## Code Optimization Principles
|
|
19
19
|
- Identify observable conditions, controllable inputs, the invariant and the actual pressure point before changing structure.
|
package/README.md
CHANGED
|
@@ -331,6 +331,6 @@ None of these are bundled dependencies; see
|
|
|
331
331
|
|
|
332
332
|
## Release & license
|
|
333
333
|
|
|
334
|
-
- npm: `repo-harness@0.
|
|
334
|
+
- npm: `repo-harness@0.36.1` · workflow stamp `repo-harness@0.36.1+template@0.36.1`
|
|
335
335
|
- History: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
336
336
|
- License: MIT — see [`LICENSE`](LICENSE)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: deep-reasoner
|
|
3
|
-
description: Architecture research and judgment executor on Opus at xhigh effort. Use for architecture proposals, complex multi-step reasoning, and high-risk analysis — design trade-offs, risky migrations, security-sensitive choices; returns `RECOMMENDATION: <one-line> — confidence: HIGH/MEDIUM/LOW` with the reasoning, and the orchestrator confirms the final framework. Not for routine execution;
|
|
3
|
+
description: Architecture research and judgment executor on Opus at xhigh effort. Use for architecture proposals, complex multi-step reasoning, and high-risk analysis — design trade-offs, risky migrations, security-sensitive choices; returns `RECOMMENDATION: <one-line> — confidence: HIGH/MEDIUM/LOW` with the reasoning, and the orchestrator confirms the final framework. Not for routine execution; a worker seat does that.
|
|
4
4
|
model: opus
|
|
5
5
|
effort: xhigh
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
You are the executor for architecture research and hard judgment. An orchestrator delegates investigation, design proposals, trade-off analysis, and high-risk calls — design trade-offs, risky migrations, security-sensitive choices — and you research and recommend. You never present your proposal as the decision; the orchestrator confirms the final framework.
|
|
9
9
|
|
|
10
|
-
- **Recommendation first.** Your final message opens with exactly: `RECOMMENDATION: <one sentence> — confidence: HIGH|MEDIUM|LOW`. The one-liner is your single committed answer; confidence tells the orchestrator how far to trust it before acting — `LOW` is a cue to run a second, independent track. If the task is actually routine execution, make the one-liner `hand back to orchestrator —
|
|
10
|
+
- **Recommendation first.** Your final message opens with exactly: `RECOMMENDATION: <one sentence> — confidence: HIGH|MEDIUM|LOW`. The one-liner is your single committed answer; confidence tells the orchestrator how far to trust it before acting — `LOW` is a cue to run a second, independent track. If the task is actually routine execution, make the one-liner `hand back to orchestrator — routine execution goes to a worker seat` at confidence HIGH.
|
|
11
11
|
- **Reason to one answer.** Think the problem through before answering. At genuinely contested points, weigh 2-3 viable options with their trade-offs, then commit to one — do not hedge across all of them.
|
|
12
12
|
- **Ground every claim in evidence.** Read the actual code and constraints and verify instead of assuming. State a load-bearing claim plainly only if you checked it this turn (its command output or the file is in your context); otherwise mark it `[inferred]` (reasoned but unchecked) or `[unverified]` (needs a check you could not run).
|
|
13
13
|
- **Recommend only — no side effects.** You investigate and advise; you do not decide, ship, or edit production code, and you do not commit, push, open PRs, or apply migrations. Read, grep, web search/fetch, and docs MCP lookups are in scope; any mutation is the orchestrator's call.
|
package/agents/fleet/explorer.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: explorer
|
|
3
|
-
description: Read-only codebase explorer on
|
|
3
|
+
description: Read-only codebase explorer on Haiku at high effort. Use to locate files, symbols, call paths, tests, uncertainties, and candidate affected surfaces before implementation or judgment. Returns `FINDINGS: COMPLETE/PARTIAL/BLOCKED` with file:line evidence; never edits, decides architecture, or judges acceptance — return the map to the caller; execution runs in a worker seat and acceptance in a review seat.
|
|
4
4
|
tools: ["Read", "Grep", "Glob", "Bash"]
|
|
5
|
-
model:
|
|
6
|
-
effort:
|
|
5
|
+
model: haiku
|
|
6
|
+
effort: high
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
You are the read-only explorer. An orchestrator hands you a question or task surface; you map the concrete repository evidence it needs and return. You do not edit, decide architecture, or judge acceptance.
|
|
@@ -11,7 +11,7 @@ You are the read-only explorer. An orchestrator hands you a question or task sur
|
|
|
11
11
|
- **Findings first.** Your final message opens with exactly one of `FINDINGS: COMPLETE`, `FINDINGS: PARTIAL`, `FINDINGS: BLOCKED` — COMPLETE = every requested surface is mapped with cited evidence; PARTIAL = you mapped what you could but scope or access stopped you short; BLOCKED = the question is unanswerable without a decision only the orchestrator can make.
|
|
12
12
|
- **Scope through the repo's own context before searching blind.** If the repo publishes a capability, ownership, or context map (e.g. a `CLAUDE.md`/`AGENTS.md` local to the area, or an explicit context index), check it first for the entrypoint and boundary that cover the question — it keeps you from mapping outside the relevant surface.
|
|
13
13
|
- **Prefer structural code-intelligence tools over grep loops.** Reach for the CodeGraph MCP tool (or an equivalent code-intelligence/graph index) when one is available — it returns verbatim source plus call and dependency paths in far fewer round-trips than a manual Grep/Read sweep. Fall back to Grep/Glob/Read only when no such index exists or the question falls outside its coverage.
|
|
14
|
-
- **Map, don't judge.** Identify relevant files and symbols, call and dependency paths, existing tests, and candidate affected surfaces. Flag contradictions or gaps as uncertainties instead of resolving them — architecture calls go to deep-reasoner, execution to
|
|
14
|
+
- **Map, don't judge.** Identify relevant files and symbols, call and dependency paths, existing tests, and candidate affected surfaces. Flag contradictions or gaps as uncertainties instead of resolving them — architecture calls go to deep-reasoner, execution to the caller's worker seat, acceptance to a review seat.
|
|
15
15
|
- **Cite or mark unknown.** Every claim needs an absolute `file:line` reference or a command's actual output from this turn; otherwise label it `[inferred]` (reasoned but unchecked) or `[unverified]` (needs a check you could not run). Never state a load-bearing fact you have not checked this turn.
|
|
16
16
|
- **Stay read-only and in scope.** No edits, no commits, no architecture recommendation, no acceptance verdict, no widening the question beyond what was asked. If the question turns out to need a decision, return `FINDINGS: BLOCKED` with what you found instead of deciding yourself.
|
|
17
17
|
- **Sign-off.** Lead with the `FINDINGS:` line, then the evidence map: files/symbols with `file:line`, call/dependency paths when relevant, existing test coverage, uncertainties, and candidate affected surfaces. No process narration.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
3. Make small, bounded commits. Ordinary tasks live in the PR description: goal, changes, verification, risk and rollback.
|
|
11
11
|
4. Freeze the candidate and verify once: typecheck plus affected tests. Reviewers and closeout consume the same evidence. Reopen acceptance only for blocking defects or changed inputs that affect the result. Record non-blocking improvements separately; do not change the frozen candidate for them.
|
|
12
12
|
5. A model may squash-merge into main only when the current task explicitly authorizes main publication, the branch contains the current main tip, the required checks pass on that exact head, and GitHub has no outstanding change requests or unresolved review threads that a person started. A thread that a review bot (a GitHub App account such as Codex or Copilot) started is advisory and does not block the merge. An explicit no-merge instruction always wins. The next merge does not wait for the main push CI of the previous merge. Pending main push CI is not an extra acceptance gate. Read its status before the next merge; when it fails, the next merge is the revert or the fix. Each PR still meets its own exact-head and current-main requirements. Record the GitHub merge SHA and parent SHA. Record `git revert --no-edit <squash-commit>`. Do not create rollback tags.
|
|
13
|
-
6. Run the full suite daily, automatically open a repair task on failure, and produce the daily merge/check/rollback report.
|
|
13
|
+
6. Run the full suite daily, automatically open a repair task on failure, and produce the daily merge/check/rollback report. This nightly run does not start the [Lessons Retro](#lessons-retro); that retro has its own trigger events.
|
|
14
14
|
7. Use the [Report SOP](#report-sop) for formal progress, phase and final reports to the user, including the daily user summary. Raw automated CI reports are evidence inputs; they do not replace that summary and do not require this format.
|
|
15
15
|
|
|
16
16
|
## CI cost
|
|
@@ -52,7 +52,10 @@ Manual probe: to see what named test files do on one runner for a branch head, d
|
|
|
52
52
|
`tasks/lessons.md` is the one lessons ledger. It has the role of a root `LESSONS.md`. Do not add a second lessons file. The retro and maintenance triage read the ledger. Sessions read its active lessons at start. Current code and evidence take precedence. Keep the path; do not move lessons to docs/.
|
|
53
53
|
|
|
54
54
|
- The ledger keeps one watermark line before the first entry: `reviewed-through: <full commit SHA>`. If the line is missing, the first retro reviews the last 24 hours and adds it.
|
|
55
|
-
-
|
|
55
|
+
- Two events start a retro: the close-out of a batch parent (`repo-harness-issue-flow` `references/orchestrator.md` §10) and a release that shipped. No timer and no workflow starts one.
|
|
56
|
+
- The orchestrator starts the retro and dispatches a worker for the ledger PR. The advisor checks the watermark in its scheduled review (`repo-harness-issue-flow` `references/advisor.md` §2) and sends the orchestrator a notice when the fallback condition holds.
|
|
57
|
+
- Fallback: a retro is due when the watermark commit is older than 7 days or more than 100 first-parent commits behind `origin/main`. Either threshold alone makes the retro due.
|
|
58
|
+
- Review the default-branch history after the watermark: `git log --first-parent <watermark>..origin/main`. Skip commits that change only `tasks/lessons.md`.
|
|
56
59
|
- Look for three signals: a fix that repairs recent work, a change that should not have merged, and verification that was too thin for the changed behavior. A revert or a follow-up hotfix is evidence.
|
|
57
60
|
- Add at most one entry for each theme on one day. Keep the fields that `rh run maintenance-triage` reads. `- Date:` starts each entry:
|
|
58
61
|
|
|
@@ -86,6 +89,7 @@ Manual probe: to see what named test files do on one runner for a branch head, d
|
|
|
86
89
|
- At `Seen: 3×` with `Enforced by: judgment`, promote the prevention rule into root `AGENTS.md` and root `CLAUDE.md` in the same PR. Add `- Promoted: <PR>` to that entry. A consolidated entry lists every `Promoted` reference of the entries it replaces, separated by `, `. A rule with a structural enforcer does not go into the root files.
|
|
87
90
|
- When the mistake can no longer occur, delete its text rule from the agent instruction files. Keep its ledger entries.
|
|
88
91
|
- Each retro advances the watermark to the last reviewed commit, also when it finds no lesson. If an earlier retro PR is still open, update that PR. Do not open a second retro PR.
|
|
92
|
+
- Reset: with the owner GO for the PR head, a PR may set `reviewed-through` to a named commit without a review of the skipped range. That PR body states the old watermark, the new watermark, the number of skipped first-parent commits and the reason. The GO rule below is unchanged.
|
|
89
93
|
- Every change to `tasks/lessons.md` goes through a PR and merges only after GO. GO is an explicit go-ahead from the repository owner (Aimpact for repo-harness) for one reviewed head SHA. Task-level publication authorization does not replace it. Merge with `gh pr merge <pr> --squash --match-head-commit <reviewed-sha>`. Lessons are not task logs. Ordinary tasks record a one-time decision in the issue or PR. A correction in a task can add an entry; that entry follows the same PR and GO rule.
|
|
90
94
|
|
|
91
95
|
## Internal and external PRs
|
|
@@ -117,10 +121,9 @@ The orchestrator seat is the long-lived coordinator and integrator seat of
|
|
|
117
121
|
`repo-harness-issue-flow`. Start it with the argv that
|
|
118
122
|
`rh seats argv orchestrator` prints. It dispatches work and follows
|
|
119
123
|
PRs and CI. It edits no product code. It may call the read-only roles
|
|
120
|
-
`explorer` and `deep-reasoner` as sub-agents.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
worktree isolation and one writer per file.
|
|
124
|
+
`explorer` and `deep-reasoner` as sub-agents. Writes, the gatekeeper review
|
|
125
|
+
and the Codex cross-review never run as its sub-agents: they run in Herdr
|
|
126
|
+
seats, for worktree isolation and one writer per file.
|
|
124
127
|
|
|
125
128
|
The bot selects scope, worker and verification by risk. Use independent gatekeeper/cross-model review for large changes, I1/I2 paths or model uncertainty; do not rerun a passing check or require multiple re-gates.
|
|
126
129
|
|
|
@@ -7,7 +7,7 @@ skill routing lives in `docs/reference-configs/agentic-development-flow.md`.
|
|
|
7
7
|
- `hai-stack` supplies `geju` for live, pre-contract exploration; only its frozen output enters a contract
|
|
8
8
|
- Codex automation requires `health`, `check`, and `mermaid` from `~/.codex/skills`
|
|
9
9
|
- `CodeGraph` is required agent readiness for code navigation and impact tracing
|
|
10
|
-
- repo-harness's packaged `agent_fleet` supplies the delegation loop's global agent definitions (`explorer`, `deep-reasoner`, `
|
|
10
|
+
- repo-harness's packaged `agent_fleet` supplies the delegation loop's global agent definitions (`explorer`, `deep-reasoner`, `harness-evaluator`) for both hosts
|
|
11
11
|
|
|
12
12
|
Waza is Codex-first in this contract. `~/.codex/skills` is the Codex runtime
|
|
13
13
|
source, while `~/.agents/skills` is only the skills CLI staging/cache path used
|
|
@@ -581,6 +581,30 @@ When a project builds on the Claude API, an agent can read
|
|
|
581
581
|
`anthropics/claude-quickstarts` as reference code. Cite the upstream commit
|
|
582
582
|
that the agent followed.
|
|
583
583
|
|
|
584
|
+
## magpie for AI subscriptions and API keys
|
|
585
|
+
|
|
586
|
+
[magpie](https://github.com/yetone/magpie) is a desktop app and a local gateway
|
|
587
|
+
for AI subscriptions and API keys. If you use more than one subscription or
|
|
588
|
+
key, you can manage them in magpie and use its routes from Pi. Download magpie
|
|
589
|
+
from [usemagpie.ai](https://usemagpie.ai). Repo-harness does not install or
|
|
590
|
+
update it.
|
|
591
|
+
|
|
592
|
+
| The user has | Recommended route in rh | Not recommended |
|
|
593
|
+
| --- | --- | --- |
|
|
594
|
+
| Claude subscription | The Claude CLI only, in a Claude seat | A Claude subscription through magpie |
|
|
595
|
+
| Claude models inside another harness (Pi) | The magpie `agy-cli/claude-*` models on the Google Ultra quota | Never use the Claude subscription |
|
|
596
|
+
| Claude API key | The magpie Anthropic preset from Pi | — |
|
|
597
|
+
| Antigravity (agy) | The magpie `agy-cli/` models from Pi. Your own agy CLI makes the calls. | The direct Google sign-in route |
|
|
598
|
+
| ChatGPT plan, DeepSeek, GLM, or other providers | magpie routes from Pi (`magpie/codex/`, `magpie/group/`, `magpie/zcode/`) or the vendor CLI | — |
|
|
599
|
+
|
|
600
|
+
The magpie README lists Antigravity “through your own agy CLI.” Its reference
|
|
601
|
+
says the direct Google sign-in route uses Google’s Code Assist API and warns,
|
|
602
|
+
“Google may suspend an Antigravity account it sees used outside Antigravity,
|
|
603
|
+
so magpie asks before adding one; use an account you can afford to lose.”
|
|
604
|
+
The same reference says magpie “drives the genuine local `claude` binary for
|
|
605
|
+
every Claude subscription generation.” Check your provider’s terms for the
|
|
606
|
+
route you select. [magpie reference](https://github.com/yetone/magpie/blob/main/docs/reference.md)
|
|
607
|
+
|
|
584
608
|
## External Verification Evidence
|
|
585
609
|
|
|
586
610
|
Runtime-heavy projects often prove work outside normal source files and unit
|
|
@@ -723,7 +747,7 @@ diff -qr ~/.agents/skills/geju ~/.codex/skills/geju
|
|
|
723
747
|
### CodeGraph
|
|
724
748
|
|
|
725
749
|
```bash
|
|
726
|
-
bun add -g @colbymchenry/codegraph@1.6.
|
|
750
|
+
bun add -g @colbymchenry/codegraph@1.6.4 && codegraph sync . && codegraph status .
|
|
727
751
|
```
|
|
728
752
|
|
|
729
753
|
## Agent Fleet
|
|
@@ -732,8 +756,15 @@ bun add -g @colbymchenry/codegraph@1.6.2 && codegraph sync . && codegraph status
|
|
|
732
756
|
`.ai/harness/policy.json` under `external_tooling.agent_fleet` and detected by
|
|
733
757
|
`check-agent-tooling.sh`. The single authored source is
|
|
734
758
|
`package:agents/fleet`; it ships inside the npm package and never requires a
|
|
735
|
-
network fetch. The managed list is `explorer`, `deep-reasoner
|
|
736
|
-
`
|
|
759
|
+
network fetch. The managed list is `explorer`, `deep-reasoner` and
|
|
760
|
+
`harness-evaluator`.
|
|
761
|
+
|
|
762
|
+
In-process sub-agent work serves cost control and read-only concurrency only,
|
|
763
|
+
such as an `explorer` fan-out. Each harness maps it to its own lightweight
|
|
764
|
+
family model: `claude` uses `haiku`/`sonnet`, `codex` uses
|
|
765
|
+
`gpt-6-luna`/`gpt-6.1-terra`, `agy`/Gemini uses
|
|
766
|
+
`gemini-4-carbon`/`gemini-4-neon`, and `pi` uses its configured setting. Code
|
|
767
|
+
writes, cross-family planning and formal acceptance reviews run in Herdr seats.
|
|
737
768
|
|
|
738
769
|
### Two targets, one source
|
|
739
770
|
|
|
@@ -758,25 +789,17 @@ mapping.
|
|
|
758
789
|
| `sonnet`, `haiku` | `gpt-6-luna` | `low`, `medium`, `high`, `xhigh`, `max` | same string, unchanged |
|
|
759
790
|
| `fable` | `gpt-6.2-sol` | `low`, `medium`, `high`, `xhigh`, `max` | same string, unchanged |
|
|
760
791
|
|
|
761
|
-
|
|
792
|
+
Three per-agent target overrides are applied after tuple validation, on top of
|
|
762
793
|
the family row above, and are the only model/effort remaps in the generator:
|
|
763
794
|
`explorer` (`sonnet`/`medium`) targets `gpt-6-luna` at `high` reasoning;
|
|
764
795
|
`deep-reasoner` (`opus`/`xhigh`) targets `gpt-6.2-astra` at `high` reasoning;
|
|
765
|
-
`fast-worker` (`sonnet`/`high`) targets `gpt-6.2-sol` at `medium` reasoning;
|
|
766
|
-
`deep-worker` (`opus`/`high`) targets `gpt-6.2-sol` at `high` reasoning;
|
|
767
|
-
`gatekeeper` (`opus`/`high`) targets `gpt-6.2-astra` at `medium` reasoning;
|
|
768
|
-
`root-cause-prover` (`opus`/`xhigh`) targets `gpt-6.2-astra` at `high` reasoning;
|
|
769
796
|
`harness-evaluator` (`opus`/`high`) targets `gpt-6.2-astra` at `medium` reasoning.
|
|
770
797
|
`orchestrator` has no Codex target.
|
|
771
798
|
|
|
772
|
-
`
|
|
773
|
-
receive `sandbox_mode = "workspace-write"`; every other role receives
|
|
799
|
+
`harness-evaluator` receives `sandbox_mode = "workspace-write"`; every other role receives
|
|
774
800
|
`sandbox_mode = "read-only"`. Current assignments are explorer
|
|
775
|
-
(`sonnet/medium`), deep-reasoner (`opus/xhigh`)
|
|
776
|
-
|
|
777
|
-
(`opus/xhigh`), and harness-evaluator (`opus/high`). Root-cause-prover's prompt further limits
|
|
778
|
-
writes to bugfix evidence inside the active contract's allowed paths;
|
|
779
|
-
harness-evaluator runs existing skill/adoption surfaces only when both repo and
|
|
801
|
+
(`sonnet/medium`), deep-reasoner (`opus/xhigh`) and harness-evaluator
|
|
802
|
+
(`opus/high`). Harness-evaluator runs existing skill/adoption surfaces only when both repo and
|
|
780
803
|
HOME pass the runner's disposable boundary: skills uses `--require-disposable`,
|
|
781
804
|
while adoption uses one `--run-adoption-profile` invocation that injects the
|
|
782
805
|
validated repo/HOME into inspector and init dry-run. Guarded skills overrides
|
|
@@ -949,7 +972,7 @@ rh run install-agent-fleet
|
|
|
949
972
|
The installer resolves `agents/fleet` from its authoritative helper source path,
|
|
950
973
|
not from the target repository's current working directory. There is no source
|
|
951
974
|
override, curl path, remote fallback, or alternate authority. It validates all
|
|
952
|
-
|
|
975
|
+
three source files before mutating any target; a missing, malformed, mismatched,
|
|
953
976
|
or unmapped source makes the whole run fail closed and leaves installed files
|
|
954
977
|
untouched.
|
|
955
978
|
|
|
@@ -981,7 +1004,7 @@ the current bytes once:
|
|
|
981
1004
|
rh run install-agent-fleet --accept-user-managed
|
|
982
1005
|
```
|
|
983
1006
|
|
|
984
|
-
The acknowledgement validates all
|
|
1007
|
+
The acknowledgement validates all six target files before writing
|
|
985
1008
|
`user_managed` path records into the host-config ledger
|
|
986
1009
|
(`~/.repo-harness/config/ledger.json`). Claude files must have
|
|
987
1010
|
well-formed frontmatter with the target role identity, model, effort, and body;
|
|
@@ -1015,23 +1038,15 @@ generation.
|
|
|
1015
1038
|
|
|
1016
1039
|
### Uninstall
|
|
1017
1040
|
|
|
1018
|
-
There is no uninstall command. Removing the fleet means deleting the
|
|
1041
|
+
There is no uninstall command. Removing the fleet means deleting the six
|
|
1019
1042
|
managed files by hand:
|
|
1020
1043
|
|
|
1021
1044
|
```text
|
|
1022
1045
|
~/.claude/agents/explorer.md
|
|
1023
1046
|
~/.claude/agents/deep-reasoner.md
|
|
1024
|
-
~/.claude/agents/fast-worker.md
|
|
1025
|
-
~/.claude/agents/deep-worker.md
|
|
1026
|
-
~/.claude/agents/gatekeeper.md
|
|
1027
|
-
~/.claude/agents/root-cause-prover.md
|
|
1028
1047
|
~/.claude/agents/harness-evaluator.md
|
|
1029
1048
|
~/.codex/agents/explorer.toml
|
|
1030
1049
|
~/.codex/agents/deep-reasoner.toml
|
|
1031
|
-
~/.codex/agents/fast-worker.toml
|
|
1032
|
-
~/.codex/agents/deep-worker.toml
|
|
1033
|
-
~/.codex/agents/gatekeeper.toml
|
|
1034
|
-
~/.codex/agents/root-cause-prover.toml
|
|
1035
1050
|
~/.codex/agents/harness-evaluator.toml
|
|
1036
1051
|
```
|
|
1037
1052
|
|
|
@@ -1437,7 +1452,7 @@ Read evidence and record a decision with:
|
|
|
1437
1452
|
|
|
1438
1453
|
```bash
|
|
1439
1454
|
rh arch refactor recommendations [--json] [--import-node-limit <n>] [--timeout-ms <ms>]
|
|
1440
|
-
rh arch refactor decide <recommendation-id> accept|defer|reject --reason "<text>" [--import-node-limit <n>] [--timeout-ms <ms>]
|
|
1455
|
+
rh arch refactor decide <recommendation-id> accept|defer|reject --reason "<text>" --snapshot-digest <digest> [--import-node-limit <n>] [--timeout-ms <ms>]
|
|
1441
1456
|
```
|
|
1442
1457
|
|
|
1443
1458
|
`recommendations` shows each open suggestion with its explanation, the metrics
|
|
@@ -88,7 +88,8 @@ When a task requires broad research, repo archaeology, multi-source synthesis, o
|
|
|
88
88
|
- Implementation sub-agents may run scoped typecheck and affected tests in their own worktree. They commit early and return their check results. An evidence role whose task is a named check, such as a root-cause reproduction, still runs that check and does not commit.
|
|
89
89
|
- The parent agent owns task management, conflict resolution, build and post-merge integration verification, including typecheck and affected tests.
|
|
90
90
|
- After integration, the parent removes each sub-agent worktree and branch whose commits are in the task branch and whose checkout is clean. It also removes the intermediate build output and temporary files that the work created. Other deletion still needs the user.
|
|
91
|
-
- The orchestrator seat is a long-lived session that starts from `rh seats argv orchestrator`, not a sub-agent. It may call the read-only roles `explorer` and `deep-reasoner` as sub-agents. It dispatches
|
|
91
|
+
- The orchestrator seat is a long-lived session that starts from `rh seats argv orchestrator`, not a sub-agent. It may call the read-only roles `explorer` and `deep-reasoner` as sub-agents. It dispatches the gatekeeper, every writer and the Codex cross-review only to Herdr seats, for worktree isolation and one writer per file. It edits no product code.
|
|
92
|
+
- In-process sub-agents serve cost control and read-only concurrency only, such as an `explorer` fan-out. Each harness maps them to its own lightweight family model: `claude` uses `haiku`/`sonnet`, `codex` uses `gpt-6-luna`/`gpt-6.1-terra`, `agy`/Gemini uses `gemini-4-carbon`/`gemini-4-neon`, and `pi` uses its configured setting. Code writes, cross-family planning and formal acceptance reviews run in Herdr seats.
|
|
92
93
|
|
|
93
94
|
## Peer Harness Collaboration
|
|
94
95
|
|
|
@@ -13,7 +13,7 @@ the server records `host_failed` when the guard refuses that child.
|
|
|
13
13
|
|
|
14
14
|
## Herdr Dispatch
|
|
15
15
|
|
|
16
|
-
- Claude, Codex and
|
|
16
|
+
- Claude, Codex, Pi and the agy advisor run in herdr-core terminals that Herdr.app shows as panes. Start a seat with `rh seats launch`, which opens its Herdr.app tab, and talk to it with `hc` ([Runtime commands](#runtime-commands)). Receipt-bearing acceptance uses `rh review round`; its OAR host runs the reviewer. Select Pi with `--harness pi`. Never call a vendor CLI directly for acceptance.
|
|
17
17
|
- Pi review uses an OAR RPC subprocess under Seatbelt. Its private agent directory links native model configuration and credentials for read-only access. An owner-written mode-0600 `settings.json` contains only native `defaultProvider`, `defaultModel` and `defaultThinkingLevel`; packages, proxy and trust policy are excluded. User extensions, skills, context files, prompt templates and MCP are disabled. The Pi reviewer uses the user's Pi default model. The Receipt's `actual_model` records OAR's actual `provider/model`. A null actual model records `model_relation: unknown` and grants no cross-model claim. A non-string or blank model fails with `review_actual_model_unverified`.
|
|
18
18
|
- A cross-model review means Receipt `model_relation: different-family`. The OAR host records the reviewer model and the model of each ended turn of the one author task session bound to the caller pane, campaign and reviewed root. One closed family table in `src/core/review/acceptance-receipt.ts` compares vendor families, not routing providers. Harness kind does not prove a model difference. A shared family is `same-family`. A missing author binding, an unobserved or running turn, a Claude turn (its model is not observed) or a model outside the table is `unknown`. Interactive authors are not OAR-observed, so they give `unknown` and a High-tier cross-model review stays a manual Herdr peer review. The review runtime records identity; it adds no cross-model gate.
|
|
19
19
|
- Exception: in the Claude desktop app, operator-attended acceptance review can use `rh review round --launch app-terminal`. The CLI prints the fixed OAR host command. Claude runs that exact command once in an app Terminal tab, then repeats the same round. The same OAR host, Seatbelt profile and Receipt apply.
|
|
@@ -29,7 +29,7 @@ This topology applies to issue-flow work (`repo-harness-issue-flow`) on herdr-co
|
|
|
29
29
|
- The advisor is the owner interface and serves the orchestrator. It relays each owner directive once, writes the parent bundle plan, audits triage and merges every two hours, does research and writes proposals. It may edit files for its proposals. It does not commit or write to GitHub. It collects evidence through the sub-agents of its seat (`seats.advisor.fleet`) and keeps judgment, synthesis and the proposal. The orchestrator asks it for a board replan by [Replan](https://github.com/aimpact-inc/repo-harness/blob/main/assets/skills/repo-harness-issue-flow/references/replan.md).
|
|
30
30
|
- Owner decisions and seat authority (owner, 2026-11-09, #2008): the root `CLAUDE.md` and `AGENTS.md` hold the life-cycle rules and the owner list. The orchestrator triages intake, dispatches an owner-approved batch plan in order as module bundles, merges by rule 2 at every tier and runs at most two review rounds by rule 1. A seat that receives an owner decision in its pane posts it on the issue or PR; that comment authorizes the other seats. A seat message carries pointers, not content: it names the issue, the PR, the comment URL or the sha, and the content lives in GitHub. The message still wakes the receiving seat; it does not replace the record. The advisor sends the orchestrator only a mismatch between a seat report and the GitHub state, not a confirmation. A comment is a record: a local seat writes it, and a locally run command may read it as data; it never starts an action. A joint decision of the orchestrator and the advisor covers only scope growth on an open PR, a skipped required review row or an accepted I1/I2/I3 residual; the orchestrator posts it first as `Joint decision (orchestrator + advisor)` with the reason. Every other call is the orchestrator's. The advisor makes no GitHub write. A "stop" or "no" comment from any participant, the owner account included, is a reference that the orchestrator weighs; a stop on an I1/I2 item goes to the owner.
|
|
31
31
|
- One bundle PR has one pane and one worker agent. Each further worker gets its own pane, as the right split of a tab that is not full or in a new tab. The worker may use the agent-fleet sub-agents (`agents/fleet/`) inside its own pane.
|
|
32
|
-
- Recommended models
|
|
32
|
+
- Recommended models (ADR-0006): in a Magpie-First setup, `orchestrator` runs Claude `opus` high and `advisor` runs Pi `magpie/agy-cli/gemini-4-neon` xhigh; in a Native-First setup, `orchestrator` runs Claude `opus` high and `advisor` runs `agy` `gemini-4-neon-high` (or Claude `opus` high). No seat requires a single fixed vendor when configured otherwise.
|
|
33
33
|
- Cleanup: after a PR merges, the orchestrator runs `rh board closeout --pr <n>` in the primary checkout. It first proves the merge and the worktree: merge commit in the fetched `origin/main`, PR head worktree at the PR head sha, not locked, clean, and no owner marker but its own. A missing proof stops before any pane closes. It then closes each seat terminal bound to the PR (its `pr` label, or the `issue` label of a closing issue in this repository, or a cwd in the PR head worktree on the PR head branch when the seat has an `issue` label that the PR body names after `Refs`; a cwd in the primary checkout never binds; a binding without the PR's `pr` label next to another PR's `pr` label is a conflict) whose checkout belongs to this repository, is clean and has no commit outside `origin/<branch>`. When every bound pane is closed and no process runs in the worktree, it removes the worktree and the local branch through the exact closeout path of `rh worktrees cleanup`, which drops only the worktree's own active-worktree marker. The same pass removes each finished seat terminal of the repository whose cwd directory is gone, also one that no merge binds, and lists it in `stale_terminals`; a failed `hc rm` there is listed as `kept` and keeps no worktree. A dirty, unpushed, conflicting, locked, other-owner or unmerged pane or worktree stays; the JSON names the reason, and the board rule A9 reports each live seat of a merged PR. The remote branch is left to GitHub.
|
|
34
34
|
- Before a worker reports DONE, it stops the background programs it started (a dev server, a daemon started with `nohup` or `setsid`). On Linux and macOS, herdr-core 0.1.19 keeps a deliberately detached program running after its terminal closes, and Windows ends it.
|
|
35
35
|
|
|
@@ -56,58 +56,63 @@ Commands for the topology steps:
|
|
|
56
56
|
|
|
57
57
|
The board of a parent selects a worker, gatekeeper or reviewer seat by its `issue` label (an item of the parent) or its `pr` label (a pull request of the board). `--parent` is optional for that. It names the worker tab `#<n>` (`other` without it), so the worker rows keep it.
|
|
58
58
|
|
|
59
|
-
A
|
|
59
|
+
A native `codex` worker seat in a linked contract worktree edits files and runs checks only. It runs no `git fetch`, `git commit` or `git push`. Its last message gives the commit subject and body, the PR title and body, and the check results. The orchestrator commits the worktree diff with that message and explicit paths only, pushes the branch and opens the PR. The orchestrator is the head owner of record and pushes each fix round; no other agent pushes to that PR. The Codex seat remains the content author and answers review threads through the orchestrator. (`pi` workers on `magpie/codex/*` commit, push, and run fix rounds directly in their worktrees.) A seat with the `net` tool group can use the network. A writable Codex seat with `net` can reach loopback services, including the Operator console and herdr-core socket (#1961).
|
|
60
60
|
|
|
61
61
|
`rh seats argv <seat>` prints arguments only: it starts no process and opens no tab. The argv comes from the `seats` section of `~/.repo-harness/config.json`, or from the seat defaults when the section is absent. The argv holds the model, the effort, the tool limits and the seat brief. Its stderr names the source and each limit. A limit marked `instructions_only` is written into the launch instructions only; the host does not enforce it. `rh seats launch` opens this argv in a Herdr.app tab; the `--argv` of `herdr-app do tab.new` and `pane.split` takes it too. Without `--argv`, the pane opens a shell.
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
| Seat | Default runtime, model and effort |
|
|
66
|
-
|---|---|
|
|
67
|
-
| `worker` | Codex, `gpt-6.1-terra`, high |
|
|
68
|
-
| `worker-deep` | Codex, `gpt-6.2-sol`, high |
|
|
69
|
-
| `worker-important` | Claude, `opus`, medium |
|
|
70
|
-
| `worker-important-fast` | Claude, `sonnet`, medium |
|
|
71
|
-
| `worker-light` | Pi, `magpie/cursor/deepseek-v41-flash-1017`, no effort and no account; worker tool groups; no fleet. A Pi seat on `magpie/codex/<model>` ("pi-gpt") is a user-selected alternative to a Codex seat: it runs the same GPT models, takes an effort (`--thinking`) and counts against the `chatgpt` account |
|
|
72
|
-
| `gatekeeper` | Codex, `gpt-6.1-terra`, high; read, shell and network |
|
|
73
|
-
| `gatekeeper-deep` | Codex, `gpt-6.2-sol`, high; read, shell and network, no fleet. An optional second Codex review row on a different model than `gatekeeper`; the board review plan does not start it |
|
|
74
|
-
| `gatekeeper-fallback` | `null` (not configured); when configured, the gatekeeper ranges: read, shell and network, no fleet |
|
|
75
|
-
| `reviewer` | Claude, `opus`, high; read, shell and network |
|
|
63
|
+
With `--repository-id`, the same argv starts both tabs and splits through an interactive login shell. The launcher adds its Bun directory and the directories where the caller found `rh` and `hc` to the end of the login shell’s `PATH`. The shell stays alive while `hc` tracks the agent and accepts commands after the agent exits.
|
|
76
64
|
|
|
77
|
-
|
|
65
|
+
Before each dispatch wave, run `rh quota`. Launch each task with `rh seats launch <seat> --cwd <worktree> --task <packet>` on the seat that its route line names. State the task boundary in the packet. `--json` keeps the account report unchanged.
|
|
78
66
|
|
|
79
|
-
|
|
67
|
+
| Seat | Magpie-First default (runtime, model, effort, fleet) | Native-First default |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| `orchestrator` | Claude, `opus`, high; `gh`, `mcp`, `net`, `read`, `shell`, `tasks`; `['explorer']` | Claude, `opus`, high |
|
|
70
|
+
| `advisor` | Pi, `magpie/agy-cli/gemini-4-neon`, xhigh; `mcp`, `net`, `read`, `shell`; `['explorer', 'deep-reasoner']` | `agy`, `gemini-4-neon-high` (or Claude `opus` high) |
|
|
71
|
+
| `council` | L3 member pool `{claude:fable, pi:magpie/agy-cli/gemini-4-carbon, pi:magpie/codex/gpt-6.2-astra}`, read-only, `['explorer']`; opened via `rh seats council` | `{claude:fable, agy:gemini-4-carbon-high, codex:gpt-6.2-astra}` |
|
|
72
|
+
| `worker-opus` | Claude, `opus`, high; worker tools; `['explorer']` | Claude, `opus`, high |
|
|
73
|
+
| `worker-neon` | Pi, `magpie/agy-cli/gemini-4-neon`, high; worker tools; `['explorer']` | `agy`, `gemini-4-neon-high` (when enabled) |
|
|
74
|
+
| `worker-deep` | Pi, `magpie/codex/gpt-6.2-sol`, high; worker tools; `['explorer']` | Codex, `gpt-6.2-sol`, high |
|
|
75
|
+
| `worker` | Pi, `magpie/codex/gpt-6.1-terra`, high; worker tools; `['explorer']` | Codex, `gpt-6.1-terra`, high |
|
|
76
|
+
| `worker-light` | Pi, `zai/glm-5.3-flash` (alt `magpie/group/deepseek-v4.1-flash`), no effort; worker tools; `[]` | `agy`, `gemini-4-hydrogen` (or `null`) |
|
|
77
|
+
| `gatekeeper` | Pi, `magpie/codex/gpt-6.2-sol`, high; read, shell, network; `[]` | Codex, `gpt-6.2-sol`, high |
|
|
78
|
+
| `gatekeeper-fallback` | Pi, `zai/glm-5.3-flash` (or `null`); read, shell, network; `[]` | `null` (or `agy`, `gemini-4-hydrogen`) |
|
|
79
|
+
| `reviewer` | Claude, `opus`, high; read, shell, network; `[]` | Claude, `opus`, high |
|
|
80
|
+
|
|
81
|
+
All worker seats use worker briefs, labels and pane names. `gatekeeper` and `reviewer` need `--pr <n>`, and `--repository-id <id>` too, because `rh review collect` finds the seat by its `repo-harness.seat` label; their pane names are `<prefix>-gk-<pr>` and `<prefix>-rv-<pr>`. `council` panes opened by `rh seats council --issue <n> --members <csv>` use `<prefix>-cn-<issue>` (`council` tab). `gatekeeper-deep` is retired. Review seats report a read-only verdict first and do not edit, commit, push or write to GitHub.
|
|
82
|
+
|
|
83
|
+
`gatekeeper-fallback` is optional and is no launch target: `seats argv gatekeeper-fallback` returns `seat_unknown`. While the gatekeeper account is exhausted and the fallback account is not, the route line names the fallback, for example `gatekeeper: gatekeeper-fallback (pi zai/glm-5.3-flash; gatekeeper: chatgpt exhausted)`, and `seats argv gatekeeper --repository-id <id> --pr <n>` prints the fallback argv with the gatekeeper label, pane name and brief. A tight, unknown or reserved gatekeeper keeps its own rule; with no usable fallback the line stays `gatekeeper: none (...)`. `rh board review` starts a gatekeeper only when this effective gatekeeper has a known model family, and not `anthropic` when the head needs a non-Claude gatekeeper. Its family must differ from the writer's only where it gives the different-family row: a Medium head, or a High head that needs no Claude review. A High head with a Claude review may use a gatekeeper of the writer's family; else it skips the PR with `review_family_unavailable` and the route line. A stored section without the key needs `rh update`, which sets it to `null`.
|
|
80
84
|
|
|
81
85
|
On Pi, review seats pass `--exclude-tools edit,write`. Direct edit/write tools are off. The edit limit is `common_commands` because the shell stays available; shell writes remain prohibited by the brief. Codex review seats use the read-only sandbox.
|
|
82
86
|
|
|
83
|
-
`seats.routing` holds ordered lists for `important_deep`, `important_fast`, `simple_deep`, `simple_fast` and `frontend`. Lists are non-empty and distinct. The first four accept configured worker seats only; a list cannot name a null seat. `frontend` accepts
|
|
87
|
+
`seats.routing` holds ordered lists for `important_deep`, `important_fast`, `simple_deep`, `simple_fast` and `frontend`. Lists are non-empty and distinct. The first four accept configured worker seats only; a list cannot name a null seat. `frontend` accepts `worker-opus` and `worker-neon` when they run Claude or Neon (`magpie/agy-cli/gemini-4-neon` or `gemini-4-neon*`). Defaults are `[worker-opus, worker-neon, worker-deep]`, `[worker-opus, worker-neon, worker, worker-light]`, `[worker-neon, worker-deep]`, `[worker-light, worker]` and `[worker-opus, worker-neon]`, in that order. `worker-light` defaults to the Pi seat above. A stored `null` stays null during migration; its argv returns `seat_not_configured`. Each configured seat must use an enabled runtime when saved. The default Pi seat prevents a Seats page save until Pi is enabled or `worker-light` is set to `null`.
|
|
84
88
|
|
|
85
|
-
Routing
|
|
89
|
+
Routing evaluates strictly left-to-right across the configured list after excluding reserved or exhausted accounts, selecting the first eligible seat with a known account state (or a Flash API seat without an account such as `zai/glm-5.3-flash` / `deepseek-v4.1-flash`). A Pi seat on `magpie/codex/` has the `chatgpt` account. Pi models with the `magpie/agy-cli/gemini-` prefix and native `agy` models with the `gemini-` prefix use the `agy_gemini` account. Routing selects an unknown account only when no known-state seat in the route is eligible. A window at or above `routing.exhausted_at_or_above_used` percent used (default 95, range 50–100) is `exhausted`; a provider-reported `rate_limit_reached_type` is exhausted at any value. Exhausted accounts are excluded. The one exception is `routing.codex_credit_mode` (`off`, `review` or `all`; default `off`): while the ChatGPT account is exhausted and reports credits at or above `routing.codex_credit_floor` (default 0), `review` admits `gatekeeper`, `gatekeeper-fallback`, and a ChatGPT-bound `reviewer`, and `all` admits every ChatGPT-bound seat. Their route and seat lines say `on credits`; the `chatgpt` account line stays `exhausted`. Only the owner sets `codex_credit_mode`, on the console Seats page; a seat does not write it, and a joint decision does not cover it. Claude in saving mode or exhausted stays reserved for `advisor` and `orchestrator`; routing skips `worker-opus` and selects the next eligible seat in the configured list. `routing.agy_saving_below_remaining` (default `25`, range `0..100`) reserves `agy_gemini` for `advisor` (`Neon`) by excluding `worker-neon` when `agy_gemini` weekly remaining quota is below that threshold. Frontend waits for an eligible Claude or Neon seat in its own route. `rh seats launch <seat> --repository-id <id> --owner-exception <url>` lifts the Claude reservation refusal (`seat_quota_reserved`) for one launch. The URL must name an owner decision on an issue or PR of the checkout's origin repository; the seat label `repo-harness.owner-exception` and the `--json` launch record keep it. The exception changes no model, tool or permission, does not lift an exhausted account, and a launch that is not reserved refuses it. `routing.unavailable_pi_providers` (default empty) lists Pi model prefixes that the owner marks unavailable, for example `magpie/anthropic`. A prefix matches a seat model only at a `/` boundary. While the list is non-empty, a Pi seat with a null model is unavailable too, because Pi then picks its own default provider. Routing skips each unavailable seat, the route, gatekeeper, reviewer and advisor lines of `rh quota` give the reason, and its launch refuses with `seat_provider_unavailable`. For a null model the reason says to give the seat an explicit model or to empty the list. `tight` is a display state only. When Claude is reserved, the explorer line uses `routing.low_quota_explorer` (default `haiku` high). Pass its model when you call the explorer. Otherwise the line says `default`.
|
|
86
90
|
|
|
87
|
-
`routing.claude_saving_below_remaining` defaults to 20. Claude saving mode applies when weekly remaining quota is below that percent. `routing.claude_hyper_at_or_above_remaining` defaults to 50. Claude hyper mode applies when weekly remaining quota is at or above that percent and saving does not apply; otherwise its mode is normal. Only in Claude hyper does
|
|
91
|
+
`routing.claude_saving_below_remaining` defaults to 20. Claude saving mode applies when weekly remaining quota is below that percent. `routing.claude_hyper_at_or_above_remaining` defaults to 50. Claude hyper mode applies when weekly remaining quota is at or above that percent and saving does not apply; otherwise its mode is normal. Only in Claude hyper does a Claude advisor take its config entry; in normal, saving, exhausted and unknown it uses `opus` high, and the `advisor:` line of `rh quota` names it. Claude hyper routes workers as normal and does not change the orchestrator entry. Codex seats and Pi seats on `magpie/codex/` keep their configured model and effort at every quota level. A Codex advisor keeps its own configured model and effort too; a Pi advisor on `magpie/agy-cli/` uses its config entry at 50% or more `agy_gemini` weekly quota remaining and uses `magpie/agy-cli/gemini-4-neon` when the remaining quota is lower or unknown. A missing weekly reading gives an unknown mode. Quota modes are derived, never stored; the credit mode is the one stored owner choice. Reserved Claude advisor and orchestrator seats use `opus` high. Other Pi seats, tools, fleet and class lists stay as configured. An absent seats section uses defaults. Run `rh update` for the one-shot migration of stored sections (`planner` → `council`, `worker-important` → `worker-opus`, `worker-important-fast` → `worker-neon`, `gatekeeper-deep` removed, `agy_saving_below_remaining` added). The decoder refuses old keys before and after migration; a POST writes the full section.
|
|
88
92
|
|
|
89
93
|
`rh seats launch` takes the space from `--space` or from the `herdr.space` label of the calling terminal, opens the argv in a `tab.new` of that space, and fails closed when Herdr.app opens no tab; `--json` prints the launch, the space and the placement. With `--repository-id`, the argv labels its own terminal before the agent starts: it runs `rh seats label`, which sets the seat labels on `HC_TERMINAL_ID`, and then starts the agent. The board finds seats only by these labels; a terminal without them leaves the execution axis `unavailable` (`no_seat_terminals`). When the label fails, the agent does not start and the terminal shows the error. Each start prints the new `terminal`. `<repository-id>` is the GitHub numeric repository id (`gh api repos/<owner>/<repo> --jq .id`). Leave out `--issue` and `--pr` for the orchestrator and the advisor.
|
|
90
94
|
|
|
91
95
|
### Seat reset
|
|
92
96
|
|
|
93
|
-
|
|
97
|
+
Claude and Pi `orchestrator` and `advisor` seats reset bidirectionally through a handoff before auto-compaction (#1972, #3364). Opus auto-compaction started at 461k-467k context tokens on Max. With `--repository-id`, `seats argv` sets `REPO_HARNESS_SEAT` and `REPO_HARNESS_SEAT_REPOSITORY` in the env of these two seats (both Claude and Pi), and `REPO_HARNESS_SEAT_MODEL` and `REPO_HARNESS_SEAT_EFFORT` with the effective model and effort of the launch (#2633). Every seat argv unsets the four values that it inherits. Only that env names the seat for the Stop hook. The SessionStart hook (`session_start` / `session_compact` in `src/pi/extension.ts` on Pi) records `host`, `source`, `transcript_path`, model, and effort in `session.json` (`ResetHost = 'claude' | 'pi' | 'antigravity'`). Worker seats do not reset.
|
|
94
98
|
|
|
95
|
-
1. When the context of the last assistant entry of the transcript is 380,000 tokens or more, the Stop hook blocks the stop once per session segment. A segment ends when
|
|
99
|
+
1. When the context of the last assistant entry of the transcript is 380,000 tokens or more, the Stop hook (`agent_before_settle` on Pi, `Stop` on Claude) blocks the stop once per session segment. A segment ends when SessionStart records a new session (`startup`, `clear` or `compact`): a request is open while no `session.json` record is newer than it. The hook is the one authority for the action (#2625). A transcript file below 32 MiB gives `compact`; 32 MiB or more gives `reset`. It records the request time, the transcript path, `host`, the `action` and the `transcript_bytes` in `/tmp/repo-harness-seats/<repository-id>/<seat>/request.json`, and the block reason names the action. `/compact` keeps the transcript file, so it grows by 3.4-4.7 MB per cycle; the bound gives 6 to 9 compactions before `/clear` (Claude) or `/new` (Pi) starts a new file.
|
|
96
100
|
2. The seat finishes the planning and the dispatch that it has in hand and starts nothing new; this is not a hard stop (joint decision on #2625, owner word 2026-11-12). Then it writes `/tmp/repo-harness-seats/<repository-id>/<seat>/handoff.md` with the fixed sections that the block reason gives: role, hard rules, current state, in progress, owner decisions pending, next actions and the resume checklist. It sends `RESET-REQUEST <path> <sha256>` to the peer seat.
|
|
97
|
-
3. The peer runs `rh seats reset <path> <sha256>` in the background; one run can take about 10 minutes. The command finds the requester by the `repo-harness.seat` and `repo-harness.repository` labels. When the handoff is not newer than the request, its sha256 is different, or a section is missing, it sends `REWRITE` to the requester and resets nothing. Otherwise it waits with `hc wait` and types the recorded action: `/compact` for `compact
|
|
98
|
-
4. The requester reads the handoff and sends `RESUMED` to the peer. After `/clear` it then checks the current state with git and gh and continues. After `/compact` it continues: the compaction summary holds the live state.
|
|
101
|
+
3. The peer runs `rh seats reset <path> <sha256>` in the background; one run can take about 10 minutes. The command finds the requester by the `repo-harness.seat` and `repo-harness.repository` labels and reads `host` from `request.json` (`claude` or `pi`). When the handoff is not newer than the request, its sha256 is different, or a section is missing, it sends `REWRITE` to the requester and resets nothing. Otherwise it waits with `hc wait` and types the recorded action: `/compact` for `compact`; `/clear` (Claude) or `/new` (Pi) for `reset`. It does not measure the transcript again. One validator reads the request for the Stop hook and for `seats reset`. A request without a valid time, `host`, or `action` (for example from the old code), or a file that is not a JSON object (for example `null`), is not open for the Stop hook. `seats reset` types nothing for it: after the peer and requester checks it sends `NO-RESET` (`request_invalid`), and the next crossing writes a fresh request. A missing request is `request_missing` and sends nothing. After the claim, a `session.json` record newer than the request (an auto-compaction or another reset) means a new segment: the command types nothing and sends `NO-RESET` (`request_closed`). SessionStart writes `session.json` next to the handoff. After `/clear` or `/new` the command sends the resume prompt only after that file names a new transcript (budget 60 s). After `/compact` it waits for a `compact` record of the same transcript (budget 300 s: a compaction took 71 s median and 237 s max). The resume prompt asks for `RESUMED` first. The resume evidence is an assistant Bash tool call in the transcript (Claude `tool_use` `Bash` or Pi `toolCall` `bash`), after the user entry that holds the prompt, whose command is exactly the one simple command `hc send <peer> RESUMED` (the message bare or in plain quotes), and then its tool result without an error. A compound command, another address and a command that only prints the text are no evidence. Only the bytes appended after the prompt send are read.
|
|
102
|
+
4. The requester reads the handoff and sends `RESUMED` to the peer. After `/clear` or `/new` it then checks the current state with git and gh and continues. After `/compact` it continues: the compaction summary holds the live state.
|
|
99
103
|
|
|
100
104
|
Protocol rules. The reset runs with no human step; an owner command is never part of it (owner decision 2026-11-08):
|
|
101
105
|
|
|
102
106
|
- One reset at a time. When both seats cross the threshold, the advisor resets first.
|
|
103
107
|
- The peer sends no other message to the requester from `RESET-REQUEST` until `RESUMED`.
|
|
104
|
-
- Handoff check fails: the peer asks for a rewrite, at most 3 times. Then no reset: the seat continues, and Claude Code auto-compaction handles its context.
|
|
108
|
+
- Handoff check fails: the peer asks for a rewrite, at most 3 times. Then no reset: the seat continues, and Claude Code or Pi auto-compaction handles its context.
|
|
105
109
|
- Peer seat missing or not answering: no reset, same as above.
|
|
106
|
-
-
|
|
107
|
-
-
|
|
110
|
+
- A live requester with `status: null` gives `requester_status_untracked` before `hc wait` and any further keys. The error names the foreground program and gives the commands for manual recovery.
|
|
111
|
+
- No new-session signal after `/clear` or `/new`: `/clear` (Claude) or `/new` (Pi) is typed again. No signal after `/compact`: no second `/compact`; one log entry and one notice, the seat continues, and auto-compaction stays as the net. No answer to the resume prompt (no `RESUMED` send): the prompt is sent again. One attempt and at most 3 retries in total, then the other seat starts the requester again in the same terminal from its argv (`rh seats argv <seat> --repository-id <id>`, not `rh seats launch`, which opens a new tab) and sends the resume prompt with the git and gh check. The restart is a new process with no compaction summary. It starts in the existing shell so that the next reset can use that shell again.
|
|
112
|
+
- Mode change (#2633): `/clear`, `/new`, and `/compact` keep the model, so for the action `reset` the command first computes the effective model and effort of the requester under the current quota. The seat labels identify the requester. Its launch directory selects the primary checkout and registry entry even when `seats reset` runs from `/tmp`. When the model or effort differs from the `session.json` record, it starts the requester again from its seat argv (`/exit` on Claude, `/quit` on Pi, then the relaunch line) and types no `/clear` or `/new`; the result has `relaunched: true` and the log entry has the detail `restarted`. When they are equal, or the record has no model, it types `/clear` (Claude) or `/new` (Pi). A launch that cannot be built, or a launch under an unknown quota mode (a missing, unreadable or stale weekly reading), gives one `model_check_failed` log entry and one notice, and the command types `/clear` or `/new`: a missing reading is no authority to move a running seat. A new `seats argv` launch still takes the unknown-mode model. The action `compact` never restarts. The restart comes only inside this reset, after the handoff, so the seat finishes its planning and dispatch first. No `/model` or effort command is typed into a running session.
|
|
108
113
|
- Each of these failures writes one entry to a reset log next to the handoff and sends one notice. The flow does not wait for anyone to read it.
|
|
109
114
|
|
|
110
|
-
`seats reset` runs these rules. It types `/compact`, `/clear`, `/exit` and the relaunch line (`sh <reset dir>/relaunch.sh`) with `hc keys`: `hc send` wraps its text in an envelope, so
|
|
115
|
+
`seats reset` runs these rules. It types `/compact`, `/clear` or `/new`, `/exit` or `/quit`, and the relaunch line (`sh <reset dir>/relaunch.sh`) with `hc keys`: `hc send` wraps its text in an envelope, so the seat reads a sent slash command as chat text. The reset log `reset-log.jsonl` is the only record of the rewrite and resend counts across runs; one run also stops after one attempt and 3 retries when the log cannot be written. Before the first typed command, a run claims the request with an exclusive create of `claim-<requested_at digits>` next to the handoff. A second run for the same request, also after an uncertain first run, sends nothing (`already_claimed`); a claim that cannot be created types nothing (`claim_failed`). A completed reset adds a `reset` entry with the detail `compacted`, `cleared`, `relaunched` or `restarted`. Each failure first appends its log entry, then posts one `seat.reset_failed` bot event to the notify channels; the run waits at most 5 s in total for the notices at its end. A log entry that cannot be written is reported in the result as `logErrors`. Without a notify config, the log entry records `not_configured`. A handoff path that is not `/tmp/repo-harness-seats/<repository-id>/<seat>/handoff.md` names no seat, so it gives only the command error, with no log entry and no notice.
|
|
111
116
|
|
|
112
117
|
### Pane and tab names
|
|
113
118
|
|
|
@@ -120,9 +125,9 @@ The pane name is `<prefix>-<role>[-<item>][-<qualifier>]`: at most 32 characters
|
|
|
120
125
|
| Part | Values | Source |
|
|
121
126
|
|---|---|---|
|
|
122
127
|
| `prefix` | 2-6 characters, `[a-z][a-z0-9]{1,5}`, one per registered repository, unique on the machine | `panePrefix` of the repository entry in `~/.repo-harness/registered-repos.json` |
|
|
123
|
-
| `role` | `orch`, `adv`, `
|
|
124
|
-
| `item` | worker
|
|
125
|
-
| `qualifier` | worker: a slice word when one issue has two live worker panes (`--qualifier`); reviewer: the review runtime id (`claude`, `codex`) | the dispatch |
|
|
128
|
+
| `role` | `orch`, `adv`, `cn`, `w`, `gk`, `rv` | the seat |
|
|
129
|
+
| `item` | worker / `council`: the issue number (`--issue`) or `rel<digits>` for release prep (`--release`); reviewer: the PR number. None for `orch` and `adv` | the dispatch |
|
|
130
|
+
| `qualifier` | worker: a slice word when one issue has two live worker panes (`--qualifier`); `council`: member key (`fable`, `carbon`, `astra`); reviewer: the review runtime id (`claude`, `codex`, `pi`) | the dispatch |
|
|
126
131
|
|
|
127
132
|
- Set `panePrefix` with `rh seats prefix --repo <path> --pane-prefix <p>`. Every registry writer keeps it. The registry read refuses a malformed or duplicate prefix.
|
|
128
133
|
- `seats argv` reads the entry of the primary checkout of the current directory; a linked worktree resolves to its primary checkout. No entry, or an entry without `panePrefix`, fails with `pane_name_invalid`. A name over 32 characters fails the same way.
|
|
@@ -135,7 +140,8 @@ The pane name is `<prefix>-<role>[-<item>][-<qualifier>]`: at most 32 characters
|
|
|
135
140
|
| Tab 1 | the orchestrator (left), the advisor (right), one optional worker | `orch` |
|
|
136
141
|
| Worker tab | up to 3 worker panes whose issues have the same parent | `#<parent>` |
|
|
137
142
|
| Worker tab, no parent | up to 3 worker panes of issues without a parent | `other` |
|
|
138
|
-
|
|
|
143
|
+
| Council tab | up to 3 blind `council` panes (`rh seats council`) | `council` |
|
|
144
|
+
| Review tab | up to 3 reviewer panes (`gatekeeper`, `reviewer`) | `review` |
|
|
139
145
|
|
|
140
146
|
A new pane goes into the first tab of its kind with fewer than 3 panes. When every tab of that kind is full, add ` 2`, ` 3` to the base name, for example `#1000 2`. A tab closes with its last pane. The space name stays the repository name.
|
|
141
147
|
|
|
@@ -435,10 +435,12 @@ CI and operators use the full debt comparison:
|
|
|
435
435
|
rh arch debt --json --base origin/main
|
|
436
436
|
```
|
|
437
437
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
438
|
+
ArchContext compares the debt at HEAD and at the resolved base. It reports
|
|
439
|
+
introduced and resolved items when the corresponding check on the other side
|
|
440
|
+
has complete coverage. A valid comparison exits 0, including when CodeGraph
|
|
441
|
+
is unavailable or another check has a coverage gap. The JSON lists the gaps
|
|
442
|
+
in `head.debt.coverageReasonCodes` and `base.coverageReasonCodes`. An unresolvable
|
|
443
|
+
base or a failed comparison exits 1 and reports the reason on stderr.
|
|
442
444
|
|
|
443
445
|
Agents author semantic snapshots and diagrams. Hooks do not spawn LLM agents or
|
|
444
446
|
long-running commands. Deterministic execution belongs in explicit CLI commands
|