repo-harness 0.9.2 → 0.11.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 +16 -9
- package/CLAUDE.md +16 -9
- package/README.es.md +106 -98
- package/README.fr.md +112 -105
- package/README.ja.md +99 -93
- package/README.md +158 -134
- package/README.zh-CN.md +101 -104
- package/SKILL.md +15 -404
- package/agents/fleet/deep-reasoner.md +14 -0
- package/agents/fleet/explorer.md +17 -0
- package/agents/fleet/fast-worker.md +14 -0
- package/agents/fleet/gatekeeper.md +17 -0
- package/agents/fleet/harness-evaluator.md +16 -0
- package/agents/fleet/root-cause-prover.md +17 -0
- package/assets/AGENTS.md +14 -6
- package/assets/CLAUDE.md +14 -6
- package/assets/hooks/AGENTS.md +7 -7
- package/assets/hooks/CLAUDE.md +7 -7
- package/assets/hooks/lib/workflow-state.sh +351 -496
- package/assets/hooks/projection.json +1 -3
- package/assets/initializer-question-pack.v4.json +2 -3
- package/assets/partials/04-project-structure.partial.md +4 -4
- package/assets/partials/05-workflow.partial.md +4 -6
- package/assets/partials/08-orchestration.partial.md +1 -1
- package/assets/partials-agents/02-operating-mode.partial.md +4 -4
- package/assets/partials-agents/03-orchestration.partial.md +1 -1
- package/assets/partials-agents/04-task-protocol.partial.md +2 -2
- package/assets/partials-agents/08-deep-docs.partial.md +3 -3
- package/assets/reference-configs/agentic-development-flow.md +47 -29
- package/assets/reference-configs/ai-workflows.md +0 -1
- package/assets/reference-configs/changelog-versioning.md +0 -1
- package/assets/reference-configs/coding-standards.md +0 -1
- package/assets/reference-configs/design-options.md +244 -0
- package/assets/reference-configs/development-protocol.md +0 -1
- package/assets/reference-configs/document-generation.md +2 -2
- package/assets/reference-configs/evaluator-rubric.md +0 -1
- package/assets/reference-configs/external-tooling.md +156 -127
- package/assets/reference-configs/git-strategy.md +0 -1
- package/assets/reference-configs/global-working-rules.md +28 -2
- package/assets/reference-configs/harness-overview.md +77 -9
- package/assets/reference-configs/hook-operations.md +94 -74
- package/assets/reference-configs/minimal-change-hooks.md +17 -15
- package/assets/reference-configs/release-deploy.md +1 -2
- package/assets/reference-configs/spa-day-protocol.md +0 -2
- package/assets/reference-configs/sprint-contracts.md +86 -6
- package/assets/reference-configs/ux-feature-guard.md +144 -0
- package/assets/reference-configs/workflow-orchestration.md +0 -1
- package/assets/skill-commands/AGENTS.md +3 -0
- package/assets/skill-commands/CLAUDE.md +3 -0
- package/assets/skill-commands/manifest.json +416 -88
- package/assets/skill-commands/repo-harness-architecture/SKILL.md +2 -1
- package/assets/skill-commands/repo-harness-check/SKILL.md +3 -8
- package/assets/skill-commands/repo-harness-check/references/deploy-readiness.md +30 -0
- package/assets/skill-version.json +15 -3
- package/assets/skills/claude-plan/SKILL.md +263 -0
- package/assets/skills/repo-harness-chatgpt/SKILL.md +29 -0
- package/assets/skills/repo-harness-chatgpt/references/bridge.md +169 -0
- package/assets/skills/repo-harness-chatgpt/references/consult.md +85 -0
- package/assets/skills/repo-harness-chatgpt/references/continue.md +57 -0
- package/assets/skills/repo-harness-chatgpt/references/read-back.md +87 -0
- package/assets/skills/repo-harness-chatgpt/references/setup.md +92 -0
- package/assets/skills/repo-harness-cross-review/SKILL.md +37 -0
- package/assets/skills/repo-harness-cross-review/references/claude-mode.md +38 -0
- package/assets/skills/repo-harness-cross-review/references/codex-mode.md +29 -0
- package/assets/skills/repo-harness-plan/SKILL.md +26 -0
- package/assets/{skill-commands/repo-harness-plan/SKILL.md → skills/repo-harness-plan/references/create.md} +11 -15
- package/assets/{skill-commands/repo-harness-review/SKILL.md → skills/repo-harness-plan/references/review.md} +8 -12
- package/assets/skills/repo-harness-product/SKILL.md +29 -0
- package/assets/{skill-commands/repo-harness-goal/SKILL.md → skills/repo-harness-product/references/goal.md} +20 -21
- package/assets/{skill-commands/repo-harness-prd/SKILL.md → skills/repo-harness-product/references/prd.md} +29 -28
- package/assets/{skill-commands/repo-harness-sprint/SKILL.md → skills/repo-harness-product/references/sprint.md} +15 -17
- package/assets/skills/repo-harness-setup/SKILL.md +34 -0
- package/assets/skills/repo-harness-setup/references/adopt-init.md +21 -0
- package/assets/skills/repo-harness-setup/references/capability.md +27 -0
- package/assets/skills/repo-harness-setup/references/migrate.md +30 -0
- package/assets/skills/repo-harness-setup/references/repair.md +22 -0
- package/assets/{skill-commands/repo-harness-scaffold/SKILL.md → skills/repo-harness-setup/references/scaffold.md} +6 -12
- package/assets/skills/repo-harness-setup/references/upgrade.md +29 -0
- package/assets/templates/contract.template.md +16 -7
- package/assets/templates/design-brief.template.md +63 -4
- package/assets/templates/helpers/acceptance-receipt.ts +859 -0
- package/assets/templates/helpers/architecture-event.ts +15 -2
- package/assets/templates/helpers/architecture-queue.sh +8 -2
- package/assets/templates/helpers/archive-architecture-request.sh +168 -28
- package/assets/templates/helpers/archive-workflow.sh +301 -20
- package/assets/templates/helpers/capability-config.ts +12 -5
- package/assets/templates/helpers/capability-resolver.ts +521 -237
- package/assets/templates/helpers/capture-plan.sh +5 -8
- package/assets/templates/helpers/check-agent-tooling.sh +310 -334
- package/assets/templates/helpers/check-architecture-sync.sh +11 -4
- package/assets/templates/helpers/check-brain-manifest.sh +0 -7
- package/assets/templates/helpers/check-context-files.sh +0 -0
- package/assets/templates/helpers/check-deploy-sql-order.sh +330 -54
- package/assets/templates/helpers/check-skill-version.ts +0 -0
- package/assets/templates/helpers/check-task-sync.sh +5 -0
- package/assets/templates/helpers/check-task-workflow.sh +8 -20
- package/assets/templates/helpers/codex-handoff-resume.sh +21 -223
- package/assets/templates/helpers/contract-run.ts +206 -32
- package/assets/templates/helpers/contract-worktree.sh +405 -56
- package/assets/templates/helpers/ensure-task-workflow.sh +141 -58
- package/assets/templates/helpers/harness-trace-grade.sh +21 -18
- package/assets/templates/helpers/heartbeat-triage.sh +6 -1
- package/assets/templates/helpers/install-agent-fleet.sh +141 -76
- package/assets/templates/helpers/maintenance-triage.sh +0 -0
- package/assets/templates/helpers/merge-gate.ts +545 -0
- package/assets/templates/helpers/new-plan.sh +2 -2
- package/assets/templates/helpers/new-spec.sh +0 -0
- package/assets/templates/helpers/new-sprint.sh +0 -0
- package/assets/templates/helpers/plan-to-todo.sh +42 -22
- package/assets/templates/helpers/prepare-codex-handoff.sh +17 -163
- package/assets/templates/helpers/prepare-handoff.sh +0 -0
- package/assets/templates/helpers/recovery-view-cli.ts +833 -0
- package/assets/templates/helpers/refresh-current-status.sh +19 -19
- package/assets/templates/helpers/run-bounded-verifier-command.ts +136 -0
- package/assets/templates/helpers/ship-worktrees.sh +176 -53
- package/assets/templates/helpers/sprint-backlog.sh +6 -1
- package/assets/templates/helpers/summarize-failures.sh +0 -0
- package/assets/templates/helpers/switch-plan.sh +2 -5
- package/assets/templates/helpers/validate-harness-profile-benchmark.ts +39 -0
- package/assets/templates/helpers/verify-contract.sh +248 -20
- package/assets/templates/helpers/verify-sprint.sh +401 -160
- package/assets/templates/helpers/workflow-contract.ts +117 -30
- package/assets/templates/helpers/workstream-sync.sh +8 -2
- package/assets/templates/plan.template.md +2 -2
- package/assets/templates/prd.template.md +1 -1
- package/assets/templates/review.template.md +25 -13
- package/assets/workflow-contract.v1.json +108 -7
- package/install.ps1 +21 -5
- package/install.sh +28 -4
- package/interfaces/effective-state-v1.ts +1 -0
- package/interfaces/types.ts +7 -0
- package/package.json +12 -6
- package/references/handoff.md +28 -0
- package/references/workflow-packaging-rubric.md +19 -0
- package/scripts/AGENTS.md +10 -2
- package/scripts/CLAUDE.md +10 -2
- package/scripts/acceptance-receipt.ts +859 -0
- package/scripts/architecture-event.ts +15 -2
- package/scripts/architecture-queue.sh +8 -2
- package/scripts/archive-architecture-request.sh +168 -28
- package/scripts/archive-workflow.sh +301 -20
- package/scripts/capability-config.ts +12 -5
- package/scripts/capability-resolver.ts +65 -248
- package/scripts/capture-plan.sh +5 -8
- package/scripts/check-agent-tooling.sh +310 -334
- package/scripts/check-architecture-sync.sh +11 -4
- package/scripts/check-brain-manifest.sh +0 -7
- package/scripts/check-ci.sh +7 -1
- package/scripts/check-deploy-sql-order.sh +330 -54
- package/scripts/check-npm-release.sh +1 -0
- package/scripts/check-state-boundaries.ts +809 -0
- package/scripts/check-tarball-install-smoke.sh +151 -59
- package/scripts/check-task-sync.sh +5 -0
- package/scripts/check-task-workflow.sh +8 -20
- package/scripts/codex-handoff-resume.sh +21 -223
- package/scripts/contract-run.ts +206 -32
- package/scripts/contract-worktree.sh +405 -56
- package/scripts/create-project-dirs.sh +3 -2
- package/scripts/emit-verify-evidence.ts +158 -0
- package/scripts/ensure-task-workflow.sh +141 -58
- package/scripts/harness-trace-grade.sh +21 -18
- package/scripts/heartbeat-triage.sh +6 -1
- package/scripts/hook-dispatch-diet-report.ts +374 -138
- package/scripts/init-project.sh +3 -2
- package/scripts/install-agent-fleet.sh +141 -76
- package/scripts/lib/project-init-lib.sh +151 -213
- package/scripts/merge-gate.ts +545 -0
- package/scripts/new-plan.sh +2 -2
- package/scripts/plan-to-todo.sh +42 -22
- package/scripts/prepare-codex-handoff.sh +17 -163
- package/scripts/recovery-view-cli.ts +833 -0
- package/scripts/refresh-current-status.sh +19 -19
- package/scripts/run-bdd2-evals.ts +1368 -0
- package/scripts/run-bounded-verifier-command.ts +136 -0
- package/scripts/run-harness-profile-benchmark.ts +1434 -0
- package/scripts/run-skill-evals.ts +498 -36
- package/scripts/run-skill-routing-eval.ts +1601 -0
- package/scripts/session-context-packet-panel.ts +560 -0
- package/scripts/ship-worktrees.sh +176 -53
- package/scripts/skill-surface-select.ts +105 -0
- package/scripts/sprint-backlog.sh +6 -1
- package/scripts/switch-plan.sh +2 -5
- package/scripts/sync-codex-installed-copies.sh +235 -31
- package/scripts/sync-helper-sources.ts +198 -0
- package/scripts/sync-hook-sources.ts +96 -113
- package/scripts/validate-harness-profile-benchmark.ts +39 -0
- package/scripts/verify-contract.sh +248 -20
- package/scripts/verify-sprint.sh +401 -160
- package/scripts/workflow-contract.ts +117 -30
- package/scripts/workstream-sync.sh +8 -2
- package/src/cli/chatgpt-browser/file-policy.ts +6 -27
- package/src/cli/commands/adopt-plan.ts +80 -111
- package/src/cli/commands/capability-context.ts +2 -12
- package/src/cli/commands/cross-review.ts +80 -0
- package/src/cli/commands/doctor.ts +12 -23
- package/src/cli/commands/global-runtime.ts +312 -62
- package/src/cli/commands/hook.ts +7 -9
- package/src/cli/commands/init-hook.ts +11 -0
- package/src/cli/commands/init.ts +188 -86
- package/src/cli/commands/install.ts +3 -1
- package/src/cli/commands/mcp.ts +52 -4
- package/src/cli/commands/migrate.ts +10 -40
- package/src/cli/commands/prompt-guard-decision.ts +2 -0
- package/src/cli/commands/run.ts +19 -1
- package/src/cli/commands/state.ts +124 -0
- package/src/cli/commands/status.ts +55 -1
- package/src/cli/commands/validators.ts +1 -1
- package/src/cli/hook/circuit-breaker.ts +278 -0
- package/src/cli/hook/command-observed.ts +259 -0
- package/src/cli/hook/delegation-state.ts +328 -0
- package/src/cli/hook/event-telemetry.ts +313 -0
- package/src/cli/hook/handler-contract.ts +39 -0
- package/src/cli/hook/handler-registry.ts +121 -0
- package/src/cli/hook/hook-input.ts +230 -0
- package/src/cli/hook/legacy-active-plan-migration.ts +88 -0
- package/src/cli/hook/minimal-change-context.ts +4 -2
- package/src/cli/hook/mutation-guard.ts +1062 -0
- package/src/cli/hook/mutation-observed.ts +902 -0
- package/src/cli/hook/prompt-guard-decision.ts +13 -4
- package/src/cli/hook/prompt-handler.ts +800 -0
- package/src/cli/hook/prompt-intents.ts +16 -5
- package/src/cli/hook/prompt-router.ts +75 -0
- package/src/cli/hook/review-subject.ts +45 -0
- package/src/cli/hook/route-registry.ts +32 -21
- package/src/cli/hook/runtime.ts +334 -312
- package/src/cli/hook/session-context-budget.ts +397 -0
- package/src/cli/hook/session-context.ts +1405 -0
- package/src/cli/hook/state-snapshot.ts +2 -363
- package/src/cli/hook/stop-handler.ts +570 -0
- package/src/cli/hook/subagent-handler.ts +697 -0
- package/src/cli/hook/trace-observer.ts +202 -0
- package/src/cli/hook-entry.ts +57 -15
- package/src/cli/index.ts +221 -113
- package/src/cli/installer/install-profile.ts +1026 -0
- package/src/cli/installer/managed-entries.ts +25 -13
- package/src/cli/installer/targets/claude.ts +2 -2
- package/src/cli/installer/targets/codex.ts +2 -2
- package/src/cli/installer/types.ts +3 -1
- package/src/cli/mcp/auth.ts +27 -16
- package/src/cli/mcp/codegraph-adapter.ts +42 -11
- package/src/cli/mcp/coding-tools.ts +640 -0
- package/src/cli/mcp/coding-workspaces.ts +495 -0
- package/src/cli/mcp/general-repo-access/authority.ts +580 -0
- package/src/cli/mcp/general-repo-access.ts +33 -613
- package/src/cli/mcp/instructions.ts +7 -2
- package/src/cli/mcp/oauth.ts +179 -30
- package/src/cli/mcp/policy.ts +24 -27
- package/src/cli/mcp/process-sessions.ts +764 -0
- package/src/cli/mcp/reader-tools.ts +14 -204
- package/src/cli/mcp/server.ts +126 -21
- package/src/cli/mcp/setup.ts +419 -269
- package/src/cli/mcp/state-tools.ts +164 -0
- package/src/cli/mcp/tools.ts +41 -52
- package/src/cli/mcp/transports/http.ts +330 -75
- package/src/cli/mcp/types.ts +10 -9
- package/src/cli/repo-adoption/target.ts +58 -0
- package/src/cli/runtime/helper-runner.ts +329 -46
- package/src/cli/runtime/write-all-sync.ts +26 -0
- package/src/core/adoption/gitignore-plan.ts +6 -0
- package/src/{effects → core/adoption}/managed-block.ts +1 -1
- package/src/core/adoption/managed-hook-config.ts +85 -0
- package/src/core/adoption/operations.ts +4 -0
- package/src/core/adoption/plan.ts +32 -120
- package/src/core/adoption/rollback.ts +20 -0
- package/src/core/adoption/source-checkout.ts +43 -0
- package/src/core/adoption/standard-plan.ts +829 -0
- package/src/core/capabilities/registry.ts +474 -0
- package/src/core/evidence/canonical-json.ts +26 -0
- package/src/core/evidence/checkpoint.ts +278 -0
- package/src/core/evidence/fold.ts +135 -0
- package/src/core/evidence/idempotency.ts +42 -0
- package/src/core/evidence/json-walk.ts +47 -0
- package/src/core/evidence/payload-cap.ts +18 -0
- package/src/core/evidence/redaction.ts +209 -0
- package/src/core/evidence/types.ts +74 -0
- package/src/core/evidence/ulid.ts +69 -0
- package/src/core/loop/loop-event-protocol.ts +211 -0
- package/src/core/review/cross-review.ts +300 -0
- package/src/core/skill-surface/catalog.ts +761 -0
- package/src/core/skill-surface/profile-components.ts +44 -0
- package/src/core/source-projection.ts +228 -0
- package/src/core/state/artifact-parsers.ts +167 -0
- package/src/core/state/project-effective-state.ts +402 -0
- package/src/core/state/project-state-snapshot.ts +45 -0
- package/src/core/state/types.ts +131 -0
- package/src/core/workflow/artifact-requirement-policy.ts +239 -0
- package/src/core/workflow/operation-readiness.ts +310 -0
- package/src/core/workflow/profile.ts +310 -0
- package/src/effects/evidence/atomic-append.ts +59 -0
- package/src/effects/evidence/attested-import.ts +320 -0
- package/src/effects/evidence/blob-store.ts +74 -0
- package/src/effects/evidence/checkpoint-store.ts +452 -0
- package/src/effects/evidence/checks-materializer.ts +277 -0
- package/src/effects/evidence/epoch.ts +9 -0
- package/src/effects/evidence/event-log.ts +132 -0
- package/src/effects/evidence/event-writer.ts +124 -0
- package/src/effects/evidence/paths.ts +28 -0
- package/src/effects/evidence/post-bash-importer.ts +345 -0
- package/src/effects/evidence/recovery-materializer.ts +850 -0
- package/src/effects/evidence/secret-env.ts +16 -0
- package/src/effects/evidence/verify-producer.ts +360 -0
- package/src/effects/expensive-run-lock.ts +19 -0
- package/src/effects/fs-transaction.ts +366 -24
- package/src/effects/git/common-directory.ts +14 -0
- package/src/effects/locking/exclusive-directory-lock.ts +415 -0
- package/src/effects/loop/state-input-collector.ts +169 -0
- package/src/effects/process-group-launcher.ts +84 -0
- package/src/effects/process-runner.ts +189 -18
- package/src/effects/process-supervisor.ts +468 -0
- package/src/effects/repo-registry.ts +248 -26
- package/src/effects/review/cross-review-runner.ts +367 -0
- package/src/{cli/hook → effects/review}/diff-fingerprint.ts +147 -144
- package/src/effects/state/collect-state-inputs.ts +129 -0
- package/src/effects/state/git-state-version-store.ts +165 -0
- package/src/effects/state/resolve-effective-state.ts +686 -0
- package/src/effects/state/state-cache.ts +80 -0
- package/src/effects/state/state-lock.ts +7 -0
- package/.agents/skills/repo-harness-chatgpt-browser/SKILL.md +0 -112
- package/assets/hooks/anti-simplification.sh +0 -12
- package/assets/hooks/changelog-guard.sh +0 -80
- package/assets/hooks/codex-delegation-advisor.sh +0 -214
- package/assets/hooks/codex.hooks.template.json +0 -77
- package/assets/hooks/first-principles-guard.sh +0 -72
- package/assets/hooks/hook-input.sh +0 -618
- package/assets/hooks/lib/minimal-change.sh +0 -77
- package/assets/hooks/lib/session-state.sh +0 -106
- package/assets/hooks/minimal-change-context.sh +0 -16
- package/assets/hooks/minimal-change-observer.sh +0 -18
- package/assets/hooks/post-bash.sh +0 -215
- package/assets/hooks/post-edit-guard.sh +0 -273
- package/assets/hooks/post-tool-observer.sh +0 -99
- package/assets/hooks/pre-edit-guard.sh +0 -240
- package/assets/hooks/prompt-guard.sh +0 -1291
- package/assets/hooks/run-hook.sh +0 -124
- package/assets/hooks/security-sentinel.sh +0 -115
- package/assets/hooks/session-start-context.sh +0 -581
- package/assets/hooks/settings.template.json +0 -62
- package/assets/hooks/stop-orchestrator.sh +0 -463
- package/assets/hooks/subagent-return-channel-guard.sh +0 -107
- package/assets/hooks/subagent-start-context.sh +0 -132
- package/assets/hooks/subagent-stop-quality.sh +0 -121
- package/assets/hooks/worktree-guard.sh +0 -39
- package/assets/skill-commands/repo-harness-autoplan/SKILL.md +0 -58
- package/assets/skill-commands/repo-harness-capability/SKILL.md +0 -36
- package/assets/skill-commands/repo-harness-deploy/SKILL.md +0 -40
- package/assets/skill-commands/repo-harness-gptpro/SKILL.md +0 -106
- package/assets/skill-commands/repo-harness-gptpro-setup/SKILL.md +0 -75
- package/assets/skill-commands/repo-harness-handoff/SKILL.md +0 -36
- package/assets/skill-commands/repo-harness-init/SKILL.md +0 -31
- package/assets/skill-commands/repo-harness-migrate/SKILL.md +0 -33
- package/assets/skill-commands/repo-harness-repair/SKILL.md +0 -29
- package/assets/skill-commands/repo-harness-upgrade/SKILL.md +0 -33
- package/assets/skills/claude-review/SKILL.md +0 -231
- package/assets/skills/codex-review/SKILL.md +0 -103
- package/assets/templates/helpers/migrate-project-template.sh +0 -54
- package/assets/templates/helpers/migrate-workflow-docs.ts +0 -413
- package/scripts/hook-shim.sh +0 -93
- package/scripts/mcp-rollout-gate.ts +0 -658
- package/scripts/migrate-project-template.sh +0 -1178
- package/scripts/migrate-workflow-docs.ts +0 -413
- package/scripts/repo-harness.sh +0 -516
- package/src/cli/repo-adoption/reclaim-runtime.ts +0 -654
package/AGENTS.md
CHANGED
|
@@ -17,15 +17,15 @@ This repository self-hosts the `repo-harness` contract; the former `repo-harness
|
|
|
17
17
|
- `.ai/harness/policy.json` for the machine-readable workflow contract
|
|
18
18
|
- `.ai/context/context-map.json` for progressive context loading
|
|
19
19
|
- `docs/architecture/index.md` for umbrella architecture status, drift requests, snapshots, and diagram links
|
|
20
|
-
- `docs/reference-configs/agentic-development-flow.md` for
|
|
20
|
+
- `docs/reference-configs/agentic-development-flow.md` for parent-agent/Waza routing and P1/P2/P3 rules
|
|
21
21
|
|
|
22
22
|
## Operating Rules
|
|
23
23
|
|
|
24
24
|
- Sync `tasks/` whenever substantive repo changes are made.
|
|
25
25
|
- Use `tasks/notes/<plan-stem>.notes.md` only for non-obvious slice decisions, deviations, tradeoffs, and open questions; `<plan-stem>` is the active plan filename without `plan-` and `.md` (for example `20260531-0045-governance-workflow`). Do not use notes as durable memory or a task log, and archive/promote them deliberately when the slice closes.
|
|
26
|
-
- Treat hook execution as
|
|
26
|
+
- Treat hook execution as typed and user-level: `~/.claude/settings.json` and `~/.codex/hooks.json` invoke `repo-harness-hook`, whose route registry selects exactly one in-process handler. `.ai/hooks/lib/workflow-state.sh` is an operator-helper library, never a host-event dispatcher.
|
|
27
27
|
- Keep the umbrella hierarchy explicit: architecture owns stable truth, capability contracts own local agent context, `tasks/workstreams/<domain>/<capability>/` owns durable progress, and `tasks/todos.md` owns only deferred medium/long-term goals with tradeoff and revisit trigger.
|
|
28
|
-
- Treat `.ai/context/capabilities.json` as the source of truth for capability prefixes; `agent-context-blocks.txt` and nested agent files are
|
|
28
|
+
- Treat `.ai/context/capabilities.json` as the source of truth for capability prefixes; `agent-context-blocks.txt` and nested agent files are initialization inputs only, never runtime resolver authority.
|
|
29
29
|
- Keep architecture drift handling split: `architecture-queue.sh` writes architecture requests/events, `workstream-sync.sh` maintains durable capability workstreams, and `context-contract-sync.sh` only updates controlled local `CLAUDE.md`/`AGENTS.md` architecture blocks.
|
|
30
30
|
- Keep `assets/workflow-contract.v1.json` and `.ai/harness/workflow-contract.json` in sync.
|
|
31
31
|
- Keep `CLAUDE.md` and `AGENTS.md` short; put detailed guidance in `docs/reference-configs/`.
|
|
@@ -33,22 +33,29 @@ This repository self-hosts the `repo-harness` contract; the former `repo-harness
|
|
|
33
33
|
- Treat `.ai/harness/checks/*.latest.{json,md}` and `.ai/harness/runs/` as ignored runtime evidence cache; commit durable conclusions in `tasks/reviews/`, `tasks/contracts/`, `tasks/notes/`, or `docs/researches/` instead.
|
|
34
34
|
- Treat architecture/spec/research docs as the human reading entrypoint. Before closing a workflow, promote durable conclusions into `docs/architecture/`, `docs/researches/`, `docs/spec.md`, or `tasks/lessons.md`; then archive fulfilled plan/contract/review/notes/todo artifacts so root workflow surfaces represent active work only. `.rgignore` hides archived workflow artifacts and runtime evidence from default `rg` searches; use explicit paths or `rg -uu` for audits.
|
|
35
35
|
- Treat `_ref/` as an occasional ignored external reference checkout cache, not a commit surface or daily workflow. Agents may read or refresh it for comparison; when it influences a decision, cite the source repo plus commit/tag and path in `tasks/notes/` or `docs/researches/`.
|
|
36
|
-
- Treat `deploy/` as the trackable deployment and operations surface for runbooks, submission materials, release checklists, helper scripts, ordered SQL files under `deploy/sql
|
|
36
|
+
- Treat `deploy/` as the trackable deployment and operations surface for runbooks, submission materials, release checklists, helper scripts, ordered SQL files, and env examples; follow `.ai/harness/policy.json#operations.deploy_sql` for configured SQL roots and naming modes, otherwise keep SQL directly under `deploy/sql/` with 4-digit ascending prefixes.
|
|
37
37
|
- Treat `_ops/` as ignored local operations state for secrets, real env files, provider state, artifacts, logs, and scratch files; do not commit or agent-edit `_ops/*`.
|
|
38
38
|
- Treat contract-level task execution as worktree-first: `repo-harness run plan-to-todo --plan <approved-plan>` starts `repo-harness run contract-worktree start --plan <approved-plan>` when policy enables it, and completed blocks finish through Waza `/check` plus `repo-harness run contract-worktree finish`.
|
|
39
39
|
- Treat the EXECUTION_BOUNDARY anti-extras clause as mandatory on every delegated runner surface (contract worker prompts, the Codex delegation advisor hook, subagent start context, and MCP `codex-goal` documents): absent requirements are forbidden design space, not permission to improve, and unrequested extras fail closed.
|
|
40
40
|
- After Codex Plan mode, Waza `/think`, or `repo-harness-plan` produces a decision-complete work-package plan, capture it with `repo-harness run capture-plan --artifact-level work-package --slug <slug> --title <title>` so `plans/` becomes the file-backed source of truth; if the user has already approved implementation, capture with `--status Approved --execute --promotion-reason <merge_boundary|rollback_boundary|verification_boundary|risk_boundary|human_decision_boundary|worktree_boundary>` or run `repo-harness run plan-to-todo --plan <active-plan>`.
|
|
41
41
|
- Promote work into a top-level `plans/plan-*.md` only when `Artifact Level: work-package` is justified by a merge/PR unit, rollback surface, independent verification boundary, review/acceptance boundary, high-risk surface, or otherwise cannot remain a checklist item in the current active plan or sprint backlog. Inline sprint rows and checklist rows stay in the sprint backlog or active plan `## Task Breakdown`; contract rows may expand into plan -> contract -> review -> notes only through the work-package gate.
|
|
42
42
|
- If current repo state conflicts with the task, open an isolated `codex/<task-slug>` worktree, finish there, run Waza `/check`-style validation, then merge back to `main` without absorbing unrelated dirty changes.
|
|
43
|
-
- Route product discovery to
|
|
43
|
+
- Route product discovery and complex/design planning to the parent agent: use `geju` for pre-contract framing, complete P1/P2/P3 with the parent agent's own capabilities, and freeze the accepted direction into the plan and contract. Route daily small/medium planning, bug hunts, and checks to Waza `/think`, `/hunt`, and `/check`. Route a proactive multi-direction visual/UX choice mid-task to the design-options convention (`repo-harness docs show design-options`).
|
|
44
44
|
- Codex automation profile is runtime-referenced, not vendored: required skills are `health`, `check`, and `diagram-design` from `~/.codex/skills`.
|
|
45
|
-
-
|
|
46
|
-
-
|
|
45
|
+
- Keep durable repo knowledge in `docs/researches/`, `tasks/lessons.md`, and the canonical workflow artifacts.
|
|
46
|
+
- Treat `.ai/harness/brain-manifest.json` and `repo-harness run sync-brain-docs` as explicit operator-invoked export surfaces only; hooks and workflow checks must not read, write, or gate on external brain-vault state.
|
|
47
47
|
- Treat Waza as Codex-first: `~/.codex/skills` is the Codex runtime source; `~/.agents/skills` is skills CLI staging/cache only. Update by staging upstream Waza, copying the eight managed `SKILL.md` files into Codex, and verifying with `cmp`.
|
|
48
48
|
- Use `docs/reference-configs/external-tooling.md` and `bash scripts/check-agent-tooling.sh --host both --check-updates` for environment checks; this self-host repo vendors CodeGraph as a dev dependency while generated downstream repos keep the global MCP default unless local policy opts in.
|
|
49
|
-
- When changing
|
|
49
|
+
- When changing adoption planner or transaction code, verify `repo-harness adopt --repo . --dry-run` and a fixture apply use the same TS operation model.
|
|
50
50
|
- Treat repo-local `.claude/settings.json` and `.codex/hooks.json` hook adapters as retired legacy config; migration may back them up locally, but they are not product deliverables.
|
|
51
51
|
|
|
52
|
+
## Code Optimization Principles
|
|
53
|
+
|
|
54
|
+
- Reason from first principles: identify observable conditions, controllable inputs, the invariant, and the actual pressure point before changing structure.
|
|
55
|
+
- Keep one source of truth for each datum; every other representation must be a deterministic projection with a drift check.
|
|
56
|
+
- Do not add steady-state compatibility code, dual authority, semantic fallbacks, aliases, or shadow parsers. Explicit one-shot migrations must fail closed and remove the retired path in the same work-package.
|
|
57
|
+
- Create shared components only for observed reuse or a cross-module invariant. Prefer an existing monorepo workspace only when independently meaningful consumers need the shared package; do not convert this single-package repo without that boundary.
|
|
58
|
+
|
|
52
59
|
## Required Checks
|
|
53
60
|
|
|
54
61
|
```bash
|
|
@@ -58,7 +65,7 @@ bash scripts/check-architecture-sync.sh
|
|
|
58
65
|
bash scripts/check-task-sync.sh
|
|
59
66
|
repo-harness run check-task-workflow --strict
|
|
60
67
|
bun scripts/inspect-project-state.ts --repo . --format text
|
|
61
|
-
|
|
68
|
+
bun src/cli/index.ts adopt --repo . --dry-run
|
|
62
69
|
```
|
|
63
70
|
|
|
64
71
|
<!-- BEGIN ARCHITECTURE CONTRACT -->
|
package/CLAUDE.md
CHANGED
|
@@ -17,15 +17,15 @@ This repository self-hosts the `repo-harness` contract; the former `repo-harness
|
|
|
17
17
|
- `.ai/harness/policy.json` for the machine-readable workflow contract
|
|
18
18
|
- `.ai/context/context-map.json` for progressive context loading
|
|
19
19
|
- `docs/architecture/index.md` for umbrella architecture status, drift requests, snapshots, and diagram links
|
|
20
|
-
- `docs/reference-configs/agentic-development-flow.md` for
|
|
20
|
+
- `docs/reference-configs/agentic-development-flow.md` for parent-agent/Waza routing and P1/P2/P3 rules
|
|
21
21
|
|
|
22
22
|
## Operating Rules
|
|
23
23
|
|
|
24
24
|
- Sync `tasks/` whenever substantive repo changes are made.
|
|
25
25
|
- Use `tasks/notes/<plan-stem>.notes.md` only for non-obvious slice decisions, deviations, tradeoffs, and open questions; `<plan-stem>` is the active plan filename without `plan-` and `.md` (for example `20260531-0045-governance-workflow`). Do not use notes as durable memory or a task log, and archive/promote them deliberately when the slice closes.
|
|
26
|
-
- Treat hook execution as
|
|
26
|
+
- Treat hook execution as typed and user-level: `~/.claude/settings.json` and `~/.codex/hooks.json` invoke `repo-harness-hook`, whose route registry selects exactly one in-process handler. `.ai/hooks/lib/workflow-state.sh` is an operator-helper library, never a host-event dispatcher.
|
|
27
27
|
- Keep the umbrella hierarchy explicit: architecture owns stable truth, capability contracts own local agent context, `tasks/workstreams/<domain>/<capability>/` owns durable progress, and `tasks/todos.md` owns only deferred medium/long-term goals with tradeoff and revisit trigger.
|
|
28
|
-
- Treat `.ai/context/capabilities.json` as the source of truth for capability prefixes; `agent-context-blocks.txt` and nested agent files are
|
|
28
|
+
- Treat `.ai/context/capabilities.json` as the source of truth for capability prefixes; `agent-context-blocks.txt` and nested agent files are initialization inputs only, never runtime resolver authority.
|
|
29
29
|
- Keep architecture drift handling split: `architecture-queue.sh` writes architecture requests/events, `workstream-sync.sh` maintains durable capability workstreams, and `context-contract-sync.sh` only updates controlled local `CLAUDE.md`/`AGENTS.md` architecture blocks.
|
|
30
30
|
- Keep `assets/workflow-contract.v1.json` and `.ai/harness/workflow-contract.json` in sync.
|
|
31
31
|
- Keep `CLAUDE.md` and `AGENTS.md` short; put detailed guidance in `docs/reference-configs/`.
|
|
@@ -33,22 +33,29 @@ This repository self-hosts the `repo-harness` contract; the former `repo-harness
|
|
|
33
33
|
- Treat `.ai/harness/checks/*.latest.{json,md}` and `.ai/harness/runs/` as ignored runtime evidence cache; commit durable conclusions in `tasks/reviews/`, `tasks/contracts/`, `tasks/notes/`, or `docs/researches/` instead.
|
|
34
34
|
- Treat architecture/spec/research docs as the human reading entrypoint. Before closing a workflow, promote durable conclusions into `docs/architecture/`, `docs/researches/`, `docs/spec.md`, or `tasks/lessons.md`; then archive fulfilled plan/contract/review/notes/todo artifacts so root workflow surfaces represent active work only. `.rgignore` hides archived workflow artifacts and runtime evidence from default `rg` searches; use explicit paths or `rg -uu` for audits.
|
|
35
35
|
- Treat `_ref/` as an occasional ignored external reference checkout cache, not a commit surface or daily workflow. Agents may read or refresh it for comparison; when it influences a decision, cite the source repo plus commit/tag and path in `tasks/notes/` or `docs/researches/`.
|
|
36
|
-
- Treat `deploy/` as the trackable deployment and operations surface for runbooks, submission materials, release checklists, helper scripts, ordered SQL files under `deploy/sql
|
|
36
|
+
- Treat `deploy/` as the trackable deployment and operations surface for runbooks, submission materials, release checklists, helper scripts, ordered SQL files, and env examples; follow `.ai/harness/policy.json#operations.deploy_sql` for configured SQL roots and naming modes, otherwise keep SQL directly under `deploy/sql/` with 4-digit ascending prefixes.
|
|
37
37
|
- Treat `_ops/` as ignored local operations state for secrets, real env files, provider state, artifacts, logs, and scratch files; do not commit or agent-edit `_ops/*`.
|
|
38
38
|
- Treat contract-level task execution as worktree-first: `repo-harness run plan-to-todo --plan <approved-plan>` starts `repo-harness run contract-worktree start --plan <approved-plan>` when policy enables it, and completed blocks finish through Waza `/check` plus `repo-harness run contract-worktree finish`.
|
|
39
39
|
- Treat the EXECUTION_BOUNDARY anti-extras clause as mandatory on every delegated runner surface (contract worker prompts, the Codex delegation advisor hook, subagent start context, and MCP `codex-goal` documents): absent requirements are forbidden design space, not permission to improve, and unrequested extras fail closed.
|
|
40
40
|
- After Codex Plan mode, Waza `/think`, or `repo-harness-plan` produces a decision-complete work-package plan, capture it with `repo-harness run capture-plan --artifact-level work-package --slug <slug> --title <title>` so `plans/` becomes the file-backed source of truth; if the user has already approved implementation, capture with `--status Approved --execute --promotion-reason <merge_boundary|rollback_boundary|verification_boundary|risk_boundary|human_decision_boundary|worktree_boundary>` or run `repo-harness run plan-to-todo --plan <active-plan>`.
|
|
41
41
|
- Promote work into a top-level `plans/plan-*.md` only when `Artifact Level: work-package` is justified by a merge/PR unit, rollback surface, independent verification boundary, review/acceptance boundary, high-risk surface, or otherwise cannot remain a checklist item in the current active plan or sprint backlog. Inline sprint rows and checklist rows stay in the sprint backlog or active plan `## Task Breakdown`; contract rows may expand into plan -> contract -> review -> notes only through the work-package gate.
|
|
42
42
|
- If current repo state conflicts with the task, open an isolated `codex/<task-slug>` worktree, finish there, run Waza `/check`-style validation, then merge back to `main` without absorbing unrelated dirty changes.
|
|
43
|
-
- Route product discovery to
|
|
43
|
+
- Route product discovery and complex/design planning to the parent agent: use `geju` for pre-contract framing, complete P1/P2/P3 with the parent agent's own capabilities, and freeze the accepted direction into the plan and contract. Route daily small/medium planning, bug hunts, and checks to Waza `/think`, `/hunt`, and `/check`. Route a proactive multi-direction visual/UX choice mid-task to the design-options convention (`repo-harness docs show design-options`).
|
|
44
44
|
- Codex automation profile is runtime-referenced, not vendored: required skills are `health`, `check`, and `diagram-design` from `~/.codex/skills`.
|
|
45
|
-
-
|
|
46
|
-
-
|
|
45
|
+
- Keep durable repo knowledge in `docs/researches/`, `tasks/lessons.md`, and the canonical workflow artifacts.
|
|
46
|
+
- Treat `.ai/harness/brain-manifest.json` and `repo-harness run sync-brain-docs` as explicit operator-invoked export surfaces only; hooks and workflow checks must not read, write, or gate on external brain-vault state.
|
|
47
47
|
- Treat Waza as Codex-first: `~/.codex/skills` is the Codex runtime source; `~/.agents/skills` is skills CLI staging/cache only. Update by staging upstream Waza, copying the eight managed `SKILL.md` files into Codex, and verifying with `cmp`.
|
|
48
48
|
- Use `docs/reference-configs/external-tooling.md` and `bash scripts/check-agent-tooling.sh --host both --check-updates` for environment checks; this self-host repo vendors CodeGraph as a dev dependency while generated downstream repos keep the global MCP default unless local policy opts in.
|
|
49
|
-
- When changing
|
|
49
|
+
- When changing adoption planner or transaction code, verify `repo-harness adopt --repo . --dry-run` and a fixture apply use the same TS operation model.
|
|
50
50
|
- Treat repo-local `.claude/settings.json` and `.codex/hooks.json` hook adapters as retired legacy config; migration may back them up locally, but they are not product deliverables.
|
|
51
51
|
|
|
52
|
+
## Code Optimization Principles
|
|
53
|
+
|
|
54
|
+
- Reason from first principles: identify observable conditions, controllable inputs, the invariant, and the actual pressure point before changing structure.
|
|
55
|
+
- Keep one source of truth for each datum; every other representation must be a deterministic projection with a drift check.
|
|
56
|
+
- Do not add steady-state compatibility code, dual authority, semantic fallbacks, aliases, or shadow parsers. Explicit one-shot migrations must fail closed and remove the retired path in the same work-package.
|
|
57
|
+
- Create shared components only for observed reuse or a cross-module invariant. Prefer an existing monorepo workspace only when independently meaningful consumers need the shared package; do not convert this single-package repo without that boundary.
|
|
58
|
+
|
|
52
59
|
## Required Checks
|
|
53
60
|
|
|
54
61
|
```bash
|
|
@@ -58,7 +65,7 @@ bash scripts/check-architecture-sync.sh
|
|
|
58
65
|
bash scripts/check-task-sync.sh
|
|
59
66
|
repo-harness run check-task-workflow --strict
|
|
60
67
|
bun scripts/inspect-project-state.ts --repo . --format text
|
|
61
|
-
|
|
68
|
+
bun src/cli/index.ts adopt --repo . --dry-run
|
|
62
69
|
```
|
|
63
70
|
|
|
64
71
|
<!-- BEGIN ARCHITECTURE CONTRACT -->
|
package/README.es.md
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
# repo-harness
|
|
2
2
|
|
|
3
|
-
<p align="center">
|
|
4
|
-
<img src="docs/images/repo-harness-gptpro.png" alt="repo-harness architecture and ChatGPT Pro local planner workflow diagram" width="960">
|
|
5
|
-
</p>
|
|
6
|
-
|
|
7
3
|
`repo-harness` convierte las sesiones de programación con Claude/Codex en un
|
|
8
4
|
workflow repo-local repetible. Incluye un CLI y hooks de skill/runtime que
|
|
9
5
|
escriben contexto, planes, handoffs, checks y evidencias de review dentro del
|
|
@@ -30,10 +26,11 @@ Dirección del repositorio: `https://github.com/Ancienttwo/repo-harness`
|
|
|
30
26
|
- **El estado de la sesión vive en archivos, no en el historial de chat.** Las
|
|
31
27
|
distintas sesiones de agente —Claude, Codex, ahora o más tarde— se mantienen
|
|
32
28
|
sincronizadas a través del repositorio en lugar de un hilo de chat. Cuando
|
|
33
|
-
arranca una sesión nueva,
|
|
29
|
+
arranca una sesión nueva, el session-context builder in-process
|
|
30
|
+
(`src/cli/hook/session-context.ts`) inyecta el
|
|
34
31
|
resume packet de la sesión anterior (`.ai/harness/handoff/resume.md`,
|
|
35
32
|
`tasks/current.md`); al terminar la sesión y tras cada edición,
|
|
36
|
-
`
|
|
33
|
+
los typed handlers `session-context`, `stop` y `mutation-observed` escriben de vuelta el siguiente
|
|
37
34
|
handoff. Una tarea puede cortarse a mitad de camino y la siguiente sesión
|
|
38
35
|
retoma directamente el next step exacto, los puntos de bloqueo y los archivos
|
|
39
36
|
modificados sin tener que volver a inferirlos.
|
|
@@ -85,37 +82,32 @@ artifacts.
|
|
|
85
82
|
## Novedades
|
|
86
83
|
|
|
87
84
|
Las notas de versión viven en [`docs/CHANGELOG.md`](docs/CHANGELOG.md). La línea
|
|
88
|
-
actual es `0.
|
|
85
|
+
actual es `0.11.0`.
|
|
89
86
|
|
|
90
87
|
## Cómo funciona
|
|
91
88
|
|
|
92
|
-
En conjunto hay tres capas:
|
|
89
|
+
En conjunto hay tres capas y un único runtime typed para host events:
|
|
93
90
|
|
|
94
91
|
1. **Capa del paquete fuente**: este repositorio mantiene la CLI, los command
|
|
95
92
|
skill facades, los templates, los hook assets, el workflow contract, los tests
|
|
96
93
|
y el release gate.
|
|
97
94
|
2. **Capa del contract del repositorio objetivo**: `repo-harness adopt` o la
|
|
98
95
|
migración escribe `docs/spec.md`, `plans/`, `tasks/`, `.ai/context/`,
|
|
99
|
-
`.ai/harness
|
|
96
|
+
`.ai/harness/` y helper scripts. `.ai/hooks/lib/workflow-state.sh` es solo
|
|
97
|
+
una proyección de operator helper.
|
|
100
98
|
3. **Capa del host adapter**: el `~/.claude/settings.json` y el
|
|
101
99
|
`~/.codex/hooks.json` a nivel de usuario enrutan los events de Claude/Codex
|
|
102
|
-
hacia `repo-harness-hook`.
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
`
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
side effects de plan capture, el render del quality gate y el stdout/stderr
|
|
111
|
-
host-safe. La decisión sobre el prompt intent y el workflow state se delega al
|
|
112
|
-
TypeScript decision engine detrás de `repo-harness-hook prompt-guard-decide`, que
|
|
113
|
-
devuelve un action enum desde una decision table explícita. Así la configuración
|
|
114
|
-
del host no cambia, pero la capa más propensa a errores —el classifier y la
|
|
115
|
-
state-machine— deja de estar dispersa en ramas condicionales de shell.
|
|
100
|
+
hacia `repo-harness-hook`. Tras validar `.ai/harness/workflow-contract.json`,
|
|
101
|
+
el route registry usa `event + routeId + matcher` para invocar exactamente un
|
|
102
|
+
typed handler.
|
|
103
|
+
|
|
104
|
+
Todos los events siguen `host adapter -> repo-harness-hook -> route registry ->
|
|
105
|
+
typed handler`. `UserPromptSubmit.default` usa `prompt`; edit/bash/stop usan
|
|
106
|
+
`mutation-observed`, `command-observed` y `stop`. No existe un segundo shell
|
|
107
|
+
dispatcher ni un runtime distinto por provider.
|
|
116
108
|
|
|
117
109
|
El invariante central: los hechos persistentes viven en el repositorio, no en la
|
|
118
|
-
ventana de chat. Los
|
|
110
|
+
ventana de chat. Los typed handlers son solo aceleradores y guardrails; la verdadera
|
|
119
111
|
authority son los archivos de plan, contract, review, checks y handoff.
|
|
120
112
|
|
|
121
113
|
## Task Workflow: de Plan a Closeout
|
|
@@ -172,20 +164,20 @@ flowchart TD
|
|
|
172
164
|
## Bucles largos de producto
|
|
173
165
|
|
|
174
166
|
Para trabajo Greenfield y Brownfield, adelanta la discovery y el juicio de
|
|
175
|
-
engineering plan en
|
|
167
|
+
engineering plan en el parent agent antes de pedirle a Codex que haga loops de
|
|
176
168
|
ejecución:
|
|
177
169
|
|
|
178
|
-
1.
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
170
|
+
1. Antes de crear un contract, el parent agent invoca `geju` para abrir el marco y
|
|
171
|
+
después completa P1/P2/P3 con sus propias capacidades repo/runtime. Fija la
|
|
172
|
+
intención de producto, la arquitectura, los riesgos, el falsifier y el evidence
|
|
173
|
+
contract aceptados en los development documents.
|
|
182
174
|
2. Convierte esos documentos en un PRD Sprint bajo `plans/prds/`, con un
|
|
183
175
|
backlog ordenado y sub-plans detallados para cada execution slice.
|
|
184
176
|
3. Crea un Codex Goal que apunte a ese archivo de sprint. repo-harness puede
|
|
185
177
|
entonces proyectar cada sprint item por el flow normal plan -> contract ->
|
|
186
178
|
worktree -> verification.
|
|
187
179
|
|
|
188
|
-
Ese handoff mantiene precisos los loops largos:
|
|
180
|
+
Ese handoff mantiene precisos los loops largos: el parent agent se ocupa del juicio
|
|
189
181
|
amplio al inicio, el PRD Sprint es la durable source of truth, y Codex Goal mode
|
|
190
182
|
retoma contra un sprint concreto en vez de reinterpretar el chat original.
|
|
191
183
|
|
|
@@ -200,8 +192,9 @@ recomienda al aplicar el settings merge.
|
|
|
200
192
|
|
|
201
193
|
### Instalar el CLI
|
|
202
194
|
|
|
203
|
-
La ruta por defecto no requiere Node.js: el instalador usa Bun
|
|
204
|
-
Bun no existe
|
|
195
|
+
La ruta por defecto no requiere Node.js: el instalador usa Bun >= 1.1.35 como
|
|
196
|
+
runtime. Si Bun no existe o es anterior, lo instala o actualiza antes de
|
|
197
|
+
instalar el CLI `repo-harness`.
|
|
205
198
|
|
|
206
199
|
```bash
|
|
207
200
|
# macOS / Linux
|
|
@@ -212,7 +205,7 @@ irm https://raw.githubusercontent.com/Ancienttwo/repo-harness/main/install.ps1 |
|
|
|
212
205
|
```
|
|
213
206
|
|
|
214
207
|
<details>
|
|
215
|
-
<summary>¿Ya tienes Bun? Usa Bun primero, o npx como fallback</summary>
|
|
208
|
+
<summary>¿Ya tienes Bun >= 1.1.35? Usa Bun primero, o npx como fallback</summary>
|
|
216
209
|
|
|
217
210
|
```bash
|
|
218
211
|
# Bun (recomendado)
|
|
@@ -251,7 +244,7 @@ Aplica solo después de que el reporte del dry-run sea correcto:
|
|
|
251
244
|
repo-harness adopt
|
|
252
245
|
```
|
|
253
246
|
|
|
254
|
-
Para un proyecto o módulo nuevo, usa
|
|
247
|
+
Para un proyecto o módulo nuevo, usa el modo scaffold de `repo-harness-setup`.
|
|
255
248
|
Para un repositorio existente, usa `repo-harness adopt`; este instala o refresca
|
|
256
249
|
el harness y no crea el stack tecnológico de la aplicación.
|
|
257
250
|
|
|
@@ -264,7 +257,7 @@ El comando debería terminar imprimiendo `=== Migration Report ===`, e incluir:
|
|
|
264
257
|
- `Host hook adapters are user-level:`: recordatorio de instalar los global adapters y de confiar en `~/.codex/hooks.json`
|
|
265
258
|
- `Workflow migration:`: el plan de creación o refresco de las repo-local harness surfaces
|
|
266
259
|
- `Helper runtime:`: la cadena de herramientas operativa que obtendrás tras aplicar
|
|
267
|
-
- `--- External Tooling ---`:
|
|
260
|
+
- `--- External Tooling ---`: la guía de planning parent/Geju, la readiness de Waza y CodeGraph y las advisory de instalación/actualización
|
|
268
261
|
|
|
269
262
|
### Los dos comandos siguientes
|
|
270
263
|
|
|
@@ -339,36 +332,39 @@ auditado, y no es un shell arbitrario.
|
|
|
339
332
|
|
|
340
333
|
## Hook Authority Map
|
|
341
334
|
|
|
342
|
-
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
- Codex debe confiar en `~/.codex/hooks.json` en sus Settings para que los hooks se ejecuten.
|
|
347
|
-
- Orden de depuración: user-level adapter config -> `repo-harness-hook` o el fallback `repo-harness hook` -> route registry -> `.ai/hooks/*`.
|
|
335
|
+
`repo-harness-hook` es el único host-event runtime. El adapter a nivel de usuario
|
|
336
|
+
solo entrega el event; route registry usa el tuple estable `event + routeId + matcher`
|
|
337
|
+
para invocar exactamente un typed handler. `assets/hooks/lib/workflow-state.sh` y
|
|
338
|
+
`.ai/hooks/lib/workflow-state.sh` son proyecciones de operator helper, no dispatchers.
|
|
348
339
|
|
|
340
|
+
- `~/.claude/settings.json`: Claude adapter a nivel de usuario.
|
|
341
|
+
- `~/.codex/hooks.json`: Codex adapter a nivel de usuario; requiere confianza en Settings.
|
|
342
|
+
- `.claude/settings.json` / `.codex/hooks.json` repo-locales: inputs legacy que se retiran durante migration.
|
|
343
|
+
- Los cambios de handler viven en `src/cli/hook/`; sincroniza la proyección con `bun run sync:hooks`.
|
|
349
344
|
|
|
350
|
-
The installed adapter owns
|
|
351
|
-
|
|
352
|
-
implementation under `assets/hooks/` or a repo-pinned `.ai/hooks/` copy.
|
|
345
|
+
The installed adapter owns the managed hook routes. Each route invokes one typed
|
|
346
|
+
handler; no existe un segundo runtime de shell ni un runtime específico por provider.
|
|
353
347
|
|
|
354
|
-
| Route | Matcher |
|
|
348
|
+
| Route | Matcher | Typed handler | Function |
|
|
355
349
|
| --- | --- | --- | --- |
|
|
356
|
-
| `SessionStart.default` | all sessions | `session-
|
|
357
|
-
| `PreToolUse.edit` | `Edit|Write` | `
|
|
358
|
-
| `PreToolUse.subagent` | `Task|Agent|SendUserMessage` | `subagent
|
|
359
|
-
| `PostToolUse.edit` | `Edit|Write` | `
|
|
360
|
-
| `PostToolUse.bash` | `Bash` | `
|
|
361
|
-
| `PostToolUse.always` | all tools | `
|
|
362
|
-
| `UserPromptSubmit.default` | all prompts | `prompt
|
|
363
|
-
| `Stop.default` | session stop | `stop-
|
|
350
|
+
| `SessionStart.default` | all sessions | `src/cli/hook/session-context.ts` (in-process builder) | Injects prior handoff, sprint status, and read-only config-security findings before work starts. |
|
|
351
|
+
| `PreToolUse.edit` | `Edit|Write` | `src/cli/hook/mutation-guard.ts` (in-process handler) | Enforces worktree policy and plan/contract readiness before implementation edits. |
|
|
352
|
+
| `PreToolUse.subagent` | `Task|Agent|SendUserMessage` | `subagent` | Keeps delegated work returning through the parent session instead of leaking completion claims. |
|
|
353
|
+
| `PostToolUse.edit` | `Edit|Write` | `mutation-observed` | Records the edit journal and controlled-file observations. |
|
|
354
|
+
| `PostToolUse.bash` | `Bash` | `command-observed` | Observes command results and captures verification evidence without replacing the command runner. |
|
|
355
|
+
| `PostToolUse.always` | all tools | `trace-observer` | Provides low-noise always-on trace and runtime observation. |
|
|
356
|
+
| `UserPromptSubmit.default` | all prompts | `prompt` | Classifies prompt intent, routes planning/check/hunt hints, and renders host-safe workflow guidance. |
|
|
357
|
+
| `Stop.default` | session stop | `src/cli/hook/stop-handler.ts` (in-process handler) | Finalizes handoff and guards against ending with unresolved draft-plan or completion evidence gaps. |
|
|
364
358
|
|
|
365
|
-
`SessionStart` ejecuta
|
|
359
|
+
`SessionStart` ejecuta el session-context builder in-process, que ensambla el contexto antes de empezar el trabajo:
|
|
366
360
|
|
|
367
361
|
```mermaid
|
|
368
362
|
flowchart LR
|
|
369
|
-
SessionStart["Claude/Codex SessionStart"] --> Ctx["session-
|
|
370
|
-
Ctx -->
|
|
371
|
-
|
|
363
|
+
SessionStart["Claude/Codex SessionStart"] --> Ctx["session-context.ts<br/>in-process builder"]
|
|
364
|
+
Ctx --> Resume["contexto de resume + handoff"]
|
|
365
|
+
Ctx --> Sec["security scan<br/>escaneo de configuración de solo lectura, fingerprint-gated"]
|
|
366
|
+
Resume --> SSOut["SessionStart additionalContext<br/>estado de la sesión anterior + hallazgos de SecurityConfig"]
|
|
367
|
+
Sec --> SSOut
|
|
372
368
|
```
|
|
373
369
|
|
|
374
370
|
El prompt guard tiene un paso interno adicional:
|
|
@@ -378,17 +374,14 @@ flowchart LR
|
|
|
378
374
|
Host["Claude/Codex UserPromptSubmit"] --> Adapter["user-level adapter"]
|
|
379
375
|
Adapter --> CLI["repo-harness-hook UserPromptSubmit --route default"]
|
|
380
376
|
CLI --> Route["route registry"]
|
|
381
|
-
Route -->
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
Action --> Shell
|
|
385
|
-
Shell --> RouteHint["Waza route hint<br/>think/planning explícito coincide primero → /think"]
|
|
386
|
-
Shell --> HostOutput["host-safe allow, advice, block, or done gate output"]
|
|
377
|
+
Route --> Handler["prompt handler<br/>typed decision table"]
|
|
378
|
+
Handler --> RouteHint["Waza route hint<br/>think/planning explícito coincide primero → /think"]
|
|
379
|
+
Handler --> HostOutput["host-safe allow, advice, block, or done gate output"]
|
|
387
380
|
```
|
|
388
381
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
382
|
+
El typed handler posee el parseo de entrada, el estado de archivos y los side effects
|
|
383
|
+
declarados; el runtime solo unifica el host output. AcceptanceReceipt es la authority
|
|
384
|
+
de closeout y review Markdown es una proyección.
|
|
392
385
|
|
|
393
386
|
## Hook Failure Playbook
|
|
394
387
|
|
|
@@ -410,7 +403,8 @@ Guards habituales:
|
|
|
410
403
|
## Repo Workflow
|
|
411
404
|
|
|
412
405
|
- Root routing docs: `CLAUDE.md`, `AGENTS.md`
|
|
413
|
-
-
|
|
406
|
+
- Typed hook runtime: `src/cli/hook/` (a través de `repo-harness-hook`)
|
|
407
|
+
- Operator helper projection: `.ai/hooks/lib/workflow-state.sh`
|
|
414
408
|
- User-level adapter layer: `~/.claude/settings.json`, `~/.codex/hooks.json`
|
|
415
409
|
- Active execution surface: `tasks/`
|
|
416
410
|
- Plan source of truth: `plans/`
|
|
@@ -419,8 +413,8 @@ Guards habituales:
|
|
|
419
413
|
|
|
420
414
|
## Release actual
|
|
421
415
|
|
|
422
|
-
- npm package: `repo-harness@0.
|
|
423
|
-
- Generated workflow stamp: `repo-harness@0.
|
|
416
|
+
- npm package: `repo-harness@0.11.0`
|
|
417
|
+
- Generated workflow stamp: `repo-harness@0.11.0+template@0.11.0`
|
|
424
418
|
- GitHub repository: `Ancienttwo/repo-harness`
|
|
425
419
|
- Release history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
|
|
426
420
|
|
|
@@ -435,10 +429,6 @@ Gracias a [TW93](https://x.com/HiTw93), autor de Waza. Los skills centrales
|
|
|
435
429
|
`think`, `hunt`, `check` y `health` dan forma al ritmo diario de planning, bug
|
|
436
430
|
hunt y verification de `repo-harness`.
|
|
437
431
|
|
|
438
|
-
Gracias a [Garry Tan](https://x.com/garrytan), autor de gstack y gbrain. Ambos
|
|
439
|
-
influyeron en el workflow de product discovery, plan/design review, release
|
|
440
|
-
documentation, knowledge sync y handoff retrieval.
|
|
441
|
-
|
|
442
432
|
Gracias a [Peter Steinberger](https://x.com/steipete), autor de Oracle
|
|
443
433
|
(`@steipete/oracle`, MIT). Es el motor de consult de navegador GPT Pro / ChatGPT
|
|
444
434
|
Web por defecto de `chatgpt-browser`: el provider Oracle ejecuta el binario oracle
|
|
@@ -458,35 +448,53 @@ Mantén esta atribución opt-in y visible por commit. No la incorpores en script
|
|
|
458
448
|
|
|
459
449
|
## Action Command Skills
|
|
460
450
|
|
|
461
|
-
Los
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
-
|
|
467
|
-
|
|
468
|
-
-
|
|
469
|
-
|
|
451
|
+
Los packages canónicos están en `assets/skills/` (packages canónicos
|
|
452
|
+
activados) y en `assets/skill-commands/` (sobrevivientes que evolucionan en su
|
|
453
|
+
sitio); preservan el alcance de discovery por skills, mientras el CLI y los
|
|
454
|
+
hooks ejecutan:
|
|
455
|
+
|
|
456
|
+
- Router: `repo-harness` (Skill raíz, sincronizado sin condición en cada
|
|
457
|
+
profile)
|
|
458
|
+
- Capa setup: `repo-harness-setup` (modos adopt/init, migrate, upgrade,
|
|
459
|
+
repair, scaffold, y capability-configuration; router-only, nunca
|
|
460
|
+
descubierto automáticamente por un profile)
|
|
461
|
+
- Planning: `repo-harness-plan` (crea un plan decision-complete, o revisa uno
|
|
462
|
+
existente)
|
|
463
|
+
- Capa product planning: `repo-harness-product` (modos PRD, Sprint, y Goal; el
|
|
464
|
+
modo PRD activa `$geju`, luego usa drafting Claude-first con `claude -p
|
|
465
|
+
--model opus`, Codex queda solo como fallback; el modo Sprint convierte un
|
|
466
|
+
PRD en un backlog ordenado bajo `plans/sprints/`, cada fila se expande con
|
|
467
|
+
`$think` antes del contract flow; el modo Goal prepara prompts `/goal` de
|
|
468
|
+
Codex/Claude desde un PRD o Sprint detallado y lo pide primero si falta)
|
|
469
|
+
- Verificación: `repo-harness-check` (checks de workflow/release más una
|
|
470
|
+
referencia deploy-readiness)
|
|
471
|
+
- Release: `repo-harness-ship`
|
|
472
|
+
- Architecture: `repo-harness-architecture`
|
|
473
|
+
- Cross-model review: `repo-harness-cross-review` (host-aware; se instala en
|
|
474
|
+
ambos hosts para el profile strict)
|
|
475
|
+
- Integración ChatGPT: `repo-harness-chatgpt` (consult/continuation de Oracle
|
|
476
|
+
browser/GPT Pro, setup de MCP Connector, bridge handoff, y read-back
|
|
477
|
+
evidence; solo setup explícito, nunca implicado por product planning)
|
|
470
478
|
|
|
471
479
|
La cadena de planning está separada por capas:
|
|
472
480
|
|
|
473
481
|
```text
|
|
474
|
-
idea -> repo-harness-
|
|
482
|
+
idea -> repo-harness-product (modo PRD) -> repo-harness-product (modo Sprint, from-prd) -> repo-harness-product (modo Goal)
|
|
475
483
|
```
|
|
476
484
|
|
|
477
|
-
Usa `repo-harness-
|
|
478
|
-
ejecuta un direction pass con `$geju`, luego pide a
|
|
479
|
-
redacte el PRD, con Codex solo como
|
|
480
|
-
`
|
|
481
|
-
aprobado en un Sprint backlog ordenado con acceptance lines
|
|
482
|
-
máquina. Usa
|
|
483
|
-
prepara un prompt `/goal` acotado para Codex/Claude y
|
|
484
|
-
source of truth. Si falta ese documento, el
|
|
485
|
-
empezar implementación desde el chat.
|
|
485
|
+
Usa el modo PRD de `repo-harness-product` cuando la fuente todavía es una idea
|
|
486
|
+
de producto: primero ejecuta un direction pass con `$geju`, luego pide a
|
|
487
|
+
Claude vía `claude -p --model opus` que redacte el PRD, con Codex solo como
|
|
488
|
+
fallback. Usa su modo Sprint (`from-prd <plans/prds/*.prd.md>`) para convertir
|
|
489
|
+
un PRD aprobado en un Sprint backlog ordenado con acceptance lines
|
|
490
|
+
verificables por máquina. Usa su modo Goal solo cuando ya exista un PRD o
|
|
491
|
+
Sprint detallado; prepara un prompt `/goal` acotado para Codex/Claude y
|
|
492
|
+
mantiene el PRD/Sprint como source of truth. Si falta ese documento, el modo
|
|
493
|
+
Goal debe pedirlo antes de empezar implementación desde el chat.
|
|
486
494
|
|
|
487
|
-
`repo-harness adopt` se usa para repositorios existentes;
|
|
488
|
-
queda
|
|
489
|
-
`create-project-dirs` son pasos internos, no commands públicos.
|
|
495
|
+
`repo-harness adopt` se usa para repositorios existentes; el modo scaffold de
|
|
496
|
+
`repo-harness-setup` queda para crear proyectos o módulos nuevos. `hooks-init`,
|
|
497
|
+
`docs-init` y `create-project-dirs` son pasos internos, no commands públicos.
|
|
490
498
|
|
|
491
499
|
## Maintainer Reference
|
|
492
500
|
|
|
@@ -545,7 +553,7 @@ bun test
|
|
|
545
553
|
bash scripts/check-task-sync.sh
|
|
546
554
|
bash scripts/check-task-workflow.sh --strict
|
|
547
555
|
bun scripts/inspect-project-state.ts --repo . --format text
|
|
548
|
-
|
|
556
|
+
bun src/cli/index.ts adopt --repo . --dry-run
|
|
549
557
|
bash scripts/check-agent-tooling.sh --host both --check-updates
|
|
550
558
|
bun run benchmark:skills --eval route-workflow-check
|
|
551
559
|
```
|
|
@@ -582,7 +590,7 @@ bun run benchmark:skills --eval repair-agents-task-sync
|
|
|
582
590
|
- Scaffolding scripts:
|
|
583
591
|
- `scripts/init-project.sh`
|
|
584
592
|
- `scripts/create-project-dirs.sh`
|
|
585
|
-
-
|
|
593
|
+
- Canonical adoption planner: `src/core/adoption/standard-plan.ts`
|
|
586
594
|
|
|
587
595
|
## Generated vs Self-Hosted Hook Projection
|
|
588
596
|
|
|
@@ -620,7 +628,7 @@ bash scripts/check-architecture-sync.sh
|
|
|
620
628
|
bash scripts/check-task-sync.sh
|
|
621
629
|
bash scripts/check-task-workflow.sh --strict
|
|
622
630
|
bun scripts/inspect-project-state.ts --repo . --format text
|
|
623
|
-
|
|
631
|
+
bun src/cli/index.ts adopt --repo . --dry-run
|
|
624
632
|
bash scripts/check-agent-tooling.sh --host both --check-updates
|
|
625
633
|
bun run benchmark:skills --eval route-workflow-check
|
|
626
634
|
```
|