repo-harness 0.19.1 → 0.19.4

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 (119) hide show
  1. package/README.es.md +2 -2
  2. package/README.fr.md +2 -2
  3. package/README.ja.md +2 -2
  4. package/README.md +2 -2
  5. package/README.zh-CN.md +2 -2
  6. package/assets/reference-configs/external-tooling.md +52 -11
  7. package/assets/skill-commands/repo-harness-architecture/SKILL.md +53 -4
  8. package/assets/skill-version.json +2 -2
  9. package/assets/templates/helpers/architecture-event.ts +1 -3
  10. package/assets/templates/helpers/archive-workflow.sh +3 -0
  11. package/assets/templates/helpers/check-task-sync.sh +5 -0
  12. package/assets/templates/helpers/ensure-task-workflow.sh +2 -2
  13. package/assets/templates/helpers/heartbeat-triage.sh +1 -1
  14. package/assets/templates/helpers/install-agent-fleet.sh +18 -10
  15. package/assets/templates/helpers/sprint-backlog.sh +2 -2
  16. package/dist/hook-entry.js +11856 -11465
  17. package/dist/operator-ui/assets/index-BtBBFakS.css +1 -0
  18. package/dist/operator-ui/assets/index-f7BlYVSB.js +9 -0
  19. package/dist/operator-ui/index.html +2 -2
  20. package/package.json +3 -3
  21. package/scripts/akn00-native-execution-admission.ts +196 -0
  22. package/scripts/architecture-event.ts +1 -3
  23. package/scripts/archive-workflow.sh +3 -0
  24. package/scripts/axr5-archctx-clean-room.ts +1 -1
  25. package/scripts/axr6-stop-host-cycle.ts +3 -3
  26. package/scripts/axr7-consumer-e2e.ts +1 -1
  27. package/scripts/check-tarball-install-smoke.sh +7 -0
  28. package/scripts/check-task-sync.sh +5 -0
  29. package/scripts/ensure-task-workflow.sh +2 -2
  30. package/scripts/heartbeat-triage.sh +1 -1
  31. package/scripts/install-agent-fleet.sh +18 -10
  32. package/scripts/lib/project-init-lib.sh +2 -2
  33. package/scripts/me2b-runtime-admission-canary.ts +45 -13
  34. package/scripts/skill-surface-select.ts +12 -3
  35. package/scripts/sprint-backlog.sh +2 -2
  36. package/scripts/sync-codex-installed-copies.sh +7 -26
  37. package/src/cli/commands/architecture-projection.ts +3 -1
  38. package/src/cli/commands/capability-context.ts +11 -0
  39. package/src/cli/commands/fleet.ts +23 -1
  40. package/src/cli/commands/global-runtime.ts +6 -3
  41. package/src/cli/hook/mutation-observed.ts +3 -2
  42. package/src/cli/hook/session-context-budget.ts +1 -0
  43. package/src/cli/hook/session-context.ts +52 -1
  44. package/src/cli/hook/stop-handler.ts +43 -15
  45. package/src/cli/hook-entry.ts +4 -0
  46. package/src/cli/installer/install-profile.ts +1 -1
  47. package/src/cli/installer/managed-entries.ts +2 -1
  48. package/src/cli/mcp/engineer-tools.ts +47 -0
  49. package/src/cli/mcp/oauth.ts +30 -23
  50. package/src/cli/mcp/server.ts +10 -2
  51. package/src/cli/mcp/tools.ts +2 -1
  52. package/src/cli/mcp/transports/http.ts +8 -1
  53. package/src/core/architecture/projection.ts +57 -2
  54. package/src/core/fleet/board.ts +53 -24
  55. package/src/core/fleet/task-inbox-layout.ts +12 -0
  56. package/src/core/fleet/task-reply.ts +280 -0
  57. package/src/core/hook-work-budget.ts +5 -0
  58. package/src/core/operator/automation-summary.ts +87 -0
  59. package/src/core/operator/collaboration-snapshot.ts +25 -9
  60. package/src/core/operator/decision-inventory.ts +96 -0
  61. package/src/core/operator/fleet-snapshot.ts +20 -4
  62. package/src/core/operator/observation-identity.ts +4 -0
  63. package/src/core/operator/organization-snapshot.ts +139 -0
  64. package/src/core/operator/planning-snapshot.ts +117 -0
  65. package/src/core/operator/repository-snapshot.ts +39 -0
  66. package/src/core/operator/task-activity.ts +135 -0
  67. package/src/core/operator/task-context.ts +117 -0
  68. package/src/core/operator/task-history.ts +56 -0
  69. package/src/core/refactor/policy.ts +1 -1
  70. package/src/effects/architecture/archctx-provider.ts +87 -30
  71. package/src/effects/architecture/projection-acceptance.ts +173 -16
  72. package/src/effects/architecture/projection-continuation.ts +55 -0
  73. package/src/effects/architecture/projection-orchestrator.ts +9 -6
  74. package/src/effects/automation/budget-store.ts +2 -1
  75. package/src/effects/automation/campaign-step.ts +3 -3
  76. package/src/effects/engineers/binding-store.ts +4 -12
  77. package/src/effects/engineers/claim-actor-store.ts +9 -9
  78. package/src/effects/engineers/principal-store.ts +10 -12
  79. package/src/effects/engineers/task-inbox.ts +65 -0
  80. package/src/effects/engineers/verified-context-store.ts +137 -3
  81. package/src/effects/evidence/atomic-append.ts +7 -0
  82. package/src/effects/fleet/acquire.ts +19 -6
  83. package/src/effects/fleet/board.ts +14 -2
  84. package/src/effects/fleet/task-inbox-layout-migration.ts +417 -0
  85. package/src/effects/fleet/task-inbox-layout.ts +68 -0
  86. package/src/effects/fleet/task-inbox.ts +438 -36
  87. package/src/effects/operator/automation-summary.ts +146 -0
  88. package/src/effects/operator/collaboration-worker.ts +14 -8
  89. package/src/effects/operator/collaboration.ts +162 -50
  90. package/src/effects/operator/fleet-collector-process.ts +23 -6
  91. package/src/effects/operator/server.ts +395 -195
  92. package/src/effects/operator/task-activity.ts +46 -0
  93. package/src/effects/operator/task-context.ts +43 -0
  94. package/src/effects/operator/task-history.ts +105 -0
  95. package/src/effects/operator/task-read-process.ts +54 -0
  96. package/src/effects/publication/merge-readiness.ts +41 -9
  97. package/src/effects/refactor/recommendations.ts +2 -2
  98. package/src/effects/repo-registry.ts +3 -3
  99. package/src/effects/state/coordination-canonical-source.ts +4 -2
  100. package/src/effects/state/coordination-lease-store.ts +7 -19
  101. package/src/operator-web/App.tsx +295 -207
  102. package/src/operator-web/AutomationSummary.tsx +153 -0
  103. package/src/operator-web/OrganizationSummary.tsx +67 -0
  104. package/src/operator-web/PlanningView.tsx +53 -0
  105. package/src/operator-web/TaskEvidence.tsx +132 -0
  106. package/src/operator-web/TaskHistory.tsx +49 -0
  107. package/src/operator-web/fixture.ts +150 -17
  108. package/src/operator-web/i18n.ts +374 -4
  109. package/src/operator-web/repository-snapshot.ts +27 -0
  110. package/src/operator-web/styles.css +117 -9
  111. package/src/operator-web/task-activity.ts +11 -0
  112. package/src/operator-web/task-context.ts +11 -0
  113. package/src/operator-web/task-history.ts +12 -0
  114. package/src/operator-web/task-location.ts +30 -0
  115. package/src/operator-web/types.ts +111 -12
  116. package/src/operator-web/useObservationRefresh.ts +59 -0
  117. package/dist/operator-ui/assets/index-B8ckyb8w.js +0 -9
  118. package/dist/operator-ui/assets/index-BpvUpmy-.css +0 -1
  119. package/src/effects/operator/task-diff-worker.ts +0 -7
package/README.es.md CHANGED
@@ -702,8 +702,8 @@ repositorio adopte la misma política.
702
702
 
703
703
  ## Versión actual
704
704
 
705
- - Paquete npm: `repo-harness@0.19.1`
706
- - Sello de workflow generado: `repo-harness@0.19.1+template@0.19.1`
705
+ - Paquete npm: `repo-harness@0.19.4`
706
+ - Sello de workflow generado: `repo-harness@0.19.4+template@0.19.4`
707
707
  - Repositorio de GitHub: `Ancienttwo/repo-harness`
708
708
  - Notas de versión e historial: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
709
709
 
package/README.fr.md CHANGED
@@ -697,8 +697,8 @@ adopte la même policy.
697
697
 
698
698
  ## Release actuelle
699
699
 
700
- - Package npm : `repo-harness@0.19.1`
701
- - Generated workflow stamp : `repo-harness@0.19.1+template@0.19.1`
700
+ - Package npm : `repo-harness@0.19.4`
701
+ - Generated workflow stamp : `repo-harness@0.19.4+template@0.19.4`
702
702
  - Dépôt GitHub : `Ancienttwo/repo-harness`
703
703
  - Notes et historique de release : [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
704
704
 
package/README.ja.md CHANGED
@@ -694,8 +694,8 @@ commit script や hooks に組み込まないでください。
694
694
 
695
695
  ## 現在の Release
696
696
 
697
- - npm package:`repo-harness@0.19.1`
698
- - Generated workflow stamp:`repo-harness@0.19.1+template@0.19.1`
697
+ - npm package:`repo-harness@0.19.4`
698
+ - Generated workflow stamp:`repo-harness@0.19.4+template@0.19.4`
699
699
  - GitHub repository:`Ancienttwo/repo-harness`
700
700
  - Release notes and history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
701
701
 
package/README.md CHANGED
@@ -665,8 +665,8 @@ repo-harness commit scripts or hooks unless that repo adopts the same policy.
665
665
 
666
666
  ## Current Release
667
667
 
668
- - npm package: `repo-harness@0.19.1`
669
- - Generated workflow stamp: `repo-harness@0.19.1+template@0.19.1`
668
+ - npm package: `repo-harness@0.19.4`
669
+ - Generated workflow stamp: `repo-harness@0.19.4+template@0.19.4`
670
670
  - GitHub repository: `Ancienttwo/repo-harness`
671
671
  - Release notes and history: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
672
672
 
package/README.zh-CN.md CHANGED
@@ -630,8 +630,8 @@ commit script 或 hook,除非目标仓库采用同样的 policy。
630
630
 
631
631
  ## 当前 Release
632
632
 
633
- - npm package:`repo-harness@0.19.1`
634
- - Generated workflow stamp:`repo-harness@0.19.1+template@0.19.1`
633
+ - npm package:`repo-harness@0.19.4`
634
+ - Generated workflow stamp:`repo-harness@0.19.4+template@0.19.4`
635
635
  - GitHub repository:`Ancienttwo/repo-harness`
636
636
  - Release notes 和 history:[`docs/CHANGELOG.md`](docs/CHANGELOG.md)
637
637
 
@@ -637,16 +637,18 @@ mapping.
637
637
 
638
638
  | Source `model` | Codex `model` | Source `effort` | Codex `model_reasoning_effort` |
639
639
  |---|---|---|---|
640
- | `opus` | `gpt-5.6-terra` | `low`, `medium`, `high`, `xhigh`, `max` | same string, unchanged |
641
- | `sonnet`, `haiku` | `gpt-5.6-luna` | `low`, `medium`, `high`, `xhigh`, `max` | same string, unchanged |
642
- | `fable` | `gpt-5.6-sol` | `low`, `medium`, `high`, `xhigh`, `max` | same string, unchanged |
640
+ | `opus` | `gpt-6-astra` | `low`, `medium`, `high`, `xhigh`, `max` | same string, unchanged |
641
+ | `sonnet`, `haiku` | `gpt-6-luna` | `low`, `medium`, `high`, `xhigh`, `max` | same string, unchanged |
642
+ | `fable` | `gpt-6-sol` | `low`, `medium`, `high`, `xhigh`, `max` | same string, unchanged |
643
643
 
644
- Three per-agent target overrides are applied after tuple validation, on top of
644
+ Five per-agent target overrides are applied after tuple validation, on top of
645
645
  the family row above, and are the only model/effort remaps in the generator:
646
- `fast-worker` (`opus`/`medium`) targets `gpt-6-astra` at `low` (light) reasoning;
647
- `deep-worker` (`opus`/`high`) and `gatekeeper` (`opus`/`high`) both target
648
- `gpt-6-astra` at `medium` reasoning. Every other agent's Codex model and effort follow the family row
649
- unchanged.
646
+ `fast-worker` (`opus`/`medium`) targets `gpt-6-sol` at `medium` reasoning;
647
+ `deep-worker` (`opus`/`high`) targets `gpt-6-sol` at `xhigh` reasoning;
648
+ `gatekeeper` (`opus`/`high`) targets `gpt-6-astra` at `medium` reasoning;
649
+ `root-cause-prover` and `harness-evaluator` (`opus`/`high`) target `gpt-6-sol`
650
+ at `high` reasoning.
651
+ Every other agent's Codex model and effort follow the family row unchanged.
650
652
 
651
653
  `fast-worker`, `deep-worker`, `root-cause-prover`, and `harness-evaluator`
652
654
  receive `sandbox_mode = "workspace-write"`; every other role receives
@@ -951,9 +953,27 @@ global automatic mode does not authorize ownership adoption or semantic acceptan
951
953
  Use `repo-harness architecture-projection policy --json` to inspect the global
952
954
  source path, initialization state and effective execution settings without a
953
955
  provider process. `repo-harness architecture-projection status --json` adds the
954
- exact package capability handshake and project apply readiness. A repo that
955
- vendors a mismatching provider still fails closed; the global setting does not
956
- relax version or executable identity checks.
956
+ exact package capability handshake and project apply readiness. The running
957
+ repo-harness package owns the `archctx` executable and exact dependency version;
958
+ its dependency tree is refreshed by the global update transaction. A target
959
+ repository's `node_modules/archctx` never overrides that runtime dependency.
960
+ Source-checkout execution uses that checkout's repo-harness dependencies, and
961
+ candidate verification may explicitly select the candidate package root.
962
+ Missing or mismatching runtime dependencies still fail closed with no target-repo
963
+ fallback. Project model, ownership and snapshot checks remain repository-local.
964
+
965
+ SessionStart also gives the Agent read-only model coverage guidance under this
966
+ global provider setting; no per-repo execution toggle is needed. It observes empty
967
+ capability models, missing declared module documents, and tracked package roots
968
+ with no capability match or a shared ancestor capability. These are bounded
969
+ inspection prompts, not inferred semantic nodes. The Agent uses the
970
+ `repo-harness-architecture` skill to inspect source evidence and decide boundaries
971
+ within the authorized task, then creates nodes through archctx ChangeSets and
972
+ runs the existing projection. An intentional umbrella is valid. Hooks do not
973
+ write model YAML, and unrelated coverage findings remain advice. The manifest
974
+ inventory is limited to Git-tracked `package.json` paths; this is not a complete
975
+ semantic coverage audit for every language or untracked source tree. Inspection
976
+ errors become SessionStart provider diagnostics instead of invented model facts.
957
977
 
958
978
  When enabled, Stop observes the Git changed set and coalesces eligible paths
959
979
  into one durable projection job, excludes
@@ -989,6 +1009,27 @@ letter into its terminal job receipt, and is byte-idempotent on the same signal
989
1009
  and approval reference. `status --json` reports unresolved or invalid
990
1010
  acceptance evidence, and the strict architecture gate fails closed on either;
991
1011
  the command never chooses or infers an architecture decision.
1012
+
1013
+ For accepted apply, acceptance records an exact request intent before invoking
1014
+ ArchContext and the original result before running refresh actions. A retry
1015
+ with this pending evidence uses the provider's `projection-apply-readback-v1`
1016
+ capability. Readback returns the immutable committed receipt, original refresh
1017
+ signals, and a freshly verified current fixed point without changing provider
1018
+ delivery state. The same candidate, approval reference, request, and snapshot
1019
+ must still match. If the provider proves the exact request has no committed
1020
+ receipt, only an intent without a recorded result may retry apply; the provider
1021
+ checks the receipt again within its writer lock before writing. Errors and
1022
+ missing capabilities never authorize another apply.
1023
+
1024
+ To recover an older interrupted accept that has no local intent, run
1025
+ `repo-harness architecture-projection accept --recover --signal-id <sha256> --approval-reference <original-event-id> --json`.
1026
+ This explicit command only resumes a committed apply. It fails if the provider
1027
+ has no receipt, and never creates an apply or poisons a fresh candidate with an
1028
+ unrecoverable intent. Adoption recovery is unsupported and fails closed; it is
1029
+ not converted into apply. Pending evidence remains content-bound local runtime
1030
+ state after completion; the final acceptance receipt is the resolution authority.
1031
+ The readback capability must be present in both the packaged CLI and its daemon;
1032
+ installing a new CLI alone does not upgrade a running daemon.
992
1033
  If a candidate's exact reason set is only `verified-flow-proof-changed`, use
993
1034
  `repo-harness architecture-projection reconcile --signal-id <sha256> --json`
994
1035
  after refreshing the configured CodeGraph index. Reconciliation runs the same
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: repo-harness-architecture
3
- description: Resolves repo-harness architecture drift requests and updates architecture docs or diagrams without running full init, migrate, or upgrade.
4
- when_to_use: "repo-harness-architecture, architecture drift, architecture doc, architecture diagram, update architecture index, resolve architecture request"
3
+ description: Handles architecture coverage guidance, capability registration and drift requests through the existing model and projection authorities.
4
+ when_to_use: "repo-harness-architecture, architecture drift, architecture doc, architecture diagram, architecture model guidance, register capability, update architecture index, resolve architecture request"
5
5
  ---
6
6
 
7
7
  # repo-harness-architecture
@@ -12,7 +12,7 @@ architecture documentation, drift-request, or diagram pass.
12
12
  ## Protocol
13
13
 
14
14
  1. Confirm the target repo path and architecture scope.
15
- 2. Inspect `docs/architecture/index.md` and pending files under `docs/architecture/requests/`.
15
+ 2. Inspect `docs/architecture/index.md`, `.archcontext/model/nodes/`, and pending files under `docs/architecture/requests/`. For architecture model guidance or a registration scope, follow the coverage procedure below even when no drift request exists.
16
16
  3. When the scope maps to repo code or config, resolve the capability with:
17
17
  - `repo-harness run capability-resolver match --repo <repo> --path <path> --format json`
18
18
  4. Update the smallest relevant architecture artifact:
@@ -28,9 +28,58 @@ architecture documentation, drift-request, or diagram pass.
28
28
  - `repo-harness run capability-resolver validate --repo <repo> --format text`
29
29
  - `repo-harness run check-task-workflow --strict` when repo workflow surfaces changed
30
30
 
31
+ ## Coverage and Agent-owned registration
32
+
33
+ SessionStart automatically supplies read-only coverage observations when the global
34
+ architecture provider is enabled and the repo selects `capability_source: archcontext`.
35
+ An empty model, missing module docs, unmatched tracked package roots, or multiple
36
+ packages sharing an ancestor capability are reasons to inspect, not proof that a new
37
+ capability is required. Hooks do not decide responsibilities or write nodes.
38
+
39
+ 1. Read the existing semantic architecture docs and trace the relevant entrypoints,
40
+ dependencies, ownership and verification in source. Use CodeGraph when indexed.
41
+ Compare `repo-harness run capability-resolver list --format json` and
42
+ `repo-harness run capability-resolver match --path <source-path> --format json`.
43
+ Package layout is inventory evidence; it does not establish semantic boundaries.
44
+ 2. Give a concrete recommendation: retain an intentional umbrella, create a justified
45
+ capability, or restore a missing projection. Include source evidence, responsibility,
46
+ proposed prefixes, overlap with existing nodes, contract paths and verification.
47
+ Within already authorized architecture work, the Agent may decide and execute;
48
+ do not ask for the same approval again. During unrelated work, keep this as advice.
49
+ 3. For a new capability, author a complete `archcontext.node/v2` body with an
50
+ `id` of `capability.<domain>.<name>`, `kind: capability`, `status: active`, `name`,
51
+ `summary`, `responsibilities`, `source.include`, and `extensions` containing
52
+ `contractFiles.agents`, `contractFiles.claude`, `lspProfile`, and `verification`.
53
+ Use the current model schema and source evidence; do not copy an example's semantics.
54
+ 4. Resolve the owned archctx executable from
55
+ `repo-harness architecture-projection status --json` (`projectionProvider.binaryPath`).
56
+ Require ready status and use that binary with its supported Node runtime in the
57
+ target repo. Do not install a repo-local archctx or select an unrelated PATH copy.
58
+ The following `archctx` notation means that resolved executable:
59
+
60
+ ```text
61
+ archctx plan --id <unique-changeset-id> --path .archcontext/model/nodes/capability.<domain>.<name>.yaml --expected-hash missing --body <complete-YAML-as-one-argument> --format json
62
+ archctx apply --id <same-changeset-id> --approved --expected-worktree-digest <data.draft.base.worktreeDigest-from-plan> --format json
63
+ ```
64
+
65
+ Inspect the plan's full draft and preview before applying. Keep the same daemon
66
+ and ChangeSet ID; pass body via a structured process argument, not shell interpolation.
67
+ `--approved` records the authorized Agent decision; it does not grant extra scope.
68
+ If the worktree changed, re-plan and re-inspect. In archctx 0.5.10 this public `plan`
69
+ route creates one entity only. It is not an update route: when an existing node must
70
+ change, report the required update and use a supported typed ChangeSet authoring
71
+ surface if available; do not overwrite YAML or disguise an update as creation.
72
+ 5. Run `archctx validate --format json`, verify source matching with capability-resolver,
73
+ then `repo-harness architecture-projection plan --json --changed-path <node-path>`
74
+ and `repo-harness architecture-projection apply --json --changed-path <node-path>`.
75
+ Verify the expected module document exists and run the protocol's architecture checks.
76
+ Missing docs for an unchanged node need projection, not a duplicate node. Generated
77
+ module regions belong to archctx; preserve human-owned prose. Resolve any resulting
78
+ drift request through the normal request protocol.
79
+
31
80
  ## Failure Modes
32
81
 
33
- - If no pending architecture request exists, report `no-change` and do not invent one.
82
+ - If no pending architecture request exists, do not invent one. Coverage and registration work can proceed independently; report `no-change` only after inspecting the requested coverage scope.
34
83
  - If capability resolution is ambiguous, stop at the matching paths and ask for a narrower scope.
35
84
  - If `check-architecture-sync.sh` blocks in strict mode, resolve or archive the pending request card for the touched capability before finishing the worktree.
36
85
  - If diagram validation fails, fix the Mermaid Markdown source or report the validation failure; do not substitute HTML.
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.19.1",
3
- "templateVersion": "0.19.1",
2
+ "version": "0.19.4",
3
+ "templateVersion": "0.19.4",
4
4
  "skillName": "repo-harness",
5
5
  "contractId": "tasks-first-harness-v1",
6
6
  "compatibility": {
@@ -713,9 +713,7 @@ function renderRequiredFollowUp(event: ArchitectureEvent): string {
713
713
 
714
714
  function renderRequestCard(event: ArchitectureEvent, events: ArchitectureEvent[], existingMetadata: Record<string, string>): string {
715
715
  const firstDetected =
716
- existingMetadata.Detected ||
717
- events
718
- .map((entry) => entry.ts || "")
716
+ [existingMetadata.Detected, ...events.map((entry) => entry.ts || "")]
719
717
  .filter(Boolean)
720
718
  .sort()[0] ||
721
719
  event.ts ||
@@ -491,6 +491,9 @@ rewrite_archive_projection_file() {
491
491
  awk \
492
492
  -v source_path="${archive_projection_sources[$index]}" \
493
493
  -v destination_path="${archive_projection_destinations[$index]}" '
494
+ # Executable acceptance criteria are frozen authority, not navigation.
495
+ /^## / { verification_plan = ($0 ~ /^## Verification Plan[[:space:]]*$/) }
496
+ verification_plan { print; next }
494
497
  {
495
498
  remaining = $0
496
499
  rendered = ""
@@ -356,6 +356,11 @@ for file in "${changed_files[@]}"; do
356
356
  done
357
357
  if ! workflow_profile="$("${repo_harness_cli[@]}" state resolve --json --field workflow_profile --target-path "${profile_paths[@]}")"; then
358
358
  echo "[task-sync] Workflow profile resolution failed; no lite exemption admitted." >&2
359
+ # Failed verification can itself block state resolution. Keep the failure,
360
+ # but expose the exact binding consumed above so recovery needs no cache reset
361
+ # or trust in a blocked resolver's profile field.
362
+ echo "[task-sync] To satisfy task-sync, record the current diff in a changed canonical workflow artifact with this exact line:" >&2
363
+ printf '> **Substantive Change SHA256**: `%s`\n' "$substantive_digest" >&2
359
364
  exit 1
360
365
  fi
361
366
  case "$workflow_profile" in
@@ -1016,8 +1016,8 @@ ARCHITECTURE_INDEX_EOF
1016
1016
  "provider": "archctx",
1017
1017
  "proposal_author": "local",
1018
1018
  "stages": {
1019
- "scan": { "provider_version": "0.5.10", "required_features": ["module-statistics-v1", "refactor-assessment-v1", "recommendation-v3"] },
1020
- "verify": { "provider_version": "0.5.10", "required_features": ["refactor-resolution-v1"] }
1019
+ "scan": { "provider_version": "0.5.13", "required_features": ["module-statistics-v1", "refactor-assessment-v1", "recommendation-v3"] },
1020
+ "verify": { "provider_version": "0.5.13", "required_features": ["refactor-resolution-v1"] }
1021
1021
  },
1022
1022
  "workflow_routing": {
1023
1023
  "module_refactor": "work_package",
@@ -179,7 +179,7 @@ run_workflow_check() {
179
179
  if [[ "$status" -eq 0 ]]; then
180
180
  add_entry "workflow-check" "pass" "check-task-workflow.sh --strict passed" "$output"
181
181
  else
182
- summary="$(printf '%s\n' "$output" | first_line)"
182
+ summary="$(first_line <<<"$output")"
183
183
  add_entry "workflow-check" "fail" "${summary:-check-task-workflow.sh --strict failed}" "$output"
184
184
  fi
185
185
  }
@@ -16,8 +16,14 @@ bun_version_is_supported() {
16
16
 
17
17
  RUNTIME_BIN=""
18
18
  BUN_VERSION=""
19
- PATH_BUN="$(command -v bun 2>/dev/null || true)"
20
- for candidate in "$PATH_BUN" "${HOME}/.bun/bin/bun"; do
19
+ # A caller that already validated its Bun hands it over explicitly; only a
20
+ # standalone invocation discovers Bun by name.
21
+ if [[ -n "${REPO_HARNESS_BUN_BIN:-}" ]]; then
22
+ BUN_CANDIDATES=("$REPO_HARNESS_BUN_BIN")
23
+ else
24
+ BUN_CANDIDATES=("$(command -v bun 2>/dev/null || true)" "${HOME}/.bun/bin/bun")
25
+ fi
26
+ for candidate in "${BUN_CANDIDATES[@]}"; do
21
27
  [[ -n "$candidate" && -x "$candidate" ]] || continue
22
28
  candidate_version="$("$candidate" --version 2>/dev/null || true)"
23
29
  [[ -n "$BUN_VERSION" ]] || BUN_VERSION="$candidate_version"
@@ -136,19 +142,21 @@ function buildFamilyEffortMap(sourceLabel, targetModel, targetLabel) {
136
142
  }
137
143
 
138
144
  const MODEL_EFFORT_MAP = {
139
- opus: buildFamilyEffortMap("Opus", "gpt-5.6-terra", "GPT-5.6 Terra"),
140
- sonnet: buildFamilyEffortMap("Sonnet", "gpt-5.6-luna", "GPT-5.6 Luna"),
141
- haiku: buildFamilyEffortMap("Haiku", "gpt-5.6-luna", "GPT-5.6 Luna"),
142
- fable: buildFamilyEffortMap("Fable", "gpt-5.6-sol", "GPT-5.6 Sol"),
145
+ opus: buildFamilyEffortMap("Opus", "gpt-6-astra", "GPT-6 Astra"),
146
+ sonnet: buildFamilyEffortMap("Sonnet", "gpt-6-luna", "GPT-6 Luna"),
147
+ haiku: buildFamilyEffortMap("Haiku", "gpt-6-luna", "GPT-6 Luna"),
148
+ fable: buildFamilyEffortMap("Fable", "gpt-6-sol", "GPT-6 Sol"),
143
149
  };
144
150
 
145
151
  // Per-agent Codex target overrides — the only model/effort remaps in the fleet.
146
- // fast-worker targets Astra at low reasoning; deep-worker and gatekeeper
147
- // target Astra at medium. Everything else follows the family default.
152
+ // Execution and diagnostic roles use Sol or Luna; the gatekeeper uses Astra.
153
+ // Explorer and deep-reasoner follow the family default.
148
154
  const AGENT_TARGET_OVERRIDES = {
149
- "fast-worker": { model: "gpt-6-astra", effort: "low", targetDescription: "GPT-6 Astra at low reasoning" },
150
- "deep-worker": { model: "gpt-6-astra", effort: "medium", targetDescription: "GPT-6 Astra at medium reasoning" },
155
+ "fast-worker": { model: "gpt-6-sol", effort: "medium", targetDescription: "GPT-6 Sol at medium reasoning" },
156
+ "deep-worker": { model: "gpt-6-sol", effort: "xhigh", targetDescription: "GPT-6 Sol at xhigh reasoning" },
151
157
  gatekeeper: { model: "gpt-6-astra", effort: "medium", targetDescription: "GPT-6 Astra at medium reasoning" },
158
+ "root-cause-prover": { model: "gpt-6-sol", effort: "high", targetDescription: "GPT-6 Sol at high reasoning" },
159
+ "harness-evaluator": { model: "gpt-6-sol", effort: "high", targetDescription: "GPT-6 Sol at high reasoning" },
152
160
  };
153
161
 
154
162
  function readSource(agent) {
@@ -486,7 +486,7 @@ backlog_counts() {
486
486
 
487
487
  next_pending_row() {
488
488
  local file="$1"
489
- backlog_rows "$file" | awk -F '\t' '$2 == "[ ]" { print; exit }'
489
+ backlog_rows "$file" | awk -F '\t' '!found && $2 == "[ ]" { print; found = 1 }'
490
490
  }
491
491
 
492
492
  # Mint one persisted task id: 32 random bytes rendered as lowercase hex. A task
@@ -1043,7 +1043,7 @@ cmd_start_task() {
1043
1043
  echo "sprint-backlog: task reference '$task_ref' is ambiguous (${match_count} backlog rows match); fix duplicate indices or task names first" >&2
1044
1044
  exit 1
1045
1045
  fi
1046
- target_row="$(backlog_rows "$sprint_file" | TASK_REF="$task_ref" awk -F '\t' '$1 == ENVIRON["TASK_REF"] || $3 == ENVIRON["TASK_REF"] { print; exit }')"
1046
+ target_row="$(backlog_rows "$sprint_file" | TASK_REF="$task_ref" awk -F '\t' '!found && ($1 == ENVIRON["TASK_REF"] || $3 == ENVIRON["TASK_REF"]) { print; found = 1 }')"
1047
1047
 
1048
1048
  local target_index target_status target_task target_mode target_acceptance
1049
1049
  target_index="$(printf '%s' "$target_row" | cut -f1)"