@zhixuan92/multi-model-agent-core 4.2.2 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/README.md +1 -1
  2. package/dist/config/schema.d.ts +1 -0
  3. package/dist/config/schema.d.ts.map +1 -1
  4. package/dist/config/schema.js +4 -3
  5. package/dist/config/schema.js.map +1 -1
  6. package/dist/error-codes.d.ts +1 -0
  7. package/dist/error-codes.d.ts.map +1 -1
  8. package/dist/error-codes.js +2 -0
  9. package/dist/error-codes.js.map +1 -1
  10. package/dist/events/telemetry-types.d.ts +24 -20
  11. package/dist/events/telemetry-types.d.ts.map +1 -1
  12. package/dist/identity/auth-token-store.d.ts +36 -0
  13. package/dist/identity/auth-token-store.d.ts.map +1 -1
  14. package/dist/identity/auth-token-store.js +71 -2
  15. package/dist/identity/auth-token-store.js.map +1 -1
  16. package/dist/identity/cwd-validator.d.ts.map +1 -1
  17. package/dist/identity/cwd-validator.js +15 -3
  18. package/dist/identity/cwd-validator.js.map +1 -1
  19. package/dist/identity/main-model-resolver.d.ts +14 -0
  20. package/dist/identity/main-model-resolver.d.ts.map +1 -0
  21. package/dist/identity/main-model-resolver.js +83 -0
  22. package/dist/identity/main-model-resolver.js.map +1 -0
  23. package/dist/index.d.ts +3 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +4 -2
  26. package/dist/index.js.map +1 -1
  27. package/dist/intake/brief-compiler-slots/delegate.d.ts +10 -11
  28. package/dist/intake/brief-compiler-slots/delegate.d.ts.map +1 -1
  29. package/dist/intake/brief-compiler-slots/delegate.js +12 -14
  30. package/dist/intake/brief-compiler-slots/delegate.js.map +1 -1
  31. package/dist/intake/brief-compiler-slots/execute-plan.js +3 -1
  32. package/dist/intake/brief-compiler-slots/execute-plan.js.map +1 -1
  33. package/dist/intake/context-overflow-estimator.d.ts +33 -0
  34. package/dist/intake/context-overflow-estimator.d.ts.map +1 -0
  35. package/dist/intake/context-overflow-estimator.js +36 -0
  36. package/dist/intake/context-overflow-estimator.js.map +1 -0
  37. package/dist/intake/pipeline.d.ts.map +1 -1
  38. package/dist/intake/pipeline.js +46 -0
  39. package/dist/intake/pipeline.js.map +1 -1
  40. package/dist/intake/plan-extractor.d.ts.map +1 -1
  41. package/dist/intake/plan-extractor.js +10 -1
  42. package/dist/intake/plan-extractor.js.map +1 -1
  43. package/dist/intake/types.d.ts +1 -0
  44. package/dist/intake/types.d.ts.map +1 -1
  45. package/dist/lifecycle/diff-tracker.d.ts +17 -1
  46. package/dist/lifecycle/diff-tracker.d.ts.map +1 -1
  47. package/dist/lifecycle/diff-tracker.js +115 -2
  48. package/dist/lifecycle/diff-tracker.js.map +1 -1
  49. package/dist/lifecycle/handlers/annotate-completion-handler.d.ts +9 -0
  50. package/dist/lifecycle/handlers/annotate-completion-handler.d.ts.map +1 -0
  51. package/dist/lifecycle/handlers/annotate-completion-handler.js +171 -0
  52. package/dist/lifecycle/handlers/annotate-completion-handler.js.map +1 -0
  53. package/dist/lifecycle/handlers/annotate-criteria-handler.d.ts +3 -0
  54. package/dist/lifecycle/handlers/annotate-criteria-handler.d.ts.map +1 -0
  55. package/dist/lifecycle/handlers/annotate-criteria-handler.js +67 -0
  56. package/dist/lifecycle/handlers/annotate-criteria-handler.js.map +1 -0
  57. package/dist/lifecycle/handlers/baseline-handlers.d.ts.map +1 -1
  58. package/dist/lifecycle/handlers/baseline-handlers.js +106 -71
  59. package/dist/lifecycle/handlers/baseline-handlers.js.map +1 -1
  60. package/dist/lifecycle/handlers/review-handler.d.ts +3 -0
  61. package/dist/lifecycle/handlers/review-handler.d.ts.map +1 -0
  62. package/dist/lifecycle/handlers/review-handler.js +141 -0
  63. package/dist/lifecycle/handlers/review-handler.js.map +1 -0
  64. package/dist/lifecycle/handlers/rework-handler.d.ts +3 -0
  65. package/dist/lifecycle/handlers/rework-handler.d.ts.map +1 -0
  66. package/dist/lifecycle/handlers/rework-handler.js +77 -0
  67. package/dist/lifecycle/handlers/rework-handler.js.map +1 -0
  68. package/dist/lifecycle/handlers/terminal-handlers.d.ts.map +1 -1
  69. package/dist/lifecycle/handlers/terminal-handlers.js +16 -3
  70. package/dist/lifecycle/handlers/terminal-handlers.js.map +1 -1
  71. package/dist/lifecycle/lifecycle-context.d.ts +4 -0
  72. package/dist/lifecycle/lifecycle-context.d.ts.map +1 -1
  73. package/dist/lifecycle/lifecycle-driver.d.ts.map +1 -1
  74. package/dist/lifecycle/lifecycle-driver.js +12 -7
  75. package/dist/lifecycle/lifecycle-driver.js.map +1 -1
  76. package/dist/lifecycle/parallel-criteria-routes.d.ts +1 -1
  77. package/dist/lifecycle/parallel-criteria-routes.d.ts.map +1 -1
  78. package/dist/lifecycle/parallel-criteria-routes.js +21 -1
  79. package/dist/lifecycle/parallel-criteria-routes.js.map +1 -1
  80. package/dist/lifecycle/shared-compute.d.ts +9 -0
  81. package/dist/lifecycle/shared-compute.d.ts.map +1 -1
  82. package/dist/lifecycle/shared-compute.js +35 -3
  83. package/dist/lifecycle/shared-compute.js.map +1 -1
  84. package/dist/lifecycle/stage-plan-builder.d.ts.map +1 -1
  85. package/dist/lifecycle/stage-plan-builder.js +65 -85
  86. package/dist/lifecycle/stage-plan-builder.js.map +1 -1
  87. package/dist/lifecycle/stage-plan-types.d.ts +48 -0
  88. package/dist/lifecycle/stage-plan-types.d.ts.map +1 -1
  89. package/dist/lifecycle/stage-progression.d.ts.map +1 -1
  90. package/dist/lifecycle/stage-progression.js +17 -24
  91. package/dist/lifecycle/stage-progression.js.map +1 -1
  92. package/dist/lifecycle/task-runner.d.ts.map +1 -1
  93. package/dist/lifecycle/task-runner.js +12 -1
  94. package/dist/lifecycle/task-runner.js.map +1 -1
  95. package/dist/model-profiles.json +192 -53
  96. package/dist/providers/anthropic-messages-adapter.d.ts +8 -0
  97. package/dist/providers/anthropic-messages-adapter.d.ts.map +1 -1
  98. package/dist/providers/anthropic-messages-adapter.js +16 -1
  99. package/dist/providers/anthropic-messages-adapter.js.map +1 -1
  100. package/dist/providers/file-tracker.d.ts +12 -0
  101. package/dist/providers/file-tracker.d.ts.map +1 -1
  102. package/dist/providers/file-tracker.js +16 -0
  103. package/dist/providers/file-tracker.js.map +1 -1
  104. package/dist/providers/provider-factory.d.ts.map +1 -1
  105. package/dist/providers/provider-factory.js +27 -2
  106. package/dist/providers/provider-factory.js.map +1 -1
  107. package/dist/providers/runner-shell-types.d.ts +14 -0
  108. package/dist/providers/runner-shell-types.d.ts.map +1 -1
  109. package/dist/providers/runner-shell.d.ts.map +1 -1
  110. package/dist/providers/runner-shell.js +38 -6
  111. package/dist/providers/runner-shell.js.map +1 -1
  112. package/dist/providers/tool-implementations.d.ts +12 -0
  113. package/dist/providers/tool-implementations.d.ts.map +1 -1
  114. package/dist/providers/tool-implementations.js +33 -0
  115. package/dist/providers/tool-implementations.js.map +1 -1
  116. package/dist/reporting/annotate-completion-parser.d.ts +39 -0
  117. package/dist/reporting/annotate-completion-parser.d.ts.map +1 -0
  118. package/dist/reporting/annotate-completion-parser.js +43 -0
  119. package/dist/reporting/annotate-completion-parser.js.map +1 -0
  120. package/dist/reporting/compose-running-headline.d.ts +15 -1
  121. package/dist/reporting/compose-running-headline.d.ts.map +1 -1
  122. package/dist/reporting/compose-running-headline.js +76 -1
  123. package/dist/reporting/compose-running-headline.js.map +1 -1
  124. package/dist/reporting/report-parser-slots/research-report.d.ts +1 -1
  125. package/dist/review/default-engines.d.ts.map +1 -1
  126. package/dist/review/default-engines.js +8 -4
  127. package/dist/review/default-engines.js.map +1 -1
  128. package/dist/review/parse-review-report.d.ts +6 -0
  129. package/dist/review/parse-review-report.d.ts.map +1 -0
  130. package/dist/review/parse-review-report.js +40 -0
  131. package/dist/review/parse-review-report.js.map +1 -0
  132. package/dist/review/reviewer-engine.d.ts +12 -3
  133. package/dist/review/reviewer-engine.d.ts.map +1 -1
  134. package/dist/review/reviewer-engine.js +4 -3
  135. package/dist/review/reviewer-engine.js.map +1 -1
  136. package/dist/review/templates/annotate-completion.d.ts +12 -0
  137. package/dist/review/templates/annotate-completion.d.ts.map +1 -0
  138. package/dist/review/templates/annotate-completion.js +72 -0
  139. package/dist/review/templates/annotate-completion.js.map +1 -0
  140. package/dist/review/templates/quality-review.d.ts +3 -0
  141. package/dist/review/templates/quality-review.d.ts.map +1 -0
  142. package/dist/review/templates/quality-review.js +40 -0
  143. package/dist/review/templates/quality-review.js.map +1 -0
  144. package/dist/review/templates/rework.d.ts +3 -0
  145. package/dist/review/templates/rework.d.ts.map +1 -0
  146. package/dist/review/templates/rework.js +42 -0
  147. package/dist/review/templates/rework.js.map +1 -0
  148. package/dist/review/templates/shared.d.ts +32 -0
  149. package/dist/review/templates/shared.d.ts.map +1 -1
  150. package/dist/review/templates/spec-review.d.ts +1 -16
  151. package/dist/review/templates/spec-review.d.ts.map +1 -1
  152. package/dist/review/templates/spec-review.js +23 -31
  153. package/dist/review/templates/spec-review.js.map +1 -1
  154. package/dist/stores/context-block-project-cap.d.ts +14 -0
  155. package/dist/stores/context-block-project-cap.d.ts.map +1 -0
  156. package/dist/stores/context-block-project-cap.js +68 -0
  157. package/dist/stores/context-block-project-cap.js.map +1 -0
  158. package/dist/stores/context-block-tool.d.ts +2 -0
  159. package/dist/stores/context-block-tool.d.ts.map +1 -1
  160. package/dist/stores/context-block-tool.js +3 -2
  161. package/dist/stores/context-block-tool.js.map +1 -1
  162. package/dist/stores/file-backed-context-block-store.d.ts +8 -1
  163. package/dist/stores/file-backed-context-block-store.d.ts.map +1 -1
  164. package/dist/stores/file-backed-context-block-store.js +116 -4
  165. package/dist/stores/file-backed-context-block-store.js.map +1 -1
  166. package/dist/tools/audit/plan-audit-criteria.d.ts +35 -0
  167. package/dist/tools/audit/plan-audit-criteria.d.ts.map +1 -0
  168. package/dist/tools/audit/plan-audit-criteria.js +136 -0
  169. package/dist/tools/audit/plan-audit-criteria.js.map +1 -0
  170. package/dist/tools/audit/plan-audit-verdict.d.ts +15 -0
  171. package/dist/tools/audit/plan-audit-verdict.d.ts.map +1 -0
  172. package/dist/tools/audit/plan-audit-verdict.js +44 -0
  173. package/dist/tools/audit/plan-audit-verdict.js.map +1 -0
  174. package/dist/tools/audit/schema.d.ts +1 -0
  175. package/dist/tools/audit/schema.d.ts.map +1 -1
  176. package/dist/tools/audit/schema.js +6 -3
  177. package/dist/tools/audit/schema.js.map +1 -1
  178. package/dist/tools/audit/tool-config.d.ts +3 -0
  179. package/dist/tools/audit/tool-config.d.ts.map +1 -1
  180. package/dist/tools/audit/tool-config.js +8 -0
  181. package/dist/tools/audit/tool-config.js.map +1 -1
  182. package/dist/tools/delegate/implementer-criteria.d.ts +31 -47
  183. package/dist/tools/delegate/implementer-criteria.d.ts.map +1 -1
  184. package/dist/tools/delegate/implementer-criteria.js +60 -88
  185. package/dist/tools/delegate/implementer-criteria.js.map +1 -1
  186. package/dist/tools/delegate/tool-config.js +4 -4
  187. package/dist/tools/delegate/tool-config.js.map +1 -1
  188. package/dist/tools/execute-plan/implementer-criteria.d.ts +42 -37
  189. package/dist/tools/execute-plan/implementer-criteria.d.ts.map +1 -1
  190. package/dist/tools/execute-plan/implementer-criteria.js +79 -79
  191. package/dist/tools/execute-plan/implementer-criteria.js.map +1 -1
  192. package/dist/tools/execute-plan/tool-config.d.ts.map +1 -1
  193. package/dist/tools/execute-plan/tool-config.js +23 -13
  194. package/dist/tools/execute-plan/tool-config.js.map +1 -1
  195. package/dist/types/enums.d.ts +2 -2
  196. package/dist/types/run-result.d.ts +58 -0
  197. package/dist/types/run-result.d.ts.map +1 -1
  198. package/dist/types/task-spec.d.ts +14 -0
  199. package/dist/types/task-spec.d.ts.map +1 -1
  200. package/dist/types.d.ts +10 -0
  201. package/dist/types.d.ts.map +1 -1
  202. package/package.json +5 -1
  203. package/dist/lifecycle/handlers/quality-chain-handlers.d.ts +0 -22
  204. package/dist/lifecycle/handlers/quality-chain-handlers.d.ts.map +0 -1
  205. package/dist/lifecycle/handlers/quality-chain-handlers.js +0 -369
  206. package/dist/lifecycle/handlers/quality-chain-handlers.js.map +0 -1
  207. package/dist/lifecycle/handlers/review-diff-handler.d.ts +0 -31
  208. package/dist/lifecycle/handlers/review-diff-handler.d.ts.map +0 -1
  209. package/dist/lifecycle/handlers/review-diff-handler.js +0 -168
  210. package/dist/lifecycle/handlers/review-diff-handler.js.map +0 -1
  211. package/dist/lifecycle/handlers/run-verify-command-handler.d.ts +0 -25
  212. package/dist/lifecycle/handlers/run-verify-command-handler.d.ts.map +0 -1
  213. package/dist/lifecycle/handlers/run-verify-command-handler.js +0 -84
  214. package/dist/lifecycle/handlers/run-verify-command-handler.js.map +0 -1
  215. package/dist/lifecycle/handlers/spec-chain-handlers.d.ts +0 -21
  216. package/dist/lifecycle/handlers/spec-chain-handlers.d.ts.map +0 -1
  217. package/dist/lifecycle/handlers/spec-chain-handlers.js +0 -287
  218. package/dist/lifecycle/handlers/spec-chain-handlers.js.map +0 -1
  219. package/dist/review/templates/diff-review.d.ts +0 -11
  220. package/dist/review/templates/diff-review.d.ts.map +0 -1
  221. package/dist/review/templates/diff-review.js +0 -39
  222. package/dist/review/templates/diff-review.js.map +0 -1
  223. package/dist/review/templates/quality-review-artifact.d.ts +0 -16
  224. package/dist/review/templates/quality-review-artifact.d.ts.map +0 -1
  225. package/dist/review/templates/quality-review-artifact.js +0 -46
  226. package/dist/review/templates/quality-review-artifact.js.map +0 -1
@@ -1,52 +1,57 @@
1
1
  /**
2
- * Execute-plan-specific implementer criteria.
2
+ * Execute-plan worker criteria — 4.3.0 pipeline-redesign mindset.
3
3
  *
4
- * EXECUTE-PLAN'S PURPOSE read this before adding categories.
5
- * mma-execute-plan implements one task from a plan that was written by a
6
- * higher-capability model. Your output is a diff the PLAN AUTHOR will
7
- * read. They wrote the plan precisely; your job is execution, not
8
- * improvement. The success criterion is:
4
+ * mma-execute-plan implements one named task from a plan written by a
5
+ * higher-capability model. The plan is the spec; your output is a diff.
9
6
  *
10
- * "Could the plan author read your diff and say 'yes, that's exactly
11
- * what I wrote' not 'close, but you took liberties' or 'wrong, you
12
- * missed step 3'?"
7
+ * Pipeline mindset (different from earlier versions):
8
+ * - This is a SINGLE-PASS pipeline. There are NO rework rounds for you.
9
+ * - After your turn, a SPEC reviewer (complex tier, full editor tools)
10
+ * runs ONCE — it doesn't ask you to fix gaps; it fixes them inline
11
+ * itself. Plan-fidelity gaps (CODE SUBSTITUTION, STEP SKIP) it can
12
+ * detect, it can also fix.
13
+ * - Then a QUALITY reviewer (complex tier, full editor tools) runs
14
+ * ONCE for safety / correctness — same thing.
15
+ * - Then an annotator scores completion based on the plan's steps.
16
+ * Commit fires if completionPercent ≥ 80.
13
17
  *
14
- * That criterion is what makes a write load-bearing. The fidelity bar
15
- * is sharper than mma-delegate's: even a "better" implementation that
16
- * deviates from the plan is wrong here. If you think the plan is wrong:
17
- * REPORT IT and stop. Do NOT silently improve.
18
- *
19
- * Plan execution is artifact-producing — you write files. Cross-agent
20
- * spec + quality review still applies. But the spec the spec-reviewer
21
- * checks against is the PLAN, not your interpretation of it.
18
+ * What this means for you: do the mechanical task in ONE pass and
19
+ * report what you did. You don't need to anticipate every reviewer
20
+ * concern they fix things, they don't ping-pong with you. Don't
21
+ * restart-loop, don't bail on uncertainty, don't over-verify. The
22
+ * pipeline has a safety net BUT only one round of it.
22
23
  */
23
24
  /**
24
- * The orientation block. Goes at the TOP of every execute-plan prompt.
25
- *
26
- * Without an explicit fidelity statement, workers default to "implement
27
- * the goal" — which produces "improvements" that diverge from the plan
28
- * (CODE SUBSTITUTION, ACCEPTANCE-CRITERIA OVERRUN). With this
29
- * orientation, the worker treats the plan as authoritative and reports
30
- * defects rather than silently working around them.
25
+ * Orientation fidelity-first framing. Goes at the TOP of every
26
+ * execute-plan worker prompt.
31
27
  */
32
28
  export declare const EXECUTE_PLAN_PURPOSE_ORIENTATION: string;
33
29
  export declare const EXECUTE_PLAN_SCOPE_RULE: string;
34
30
  /**
35
- * The failure-mode taxonomy for execute-plan.
36
- *
37
- * Workers calibrated on "implement the goal" tend to make "small
38
- * improvements" to plans they think are imperfect. The 9 categories
39
- * below are the specific ways execution diverges from intent.
31
+ * Top-4 failure modes calibrated from observed worker output, not
32
+ * speculative. The full taxonomy of 9 was dropped to reduce cognitive
33
+ * load on cheap models.
40
34
  */
41
35
  export declare const EXECUTE_PLAN_FAILURE_MODES: string;
42
36
  /**
43
- * Plan-fidelity reminder.
44
- *
45
- * The shared SEVERITY_LADDER does not apply to write tools. The
46
- * counter-balance for execute-plan is opposite to read-only tools:
47
- * the typical failure is OVER-IMPLEMENTATION (improving the plan), not
48
- * under-finding. This block tells the worker the load-bearing
49
- * constraint is fidelity, not "good code".
37
+ * Plan-vs-source reconciliation — handles the case where the plan names
38
+ * a symbol/path that doesn't exist in source (because the plan was
39
+ * authored against an older snapshot). Without this rule, workers either
40
+ * invent the missing symbol (introducing real bugs) or freeze and bail.
41
+ */
42
+ export declare const PLAN_VS_SOURCE_RECONCILIATION: string;
43
+ /**
44
+ * Self-verification — workers must run the plan-listed verification
45
+ * commands themselves before declaring done. Reviewers do not execute
46
+ * code; the worker has shell access and is the source of truth for
47
+ * "do these tests pass?".
48
+ */
49
+ export declare const SELF_VERIFICATION: string;
50
+ /**
51
+ * Turn budget — calibration block. Cheap models default to "be
52
+ * thorough" and treat each turn as "let me re-verify state by
53
+ * re-reading", which becomes a discovery loop. This block tells them
54
+ * to trust their prior reads and edit confidently.
50
55
  */
51
- export declare const PLAN_FIDELITY_REMINDER: string;
56
+ export declare const TURN_BUDGET: string;
52
57
  //# sourceMappingURL=implementer-criteria.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"implementer-criteria.d.ts","sourceRoot":"","sources":["../../../src/tools/execute-plan/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC,QAiBjC,CAAC;AAEb,eAAO,MAAM,uBAAuB,QAMxB,CAAC;AAEb;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,QAiB3B,CAAC;AAEb;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,QAYvB,CAAC"}
1
+ {"version":3,"file":"implementer-criteria.d.ts","sourceRoot":"","sources":["../../../src/tools/execute-plan/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;GAGG;AACH,eAAO,MAAM,gCAAgC,QAUjC,CAAC;AAEb,eAAO,MAAM,uBAAuB,QAKxB,CAAC;AAEb;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,QAO3B,CAAC;AAEb;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,QAU9B,CAAC;AAEb;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,QASlB,CAAC;AAEb;;;;;GAKG;AACH,eAAO,MAAM,WAAW,QAMZ,CAAC"}
@@ -1,104 +1,104 @@
1
1
  /**
2
- * Execute-plan-specific implementer criteria.
2
+ * Execute-plan worker criteria — 4.3.0 pipeline-redesign mindset.
3
3
  *
4
- * EXECUTE-PLAN'S PURPOSE read this before adding categories.
5
- * mma-execute-plan implements one task from a plan that was written by a
6
- * higher-capability model. Your output is a diff the PLAN AUTHOR will
7
- * read. They wrote the plan precisely; your job is execution, not
8
- * improvement. The success criterion is:
4
+ * mma-execute-plan implements one named task from a plan written by a
5
+ * higher-capability model. The plan is the spec; your output is a diff.
9
6
  *
10
- * "Could the plan author read your diff and say 'yes, that's exactly
11
- * what I wrote' not 'close, but you took liberties' or 'wrong, you
12
- * missed step 3'?"
7
+ * Pipeline mindset (different from earlier versions):
8
+ * - This is a SINGLE-PASS pipeline. There are NO rework rounds for you.
9
+ * - After your turn, a SPEC reviewer (complex tier, full editor tools)
10
+ * runs ONCE — it doesn't ask you to fix gaps; it fixes them inline
11
+ * itself. Plan-fidelity gaps (CODE SUBSTITUTION, STEP SKIP) it can
12
+ * detect, it can also fix.
13
+ * - Then a QUALITY reviewer (complex tier, full editor tools) runs
14
+ * ONCE for safety / correctness — same thing.
15
+ * - Then an annotator scores completion based on the plan's steps.
16
+ * Commit fires if completionPercent ≥ 80.
13
17
  *
14
- * That criterion is what makes a write load-bearing. The fidelity bar
15
- * is sharper than mma-delegate's: even a "better" implementation that
16
- * deviates from the plan is wrong here. If you think the plan is wrong:
17
- * REPORT IT and stop. Do NOT silently improve.
18
- *
19
- * Plan execution is artifact-producing — you write files. Cross-agent
20
- * spec + quality review still applies. But the spec the spec-reviewer
21
- * checks against is the PLAN, not your interpretation of it.
18
+ * What this means for you: do the mechanical task in ONE pass and
19
+ * report what you did. You don't need to anticipate every reviewer
20
+ * concern they fix things, they don't ping-pong with you. Don't
21
+ * restart-loop, don't bail on uncertainty, don't over-verify. The
22
+ * pipeline has a safety net BUT only one round of it.
22
23
  */
23
24
  /**
24
- * The orientation block. Goes at the TOP of every execute-plan prompt.
25
- *
26
- * Without an explicit fidelity statement, workers default to "implement
27
- * the goal" — which produces "improvements" that diverge from the plan
28
- * (CODE SUBSTITUTION, ACCEPTANCE-CRITERIA OVERRUN). With this
29
- * orientation, the worker treats the plan as authoritative and reports
30
- * defects rather than silently working around them.
25
+ * Orientation fidelity-first framing. Goes at the TOP of every
26
+ * execute-plan worker prompt.
31
27
  */
32
28
  export const EXECUTE_PLAN_PURPOSE_ORIENTATION = [
33
- 'Why this execution exists:',
34
- 'mma-execute-plan executes ONE task from a plan written by a higher-capability model. Your output is a diff the PLAN AUTHOR will read. They wrote the plan precisely. Your job is execution, not improvement.',
35
- '',
36
- 'The completion test: would the plan author, reading your diff, say "yes, that\'s exactly what I wrote" — or would they say "close, but you took liberties" / "wrong, you missed step 3"?',
29
+ 'You are the mechanical executor of one task from a plan written by a higher-capability model.',
30
+ 'Your job: implement the task EXACTLY as the plan specifies. Not improve it. Not redesign it.',
37
31
  '',
38
- 'Fidelity rules these override your usual instincts:',
39
- '- Follow the plan EXACTLY as written. If the plan provides code blocks, use them VERBATIM (same names, same signatures, same comments, same imports).',
40
- '- Do NOT redesign. Do NOT substitute your own approach. Do NOT improve names you find unidiomatic.',
41
- '- Do NOT add steps the plan does not list. Do NOT skip steps the plan does list.',
42
- '- Do NOT widen scope ("while I\'m here…"). Touch only what this task heading authorizes; another task probably owns the rest.',
43
- '- If the plan looks wrong (typo, contradiction, undefined symbol, missing dependency): REPORT IT in your summary and stop. Do NOT silently work around it. Do NOT silently fix it.',
44
- '- The plan was written by a higher-capability model than you. Your judgment about "what would be cleaner" is not load-bearing here; the plan is.',
32
+ 'Completion test: would the plan author, reading your diff, say "yes, that\'s exactly what I wrote" — or "close, but you took liberties / missed step 3"?',
45
33
  '',
46
- 'Reviewer awareness for plan execution:',
47
- '- The spec-reviewer compares your diff against the PLAN section, not against general "good code" heuristics. A diff that improves on the plan will fail spec review.',
48
- '- The quality-reviewer checks safety/correctness without overriding the plan. If the plan is genuinely unsafe, that surfaces as a quality concern that the caller resolves not as your unilateral fix.',
34
+ 'Three rules that override your usual coding instincts:',
35
+ '- Code blocks the plan provides are VERBATIM contracts. Copy them character-for-character (same names, signatures, comments, control flow). Do not rename, do not reformat, do not "simplify".',
36
+ '- Steps the plan lists are REQUIRED unless explicitly marked optional. Do not skip, do not reorder, do not add steps the plan does not list.',
37
+ '- Files outside the task\'s authorized scope are off-limits. Other tasks own other files; touching them creates merge conflicts.',
49
38
  ].join('\n');
50
39
  export const EXECUTE_PLAN_SCOPE_RULE = [
51
40
  'Scope:',
52
- '- Strictly the task the descriptor names. Other tasks in the plan have other workers; do not implement them on the side.',
53
- '- Touch only the files the named task authorizes (explicit file paths in the plan section, or files clearly implied by the named task).',
54
- '- Out of scope: other plan tasks; refactors not in the plan; "while I\'m here" cleanup; renaming code blocks the plan provided verbatim.',
55
- '- Genuinely necessary cross-cutting work (e.g. updating a caller because the plan changed a signature): allowed when the plan implies it. When in doubt, REPORT it as part of your summary and let the caller decide.',
41
+ '- Strictly the task the descriptor names. Other tasks have other workers.',
42
+ '- Touch only files the named task authorizes (explicit file paths in the plan section, or files clearly implied).',
43
+ '- No "while I\'m here" cleanup, no refactors not in the plan, no renaming code blocks the plan provided verbatim.',
56
44
  ].join('\n');
57
45
  /**
58
- * The failure-mode taxonomy for execute-plan.
59
- *
60
- * Workers calibrated on "implement the goal" tend to make "small
61
- * improvements" to plans they think are imperfect. The 9 categories
62
- * below are the specific ways execution diverges from intent.
46
+ * Top-4 failure modes calibrated from observed worker output, not
47
+ * speculative. The full taxonomy of 9 was dropped to reduce cognitive
48
+ * load on cheap models.
63
49
  */
64
50
  export const EXECUTE_PLAN_FAILURE_MODES = [
65
- 'Patterns to consciously check for. Apply on EVERY plan execution:',
51
+ 'The four ways execution diverges from intent — check yourself against each before declaring done:',
52
+ '',
53
+ '1. CODE SUBSTITUTION — the plan provided a code block; you wrote different code that "does the same thing". The plan\'s code is the contract — copy it verbatim. Even renaming an identifier or removing a comment is substitution.',
54
+ '2. STEP SKIP — the plan listed multiple steps; you did some and silently omitted others. Every step is a required deliverable unless marked optional.',
55
+ '3. PLAN REWRITE — you decided the plan was suboptimal and improved it. The plan author treats the plan as the contract; your improvements are a contract violation.',
56
+ '4. PROBLEM-NOT-FLAGGED — you noticed a defect in the plan (typo, undefined symbol, broken example) and silently worked around it. Defects must be reported in your summary so the caller can correct the plan.',
57
+ ].join('\n');
58
+ /**
59
+ * Plan-vs-source reconciliation — handles the case where the plan names
60
+ * a symbol/path that doesn't exist in source (because the plan was
61
+ * authored against an older snapshot). Without this rule, workers either
62
+ * invent the missing symbol (introducing real bugs) or freeze and bail.
63
+ */
64
+ export const PLAN_VS_SOURCE_RECONCILIATION = [
65
+ 'Plan-vs-source reconciliation:',
66
+ '',
67
+ 'When the plan names a symbol/path/import that grep against the named source files returns ZERO matches for, AND source has a single obvious near-match (same kind of symbol, Levenshtein 1-5):',
66
68
  '',
67
- '1. PLAN REWRITE — you decided the plan was suboptimal and "improved" it. This is the worst execute-plan failure mode. The plan author treats the plan as the contract; your improvements are a contract violation.',
68
- '2. STEP SKIP the plan section lists multiple steps; you implemented some and silently omitted others. Every step listed in the plan is a required deliverable unless the plan explicitly marks it optional.',
69
- '3. STEP REORDER you executed plan steps in a different order than the plan specifies. Order may be load-bearing (later steps may depend on earlier ones); preserve it.',
70
- '4. CODE SUBSTITUTION — the plan provided a code block (function body, import line, type definition) and you wrote DIFFERENT code that "does the same thing". The plan\'s code is verbatim; copy it. Renaming, reformatting, or replacing with idiomatic equivalents is substitution.',
71
- '5. ACCEPTANCE-CRITERIA OVERRUN — the plan listed criteria A and B; you also delivered C ("seemed natural"). Adding extras the plan did not list is scope creep — even if C is technically good code.',
72
- '6. ACCEPTANCE-CRITERIA UNDERRUN — the plan implies sub-criteria (e.g. "add the function" implies "add the export to the index file"; "fix the bug" implies "add a regression test"). Missing implicit sub-criteria is the most common silent-partial-fix in plan execution.',
73
- '7. WRONG-TASK MATCH — you matched a different plan section than the descriptor names (e.g. matched "Step 4: foo" when descriptor said "Step 4: bar"). The descriptor must match the plan heading verbatim; if no unique match exists, report that and stop.',
74
- '8. CROSS-TASK CONTAMINATION — you touched files the named task does not authorize, on the assumption that another task in the plan will eventually need them. Other tasks have other workers; touching their files creates merge conflicts and ownership ambiguity.',
75
- '9. PROBLEM-NOT-FLAGGED — you noticed a defect in the plan (typo, contradiction, undefined symbol, broken example) and silently worked around it. The defect must be reported in your summary so the caller can correct the plan; silent workarounds make the next plan execution harder.',
69
+ '1. Use the actual source symbol, not the plan\'s.',
70
+ '2. Add a "Reconciliations" section to your final summary listing each: "Plan said X; source has Y; used Y."',
71
+ '3. Continue the rest of the task. Do NOT bail on "plan defect detected".',
76
72
  '',
77
- 'Severity calibration for plan execution (in your summary, not via SEVERITY_LADDER which is for read-only tools):',
78
- '- Plan defects you notice: ALWAYS report. The caller may have a fix or may want to update the plan first.',
79
- '- Sub-criteria you cannot satisfy without deviating from the plan: report and stop. Do not pick a workaround unilaterally.',
80
- '- Sub-criteria that are clearly implied but not literally stated: implement them, name them in your summary as "implicit per the task heading".',
73
+ 'Reconciliation is NOT improvement. If the plan\'s symbol DOES exist in source and you chose a different one because it felt cleaner, that\'s CODE SUBSTITUTION (forbidden). Reconciliation is only for the genuine doesn\'t-exist-AND-near-match-exists case. If multiple plausible matches or no near-match: report and stop.',
81
74
  ].join('\n');
82
75
  /**
83
- * Plan-fidelity reminder.
84
- *
85
- * The shared SEVERITY_LADDER does not apply to write tools. The
86
- * counter-balance for execute-plan is opposite to read-only tools:
87
- * the typical failure is OVER-IMPLEMENTATION (improving the plan), not
88
- * under-finding. This block tells the worker the load-bearing
89
- * constraint is fidelity, not "good code".
76
+ * Self-verification — workers must run the plan-listed verification
77
+ * commands themselves before declaring done. Reviewers do not execute
78
+ * code; the worker has shell access and is the source of truth for
79
+ * "do these tests pass?".
80
+ */
81
+ export const SELF_VERIFICATION = [
82
+ 'Self-verification before declaring done:',
83
+ '',
84
+ 'Scan the plan section for verification commands ("Run: <cmd>", "Expected: PASS", a code block under "Verify"). Execute each via your shell tool BEFORE writing your final summary. Include in your summary:',
85
+ '',
86
+ ' Self-verification:',
87
+ ' - $ <command> PASS / FAIL (<N> tests)',
88
+ '',
89
+ 'If any command FAILS: do NOT declare "done". Investigate, fix, re-run. A failing test is your output, not the reviewer\'s problem. If you cannot run a command (shell unavailable, dependency missing): say so explicitly AND treat the task as incomplete.',
90
+ ].join('\n');
91
+ /**
92
+ * Turn budget — calibration block. Cheap models default to "be
93
+ * thorough" and treat each turn as "let me re-verify state by
94
+ * re-reading", which becomes a discovery loop. This block tells them
95
+ * to trust their prior reads and edit confidently.
90
96
  */
91
- export const PLAN_FIDELITY_REMINDER = [
92
- 'Plan-fidelity reminder:',
93
- '- Your judgment about "what would be cleaner" is NOT load-bearing here. The plan is.',
94
- '- Every deviation from the plan needs a reason and a report. Silent deviations are the most common defect.',
95
- '- "Smallest faithful change" — touch the minimum the task authorizes, in the order the plan specifies, with the code the plan provides verbatim where provided.',
96
- '- If the plan is wrong: report and stop. Do NOT silently fix the plan.',
97
+ export const TURN_BUDGET = [
98
+ 'Turn budget:',
99
+ '',
100
+ 'A typical plan task completes in 5-15 tool calls total: read each file once, edit each file once, run verification once. If you find yourself reading the same file twice, STOP and edit — the content from your first read is in your context window. If you find yourself reading >5 files without writing any, STOP and write — you have enough context to make progress.',
97
101
  '',
98
- 'Code-block faithfulness walk (REQUIRED on every task that includes plan-provided code):',
99
- '- For each code block in the matched plan section, ask: did I copy this verbatim? Same names, same signatures, same comments, same imports?',
100
- '- If no — what did I change? Why? Is the change required by the task or am I improving?',
101
- '- Worked example. A plan section says: "Step 2: create `src/parser.ts` with content (verbatim): `export function parse(input: string): Token[] { ... }`". Naive worker writes `src/parser.ts` exporting `parseTokens` (renamed for clarity) with JSDoc added. Result: CODE SUBSTITUTION + ACCEPTANCE-CRITERIA OVERRUN. The downstream code that imports `parse` now breaks; the plan author reads the diff and says "I wrote `parse`, why is this `parseTokens`?". Correct worker creates `src/parser.ts` with exactly the named export `parse`, no JSDoc additions, no rename. If JSDoc would be valuable, mention it in the summary as a follow-up rather than adding it here.',
102
- '- Most workers miss findings of this shape on first pass because the renamed/reformatted version "feels right" and they trust their instincts. The faithfulness walk forces the verbatim check.',
102
+ 'Trust your prior reads. Trust your prior edits. The most common cheap-worker failure is restart-looping ("let me re-read both files first" repeated 50 times) instead of editing.',
103
103
  ].join('\n');
104
104
  //# sourceMappingURL=implementer-criteria.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"implementer-criteria.js","sourceRoot":"","sources":["../../../src/tools/execute-plan/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,4BAA4B;IAC5B,8MAA8M;IAC9M,EAAE;IACF,0LAA0L;IAC1L,EAAE;IACF,uDAAuD;IACvD,uJAAuJ;IACvJ,oGAAoG;IACpG,kFAAkF;IAClF,+HAA+H;IAC/H,oLAAoL;IACpL,kJAAkJ;IAClJ,EAAE;IACF,wCAAwC;IACxC,sKAAsK;IACtK,0MAA0M;CAC3M,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,QAAQ;IACR,0HAA0H;IAC1H,yIAAyI;IACzI,0IAA0I;IAC1I,uNAAuN;CACxN,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,mEAAmE;IACnE,EAAE;IACF,oNAAoN;IACpN,+MAA+M;IAC/M,0KAA0K;IAC1K,sRAAsR;IACtR,sMAAsM;IACtM,6QAA6Q;IAC7Q,6PAA6P;IAC7P,qQAAqQ;IACrQ,0RAA0R;IAC1R,EAAE;IACF,kHAAkH;IAClH,2GAA2G;IAC3G,4HAA4H;IAC5H,iJAAiJ;CAClJ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,yBAAyB;IACzB,sFAAsF;IACtF,4GAA4G;IAC5G,iKAAiK;IACjK,wEAAwE;IACxE,EAAE;IACF,yFAAyF;IACzF,6IAA6I;IAC7I,yFAAyF;IACzF,kpBAAkpB;IAClpB,iMAAiM;CAClM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
1
+ {"version":3,"file":"implementer-criteria.js","sourceRoot":"","sources":["../../../src/tools/execute-plan/implementer-criteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,+FAA+F;IAC/F,8FAA8F;IAC9F,EAAE;IACF,0JAA0J;IAC1J,EAAE;IACF,wDAAwD;IACxD,gMAAgM;IAChM,8IAA8I;IAC9I,kIAAkI;CACnI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,QAAQ;IACR,2EAA2E;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AAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE1E,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAYvE;AA6DD,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,oBAAoB,EAAE,oBAAoB,CA4B7E,CAAC"}
1
+ {"version":3,"file":"tool-config.d.ts","sourceRoot":"","sources":["../../../src/tools/execute-plan/tool-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAKlF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAA4B,KAAK,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAaxH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;kBAOxB,CAAC;AAEZ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAE1E,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI,CAYvE;AAgFD,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,oBAAoB,EAAE,oBAAoB,CA4B7E,CAAC"}
@@ -1,11 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { specTemplate, qualityAPTemplate, diffTemplate, } from '../../review/reviewer-engine.js';
2
+ import { specLintTemplate, qualityLintTemplate, } from '../../review/reviewer-engine.js';
3
3
  import { toolExecutePlanBriefSlot } from '../../intake/brief-compiler-slots/execute-plan.js';
4
4
  import { executePlanHeadlineTemplate } from '../../reporting/headline-templates/execute-plan.js';
5
5
  import { executePlanReportSchema } from '../../reporting/report-parser-slots/execute-plan-report.js';
6
6
  import { DEFAULT_TASK_TIMEOUT_MS } from '../../config/schema.js';
7
- import { REVIEWER_AWARENESS_AP } from '../../review/templates/finding-criteria.js';
8
- import { EXECUTE_PLAN_PURPOSE_ORIENTATION, EXECUTE_PLAN_SCOPE_RULE, EXECUTE_PLAN_FAILURE_MODES, PLAN_FIDELITY_REMINDER, } from './implementer-criteria.js';
7
+ import { EXECUTE_PLAN_PURPOSE_ORIENTATION, EXECUTE_PLAN_SCOPE_RULE, EXECUTE_PLAN_FAILURE_MODES, PLAN_VS_SOURCE_RECONCILIATION, SELF_VERIFICATION, TURN_BUDGET, } from './implementer-criteria.js';
9
8
  export const executePlanInputSchema = z.object({
10
9
  filePaths: z.array(z.string()).length(1, { message: "execute_plan requires exactly one plan filePath" }),
11
10
  taskDescriptors: z.array(z.string()).min(1),
@@ -39,7 +38,7 @@ export function registerExecutePlan(registry) {
39
38
  * + fidelity blocks, workers default to "implement the goal" and treat
40
39
  * the plan as a starting suggestion rather than the contract.
41
40
  */
42
- function buildExecutePlanPrompt(filePaths, task, taskSection) {
41
+ function buildExecutePlanPrompt(filePaths, task, taskSection, sectionTruncated) {
43
42
  const parts = [
44
43
  // Orientation goes FIRST — fidelity-first framing before the
45
44
  // task descriptor, so the worker reads the section through the
@@ -50,16 +49,27 @@ function buildExecutePlanPrompt(filePaths, task, taskSection) {
50
49
  '',
51
50
  ];
52
51
  if (taskSection) {
52
+ const sectionBytes = Buffer.byteLength(taskSection, 'utf8');
53
53
  parts.push('Relevant plan section:', '', '---', taskSection.trim(), '---', '');
54
+ if (sectionTruncated) {
55
+ parts.push(`⚠ Section TRUNCATED — visible above is the first ~${sectionBytes} bytes; the tail was cut at the size cap. The visible portion is correct up to the cut. If you need the missing tail, read the full plan file (path below). If the visible portion is sufficient to execute the task, proceed.`, '');
56
+ }
57
+ else {
58
+ parts.push(`✓ Section is COMPLETE (${sectionBytes} bytes, heading-to-heading). No truncation. If you find yourself thinking "this section looks truncated" or "this seems to end mid-step", you are misreading the boundary — re-read carefully before bailing. The most common misread: a closing \`\`\` code-fence near the section boundary looks like a mid-stream cut. It is not.`, '');
59
+ }
54
60
  }
55
61
  else {
56
62
  parts.push('No unique plan section matched that task heading. The full plan file is at:', ...filePaths.map((p) => ` - ${p}`), 'Read the plan file(s) yourself to find the task. If still no unique match, report that and stop — do not implement anything.', '');
57
63
  }
58
- parts.push('Plan files for reference (read on demand if you need adjacent context — but do not enlarge scope into other tasks):', ...filePaths.map((p) => ` - ${p}`), '');
59
- parts.push('Implement the task fully. Follow any acceptance criteria, file paths, and', 'constraints in the plan section above. If you cannot find or understand', 'the task, report that explicitly and do not implement anything.', '', EXECUTE_PLAN_SCOPE_RULE, '', EXECUTE_PLAN_FAILURE_MODES, '', PLAN_FIDELITY_REMINDER, '',
60
- // Tool sweep #12: share spec + quality reviewer rubric so the
61
- // worker self-aligns on what each reviewer will judge against.
62
- REVIEWER_AWARENESS_AP);
64
+ // Only mention "plan files for reference" when section is missing or
65
+ // truncated when the section is complete, the worker should rely on
66
+ // it as authoritative. Telling the worker to "re-read for adjacent
67
+ // context" when not needed encourages second-guessing and fails when
68
+ // the plan path is outside cwd (sandbox blocks the read).
69
+ if (!taskSection || sectionTruncated) {
70
+ parts.push('Plan files for reference (read on demand if you need adjacent context — but do not enlarge scope into other tasks):', ...filePaths.map((p) => ` - ${p}`), '');
71
+ }
72
+ parts.push('Implement the task fully. Follow acceptance criteria, file paths, and', 'constraints in the plan section above.', '', EXECUTE_PLAN_SCOPE_RULE, '', EXECUTE_PLAN_FAILURE_MODES, '', PLAN_VS_SOURCE_RECONCILIATION, '', SELF_VERIFICATION, '', TURN_BUDGET);
63
73
  return parts.join('\n');
64
74
  }
65
75
  export const toolConfig = {
@@ -68,7 +78,7 @@ export const toolConfig = {
68
78
  agentType: 'standard',
69
79
  briefSlot: toolExecutePlanBriefSlot,
70
80
  buildTaskSpec: (brief, ctx) => ({
71
- prompt: buildExecutePlanPrompt(brief.filePaths, brief.taskDescriptor, brief.sectionBody),
81
+ prompt: buildExecutePlanPrompt(brief.filePaths, brief.taskDescriptor, brief.sectionBody, brief.sectionTruncated),
72
82
  agentType: 'standard',
73
83
  reviewPolicy: brief.reviewPolicy,
74
84
  done: 'Implement the task fully. Report: which task heading you matched, what files were created or modified, and any issues encountered. If no unique matching task was found, report that explicitly and do not implement anything.',
@@ -86,9 +96,9 @@ export const toolConfig = {
86
96
  reportSchema: executePlanReportSchema,
87
97
  headlineTemplate: executePlanHeadlineTemplate,
88
98
  reviewTemplates: {
89
- spec: specTemplate,
90
- qualityAP: qualityAPTemplate,
91
- diff: diffTemplate,
99
+ spec: specLintTemplate,
100
+ qualityAP: qualityLintTemplate,
101
+ diff: specLintTemplate, // diff path retained for type-shape only; not used post-redesign
92
102
  },
93
103
  };
94
104
  //# sourceMappingURL=tool-config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tool-config.js","sourceRoot":"","sources":["../../../src/tools/execute-plan/tool-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,YAAY,GACb,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,wBAAwB,EAA6B,MAAM,mDAAmD,CAAC;AACxH,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AACjG,OAAO,EAAE,uBAAuB,EAAE,MAAM,4DAA4D,CAAC;AACrG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EACL,gCAAgC,EAChC,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,iDAAiD,EAAE,CAAC;IACxG,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CA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um: z.ZodEnum<{
66
66
  }>;
67
67
  export declare const ConcernCategory: z.ZodEnum<{
68
68
  other: "other";
69
+ security: "security";
70
+ performance: "performance";
69
71
  missing_test: "missing_test";
70
72
  scope_creep: "scope_creep";
71
73
  incomplete_impl: "incomplete_impl";
72
74
  style_lint: "style_lint";
73
- security: "security";
74
- performance: "performance";
75
75
  maintainability: "maintainability";
76
76
  doc_gap: "doc_gap";
77
77
  doc_drift: "doc_drift";
@@ -14,7 +14,65 @@ export interface RunResult {
14
14
  output: string;
15
15
  status: RunStatus;
16
16
  usage: TokenUsage;
17
+ /**
18
+ * Existing per-task cost surface — `{ costUSD, costDeltaVsMainUSD }`.
19
+ * Kept for back-compat. New readers should prefer `actualCostUSD`
20
+ * which is populated by composeResponse from `sumStageCosts` and
21
+ * matches the batch roll-up's per-task contribution.
22
+ */
17
23
  cost?: CostBreakdown;
24
+ /**
25
+ * A11.2 (4.2.3+): canonical per-task total cost on the public envelope,
26
+ * computed as the sum of `stageStats[*].costUSD` across entered stages
27
+ * (same logic as the batch-level `costSummary.totalActualCostUSD`).
28
+ * Equal to `cost.costUSD` for runs where stage-level pricing is
29
+ * registered; null when no stage carried a finite cost (e.g. mock
30
+ * provider runs). Populated by composeResponse — workers and runners
31
+ * may leave this undefined.
32
+ */
33
+ actualCostUSD?: number | null;
34
+ /** Stage 4 structured annotation: completionPercent, perStep, verify, concerns. */
35
+ completionAnnotation?: {
36
+ completionPercent: number;
37
+ perStep: Array<{
38
+ step: string;
39
+ status: 'done' | 'partial' | 'missing';
40
+ note: string | null;
41
+ }>;
42
+ verify: {
43
+ ran: boolean;
44
+ passed: boolean | null;
45
+ exitCode: number | null;
46
+ command: string[];
47
+ tailOutput: string | null;
48
+ };
49
+ concerns: string[];
50
+ };
51
+ /** Stage 4 deterministic commit-gate %: min(backstop, annotatorPercent). */
52
+ commitGatePercent?: number;
53
+ /** Spec lint-reviewer raw report. */
54
+ specReviewerNotes?: string;
55
+ /** Quality lint-reviewer raw report. */
56
+ qualityReviewerNotes?: string;
57
+ /** Combined review verdict from both reviewers. */
58
+ reviewVerdict?: 'approved' | 'changes_required';
59
+ /** Merged deviations from both reviewers. */
60
+ reviewFindings?: Array<{
61
+ source: 'spec' | 'quality';
62
+ text: string;
63
+ }>;
64
+ /** Rework worker free-text summary (set when rework stage fired). */
65
+ reworkOutput?: string;
66
+ /** True if rework stage applied edits; false if reviewers approved so it skipped; undefined if stage didn't fire. */
67
+ reworkApplied?: boolean;
68
+ /** Stage 4 deterministic verify-command result (run inside annotate handler). */
69
+ verifyResult?: {
70
+ ran: boolean;
71
+ passed: boolean | null;
72
+ exitCode: number | null;
73
+ command: string[];
74
+ tailOutput: string | null;
75
+ };
18
76
  turns: number;
19
77
  filesRead: string[];
20
78
  filesWritten: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"run-result.d.ts","sourceRoot":"","sources":["../../src/types/run-result.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,UAAU,EACV,SAAS,EACT,iBAAiB,EACjB,UAAU,EACX,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACjG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,SAAS,CAAA;IACjB,KAAK,EAAE,UAAU,CAA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AAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACzF,0EAA0E;IAC1E,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAA;IACjC,0DAA0D;IAC1D,qBAAqB,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CACrI;AAED,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG;IAAE,UAAU,CAAC,EAAE,UAAU,CAAA;CAAE,CAAC;AAExE,MAAM,WAAW,QAAQ;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,cAAc,CAAC;IAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAAC,SAAS,CAAC,CAAC,KAAK,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAA;CAAE"}
@@ -36,6 +36,12 @@ export interface TaskSpec {
36
36
  verifyCommand?: string[];
37
37
  autoCommit?: boolean;
38
38
  planContext?: string;
39
+ /**
40
+ * Stage 5 commit-gate threshold (4.3.0+ pipeline redesign). Commit fires
41
+ * when `state.commitGatePercent >= completionThreshold`. Range 0..100.
42
+ * Default 80 when omitted. See pipeline-redesign spec §3.4.
43
+ */
44
+ completionThreshold?: number;
39
45
  /**
40
46
  * Optional task-specific tool injection. When present, runner adapters
41
47
  * merge these tools into the worker's tool surface ON TOP of whatever
@@ -55,5 +61,13 @@ export interface TaskSpec {
55
61
  * statement. Investigate: question.
56
62
  */
57
63
  parallelTarget?: string;
64
+ /**
65
+ * Audit-specific. Set by tools/audit/tool-config.ts buildTaskSpec when
66
+ * input.auditType is 'plan'. The lifecycle's parallel-criteria
67
+ * dispatcher reads this to route plan-audit tasks to the `audit_plan`
68
+ * route spec (different orientation / criteria / semantics) instead
69
+ * of the default audit spec. Other tools leave this undefined.
70
+ */
71
+ auditType?: 'default' | 'security' | 'performance' | 'plan';
58
72
  }
59
73
  //# sourceMappingURL=task-spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"task-spec.d.ts","sourceRoot":"","sources":["../../src/types/task-spec.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AACjE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,UAAU,CAAC;AAChD,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAC/C,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AACxD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,oBAAoB,GAAG,eAAe,GAAG,SAAS,GAAG,oBAAoB,GAAG,QAAQ,CAAC;AAEzH,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,CAAC;IAC3D,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,K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AW,GAAG,MAAM,CAAA;IAC7D,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,gBAAgB,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;IAChG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,sBAAsB,EAAE,CAAA;IACxC;;;;;;;;;OASG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,aAAa,GAAG,MAAM,CAAA;CAC5D"}
package/dist/types.d.ts CHANGED
@@ -3,4 +3,14 @@ export type { ToolMode, SandboxPolicy, AgentType, Effort, CostTier, WorkerStatus
3
3
  export type { AgentConfig, FallbackOverride, CodexProviderConfig, ClaudeProviderConfig, ClaudeCompatibleProviderConfig, OpenAICompatibleProviderConfig, ProviderConfig, ResearchConfig, MultiModelConfig, } from './types/config.js';
4
4
  export type { Commit, RunResult, ReviewPromptParts, CacheHints, ReviewRunOptions, Provider, } from './types/run-result.js';
5
5
  export type { ErrorCode } from './error-codes.js';
6
+ export interface PerTaskCostSlots {
7
+ /** Canonical total cost for this task (sum of all stage costs). */
8
+ actualCostUSD: number | null;
9
+ /** @deprecated alias for actualCostUSD */
10
+ costUSD: number | null;
11
+ /** @deprecated alias for actualCostUSD */
12
+ totalCostUSD: number | null;
13
+ /** Delta vs estimated main-tier cost (from CostBreakdown.costDeltaVsMainUSD). */
14
+ costDeltaVsMainUSD: number | null;
15
+ }
6
16
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAKA,YAAY,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,aAAa,GACd,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,QAAQ,EACR,aAAa,EACb,SAAS,EACT,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,QAAQ,GACT,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,8BAA8B,EAC9B,8BAA8B,EAC9B,cAAc,EACd,cAAc,EACd,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,MAAM,EACN,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,QAAQ,GACT,MAAM,uBAAuB,CAAC;AAK/B,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAKA,YAAY,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,aAAa,GACd,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,QAAQ,EACR,aAAa,EACb,SAAS,EACT,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,QAAQ,GACT,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,8BAA8B,EAC9B,8BAA8B,EAC9B,cAAc,EACd,cAAc,EACd,gBAAgB,GACjB,MAAM,mBAAm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