codex-orchestrator 2.0.11 → 2.0.13

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 (262) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +25 -51
  3. package/dist/src/index.d.ts +2 -8
  4. package/dist/src/index.d.ts.map +1 -1
  5. package/dist/src/index.js +1 -4
  6. package/dist/src/index.js.map +1 -1
  7. package/dist/src/v2/acceptance-proof.d.ts +46 -31
  8. package/dist/src/v2/acceptance-proof.d.ts.map +1 -1
  9. package/dist/src/v2/acceptance-proof.js +157 -195
  10. package/dist/src/v2/acceptance-proof.js.map +1 -1
  11. package/dist/src/v2/active-attempt.d.ts +94 -0
  12. package/dist/src/v2/active-attempt.d.ts.map +1 -0
  13. package/dist/src/v2/active-attempt.js +200 -0
  14. package/dist/src/v2/active-attempt.js.map +1 -0
  15. package/dist/src/v2/adapters/command.d.ts +6 -0
  16. package/dist/src/v2/adapters/command.d.ts.map +1 -1
  17. package/dist/src/v2/adapters/command.js +43 -2
  18. package/dist/src/v2/adapters/command.js.map +1 -1
  19. package/dist/src/v2/candidate.d.ts +15 -31
  20. package/dist/src/v2/candidate.d.ts.map +1 -1
  21. package/dist/src/v2/candidate.js +7 -29
  22. package/dist/src/v2/candidate.js.map +1 -1
  23. package/dist/src/v2/checked-change.d.ts +3 -2
  24. package/dist/src/v2/checked-change.d.ts.map +1 -1
  25. package/dist/src/v2/checked-change.js +4 -3
  26. package/dist/src/v2/checked-change.js.map +1 -1
  27. package/dist/src/v2/cli-contract.d.ts +1 -1
  28. package/dist/src/v2/cli-contract.d.ts.map +1 -1
  29. package/dist/src/v2/cli-contract.js +4 -6
  30. package/dist/src/v2/cli-contract.js.map +1 -1
  31. package/dist/src/v2/cli.d.ts +8 -0
  32. package/dist/src/v2/cli.d.ts.map +1 -1
  33. package/dist/src/v2/cli.js +13 -0
  34. package/dist/src/v2/cli.js.map +1 -1
  35. package/dist/src/v2/code-review-report.d.ts +10 -18
  36. package/dist/src/v2/code-review-report.d.ts.map +1 -1
  37. package/dist/src/v2/code-review-report.js +63 -60
  38. package/dist/src/v2/code-review-report.js.map +1 -1
  39. package/dist/src/v2/codex-process.d.ts +6 -2
  40. package/dist/src/v2/codex-process.d.ts.map +1 -1
  41. package/dist/src/v2/codex-process.js +25 -9
  42. package/dist/src/v2/codex-process.js.map +1 -1
  43. package/dist/src/v2/config.d.ts +0 -2
  44. package/dist/src/v2/config.d.ts.map +1 -1
  45. package/dist/src/v2/config.js +3 -6
  46. package/dist/src/v2/config.js.map +1 -1
  47. package/dist/src/v2/contained-report-operation.d.ts +41 -196
  48. package/dist/src/v2/contained-report-operation.d.ts.map +1 -1
  49. package/dist/src/v2/contained-report-operation.js +139 -466
  50. package/dist/src/v2/contained-report-operation.js.map +1 -1
  51. package/dist/src/v2/containment.d.ts +1 -0
  52. package/dist/src/v2/containment.d.ts.map +1 -1
  53. package/dist/src/v2/containment.js +12 -2
  54. package/dist/src/v2/containment.js.map +1 -1
  55. package/dist/src/v2/delivery-authority.d.ts +26 -0
  56. package/dist/src/v2/delivery-authority.d.ts.map +1 -0
  57. package/dist/src/v2/delivery-authority.js +44 -0
  58. package/dist/src/v2/delivery-authority.js.map +1 -0
  59. package/dist/src/v2/direct-delivery.d.ts +16 -36
  60. package/dist/src/v2/direct-delivery.d.ts.map +1 -1
  61. package/dist/src/v2/direct-delivery.js +135 -122
  62. package/dist/src/v2/direct-delivery.js.map +1 -1
  63. package/dist/src/v2/immutable-workflow-publisher.d.ts.map +1 -1
  64. package/dist/src/v2/immutable-workflow-publisher.js +3 -1
  65. package/dist/src/v2/immutable-workflow-publisher.js.map +1 -1
  66. package/dist/src/v2/implementation-report.d.ts +3 -1
  67. package/dist/src/v2/implementation-report.d.ts.map +1 -1
  68. package/dist/src/v2/implementation-report.js +28 -10
  69. package/dist/src/v2/implementation-report.js.map +1 -1
  70. package/dist/src/v2/implementation-reviewer.d.ts +41 -12
  71. package/dist/src/v2/implementation-reviewer.d.ts.map +1 -1
  72. package/dist/src/v2/implementation-reviewer.js +114 -42
  73. package/dist/src/v2/implementation-reviewer.js.map +1 -1
  74. package/dist/src/v2/pending-effect-settlement.d.ts +44 -0
  75. package/dist/src/v2/pending-effect-settlement.d.ts.map +1 -0
  76. package/dist/src/v2/pending-effect-settlement.js +69 -0
  77. package/dist/src/v2/pending-effect-settlement.js.map +1 -0
  78. package/dist/src/v2/process-identity.d.ts +45 -0
  79. package/dist/src/v2/process-identity.d.ts.map +1 -0
  80. package/dist/src/v2/process-identity.js +118 -0
  81. package/dist/src/v2/process-identity.js.map +1 -0
  82. package/dist/src/v2/proof-report.d.ts +2 -1
  83. package/dist/src/v2/proof-report.d.ts.map +1 -1
  84. package/dist/src/v2/proof-report.js +10 -4
  85. package/dist/src/v2/proof-report.js.map +1 -1
  86. package/dist/src/v2/review-feedback-coordinator.d.ts +1 -1
  87. package/dist/src/v2/review-feedback-coordinator.d.ts.map +1 -1
  88. package/dist/src/v2/review-feedback-coordinator.js +1 -1
  89. package/dist/src/v2/review-feedback-coordinator.js.map +1 -1
  90. package/dist/src/v2/review-feedback.d.ts +14 -20
  91. package/dist/src/v2/review-feedback.d.ts.map +1 -1
  92. package/dist/src/v2/review-feedback.js +45 -87
  93. package/dist/src/v2/review-feedback.js.map +1 -1
  94. package/dist/src/v2/run-issue.d.ts +129 -88
  95. package/dist/src/v2/run-issue.d.ts.map +1 -1
  96. package/dist/src/v2/run-issue.js +1965 -2381
  97. package/dist/src/v2/run-issue.js.map +1 -1
  98. package/dist/src/v2/run-state-projections.d.ts +84 -0
  99. package/dist/src/v2/run-state-projections.d.ts.map +1 -0
  100. package/dist/src/v2/run-state-projections.js +142 -0
  101. package/dist/src/v2/run-state-projections.js.map +1 -0
  102. package/dist/src/v2/run-store.d.ts +99 -81
  103. package/dist/src/v2/run-store.d.ts.map +1 -1
  104. package/dist/src/v2/run-store.js +245 -542
  105. package/dist/src/v2/run-store.js.map +1 -1
  106. package/dist/src/v2/runtime-assets.d.ts +3 -0
  107. package/dist/src/v2/runtime-assets.d.ts.map +1 -1
  108. package/dist/src/v2/runtime-assets.js +104 -0
  109. package/dist/src/v2/runtime-assets.js.map +1 -1
  110. package/dist/src/v2/runtime.d.ts +56 -44
  111. package/dist/src/v2/runtime.d.ts.map +1 -1
  112. package/dist/src/v2/runtime.js +383 -503
  113. package/dist/src/v2/runtime.js.map +1 -1
  114. package/dist/src/v2/setup.js +0 -2
  115. package/dist/src/v2/setup.js.map +1 -1
  116. package/dist/src/v2/validation-progression.d.ts +70 -0
  117. package/dist/src/v2/validation-progression.d.ts.map +1 -0
  118. package/dist/src/v2/validation-progression.js +247 -0
  119. package/dist/src/v2/validation-progression.js.map +1 -0
  120. package/dist/src/v2/workflow-assets.d.ts +9 -3
  121. package/dist/src/v2/workflow-assets.d.ts.map +1 -1
  122. package/dist/src/v2/workflow-assets.js +256 -43
  123. package/dist/src/v2/workflow-assets.js.map +1 -1
  124. package/internal-workflow/docs/agents/bug-workflow-routing.md +9 -7
  125. package/internal-workflow/docs/agents/coding-skill-routing.md +170 -120
  126. package/internal-workflow/docs/agents/tool-usage.md +23 -12
  127. package/internal-workflow/manifest.json +1 -1
  128. package/internal-workflow/operations/code-review/SKILL.md +34 -15
  129. package/internal-workflow/operations/implementation/SKILL.md +21 -16
  130. package/internal-workflow/profiles/implementer.toml +9 -0
  131. package/internal-workflow/profiles/review_coordinator.toml +9 -0
  132. package/internal-workflow/profiles/spec_reviewer.toml +9 -0
  133. package/internal-workflow/profiles/standards_reviewer.toml +9 -0
  134. package/internal-workflow/schemas/code-review-v1.json +1 -1
  135. package/internal-workflow/schemas/implementation-report-v1.json +1 -1
  136. package/internal-workflow/schemas/proof-report-v1.json +1 -1
  137. package/internal-workflow/skills/bug-root-cause-explainer/SKILL.md +114 -0
  138. package/internal-workflow/skills/bug-root-cause-explainer/agents/openai.yaml +7 -0
  139. package/internal-workflow/skills/bug-root-cause-explainer/evals/evals.json +18 -0
  140. package/internal-workflow/skills/code-review/SKILL.md +84 -306
  141. package/internal-workflow/skills/code-review/agents/openai.yaml +5 -3
  142. package/internal-workflow/skills/code-review/evals/evals.json +83 -0
  143. package/internal-workflow/skills/code-review/references/standards-smells.md +41 -0
  144. package/internal-workflow/skills/diagnosing-bugs/SKILL.md +69 -32
  145. package/internal-workflow/skills/diagnosing-bugs/agents/openai.yaml +2 -2
  146. package/internal-workflow/skills/diagnosing-bugs/evals/evals.json +63 -0
  147. package/internal-workflow/skills/grilling/SKILL.md +51 -0
  148. package/internal-workflow/skills/grilling/agents/openai.yaml +6 -0
  149. package/internal-workflow/skills/grilling/evals/evals.json +47 -0
  150. package/internal-workflow/skills/implement/SKILL.md +135 -0
  151. package/internal-workflow/skills/implement/agents/openai.yaml +6 -0
  152. package/internal-workflow/skills/implement/evals/evals.json +150 -0
  153. package/internal-workflow/skills/plan/SKILL.md +59 -0
  154. package/internal-workflow/skills/plan/agents/openai.yaml +6 -0
  155. package/internal-workflow/skills/plan/evals/evals.json +36 -0
  156. package/internal-workflow/skills/prototype/LOGIC.md +130 -0
  157. package/internal-workflow/skills/prototype/SKILL.md +69 -0
  158. package/internal-workflow/skills/prototype/UI.md +157 -0
  159. package/internal-workflow/skills/prototype/agents/openai.yaml +6 -0
  160. package/internal-workflow/skills/prototype/evals/evals.json +67 -0
  161. package/internal-workflow/skills/research/SKILL.md +110 -0
  162. package/internal-workflow/skills/research/agents/openai.yaml +6 -0
  163. package/internal-workflow/skills/research/evals/evals.json +49 -0
  164. package/internal-workflow/skills/tdd/SKILL.md +72 -67
  165. package/internal-workflow/skills/tdd/agents/openai.yaml +2 -2
  166. package/internal-workflow/skills/tdd/evals/evals.json +12 -0
  167. package/internal-workflow/skills/tdd/mocking.md +48 -1
  168. package/internal-workflow/skills/tdd/refactoring.md +3 -3
  169. package/internal-workflow/skills/tickets-orchestrator/SKILL.md +199 -0
  170. package/internal-workflow/skills/tickets-orchestrator/agents/openai.yaml +6 -0
  171. package/internal-workflow/skills/tickets-orchestrator/evals/evals.json +126 -0
  172. package/internal-workflow/skills/tickets-orchestrator/references/delegate-integrate.md +83 -0
  173. package/internal-workflow/skills/tickets-orchestrator/references/finish-delivery.md +69 -0
  174. package/internal-workflow/skills/tickets-orchestrator/references/stop-completion.md +63 -0
  175. package/internal-workflow/skills/to-spec/SKILL.md +133 -0
  176. package/internal-workflow/skills/to-spec/agents/openai.yaml +6 -0
  177. package/internal-workflow/skills/to-spec/evals/evals.json +24 -0
  178. package/internal-workflow/skills/to-tickets/SKILL.md +189 -0
  179. package/internal-workflow/skills/to-tickets/agents/openai.yaml +6 -0
  180. package/internal-workflow/skills/to-tickets/evals/evals.json +79 -0
  181. package/internal-workflow/skills/to-tickets/references/publishing-details.md +117 -0
  182. package/package.json +1 -1
  183. package/dist/src/v2/proof-store.d.ts +0 -54
  184. package/dist/src/v2/proof-store.d.ts.map +0 -1
  185. package/dist/src/v2/proof-store.js +0 -301
  186. package/dist/src/v2/proof-store.js.map +0 -1
  187. package/dist/src/v2/route-continuations.d.ts +0 -32
  188. package/dist/src/v2/route-continuations.d.ts.map +0 -1
  189. package/dist/src/v2/route-continuations.js +0 -2
  190. package/dist/src/v2/route-continuations.js.map +0 -1
  191. package/dist/src/v2/route-coordinator.d.ts +0 -72
  192. package/dist/src/v2/route-coordinator.d.ts.map +0 -1
  193. package/dist/src/v2/route-coordinator.js +0 -275
  194. package/dist/src/v2/route-coordinator.js.map +0 -1
  195. package/dist/src/v2/route-decision.d.ts +0 -120
  196. package/dist/src/v2/route-decision.d.ts.map +0 -1
  197. package/dist/src/v2/route-decision.js +0 -380
  198. package/dist/src/v2/route-decision.js.map +0 -1
  199. package/dist/src/v2/spec-coordinator.d.ts +0 -73
  200. package/dist/src/v2/spec-coordinator.d.ts.map +0 -1
  201. package/dist/src/v2/spec-coordinator.js +0 -126
  202. package/dist/src/v2/spec-coordinator.js.map +0 -1
  203. package/dist/src/v2/spec-delivery.d.ts +0 -112
  204. package/dist/src/v2/spec-delivery.d.ts.map +0 -1
  205. package/dist/src/v2/spec-delivery.js +0 -336
  206. package/dist/src/v2/spec-delivery.js.map +0 -1
  207. package/dist/src/v2/triage-route.d.ts +0 -68
  208. package/dist/src/v2/triage-route.d.ts.map +0 -1
  209. package/dist/src/v2/triage-route.js +0 -223
  210. package/dist/src/v2/triage-route.js.map +0 -1
  211. package/dist/src/v2/waiting-human-coordinator.d.ts +0 -49
  212. package/dist/src/v2/waiting-human-coordinator.d.ts.map +0 -1
  213. package/dist/src/v2/waiting-human-coordinator.js +0 -509
  214. package/dist/src/v2/waiting-human-coordinator.js.map +0 -1
  215. package/dist/src/v2/waiting-human.d.ts +0 -143
  216. package/dist/src/v2/waiting-human.d.ts.map +0 -1
  217. package/dist/src/v2/waiting-human.js +0 -408
  218. package/dist/src/v2/waiting-human.js.map +0 -1
  219. package/internal-workflow/docs/agents/contract-test-ledger.md +0 -71
  220. package/internal-workflow/docs/agents/review-gates.md +0 -42
  221. package/internal-workflow/docs/agents/review-protocol.md +0 -98
  222. package/internal-workflow/evals/coding-skill-evals.json +0 -373
  223. package/internal-workflow/operations/ambiguity-review/SKILL.md +0 -5
  224. package/internal-workflow/operations/qualification-repair/SKILL.md +0 -17
  225. package/internal-workflow/operations/spec-author/SKILL.md +0 -12
  226. package/internal-workflow/operations/spec-review/SKILL.md +0 -12
  227. package/internal-workflow/operations/triage/SKILL.md +0 -12
  228. package/internal-workflow/profiles/analyst_deep.toml +0 -9
  229. package/internal-workflow/profiles/implementer_standard.toml +0 -9
  230. package/internal-workflow/profiles/proof_agent.toml +0 -8
  231. package/internal-workflow/profiles/reviewer_deep.toml +0 -9
  232. package/internal-workflow/profiles/reviewer_standard.toml +0 -9
  233. package/internal-workflow/schemas/ambiguity-review-v1.json +0 -1
  234. package/internal-workflow/schemas/spec-author-v1.json +0 -1
  235. package/internal-workflow/schemas/spec-review-v1.json +0 -30
  236. package/internal-workflow/schemas/triage-route-v1.json +0 -1
  237. package/internal-workflow/skills/agent-auto/SKILL.md +0 -19
  238. package/internal-workflow/skills/agent-auto/agents/openai.yaml +0 -6
  239. package/internal-workflow/skills/code-debugger/SKILL.md +0 -122
  240. package/internal-workflow/skills/code-debugger/agents/openai.yaml +0 -7
  241. package/internal-workflow/skills/code-review/references/bug-classes.md +0 -56
  242. package/internal-workflow/skills/code-review/references/cleanup-lens.md +0 -52
  243. package/internal-workflow/skills/code-review/references/framework-lenses.md +0 -34
  244. package/internal-workflow/skills/code-review/references/targeted-recipes.md +0 -49
  245. package/internal-workflow/skills/implementation-spec-maker/SKILL.md +0 -107
  246. package/internal-workflow/skills/implementation-spec-maker/agents/openai.yaml +0 -6
  247. package/internal-workflow/skills/implementation-spec-maker/references/source-modes.md +0 -32
  248. package/internal-workflow/skills/implementation-spec-maker/references/spec-template.md +0 -146
  249. package/internal-workflow/skills/implementation-spec-review/SKILL.md +0 -131
  250. package/internal-workflow/skills/implementation-spec-review/agents/openai.yaml +0 -6
  251. package/internal-workflow/skills/implementation-spec-review/evals/evals.json +0 -78
  252. package/internal-workflow/skills/implementation-spec-review/references/review-loop.md +0 -121
  253. package/internal-workflow/skills/small-task-implementer/SKILL.md +0 -112
  254. package/internal-workflow/skills/small-task-implementer/agents/openai.yaml +0 -6
  255. package/internal-workflow/skills/spec-implementer/SKILL.md +0 -133
  256. package/internal-workflow/skills/spec-implementer/agents/openai.yaml +0 -6
  257. package/internal-workflow/skills/spec-implementer/evals/evals.json +0 -30
  258. package/internal-workflow/skills/spec-implementer/references/review-loop.md +0 -100
  259. package/internal-workflow/skills/triage/AGENT-BRIEF.md +0 -192
  260. package/internal-workflow/skills/triage/OUT-OF-SCOPE.md +0 -101
  261. package/internal-workflow/skills/triage/SKILL.md +0 -134
  262. package/internal-workflow/skills/triage/agents/openai.yaml +0 -6
@@ -1,12 +0,0 @@
1
- # Triage Operation
2
-
3
- Inspect the supplied issue and repository evidence without edits or external
4
- writes. Use the packaged
5
- [coding routing](../../docs/agents/coding-skill-routing.md) for the distinction
6
- between a direct deterministic implementation and a real execution gap. Use
7
- the packaged [Triage skill](../../skills/triage/SKILL.md) only for evidence
8
- discipline; its labels and tracker mutations are outside this operation.
9
-
10
- Return exactly one package route in `schemas/triage-route-v1.json`: direct,
11
- spec-required, awaiting-user for material product ambiguity, or a typed
12
- blocker. Technical implementation choices never require awaiting-user.
@@ -1,9 +0,0 @@
1
- name = "analyst_deep"
2
- description = "Deep read-only analysis for ambiguous architecture, contracts, and root causes."
3
- nickname_candidates = ["Sage"]
4
- model = "gpt-5.6-sol"
5
- model_reasoning_effort = "xhigh"
6
- sandbox_mode = "read-only"
7
- developer_instructions = """
8
- Analyze only. Build evidence-backed conclusions and recommendations; leave final decisions and edits to the parent.
9
- """
@@ -1,9 +0,0 @@
1
- name = "implementer_standard"
2
- description = "Write-capable implementation worker for one approved, bounded ticket slice."
3
- nickname_candidates = ["Forge", "Mason", "Builder"]
4
- model = "gpt-5.6-sol"
5
- model_reasoning_effort = "medium"
6
- sandbox_mode = "workspace-write"
7
- developer_instructions = """
8
- Implement only the assigned approved ticket slice through its observable interface. Respect the exact write scope, tests, exclusions, and stop conditions. You are not alone in the repository: preserve unrelated and concurrent changes, never revert work you do not own, and report overlap before editing. Use behavior-first proof for behavior changes and return changed files, acceptance proof, skipped checks, risks, and blockers to the root integrator.
9
- """
@@ -1,8 +0,0 @@
1
- name = "proof_agent"
2
- description = "Write-capable contained proof worker; Runner enforces proof-only postconditions."
3
- model = "gpt-5.6-sol"
4
- model_reasoning_effort = "high"
5
- sandbox_mode = "workspace-write"
6
- developer_instructions = """
7
- Prove only the frozen criteria. Write only proof evidence requested by the Runner, never product behavior, Git history, GitHub state, publication state, or credentials. Return the exact supplied JSON schema.
8
- """
@@ -1,9 +0,0 @@
1
- name = "reviewer_deep"
2
- description = "Independent read-only reviewer for plans, specs, code, cleanup, and security."
3
- nickname_candidates = ["Atlas", "Delta", "Echo"]
4
- model = "gpt-5.6-sol"
5
- model_reasoning_effort = "high"
6
- sandbox_mode = "read-only"
7
- developer_instructions = """
8
- Review adversarially and exhaustively. Trace contracts, authorization, failure recovery, concurrency, and state transitions. For code, inspect every external side effect and verify asynchronous work is awaited or returned. Never edit files; return proposed fixes to the parent. Report only concrete findings with evidence, severity, confidence, and verification gaps.
9
- """
@@ -1,9 +0,0 @@
1
- name = "reviewer_standard"
2
- description = "Independent read-only reviewer for medium-risk plans, specs, tickets, cleanup, and code changes."
3
- nickname_candidates = ["Aster", "Quill", "Vega"]
4
- model = "gpt-5.6-sol"
5
- model_reasoning_effort = "medium"
6
- sandbox_mode = "read-only"
7
- developer_instructions = """
8
- Review independently and proportionately. Trace the changed behavior, ownership, contracts, failure paths, and validation without expanding scope. Never edit files. Return concrete findings with evidence, severity, confidence, verification gaps, and proposed fixes to the parent.
9
- """
@@ -1 +0,0 @@
1
- {"additionalProperties":false,"properties":{"candidateSha256":{"pattern":"^[a-f0-9]{64}$","type":"string"},"evidenceReviewed":{"items":{"minLength":1,"type":"string"},"type":"array"},"findings":{"items":{"minLength":1,"type":"string"},"type":"array"},"recommendation":{"minLength":1,"type":"string"},"verdict":{"enum":["approved","rejected","blocked"],"type":"string"},"version":{"const":1,"type":"integer"}},"required":["version","candidateSha256","verdict","evidenceReviewed","findings","recommendation"],"type":"object"}
@@ -1 +0,0 @@
1
- {"additionalProperties":false,"properties":{"blockers":{"items":{"minLength":1,"type":"string"},"type":"array"},"specPath":{"type":["string","null"]},"specSha256":{"type":["string","null"]},"status":{"enum":["ready","blocked"],"type":"string"},"summary":{"minLength":1,"type":"string"},"version":{"const":1,"type":"integer"}},"required":["version","status","specPath","specSha256","summary","blockers"],"type":"object"}
@@ -1,30 +0,0 @@
1
- {
2
- "additionalProperties": false,
3
- "properties": {
4
- "acceptedRisks": {
5
- "items": {
6
- "additionalProperties": false,
7
- "properties": {
8
- "acceptedBy": { "minLength": 1, "type": "string" },
9
- "defectId": { "minLength": 1, "type": "string" },
10
- "policy": { "minLength": 1, "type": "string" },
11
- "rationale": { "minLength": 1, "type": "string" }
12
- },
13
- "required": ["defectId", "rationale", "policy", "acceptedBy"],
14
- "type": "object"
15
- },
16
- "type": "array"
17
- },
18
- "affectedContracts": { "items": { "minLength": 1, "type": "string" }, "type": "array" },
19
- "affectedDefectIds": { "items": { "minLength": 1, "type": "string" }, "type": "array" },
20
- "coverage": { "items": { "minLength": 1, "type": "string" }, "type": "array" },
21
- "coverageInvalidated": { "type": "boolean" },
22
- "defects": { "items": { "type": "object" }, "type": "array" },
23
- "mode": { "enum": ["full", "closure"], "type": "string" },
24
- "reviewerSessionId": { "minLength": 1, "type": "string" },
25
- "verdict": { "enum": ["approved", "needs-work", "rejected"], "type": "string" },
26
- "version": { "const": 1, "type": "integer" }
27
- },
28
- "required": ["version", "verdict", "mode", "coverage", "defects", "reviewerSessionId", "affectedDefectIds", "affectedContracts", "coverageInvalidated", "acceptedRisks"],
29
- "type": "object"
30
- }
@@ -1 +0,0 @@
1
- {"type":"object","additionalProperties":false,"required":["report"],"properties":{"report":{"anyOf":[{"type":"object","additionalProperties":false,"required":["version","status","inspectedEvidence","assumptions","direct","specRequired","awaitingUser","blocker"],"properties":{"version":{"type":"integer","const":1},"status":{"type":"string","const":"direct"},"inspectedEvidence":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"object","additionalProperties":false,"required":["kind","location","summary"],"properties":{"kind":{"type":"string","enum":["issue","comment","code","caller","test","instruction","context","domain","adr","behavior"]},"location":{"type":"string","minLength":1,"maxLength":16384},"summary":{"type":"string","minLength":1,"maxLength":16384}}}},"assumptions":{"type":"array","minItems":0,"maxItems":256,"items":{"type":"string","minLength":1,"maxLength":16384}},"direct":{"type":"object","additionalProperties":false,"required":["summary","behaviors","verification"],"properties":{"summary":{"type":"string","minLength":1,"maxLength":16384},"behaviors":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"string","minLength":1,"maxLength":16384}},"verification":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"string","minLength":1,"maxLength":16384}}}},"specRequired":{"type":"null"},"awaitingUser":{"type":"null"},"blocker":{"type":"null"}}},{"type":"object","additionalProperties":false,"required":["version","status","inspectedEvidence","assumptions","direct","specRequired","awaitingUser","blocker"],"properties":{"version":{"type":"integer","const":1},"status":{"type":"string","const":"spec-required"},"inspectedEvidence":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"object","additionalProperties":false,"required":["kind","location","summary"],"properties":{"kind":{"type":"string","enum":["issue","comment","code","caller","test","instruction","context","domain","adr","behavior"]},"location":{"type":"string","minLength":1,"maxLength":16384},"summary":{"type":"string","minLength":1,"maxLength":16384}}}},"assumptions":{"type":"array","minItems":0,"maxItems":256,"items":{"type":"string","minLength":1,"maxLength":16384}},"direct":{"type":"null"},"specRequired":{"type":"object","additionalProperties":false,"required":["summary","complexityReasons","specMode","reviewFocus"],"properties":{"summary":{"type":"string","minLength":1,"maxLength":16384},"complexityReasons":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"string","minLength":1,"maxLength":16384}},"specMode":{"type":"string","enum":["compact","standard"]},"reviewFocus":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"string","minLength":1,"maxLength":16384}}}},"awaitingUser":{"type":"null"},"blocker":{"type":"null"}}},{"type":"object","additionalProperties":false,"required":["version","status","inspectedEvidence","assumptions","direct","specRequired","awaitingUser","blocker"],"properties":{"version":{"type":"integer","const":1},"status":{"type":"string","const":"awaiting-user"},"inspectedEvidence":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"object","additionalProperties":false,"required":["kind","location","summary"],"properties":{"kind":{"type":"string","enum":["issue","comment","code","caller","test","instruction","context","domain","adr","behavior"]},"location":{"type":"string","minLength":1,"maxLength":16384},"summary":{"type":"string","minLength":1,"maxLength":16384}}}},"assumptions":{"type":"array","minItems":0,"maxItems":256,"items":{"type":"string","minLength":1,"maxLength":16384}},"direct":{"type":"null"},"specRequired":{"type":"null"},"awaitingUser":{"type":"object","additionalProperties":false,"required":["outcomes","absenceOfAuthorizedChoiceEvidence","recommendation","question"],"properties":{"outcomes":{"type":"array","minItems":2,"maxItems":256,"items":{"type":"object","additionalProperties":false,"required":["id","title","behaviorDelta","evidence"],"properties":{"id":{"type":"string","minLength":1,"maxLength":16384},"title":{"type":"string","minLength":1,"maxLength":16384},"behaviorDelta":{"type":"string","minLength":1,"maxLength":16384},"evidence":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"string","minLength":1,"maxLength":16384}}}}},"absenceOfAuthorizedChoiceEvidence":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"string","minLength":1,"maxLength":16384}},"recommendation":{"type":"string","minLength":1,"maxLength":16384},"question":{"type":"string","minLength":1,"maxLength":16384}}},"blocker":{"type":"null"}}},{"type":"object","additionalProperties":false,"required":["version","status","inspectedEvidence","assumptions","direct","specRequired","awaitingUser","blocker"],"properties":{"version":{"type":"integer","const":1},"status":{"type":"string","const":"blocked"},"inspectedEvidence":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"object","additionalProperties":false,"required":["kind","location","summary"],"properties":{"kind":{"type":"string","enum":["issue","comment","code","caller","test","instruction","context","domain","adr","behavior"]},"location":{"type":"string","minLength":1,"maxLength":16384},"summary":{"type":"string","minLength":1,"maxLength":16384}}}},"assumptions":{"type":"array","minItems":0,"maxItems":256,"items":{"type":"string","minLength":1,"maxLength":16384}},"direct":{"type":"null"},"specRequired":{"type":"null"},"awaitingUser":{"type":"null"},"blocker":{"type":"object","additionalProperties":false,"required":["kind","code","summary","evidence"],"properties":{"kind":{"type":"string","enum":["external","safety","exhausted"]},"code":{"type":"string","minLength":1,"maxLength":16384},"summary":{"type":"string","minLength":1,"maxLength":16384},"evidence":{"type":"array","minItems":1,"maxItems":256,"items":{"type":"string","minLength":1,"maxLength":16384}}}}}}]}}}
@@ -1,19 +0,0 @@
1
- ---
2
- name: agent-auto
3
- description: Implement one prepared GitHub issue inside the runner-owned worktree and return a typed implementation report.
4
- ---
5
-
6
- # Agent Auto
7
-
8
- Implement one issue end to end inside the prepared worktree. Treat the supplied issue snapshot, frozen acceptance criteria, repository instructions, and runner-provided output schema as authoritative.
9
-
10
- Inspect the repository, choose the smallest complete strategy, and follow the
11
- operation-provided package routing resources. Apply the packaged TDD skill for
12
- behavior changes, run focused affected validation, repair failures that are
13
- within the issue scope, and leave the worktree ready for Runner-owned review
14
- and independent acceptance proof. Do not invoke planning or review workflows:
15
- the Runner has already selected and persisted this implementation operation.
16
-
17
- The runner owns authorization and every external effect. Do not commit, push, open or edit a pull request, mutate GitHub labels/comments, publish packages, deploy, or use external credentials. Do not copy or print credential bytes or auth/secret paths. If completion depends on a credential, unavailable tool/service, or product decision, return the typed external blocker instead of widening authority.
18
-
19
- Return only the JSON object required by the exact output schema supplied by the runner. Do not add prose around the report and do not independently restate or modify its fields.
@@ -1,6 +0,0 @@
1
- interface:
2
- display_name: "Agent Auto Implementation"
3
- short_description: "Implement one runner-owned issue attempt"
4
- default_prompt: "Follow the package-owned implementation operation and return its exact JSON report."
5
- policy:
6
- allow_implicit_invocation: false
@@ -1,122 +0,0 @@
1
- ---
2
- name: code-debugger
3
- description: Implement and verify an explicit or approved bug fix end-to-end. Use for fix requests or after diagnosis; not for explanation-only work, which uses `bug-root-cause-explainer`.
4
- ---
5
-
6
- # Code Debugger
7
-
8
- ## Overview
9
-
10
- Treat every bug report as an engineering investigation, not a prompt to guess. Start by proving whether each reported problem is valid and still current, then narrow the failing path, patch the root cause with the smallest correct change, and verify the result before closing the task. Always plan your actions explicitly before executing them.
11
-
12
- For confirmed contract defects, apply the shared Contract Test Ledger gate at `../../docs/agents/contract-test-ledger.md`.
13
-
14
- ## Activation Rule
15
-
16
- Use this skill only when the user wants implementation.
17
-
18
- For routing between bug diagnosis, feedback-loop construction, and implementation, use `../../docs/agents/bug-workflow-routing.md`.
19
-
20
- - If the user wants diagnosis, explanation, or options first, use `bug-root-cause-explainer`.
21
- - If the user reports a hard, flaky, performance-related, or unclear bug without a reliable feedback loop, use `diagnosing-bugs`.
22
- - If the user already chose a fix path, implement that path here.
23
- - Reviewer repairs already owned by an active authorized TDD flow stay in that flow under `bug-workflow-routing.md`; use this skill for separate fixes or ambiguous reproduction/cause/repair.
24
-
25
- ## Debugging Workflow
26
-
27
- Default execution mode is inline; use `analyst_deep` only while causal or contract ambiguity remains unresolved.
28
-
29
- 1. Triage every reported issue before accepting it as a bug.
30
- - Do not assume a reported problem is correct, current, or reproducible.
31
- - Check whether the report refers to code that has already changed, a misunderstanding of intended behavior, a stale environment, or a non-issue.
32
- - Classify each item explicitly: confirmed bug, not reproducible yet, outdated, expected behavior, duplicate, or blocked.
33
- - Only move to implementation once there is evidence that the issue is real.
34
-
35
- 2. Define the failure precisely.
36
- - Extract the actual symptom, expected behavior, affected surface, and reproduction hints from the user request, logs, screenshots, tests, or commands.
37
- - Convert vague reports into a concrete statement: what is broken, where it happens, and under which input.
38
-
39
- 3. Build a complete issue ledger when multiple bugs are reported.
40
- - Enumerate every reported item before fixing anything.
41
- - Track status for each entry (triage, reproduced, fixing, verified, invalid, blocked).
42
- - Process items one by one, but keep the full ledger visible.
43
-
44
- 4. Reproduce or recover a failing signal.
45
- - Prefer the narrowest reliable proof: a failing test, local command, runtime log, or API response.
46
- - Inspect existing running processes before starting duplicate services.
47
- - If full reproduction is impossible, establish the strongest available failing signal and state what is missing.
48
- - If no red-capable signal can be built for an unclear or flaky bug, switch to `diagnosing-bugs` before patching.
49
-
50
- 5. Create a regression contract row only when the ledger gate passes.
51
- - Record the invariant, concrete missed failure, and first regression test/proof before patching.
52
- - The preferred sequence is `planned -> red -> green`: show the regression signal fails, apply the fix, then verify it passes.
53
- - If no correct public seam exists, mark the ledger row `blocked` with the missing seam or fixture instead of writing an implementation-detail test by default.
54
-
55
- 6. Build context before editing.
56
- - Read local docs, runbooks, or feature notes first.
57
- - Trace the execution path through entrypoints, callers, state writes, async boundaries, DTOs, and external integrations.
58
- - Inspect nearby modules that can invalidate assumptions.
59
- - If a prior `bug-root-cause-explainer` diagnosis exists, treat it as the starting point, then verify the key claim in code before changing anything.
60
-
61
- 7. Identify the root cause.
62
- - Separate the symptom from the defect that causes it.
63
- - **Environment Check:** Always verify the versions of relevant dependencies (`package.json`, `requirements.txt`, `go.mod`, etc.). A bug might be a known issue in a specific library version.
64
- - When framework or library behavior is material to the fix, consult official documentation or your knowledge base tools.
65
-
66
- 8. Implement the smallest correct fix.
67
- - Before editing a confirmed bug, apply `../../docs/agents/bugfix-quality-gate.md`.
68
- - Fix the root cause instead of masking the symptom.
69
- - Preserve existing architecture and local code patterns.
70
- - Avoid unrelated refactors while debugging.
71
- - Add or update a regression test when feasible.
72
-
73
- 9. Verify the outcome.
74
- - Run the narrowest meaningful checks: targeted tests, lint, build, or log inspection.
75
- - Verify the final observable outcome, not only an intermediate flag, event, queue item, callback, or response.
76
- - Compare the signal before and after the fix.
77
-
78
- 10. Report with evidence.
79
- - State the root cause, the fix, and exactly how it was verified.
80
- - Call out anything that could not be verified and why.
81
- - If the fix follows a user-approved path from `bug-root-cause-explainer`, say which path was implemented.
82
-
83
- ## Operating Rules
84
-
85
- - **Chain of Thought:** Before executing any commands, reading files, or modifying code, write a `<thinking>` block outlining your immediate next steps and hypotheses.
86
- - **Safety Rails:** NEVER run destructive commands (e.g., `rm -rf`, `DROP TABLE`, destructive Git resets) without explicit user confirmation. For database debugging, strictly use `SELECT` or read-only transactions.
87
- - **Anti-Loop Mechanism:** If you fail to reproduce a bug or pass a test after 3 consecutive attempts, STOP making blind changes. Output a summary of what you tried, identify the current blocker, and explicitly ask the user for guidance or missing context.
88
- - Prefer repository evidence over speculation.
89
- - Prefer validating a report before treating it as ground truth.
90
- - Prefer fast text searches (like `rg` or `grep`) over broad file reads.
91
- - Prefer exact commands and exact failing conditions over summaries.
92
- - If a user report is underspecified, infer from code, tests, logs, and docs first; ask questions only when a safe next step cannot be discovered.
93
- - If the bug is intermittent or flaky, look for race conditions, shared mutable state, retries, timing assumptions, and missing cleanup.
94
-
95
- ## Failure Modes To Check Aggressively
96
-
97
- - Wrong branch or inverted condition
98
- - Missing `await` or broken async ordering
99
- - Null, undefined, or empty-state handling
100
- - DTO or schema drift across module boundaries
101
- - Cache invalidation or stale state
102
- - Timezone, locale, or unit conversion errors
103
- - Partial writes and inconsistent side effects
104
- - Retry duplication or non-idempotent background work
105
- - Broken loading, error, or optimistic UI states
106
- - Incorrect assumptions about framework defaults or recent library behavior
107
-
108
- ## Output Contract & Multi-Issue Response Template
109
-
110
- When the user reports multiple bugs or findings at once, present and maintain a ledger in this streamlined shape before and after implementation. Keep the table compact to prevent formatting errors, and place detailed plans below it.
111
-
112
- ```md
113
- ## Issue Ledger
114
-
115
- | # | Issue | Verdict | Status | Verification |
116
- |---|---|---|---|---|
117
- | 1 | <short restatement> | confirmed bug / outdated / duplicate / blocked | triage / reproduced / fixing / verified / blocked | <test, log, command, or n/a> |
118
- | 2 | <short restatement> | ... | ... | ... |
119
-
120
- ### Details & Plans
121
- * **Issue 1:** <Plan, root cause, and next action>
122
- * **Issue 2:** <Plan, root cause, and next action>
@@ -1,7 +0,0 @@
1
- interface:
2
- display_name: "Code Debugger"
3
- short_description: "Implement and verify an approved bug fix"
4
- default_prompt: "Use $code-debugger to implement the user-approved bug fix path and verify the result. If the user wants diagnosis first, use $bug-root-cause-explainer."
5
-
6
- policy:
7
- allow_implicit_invocation: true
@@ -1,56 +0,0 @@
1
- # Code Review Bug Classes
2
-
3
- Use this reference for substantial reviews and broad bug hunts.
4
-
5
- ## Review Mindset
6
-
7
- - Findings first; summary second.
8
- - Prefer a few high-signal findings over a long speculative list.
9
- - Read enough surrounding code to understand the real execution path.
10
- - Include pre-existing bugs only when they materially affect the reviewed path.
11
- - Treat workaround-shaped code as a review target.
12
- - Treat duplicated business rules, builders, cleanup rules, normalization, cache keys, restart paths, and persistence math as likely drift vectors.
13
- - Treat "tests pass" as insufficient when contracts, ownership, or source-of-truth logic moved.
14
- - Do not stop after the edited hunk unless the change is truly trivial.
15
-
16
- ## Non-Negotiable Passes
17
-
18
- Every substantial review covers:
19
-
20
- 1. **Scope**: exact diff/commit/branch/files under review.
21
- 2. **Execution path**: entrypoints, callers, callees, side effects, state writes, network/DB boundaries, cleanup.
22
- 3. **Architecture fit**: correct owning layer, no leaky abstractions, no duplicate source of truth, no symptom patch in the wrong layer.
23
- 4. **Invariants**: validation, authorization, ordering, idempotency, data shape, permissions, cache visibility, and lifecycle rules.
24
- 5. **Failure modes**: empty, null, duplicate, stale, delayed, retried, timeout, cancellation, partial failure, concurrent execution.
25
- 6. **Blast radius**: DTOs, schemas, cache keys, feature flags, config, metrics, tests, consumers, migrations, and backward compatibility.
26
- 7. **Verification**: narrow tests/lint/build/analyzer for touched areas, or a clear note when a check cannot run.
27
-
28
- ## Bug Classes To Hunt
29
-
30
- - Control-flow mistakes: wrong branch, inverted predicate, missing return, incorrect default, off-by-one, pagination errors.
31
- - State/lifecycle bugs: stale state, forgotten reset, double writes, orphaned cleanup, leaks, inconsistent derived state.
32
- - Async/concurrency bugs: missing `await`, race windows, non-idempotent retries, shared mutable state, closure mutation in retryable callbacks.
33
- - Partial-failure bugs: one side effect succeeds while durable follow-up fails.
34
- - Contract drift: DTO/schema/type mismatch, nullable changes, enum drift, serialization differences, `ObjectId`/`Date` runtime mismatch.
35
- - Cache bugs: stale reads, bad cache keys, cross-tenant leakage, missed invalidation, TTL mismatch.
36
- - Auth regressions: missing actor checks, wrong tenant scope, optional-param bypass, client-only enforcement.
37
- - Data correctness: timezones, DST, rounding, units, locale parsing, duplicate filtering, sort instability.
38
- - UI/API regressions: optimistic state not rolled back, loading/error/empty states broken, incompatible response handling.
39
- - Observability gaps: critical failures suppressed without logs, metrics, retries, or surfaced errors.
40
- - Workarounds: magic delays, one-off guards, forced ordering, duplicated normalization, cross-layer patches.
41
- - Architecture drift: business logic in the wrong layer, source-of-truth splits, unnecessary coupling.
42
- - Deep-module drift: shallow pass-through modules, hypothetical one-adapter seams, lost locality, weak leverage, or tests reaching inside the implementation instead of crossing the Module Interface.
43
-
44
- ## Mandatory Questions
45
-
46
- Ask the relevant subset for each meaningful path:
47
-
48
- - What happens with empty, null, duplicated, delayed, retried, stale, or out-of-order input?
49
- - What happens when a dependency throws, times out, returns partial data, or returns stale data?
50
- - Can two executions interleave and corrupt state, leak data, or duplicate work?
51
- - Are validation and authorization enforced before side effects?
52
- - Does the change rely on a type guarantee that is weaker at runtime?
53
- - Do all readers and writers agree on field names, units, nullability, and semantics?
54
- - If state is rebuilt, cloned, merged, normalized, serialized, or persisted, are all required fields preserved?
55
- - Can feature flags, optional params, defaults, or fallback paths bypass intended behavior?
56
- - If failure happens halfway through, what durable state remains and who repairs it?
@@ -1,52 +0,0 @@
1
- # Cleanup Lens
2
-
3
- Use this method inside the code-review spec/standards lens. Its job is to reduce
4
- maintenance surface without changing required observable behavior. It is never
5
- a standalone gate, activation, verdict, or coverage class.
6
-
7
- ## Depth
8
-
9
- - **Bounded:** inspect material additions and replacements for obvious duplicate
10
- owners, obsolete paths, workaround branches, dead code, and unjustified
11
- abstractions.
12
- - **Amplified:** when mandatory Review Focus names a concrete evidenced
13
- simplification risk, inventory every material addition, replacement,
14
- compatibility path, and runtime owner related to that risk. Do not amplify
15
- from file count, implementation size, or review profile alone.
16
-
17
- ## In Scope
18
-
19
- - duplicated logic, sources of truth, registrations, or old/new paths kept in parallel
20
- - dead helpers, flags, adapters, branches, comments, tests, or documentation left by the change
21
- - workaround-shaped conditionals, magic ordering, symptom patches, and unnecessary state
22
- - compatibility or fallback behavior without current repository, source-authority, or production evidence
23
- - new services, events/listeners, adapters, or indirection with one current consumer and only speculative reuse
24
- - ownership placement when moving or deleting code restores an existing owner without redesigning the system
25
-
26
- Do not turn functional correctness, security, performance, product decisions,
27
- missing regression proof, broad architecture redesign, or style preferences
28
- into cleanup findings. Route them to the applicable code-review lens.
29
-
30
- ## Method
31
-
32
- Classify each material complexity decision:
33
-
34
- - `KEEP`: a current invariant requires it and evidence or a boundary proof supports it.
35
- - `SIMPLIFY`: required behavior can use a smaller existing seam or fewer states or branches.
36
- - `REMOVE`: no current behavior, authority, consumer, or compatibility evidence requires it.
37
-
38
- A one-producer/one-consumer abstraction defaults to `SIMPLIFY` unless a concrete
39
- lifecycle, transaction, dependency-direction, or fanout invariant requires the
40
- boundary. Do not request a new abstraction unless it reduces current
41
- duplication or restores an existing owner now.
42
-
43
- Report a finding only with exact evidence, concrete maintenance cost, and a
44
- behavior-preserving fix. Uncertain removal is a non-blocking follow-up. In
45
- amplified mode, include concise `KEEP | SIMPLIFY | REMOVE` decisions in the
46
- spec/standards handoff; bounded mode needs decisions only when they explain a
47
- finding or protected invariant.
48
-
49
- Cleanup repairs retain the same defect IDs. Medium or low cleanup repairs use coordinator verification plus affected validation. Launch affected-lens Closure
50
- only when the shared review protocol requires it for severity, protected
51
- contract impact, or invalidated mandatory coverage; add correctness whenever
52
- that Closure repair may alter observable behavior.
@@ -1,34 +0,0 @@
1
- # Code Review Framework Lenses
2
-
3
- Load this reference when a framework is explicit or strongly implied by files/configs.
4
-
5
- ## Next.js
6
-
7
- - Server/client component boundaries, hydration assumptions, browser APIs on server.
8
- - `fetch` cache modes, route segment caching, `revalidatePath`/`revalidateTag`, stale data behavior.
9
- - Route handlers/server actions: input validation, auth, serialization of dates/errors/nullables.
10
- - Loading, empty, error, navigation, optimistic update, rollback, back/refresh behavior.
11
- - SSR/client mismatch from locale, feature flags, sessions, params, and search params.
12
-
13
- ## NestJS
14
-
15
- - Request flow through controller, guard, pipe, interceptor, service, repository, events/queues.
16
- - DTO validation versus runtime payload, especially transforms, enums, optionals, nested objects.
17
- - Server-side auth and tenant scope before side effects.
18
- - Transaction boundaries, partial writes, outbox/queue ordering, retry safety.
19
- - Exception mapping, HTTP status behavior, cache decorators, request scope, singleton mutable state, cron/queue concurrency.
20
-
21
- ## Flutter
22
-
23
- - Widget lifecycle: `init`, `build`, async callbacks, `dispose`, state updates after unmount.
24
- - Navigation/back stack, dialog/sheet dismissal, duplicate submit from rapid taps.
25
- - State management transitions, stale emissions, missed listeners, dropped fields.
26
- - Loading, offline, empty, error, retry states.
27
- - Platform permissions, keyboard insets, small-screen overflow, animation/controller/stream cleanup.
28
-
29
- ## Dart
30
-
31
- - Null-safety assumptions, casts, `late`, `!`, JSON parsing, generated serializers.
32
- - `Future`, `Stream`, timer, isolate ordering, cancellation, uncaught errors.
33
- - Equality, copy semantics, immutable updates, mutation during iteration.
34
- - Date/duration/timezone handling, numeric precision, parsing, generic runtime assumptions.
@@ -1,49 +0,0 @@
1
- # Code Review Targeted Recipes
2
-
3
- Load this reference when the diff shape matches one of these recurring risks.
4
-
5
- ## Activation
6
-
7
- - new field or contract: run **New Field Threading**
8
- - transaction/retry/queue/background job: run **Retryable Persistence**
9
- - DTO/schema/type/persistence change: run **Runtime Contract Alignment**
10
- - cache or invalidation change: run **Cache Coherence**
11
- - server/AI/cache/fallback state merged into client state: run **State Merge Precedence**
12
- - preview/trace/summary/score/winner field: run **Aggregation Cardinality**
13
-
14
- ## New Field Threading
15
-
16
- 1. Search for the field name.
17
- 2. Search nearby `build`, `apply`, `adjust`, `replan`, `normalize`, `merge`, `compile`, `serialize`, `clone`, and fallback helpers.
18
- 3. Confirm the field survives primary construction, correction/replan paths, persistence reload, response serialization, and externally visible tests.
19
-
20
- ## Retryable Persistence
21
-
22
- 1. Read the whole transaction/retry callback.
23
- 2. List outer-scope variables referenced inside it.
24
- 3. Flag mutation of outer arrays, counters, iterators, derived inputs, or one-shot streams that changes behavior on retry.
25
- 4. Compare transactional and non-transactional paths for parity.
26
-
27
- ## Runtime Contract Alignment
28
-
29
- 1. Compare DTO validation, internal type, persistence schema, normalization, API response shape, and frontend/state consumers.
30
- 2. Treat `string` versus `ObjectId`, `Date` versus string, enum drift, and nested optional mismatches as review targets.
31
- 3. Prefer boundary validation when malformed input should be rejected.
32
-
33
- ## Cache Coherence
34
-
35
- 1. Identify cache key inputs, tenant/user scope, feature flags, locale, and permissions.
36
- 2. Confirm invalidation covers every write path and revalidation timing matches user-visible expectations.
37
- 3. Check stale reads, cross-tenant leakage, and optimistic UI/cache rollback.
38
-
39
- ## State Merge Precedence
40
-
41
- 1. Identify precedence between user-entered state, server state, AI-generated state, fallback state, cache state, and defaults.
42
- 2. Verify omitted fields, empty objects, `false`, `0`, or `null` cannot erase stronger user choices unless intended.
43
- 3. Check both backend merge logic and frontend state update logic.
44
-
45
- ## Aggregation Cardinality
46
-
47
- 1. Determine whether source data is global, per-group, per-item, per-step, or per-tenant.
48
- 2. Verify top-level summary/trace/score/winner fields do not collapse multiple meaningful entities into one misleading value.
49
- 3. Treat `.find()`, first-selected, `sort()[0]`, and flat-array winner logic as suspicious when multiple groups can each have a result.
@@ -1,107 +0,0 @@
1
- ---
2
- name: "implementation-spec-maker"
3
- description: "Turn an approved plan, implementation issue, contract-discovery task, or existing spec into the smallest deterministic implementation spec. Use when downstream coding needs an executable checklist with confirmed scope, targets, commands, contracts, validation, and review evidence; do not use for product discovery or implementation."
4
- ---
5
-
6
- # Implementation Spec Maker
7
-
8
- Create or revise an execution-ready specification for a downstream coding agent. Do not implement code or reopen approved product scope.
9
-
10
- ## Core Contract
11
-
12
- - Treat the supplied plan, issue, discovery task, or existing spec as source authority.
13
- - Preserve approved scope, exclusions, guardrails, rejected approaches, blockers, validation, and required docs.
14
- - Confirm execution-critical facts from repository evidence or trusted external contracts. Never invent paths, symbols, commands, fixtures, env vars, schemas, ownership, or API behavior.
15
- - Produce the smallest spec another agent can execute without guessing. Save a useful `blocked` spec when a material unknown cannot be resolved.
16
- - Reference approved source content instead of repeating it; write only the missing execution delta.
17
-
18
- ## Preflight
19
-
20
- 1. Read the source authority, applicable repository instructions, and only the evidence needed to confirm targets, commands, contracts, consumers, fixtures, and validation.
21
- 2. Build a transient evidence-backed scope delta with three facts per material requirement: approved behavior, current capability/owner/seam, and the smallest remaining implementation delta. Pass it in the reviewer capsule; persist it in the spec only when an executor needs it.
22
- For a revision or conflicting authority, also compare the prior and current observable claim, mechanism/owner, source of truth, evidence unit/cardinality, and blocked/failure meaning. Any authority-driven change invalidates reused review coverage for that requirement; replacing a bad proof to match an unchanged reviewed claim does not.
23
- 3. Treat behavior already present as `preserve + regression proof`, not new implementation. Stop with a blocked spec when an unresolved product value, copy decision, policy, or ownership choice changes the implementation; never manufacture a working default to keep drafting.
24
- 4. Reuse valid Evidence Maps and `$research` artifacts. Refresh only claims invalidated by changed files, versions, dates, contracts, or conflicts.
25
- 5. Read the relevant section of [source modes](references/source-modes.md). Stop or mark the spec blocked when its source-specific requirements are not satisfied.
26
- 6. Classify and record these independent facts:
27
- - `spec_mode`: `compact | full` — document and coordination density.
28
- - `implementation_size`: `small | medium | large` — expected delivery shape.
29
- - `review_profile`: `simple | medium | high` — consequence and uncertainty,
30
- resolved through the review loop owned by `$implementation-spec-review`.
31
- - `expected_repositories`: exact positive integer from approved scope.
32
-
33
- Before drafting, run a proof-compatibility check for each material outcome: the named proof must be able to observe the exact claim, at the required cardinality, and must not pass while that claim is false. Split platform, provider, tenant, region, or mode proofs whenever their mechanism, source of truth, granularity, timing/redaction, or failure semantics differ; reuse one proof only with evidence of equivalence.
34
-
35
- Do not infer one classification from another. For ticket work, `direct` returns
36
- to `$tdd`, `compact spec` requests compact mode, and `standard spec` asks the
37
- maker to choose the smallest deterministic shape. Start a standard ticket in
38
- compact mode and expand to full only when repository evidence proves a concrete
39
- ambiguity that compact form cannot remove safely.
40
-
41
- ## Choose The Smallest Shape
42
-
43
- Default to `compact`, including coherent high-risk or cross-repository work, when ownership, sequencing, stop conditions, and proof fit clearly.
44
-
45
- Use `full` only when compact form would leave a concrete ambiguity in safety, contract, ownership, sequencing, validation, revision history, or multi-agent integration. Add only the conditional controls that resolve that ambiguity. Risk alone does not require a long document.
46
-
47
- Keep `execution_model: "single-agent"` unless write scopes are perfectly disjoint and one integrator contract is necessary. Never assign overlapping ownership of files, schemas, generated artifacts, migrations, source-of-truth rules, or shared contracts.
48
-
49
- ## Minimum Solution Gate
50
-
51
- Before drafting slices:
52
-
53
- 1. Reduce the approved outcome to required behavior, material invariants, and proof.
54
- 2. State the direct `Minimum Solution` through existing owners, public seams, and repository patterns.
55
- 3. Set `Added Complexity: None` unless the minimum solution cannot satisfy a named requirement or evidenced failure path.
56
- 4. For every added mechanism, including a new service, helper, adapter, layer, schema object, transaction, retry policy, job, cache, flag, compatibility path, or coordination boundary, record the exact invariant or failure that requires it and what breaks without it.
57
- 5. Run the deletion challenge: if removing a proposed mechanism still satisfies all approved behavior, invariants, and proof, remove it from the spec.
58
- 6. Do not use technical detail to conceal a missing product decision. Unknown durations, thresholds, localized copy, policy defaults, and eligibility rules remain blockers when they materially shape behavior.
59
-
60
- Judge simplicity by the fewest necessary concepts, owners, states, and integration points, not by line or file count. Do not require complexity scores or alternative-solution essays.
61
-
62
- ## Draft The Execution Contract
63
-
64
- Read [the spec template](references/spec-template.md) before drafting, then remove every unused placeholder and optional block.
65
-
66
- - Name exact source material, approved scope, exclusions, preconditions, confirmed targets, commands, and observable done criteria.
67
- - Organize behavior-changing work as narrow vertical slices. Start each slice with the first failing behavior test or exact observable proof, then implementation targets and a slice exit gate.
68
- - For contract-heavy behavior, use `../../docs/agents/contract-test-ledger.md` and include only material invariants with their first RED test or proof.
69
- - For UI/app-facing behavior, invoke `$ui-evidence-proof` and embed its task-specific workflow, expected screen state, viewport coverage, fresh artifacts, and criterion-to-artifact mapping in the relevant slice.
70
- - State exact manual/live proof when automation is not applicable.
71
- - Name one source of truth when behavior or data can drift. Reuse existing owners and public seams; invoke `$codebase-design` only when ownership or a public seam changes.
72
- - Add task-specific review checkpoints only when a risky slice becomes stable before later work. Otherwise assign its mandatory lenses, applicable targeted recipes, and concrete bug classes to final review coverage.
73
- - For medium-risk specs, rely on the normal concise `$spec-implementer` completion summary unless a task-specific deviation is needed. For high-risk specs, point `Final Handoff Requirements` to the extended `$spec-implementer` Final Risk Handoff and add only task-specific deviations; do not copy its field list.
74
- - Keep optional cleanup, compatibility logic, feature flags, telemetry, rollout machinery, generic fallbacks, and speculative abstractions out of the spec unless source authority or a proven failure path requires them.
75
-
76
- ## Review And Save
77
-
78
- 1. Save the draft at `docs/implementation-specs/YYYY-MM-DD/HHMM-<slug>.md` with temporary `status: "draft"` and `review_outcome: "Pending"` so review applies to a stable artifact path without presenting it as approved.
79
- 2. Read `../implementation-spec-review/references/review-loop.md` and invoke
80
- `$implementation-spec-review` as its Adapter. Supply the saved spec, source
81
- authority, approved decisions, and evidence; do not restate its topology or
82
- defect lifecycle.
83
- 3. Apply one consolidated, scope-preserving repair batch. Before requesting any Closure, record a transient repair complexity delta containing every newly introduced endpoint, service, durable state, configuration input, schema/public contract, repository, or data owner and its existing-seam justification. Pass only that delta, repaired sections, and affected defects/contracts to Closure; do not add a separate simplification review.
84
- 4. Follow the owner loop until it returns `Approved`, `Blocked`, or an eligible user-authorized `Waived` outcome. Respect its default review budget and rare fresh-Full triggers; do not create review rounds for ordinary coordinator-verifiable repairs.
85
- 5. A preflight-blocked spec may be saved with zero reviews and `review_verdict: "Not run"`. Never fabricate approval or use `Not required`.
86
- 6. Replace temporary lifecycle metadata with outcome, last Adapter verdict,
87
- mandatory coverage, accepted risks, and open stable IDs. Keep pass/session
88
- counts only for high, Closure, or interrupted review. Any substantive
89
- post-approval edit invalidates approval until reviewed again.
90
-
91
- ## Final Response
92
-
93
- Return only:
94
-
95
- ```text
96
- Spec Status: Ready | Blocked
97
- Saved Path: <path>
98
- Execution: <single-agent | multi-agent>; <compact | full>; <small | medium | large>; <n> repository/repositories
99
- Review: <Approved | Blocked | Waived>; <simple | medium | high>; <coverage or gaps>
100
- Adapter Verdict: <Approved | Needs Work | Rejected | Not run>
101
- Verified Defects: <stable IDs or None>
102
- Accepted Risks: <stable IDs, authority, and reason or None>
103
- Open Defects: <stable IDs or None>
104
- Blockers: <unresolved blockers or None>
105
- ```
106
-
107
- Do not repeat the specification or downstream implementation/signoff procedure in chat.
@@ -1,6 +0,0 @@
1
- interface:
2
- display_name: "Implementation Spec Maker"
3
- short_description: "Create lean deterministic implementation specs"
4
- default_prompt: "Use $implementation-spec-maker only for a named execution decision or coordination gap; otherwise keep the direct route. Create the smallest deterministic spec and classify mode, size, repository count, and review risk independently."
5
- policy:
6
- allow_implicit_invocation: true