codex-orchestrator 2.0.2 → 2.0.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 (221) hide show
  1. package/CHANGELOG.md +44 -426
  2. package/README.md +135 -34
  3. package/dist/src/index.d.ts +11 -1
  4. package/dist/src/index.d.ts.map +1 -1
  5. package/dist/src/index.js +5 -0
  6. package/dist/src/index.js.map +1 -1
  7. package/dist/src/v2/acceptance-proof.d.ts +3 -0
  8. package/dist/src/v2/acceptance-proof.d.ts.map +1 -1
  9. package/dist/src/v2/acceptance-proof.js +2 -8
  10. package/dist/src/v2/acceptance-proof.js.map +1 -1
  11. package/dist/src/v2/adapters/gh-issue-adapter.d.ts +5 -3
  12. package/dist/src/v2/adapters/gh-issue-adapter.d.ts.map +1 -1
  13. package/dist/src/v2/adapters/gh-issue-adapter.js +67 -12
  14. package/dist/src/v2/adapters/gh-issue-adapter.js.map +1 -1
  15. package/dist/src/v2/adapters/issues.d.ts +16 -2
  16. package/dist/src/v2/adapters/issues.d.ts.map +1 -1
  17. package/dist/src/v2/adapters/issues.js +15 -5
  18. package/dist/src/v2/adapters/issues.js.map +1 -1
  19. package/dist/src/v2/adapters/mission-coordinator-lock.d.ts +1 -0
  20. package/dist/src/v2/adapters/mission-coordinator-lock.d.ts.map +1 -1
  21. package/dist/src/v2/adapters/mission-coordinator-lock.js +5 -1
  22. package/dist/src/v2/adapters/mission-coordinator-lock.js.map +1 -1
  23. package/dist/src/v2/cli-contract.d.ts +3 -3
  24. package/dist/src/v2/cli-contract.d.ts.map +1 -1
  25. package/dist/src/v2/cli-contract.js +9 -1
  26. package/dist/src/v2/cli-contract.js.map +1 -1
  27. package/dist/src/v2/cli.d.ts +24 -0
  28. package/dist/src/v2/cli.d.ts.map +1 -0
  29. package/dist/src/v2/{candidate-cli.js → cli.js} +30 -26
  30. package/dist/src/v2/cli.js.map +1 -0
  31. package/dist/src/v2/code-review-report.d.ts +66 -0
  32. package/dist/src/v2/code-review-report.d.ts.map +1 -0
  33. package/dist/src/v2/code-review-report.js +259 -0
  34. package/dist/src/v2/code-review-report.js.map +1 -0
  35. package/dist/src/v2/codex-process.d.ts +8 -1
  36. package/dist/src/v2/codex-process.d.ts.map +1 -1
  37. package/dist/src/v2/codex-process.js +22 -0
  38. package/dist/src/v2/codex-process.js.map +1 -1
  39. package/dist/src/v2/config.d.ts +4 -3
  40. package/dist/src/v2/config.d.ts.map +1 -1
  41. package/dist/src/v2/config.js +8 -3
  42. package/dist/src/v2/config.js.map +1 -1
  43. package/dist/src/v2/contained-report-operation.d.ts +100 -0
  44. package/dist/src/v2/contained-report-operation.d.ts.map +1 -0
  45. package/dist/src/v2/contained-report-operation.js +200 -0
  46. package/dist/src/v2/contained-report-operation.js.map +1 -0
  47. package/dist/src/v2/containment.d.ts +10 -0
  48. package/dist/src/v2/containment.d.ts.map +1 -1
  49. package/dist/src/v2/containment.js +49 -1
  50. package/dist/src/v2/containment.js.map +1 -1
  51. package/dist/src/v2/direct-delivery.d.ts +96 -0
  52. package/dist/src/v2/direct-delivery.d.ts.map +1 -0
  53. package/dist/src/v2/direct-delivery.js +482 -0
  54. package/dist/src/v2/direct-delivery.js.map +1 -0
  55. package/dist/src/v2/immutable-workflow-publisher.d.ts +40 -0
  56. package/dist/src/v2/immutable-workflow-publisher.d.ts.map +1 -0
  57. package/dist/src/v2/immutable-workflow-publisher.js +218 -0
  58. package/dist/src/v2/immutable-workflow-publisher.js.map +1 -0
  59. package/dist/src/v2/implementation-reviewer.d.ts +81 -0
  60. package/dist/src/v2/implementation-reviewer.d.ts.map +1 -0
  61. package/dist/src/v2/implementation-reviewer.js +157 -0
  62. package/dist/src/v2/implementation-reviewer.js.map +1 -0
  63. package/dist/src/v2/owner-control-lock.d.ts +41 -0
  64. package/dist/src/v2/owner-control-lock.d.ts.map +1 -0
  65. package/dist/src/v2/owner-control-lock.js +174 -0
  66. package/dist/src/v2/owner-control-lock.js.map +1 -0
  67. package/dist/src/v2/proof-report.d.ts.map +1 -1
  68. package/dist/src/v2/proof-report.js +55 -29
  69. package/dist/src/v2/proof-report.js.map +1 -1
  70. package/dist/src/v2/route-continuations.d.ts +32 -0
  71. package/dist/src/v2/route-continuations.d.ts.map +1 -0
  72. package/dist/src/v2/route-continuations.js +2 -0
  73. package/dist/src/v2/route-continuations.js.map +1 -0
  74. package/dist/src/v2/route-coordinator.d.ts +77 -0
  75. package/dist/src/v2/route-coordinator.d.ts.map +1 -0
  76. package/dist/src/v2/route-coordinator.js +370 -0
  77. package/dist/src/v2/route-coordinator.js.map +1 -0
  78. package/dist/src/v2/route-decision.d.ts +129 -0
  79. package/dist/src/v2/route-decision.d.ts.map +1 -0
  80. package/dist/src/v2/route-decision.js +400 -0
  81. package/dist/src/v2/route-decision.js.map +1 -0
  82. package/dist/src/v2/run-issue.d.ts +64 -6
  83. package/dist/src/v2/run-issue.d.ts.map +1 -1
  84. package/dist/src/v2/run-issue.js +962 -92
  85. package/dist/src/v2/run-issue.js.map +1 -1
  86. package/dist/src/v2/run-store.d.ts +25 -1
  87. package/dist/src/v2/run-store.d.ts.map +1 -1
  88. package/dist/src/v2/run-store.js +129 -4
  89. package/dist/src/v2/run-store.js.map +1 -1
  90. package/dist/src/v2/runtime-assets.d.ts +15 -13
  91. package/dist/src/v2/runtime-assets.d.ts.map +1 -1
  92. package/dist/src/v2/runtime-assets.js +263 -416
  93. package/dist/src/v2/runtime-assets.js.map +1 -1
  94. package/dist/src/v2/runtime.d.ts +17 -9
  95. package/dist/src/v2/runtime.d.ts.map +1 -1
  96. package/dist/src/v2/runtime.js +564 -64
  97. package/dist/src/v2/runtime.js.map +1 -1
  98. package/dist/src/v2/setup-cli.d.ts.map +1 -1
  99. package/dist/src/v2/setup-cli.js +4 -10
  100. package/dist/src/v2/setup-cli.js.map +1 -1
  101. package/dist/src/v2/setup-runtime.d.ts.map +1 -1
  102. package/dist/src/v2/setup-runtime.js +19 -131
  103. package/dist/src/v2/setup-runtime.js.map +1 -1
  104. package/dist/src/v2/setup-store.d.ts +0 -5
  105. package/dist/src/v2/setup-store.d.ts.map +1 -1
  106. package/dist/src/v2/setup-store.js +3 -106
  107. package/dist/src/v2/setup-store.js.map +1 -1
  108. package/dist/src/v2/setup.d.ts +6 -43
  109. package/dist/src/v2/setup.d.ts.map +1 -1
  110. package/dist/src/v2/setup.js +13 -192
  111. package/dist/src/v2/setup.js.map +1 -1
  112. package/dist/src/v2/spec-coordinator.d.ts +85 -0
  113. package/dist/src/v2/spec-coordinator.d.ts.map +1 -0
  114. package/dist/src/v2/spec-coordinator.js +88 -0
  115. package/dist/src/v2/spec-coordinator.js.map +1 -0
  116. package/dist/src/v2/spec-delivery.d.ts +143 -0
  117. package/dist/src/v2/spec-delivery.d.ts.map +1 -0
  118. package/dist/src/v2/spec-delivery.js +401 -0
  119. package/dist/src/v2/spec-delivery.js.map +1 -0
  120. package/dist/src/v2/triage-route.d.ts +68 -0
  121. package/dist/src/v2/triage-route.d.ts.map +1 -0
  122. package/dist/src/v2/triage-route.js +223 -0
  123. package/dist/src/v2/triage-route.js.map +1 -0
  124. package/dist/src/v2/waiting-human-coordinator.d.ts +49 -0
  125. package/dist/src/v2/waiting-human-coordinator.d.ts.map +1 -0
  126. package/dist/src/v2/waiting-human-coordinator.js +509 -0
  127. package/dist/src/v2/waiting-human-coordinator.js.map +1 -0
  128. package/dist/src/v2/waiting-human.d.ts +143 -0
  129. package/dist/src/v2/waiting-human.d.ts.map +1 -0
  130. package/dist/src/v2/waiting-human.js +408 -0
  131. package/dist/src/v2/waiting-human.js.map +1 -0
  132. package/dist/src/v2/workflow-assets.d.ts +98 -0
  133. package/dist/src/v2/workflow-assets.d.ts.map +1 -0
  134. package/dist/src/v2/workflow-assets.js +646 -0
  135. package/dist/src/v2/workflow-assets.js.map +1 -0
  136. package/docs/deep-dive.md +275 -52
  137. package/internal-workflow/docs/agents/bug-workflow-routing.md +24 -0
  138. package/internal-workflow/docs/agents/bugfix-quality-gate.md +11 -0
  139. package/internal-workflow/docs/agents/coding-skill-routing.md +123 -0
  140. package/internal-workflow/docs/agents/confidence-rubric.md +65 -0
  141. package/internal-workflow/docs/agents/contract-test-ledger.md +60 -0
  142. package/internal-workflow/docs/agents/review-gates.md +42 -0
  143. package/internal-workflow/docs/agents/review-protocol.md +98 -0
  144. package/internal-workflow/docs/agents/tool-usage.md +88 -0
  145. package/internal-workflow/evals/coding-skill-evals.json +66 -0
  146. package/internal-workflow/manifest.json +1 -0
  147. package/internal-workflow/operations/acceptance-proof/SKILL.md +9 -0
  148. package/internal-workflow/operations/ambiguity-review/SKILL.md +5 -0
  149. package/internal-workflow/operations/code-review/SKILL.md +23 -0
  150. package/internal-workflow/operations/implementation/SKILL.md +24 -0
  151. package/internal-workflow/operations/spec-author/SKILL.md +12 -0
  152. package/internal-workflow/operations/spec-review/SKILL.md +12 -0
  153. package/internal-workflow/operations/triage/SKILL.md +12 -0
  154. package/internal-workflow/profiles/analyst_deep.toml +9 -0
  155. package/internal-workflow/profiles/implementer_standard.toml +9 -0
  156. package/internal-workflow/profiles/proof_agent.toml +8 -0
  157. package/internal-workflow/profiles/reviewer_deep.toml +9 -0
  158. package/internal-workflow/profiles/reviewer_standard.toml +9 -0
  159. package/internal-workflow/schemas/ambiguity-review-v1.json +1 -0
  160. package/internal-workflow/schemas/code-review-v1.json +1 -0
  161. package/internal-workflow/schemas/implementation-report-v1.json +1 -0
  162. package/internal-workflow/schemas/proof-report-v1.json +1 -0
  163. package/internal-workflow/schemas/spec-author-v1.json +1 -0
  164. package/internal-workflow/schemas/spec-review-v1.json +30 -0
  165. package/internal-workflow/schemas/triage-route-v1.json +1 -0
  166. package/internal-workflow/skills/acceptance-proof/agents/openai.yaml +6 -0
  167. package/{internal-skills → internal-workflow/skills}/agent-auto/SKILL.md +6 -1
  168. package/internal-workflow/skills/agent-auto/agents/openai.yaml +6 -0
  169. package/internal-workflow/skills/code-debugger/SKILL.md +122 -0
  170. package/internal-workflow/skills/code-debugger/agents/openai.yaml +7 -0
  171. package/internal-workflow/skills/code-review/SKILL.md +279 -0
  172. package/internal-workflow/skills/code-review/agents/openai.yaml +4 -0
  173. package/internal-workflow/skills/code-review/references/bug-classes.md +56 -0
  174. package/internal-workflow/skills/code-review/references/cleanup-lens.md +52 -0
  175. package/internal-workflow/skills/code-review/references/framework-lenses.md +34 -0
  176. package/internal-workflow/skills/code-review/references/targeted-recipes.md +49 -0
  177. package/internal-workflow/skills/diagnosing-bugs/SKILL.md +138 -0
  178. package/internal-workflow/skills/diagnosing-bugs/agents/openai.yaml +6 -0
  179. package/internal-workflow/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
  180. package/internal-workflow/skills/implementation-spec-maker/SKILL.md +102 -0
  181. package/internal-workflow/skills/implementation-spec-maker/agents/openai.yaml +6 -0
  182. package/internal-workflow/skills/implementation-spec-maker/references/source-modes.md +31 -0
  183. package/internal-workflow/skills/implementation-spec-maker/references/spec-template.md +146 -0
  184. package/internal-workflow/skills/implementation-spec-review/SKILL.md +115 -0
  185. package/internal-workflow/skills/implementation-spec-review/agents/openai.yaml +6 -0
  186. package/internal-workflow/skills/implementation-spec-review/evals/evals.json +24 -0
  187. package/internal-workflow/skills/implementation-spec-review/references/review-loop.md +93 -0
  188. package/internal-workflow/skills/small-task-implementer/SKILL.md +104 -0
  189. package/internal-workflow/skills/small-task-implementer/agents/openai.yaml +6 -0
  190. package/internal-workflow/skills/spec-implementer/SKILL.md +126 -0
  191. package/internal-workflow/skills/spec-implementer/agents/openai.yaml +6 -0
  192. package/internal-workflow/skills/spec-implementer/evals/evals.json +30 -0
  193. package/internal-workflow/skills/spec-implementer/references/review-loop.md +94 -0
  194. package/internal-workflow/skills/tdd/SKILL.md +72 -0
  195. package/internal-workflow/skills/tdd/agents/openai.yaml +6 -0
  196. package/internal-workflow/skills/tdd/interface-design.md +31 -0
  197. package/internal-workflow/skills/tdd/mocking.md +59 -0
  198. package/internal-workflow/skills/tdd/refactoring.md +10 -0
  199. package/internal-workflow/skills/tdd/tests.md +77 -0
  200. package/internal-workflow/skills/triage/AGENT-BRIEF.md +192 -0
  201. package/internal-workflow/skills/triage/OUT-OF-SCOPE.md +101 -0
  202. package/internal-workflow/skills/triage/SKILL.md +134 -0
  203. package/internal-workflow/skills/triage/agents/openai.yaml +6 -0
  204. package/package.json +14 -8
  205. package/dist/src/v2/adapters/target-activity-fence.d.ts +0 -23
  206. package/dist/src/v2/adapters/target-activity-fence.d.ts.map +0 -1
  207. package/dist/src/v2/adapters/target-activity-fence.js +0 -249
  208. package/dist/src/v2/adapters/target-activity-fence.js.map +0 -1
  209. package/dist/src/v2/candidate-cli.d.ts +0 -22
  210. package/dist/src/v2/candidate-cli.d.ts.map +0 -1
  211. package/dist/src/v2/candidate-cli.js.map +0 -1
  212. package/dist/src/v2/legacy-cutover.d.ts +0 -52
  213. package/dist/src/v2/legacy-cutover.d.ts.map +0 -1
  214. package/dist/src/v2/legacy-cutover.js +0 -87
  215. package/dist/src/v2/legacy-cutover.js.map +0 -1
  216. /package/{internal-skills → internal-workflow/skills}/acceptance-proof/SKILL.md +0 -0
  217. /package/{internal-skills → internal-workflow/skills}/acceptance-proof/references/android.md +0 -0
  218. /package/{internal-skills → internal-workflow/skills}/acceptance-proof/references/browser.md +0 -0
  219. /package/{internal-skills → internal-workflow/skills}/acceptance-proof/references/ios.md +0 -0
  220. /package/{internal-skills → internal-workflow/skills}/acceptance-proof/tools/android-lease.mjs +0 -0
  221. /package/{internal-skills → internal-workflow/skills}/acceptance-proof/tools/ios-lease.mjs +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-assets.js","sourceRoot":"","sources":["../../../src/v2/workflow-assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,KAAK,EACL,KAAK,EACL,KAAK,EACL,IAAI,EAC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,KAAK,KAAK,IAAI,IAAK,KAA+B,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC;AAChK,SAAS,SAAS,KAAa,MAAM,GAAG,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,IAAI,GAAG,KAAK,SAAS;IAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC"}
package/docs/deep-dive.md CHANGED
@@ -1,86 +1,309 @@
1
- # Runner architecture
1
+ # Runner architecture and execution model
2
2
 
3
- ## One public runtime
3
+ This document describes the current package runtime as implemented under `src/v2/`. It is the technical companion to the user-oriented README: the README explains how to operate the package; this document explains ownership, state transitions, worker contracts, validation, recovery, and publication.
4
4
 
5
- The package bin is `dist/src/v2/candidate-cli.js`; `candidate-cli` is only the historical source filename. It is the sole public CLI and routes `setup`, `doctor`, `status`, direct `run`, and serial `daemon` commands. The root package export exposes only V2 contracts.
5
+ ## 1. System boundary
6
6
 
7
- The runtime is split into a policy core under `src/v2/` and a small package-owned adapter closure under `src/v2/adapters/`. No earlier runner implementation is shipped or executed.
7
+ Codex Orchestrator has one public runtime and one delivery authority.
8
8
 
9
- ## Trust boundary
9
+ The npm binary is `dist/src/v2/cli.js`. It is the only public command entrypoint and exposes:
10
10
 
11
- The Runner is trusted. It owns:
11
+ - `setup`
12
+ - `doctor`
13
+ - `status`
14
+ - `run`
15
+ - `daemon`
12
16
 
13
- - issue discovery and authorization;
14
- - worktree and durable state ownership;
15
- - finite check execution;
16
- - process launch, timeout, cancellation, and quiescence;
17
- - Git commits, branches, pushes, pull requests, labels, and comments;
18
- - mobile leases and proof artifact validation.
17
+ Direct `run` and daemon-discovered issues both enter the same `RunIssue.runIssue` lifecycle. The daemon only adds serial polling around that lifecycle. The package root export exposes V2 contracts, and the published tarball contains only the compiled V2 closure, the generated internal workflow, public documentation, changelog, license, and package metadata.
19
18
 
20
- Implementation and proof Codex processes are untrusted workers. They receive bounded input, a dedicated tool home, a safe `PATH`, and only explicitly allowed non-secret tool environment values. Ordinary Codex execution and native Codex subagents may use the same user-owned Codex authentication and can read files available to the same local OS user; the containment certificate records this explicitly. GitHub, SSH, npm, and cloud publication credentials are scrubbed, and operations that require external authority remain finite Runner-owned actions.
19
+ Reusable orchestration policy lives in `src/v2/`. Git, GitHub, process, durable-file, browser, and mobile integrations live in `src/v2/adapters/` or other package-owned V2 runtime modules. Target-specific policy lives in `.codex-orchestrator/config.json`; it is not inferred from worker prompts.
21
20
 
22
- This boundary prevents prompt content or repository code from receiving external publication authority. It does not claim OS-level secrecy from the current local user, so reports and artifacts are separately checked for credential/path disclosure. A child can implement, inspect, test, and report; the Runner performs authorized publication after validation.
21
+ ## 2. Trusted Runner and untrusted workers
23
22
 
24
- ## Configuration
23
+ The trusted Runner owns every action that can authorize work, change durable orchestration state, or publish externally:
25
24
 
26
- `.codex-orchestrator/config.json` is an exact, versioned contract. Unknown keys and removed policy surfaces are rejected. It names one GitHub repository, four labels (`auto`, `running`, `blocked`, `review`), one branch template, a serial polling interval, five implementation cycles, one Codex command contract, finite checks, one proof artifact directory, and deny lists.
25
+ - repository identity and configuration validation;
26
+ - issue discovery and `agent:auto` authorization;
27
+ - repository ownership locks and fencing;
28
+ - run records, worktrees, branch identity, and Git snapshots;
29
+ - workflow generation materialization and verification;
30
+ - worker launch, timeout, cancellation, and process-group quiescence;
31
+ - configured checks;
32
+ - proof capabilities and artifact validation;
33
+ - commits, pushes, draft pull requests, labels, and issue comments;
34
+ - browser/mobile proof policy and device leases.
27
35
 
28
- The committed config contains policy, never live run state or credentials. Durable runtime state is stored beneath the configured state directory and the Runner's private home.
36
+ Codex processes are operation-scoped workers. The current internal workflow defines seven operations: `triage`, `ambiguity-review`, `spec-author`, `spec-review`, `implementation`, `code-review`, and `acceptance-proof`. A worker receives a dedicated tool home, a restricted environment, a safe `PATH`, bounded prompt facts, a report schema, and only the files appropriate to its operation.
29
37
 
30
- ## `runIssue`
38
+ Workers do not receive GitHub, SSH, npm, or cloud publication credentials. They cannot turn a proposed shell command into Runner authority and cannot directly push, create a pull request, alter issue labels, or publish comments.
31
39
 
32
- Direct runs and daemon-discovered runs call the same lifecycle:
40
+ This is an authority-containment boundary, not an OS sandbox. Ordinary Codex execution and native Codex subagents use the same local OS account and may use the user's existing Codex authentication or read files available to that user. The containment certificate records that accepted local-read risk. Environment scrubbing, denied paths, isolated read views, and report/artifact validation prevent those local capabilities from becoming an external publication grant.
33
41
 
34
- 1. Snapshot issue and repository identity.
35
- 2. Verify authorization and acquire fenced ownership.
36
- 3. Create or reconcile the issue worktree.
37
- 4. Run one implementation attempt and validate its structured report.
38
- 5. Inspect all tracked, staged, unstaged, untracked, and ignored denied-path changes.
39
- 6. Commit the validated implementation candidate locally.
40
- 7. Run configured checks and create a nominal `CheckedChange` bound to exact Git and content hashes.
41
- 8. Run Acceptance Proof against that binding.
42
- 9. Publish with durable intents and postcondition reconciliation.
43
- 10. Persist and return one typed terminal or resumable result.
42
+ ## 3. Strict repository configuration
44
43
 
45
- Implementation findings return to the same worktree for at most five cycles. A malformed report gets one report-only repair; a clean transport disconnect gets one separate transport retry. Neither budget silently becomes another implementation cycle.
44
+ `.codex-orchestrator/config.json` is an exact versioned contract with schema `codex-orchestrator.agent-auto`, version `2`. Unknown, missing, removed, or malformed keys are rejected.
46
45
 
47
- ## Durable effects
46
+ The config contains:
48
47
 
49
- Every external or non-idempotent operation uses intent-before-effect and confirmation-after-observation. On restart, the Runner inspects the durable intent and remote/local postcondition before deciding whether to retry. It does not infer failure merely from a lost response.
48
+ - `github`: canonical owner/repository, base branch, and five distinct label definitions;
49
+ - `runner`: worktree root, durable state directory, fixed branch template, daemon polling interval, and the five-cycle limit;
50
+ - `codex`: command, exact supported version, total and idle timeouts, and denied worker tool network;
51
+ - `checks`: a finite map of check IDs to Runner-owned commands;
52
+ - `proof.artifactDir`: proof-owned artifact root inside the issue worktree;
53
+ - `deny.readPaths`: repository-relative or canonical absolute paths protected from workers;
54
+ - `deny.commands`: canonical absolute command paths excluded from worker authority.
50
55
 
51
- Atomic files use write, flush, rename, and directory synchronization where supported. Locks and leases carry fencing tokens and process/boot identity. Unknown ownership or inability to prove process-group absence is a safe halt, not permission to continue.
56
+ Default setup creates:
52
57
 
53
- ## Checks and publication
58
+ ```text
59
+ .codex-orchestrator/config.json
60
+ .codex-orchestrator/workspaces-v2/
61
+ .codex-orchestrator/v2/state/
62
+ .codex-orchestrator/v2/proofs/
63
+ ```
54
64
 
55
- Checks are configured finite commands executed by the Runner. Arbitrary agent-proposed shell commands do not become Runner authority. A check result is bound into `CheckedChange`; any later Git, index, tracked-content, untracked-content, worktree, or check-policy drift invalidates proof.
65
+ The three runtime directories are placed in a managed `.gitignore` block. Setup adds `npm test` and `npm run typecheck` to `checks` only when matching scripts exist in the target `package.json`.
56
66
 
57
- Only the Runner publishes. The implementation and proof processes cannot push, open a pull request, alter labels, or post comments. Publication is resumable and verifies exact repository, branch, commit, and remote postconditions.
67
+ `setup`, `doctor`, and `status` use the same strict parser. Setup can create or verify the current policy and optionally prepare labels; doctor/status are read-only. Older or unrelated config shapes are not execution authority and are rejected instead of loading a compatibility runtime.
58
68
 
59
- ## Acceptance Proof
69
+ ## 4. Immutable package-owned workflow
60
70
 
61
- Acceptance Proof receives the issue snapshot, frozen criteria, and nominal checked-change capability. It runs in a separate contained Codex process and writes only proof-owned artifacts.
71
+ `internal-workflow/manifest.json` is the sole inventory of worker operations. Maintainers regenerate it with `npm run refresh:workflow` from the explicit source declaration in `scripts/agent-auto-workflow-source.json` and the allowlisted files under `${CODEX_HOME:-$HOME/.codex}`.
72
+
73
+ The generated inventory binds each operation to:
74
+
75
+ - an operation ID and profile;
76
+ - its primary and dependency skills;
77
+ - shared routing resources;
78
+ - an exact file closure;
79
+ - input/output schemas and wrapper resources;
80
+ - its authority policy;
81
+ - package-owned eval suites used by maintainers.
82
+
83
+ Compilation rejects missing dependencies, stale bytes, undeclared resources, or adapters that fail to link all declared authorities. Eval files are included in the immutable generation and schema-validated, but excluded from operation snapshots so workers cannot consume expected or forbidden test answers.
84
+
85
+ At the beginning of a new run, the Runner verifies the packaged workflow tree and materializes one immutable generation under the private orchestrator home. Publication uses no-replace claims, sealed file evidence, hashes, and a ready receipt. The generation receipt and skill hashes are persisted in the run record. Every later operation is created from that pin, so a package update or conflicting consumer skill cannot alter an active run.
86
+
87
+ `npm run check:workflow` compares local workflow sources with committed generated bytes without writing. `npm run verify:workflow` verifies the committed package without consulting local or consumer skills.
88
+
89
+ ## 5. Issue eligibility and ownership
90
+
91
+ For a new run, the Runner performs these checks before allowing worker execution:
92
+
93
+ 1. Parse the strict config and derive the lowercase canonical repository identity.
94
+ 2. Acquire the repository owner lock. A known live owner returns `requeued`; ambiguous ownership returns a resumable safety block.
95
+ 3. Re-read the config after lock acquisition and require byte-identical policy and repository identity.
96
+ 4. Validate the current containment certificate.
97
+ 5. Read the issue and durable run state.
98
+ 6. Require an open issue with `agent:auto`, without running, blocked, review, or waiting-human labels.
99
+ 7. Require that no open pull request already owns `codex/issue-${issueNumber}` against the configured base branch.
100
+
101
+ For an eligible issue, the Runner freezes the issue snapshot and acceptance criteria, resolves the base SHA, creates the run record, and persists an intent to claim labels before changing GitHub. The issue is moved to the exact running label set and receives one marker-bound claim comment. Only then does the Runner create `.codex-orchestrator/workspaces-v2/issue-${issueNumber}` on `codex/issue-${issueNumber}`.
102
+
103
+ Every later externally meaningful phase revalidates authorization. The open issue must still carry `agent:auto` and `agent:running`, and exactly one trusted claim comment must bind the run ID, issue, and branch. Revoked or conflicting authority fails closed.
104
+
105
+ ## 6. Routing before implementation
106
+
107
+ After claim and worktree creation, the Runner invokes `triage` against the frozen issue facts, acceptance criteria, repository, base SHA, and pinned workflow generation. Triage must return a schema-valid, evidence-backed route:
108
+
109
+ - `direct`
110
+ - `spec-required`
111
+ - `awaiting-user`
112
+ - `blocked`
113
+
114
+ The route report records inspected evidence, explicit assumptions, and route-specific details. The Runner hashes the report and persists a route receipt bound to the workflow generation.
115
+
116
+ A malformed triage report has one report repair budget. A clean transport failure has one separate transport retry. These retries do not become implementation cycles.
117
+
118
+ An `awaiting-user` proposal is privileged because it pauses autonomous work. It must describe at least two materially different observable product outcomes and prove that repository authority does not select between them. A separate `ambiguity-review` worker receives the candidate and either approves or rejects it. Only one candidate review is allowed. A rejected candidate can use the single triage repair path; an approved candidate becomes the durable route receipt.
119
+
120
+ The route determines the downstream lifecycle:
121
+
122
+ ```mermaid
123
+ flowchart TD
124
+ A["Eligible issue claimed"] --> B["Triage"]
125
+ B -->|"direct"| C["Implementation and delivery loop"]
126
+ B -->|"spec-required"| D["Spec author and independent review"]
127
+ B -->|"awaiting-user"| E["Approved question and trusted answer"]
128
+ B -->|"blocked"| F["Typed terminal blocker"]
129
+ D --> G["Frozen specification receipt"]
130
+ E --> B
131
+ C --> H["Draft PR and review-ready"]
132
+ ```
133
+
134
+ ### Direct route
135
+
136
+ The issue already contains enough behavioral authority and verification detail for deterministic implementation. The Runner enters the bounded implementation/review/check/proof loop described below.
137
+
138
+ ### Specification-required route
139
+
140
+ Complexity, cross-cutting behavior, or insufficient executable detail makes direct implementation unsafe even though no product decision is missing. The Runner starts a durable specification state machine:
141
+
142
+ 1. `spec-author` creates a revision in `author` mode.
143
+ 2. `spec-review` independently reviews the exact revision in `full` mode.
144
+ 3. A needs-work verdict preserves a defect ledger and returns to `spec-author` in repair mode.
145
+ 4. The same reviewer session performs closure review against the affected defects.
146
+ 5. Only an approved revision with resolved blockers is frozen.
147
+
148
+ Prepared and launched invocation records are persisted before and after process launch. Recovery proves process-group absence before replacing an uncertain invocation. Malformed reports and transport retries are bounded; exhaustion becomes a typed blocker rather than an unbounded author/reviewer loop.
149
+
150
+ The terminal result for this route is `spec-frozen` with an immutable `FrozenSpecReceipt`. The current runtime does not silently continue from a newly authored specification into implementation. That boundary keeps specification approval separately auditable.
151
+
152
+ ### Awaiting-user route
153
+
154
+ After independent ambiguity approval, the waiting-human coordinator:
155
+
156
+ 1. creates a marker-bound question receipt;
157
+ 2. persists comment intent before posting the question;
158
+ 3. changes labels from running to `agent:auto` + `agent:waiting-human`;
159
+ 4. scans only post-question replies using the required answer prefix;
160
+ 5. accepts answers only from a current repository writer with sufficient permission;
161
+ 6. normalizes equivalent answers and freezes their hashes;
162
+ 7. treats conflicting trusted answers as a bounded clarification, not an arbitrary choice;
163
+ 8. revalidates answer authority before restoring running labels;
164
+ 9. archives the waiting episode and reruns triage in the same run with the trusted answer.
165
+
166
+ The first unanswered pass returns `awaiting-user`. At most one follow-up question is allowed; unresolved conflict or repeated ambiguity exhausts the waiting budget. A frozen answer is immutable and cannot be replaced by a later edited comment.
167
+
168
+ ## 7. Direct implementation and independent review
169
+
170
+ The direct route uses one issue worktree for at most five implementation cycles. Each cycle is bound to the same run, frozen issue criteria, route receipt, and workflow generation.
171
+
172
+ An `implementation` worker receives the current cycle and any findings from prior review, checks, or proof. It must return a structured implementation report. The Runner then:
173
+
174
+ - verifies that denied paths did not change;
175
+ - validates the exact report schema;
176
+ - allows one report-only repair when the report is malformed;
177
+ - proves that report repair did not change the worktree;
178
+ - distinguishes an external blocker from a completed implementation;
179
+ - requires the branch head to remain at the frozen base SHA;
180
+ - inventories tracked, staged, unstaged, untracked, and denied-path state;
181
+ - requires the reported changed-file list to equal the observed change set.
182
+
183
+ A clean implementation transport failure receives one separate retry only if the complete Git freshness baseline is unchanged. Any unexplained mutation converts that retry into a safety block.
184
+
185
+ Before configured checks, a separate `code-review` worker reviews a fingerprint of the complete implementation target. The fingerprint binds Git freshness, changed files, route decision, workflow generation, cycle, and frozen criteria. Full review covers at least acceptance criteria, correctness, and test quality; cleanup is a lens within this final review.
186
+
187
+ Review maintains an append-preserving defect ledger. If review returns `needs-work`, open defects become implementation findings and consume the next implementation cycle. After repair, the same reviewer session performs closure review only for affected defects while preserving unrelated and previously accepted findings. Approved review requires every blocker or execution risk to be verified or explicitly superseded.
188
+
189
+ Review invocation intent, process IDs, report hashes, transport retries, report repairs, target revisions, and target fingerprints are durable. A crash after launch cannot cause a replacement review until process absence is proven. Review target drift after approval is a safety failure.
190
+
191
+ ## 8. Configured checks and `CheckedChange`
192
+
193
+ After review clears, the Runner executes the finite commands in `config.checks`. Workers cannot add commands to this set. Each result records its ID, exact command, pass/fail status, and output hash.
194
+
195
+ A failed check becomes a durable repair finding and starts another implementation cycle if the five-cycle budget remains. Passed checks are reused on a safe resume, but any new repair cycle clears stale check and proof bindings.
196
+
197
+ Once all checks pass, the Runner fingerprints the reviewed files and content, stages the complete validated change, and verifies that staging did not change either binding. It then mints a `CheckedChange` capability containing:
198
+
199
+ - canonical repository, run ID, issue number, and cycle;
200
+ - base and head SHA;
201
+ - index tree SHA;
202
+ - tracked and untracked content hashes;
203
+ - worktree identity;
204
+ - exact changed files;
205
+ - passed check records and check-policy hash;
206
+ - package and proof schema versions.
207
+
208
+ Any later change to Git, the index, tracked or untracked content, worktree identity, changed files, or check policy invalidates the capability.
209
+
210
+ ## 9. Acceptance Proof
211
+
212
+ Acceptance Proof is independent from both implementation and code review. The `acceptance-proof` worker receives the frozen issue criteria and a nominal checked-change capability. It runs in a separate contained process and may write only below its proof-owned artifact root.
62
213
 
63
214
  The Runner validates:
64
215
 
65
- - exact report schema and criterion IDs;
66
- - artifact root containment, size, hash, UTF-8, and freshness;
67
- - credentials in every text artifact;
68
- - host identity and publication type for public artifacts;
216
+ - the exact Proof Report schema and status semantics;
217
+ - one result for every frozen criterion ID;
218
+ - evidence references and required confidence;
219
+ - artifact root containment and canonical paths;
220
+ - regular-file type, size, hash, UTF-8 validity, and freshness;
221
+ - credential absence in all text artifacts;
222
+ - public artifact type and host-identity removal;
69
223
  - no product diff during proof;
70
- - browser workflow and viewport evidence when visual;
71
- - exact Android or iOS lease ownership for mobile evidence;
72
- - unchanged checked-change freshness after proof.
224
+ - current browser workflow and viewport evidence for browser targets;
225
+ - exact Android or iOS lease ownership for mobile targets;
226
+ - checked-change freshness again after proof.
227
+
228
+ Local command output and static-inspection evidence may contain machine paths because they are never public. Public evidence is restricted to screenshots or sanitized generated summaries under the stricter publication contract. Credentials are forbidden in both local and public evidence.
229
+
230
+ Browser proof validates current workflow evidence rather than accepting an isolated screenshot. Mobile proof uses Runner-owned leases and refuses to take over a user-owned device, app, IDE, or Flutter session.
231
+
232
+ `needs-rework` findings return to the same implementation loop and consume another cycle. External, safety, malformed, quiescence, or exhausted outcomes are mapped to typed run results. Only `passed` proof produces a proof receipt and permits publication.
233
+
234
+ ## 10. Runner-owned publication
235
+
236
+ Workers never publish. After proof passes, the Runner performs publication in this order:
237
+
238
+ 1. Revalidate issue authorization.
239
+ 2. Persist commit intent bound to parent SHA, tree SHA, and message.
240
+ 3. Create or reconcile the single implementation commit.
241
+ 4. Persist push intent and verify the remote branch SHA.
242
+ 5. Persist pull-request intent and find or create the marker-bound draft PR.
243
+ 6. Verify the PR head, base, marker, and repository identity.
244
+ 7. Persist and publish the final issue comment.
245
+ 8. Replace running labels with the exact review-ready label set.
246
+ 9. Write local terminal evidence and persist `review-ready` with the PR URL.
247
+
248
+ Every step checks its postcondition before proceeding. A conflicting remote branch, duplicate marker, unexpected PR, changed tree, revoked authorization, or ambiguous effect becomes a safety or transport result; it is never treated as implicit success.
249
+
250
+ ## 11. Durable state and crash recovery
251
+
252
+ The durable run file is stored beneath the configured state directory. Each run record contains identity, lifecycle, cycle budgets, frozen issue data, workflow pin, route state, waiting-human history, spec/review state, process records, checks, proof bindings, publication intent, and terminal outcome.
253
+
254
+ State updates use generation-based compare-and-swap. Atomic files use write, flush, rename, and directory synchronization where supported. Locks and leases include fencing plus process and boot identity.
255
+
256
+ External and non-idempotent effects follow intent-before-effect and confirmation-after-observation:
257
+
258
+ ```text
259
+ persist intent -> perform finite effect -> observe exact postcondition -> clear intent
260
+ ```
261
+
262
+ If the process exits after the effect but before confirmation, the next invocation reads the intent and checks the local or remote postcondition. It does not infer failure from a lost response and does not blindly repeat the effect.
263
+
264
+ Prepared worker invocations can be abandoned without launch. Launched invocations require positive process-group absence before replacement. If quiescence cannot be proven, the run enters `safe-halt` or a non-resumable transport/safety outcome. Unknown process state is never permission to relaunch against the same worktree.
265
+
266
+ An existing nonterminal issue run is resumed only when its canonical repository, branch, worktree path, base SHA, workflow generation, authorization, and lifecycle invariants still match. Terminal outcomes are replayed without re-executing the workflow.
267
+
268
+ ## 12. Result and failure model
269
+
270
+ The CLI prints exact JSON envelopes. Run results include:
271
+
272
+ - `review-ready`: direct delivery completed and the draft PR is verified;
273
+ - `spec-frozen`: the specification route completed with an immutable receipt;
274
+ - `awaiting-user`: a durable question is waiting for an authorized answer;
275
+ - `not-eligible`: the issue was never claimed because public eligibility failed;
276
+ - `requeued`: a known live owner currently holds the repository;
277
+ - `blocked`: a typed `external`, `safety`, or `exhausted` condition;
278
+ - `transport-failed`: effect delivery or observation could not be safely confirmed;
279
+ - `cancelled`: cancellation was observed and persisted;
280
+ - `internal-error`: an invariant, schema, or local operation failed outside a safe domain result.
281
+
282
+ `blocked.resumable` and `transport-failed.resumable` are part of the contract. A resumable result still requires the external condition to be corrected; it does not bypass reconciliation on the next call. `evidencePath` identifies the durable local evidence record for the result.
283
+
284
+ Exit codes are grouped for automation:
285
+
286
+ - `0`: successful or intentionally paused progress such as `review-ready`, `spec-frozen`, `awaiting-user`, or `requeued`;
287
+ - `20`: blocked policy outcome;
288
+ - `21`: not eligible;
289
+ - `70`: transport or internal failure;
290
+ - `130`: cancelled.
73
291
 
74
- Command output and static inspection may remain local and include machine paths. They are not public evidence. Screenshots and sanitized generated summaries may be publishable when their stricter checks pass.
292
+ Daemon mode processes discovered issues serially and returns the greatest observed exit severity for the polling pass.
75
293
 
76
- ## Setup and cutover
294
+ ## 13. Package verification and live validation
77
295
 
78
- `setup` creates or verifies V2 config. `--prepare-labels` performs only the requested GitHub label preparation. `doctor` and `status` are read-only inspections.
296
+ Local package verification is:
79
297
 
80
- Recognized earlier config is parsed only by the bounded cutover reader. `setup --fresh` acquires both ownership fences, proves no active old claims, saves immutable backup evidence, and publishes V2 config last. The old runtime never executes as part of this process.
298
+ ```sh
299
+ npm run refresh:workflow
300
+ npm run typecheck
301
+ npm test
302
+ npm pack --dry-run --json
303
+ ```
81
304
 
82
- ## Live validation
305
+ The build deletes `dist` before TypeScript compilation so removed modules cannot survive in tests or the tarball. `prepack` verifies the committed workflow and rebuilds from a clean output directory.
83
306
 
84
- Local validation is `npm run typecheck`, `npm test`, and `npm pack --dry-run --json`. Build removes `dist` first so deleted modules cannot leak into tests or tarballs.
307
+ `npm run smoke:live` packs and installs the exact package bytes into a temporary consumer and mutates only the configured scratch GitHub repository. The default `core-release` profile proves package installation, a real Codex path, browser evidence, and a safety-negative path. Cleanup verifies that run-owned issues, PRs, branches, labels, worktrees, and temporary directories are absent.
85
308
 
86
- The default live smoke packs and installs the exact candidate bytes in a temporary consumer and uses a scratch GitHub repository. Its compact release profile proves package installation, one normal default Codex run, browser evidence, and a safety-negative path. Cleanup verifies that run-owned issues, pull requests, branches, labels, and temporary directories are absent.
309
+ Live smoke is not a normal local test and must run only with explicit authorization. Release publication is owned by the GitHub release workflow after the release commit reaches `main`.
@@ -0,0 +1,24 @@
1
+ # Bug Workflow Routing
2
+
3
+ Use the bug skills by user intent and feedback-loop quality:
4
+
5
+ - `bug-root-cause-explainer`: diagnosis-only. Use when the user asks why, wants root cause, options, or no edits. Stop before implementation.
6
+ - `diagnosing-bugs`: feedback-loop builder. Use when the bug is hard, flaky, unclear, performance-related, or cannot be proven with a tight red/green signal.
7
+ - `code-debugger`: implementation. Use when the user asks to fix, chose a fix path, or the bug is obvious and reproducible.
8
+
9
+ Handoffs:
10
+
11
+ - Explainer -> Diagnosing Bugs when root cause cannot be proven without a reliable loop.
12
+ - Explainer -> Code Debugger after the user chooses a fix path.
13
+ - Code Debugger -> Diagnosing Bugs when implementation discovers the bug is unclear, flaky, or lacks a red-capable signal.
14
+ - Diagnosing Bugs -> original intent: return diagnosis to the explainer path, or apply the fix through Code Debugger.
15
+
16
+ Inside an active user-authorized implementation/TDD flow, keep a reviewer repair
17
+ in that same TDD activation only when the defect is high-confidence,
18
+ source-required, inside the approved behavior/Seam, and has bounded trigger,
19
+ cause, and repair. Group related cases by protected invariant before one
20
+ consolidated repair batch. New product intent, a new Seam, or a risky trade-off
21
+ stops for user approval. A separately authorized fix with no active flow, or an
22
+ ambiguous reproduction/cause/repair, still routes through `code-debugger`.
23
+
24
+ Do not collapse diagnosis-only, feedback-loop construction, and implementation into one response unless the user explicitly asked for that full flow.
@@ -0,0 +1,11 @@
1
+ # Bugfix Quality Gate
2
+
3
+ For bug fixes, do not claim completion until these are clear:
4
+
5
+ - Invariant: final user/system-visible outcome that must be true.
6
+ - Boundary: paths, states, async events, retries, caches, workers, or integrations that can affect it.
7
+ - Proof: test/log/smoke/check that fails on the old behavior and verifies the final outcome, not only an intermediate signal.
8
+ - Negative proof: what the proof does not cover.
9
+ - Claim limit: final response must not claim broader coverage than the changed code and proof support.
10
+
11
+ If the bug spans state, async, lifecycle, retries, cache, auth, persistence, or cross-module contracts, include the competing condition in the regression proof when feasible.
@@ -0,0 +1,123 @@
1
+ # Coding Skill Routing
2
+
3
+ This file is the normative global route and ownership policy. Keep repository
4
+ commands, domain facts, credentials, deployment assumptions, and product
5
+ behavior in repository `AGENTS.md`, `CONTEXT.md`, ADRs, or local skills.
6
+
7
+ ## Ownership
8
+
9
+ - Personal skills live only in `../../skills`.
10
+ - `agents/openai.yaml` owns invocation metadata; `agents/*.toml` owns named-role
11
+ model and effort.
12
+ - A shared rule has one owner. Callers link to it instead of copying its prose.
13
+ - Skill-specific detail belongs in that skill's `references/` and loads only
14
+ when its branch is active.
15
+ - Root owns the user dialogue, decisions, critical path, integration, and final
16
+ handoff. A reviewer child owns independent review.
17
+
18
+ ## Default Implementation Route
19
+
20
+ `medium` is the default for behavior-changing implementation. Use:
21
+
22
+ - `simple` only for a tiny local change with one obvious proof;
23
+ - `medium` for a clear coherent outcome with settled authority, one ownership
24
+ path, and credible affected validation—even across several files, modules,
25
+ API, persistence, or shared state;
26
+ - `high` only when a sensitive mechanism has both a material failure
27
+ consequence and an uncertainty amplifier such as unclear ownership,
28
+ cross-trust effects, non-local recovery, an unproven external contract, or
29
+ proof that cannot isolate the dangerous state.
30
+
31
+ Prefer direct root implementation for `simple` and ordinary `medium` work. Use
32
+ `$implementation-spec-maker` only for a real execution decision or coordination
33
+ gap. Use `$tickets-orchestrator` only for an approved ticket graph, real delivery
34
+ dependencies or disjoint parallel slices, or an explicit orchestration request.
35
+ Do not manufacture PRDs, tickets, specs, agents, or review checkpoints from
36
+ file count or generic risk labels.
37
+
38
+ ## Core Routes
39
+
40
+ | Situation | Route |
41
+ | --- | --- |
42
+ | Tiny, clear, low-risk edit | `$small-task-implementer` after its Fit Gate |
43
+ | Clear feature or fix | Apply the TDD Fit Gate; when it fits, use Root + one `$tdd` activation, otherwise affected validation |
44
+ | Missing execution detail | `$implementation-spec-maker` -> artifact review -> `$spec-implementer` |
45
+ | Approved implementation spec | `$spec-implementer` |
46
+ | Approved dependency graph or explicit orchestration | `$tickets-orchestrator` |
47
+ | Product discovery or ticket decomposition | `$to-spec`, `$spec-to-tickets`, or `$wayfinder` as applicable; stop before delivery |
48
+ | Explain-only bug | `$bug-root-cause-explainer`; no edits |
49
+ | Confirmed bounded bug fix | Apply the TDD Fit Gate, then `$tdd` + `$code-debugger` when it fits; otherwise `$code-debugger` + affected validation |
50
+ | Hard, flaky, unclear, or performance bug | `$diagnosing-bugs` before the explain/fix route |
51
+ | Review request | `$code-review` in the profile-selected reviewer child |
52
+ | External multi-source uncertainty | `$research`; narrow documentation lookup stays inline |
53
+ | Commit request | `$commit`; push/PR still require separate authority |
54
+
55
+ Generated planning artifacts and labels never authorize implementation. One
56
+ deterministic approved ticket may run directly; a graph follows the authorized
57
+ delivery workflow.
58
+
59
+ ## TDD And Review
60
+
61
+ Apply `$tdd` only when all three Fit Gate conditions hold:
62
+
63
+ 1. The change alters observable behavior.
64
+ 2. A natural public seam can prove that behavior.
65
+ 3. A new test will fail before the change for the intended behavioral reason.
66
+
67
+ Otherwise use existing regression tests plus affected validation. Do not invoke
68
+ TDD merely because implementation files change, and do not manufacture RED
69
+ tests for behavior-preserving cleanup, dead-code deletion, documentation, copy,
70
+ formatting, generated assets, package maintenance, simple config, builds, or
71
+ read-only work. For mixed tasks, activate `$tdd` only for the behavioral slice.
72
+ An absence or architecture guard added after cleanup is validation, not a TDD
73
+ cycle.
74
+
75
+ Review applicability lives in [`review-gates.md`](review-gates.md). Shared
76
+ Full/Closure mechanics live in [`review-protocol.md`](review-protocol.md).
77
+ Artifact review is owned by
78
+ [`implementation-spec-review/references/review-loop.md`](../../skills/implementation-spec-review/references/review-loop.md);
79
+ approved-spec implementation review is owned by
80
+ [`spec-implementer/references/review-loop.md`](../../skills/spec-implementer/references/review-loop.md).
81
+
82
+ Root never substitutes self-review for a required independent reviewer. Use one
83
+ `reviewer_fast` for `simple`, one `reviewer_standard` for `medium`, and two
84
+ disjoint `reviewer_deep` tracks for `high`. A reviewer Adapter executes inline
85
+ only after it is already inside that assigned child.
86
+
87
+ ## Delegation
88
+
89
+ Run work inline by default. Delegate only when the user, an invoked skill, or
90
+ repository policy authorizes it and the task benefits from independent review,
91
+ isolated deep analysis, or disjoint implementation ownership.
92
+
93
+ | Need | Named role |
94
+ | --- | --- |
95
+ | Mechanical inventory | `explorer_quick` |
96
+ | Bounded cross-module trace | `explorer_fast` |
97
+ | Ambiguous architecture, contract, or cause | `analyst_deep` |
98
+ | Primary-source external research | `researcher_standard` |
99
+ | Independent review | `reviewer_fast`, `reviewer_standard`, or `reviewer_deep` by profile |
100
+ | Approved isolated implementation slice | `implementer_standard`; `implementer_deep` only for material uncertainty |
101
+
102
+ Keep the root critical path local. Use at most two explorers for disjoint
103
+ questions and at most two parallel implementers with disjoint write scopes.
104
+ Children do not conduct user dialogue or spawn grandchildren.
105
+
106
+ ## Validation And Runtime Safety
107
+
108
+ Use targeted behavior proof plus the smallest affected integration check for
109
+ simple and medium work. Run a full repository suite only when repository policy
110
+ requires it, a broad shared contract cannot be isolated, or the task is `high`.
111
+
112
+ For Flutter UI, follow [`tool-usage.md`](tool-usage.md): platform QA owns UI
113
+ work and `$flutter-attach-session` is only the attach-safe runtime layer. Treat
114
+ live app, IDE, VM Service, and `flutter run` sessions as user-owned.
115
+
116
+ Read local evidence before external search: applicable `AGENTS.md`, `CONTEXT.md`,
117
+ ADRs, manifests, lockfiles, tests, scripts, and code owners. Mark missing facts
118
+ unconfirmed rather than inventing them.
119
+
120
+ Contract-risk implementation uses
121
+ [`contract-test-ledger.md`](contract-test-ledger.md) only for material
122
+ invariants. Long framework lenses, examples, and recipes remain skill-local and
123
+ load on demand.