repo-harness 0.32.0 → 0.33.0
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 +4 -4
- package/CLAUDE.md +4 -4
- package/README.es.md +4 -4
- package/README.fr.md +4 -4
- package/README.ja.md +4 -4
- package/README.md +25 -25
- package/README.zh-CN.md +4 -4
- package/SKILL.md +1 -1
- package/assets/AGENTS.md +13 -0
- package/assets/CLAUDE.md +13 -0
- package/assets/herdr/github-events/worker.mjs +1 -1
- package/assets/reference-configs/agentic-development-flow.md +3 -3
- package/assets/reference-configs/design-options.md +1 -1
- package/assets/reference-configs/document-generation.md +2 -2
- package/assets/reference-configs/external-tooling.md +76 -58
- package/assets/reference-configs/global-working-rules.md +2 -2
- package/assets/reference-configs/harness-overview.md +10 -9
- package/assets/reference-configs/heartbeat-triage.md +3 -3
- package/assets/reference-configs/herdr-notify.md +28 -28
- package/assets/reference-configs/hook-operations.md +24 -24
- package/assets/reference-configs/minimal-change-hooks.md +3 -3
- package/assets/reference-configs/release-deploy.md +2 -2
- package/assets/reference-configs/strategy.md +6 -6
- package/assets/reference-configs/ux-feature-guard.md +2 -2
- package/assets/released-managed-values.v1.json +2281 -0
- package/assets/skill-commands/manifest.json +4 -4
- package/assets/skill-commands/repo-harness-architecture/references/worker.md +24 -24
- package/assets/skill-commands/repo-harness-check/references/architecture-evidence.md +15 -14
- package/assets/skill-commands/repo-harness-check/references/deploy-readiness.md +1 -1
- package/assets/skill-commands/repo-harness-ship/references/worker.md +6 -6
- package/assets/skill-version.json +3 -3
- package/assets/skills/obsidian-memory/references/worker.md +2 -2
- package/assets/skills/repo-harness-advisor/SKILL.md +3 -3
- package/assets/skills/repo-harness-archimap/scripts/measure.ts +24 -2
- package/assets/skills/repo-harness-cross-review/SKILL.md +1 -1
- package/assets/skills/repo-harness-cross-review/references/generic-review.md +7 -7
- package/assets/skills/repo-harness-herdr-portal/SKILL.md +2 -2
- package/assets/skills/repo-harness-herdr-portal/references/spawn.md +2 -2
- package/assets/skills/repo-harness-issue-flow/SKILL.md +19 -10
- package/assets/skills/repo-harness-issue-flow/references/acceptor.md +25 -9
- package/assets/skills/repo-harness-issue-flow/references/advisor.md +7 -7
- package/assets/skills/repo-harness-issue-flow/references/board.md +7 -5
- package/assets/skills/repo-harness-issue-flow/references/events.md +3 -3
- package/assets/skills/repo-harness-issue-flow/references/orchestrator.md +32 -27
- package/assets/skills/repo-harness-issue-flow/references/templates.md +5 -5
- package/assets/skills/repo-harness-issue-flow/references/worker.md +6 -4
- package/assets/skills/repo-harness-orchestrator/SKILL.md +3 -3
- package/assets/skills/repo-harness-product/references/prd.md +2 -2
- package/assets/skills/repo-harness-seat-handoff/SKILL.md +4 -4
- package/assets/skills/repo-harness-setup/SKILL.md +2 -2
- package/assets/skills/repo-harness-setup/references/capability.md +1 -1
- package/assets/skills/repo-harness-setup/references/ci-scope.md +2 -2
- package/assets/skills/repo-harness-setup/references/init.md +4 -4
- package/assets/skills/repo-harness-setup/references/migrate.md +2 -2
- package/assets/skills/repo-harness-setup/references/scaffold.md +4 -3
- package/assets/skills/repo-harness-strategy/references/workflow.md +3 -3
- package/assets/skills/repo-harness-test/references/running.md +2 -2
- package/assets/templates/design-brief.template.md +1 -1
- package/assets/templates/helpers/capability-resolver.ts +124 -14
- package/assets/templates/root-context.md +1 -1
- package/assets/workflow-contract.v1.json +9 -7
- package/dist/hook-entry.js +1464 -477
- package/dist/oar-review-host.js +219 -10
- package/install.ps1 +8 -8
- package/install.sh +8 -8
- package/package.json +13 -13
- package/references/bot-control.md +1 -1
- package/scripts/AGENTS.md +12 -0
- package/scripts/CLAUDE.md +12 -0
- package/scripts/capability-config.ts +13 -4
- package/scripts/capability-resolver.ts +2 -0
- package/scripts/check-agent-tooling.sh +12 -12
- package/scripts/check-ci.sh +19 -15
- package/scripts/check-context-files.sh +1 -1
- package/scripts/check-protected-paths.ts +1 -1
- package/scripts/check-release-published.sh +1 -1
- package/scripts/check-release-upgrade-rehearsal.sh +16 -11
- package/scripts/check-released-managed-values.ts +691 -0
- package/scripts/check-state-boundaries.ts +3 -1
- package/scripts/check-tarball-install-smoke.sh +7 -7
- package/scripts/contract-worktree.sh +25 -9
- package/scripts/create-project-dirs.sh +4 -65
- package/scripts/decision-trail.ts +2 -2
- package/scripts/factor-lab-new.sh +1 -1
- package/scripts/factor-lab-promote.sh +1 -1
- package/scripts/factor-lab-reject.sh +1 -1
- package/scripts/init-project.sh +4 -95
- package/scripts/lib/ci-run-tests.sh +40 -5
- package/scripts/lib/ci-worktree-suspects.mjs +32 -0
- package/scripts/lib/project-init-lib.sh +16 -959
- package/scripts/release-owner-steps.sh +2 -2
- package/scripts/run-harness-profile-benchmark.ts +1 -1
- package/scripts/select-agent-context-blocks.sh +0 -16
- package/scripts/ship-worktrees.sh +10 -4
- package/scripts/sync-codex-installed-copies.sh +1 -1
- package/src/cli/commands/architecture-projection-actions.ts +3 -3
- package/src/cli/commands/architecture-projection.ts +3 -3
- package/src/cli/commands/bots.ts +1 -1
- package/src/cli/commands/brain.ts +4 -3
- package/src/cli/commands/candidate-reconciliation.ts +2 -1
- package/src/cli/commands/capability-context.ts +31 -8
- package/src/cli/commands/docs.ts +2 -2
- package/src/cli/commands/doctor.ts +26 -20
- package/src/cli/commands/fleet.ts +1 -1
- package/src/cli/commands/global-runtime.ts +108 -17
- package/src/cli/commands/herdr-skill.ts +1 -1
- package/src/cli/commands/init-hook.ts +22 -19
- package/src/cli/commands/init.ts +7 -7
- package/src/cli/commands/install.ts +4 -4
- package/src/cli/commands/mcp.ts +1 -1
- package/src/cli/commands/migrate.ts +3 -3
- package/src/cli/commands/operator-actions.ts +1 -1
- package/src/cli/commands/review.ts +25 -17
- package/src/cli/commands/run.ts +4 -4
- package/src/cli/commands/seats.ts +3 -3
- package/src/cli/commands/security.ts +2 -2
- package/src/cli/commands/setup-snapshot.ts +2 -2
- package/src/cli/commands/state.ts +1 -1
- package/src/cli/commands/status.ts +1 -1
- package/src/cli/commands/tools.ts +1 -1
- package/src/cli/commands/upgrade-registered.ts +2 -2
- package/src/cli/commands/upgrade.ts +10 -10
- package/src/cli/commands/validators.ts +3 -3
- package/src/cli/commands/worktrees-actions.ts +4 -4
- package/src/cli/hook/AGENTS.md +14 -1
- package/src/cli/hook/CLAUDE.md +14 -1
- package/src/cli/hook/agent-notice.ts +4 -4
- package/src/cli/hook/circuit-breaker.ts +1 -1
- package/src/cli/hook/handler-registry.ts +1 -1
- package/src/cli/hook/mutation-bash.ts +8 -127
- package/src/cli/hook/mutation-guard.ts +1 -1
- package/src/cli/hook/mutation-protected-gate.ts +958 -0
- package/src/cli/hook/route-registry.ts +1 -1
- package/src/cli/hook/runtime.ts +2 -2
- package/src/cli/hook/session-context.ts +1 -1
- package/src/cli/hook/stop-handler.ts +1 -1
- package/src/cli/hook/subagent-context.ts +1 -1
- package/src/cli/index.ts +14 -9
- package/src/cli/installer/architecture-selection.ts +2 -2
- package/src/cli/installer/global-context.ts +91 -32
- package/src/cli/installer/install-profile.ts +8 -4
- package/src/cli/installer/install-state.ts +3 -3
- package/src/cli/installer/managed-entries.ts +1 -1
- package/src/cli/installer/uninstall.ts +1 -1
- package/src/cli/installer/waza-rules.ts +2 -2
- package/src/cli/repo-adoption/target.ts +1 -1
- package/src/cli/tools/codegraph.ts +4 -4
- package/src/core/adoption/managed-block.ts +13 -5
- package/src/core/adoption/minimum-harness-version.ts +2 -2
- package/src/core/adoption/package-scripts.ts +10 -0
- package/src/core/architecture/module-view.ts +3 -3
- package/src/core/architecture/projection.ts +86 -16
- package/src/core/board/advisor-seat.ts +1 -1
- package/src/core/board/attention.ts +9 -9
- package/src/core/board/github-repository.ts +5 -0
- package/src/core/board/merge.ts +43 -17
- package/src/core/board/seat-launch.ts +3 -3
- package/src/core/board/seat-reset.ts +3 -3
- package/src/core/board/seats-settings.ts +3 -3
- package/src/core/board/source.ts +7 -1
- package/src/core/capabilities/ownership-blocker.ts +6 -6
- package/src/core/capabilities/registry.ts +81 -4
- package/src/core/decision/notify-relay-record.ts +2 -2
- package/src/core/decision/notify-secret-keys.ts +1 -1
- package/src/core/evidence/workflow-needs.ts +114 -116
- package/src/core/operator/bot-access.ts +1 -1
- package/src/core/operator/docs.ts +2 -2
- package/src/core/operator/slack-review.ts +3 -4
- package/src/core/operator/worktree-cleanup.ts +1 -1
- package/src/core/review/runner-port.ts +20 -3
- package/src/core/setup/cli-inventory.ts +6 -14
- package/src/core/setup/types.ts +3 -3
- package/src/core/skill-surface/catalog.ts +1 -1
- package/src/core/skill-surface/cli-name.ts +39 -0
- package/src/core/skill-surface/plugin-manifest.ts +4 -4
- package/src/core/state/project-continuation-envelope.ts +1 -1
- package/src/core/terminal/herdr-core-pin.json +11 -11
- package/src/effects/adoption/gitignore-plan.ts +32 -2
- package/src/effects/adoption/standard-plan.ts +45 -32
- package/src/effects/architecture/archctx-provider.ts +16 -10
- package/src/effects/architecture/architecture-read.ts +41 -3
- package/src/effects/architecture/capability-resolver.ts +46 -9
- package/src/effects/architecture/model-reader.ts +4 -3
- package/src/effects/architecture/projection-apply.ts +3 -3
- package/src/effects/architecture/projection-config.ts +1 -1
- package/src/effects/architecture/projection-writer.ts +1 -1
- package/src/effects/board/attention-watch.ts +1 -1
- package/src/effects/board/pi-fleet-roles.ts +1 -1
- package/src/effects/board/seat-reset.ts +2 -2
- package/src/effects/evidence/event-log.ts +2 -2
- package/src/effects/fleet/task-inbox-layout-migration.ts +1 -1
- package/src/effects/fleet/task-inbox-layout.ts +1 -1
- package/src/effects/fs-transaction.ts +3 -2
- package/src/effects/operator/advisor-seat-route.ts +1 -1
- package/src/effects/operator/board-read.ts +2 -2
- package/src/effects/operator/bot-access.ts +1 -1
- package/src/effects/operator/language-settings-route.ts +5 -2
- package/src/effects/operator/server.ts +16 -16
- package/src/effects/operator/tests-collector.ts +2 -2
- package/src/effects/operator/worktree-collector.ts +1 -1
- package/src/effects/pi-host-probe.ts +35 -7
- package/src/effects/pi-model-child.ts +20 -0
- package/src/effects/publication/merge-readiness.ts +43 -46
- package/src/effects/refactor/archctx-provider.ts +1 -1
- package/src/effects/release/runtime-evidence.ts +3 -3
- package/src/effects/review/generic-review.ts +42 -15
- package/src/effects/review/review-collect.ts +86 -0
- package/src/effects/review/review-isolation.ts +121 -30
- package/src/effects/review/review-publish.ts +10 -3
- package/src/effects/review-runner/task-oar-host.ts +146 -11
- package/src/effects/review-runner/task-review-runner.ts +4 -3
- package/src/effects/runtime/helper-runner.ts +1 -1
- package/src/effects/runtime/protected-helper-platform.ts +2 -2
- package/src/effects/setup/cli-inventory.ts +2 -2
- package/src/effects/source-checkout.ts +2 -1
- package/src/effects/state/attempt-ledger-store.ts +1 -1
- package/src/effects/state/resolve-effective-state.ts +17 -10
- package/src/effects/terminal/herdr-core.ts +2 -2
- package/src/effects/terminal/task-runtime-observation.ts +7 -2
- package/src/effects/terminal/task-session.ts +1 -1
- package/src/effects/upgrade/legacy-inventory.ts +51 -11
- package/src/effects/upgrade/legacy-worktree-cleanup.ts +1 -1
- package/src/effects/upgrade/operator-decisions.ts +1 -0
- package/src/effects/upgrade/released-values.ts +161 -0
- package/src/pi/compat.ts +11 -8
package/AGENTS.md
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
- Multi-agent work follows `repo-harness-issue-flow` (`assets/skills/repo-harness-issue-flow/SKILL.md`): roles, claims, handoff, dispatch, acceptance and merge.
|
|
5
5
|
- `docs/architecture/archimap.html` is the single architecture entry. It links each module to its archctx-projected capability doc in `docs/architecture/modules/`. Change boundaries only through `repo-harness-architecture`; do not hand-write other architecture docs.
|
|
6
6
|
- The owner keeps every security decision (owner, 2026-11-09, #2008): credentials, tokens and secrets, and each change that reads, moves or exposes them; permissions (seat tool grants, network access, sandbox settings, hooks (changes to hook behavior or hook configuration; a change under `src/cli/hook/**` that changes neither takes the High review rule: two PASS rows, one different-family), confirmation bypass); the safety net (branch protection, `publication.acceptance_merge`, force push to main, the `Required / CI` definition); deletion that git cannot restore (unpushed commits, dirty worktrees, owner files outside a repository such as `~/.repo-harness`, `~/.claude` or `~/.codex` without a backup); and production: the owner's word for each release (it starts the host command list that publishes both packages to npm, creates the release tag and the GitHub Release) and each production deployment. A production deployment needs an explicit owner authorization for that deployment; no standing GO and no joint decision covers it. The life cycle goes as far as the release PR (prep, version and CHANGELOG commits, push, checks, merge by rule 2). A staging or test deployment (scratch-HOME tarball install, release dry run, prerelease environment, Windows test box) is a joint decision.
|
|
7
|
-
- Main publication is allowed only when `publication.acceptance_merge` is `on` in the policy on the PR base, and the current task explicitly authorizes main publication, or rule 2 or rule 3 applies; the skill defines who merges. Push needs task authorization. An explicit no-merge instruction that reaches a seat locally (task or pane) always wins; a no-merge comment is a reference under rule (8). Life-cycle rules (owner, 2026-11-09, #2008): (1) A fix loop continues after round 3 without the owner while each round has fewer blocking findings (P0-P2) than the round before and the scope does not grow. A grown scope is a joint decision. A new P0 finding, or a new P1 finding about security, secrets, data or authentication,
|
|
7
|
+
- Main publication is allowed only when `publication.acceptance_merge` is `on` in the policy on the PR base, and the current task explicitly authorizes main publication, or rule 2 or rule 3 applies; the skill defines who merges. Push needs task authorization. An explicit no-merge instruction that reaches a seat locally (task or pane) always wins; a no-merge comment is a reference under rule (8). Life-cycle rules (owner, 2026-11-09, #2008): (1) A fix loop continues after round 3 without the owner while each round has fewer blocking findings (P0-P2) than the round before and the scope does not grow. A grown scope is a joint decision. When the count does not drop but every open blocking finding fails closed (no fail-open and no credential or data effect; availability only), the loop continues by joint decision under one rule, also in the safety net and the hooks. A new P0 finding, or a new P1 finding about security, secrets, data or authentication, goes to the owner as a notice. The loop continues without an owner word when the fix closes the finding. It stops at the owner only when the fix for that finding would accept a residual, relax a control or grow the scope. Each merge outside rule 2, each release, each credential or permission change and each deletion that git cannot restore stay with the owner. Any other new P1 finding does not stop the loop. Round 5 is the hard stop. (2) In an owner-approved batch, a Medium or High PR merges when its acceptance record is PASS for the head, `Required / CI` passed and each review-bot comment has a response; a High PR also needs its cross-model review PASS; a Low PR that meets the Low accept-seat skip merges on `Required / CI` and its verification evidence, with no acceptance record; each PR body keeps its rollback line (a `git revert` of the squash commit unless it states another). (3) The rolling projection PR (`archctx/projection`) merges on green CI; its merge is its acceptance. (4) An owner decision that the receiving seat posts on the issue or PR authorizes the other seats, with no second confirmation in another pane. 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. (5) After the owner approves a batch parent and its plan comment, the plan's issues dispatch in plan order; a new issue or a changed order goes to the owner or to rule 7. A new issue that only closes a security gap (no accepted residual, no relaxed control, no grown scope) joins a batch by joint decision, with a notice to the owner. (6) The GitHub setting "Automatically delete head branches" deletes merged head branches only. (7) The orchestrator and the advisor make a decision that otherwise goes to the owner when both agree, unless it touches security; before the action they post it on the owning issue or PR as `Joint decision (orchestrator + advisor)` with the reason. Both seats run the same model family, so a joint decision never replaces the High-tier cross-model review. A new issue that only closes a security gap (no accepted residual, no relaxed control, no grown scope) joins a batch by joint decision, with a notice to the owner. (8) Any participant, the owner account included, may post "stop" or "no" on the issue or PR. It is a reference: the orchestrator and the advisor weigh it, decide locally by joint decision and record the decision. The owner's own authorization reaches a seat locally.
|
|
8
8
|
- The diff's [Review by risk](docs/reference-configs/agentic-development-flow.md#review-by-risk) tier selects independent review; the skill defines the reviewers and their model families. Changing implementation and test assertions together does not raise the tier.
|
|
9
|
-
- Create task worktrees only at `/tmp/<repo>-wt-<slug>` (Windows: `os.tmpdir()`) with `
|
|
9
|
+
- Create task worktrees only at `/tmp/<repo>-wt-<slug>` (Windows: `os.tmpdir()`) with `rh run contract-worktree start --issue <number>`, or `git worktree add` with that path. Never create one beside the main checkout (`../`). Commit or push before a reboot or a tmp cleanup. Closeout and sweep remove only merged, clean and unowned worktrees; to keep one, give it an unmerged commit, keep it dirty, or mark or lock it.
|
|
10
10
|
- For non-trivial work, follow the global Progressive Due Diligence rule (P1 map, P2 trace, P3 decision) before design decisions or code edits.
|
|
11
11
|
- Keep root CLAUDE.md and AGENTS.md as standalone regular files; repeat shared rules in both and keep host-specific guidance separate.
|
|
12
12
|
- Read the current request and repo-local agent context, work on a branch, make bounded commits, verify once, then report the PR outcome. Finish the main task first. Fix a small problem found on the way directly; for a large problem, open a GitHub issue before you work on it.
|
|
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/`, 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 or agent-edit it, except directories listed in `operations.agent_writable_private_dirs`, which
|
|
16
|
+
- Preserve `agents/fleet/`, 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 or agent-edit it, except directories listed in `operations.agent_writable_private_dirs`, which Edit, Write and apply_patch may write; Bash only with a literal write target inside one of them; every other Bash write under `_ops/` stays denied. `_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.
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
- Avoid unnecessary secondary labels and descriptions. Let the layout do the explaining.
|
|
55
55
|
|
|
56
56
|
## Codex
|
|
57
|
-
- User-level `~/.codex/hooks.json` hooks invoke `repo-harness-hook`; its typed route registry selects one in-process handler. Operator helpers run from the package through `
|
|
57
|
+
- User-level `~/.codex/hooks.json` hooks invoke `repo-harness-hook`; its typed route registry selects one in-process handler. Operator helpers run from the package through `rh run <helper>`.
|
|
58
58
|
- Use `~/.codex/skills` as the runtime skill source; `~/.agents/skills` is staging/cache only. Keep `think`, `hunt`, `check` and `health` updates verified before runtime use.
|
|
59
59
|
- The Codex automation profile requires runtime-provided `health`, `check` and `mermaid`; do not vendor their bodies.
|
|
60
60
|
- Keep this file short; load [development flow](docs/reference-configs/agentic-development-flow.md) and [external tooling](docs/reference-configs/external-tooling.md) only when needed.
|
package/CLAUDE.md
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
- Multi-agent work follows `repo-harness-issue-flow` (`assets/skills/repo-harness-issue-flow/SKILL.md`): roles, claims, handoff, dispatch, acceptance and merge.
|
|
5
5
|
- `docs/architecture/archimap.html` is the single architecture entry. It links each module to its archctx-projected capability doc in `docs/architecture/modules/`. Change boundaries only through `repo-harness-architecture`; do not hand-write other architecture docs.
|
|
6
6
|
- The owner keeps every security decision (owner, 2026-11-09, #2008): credentials, tokens and secrets, and each change that reads, moves or exposes them; permissions (seat tool grants, network access, sandbox settings, hooks (changes to hook behavior or hook configuration; a change under `src/cli/hook/**` that changes neither takes the High review rule: two PASS rows, one different-family), confirmation bypass); the safety net (branch protection, `publication.acceptance_merge`, force push to main, the `Required / CI` definition); deletion that git cannot restore (unpushed commits, dirty worktrees, owner files outside a repository such as `~/.repo-harness`, `~/.claude` or `~/.codex` without a backup); and production: the owner's word for each release (it starts the host command list that publishes both packages to npm, creates the release tag and the GitHub Release) and each production deployment. A production deployment needs an explicit owner authorization for that deployment; no standing GO and no joint decision covers it. The life cycle goes as far as the release PR (prep, version and CHANGELOG commits, push, checks, merge by rule 2). A staging or test deployment (scratch-HOME tarball install, release dry run, prerelease environment, Windows test box) is a joint decision.
|
|
7
|
-
- Main publication is allowed only when `publication.acceptance_merge` is `on` in the policy on the PR base, and the current task explicitly authorizes main publication, or rule 2 or rule 3 applies; the skill defines who merges. Push needs task authorization. An explicit no-merge instruction that reaches a seat locally (task or pane) always wins; a no-merge comment is a reference under rule (8). Life-cycle rules (owner, 2026-11-09, #2008): (1) A fix loop continues after round 3 without the owner while each round has fewer blocking findings (P0-P2) than the round before and the scope does not grow. A grown scope is a joint decision. A new P0 finding, or a new P1 finding about security, secrets, data or authentication,
|
|
7
|
+
- Main publication is allowed only when `publication.acceptance_merge` is `on` in the policy on the PR base, and the current task explicitly authorizes main publication, or rule 2 or rule 3 applies; the skill defines who merges. Push needs task authorization. An explicit no-merge instruction that reaches a seat locally (task or pane) always wins; a no-merge comment is a reference under rule (8). Life-cycle rules (owner, 2026-11-09, #2008): (1) A fix loop continues after round 3 without the owner while each round has fewer blocking findings (P0-P2) than the round before and the scope does not grow. A grown scope is a joint decision. When the count does not drop but every open blocking finding fails closed (no fail-open and no credential or data effect; availability only), the loop continues by joint decision under one rule, also in the safety net and the hooks. A new P0 finding, or a new P1 finding about security, secrets, data or authentication, goes to the owner as a notice. The loop continues without an owner word when the fix closes the finding. It stops at the owner only when the fix for that finding would accept a residual, relax a control or grow the scope. Each merge outside rule 2, each release, each credential or permission change and each deletion that git cannot restore stay with the owner. Any other new P1 finding does not stop the loop. Round 5 is the hard stop. (2) In an owner-approved batch, a Medium or High PR merges when its acceptance record is PASS for the head, `Required / CI` passed and each review-bot comment has a response; a High PR also needs its cross-model review PASS; a Low PR that meets the Low accept-seat skip merges on `Required / CI` and its verification evidence, with no acceptance record; each PR body keeps its rollback line (a `git revert` of the squash commit unless it states another). (3) The rolling projection PR (`archctx/projection`) merges on green CI; its merge is its acceptance. (4) An owner decision that the receiving seat posts on the issue or PR authorizes the other seats, with no second confirmation in another pane. 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. (5) After the owner approves a batch parent and its plan comment, the plan's issues dispatch in plan order; a new issue or a changed order goes to the owner or to rule 7. A new issue that only closes a security gap (no accepted residual, no relaxed control, no grown scope) joins a batch by joint decision, with a notice to the owner. (6) The GitHub setting "Automatically delete head branches" deletes merged head branches only. (7) The orchestrator and the advisor make a decision that otherwise goes to the owner when both agree, unless it touches security; before the action they post it on the owning issue or PR as `Joint decision (orchestrator + advisor)` with the reason. Both seats run the same model family, so a joint decision never replaces the High-tier cross-model review. A new issue that only closes a security gap (no accepted residual, no relaxed control, no grown scope) joins a batch by joint decision, with a notice to the owner. (8) Any participant, the owner account included, may post "stop" or "no" on the issue or PR. It is a reference: the orchestrator and the advisor weigh it, decide locally by joint decision and record the decision. The owner's own authorization reaches a seat locally.
|
|
8
8
|
- The diff's [Review by risk](docs/reference-configs/agentic-development-flow.md#review-by-risk) tier selects independent review; the skill defines the reviewers and their model families. Changing implementation and test assertions together does not raise the tier.
|
|
9
|
-
- Create task worktrees only at `/tmp/<repo>-wt-<slug>` (Windows: `os.tmpdir()`) with `
|
|
9
|
+
- Create task worktrees only at `/tmp/<repo>-wt-<slug>` (Windows: `os.tmpdir()`) with `rh run contract-worktree start --issue <number>`, or `git worktree add` with that path. Never create one beside the main checkout (`../`). Commit or push before a reboot or a tmp cleanup. Closeout and sweep remove only merged, clean and unowned worktrees; to keep one, give it an unmerged commit, keep it dirty, or mark or lock it.
|
|
10
10
|
- For non-trivial work, follow the global Progressive Due Diligence rule (P1 map, P2 trace, P3 decision) before design decisions or code edits.
|
|
11
11
|
- Keep root CLAUDE.md and AGENTS.md as standalone regular files; repeat shared rules in both and keep host-specific guidance separate.
|
|
12
12
|
- Read the current request and repo-local agent context, work on a branch, make bounded commits, verify once, then report the PR outcome. Finish the main task first. Fix a small problem found on the way directly; for a large problem, open a GitHub issue before you work on it.
|
|
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/`, 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 or agent-edit it, except directories listed in `operations.agent_writable_private_dirs`, which
|
|
16
|
+
- Preserve `agents/fleet/`, 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 or agent-edit it, except directories listed in `operations.agent_writable_private_dirs`, which Edit, Write and apply_patch may write; Bash only with a literal write target inside one of them; every other Bash write under `_ops/` stays denied. `_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.
|
|
@@ -55,6 +55,6 @@
|
|
|
55
55
|
|
|
56
56
|
## Claude Code
|
|
57
57
|
- Use Claude Code's available tools within granted permissions; changes to tool grants, hooks or confirmation bypass require approval of the exact change.
|
|
58
|
-
- User-level `~/.claude/settings.json` hooks invoke `repo-harness-hook`; its typed route registry selects one in-process handler. Operator helpers run from the package through `
|
|
58
|
+
- User-level `~/.claude/settings.json` hooks invoke `repo-harness-hook`; its typed route registry selects one in-process handler. Operator helpers run from the package through `rh run <helper>`.
|
|
59
59
|
- Write comments, commits and PR text from the final diff; comments explain non-obvious reasons, and PRs describe final behavior and material rationale.
|
|
60
60
|
- Keep this file short; load [development flow](docs/reference-configs/agentic-development-flow.md) and [external tooling](docs/reference-configs/external-tooling.md) only when needed.
|
package/README.es.md
CHANGED
|
@@ -33,8 +33,8 @@ irm https://raw.githubusercontent.com/aimpact-inc/repo-harness/main/install.ps1
|
|
|
33
33
|
Si Bun ya está en el PATH, también puedes ejecutar:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
bunx repo-harness@latest install # Bun one-shot bootstrap
|
|
37
|
-
npx -y repo-harness@latest install # npx fallback; the CLI still runs on Bun
|
|
36
|
+
bunx -p repo-harness@latest rh install # Bun one-shot bootstrap
|
|
37
|
+
npx -y -p repo-harness@latest rh install # npx fallback; the CLI still runs on Bun
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## Primer comando
|
|
@@ -42,8 +42,8 @@ npx -y repo-harness@latest install # npx fallback; the CLI still runs on Bun
|
|
|
42
42
|
En la raíz del repositorio de destino, primero previsualiza y después aplica:
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
rh init --dry-run
|
|
46
|
+
rh init
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
`--dry-run` solo informa de los archivos que se crearían o refrescarían. No escribe ningún archivo.
|
package/README.fr.md
CHANGED
|
@@ -33,8 +33,8 @@ irm https://raw.githubusercontent.com/aimpact-inc/repo-harness/main/install.ps1
|
|
|
33
33
|
Si Bun est déjà dans le PATH, vous pouvez aussi lancer :
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
bunx repo-harness@latest install # Bun one-shot bootstrap
|
|
37
|
-
npx -y repo-harness@latest install # npx fallback; the CLI still runs on Bun
|
|
36
|
+
bunx -p repo-harness@latest rh install # Bun one-shot bootstrap
|
|
37
|
+
npx -y -p repo-harness@latest rh install # npx fallback; the CLI still runs on Bun
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## Première commande
|
|
@@ -42,8 +42,8 @@ npx -y repo-harness@latest install # npx fallback; the CLI still runs on Bun
|
|
|
42
42
|
À la racine du dépôt cible, prévisualisez d'abord, puis appliquez :
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
rh init --dry-run
|
|
46
|
+
rh init
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
`--dry-run` liste seulement les fichiers à créer ou à rafraîchir. Il n'écrit aucun fichier.
|
package/README.ja.md
CHANGED
|
@@ -33,8 +33,8 @@ irm https://raw.githubusercontent.com/aimpact-inc/repo-harness/main/install.ps1
|
|
|
33
33
|
Bun がすでに PATH にある場合は、次のコマンドも使えます。
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
bunx repo-harness@latest install # Bun one-shot bootstrap
|
|
37
|
-
npx -y repo-harness@latest install # npx fallback; the CLI still runs on Bun
|
|
36
|
+
bunx -p repo-harness@latest rh install # Bun one-shot bootstrap
|
|
37
|
+
npx -y -p repo-harness@latest rh install # npx fallback; the CLI still runs on Bun
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## 最初のコマンド
|
|
@@ -42,8 +42,8 @@ npx -y repo-harness@latest install # npx fallback; the CLI still runs on Bun
|
|
|
42
42
|
対象リポジトリのルートで、まずプレビューし、次に適用します。
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
rh init --dry-run
|
|
46
|
+
rh init
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
`--dry-run` は作成または更新するファイルを報告するだけで、ファイルを書き込みません。
|
package/README.md
CHANGED
|
@@ -56,12 +56,12 @@ curl -fsSL https://raw.githubusercontent.com/aimpact-inc/repo-harness/main/insta
|
|
|
56
56
|
irm https://raw.githubusercontent.com/aimpact-inc/repo-harness/main/install.ps1 | iex
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
Already have Bun? Use `bunx repo-harness@latest install` instead.
|
|
59
|
+
Already have Bun? Use `bunx -p repo-harness@latest rh install` instead.
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
62
|
# 2. From the root of the repository you want to adopt: preview, then apply
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
rh init --dry-run # reports every file it would write; writes nothing
|
|
64
|
+
rh init
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
Init ends with a `=== Migration Report ===` that lists what was created or
|
|
@@ -71,7 +71,7 @@ Claude or Codex in the repo, hand it an issue, and the hooks take over.
|
|
|
71
71
|
<details>
|
|
72
72
|
<summary><b>What <code>init</code> adds to your repository</b></summary>
|
|
73
73
|
|
|
74
|
-
From a `
|
|
74
|
+
From a `rh init --dry-run` on a fresh repository (abridged):
|
|
75
75
|
|
|
76
76
|
```text
|
|
77
77
|
your-repo/
|
|
@@ -93,7 +93,7 @@ your-repo/
|
|
|
93
93
|
└── .gitignore # one managed block appended
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
No helper scripts are copied in. Downstream repos call `
|
|
96
|
+
No helper scripts are copied in. Downstream repos call `rh run <helper>`.
|
|
97
97
|
|
|
98
98
|
</details>
|
|
99
99
|
|
|
@@ -124,8 +124,8 @@ Three layers, each with one owner:
|
|
|
124
124
|
| Layer | What lives there | Owner |
|
|
125
125
|
| --- | --- | --- |
|
|
126
126
|
| **Task authority** | Scope, claims, status, dependencies, review evidence | The GitHub issue and its PR |
|
|
127
|
-
| **Repo context** | `docs/spec.md`, `docs/prds/`, `docs/reference-configs/`, `tasks/lessons.md`, `.ai/context/`, `.ai/harness/` | Your repository (written by `
|
|
128
|
-
| **Runtime** | CLI, typed hook handlers, helpers (`
|
|
127
|
+
| **Repo context** | `docs/spec.md`, `docs/prds/`, `docs/reference-configs/`, `tasks/lessons.md`, `.ai/context/`, `.ai/harness/` | Your repository (written by `rh init`) |
|
|
128
|
+
| **Runtime** | CLI, typed hook handlers, helpers (`rh run <helper>`), skills | The globally installed package — never vendored into your repo |
|
|
129
129
|
|
|
130
130
|
The user-level adapters in `~/.claude/settings.json` and `~/.codex/hooks.json`
|
|
131
131
|
route host events into `repo-harness-hook`. For repositories that haven't opted
|
|
@@ -188,21 +188,21 @@ sequenceDiagram
|
|
|
188
188
|
|
|
189
189
|
| Goal | Command |
|
|
190
190
|
| --- | --- |
|
|
191
|
-
| Install / reconcile the global runtime | `
|
|
192
|
-
| Read-only health check | `
|
|
193
|
-
| Adopt a repository | `
|
|
194
|
-
| Run a workflow helper | `
|
|
195
|
-
| Board for a parent issue | `
|
|
196
|
-
| List open parent issues | `
|
|
197
|
-
| Open the local console (needs the `operator` plugin: `
|
|
198
|
-
| Clean up finished worktrees (needs the `operator` plugin) | `
|
|
199
|
-
| Architecture facts / review prompt | `
|
|
200
|
-
| Refactor suggestions | `
|
|
201
|
-
| Acceptance review | `
|
|
202
|
-
| Merge an accepted PR | `
|
|
203
|
-
| MCP sidecar (needs the `mcp` plugin: `
|
|
204
|
-
| Reference docs | `
|
|
205
|
-
| Remove leftovers / uninstall | `
|
|
191
|
+
| Install / reconcile the global runtime | `rh install` · `rh update` |
|
|
192
|
+
| Read-only health check | `rh update --check` · `rh setup check` |
|
|
193
|
+
| Adopt a repository | `rh init --dry-run` → `rh init` |
|
|
194
|
+
| Run a workflow helper | `rh run <helper>` |
|
|
195
|
+
| Board for a parent issue | `rh board --parent <n> --json` |
|
|
196
|
+
| List open parent issues | `rh board parents --json` |
|
|
197
|
+
| Open the local console (needs the `operator` plugin: `rh install --plugins <your plugins>,operator`) | `rh operator serve` |
|
|
198
|
+
| Clean up finished worktrees (needs the `operator` plugin) | `rh worktrees list` → `rh worktrees clean --ids … --expected-digest …` |
|
|
199
|
+
| Architecture facts / review prompt | `rh module list --json` · `rh module review-prompt <capability> --json` |
|
|
200
|
+
| Refactor suggestions | `rh refactor recommendations` · `rh refactor decide <id> accept\|defer\|reject --reason "…"` |
|
|
201
|
+
| Acceptance review | `rh review round\|status\|close …` ([details](docs/usage.md#persistent-acceptance-review)) |
|
|
202
|
+
| Merge an accepted PR | `rh publication merge` ([policy](docs/control-bot-boundary.md#bot-modes-and-merge)) |
|
|
203
|
+
| MCP sidecar (needs the `mcp` plugin: `rh install --plugins <your plugins>,mcp`) | `rh mcp serve --repo . --profile planner` · `rh mcp doctor --repo .` |
|
|
204
|
+
| Reference docs | `rh docs list` · `rh docs show harness-overview` |
|
|
205
|
+
| Remove leftovers / uninstall | `rh upgrade [--apply]` · `rh uninstall --dry-run` |
|
|
206
206
|
|
|
207
207
|
## Reviewing agent work
|
|
208
208
|
|
|
@@ -235,7 +235,7 @@ flowchart LR
|
|
|
235
235
|
|
|
236
236
|
## Operator console
|
|
237
237
|
|
|
238
|
-
`
|
|
238
|
+
`rh operator serve` starts a local web board on loopback only. It
|
|
239
239
|
shows what needs you, what to continue, stage counts and today's merges across
|
|
240
240
|
every registered repository. It needs the `operator` plugin, which an `all`
|
|
241
241
|
selection includes.
|
|
@@ -285,7 +285,7 @@ commands. More in the [usage guide](docs/usage.md#skills).
|
|
|
285
285
|
- Not a hosted agent gateway, product runtime or database service.
|
|
286
286
|
- Not a replacement for your repo's build, test, deploy or release process.
|
|
287
287
|
- Not a scheduler: it never dispatches work on its own or executes refactors.
|
|
288
|
-
- Not vendored: downstream repos call `
|
|
288
|
+
- Not vendored: downstream repos call `rh run <helper>`; no helper
|
|
289
289
|
scripts are copied into them.
|
|
290
290
|
|
|
291
291
|
## Documentation
|
|
@@ -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.33.0` · workflow stamp `repo-harness@0.33.0+template@0.33.0`
|
|
335
335
|
- History: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
336
336
|
- License: MIT — see [`LICENSE`](LICENSE)
|
package/README.zh-CN.md
CHANGED
|
@@ -33,8 +33,8 @@ irm https://raw.githubusercontent.com/aimpact-inc/repo-harness/main/install.ps1
|
|
|
33
33
|
如果 Bun 已经在 PATH 上,也可以直接运行:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
bunx repo-harness@latest install # Bun one-shot bootstrap
|
|
37
|
-
npx -y repo-harness@latest install # npx fallback; the CLI still runs on Bun
|
|
36
|
+
bunx -p repo-harness@latest rh install # Bun one-shot bootstrap
|
|
37
|
+
npx -y -p repo-harness@latest rh install # npx fallback; the CLI still runs on Bun
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## 第一条命令
|
|
@@ -42,8 +42,8 @@ npx -y repo-harness@latest install # npx fallback; the CLI still runs on Bun
|
|
|
42
42
|
在目标仓库根目录先预览,再应用:
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
rh init --dry-run
|
|
46
|
+
rh init
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
`--dry-run` 只报告将要创建或刷新的文件,不写入任何文件。
|
package/SKILL.md
CHANGED
|
@@ -12,7 +12,7 @@ The PM coordinates work. Coding agents own source edits, tests and repairs.
|
|
|
12
12
|
GrokBot init: [bot onboarding](docs/bot-onboarding.md).
|
|
13
13
|
This role applies to Grok, Hermes, Dot and other Bot hosts. It does not restrict
|
|
14
14
|
an explicitly assigned coding worker or a direct development session.
|
|
15
|
-
Use `
|
|
15
|
+
Use `rh state resolve --json` when active harness state is needed.
|
|
16
16
|
Treat the returned state as authority; load only the files it names.
|
|
17
17
|
Load the required `herdr` skill before controlling Herdr panes or agents.
|
|
18
18
|
Discover panes by task path, then use explicit targets.
|
package/assets/AGENTS.md
CHANGED
|
@@ -26,3 +26,16 @@ Owns the package workflow contract, repo opt-in marker, templates, capability no
|
|
|
26
26
|
- `bun scripts/capability-resolver.ts validate --format text`
|
|
27
27
|
- `bun run check:helpers`
|
|
28
28
|
<!-- END CAPABILITY CONTEXT -->
|
|
29
|
+
|
|
30
|
+
<!-- BEGIN ARCHCONTEXT AGENT CONTEXT id="capability.workflow-engine.contract-assets" rendererVersion="archcontext.agent-context-renderer/v2" outputDigest="sha256:90c741e172d323849052c9de68df15df33ba25a4b3e1fe7b4148abd7810ac102" -->
|
|
31
|
+
# Agent Context: Contract Assets
|
|
32
|
+
|
|
33
|
+
- id: `capability.workflow-engine.contract-assets`
|
|
34
|
+
- kind: `capability`
|
|
35
|
+
- summary: Owns the package workflow contract, repo opt-in marker, templates, capability nodes, and the standalone resolver helper file.
|
|
36
|
+
- source.include: `agents/fleet/**`, `.codex/agents/**`, `scripts/install-agent-fleet.sh`, `assets/workflow-contract.v1.json`, `.ai/context/**`, `.archcontext/model/nodes/**`, `scripts/capability-resolver.ts`, `scripts/capability-config.ts`, `scripts/contract-worktree.sh`, `scripts/merge-gate.ts`, `scripts/ship-worktrees.sh`, `assets/templates/**`, `assets/reference-configs/**`, `docs/reference-configs/**`, `assets/AGENTS.md`, `assets/CLAUDE.md`, `.archcontext/**`, `docs/adr/**`, `src/core/capabilities/**`, `assets/project-structures/**`, `assets/plan-map.json`, `assets/versions.json`, `.claude/templates/**`, `scripts/workflow-contract.ts`, `scripts/check-context-map.ts`, `scripts/check-context-files.sh`, `scripts/select-agent-context-blocks.sh`, `scripts/sync-reference-configs.ts`, `scripts/contract-worktree-runtime.ts`, `scripts/worktree-merge-lib.sh`, `scripts/cutover-closure.ts`, `scripts/new-spec.sh`, `scripts/summarize-failures.sh`, `scripts/maintenance-triage.sh`, `scripts/heartbeat-triage.sh`, `scripts/check-deploy-sql-order.sh`, `scripts/factor-lab-new.sh`, `scripts/factor-lab-promote.sh`, `scripts/factor-lab-reject.sh`, `scripts/factor-lab-check.sh`
|
|
37
|
+
- source.exclude: `assets/reference-configs/external-tooling.md`, `docs/reference-configs/external-tooling.md`, `docs/reference-configs/install-profiles.md`, `docs/reference-configs/chatgpt-coding-mcp.md`, `docs/architecture/**`, `docs/researches/**`, `.ai/harness/**`, `docs/design/**`, `references/plugins-core.md`
|
|
38
|
+
- extensions.lspProfile: `typescript-lsp`
|
|
39
|
+
- extensions.verification: `bun run test:files tests/install-agent-fleet.test.ts --timeout 60000 --max-concurrency 1`, `bun test tests/workflow-contract.test.ts tests/scaffold-parity.test.ts`, `bun scripts/capability-resolver.ts validate --format text`, `bun run check:helpers`
|
|
40
|
+
- extensions digest: sha256:d5fffb6e85afb214469388a99a430077d4946e04e881c4877b0f5d4a104e128e
|
|
41
|
+
<!-- END ARCHCONTEXT AGENT CONTEXT id="capability.workflow-engine.contract-assets" -->
|
package/assets/CLAUDE.md
CHANGED
|
@@ -26,3 +26,16 @@ Owns the package workflow contract, repo opt-in marker, templates, capability no
|
|
|
26
26
|
- `bun scripts/capability-resolver.ts validate --format text`
|
|
27
27
|
- `bun run check:helpers`
|
|
28
28
|
<!-- END CAPABILITY CONTEXT -->
|
|
29
|
+
|
|
30
|
+
<!-- BEGIN ARCHCONTEXT AGENT CONTEXT id="capability.workflow-engine.contract-assets" rendererVersion="archcontext.agent-context-renderer/v2" outputDigest="sha256:90c741e172d323849052c9de68df15df33ba25a4b3e1fe7b4148abd7810ac102" -->
|
|
31
|
+
# Agent Context: Contract Assets
|
|
32
|
+
|
|
33
|
+
- id: `capability.workflow-engine.contract-assets`
|
|
34
|
+
- kind: `capability`
|
|
35
|
+
- summary: Owns the package workflow contract, repo opt-in marker, templates, capability nodes, and the standalone resolver helper file.
|
|
36
|
+
- source.include: `agents/fleet/**`, `.codex/agents/**`, `scripts/install-agent-fleet.sh`, `assets/workflow-contract.v1.json`, `.ai/context/**`, `.archcontext/model/nodes/**`, `scripts/capability-resolver.ts`, `scripts/capability-config.ts`, `scripts/contract-worktree.sh`, `scripts/merge-gate.ts`, `scripts/ship-worktrees.sh`, `assets/templates/**`, `assets/reference-configs/**`, `docs/reference-configs/**`, `assets/AGENTS.md`, `assets/CLAUDE.md`, `.archcontext/**`, `docs/adr/**`, `src/core/capabilities/**`, `assets/project-structures/**`, `assets/plan-map.json`, `assets/versions.json`, `.claude/templates/**`, `scripts/workflow-contract.ts`, `scripts/check-context-map.ts`, `scripts/check-context-files.sh`, `scripts/select-agent-context-blocks.sh`, `scripts/sync-reference-configs.ts`, `scripts/contract-worktree-runtime.ts`, `scripts/worktree-merge-lib.sh`, `scripts/cutover-closure.ts`, `scripts/new-spec.sh`, `scripts/summarize-failures.sh`, `scripts/maintenance-triage.sh`, `scripts/heartbeat-triage.sh`, `scripts/check-deploy-sql-order.sh`, `scripts/factor-lab-new.sh`, `scripts/factor-lab-promote.sh`, `scripts/factor-lab-reject.sh`, `scripts/factor-lab-check.sh`
|
|
37
|
+
- source.exclude: `assets/reference-configs/external-tooling.md`, `docs/reference-configs/external-tooling.md`, `docs/reference-configs/install-profiles.md`, `docs/reference-configs/chatgpt-coding-mcp.md`, `docs/architecture/**`, `docs/researches/**`, `.ai/harness/**`, `docs/design/**`, `references/plugins-core.md`
|
|
38
|
+
- extensions.lspProfile: `typescript-lsp`
|
|
39
|
+
- extensions.verification: `bun run test:files tests/install-agent-fleet.test.ts --timeout 60000 --max-concurrency 1`, `bun test tests/workflow-contract.test.ts tests/scaffold-parity.test.ts`, `bun scripts/capability-resolver.ts validate --format text`, `bun run check:helpers`
|
|
40
|
+
- extensions digest: sha256:d5fffb6e85afb214469388a99a430077d4946e04e881c4877b0f5d4a104e128e
|
|
41
|
+
<!-- END ARCHCONTEXT AGENT CONTEXT id="capability.workflow-engine.contract-assets" -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// GitHub App webhook receiver. It filters GitHub events in code and sends a short bot event
|
|
2
2
|
// to the Bot routine webhook. It never calls a GitHub API and makes no decision.
|
|
3
|
-
// `
|
|
3
|
+
// `rh events install` stages this directory, and wrangler bundles it.
|
|
4
4
|
import { botEvent } from './bot-event.mjs';
|
|
5
5
|
import { classify } from './filter.mjs';
|
|
6
6
|
|
|
@@ -45,7 +45,7 @@ Manual probe: to see what named test files do on one runner for a branch head, d
|
|
|
45
45
|
- Name each PR, branch, task and agent by a name that the human knows. Leave out hashes, paths, commands and test counts unless the human needs one to act.
|
|
46
46
|
- Give each thread exactly one status tag. The tags are `[merged #N]`, `[open PR #N]`, `[in flight <branch>]`, `[verified, uncommitted]`, `[reverted #N]`, `[planned, not started]` and `[blocked: <reason>]`. A thread with no tag is not done.
|
|
47
47
|
- Say what changed for the human, not how the Bot did it. Give the source of each fact or mark it as an inference. Keep planned, dispatched, implemented, verified, merged and released states distinct.
|
|
48
|
-
- When the task has a decision trail (`
|
|
48
|
+
- When the task has a decision trail (`rh run decision-trail render`) and the work ran unattended, end the reply with an `Attention` section. Name the reviewer model on the first line. The reviewer must be a different model from the one that did the work. List decisions with weak or missing evidence, verification that the work claims without proof, and choices that look risky in hindsight. "No flags" is a valid value.
|
|
49
49
|
- Adapted from the pstack ketchup and recall skills (cursor/plugins, MIT, Lauren Tan).
|
|
50
50
|
|
|
51
51
|
## Lessons Retro
|
|
@@ -54,7 +54,7 @@ Manual probe: to see what named test files do on one runner for a branch head, d
|
|
|
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
|
- Each night, review the default-branch history after the watermark: `git log --first-parent <watermark>..origin/main`. Skip commits that change only `tasks/lessons.md`.
|
|
56
56
|
- 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
|
-
- Add at most one entry for each theme on one day. Keep the fields that `
|
|
57
|
+
- 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
58
|
|
|
59
59
|
```markdown
|
|
60
60
|
- Date: <YYYY-MM-DD>
|
|
@@ -112,7 +112,7 @@ runtime or task authority.
|
|
|
112
112
|
|
|
113
113
|
The orchestrator seat is the long-lived coordinator and integrator seat of
|
|
114
114
|
`repo-harness-issue-flow`. Start it with the argv that
|
|
115
|
-
`
|
|
115
|
+
`rh seats argv orchestrator` prints. It dispatches work and follows
|
|
116
116
|
PRs and CI. It edits no product code. It may call the read-only roles
|
|
117
117
|
`explorer` and `deep-reasoner` as sub-agents. The gatekeeper, the writers
|
|
118
118
|
(`fast-worker`, `deep-worker`, `root-cause-prover`) and the Codex
|
|
@@ -173,7 +173,7 @@ not limited to the two named above.
|
|
|
173
173
|
|
|
174
174
|
The chosen direction feeds the design-brief template (the repository's own
|
|
175
175
|
`.claude/templates/design-brief.template.md` when present, otherwise
|
|
176
|
-
`
|
|
176
|
+
`rh docs path design-brief.template`) /
|
|
177
177
|
frontend `task_profile` gate as its decided direction — this convention does
|
|
178
178
|
not duplicate that checklist.
|
|
179
179
|
|
|
@@ -18,8 +18,8 @@ Create these only when the agent has concrete repo evidence or the user asks:
|
|
|
18
18
|
- `docs/decisions.md`: accepted architecture decisions with trade-offs.
|
|
19
19
|
- Mermaid fenced blocks in `docs/architecture/modules/**.md`: semantic diagram source for agents and review diffs.
|
|
20
20
|
- `docs/packages.md`: package inventory for real multi-package repos.
|
|
21
|
-
- `docs/prds/*.prd.md`: upper-layer PRDs generated through `repo-harness-product`'s PRD mode from the repository's own `docs/prds/prd.template.md` when present, otherwise from `
|
|
22
|
-
- `docs/prds/DESIGN-*.md`: optional design briefs generated from the repository's own `.claude/templates/design-brief.template.md` when present, otherwise from `
|
|
21
|
+
- `docs/prds/*.prd.md`: upper-layer PRDs generated through `repo-harness-product`'s PRD mode from the repository's own `docs/prds/prd.template.md` when present, otherwise from `rh docs path prd.template`.
|
|
22
|
+
- `docs/prds/DESIGN-*.md`: optional design briefs generated from the repository's own `.claude/templates/design-brief.template.md` when present, otherwise from `rh docs path design-brief.template`, when the task requests design work.
|
|
23
23
|
|
|
24
24
|
## Rules
|
|
25
25
|
|