repo-harness 0.12.2 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/AGENTS.md +17 -25
  2. package/CLAUDE.md +17 -25
  3. package/README.es.md +2 -2
  4. package/README.fr.md +2 -2
  5. package/README.ja.md +2 -2
  6. package/README.md +2 -2
  7. package/README.zh-CN.md +2 -2
  8. package/assets/AGENTS.md +13 -9
  9. package/assets/CLAUDE.md +13 -9
  10. package/assets/hooks/AGENTS.md +8 -5
  11. package/assets/hooks/CLAUDE.md +8 -5
  12. package/assets/skill-version.json +10 -2
  13. package/assets/templates/helpers/contract-worktree.sh +685 -3
  14. package/assets/templates/helpers/ship-worktrees.sh +666 -5
  15. package/assets/templates/helpers/verify-contract.sh +35 -1
  16. package/assets/templates/helpers/verify-sprint.sh +10 -10
  17. package/dist/hook-entry.js +12694 -0
  18. package/package.json +6 -3
  19. package/scripts/check-npm-release.sh +14 -0
  20. package/scripts/contract-worktree.sh +685 -3
  21. package/scripts/ship-worktrees.sh +666 -5
  22. package/scripts/verify-contract.sh +35 -1
  23. package/scripts/verify-sprint.sh +10 -10
  24. package/src/cli/commands/state.ts +114 -1
  25. package/src/cli/hook/mutation-guard.ts +99 -126
  26. package/src/cli/hook/session-context.ts +11 -2
  27. package/src/cli/hook-entry.ts +12 -0
  28. package/src/cli/mcp/oauth.ts +21 -4
  29. package/src/cli/runtime/helper-runner.ts +1 -1
  30. package/src/core/adoption/source-checkout.ts +1 -1
  31. package/src/core/state/artifact-parsers.ts +22 -0
  32. package/src/core/state/attempt-ledger.ts +226 -0
  33. package/src/core/state/project-continuation-envelope.ts +191 -0
  34. package/src/core/state/project-effective-state.ts +17 -1
  35. package/src/core/state/types.ts +63 -0
  36. package/src/core/workflow/operation-readiness.ts +12 -2
  37. package/src/effects/evidence/post-bash-importer.ts +16 -0
  38. package/src/effects/state/attempt-ledger-store.ts +49 -0
  39. package/src/effects/state/collect-state-inputs.ts +55 -29
  40. package/src/effects/state/resolve-continuation-envelope.ts +39 -0
  41. package/src/effects/state/resolve-effective-state.ts +8 -0
package/AGENTS.md CHANGED
@@ -71,46 +71,38 @@ bun src/cli/index.ts init --repo . --dry-run
71
71
  <!-- BEGIN ARCHITECTURE CONTRACT -->
72
72
  ## Architecture Contract
73
73
 
74
- - Functional block: `scripts/inspect-project-state.ts`
75
- - Capability ID: `workflow-engine-inspection-migration`
76
- - Matched prefix: `scripts/inspect-project-state.ts`
77
- - Architecture domain: `workflow-engine`
78
- - Architecture capability: `inspection-migration`
79
- - Architecture module: `docs/architecture/modules/workflow-engine/inspection-migration.md`
80
- - Last architecture event: 2026-07-03T14:07:48+0800
81
- - Last changed path: `scripts/inspect-project-state.ts`
82
- - Severity: high
83
- - Change type: workflow-surface
74
+ - Functional block: `scripts/verify-sprint.sh`
75
+ - Capability ID: `verification-evals-checks`
76
+ - Matched prefix: `scripts/verify-sprint.sh`
77
+ - Architecture domain: `verification`
78
+ - Architecture capability: `evals-checks`
79
+ - Architecture module: `docs/architecture/modules/verification/evals-checks.md`
80
+ - Last architecture event: 2026-08-05T00:46:11+0800
81
+ - Last changed path: `tasks/workstreams/verification/evals-checks/github-issues-158-159.md`
82
+ - Severity: medium
83
+ - Change type: workstream-sync
84
84
  - Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
85
- - Entrypoints: `scripts/inspect-project-state.ts`
85
+ - Entrypoints: `scripts/verify-sprint.sh`
86
86
  - Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
87
87
  - Forbidden dependencies: Do not cross sibling app/service/package boundaries without an architecture snapshot or explicit plan.
88
- - Runtime path: `scripts/inspect-project-state.ts`
88
+ - Runtime path: `scripts/verify-sprint.sh`
89
89
  - LSP/tooling profile: `typescript-lsp`
90
90
  - Verification: Use root required checks plus local commands recorded in this capability contract.
91
91
  - Latest snapshot: `(none yet)`
92
- - Semantic diagram source: `docs/architecture/modules/workflow-engine/inspection-migration.md`
92
+ - Semantic diagram source: `docs/architecture/modules/verification/evals-checks.md`
93
93
  - Latest human diagram: `(none yet)`
94
94
  - Pending architecture request: `(none)`
95
95
 
96
96
  ## Active Workstreams
97
97
 
98
- - `tasks/workstreams/workflow-engine/inspection-migration/20260703-inspection-migration.md`
98
+ - `tasks/workstreams/verification/evals-checks/github-issues-158-159.md`
99
99
  - status: completed
100
- - current_slice: completed-20260703-architecture-closeout
101
- - source_plan: (none)
102
- - `tasks/workstreams/workflow-engine/inspection-migration/20260712-inspection-migration.md`
103
- - status: completed
104
- - current_slice: completed-20260712-repo-owned-agent-fleet
105
- - source_plan: `plans/archive/plan-20260712-2053-repo-owned-agent-fleet.md`
106
- - `tasks/workstreams/workflow-engine/inspection-migration/agent-fleet-specialists.md`
107
- - status: completed
108
- - current_slice: completed-20260713-policy-seed
109
- - source_plan: `plans/archive/plan-20260712-2215-agent-fleet-specialists.md`
100
+ - current_slice: completed-20260805-deployed-emitter-binding
101
+ - source_plan: plans/plan-20260805-0001-github-issues-158-159.md
110
102
 
111
103
  ## Current Session Projection
112
104
 
113
- - Durable progress lives under `tasks/workstreams/workflow-engine/inspection-migration`.
105
+ - Durable progress lives under `tasks/workstreams/verification/evals-checks`.
114
106
  - `tasks/current.md` is the tracked derived status snapshot; it is not a live lock or task source.
115
107
  - `tasks/todos.md` is the deferred-goal ledger; current execution slices stay in the active plan's `## Task Breakdown`.
116
108
  <!-- END ARCHITECTURE CONTRACT -->
package/CLAUDE.md CHANGED
@@ -71,46 +71,38 @@ bun src/cli/index.ts init --repo . --dry-run
71
71
  <!-- BEGIN ARCHITECTURE CONTRACT -->
72
72
  ## Architecture Contract
73
73
 
74
- - Functional block: `scripts/inspect-project-state.ts`
75
- - Capability ID: `workflow-engine-inspection-migration`
76
- - Matched prefix: `scripts/inspect-project-state.ts`
77
- - Architecture domain: `workflow-engine`
78
- - Architecture capability: `inspection-migration`
79
- - Architecture module: `docs/architecture/modules/workflow-engine/inspection-migration.md`
80
- - Last architecture event: 2026-07-03T14:07:48+0800
81
- - Last changed path: `scripts/inspect-project-state.ts`
82
- - Severity: high
83
- - Change type: workflow-surface
74
+ - Functional block: `scripts/verify-sprint.sh`
75
+ - Capability ID: `verification-evals-checks`
76
+ - Matched prefix: `scripts/verify-sprint.sh`
77
+ - Architecture domain: `verification`
78
+ - Architecture capability: `evals-checks`
79
+ - Architecture module: `docs/architecture/modules/verification/evals-checks.md`
80
+ - Last architecture event: 2026-08-05T00:46:11+0800
81
+ - Last changed path: `tasks/workstreams/verification/evals-checks/github-issues-158-159.md`
82
+ - Severity: medium
83
+ - Change type: workstream-sync
84
84
  - Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
85
- - Entrypoints: `scripts/inspect-project-state.ts`
85
+ - Entrypoints: `scripts/verify-sprint.sh`
86
86
  - Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
87
87
  - Forbidden dependencies: Do not cross sibling app/service/package boundaries without an architecture snapshot or explicit plan.
88
- - Runtime path: `scripts/inspect-project-state.ts`
88
+ - Runtime path: `scripts/verify-sprint.sh`
89
89
  - LSP/tooling profile: `typescript-lsp`
90
90
  - Verification: Use root required checks plus local commands recorded in this capability contract.
91
91
  - Latest snapshot: `(none yet)`
92
- - Semantic diagram source: `docs/architecture/modules/workflow-engine/inspection-migration.md`
92
+ - Semantic diagram source: `docs/architecture/modules/verification/evals-checks.md`
93
93
  - Latest human diagram: `(none yet)`
94
94
  - Pending architecture request: `(none)`
95
95
 
96
96
  ## Active Workstreams
97
97
 
98
- - `tasks/workstreams/workflow-engine/inspection-migration/20260703-inspection-migration.md`
98
+ - `tasks/workstreams/verification/evals-checks/github-issues-158-159.md`
99
99
  - status: completed
100
- - current_slice: completed-20260703-architecture-closeout
101
- - source_plan: (none)
102
- - `tasks/workstreams/workflow-engine/inspection-migration/20260712-inspection-migration.md`
103
- - status: completed
104
- - current_slice: completed-20260712-repo-owned-agent-fleet
105
- - source_plan: `plans/archive/plan-20260712-2053-repo-owned-agent-fleet.md`
106
- - `tasks/workstreams/workflow-engine/inspection-migration/agent-fleet-specialists.md`
107
- - status: completed
108
- - current_slice: completed-20260713-policy-seed
109
- - source_plan: `plans/archive/plan-20260712-2215-agent-fleet-specialists.md`
100
+ - current_slice: completed-20260805-deployed-emitter-binding
101
+ - source_plan: plans/plan-20260805-0001-github-issues-158-159.md
110
102
 
111
103
  ## Current Session Projection
112
104
 
113
- - Durable progress lives under `tasks/workstreams/workflow-engine/inspection-migration`.
105
+ - Durable progress lives under `tasks/workstreams/verification/evals-checks`.
114
106
  - `tasks/current.md` is the tracked derived status snapshot; it is not a live lock or task source.
115
107
  - `tasks/todos.md` is the deferred-goal ledger; current execution slices stay in the active plan's `## Task Breakdown`.
116
108
  <!-- END ARCHITECTURE CONTRACT -->
package/README.es.md CHANGED
@@ -466,8 +466,8 @@ repositorio adopte la misma política.
466
466
 
467
467
  ## Versión actual
468
468
 
469
- - Paquete npm: `repo-harness@0.12.2`
470
- - Sello de workflow generado: `repo-harness@0.12.2+template@0.12.2`
469
+ - Paquete npm: `repo-harness@0.13.1`
470
+ - Sello de workflow generado: `repo-harness@0.13.1+template@0.13.1`
471
471
  - Repositorio de GitHub: `Ancienttwo/repo-harness`
472
472
  - Notas de versión e historial: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
473
473
 
package/README.fr.md CHANGED
@@ -461,8 +461,8 @@ adopte la même policy.
461
461
 
462
462
  ## Release actuelle
463
463
 
464
- - Package npm : `repo-harness@0.12.2`
465
- - Generated workflow stamp : `repo-harness@0.12.2+template@0.12.2`
464
+ - Package npm : `repo-harness@0.13.1`
465
+ - Generated workflow stamp : `repo-harness@0.13.1+template@0.13.1`
466
466
  - Dépôt GitHub : `Ancienttwo/repo-harness`
467
467
  - Notes et historique de release : [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
468
468
 
package/README.ja.md CHANGED
@@ -469,8 +469,8 @@ commit script や hooks に組み込まないでください。
469
469
 
470
470
  ## 現在の Release
471
471
 
472
- - npm package:`repo-harness@0.12.2`
473
- - Generated workflow stamp:`repo-harness@0.12.2+template@0.12.2`
472
+ - npm package:`repo-harness@0.13.1`
473
+ - Generated workflow stamp:`repo-harness@0.13.1+template@0.13.1`
474
474
  - GitHub repository:`Ancienttwo/repo-harness`
475
475
  - Release notes and history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
476
476
 
package/README.md CHANGED
@@ -441,8 +441,8 @@ repo-harness commit scripts or hooks unless that repo adopts the same policy.
441
441
 
442
442
  ## Current Release
443
443
 
444
- - npm package: `repo-harness@0.12.2`
445
- - Generated workflow stamp: `repo-harness@0.12.2+template@0.12.2`
444
+ - npm package: `repo-harness@0.13.1`
445
+ - Generated workflow stamp: `repo-harness@0.13.1+template@0.13.1`
446
446
  - GitHub repository: `Ancienttwo/repo-harness`
447
447
  - Release notes and history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
448
448
 
package/README.zh-CN.md CHANGED
@@ -448,8 +448,8 @@ policy。
448
448
 
449
449
  ## 当前 Release
450
450
 
451
- - npm package:`repo-harness@0.12.2`
452
- - Generated workflow stamp:`repo-harness@0.12.2+template@0.12.2`
451
+ - npm package:`repo-harness@0.13.1`
452
+ - Generated workflow stamp:`repo-harness@0.13.1+template@0.13.1`
453
453
  - GitHub repository:`Ancienttwo/repo-harness`
454
454
  - Release notes 和 history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
455
455
 
package/assets/AGENTS.md CHANGED
@@ -31,27 +31,27 @@ Owns the workflow-engine-contract-assets capability boundary declared in .ai/con
31
31
  <!-- BEGIN ARCHITECTURE CONTRACT -->
32
32
  ## Architecture Contract
33
33
 
34
- - Functional block: `.ai/harness/policy.json`
34
+ - Functional block: `assets/templates`
35
35
  - Capability ID: `workflow-engine-contract-assets`
36
- - Matched prefix: `.ai/harness/policy.json`
36
+ - Matched prefix: `assets/templates`
37
37
  - Architecture domain: `workflow-engine`
38
38
  - Architecture capability: `contract-assets`
39
39
  - Architecture module: `docs/architecture/modules/workflow-engine/contract-assets.md`
40
- - Last architecture event: 2026-07-30T20:51:16+0800
41
- - Last changed path: `.ai/harness/policy.json`
42
- - Severity: high
43
- - Change type: workflow-surface
40
+ - Last architecture event: 2026-08-05T00:46:13+0800
41
+ - Last changed path: `tasks/workstreams/workflow-engine/contract-assets/github-issues-158-159.md`
42
+ - Severity: medium
43
+ - Change type: workstream-sync
44
44
  - Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
45
- - Entrypoints: `.ai/harness/policy.json`
45
+ - Entrypoints: `assets/templates`
46
46
  - Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
47
47
  - Forbidden dependencies: Do not cross sibling app/service/package boundaries without an architecture snapshot or explicit plan.
48
- - Runtime path: `.ai/harness/policy.json`
48
+ - Runtime path: `assets/templates`
49
49
  - LSP/tooling profile: `typescript-lsp`
50
50
  - Verification: Use root required checks plus local commands recorded in this capability contract.
51
51
  - Latest snapshot: `(none yet)`
52
52
  - Semantic diagram source: `docs/architecture/modules/workflow-engine/contract-assets.md`
53
53
  - Latest human diagram: `(none yet)`
54
- - Pending architecture request: `docs/architecture/requests/workflow-engine-contract-assets.md`
54
+ - Pending architecture request: `(none)`
55
55
 
56
56
  ## Active Workstreams
57
57
 
@@ -71,6 +71,10 @@ Owns the workflow-engine-contract-assets capability boundary declared in .ai/con
71
71
  - status: completed
72
72
  - current_slice: completed-20260529-cleanup-script-policy
73
73
  - source_plan: (none)
74
+ - `tasks/workstreams/workflow-engine/contract-assets/github-issues-158-159.md`
75
+ - status: completed
76
+ - current_slice: completed-20260805-packaged-helper-projection
77
+ - source_plan: plans/plan-20260805-0001-github-issues-158-159.md
74
78
 
75
79
  ## Current Session Projection
76
80
 
package/assets/CLAUDE.md CHANGED
@@ -31,27 +31,27 @@ Owns the workflow-engine-contract-assets capability boundary declared in .ai/con
31
31
  <!-- BEGIN ARCHITECTURE CONTRACT -->
32
32
  ## Architecture Contract
33
33
 
34
- - Functional block: `.ai/harness/policy.json`
34
+ - Functional block: `assets/templates`
35
35
  - Capability ID: `workflow-engine-contract-assets`
36
- - Matched prefix: `.ai/harness/policy.json`
36
+ - Matched prefix: `assets/templates`
37
37
  - Architecture domain: `workflow-engine`
38
38
  - Architecture capability: `contract-assets`
39
39
  - Architecture module: `docs/architecture/modules/workflow-engine/contract-assets.md`
40
- - Last architecture event: 2026-07-30T20:51:16+0800
41
- - Last changed path: `.ai/harness/policy.json`
42
- - Severity: high
43
- - Change type: workflow-surface
40
+ - Last architecture event: 2026-08-05T00:46:13+0800
41
+ - Last changed path: `tasks/workstreams/workflow-engine/contract-assets/github-issues-158-159.md`
42
+ - Severity: medium
43
+ - Change type: workstream-sync
44
44
  - Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
45
- - Entrypoints: `.ai/harness/policy.json`
45
+ - Entrypoints: `assets/templates`
46
46
  - Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
47
47
  - Forbidden dependencies: Do not cross sibling app/service/package boundaries without an architecture snapshot or explicit plan.
48
- - Runtime path: `.ai/harness/policy.json`
48
+ - Runtime path: `assets/templates`
49
49
  - LSP/tooling profile: `typescript-lsp`
50
50
  - Verification: Use root required checks plus local commands recorded in this capability contract.
51
51
  - Latest snapshot: `(none yet)`
52
52
  - Semantic diagram source: `docs/architecture/modules/workflow-engine/contract-assets.md`
53
53
  - Latest human diagram: `(none yet)`
54
- - Pending architecture request: `docs/architecture/requests/workflow-engine-contract-assets.md`
54
+ - Pending architecture request: `(none)`
55
55
 
56
56
  ## Active Workstreams
57
57
 
@@ -71,6 +71,10 @@ Owns the workflow-engine-contract-assets capability boundary declared in .ai/con
71
71
  - status: completed
72
72
  - current_slice: completed-20260529-cleanup-script-policy
73
73
  - source_plan: (none)
74
+ - `tasks/workstreams/workflow-engine/contract-assets/github-issues-158-159.md`
75
+ - status: completed
76
+ - current_slice: completed-20260805-packaged-helper-projection
77
+ - source_plan: plans/plan-20260805-0001-github-issues-158-159.md
74
78
 
75
79
  ## Current Session Projection
76
80
 
@@ -49,10 +49,10 @@ Owns the runtime-harness-hook-adapters capability boundary declared in .ai/conte
49
49
  - Architecture domain: `runtime-harness`
50
50
  - Architecture capability: `hook-adapters`
51
51
  - Architecture module: `docs/architecture/modules/runtime-harness/hook-adapters.md`
52
- - Last architecture event: 2026-07-21T21:39:22+0800
53
- - Last changed path: `src/cli/hook/prompt-intents.ts`
54
- - Severity: high
55
- - Change type: workflow-surface
52
+ - Last architecture event: 2026-08-05T00:46:12+0800
53
+ - Last changed path: `tasks/workstreams/runtime-harness/hook-adapters/github-issues-158-159.md`
54
+ - Severity: medium
55
+ - Change type: workstream-sync
56
56
  - Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
57
57
  - Entrypoints: `src/cli/hook`
58
58
  - Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
@@ -67,7 +67,10 @@ Owns the runtime-harness-hook-adapters capability boundary declared in .ai/conte
67
67
 
68
68
  ## Active Workstreams
69
69
 
70
- - (none yet)
70
+ - `tasks/workstreams/runtime-harness/hook-adapters/github-issues-158-159.md`
71
+ - status: completed
72
+ - current_slice: completed-20260805-contract-scoped-check-repair
73
+ - source_plan: plans/plan-20260805-0001-github-issues-158-159.md
71
74
 
72
75
  ## Current Session Projection
73
76
 
@@ -49,10 +49,10 @@ Owns the runtime-harness-hook-adapters capability boundary declared in .ai/conte
49
49
  - Architecture domain: `runtime-harness`
50
50
  - Architecture capability: `hook-adapters`
51
51
  - Architecture module: `docs/architecture/modules/runtime-harness/hook-adapters.md`
52
- - Last architecture event: 2026-07-21T21:39:22+0800
53
- - Last changed path: `src/cli/hook/prompt-intents.ts`
54
- - Severity: high
55
- - Change type: workflow-surface
52
+ - Last architecture event: 2026-08-05T00:46:12+0800
53
+ - Last changed path: `tasks/workstreams/runtime-harness/hook-adapters/github-issues-158-159.md`
54
+ - Severity: medium
55
+ - Change type: workstream-sync
56
56
  - Module responsibility: Keep this block aligned with the local boundary described by surrounding human-owned context.
57
57
  - Entrypoints: `src/cli/hook`
58
58
  - Allowed dependencies: Follow root `AGENTS.md` / `CLAUDE.md` and this local contract.
@@ -67,7 +67,10 @@ Owns the runtime-harness-hook-adapters capability boundary declared in .ai/conte
67
67
 
68
68
  ## Active Workstreams
69
69
 
70
- - (none yet)
70
+ - `tasks/workstreams/runtime-harness/hook-adapters/github-issues-158-159.md`
71
+ - status: completed
72
+ - current_slice: completed-20260805-contract-scoped-check-repair
73
+ - source_plan: plans/plan-20260805-0001-github-issues-158-159.md
71
74
 
72
75
  ## Current Session Projection
73
76
 
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.12.2",
3
- "templateVersion": "0.12.2",
2
+ "version": "0.13.1",
3
+ "templateVersion": "0.13.1",
4
4
  "skillName": "repo-harness",
5
5
  "contractId": "tasks-first-harness-v1",
6
6
  "compatibility": {
@@ -235,6 +235,14 @@
235
235
  {
236
236
  "version": "0.12.2",
237
237
  "description": "Makes agent-fleet drift checks receipt-aware, hardens verifier environment and provenance boundaries, and routes Codex delegation through model-pinned App Threads with fail-closed fallbacks"
238
+ },
239
+ {
240
+ "version": "0.12.3",
241
+ "description": "Adds an opt-in Claude-host main-loop dispatch guard that denies orchestrator code edits with a dispatch-to-subagent instruction, and makes Claude-host hook fixtures hermetic against that guard's environment key"
242
+ },
243
+ {
244
+ "version": "0.13.0",
245
+ "description": "Adds the long-run continuation protocol with a read-only ContinuationEnvelopeV1 from state next, AttemptReceiptV1 liveness receipts, and a no-progress circuit breaker; makes contract-worktree and ship-worktrees closeout a crash-durable, exclusively owned CloseoutJournalV1 transaction with explicit recover inspect|abort|reconcile; and publishes the host conformance contract with a sprint-backlog grammar drift check"
238
246
  }
239
247
  ],
240
248
  "generatedProjectStamp": {