amsd-pipeline-shared 0.5.30 → 0.5.32

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 (24) hide show
  1. package/docs/gateway-baseline-2.0.80.md5 +112 -111
  2. package/docs/gateway-files.txt +9 -0
  3. package/orchestrations/config/finding-contracts.json +13 -0
  4. package/orchestrations/prompts/templates/project-prompt-generation.json +6 -4
  5. package/orchestrations/prompts/templates/prompt-review.json +6 -4
  6. package/orchestrations/prompts/templates/spec-codeline-share.json +22 -0
  7. package/orchestrations/prompts/templates/spec-coordinator-review.json +10 -6
  8. package/orchestrations/prompts/templates/spec-review-criteria.json +5 -4
  9. package/orchestrations/prompts/templates/spec-review-other-lanes.json +17 -0
  10. package/orchestrations/prompts/templates/spec-review-ticket.json +22 -0
  11. package/orchestrations/prompts/templates/spec-ticket-split.json +21 -0
  12. package/orchestrations/scripts/lib/codeline-lanes.sh +5 -0
  13. package/orchestrations/scripts/lib/engine-prompt.js +6 -0
  14. package/orchestrations/scripts/lib/finding-check.js +70 -0
  15. package/orchestrations/scripts/lib/handlers/filtered-prd.js +4 -3
  16. package/orchestrations/scripts/lib/project-prompt-builder.js +42 -6
  17. package/orchestrations/scripts/lib/project-prompt-contract.js +63 -1
  18. package/orchestrations/scripts/lib/prompt-build-calls.js +110 -0
  19. package/orchestrations/scripts/lib/spec-review-findings.js +151 -0
  20. package/orchestrations/scripts/lib/ticket-split.js +71 -0
  21. package/orchestrations/scripts/mint-agents-step.js +1 -4
  22. package/orchestrations/scripts/refresh-project-prompts.js +1 -2
  23. package/orchestrations/scripts/spec-mode-runner.js +201 -214
  24. package/package.json +1 -1
@@ -1,125 +1,30 @@
1
1
  33364f057aa890497019737c7004db57 config/model-pricing.json
2
- 6b83e0d700392eebdd1bae1ec233ab26 prompts/templates/codeline-discovery.json
3
- b2470a21b73b03abb95713f05acaa827 scripts/agent-attempt-analyst.sh
4
- c45cda62ef52ee95c8de6acead3408f8 scripts/lib/agent-contract.js
5
- f881c989bd12e76e13e017ff2d984041 scripts/lib/agent-ladder.sh
6
- c2dfd2381db0242fdbc487a948fd7feb scripts/lib/agent-si.js
7
- 488870d661550b057077104147b54004 scripts/lib/constraint-compiler.js
8
- 639d21b8d2adb82d2ed98ceffc3c2175 scripts/lib/constraint-sanity.js
9
- f31ac2a712f0e1f288606b0fdbb7d001 scripts/lib/content-retry.js
10
- e24bfedd32af37785a42fa8c168ae52a scripts/lib/cost-emitter.js
11
- d7fb52664b0f0528b6142bf0574c1f49 scripts/lib/cost-record.sh
12
- f20fe173b49d25008e206f82ace56619 scripts/lib/engine-prompt.js
13
- 773a5b134875d61f988b15934a9d5fec scripts/lib/env-file.sh
14
- 66f728a2d4f3f4dac44bfc08775cc485 scripts/lib/evidence-windows.js
15
- e80316d37f028cdf83f3a8fa43913509 scripts/lib/failure-signature.js
16
- 1ada64b928930ab3937c4b26269fb4ec scripts/lib/handlers/emit-cost.js
17
- dccf359893d3c9a2c233ab19e0a64728 scripts/lib/jq-vals.sh
18
- a2589a1ff6443fc1c18b43095d9d8872 scripts/lib/kb-apply.sh
19
- 740f541460c80aa0f3220656069f0838 scripts/lib/kb-arbitration.js
20
- 8d6e41fe34703497cf5e8b5d1320e3e7 scripts/lib/kb-cli.js
21
- c0a3a88d1a895e0a86ea483cada15411 scripts/lib/kb-store.js
22
- 133c3a3df52044457822755a23f40bd2 scripts/lib/kb-synthesizer.js
23
- 84348b573adb9c666eb040fb8f7621b2 scripts/lib/langfuse-emit.js
24
- 991a2faba5aaa513e63fa64689761248 scripts/lib/llm-settings-resolve.js
25
- ed15fbd317db2643b19a3fd7ecd1979a scripts/lib/model-ladder.sh
26
- 4d2dc2a636736b5b77711ad7736f9075 scripts/lib/model-ladders.sh
27
- 97d25b9108a01292d1b28da0d3c129e9 scripts/lib/pipeline-tools.js
28
- c806c7a54ebfb7ea178ef8415bb70c1c scripts/lib/preflight.sh
29
- 6bfffd3ba6eb845f738d3157168bf056 scripts/lib/relative-paths.js
30
- 6894e248c7a86d07626b7e981d534354 scripts/lib/render-prompt-section.js
31
- 912511e457b0a6f4801c479400b1c3a3 scripts/lib/seam-invocation.js
32
- 010eaf91866f87040076c6889c6dc148 scripts/lib/seam-ladder.sh
33
- 49cafcda352d69ed32966950902d8e4d scripts/lib/self-heal.js
34
- 177515d856a573dad5f515ece454d835 scripts/lib/stage-coverage-gate.sh
35
- be6d0a378fa9c3bc9da6240877aaeae3 scripts/lib/tool-timeouts.js
36
- 5574182fb27aaeabbfff261b3a8d6d39 scripts/lib/transcript-tool-calls.js
37
- c4b96230c15b52a845cf20fd3266fe01 scripts/llm-handler.sh
38
- 9b05c5b99b4f803c3a568ce5c069e6d3 scripts/preflight-check.sh
39
- 740a55fe2ae0527a0598f3c751bacca7 scripts/preflight-prd-integrity.sh
40
- bc5acdb9260923082e05ef3b67304028 scripts/preflight-static.sh
41
- f206025f304e8320b8417a6dd6606044 scripts/spec-mode-runner.js
42
- dfa070b168a7c01fab8aab5a46d16192 scripts/team-lead-review.sh
43
- 40c65de8360d5a9f59902fca26d1d7a8 scripts/update-monitor.sh
44
- 7ab104b57abcbc8cb3cd890c753d5d67 config/resume-preserves.json
45
- be822cc2faec79be223cf2cc1766ec4b scripts/lib/checkpoints.sh
46
- 448c8118bdab3697022e2f68f3a99801 scripts/lib/codeline-lanes.sh
47
- 8ef595221a8fb9d4a60f531d302c33bd scripts/lib/codeline-write-perimeter.sh
48
- a945f1483df090d9b053e1ea883fdb4c scripts/lib/common.sh
49
- 1fae91a1cd6b7304f23ba87ba88a7019 scripts/lib/control-plane.sh
50
- 800e750c30be013c620ac76f28d41c20 scripts/lib/flags.sh
51
- 3fd6c829074f18a67bf08b9d05a0256d scripts/lib/git-ops.sh
52
- bbcb3501aa61f196ccb170a6166fde65 scripts/lib/halt-recovery.sh
53
- 175d82c1706b45866ac6b1d0e6ddb9f5 scripts/lib/orchestration-resume.sh
54
- 779412cd9db1a61deb307a9bcf6804f3 scripts/lib/phase-exit.sh
55
- a38009bef2909c164a449b2192bf4c75 scripts/lib/qa-gate-evidence.sh
56
- f64fdd6bc6df7e13d742e9e53a470be4 scripts/lib/release-lines.sh
57
- 9768775dcd035b39932f3ebce243857e scripts/lib/resume-semantics.sh
58
- 9216939efdf63c244d42d91ba6fb466c scripts/lib/run-checkpoint.sh
59
- 886860d643c5db8fb3bfcf5bd3efaf9d scripts/lib/run-modes.sh
60
- 156cf302dcedf423dea01ccb11fe305d scripts/lib/story-outputs.sh
61
- 8e4481cc43b5efe2d7c032e8d2eb2f66 scripts/lib/story-retry-state.sh
62
- f2cf5c1489ba9cd3fde4522b8c249b8b scripts/lib/handlers/_read-input.js
63
- 38b31e37abb0fb6b9021673d22bd4d59 scripts/lib/handlers/carry-plan.js
64
- 5d0397d7da5537c75fc0bc8b2bd7e9b9 scripts/lib/handlers/cl-entries.js
65
- 35339f54cb483bbb79ff18100366b1d1 scripts/lib/handlers/codeline-ecosystem.js
66
- a2e6097447d4b4a2ee7bdcd5df42267a scripts/lib/handlers/codeline-manifests.js
67
- a8ce1f16d6a7acc79cabbe1e8aa2523c scripts/lib/handlers/filtered-prd.js
68
- b15485e34a3db5e860609b9685b36211 scripts/lib/handlers/merge-lane-into-canonical.js
69
- 3d40afd95026d86ca6ff3cc4f6d11a10 scripts/lib/handlers/package-engines-node.js
70
- 41d04505e7688043f0bdfc2ef41537b2 scripts/lib/handlers/prd-phases.js
71
- 3d17d52aa9d40a73240108e66f022cca scripts/lib/handlers/rebuild-cross-contract.js
72
- 7dd7fadbb2e98fee9646cc3206a55744 scripts/lib/handlers/record-declared-pass.js
73
- fa0fb7977606fdb98777288e613b2666 scripts/lib/handlers/release-line-prd.js
74
- 3cc434c139dbba56aed51c7485a53d27 scripts/lib/handlers/release-lines.js
75
- 4e2a0f8465afb1d58664e3474d1e99f3 scripts/lib/handlers/repo-exclude-patterns.js
76
- fd4a27b6fb02b2d5dcb3e610ae126ec3 scripts/lib/handlers/resume-spec-output-present.js
77
- b3015f602e1cb07887b7c94954a0886e scripts/lib/handlers/sibling-providers.js
78
- 2a53c1cc2abab67f4a35504f8b70c2b9 scripts/lib/handlers/spanning-stories-incomplete.js
79
- 8f796a4c6976cf334ba281017d0eac64 scripts/lib/handlers/spec-inputs-digest.js
80
- 9daeb255ff23b1b7831806200d2d5e4c scripts/lib/handlers/spec-predates-plan.js
81
- ee73864570c04d3c420b824b700e9b7c scripts/lib/handlers/stories-lacking-spec.js
82
- ac166207d8a1d93a4c50a88568ef6e5c scripts/lib/handlers/write-missing-plans.js
83
- 9038bc6d4e70462f757ee5e544df9c78 scripts/lib/codeline-packages.js
84
- 3fedc22f90f05ca8740686295bb79d07 scripts/lib/ecosystem-registry.js
85
- 9c0c8864b3cd98826fd930fdc5193d01 scripts/lib/plan-hash.js
86
2
  8a1bb4df2d1b6e7fd135f757423fb2f2 config/repo-artifacts.json
3
+ 7ab104b57abcbc8cb3cd890c753d5d67 config/resume-preserves.json
87
4
  91cec3c50040ebc9050c3d95f037bce2 config/run-modes.json
88
- ee4366721c38cbc8cd72ee0f779d22a8 scripts/lib/plan-scope.js
89
- aab7063cf68a9ecd54f6ef735adf895e scripts/lib/engine-paths.sh
90
- 1d0346da09c13150e511809034396949 scripts/lib/pipeline-commit.sh
91
- a01137cb36b65a3b80a8327404f4ed7a scripts/lib/story-acs-block.sh
92
- 043b6c85d1505ebc5da6c6b158000330 scripts/lib/plan-of-record.sh
93
- 1cc1978d614fca875ad1117e9ac42f93 scripts/lib/render-engine-prompt.sh
94
- bad91b18bf546145a58423c770ba1a3a prompts/templates/criterion-origin.json
95
5
  8c3bd8f0b375b047b8f85909f43cf4f5 config/seam-output-contracts.json
96
- a8c558184595777b8f2f7c62f313f622 prompts/templates/agent-failure-analyst.json
97
- 583b47885d69f2c917db6514eef09d8e prompts/templates/code-review-cycle.json
98
- d9cd85a83389a52a09477573a33fa314 prompts/templates/failure-analyst.json
99
- 8142977265d30ecfae6128b09a3584c5 prompts/templates/gate-finding-analyst.json
100
- 7e605cada6c96d1591811434251605d5 prompts/templates/lint-finding-analyst.json
101
- 9ba265eb3db0d8329276856a3a006814 prompts/templates/post-failure-analyst.json
102
- 089b704c8a96cacd0b929d8078432796 prompts/templates/review-shared.json
103
- 7785cb19d58eb65321df380839accf85 prompts/templates/story-recovery-analyst.json
104
- 71db8785df56a99c694b2447f45bd0a7 prompts/templates/team-lead-review.json
105
- 271ec0ed7881aeb741758c3b79f3e77b prompts/templates/blocker-discipline.json
106
6
  d8ab5a65203994059759a0b0aafcc8d9 prompts/templates/ac-classification.json
107
7
  46f635c2fd583a6acecd72b9fb42e280 prompts/templates/ac-elaboration.json
108
8
  4517af7c7a190826dc93f63ff71e282a prompts/templates/ac-gate-codeline-assignment.json
9
+ a8c558184595777b8f2f7c62f313f622 prompts/templates/agent-failure-analyst.json
109
10
  88545faf059ecfc1d33b34da47ddcbd7 prompts/templates/agent-name-refusal.json
110
11
  af6902e975ab7d26fe4fa87dc2cdd23e prompts/templates/agent-plan-mode.json
111
12
  3f997f3b60cb46ca57bacd3e24641abb prompts/templates/agent-proposal.json
112
13
  8bfeedf6be435dbb9f76372b5d777c08 prompts/templates/agent-retry-prefix.json
113
14
  3e630bd87bae6261d690d0b40513a68b prompts/templates/assign-agent-roles.json
15
+ 271ec0ed7881aeb741758c3b79f3e77b prompts/templates/blocker-discipline.json
114
16
  f243819cc6a8b3313be761ff79aad4bc prompts/templates/bug-fix-story.json
115
17
  069f31e37f04580a3a61a50c5be65add prompts/templates/change-reviewer.json
116
18
  db5f4f4ccc7a79f8b75dc7fb635d5c12 prompts/templates/code-graph-detective.json
19
+ 583b47885d69f2c917db6514eef09d8e prompts/templates/code-review-cycle.json
117
20
  af80eb699d37de3c33f8142ff14e867a prompts/templates/codeline-bridge.json
21
+ 6b83e0d700392eebdd1bae1ec233ab26 prompts/templates/codeline-discovery.json
118
22
  182ebe94aa6b76ff9db10e329a7022e7 prompts/templates/content-retry-correction.json
119
23
  878b65729afde7a948954aabded84c5f prompts/templates/coordinator-amendment.json
120
24
  4cbae58080502113f6fff7b64afa486c prompts/templates/corrective-note.json
121
25
  e889148a825a143e34713e7dbf0dae0c prompts/templates/cpa-inference.json
122
26
  4ef6492508aa11814c620f18785b8386 prompts/templates/cpa-system.json
27
+ bad91b18bf546145a58423c770ba1a3a prompts/templates/criterion-origin.json
123
28
  f3c3d0a43684c96d7b887a892ee30c63 prompts/templates/declared-packages.json
124
29
  e7e5bf7e6537dec96490b0b12e84e933 prompts/templates/detective-extract.json
125
30
  5b8b2d28c37fc9036a84d3e6e69ace7d prompts/templates/detective-overall-plan-given.json
@@ -131,7 +36,9 @@ fcc4c33796a8ff84f0ffb1009f327b74 prompts/templates/detective-retry-note.json
131
36
  ae151e94855a15014923ca6a0aa223d3 prompts/templates/e2e-route-check.json
132
37
  8602bc0209f4c9b8239edac4e1d630d5 prompts/templates/estate-survey.json
133
38
  8d95f4dda8282fe2ed1a2eaa181cf521 prompts/templates/estimation-assessment.json
39
+ d9cd85a83389a52a09477573a33fa314 prompts/templates/failure-analyst.json
134
40
  88dfed65505f1615723850c4324026ee prompts/templates/fix-plan-shared.json
41
+ 8142977265d30ecfae6128b09a3584c5 prompts/templates/gate-finding-analyst.json
135
42
  a5902db0a2e1d57c6949bdff3a6551e6 prompts/templates/guard-vocabulary-codegraph.json
136
43
  5cffde4c531a86c79b6ffdf2dd1f4302 prompts/templates/guard-vocabulary-documentation.json
137
44
  b317a40599807d01bf56a4fd4d058994 prompts/templates/guard-vocabulary.json
@@ -139,6 +46,7 @@ b1ef16b460745d6280173218a5ae4f10 prompts/templates/hybrid-prephase-coordinator.
139
46
  0e30d94da41020b2f7fa4f00492d5d53 prompts/templates/inference-ladder-coordinator.json
140
47
  89623ba94a972ddebb1d202e83448190 prompts/templates/kb-enforcement-synthesis.json
141
48
  f546ef09cf91f202e08fa7fc97be9159 prompts/templates/lint-ac-remediator.json
49
+ 7e605cada6c96d1591811434251605d5 prompts/templates/lint-finding-analyst.json
142
50
  c032d2b3a57987f364208f475af194ec prompts/templates/lint-fixer.json
143
51
  2fd5ae994275fa976eeb638705cd1b0b prompts/templates/manifest-analysis.json
144
52
  c183693ce3900d3a5b23f6d910f271b4 prompts/templates/mint-existing-roster.json
@@ -150,6 +58,7 @@ f168d08528b5b99d4f1dc8f77c1f44d6 prompts/templates/pipeline-tools-command.json
150
58
  c49b84f8826b8ebeca2a9d08ed2b4a03 prompts/templates/plan-corrective.json
151
59
  3a4fa3a6a29d3017e7e3b379a271719e prompts/templates/plan-producer.json
152
60
  1067f45335c3046c942a918a561007df prompts/templates/plan-reviewer.json
61
+ 9ba265eb3db0d8329276856a3a006814 prompts/templates/post-failure-analyst.json
153
62
  39ec1495af887178b8fcabbe9e84d640 prompts/templates/prd-change-reviewer-mode-rules.json
154
63
  0e0ca79a70b196eb850f664f51e185b5 prompts/templates/prd-change-reviewer-spec.json
155
64
  cd5909d25efae77b5507d50791fd5782 prompts/templates/prd-change-reviewer.json
@@ -181,6 +90,7 @@ bdb83759d6a60f7820f5ad428b40611d prompts/templates/repro-test-writer.json
181
90
  7aa968f99abc2f24e3578e1c1e258716 prompts/templates/review-ac-remediator.json
182
91
  c43d37501d2b66052764d28877a35b55 prompts/templates/review-finding-routing.json
183
92
  af929616ab538f96587765bdc6994aa6 prompts/templates/review-scope-block.json
93
+ 089b704c8a96cacd0b929d8078432796 prompts/templates/review-shared.json
184
94
  3310af2ce49b0e0888e6c77b233a58ab prompts/templates/roster-review.json
185
95
  bf71a718e7a9a76b6b97bb3b34f4f441 prompts/templates/roster-specialisation-one.json
186
96
  14735ac00e0f6d1c8d1b7f515f16ac76 prompts/templates/roster-specialisation-plan.json
@@ -216,10 +126,12 @@ f33e2ce53d6daf2193ba48b83ae54435 prompts/templates/story-implementation.json
216
126
  b828065ae7498d3d06650d29d1ee8b3f prompts/templates/story-kind-hint-defect.json
217
127
  119a924912788c1af9b41c62e3627c48 prompts/templates/story-kind-hint-other.json
218
128
  717120953b6041234d88fae0f9f259d5 prompts/templates/story-plan-agent.json
129
+ 7785cb19d58eb65321df380839accf85 prompts/templates/story-recovery-analyst.json
219
130
  81ee6cb6917b662bf490b30f367b83c0 prompts/templates/story-writer-main.json
220
131
  7a0a6ae6a01bfa17b46e8617b6fd4b37 prompts/templates/story-writer.json
221
132
  3a41ad7338a29ef6542682f13541e5a9 prompts/templates/survey-review.json
222
133
  1a6fff953ed9759136eb56ff30d69558 prompts/templates/tc-writer.json
134
+ 71db8785df56a99c694b2447f45bd0a7 prompts/templates/team-lead-review.json
223
135
  98da28419b07a58bd6873e2600a17627 prompts/templates/test-gate-finding.json
224
136
  2248138ed57dfdaed076d20315fcaabd prompts/templates/test-ownership.json
225
137
  dcf4f6d925125da08fd7fe9361404f9f prompts/templates/tools-coordinator.json
@@ -232,18 +144,107 @@ e902dfbf9802f60b06b7cd8ef48deaf5 prompts/templates/vc-review.json
232
144
  7e82a5b7d9ea0dd04f7dd4db5300e2c0 prompts/templates/writer-codegraph-block.json
233
145
  ff9ea38d594f181363c40295ea42012a prompts/templates/writer-plan-section.json
234
146
  8e18f7be6b28fa94c8dbbc723a23dc57 prompts/templates/writer-string-invariants.json
235
- 28adf858dafddc3ef7bb03d3686dfe6d scripts/lib/project-prompt-contract.js
236
- 4120de0abec9f84c3b0fa98cd2584233 scripts/lib/worktree-rungs.sh
237
- 515f80e7a9228cdfbc39e71c06066d95 scripts/lib/story-attempt.sh
147
+ b2470a21b73b03abb95713f05acaa827 scripts/agent-attempt-analyst.sh
148
+ c45cda62ef52ee95c8de6acead3408f8 scripts/lib/agent-contract.js
149
+ f881c989bd12e76e13e017ff2d984041 scripts/lib/agent-ladder.sh
150
+ c2dfd2381db0242fdbc487a948fd7feb scripts/lib/agent-si.js
151
+ c2dfd2381db0242fdbc487a948fd7feb scripts/lib/agent-si.js
152
+ be822cc2faec79be223cf2cc1766ec4b scripts/lib/checkpoints.sh
153
+ 448c8118bdab3697022e2f68f3a99801 scripts/lib/codeline-lanes.sh
154
+ 9038bc6d4e70462f757ee5e544df9c78 scripts/lib/codeline-packages.js
155
+ 8ef595221a8fb9d4a60f531d302c33bd scripts/lib/codeline-write-perimeter.sh
156
+ a945f1483df090d9b053e1ea883fdb4c scripts/lib/common.sh
157
+ 488870d661550b057077104147b54004 scripts/lib/constraint-compiler.js
158
+ 639d21b8d2adb82d2ed98ceffc3c2175 scripts/lib/constraint-sanity.js
159
+ f31ac2a712f0e1f288606b0fdbb7d001 scripts/lib/content-retry.js
160
+ 1fae91a1cd6b7304f23ba87ba88a7019 scripts/lib/control-plane.sh
161
+ e24bfedd32af37785a42fa8c168ae52a scripts/lib/cost-emitter.js
162
+ d7fb52664b0f0528b6142bf0574c1f49 scripts/lib/cost-record.sh
163
+ 3fedc22f90f05ca8740686295bb79d07 scripts/lib/ecosystem-registry.js
164
+ aab7063cf68a9ecd54f6ef735adf895e scripts/lib/engine-paths.sh
165
+ f20fe173b49d25008e206f82ace56619 scripts/lib/engine-prompt.js
166
+ 773a5b134875d61f988b15934a9d5fec scripts/lib/env-file.sh
167
+ 66f728a2d4f3f4dac44bfc08775cc485 scripts/lib/evidence-windows.js
168
+ 7600f6665c5a9f24dde8969b4c013aa4 scripts/lib/failure-healing.sh
169
+ e80316d37f028cdf83f3a8fa43913509 scripts/lib/failure-signature.js
170
+ 800e750c30be013c620ac76f28d41c20 scripts/lib/flags.sh
171
+ 3fd6c829074f18a67bf08b9d05a0256d scripts/lib/git-ops.sh
172
+ bbcb3501aa61f196ccb170a6166fde65 scripts/lib/halt-recovery.sh
173
+ f2cf5c1489ba9cd3fde4522b8c249b8b scripts/lib/handlers/_read-input.js
174
+ 38b31e37abb0fb6b9021673d22bd4d59 scripts/lib/handlers/carry-plan.js
175
+ 5d0397d7da5537c75fc0bc8b2bd7e9b9 scripts/lib/handlers/cl-entries.js
176
+ 35339f54cb483bbb79ff18100366b1d1 scripts/lib/handlers/codeline-ecosystem.js
177
+ a2e6097447d4b4a2ee7bdcd5df42267a scripts/lib/handlers/codeline-manifests.js
178
+ 1ada64b928930ab3937c4b26269fb4ec scripts/lib/handlers/emit-cost.js
179
+ a8ce1f16d6a7acc79cabbe1e8aa2523c scripts/lib/handlers/filtered-prd.js
180
+ b15485e34a3db5e860609b9685b36211 scripts/lib/handlers/merge-lane-into-canonical.js
181
+ 3d40afd95026d86ca6ff3cc4f6d11a10 scripts/lib/handlers/package-engines-node.js
182
+ 41d04505e7688043f0bdfc2ef41537b2 scripts/lib/handlers/prd-phases.js
183
+ 3d17d52aa9d40a73240108e66f022cca scripts/lib/handlers/rebuild-cross-contract.js
184
+ 7dd7fadbb2e98fee9646cc3206a55744 scripts/lib/handlers/record-declared-pass.js
185
+ fa0fb7977606fdb98777288e613b2666 scripts/lib/handlers/release-line-prd.js
186
+ 3cc434c139dbba56aed51c7485a53d27 scripts/lib/handlers/release-lines.js
187
+ 4e2a0f8465afb1d58664e3474d1e99f3 scripts/lib/handlers/repo-exclude-patterns.js
188
+ fd4a27b6fb02b2d5dcb3e610ae126ec3 scripts/lib/handlers/resume-spec-output-present.js
189
+ b3015f602e1cb07887b7c94954a0886e scripts/lib/handlers/sibling-providers.js
190
+ 2a53c1cc2abab67f4a35504f8b70c2b9 scripts/lib/handlers/spanning-stories-incomplete.js
191
+ 8f796a4c6976cf334ba281017d0eac64 scripts/lib/handlers/spec-inputs-digest.js
192
+ 9daeb255ff23b1b7831806200d2d5e4c scripts/lib/handlers/spec-predates-plan.js
193
+ ee73864570c04d3c420b824b700e9b7c scripts/lib/handlers/stories-lacking-spec.js
194
+ ac166207d8a1d93a4c50a88568ef6e5c scripts/lib/handlers/write-missing-plans.js
195
+ dccf359893d3c9a2c233ab19e0a64728 scripts/lib/jq-vals.sh
196
+ a2589a1ff6443fc1c18b43095d9d8872 scripts/lib/kb-apply.sh
197
+ 740f541460c80aa0f3220656069f0838 scripts/lib/kb-arbitration.js
198
+ 8d6e41fe34703497cf5e8b5d1320e3e7 scripts/lib/kb-cli.js
199
+ c0a3a88d1a895e0a86ea483cada15411 scripts/lib/kb-store.js
200
+ 133c3a3df52044457822755a23f40bd2 scripts/lib/kb-synthesizer.js
201
+ f5f3f2ffcf1da723455115e856dc173f scripts/lib/kb_schema.py
202
+ 84348b573adb9c666eb040fb8f7621b2 scripts/lib/langfuse-emit.js
203
+ 991a2faba5aaa513e63fa64689761248 scripts/lib/llm-settings-resolve.js
204
+ d4992178558476af4c4c228e6aa63b2d scripts/lib/mint-and-spec.sh
205
+ ed15fbd317db2643b19a3fd7ecd1979a scripts/lib/model-ladder.sh
206
+ 4d2dc2a636736b5b77711ad7736f9075 scripts/lib/model-ladders.sh
207
+ 175d82c1706b45866ac6b1d0e6ddb9f5 scripts/lib/orchestration-resume.sh
208
+ 779412cd9db1a61deb307a9bcf6804f3 scripts/lib/phase-exit.sh
209
+ 1d0346da09c13150e511809034396949 scripts/lib/pipeline-commit.sh
210
+ 97d25b9108a01292d1b28da0d3c129e9 scripts/lib/pipeline-tools.js
211
+ 9c0c8864b3cd98826fd930fdc5193d01 scripts/lib/plan-hash.js
212
+ 043b6c85d1505ebc5da6c6b158000330 scripts/lib/plan-of-record.sh
213
+ ee4366721c38cbc8cd72ee0f779d22a8 scripts/lib/plan-scope.js
214
+ ada237373615a26d924226184ed7614b scripts/lib/prd-change-review.sh
215
+ c806c7a54ebfb7ea178ef8415bb70c1c scripts/lib/preflight.sh
238
216
  6a31e809386b4114794bb773c850b46b scripts/lib/producers/fix-plan.js
239
- b3e93b2042f50c5b69133108c8de9711 scripts/lib/prompt-library.js
240
217
  a7d52fab41432240f1e2dbffd6710ea5 scripts/lib/project-prompt-builder.js
241
- dea5be1123db8ab5b054fef8cc1388fe scripts/mint-agents-step.js
218
+ 28adf858dafddc3ef7bb03d3686dfe6d scripts/lib/project-prompt-contract.js
219
+ be54d8ccc544306f3d6d24f218a1d735 scripts/lib/prompt-build-calls.js
220
+ b3e93b2042f50c5b69133108c8de9711 scripts/lib/prompt-library.js
242
221
  eb4979b0f88ed8449b2e4702d0dff7a5 scripts/lib/prompt-variant.sh
243
- d4992178558476af4c4c228e6aa63b2d scripts/lib/mint-and-spec.sh
222
+ a38009bef2909c164a449b2192bf4c75 scripts/lib/qa-gate-evidence.sh
223
+ 6bfffd3ba6eb845f738d3157168bf056 scripts/lib/relative-paths.js
224
+ f64fdd6bc6df7e13d742e9e53a470be4 scripts/lib/release-lines.sh
225
+ 1cc1978d614fca875ad1117e9ac42f93 scripts/lib/render-engine-prompt.sh
226
+ 6894e248c7a86d07626b7e981d534354 scripts/lib/render-prompt-section.js
227
+ 9768775dcd035b39932f3ebce243857e scripts/lib/resume-semantics.sh
228
+ 9216939efdf63c244d42d91ba6fb466c scripts/lib/run-checkpoint.sh
229
+ 886860d643c5db8fb3bfcf5bd3efaf9d scripts/lib/run-modes.sh
230
+ 912511e457b0a6f4801c479400b1c3a3 scripts/lib/seam-invocation.js
231
+ 010eaf91866f87040076c6889c6dc148 scripts/lib/seam-ladder.sh
232
+ 49cafcda352d69ed32966950902d8e4d scripts/lib/self-heal.js
233
+ 177515d856a573dad5f515ece454d835 scripts/lib/stage-coverage-gate.sh
234
+ a01137cb36b65a3b80a8327404f4ed7a scripts/lib/story-acs-block.sh
235
+ 515f80e7a9228cdfbc39e71c06066d95 scripts/lib/story-attempt.sh
244
236
  fac1b26443bb52ba45ba072f4d654920 scripts/lib/story-guards.sh
245
- ada237373615a26d924226184ed7614b scripts/lib/prd-change-review.sh
246
- c2dfd2381db0242fdbc487a948fd7feb scripts/lib/agent-si.js
237
+ 156cf302dcedf423dea01ccb11fe305d scripts/lib/story-outputs.sh
238
+ 8e4481cc43b5efe2d7c032e8d2eb2f66 scripts/lib/story-retry-state.sh
239
+ be6d0a378fa9c3bc9da6240877aaeae3 scripts/lib/tool-timeouts.js
240
+ 5574182fb27aaeabbfff261b3a8d6d39 scripts/lib/transcript-tool-calls.js
241
+ 4120de0abec9f84c3b0fa98cd2584233 scripts/lib/worktree-rungs.sh
242
+ c4b96230c15b52a845cf20fd3266fe01 scripts/llm-handler.sh
243
+ dea5be1123db8ab5b054fef8cc1388fe scripts/mint-agents-step.js
247
244
  03bde875977ab741c54c3b38a236a496 scripts/pre-run-reset.sh
248
- 7600f6665c5a9f24dde8969b4c013aa4 scripts/lib/failure-healing.sh
249
- f5f3f2ffcf1da723455115e856dc173f scripts/lib/kb_schema.py
245
+ 9b05c5b99b4f803c3a568ce5c069e6d3 scripts/preflight-check.sh
246
+ 740a55fe2ae0527a0598f3c751bacca7 scripts/preflight-prd-integrity.sh
247
+ bc5acdb9260923082e05ef3b67304028 scripts/preflight-static.sh
248
+ f206025f304e8320b8417a6dd6606044 scripts/spec-mode-runner.js
249
+ dfa070b168a7c01fab8aab5a46d16192 scripts/team-lead-review.sh
250
+ 40c65de8360d5a9f59902fca26d1d7a8 scripts/update-monitor.sh
@@ -1,6 +1,7 @@
1
1
  config/call-policy.json
2
2
  config/doctor-heavy-jobs.json
3
3
  config/doctor-signatures.json
4
+ config/finding-contracts.json
4
5
  config/model-pricing.json
5
6
  config/repo-artifacts.json
6
7
  config/resume-preserves.json
@@ -112,13 +113,17 @@ prompts/templates/spec-agent-speckit-refine.json
112
113
  prompts/templates/spec-agent-speckit.json
113
114
  prompts/templates/spec-authoring-rules.json
114
115
  prompts/templates/spec-brownfield-mode.json
116
+ prompts/templates/spec-codeline-share.json
115
117
  prompts/templates/spec-context-fragments.json
116
118
  prompts/templates/spec-coordinator-review.json
117
119
  prompts/templates/spec-coordinator.json
118
120
  prompts/templates/spec-model-review.json
119
121
  prompts/templates/spec-review-criteria.json
122
+ prompts/templates/spec-review-other-lanes.json
123
+ prompts/templates/spec-review-ticket.json
120
124
  prompts/templates/spec-shared-consumer.json
121
125
  prompts/templates/spec-story-block.json
126
+ prompts/templates/spec-ticket-split.json
122
127
  prompts/templates/speckit-split-rules.json
123
128
  prompts/templates/squad-coder.json
124
129
  prompts/templates/squad-leader.json
@@ -186,6 +191,7 @@ scripts/lib/env-file.sh
186
191
  scripts/lib/evidence-windows.js
187
192
  scripts/lib/failure-healing.sh
188
193
  scripts/lib/failure-signature.js
194
+ scripts/lib/finding-check.js
189
195
  scripts/lib/flags.sh
190
196
  scripts/lib/git-ops.sh
191
197
  scripts/lib/halt-recovery.sh
@@ -236,6 +242,7 @@ scripts/lib/prelaunch.js
236
242
  scripts/lib/producers/fix-plan.js
237
243
  scripts/lib/project-prompt-builder.js
238
244
  scripts/lib/project-prompt-contract.js
245
+ scripts/lib/prompt-build-calls.js
239
246
  scripts/lib/prompt-library.js
240
247
  scripts/lib/prompt-variant.sh
241
248
  scripts/lib/qa-gate-evidence.sh
@@ -250,12 +257,14 @@ scripts/lib/run-modes.sh
250
257
  scripts/lib/seam-invocation.js
251
258
  scripts/lib/seam-ladder.sh
252
259
  scripts/lib/self-heal.js
260
+ scripts/lib/spec-review-findings.js
253
261
  scripts/lib/stage-coverage-gate.sh
254
262
  scripts/lib/story-acs-block.sh
255
263
  scripts/lib/story-attempt.sh
256
264
  scripts/lib/story-guards.sh
257
265
  scripts/lib/story-outputs.sh
258
266
  scripts/lib/story-retry-state.sh
267
+ scripts/lib/ticket-split.js
259
268
  scripts/lib/tool-timeouts.js
260
269
  scripts/lib/transcript-tool-calls.js
261
270
  scripts/lib/worktree-rungs.sh
@@ -0,0 +1,13 @@
1
+ {
2
+ "$comment": "EVERY FINDING MUST LEAD TO AN ACTION (docs/FINDINGS-MUST-ACT.md). One entry per review point (amsd-pipeline-workflow docs/interaction-inventory.json): what the agent finds, the action that must follow, who checks again, which agent self-heal escalates, and how many correction rounds. Read by lib/finding-check.js (the checker and the rounds) — never restated in code.",
3
+ "points": {
4
+ "R9": {
5
+ "producer": "spec-coordinator (review)",
6
+ "finding": "the review's unmetCriteria entries and its blocking flags on a needs_review verdict (lib/spec-review-findings.js detectiveCorrectionNeeded)",
7
+ "action": "a detective correction, recorded on the story as specification.corrections[]",
8
+ "recheck": "the coordinator reviews the corrected story again",
9
+ "selfHeals": "code-graph-detective (its ladder advances each round)",
10
+ "rounds": 2
11
+ }
12
+ }
13
+ }
@@ -25,9 +25,10 @@
25
25
  "2026-08-17: this template had NO layer field, and absent defaults to \"engine\" — so the provisioning filter dropped it and the builder then failed with \"'project-prompt-generation' is not installed. It must be declared in bootstrap.copyVerbatim\" while bootstrap DID declare it. It was declared and then filtered out.",
26
26
  "",
27
27
  "It is project-layer by construction: project-prompt-builder.js reads the PROJECT copy of this template (outDir) to generate every other project prompt — \"the generator's own prompt comes from the project copy just installed, not from an engine-side string\". The layer field now states what the code does.",
28
- "2026-10-06, AMSD-2974: metrolinx's repro-test-writer was generated as \"write a spec file for a Toast component at cx-shared\" — the generator completed sentences its slots complete at run time, using the one ticket it was shown, and the reviewer passed it because every claim was true. The prompt serves every story and call; a slot's place is the pipeline's; narrowing and a displaced slot are findings."
28
+ "2026-10-06, AMSD-2974: metrolinx's repro-test-writer was generated as \"write a spec file for a Toast component at cx-shared\" — the generator completed sentences its slots complete at run time, using the one ticket it was shown, and the reviewer passed it because every claim was true. The prompt serves every story and call; a slot's place is the pipeline's; narrowing and a displaced slot are findings.",
29
+ "v4 (operator, 2026-10-24: \"when we generate prompt and profile we must gear to the current use case and strip out what is not needed and add net new\"): the generator could only reword — every segment came back and nothing could be added — so a project carried guidance for kinds of project it is not and lacked guidance it needs. It now leaves out a segment that cannot apply (reason recorded) and adds net-new guidance once, in the form project-prompt-contract.js formatUseCaseForm writes and parses; the kind of project and whether each codeline has code come in __GEN_PROJECT_CONTEXT__ (useCaseContext)."
29
30
  ],
30
- "body": "You are specialising ONE generic agent prompt for ONE specific project. You are the same agent that just minted this project's roles, so you already know what this project is and who will work on it.\n\n## The template you must specialise\n\nIts id is __GEN_TEMPLATE_ID__ and its purpose is: __GEN_TEMPLATE_DESCRIPTION__\n\nEverything between the two markers below is the template, verbatim. The markers are not\npart of it. A code fence cannot delimit this: several templates contain fences of their\nown, so the first closing fence would truncate the body mid-instruction.\n\n-----BEGIN TEMPLATE BODY-----\n__GEN_TEMPLATE_BODY__\n-----END TEMPLATE BODY-----\n\n## What this project is\n\n__GEN_PROJECT_CONTEXT__\n\nCodelines in scope and their declared dependencies:\n__GEN_CODELINE_CONTEXT__\n\nThe roles you minted for this project:\n__GEN_MINTED_ROLES__\n\n## The one rule you cannot break\n\nYou are given the template as numbered SEGMENTS — the prose that sits BETWEEN its placeholders. You\nnever see the placeholders and you must never write one. The pipeline puts them back between your\nsegments, in their original positions, after you answer.\n\n- Return EXACTLY as many segments as you were given, in the same order.\n- Specialise the WORDING of each segment for this project. A segment may be reworded freely.\n- NEVER write a placeholder token (the SCREAMING_SNAKE form between double underscores). It would be substituted a second time, or read as literal\n text to the agent. The pipeline owns them; you own the prose.\n- An empty segment is legitimate — some segments are only the join between two adjacent slots.\n\nThis is why the rule is shaped this way: when the generator was asked to reproduce placeholders\ncharacter-for-character while rewriting the prose around them, it lost them. On 2026-09-08 that\nproduced 25 refusals in one run and aborted it at 37 of 39 prompts. You cannot drop a token you\nwere never given.\n\nFor context, the placeholders the pipeline will restore are: __GEN_TEMPLATE_PLACEHOLDERS__\n\n## The prompt serves every story and every call\n\nThis prompt is reused for every story and every call this project makes to the agent — not only for the ticket in scope now. Where one segment ends and the next begins, the pipeline inserts a value that changes with every call: the role for this turn, the file to write, the command to run, the diff, the story. A segment that ends mid-sentence is completed at run time by that value. Never complete it yourself, never move words across a segment break, and never write a value the pipeline supplies. Never make the ticket in scope, one story's component or one story's file the subject of the prompt: the tickets are named above only so you know what kind of work this project does.\n\n## The other rule you cannot break\n\nThe template's OUTPUT SHAPE is a contract too. Every field name the template states in its response\nformat is read by a consumer that will reject an answer without it — the agent would produce work\nnothing accepts, and the seam fails after the model has already been paid for.\n\n- Reproduce every field name EXACTLY, in the same shape the template states it.\n- NEVER drop one because it looks redundant, and NEVER rename one to something clearer.\n- NEVER add a field. A consumer reads by name and has no place to put an invention.\n\nThe output fields this template states are exactly: __GEN_TEMPLATE_OUTPUT_FIELDS__\n\n## Before you answer\n\nCheck your reply against both lists above: every output field must appear in what you are about to\nsend, and no placeholder token may. A specialisation that drops a field is refused and the work is\nredone, so the check costs you nothing and the omission costs an attempt.\n\n## What specialising means\n\nKeep the template's instructions, its output format, its prohibitions and its reasoning intact. They encode failures this pipeline has already paid for. You are not rewriting the prompt or improving its wording.\n\nAdd only what a competent engineer joining THIS project would need and could not infer from the generic text:\n- the conventions, layout and idioms this codebase actually uses\n- the commands this project runs to build, test and type-check\n- the traps this stack presents that a generic prompt would not warn about\n\nGround every addition in the project context above. If the context does not tell you something, say nothing about it — an invented convention is worse than a missing one, because the agent will follow it.\n\nDo not name a file, symbol, package or command that does not appear in the context you were given.\n\n## How to answer\n\nReturn the SEGMENT blocks back, in the same shape and order you were shown: one marker line per\nsegment, each followed by your wording for that segment, and close with the END SEGMENTS marker.\n\nPlain text between the markers. No JSON, no escaping, no markdown fences. A segment may be empty.\nNo placeholder tokens anywhere — the pipeline restores them between your segments.\n\n(The marker lines are not reproduced here on purpose: the only ones in this prompt are the real\nsegments you must answer, so there is never a second set to confuse them with.)\n__GEN_PREVIOUS_REFUSAL__\n\n# Do not invent a path\n\nEvery specific path, filename, directory or symbol you write will be checked against the\nrepository by a reviewer. A plausible-looking path you reasoned your way to — `src/routes/...`,\n`src/pages/api/...` — is the most common reason a generated prompt is rejected and regenerated,\nand each regeneration risks dropping the placeholders above.\n\nSo: state a specific path ONLY when it appears in the facts or the codeline block you were given\nabove — and never a path that belongs to one story's change: that reaches the agent at run time. You were handed those precisely so you would not have to guess.\n\nWhen you have no verified path for something, say the general thing instead — \"the checkout form\ncomponent\", \"the API route that handles checkout\" — which is true, useful to the agent, and cannot\nbe falsified. A prompt that is accurate and general survives review; one that is specific and\ninvented does not.\n\nNever guess a path to sound concrete.\n",
31
+ "body": "You are specialising ONE generic agent prompt for ONE specific project. You are the same agent that just minted this project's roles, so you already know what this project is and who will work on it.\n\n## The template you must specialise\n\nIts id is __GEN_TEMPLATE_ID__ and its purpose is: __GEN_TEMPLATE_DESCRIPTION__\n\nEverything between the two markers below is the template, verbatim. The markers are not\npart of it. A code fence cannot delimit this: several templates contain fences of their\nown, so the first closing fence would truncate the body mid-instruction.\n\n-----BEGIN TEMPLATE BODY-----\n__GEN_TEMPLATE_BODY__\n-----END TEMPLATE BODY-----\n\n## What this project is\n\n__GEN_PROJECT_CONTEXT__\n\nCodelines in scope and their declared dependencies:\n__GEN_CODELINE_CONTEXT__\n\nThe roles you minted for this project:\n__GEN_MINTED_ROLES__\n\n## The one rule you cannot break\n\nYou are given the template as numbered SEGMENTS — the prose that sits BETWEEN its placeholders. You\nnever see the placeholders and you must never write one. The pipeline puts them back between your\nsegments, in their original positions, after you answer.\n\n- Return EXACTLY as many segments as you were given, in the same order.\n- Specialise the WORDING of each segment for this project. A segment may be reworded freely.\n- NEVER write a placeholder token (the SCREAMING_SNAKE form between double underscores). It would be substituted a second time, or read as literal\n text to the agent. The pipeline owns them; you own the prose.\n- An empty segment is legitimate — some segments are only the join between two adjacent slots.\n\nThis is why the rule is shaped this way: when the generator was asked to reproduce placeholders\ncharacter-for-character while rewriting the prose around them, it lost them. On 2026-09-08 that\nproduced 25 refusals in one run and aborted it at 37 of 39 prompts. You cannot drop a token you\nwere never given.\n\nFor context, the placeholders the pipeline will restore are: __GEN_TEMPLATE_PLACEHOLDERS__\n\n## Gear it to this project's use case\n\nThe kind of project and its codelines are stated above. Specialise for THEM:\n- A segment whose guidance cannot apply to this project — it addresses a kind of project, a stack, or a situation this project\n does not have — is left out: answer it with the not-applicable line below, saying why. A segment that states what the answer\n must look like is never left out; reword it instead.\n- Guidance this agent needs on this project that the template does not give — from the facts about this project's codelines,\n stack and kind of work given above — is added once, in the additions block below. It must be true of this project (a reviewer\n checks it against the codelines), serve every story and every call, and contain no placeholder token and no response tag.\n- Leaving out and adding are both optional. Nothing is left out because it is long, and nothing is added that the template\n already says.\n\n__GEN_USE_CASE_FORM__\n\n## The prompt serves every story and every call\n\nThis prompt is reused for every story and every call this project makes to the agent — not only for the ticket in scope now. Where one segment ends and the next begins, the pipeline inserts a value that changes with every call: the role for this turn, the file to write, the command to run, the diff, the story. A segment that ends mid-sentence is completed at run time by that value. Never complete it yourself, never move words across a segment break, and never write a value the pipeline supplies. Never make the ticket in scope, one story's component or one story's file the subject of the prompt: the tickets are named above only so you know what kind of work this project does.\n\n## The other rule you cannot break\n\nThe template's OUTPUT SHAPE is a contract too. Every field name the template states in its response\nformat is read by a consumer that will reject an answer without it — the agent would produce work\nnothing accepts, and the seam fails after the model has already been paid for.\n\n- Reproduce every field name EXACTLY, in the same shape the template states it.\n- NEVER drop one because it looks redundant, and NEVER rename one to something clearer.\n- NEVER add a field. A consumer reads by name and has no place to put an invention.\n\nThe output fields this template states are exactly: __GEN_TEMPLATE_OUTPUT_FIELDS__\n\n## Before you answer\n\nCheck your reply against both lists above: every output field must appear in what you are about to\nsend, and no placeholder token may. A specialisation that drops a field is refused and the work is\nredone, so the check costs you nothing and the omission costs an attempt.\n\n## What specialising means\n\nKeep the template's instructions, its output format, its prohibitions and its reasoning intact. They encode failures this pipeline has already paid for. You are not rewriting the prompt or improving its wording.\n\nAdd only what a competent engineer joining THIS project would need and could not infer from the generic text:\n- the conventions, layout and idioms this codebase actually uses\n- the commands this project runs to build, test and type-check\n- the traps this stack presents that a generic prompt would not warn about\n\nGround every addition in the project context above. If the context does not tell you something, say nothing about it — an invented convention is worse than a missing one, because the agent will follow it.\n\nDo not name a file, symbol, package or command that does not appear in the context you were given.\n\n## How to answer\n\nReturn the SEGMENT blocks back, in the same shape and order you were shown: one marker line per\nsegment, each followed by your wording for that segment, and close with the END SEGMENTS marker.\n\nPlain text between the markers. No JSON, no escaping, no markdown fences. A segment may be empty.\nNo placeholder tokens anywhere — the pipeline restores them between your segments.\n\n(The marker lines are not reproduced here on purpose: the only ones in this prompt are the real\nsegments you must answer, so there is never a second set to confuse them with.)\n__GEN_PREVIOUS_REFUSAL__\n\n# Do not invent a path\n\nEvery specific path, filename, directory or symbol you write will be checked against the\nrepository by a reviewer. A plausible-looking path you reasoned your way to — `src/routes/...`,\n`src/pages/api/...` — is the most common reason a generated prompt is rejected and regenerated,\nand each regeneration risks dropping the placeholders above.\n\nSo: state a specific path ONLY when it appears in the facts or the codeline block you were given\nabove — and never a path that belongs to one story's change: that reaches the agent at run time. You were handed those precisely so you would not have to guess.\n\nWhen you have no verified path for something, say the general thing instead — \"the checkout form\ncomponent\", \"the API route that handles checkout\" — which is true, useful to the agent, and cannot\nbe falsified. A prompt that is accurate and general survives review; one that is specific and\ninvented does not.\n\nNever guess a path to sound concrete.\n",
31
32
  "description": "Specialise one generic agent prompt for one project, preserving its placeholder contract.",
32
33
  "id": "project-prompt-generation",
33
34
  "placeholders": [
@@ -39,9 +40,10 @@
39
40
  "__GEN_TEMPLATE_DESCRIPTION__",
40
41
  "__GEN_TEMPLATE_ID__",
41
42
  "__GEN_TEMPLATE_OUTPUT_FIELDS__",
42
- "__GEN_TEMPLATE_PLACEHOLDERS__"
43
+ "__GEN_TEMPLATE_PLACEHOLDERS__",
44
+ "__GEN_USE_CASE_FORM__"
43
45
  ],
44
- "version": 3,
46
+ "version": 4,
45
47
  "seams": [
46
48
  "prompt-builder"
47
49
  ],
@@ -19,7 +19,8 @@
19
19
  "wording, not whether the specialisation was ambitious enough. A reviewer invited to improve",
20
20
  "prose rewrites prompts that were correct, and the placeholder contract already covers",
21
21
  "structure. Only a claim that can be checked against the repository is in scope.",
22
- "2026-10-06, AMSD-2974: metrolinx's repro-test-writer was generated as \"write a spec file for a Toast component at cx-shared\" — the generator completed sentences its slots complete at run time, using the one ticket it was shown, and the reviewer passed it because every claim was true. The prompt serves every story and call; a slot's place is the pipeline's; narrowing and a displaced slot are findings."
22
+ "2026-10-06, AMSD-2974: metrolinx's repro-test-writer was generated as \"write a spec file for a Toast component at cx-shared\" — the generator completed sentences its slots complete at run time, using the one ticket it was shown, and the reviewer passed it because every claim was true. The prompt serves every story and call; a slot's place is the pipeline's; narrowing and a displaced slot are findings.",
23
+ "v4 (operator, 2026-10-24: gear each prompt to its use case — strip what is not needed, add net new): the generator may now leave out a segment that cannot apply to this project and add guidance the template lacks (project-prompt-contract.js); the reviewer is shown both (__USE_CASE_EDITS__) and judges them as it judges every other claim."
23
24
  ],
24
25
  "description": "Falsifies what a generated project prompt claims about this project, before any agent inherits it.",
25
26
  "seams": [
@@ -27,8 +28,8 @@
27
28
  ],
28
29
  "consumer": "engine",
29
30
  "id": "prompt-review",
30
- "version": 3,
31
- "body": "You are reviewing a PROJECT PROMPT that was generated by specialising a generic template for this specific project. Another agent will receive it as its system prompt and act on every claim in it.\n\nTHE GENERIC TEMPLATE IT WAS DERIVED FROM:\n__TEMPLATE_BODY__\n\nTHE GENERATED PROJECT PROMPT UNDER REVIEW (id: __PROMPT_ID__):\n__GENERATED_BODY__\n\nTHE CODELINES THIS PROJECT WORKS ON, and what each one declares:\n__CODELINE_BLOCK__\n\nTHE WORK THE PROJECT WAS ASKED TO DO:\n__TICKET_BLOCK__\n\n__TOOL_LINE__\n\n# What is in scope\n\nTWO QUESTIONS ONLY:\n1. Does the generated prompt state anything about this project that is FALSE?\n2. Is the generated prompt NARROWED TO ONE STORY OR CALL, or does a slot NO LONGER FIT ITS SENTENCE? (See \"A prompt narrowed to one call\" below.)\n\nA claim is in scope when it can be checked against a repository — a path, a file, a directory, a dependency, a command, a framework, a convention, a symbol, an ownership statement ('X owns Y'). Open the codelines and check it.\n\nExamples of a finding:\n- it names a test directory, file suffix or framework this codeline does not use\n- it names a dependency, script or command the manifest does not declare\n- it asserts a file, module or symbol exists that does not\n- it attributes behaviour to a file that does not contain it\n- it describes a codeline this project does not have, or confuses two that it does\n- it instructs the agent to run something this codeline cannot run\n\n# A prompt narrowed to one call\n\nThe generated prompt is not written for the ticket in scope now. It is reused for every story and every call this project makes to the agent, and each call's specifics — the role for the turn, the file to write, the command to run, the diff, the story — arrive through the slots (the SCREAMING_SNAKE tokens between double underscores) at run time. Compare it with the template, slot by slot, and report as a finding:\n- a statement true only for one story or one call — this ticket's component, a file or path one story will write, a command aimed at one story's file — written where the template leaves that to a slot. It is a finding even when it is true today: the next story receives it as an instruction.\n- a slot that no longer fits its sentence: in the template the slot completes or sits inside a sentence; in the generated prompt the words around it were moved, completed by hand, or rewritten, so the run-time value would land in the wrong place or be said twice. Quote the template's words around that slot and the generated prompt's.\nFor these findings `claim` quotes the generated text, `checked` names the template slot you compared it with, and `found` says what the template has there. Give no `verification` field: this is read from the two texts, not from the repository.\n\n# Before you call anything absent: SEARCH for it\n\nA path in a generated prompt is frequently ABBREVIATED rather than wrong. Looking at the literal\nstring, finding nothing there, and reporting a false claim is the single most common way this\nreview does damage — it rejects a prompt that was RIGHT about the project, the generator rewrites\nthe whole thing to escape a finding that was not real, and in rewriting it drops the placeholders\nthe pipeline depends on. Three attempts of that aborts the run.\n\nSo, for every path, file, directory or symbol the prompt names:\n\n1. SEARCH the codeline for it by BASENAME before concluding it does not exist. `src/routes/checkouts/[checkoutId].ts`\n and `src/pages/api/checkouts/[checkoutId].ts` are both a SHORTENED form of\n `src/pages/api/v1/ecommerce/checkouts/[checkoutId].ts`, which exists — that is a near-miss path,\n NOT a false claim, and it is not a finding.\n2. An IMPRECISE path that RESOLVES to a real file is not a finding. Neither is a partial path, a\n path missing intermediate directories, or a file named without its directory.\n A NAME MAY BE A DIRECTORY. A file glob such as **/Name* matches files, not directories, and a\n text search matches contents, not folder names — neither can show you a directory. Before you\n call a component, module or folder absent, list its parent directory and look for it there.\n3. Report it ONLY when the thing genuinely does not exist anywhere in the codeline — no file of\n that name, no such dependency in the manifest, no such symbol in the sources.\n\nAbsence at one exact path is not absence from the repository. If you did not search, you do not\nknow, and \"I did not find it where the prompt said\" is not a finding you may report.\n\n# What is NOT in scope\n\nDo not review wording, tone, length, structure or ambition. Do not propose improvements. Do not object that the prompt is too close to, or too far from, the template — how far it may diverge is decided elsewhere, and the placeholder contract is already enforced mechanically. (A prompt narrowed to one call, or a slot that no longer fits its sentence, is not a question of distance — report it as above.)\n\nA prompt that says nothing false and serves every call is SOUND, however plain it is.\n\n# Evidence\n\nReturn every defect you can evidence, and nothing you cannot. For each finding, say what you CHECKED and what you FOUND, naming the file or manifest you read. A finding without a check is an opinion, and an opinion about a prompt is not a defect.\n\nWhere a finding turns on whether a named path or dependency is present, fill in the verification field as well as the prose. The pipeline re-runs that exact check against the repository and DISCARDS any finding the check refutes — so a careless reading costs nothing, and a correct one is confirmed independently of how convincingly you argued it.\n\nIf every claim checks out, return no findings. An empty finding list from a review that RAN is the correct answer for a sound prompt.\n\n# How to return the verdict\n\nEmit the verdict INLINE as the last thing you write, wrapped in these exact tags. Do not write it\nto a file, and do not use a tool to deliver it — a verdict delivered any other way is not read, and\nthe prompt is then installed unreviewed.\n\n<PROMPT_REVIEW>\n{\"falseClaims\": []}\n</PROMPT_REVIEW>\n\n`falseClaims` is a list of the defects you evidenced. Each entry is an object:\n\n- `claim` — the false statement, quoted from the generated prompt\n- `checked` — what you opened or ran to test it, naming the file or manifest\n- `found` — what was actually there\n- `verification` — when the finding turns on a named path or dependency being present or absent,\n an object stating what to re-check, so the pipeline can confirm it independently\n\nTHE ROLES THIS PROJECT MINTED, which is the ground truth for any claim naming an agent:\n\n__ROSTER_BLOCK__\n\nA prompt naming one of these is stating a FACT, not inventing one. Check the list before calling a\nrole false — an unverifiable claim is not a false claim, and rejecting one costs a regeneration and\nteaches the generator nothing.\n\nTHE BLOCK IS THE WHOLE ANSWER. Nothing you write outside it is read — the consumer matches the\ntags and discards everything else. Do not narrate your investigation, do not summarise what you\nchecked, and do not restate the prompt back. Put your evidence INSIDE `checked` and `found` on the\nfinding it belongs to, where it is kept; anywhere else it is thrown away.\n\nMeasured 2026-08-27: reviews averaged 3,366 output tokens to deliver a 13-token verdict. Every one\nof those tokens was billed and 99% of them were discarded unread.\n\nAn empty list is the correct verdict for a sound prompt. Emit the block either way: the block is\nhow a review that RAN is distinguished from one that did not run at all.\n",
31
+ "version": 4,
32
+ "body": "You are reviewing a PROJECT PROMPT that was generated by specialising a generic template for this specific project. Another agent will receive it as its system prompt and act on every claim in it.\n\nTHE GENERIC TEMPLATE IT WAS DERIVED FROM:\n__TEMPLATE_BODY__\n\nTHE GENERATED PROJECT PROMPT UNDER REVIEW (id: __PROMPT_ID__):\n__GENERATED_BODY__\n\nWHAT THE GENERATOR LEFT OUT OF THE TEMPLATE FOR THIS PROJECT, AND WHAT IT ADDED:\n__USE_CASE_EDITS__\n\nTHE CODELINES THIS PROJECT WORKS ON, and what each one declares:\n__CODELINE_BLOCK__\n\nTHE WORK THE PROJECT WAS ASKED TO DO:\n__TICKET_BLOCK__\n\n__TOOL_LINE__\n\n# What is in scope\n\nTHREE QUESTIONS ONLY:\n1. Does the generated prompt state anything about this project that is FALSE?\n2. Is the generated prompt NARROWED TO ONE STORY OR CALL, or does a slot NO LONGER FIT ITS SENTENCE? (See \"A prompt narrowed to one call\" below.)\n3. Was any part of the template LEFT OUT although it applies to this project, or was anything ADDED that is false of this project or serves only one story or call? A part left out is a finding when its reason is false of the codelines or the kind of project; quote the template's words that were left out as the claim.\n\nA claim is in scope when it can be checked against a repository — a path, a file, a directory, a dependency, a command, a framework, a convention, a symbol, an ownership statement ('X owns Y'). Open the codelines and check it.\n\nExamples of a finding:\n- it names a test directory, file suffix or framework this codeline does not use\n- it names a dependency, script or command the manifest does not declare\n- it asserts a file, module or symbol exists that does not\n- it attributes behaviour to a file that does not contain it\n- it describes a codeline this project does not have, or confuses two that it does\n- it instructs the agent to run something this codeline cannot run\n\n# A prompt narrowed to one call\n\nThe generated prompt is not written for the ticket in scope now. It is reused for every story and every call this project makes to the agent, and each call's specifics — the role for the turn, the file to write, the command to run, the diff, the story — arrive through the slots (the SCREAMING_SNAKE tokens between double underscores) at run time. Compare it with the template, slot by slot, and report as a finding:\n- a statement true only for one story or one call — this ticket's component, a file or path one story will write, a command aimed at one story's file — written where the template leaves that to a slot. It is a finding even when it is true today: the next story receives it as an instruction.\n- a slot that no longer fits its sentence: in the template the slot completes or sits inside a sentence; in the generated prompt the words around it were moved, completed by hand, or rewritten, so the run-time value would land in the wrong place or be said twice. Quote the template's words around that slot and the generated prompt's.\nFor these findings `claim` quotes the generated text, `checked` names the template slot you compared it with, and `found` says what the template has there. Give no `verification` field: this is read from the two texts, not from the repository.\n\n# Before you call anything absent: SEARCH for it\n\nA path in a generated prompt is frequently ABBREVIATED rather than wrong. Looking at the literal\nstring, finding nothing there, and reporting a false claim is the single most common way this\nreview does damage — it rejects a prompt that was RIGHT about the project, the generator rewrites\nthe whole thing to escape a finding that was not real, and in rewriting it drops the placeholders\nthe pipeline depends on. Three attempts of that aborts the run.\n\nSo, for every path, file, directory or symbol the prompt names:\n\n1. SEARCH the codeline for it by BASENAME before concluding it does not exist. `src/routes/checkouts/[checkoutId].ts`\n and `src/pages/api/checkouts/[checkoutId].ts` are both a SHORTENED form of\n `src/pages/api/v1/ecommerce/checkouts/[checkoutId].ts`, which exists — that is a near-miss path,\n NOT a false claim, and it is not a finding.\n2. An IMPRECISE path that RESOLVES to a real file is not a finding. Neither is a partial path, a\n path missing intermediate directories, or a file named without its directory.\n A NAME MAY BE A DIRECTORY. A file glob such as **/Name* matches files, not directories, and a\n text search matches contents, not folder names — neither can show you a directory. Before you\n call a component, module or folder absent, list its parent directory and look for it there.\n3. Report it ONLY when the thing genuinely does not exist anywhere in the codeline — no file of\n that name, no such dependency in the manifest, no such symbol in the sources.\n\nAbsence at one exact path is not absence from the repository. If you did not search, you do not\nknow, and \"I did not find it where the prompt said\" is not a finding you may report.\n\n# What is NOT in scope\n\nDo not review wording, tone, length, structure or ambition. Do not propose improvements. Do not object that the prompt is too close to, or too far from, the template — how far it may diverge is decided elsewhere, and the placeholder contract is already enforced mechanically. (A prompt narrowed to one call, or a slot that no longer fits its sentence, is not a question of distance — report it as above.)\n\nA prompt that says nothing false and serves every call is SOUND, however plain it is.\n\n# Evidence\n\nReturn every defect you can evidence, and nothing you cannot. For each finding, say what you CHECKED and what you FOUND, naming the file or manifest you read. A finding without a check is an opinion, and an opinion about a prompt is not a defect.\n\nWhere a finding turns on whether a named path or dependency is present, fill in the verification field as well as the prose. The pipeline re-runs that exact check against the repository and DISCARDS any finding the check refutes — so a careless reading costs nothing, and a correct one is confirmed independently of how convincingly you argued it.\n\nIf every claim checks out, return no findings. An empty finding list from a review that RAN is the correct answer for a sound prompt.\n\n# How to return the verdict\n\nEmit the verdict INLINE as the last thing you write, wrapped in these exact tags. Do not write it\nto a file, and do not use a tool to deliver it — a verdict delivered any other way is not read, and\nthe prompt is then installed unreviewed.\n\n<PROMPT_REVIEW>\n{\"falseClaims\": []}\n</PROMPT_REVIEW>\n\n`falseClaims` is a list of the defects you evidenced. Each entry is an object:\n\n- `claim` — the false statement, quoted from the generated prompt\n- `checked` — what you opened or ran to test it, naming the file or manifest\n- `found` — what was actually there\n- `verification` — when the finding turns on a named path or dependency being present or absent,\n an object stating what to re-check, so the pipeline can confirm it independently\n\nTHE ROLES THIS PROJECT MINTED, which is the ground truth for any claim naming an agent:\n\n__ROSTER_BLOCK__\n\nA prompt naming one of these is stating a FACT, not inventing one. Check the list before calling a\nrole false — an unverifiable claim is not a false claim, and rejecting one costs a regeneration and\nteaches the generator nothing.\n\nTHE BLOCK IS THE WHOLE ANSWER. Nothing you write outside it is read — the consumer matches the\ntags and discards everything else. Do not narrate your investigation, do not summarise what you\nchecked, and do not restate the prompt back. Put your evidence INSIDE `checked` and `found` on the\nfinding it belongs to, where it is kept; anywhere else it is thrown away.\n\nMeasured 2026-08-27: reviews averaged 3,366 output tokens to deliver a 13-token verdict. Every one\nof those tokens was billed and 99% of them were discarded unread.\n\nAn empty list is the correct verdict for a sound prompt. Emit the block either way: the block is\nhow a review that RAN is distinguished from one that did not run at all.\n",
32
33
  "placeholders": [
33
34
  "__CODELINE_BLOCK__",
34
35
  "__GENERATED_BODY__",
@@ -36,7 +37,8 @@
36
37
  "__ROSTER_BLOCK__",
37
38
  "__TEMPLATE_BODY__",
38
39
  "__TICKET_BLOCK__",
39
- "__TOOL_LINE__"
40
+ "__TOOL_LINE__",
41
+ "__USE_CASE_EDITS__"
40
42
  ],
41
43
  "mayBeEmpty": [
42
44
  "__PROMPT_ID__"
@@ -0,0 +1,22 @@
1
+ {
2
+ "id": "spec-codeline-share",
3
+ "version": 2,
4
+ "layer": "project",
5
+ "seams": [
6
+ "code-graph-detective",
7
+ "spec-agent",
8
+ "spec-coordinator"
9
+ ],
10
+ "description": "A codeline's share of the whole-ticket split, given to that codeline's spec agents with the ticket as filed.",
11
+ "placeholders": [
12
+ "__CODELINE__",
13
+ "__SHARE__",
14
+ "__OTHERS__"
15
+ ],
16
+ "$why": [
17
+ "v1 (operator, 2026-10-24: \"One lane spec ... keep writer split\"): a codeline's spec agents were given the lane's own restatement of the ticket (specTextPerCodeline) and narrowed it; they now work from the ticket as filed and the share of it the whole-ticket split gave this codeline.",
18
+ "layer project (operator, 2026-10-24: \"Prompts and profiles and plans must be agentically generated\"): the template is the generic parent; the project's copy is generated and reviewed by the pipeline's own prompt builder, and only that copy is executed (lib/prompt-library.js buildPrompt).",
19
+ "v2: the share and the others arrive as JSON data (lib/ticket-split.js shareBlock) — the words are the prompt's."
20
+ ],
21
+ "body": "THIS CODELINE'S SHARE OF THE TICKET — codeline __CODELINE__. The whole ticket (above) was split over every codeline it runs\nacross before any codeline was specified. The requirements this codeline must deliver and what it must do for each, as JSON (`role` changes: the change to make; already-met: show it is met here);\nyour plan must give every one of them a change in this codeline, or show in code that it is already met here. A requirement\nlisted here is never deferred, excluded, sent to another ticket, or left waiting on input the ticket does not say it waits for.\n__SHARE__\n\nWhat the other codelines do for the same ticket, as JSON (theirs to plan, not yours — named so your plan fits theirs):\n__OTHERS__"
22
+ }
@@ -4,26 +4,30 @@
4
4
  "",
5
5
  "The reviewer is handed manifest evidence and the codeline scope as VALUES, because both",
6
6
  "are computed from the run's own PRD — a template naming either would be wrong for every",
7
- "other project."
7
+ "other project.",
8
+ "v2 — v1 (operator, 2026-10-23): run 13 — every lane's spec reviewer saw only its own lane and an agent-written plan, never the ticket as filed; a lane's spec had narrowed the ticket (\"would need its own ticket\", \"once design input lands\", neither in the ticket) and nothing compared it with the ticket."
8
9
  ],
9
- "body": "You are the EPAM CLI specification coordinator reviewing the completed spec outputs for phase __PHASE__.\n\nEach story was processed by a sequential agent pipeline:\n 1. openspec elaborated requirements (AC refinement, story splits, technical depth)\n 2. speckit reviewed openspec's output (testability, security, edge cases, gap analysis)\n\n__REVIEW_CRITERIA__\n\nMANIFEST EVIDENCE (checked against the repository, not asserted):\n__MANIFEST_EVIDENCE__\n__CODELINE_SCOPE__\n\n__MANIFEST_GROUNDING__\n\nQUALITY SCORE — what the number has to mean. It is enforced: below 0.7 halts the run\nbefore implementation, so an unanchored guess stops real work.\n 0.9-1.0 the spec is ready to implement; criteria are observable and the file set fits.\n 0.7-0.89 ready to implement, with ordinary open questions a competent writer resolves.\n 0.5-0.69 NOT ready: something concrete is wrong or missing — criteria that cannot be\n observed, a file set that cannot deliver what is described, contradictions.\n below 0.5 the spec would send a writer somewhere useless.\nScore what IS in front of you. Do NOT lower the score because an agent could not read the\nsource files, or because a human \"might want to check\" — that is true of every ticket and\nis not a defect in this spec. If your notes cannot name something concretely wrong, the\nscore belongs at 0.7 or above.\n\nRespond with JSON between <SPEC_REVIEW> and </SPEC_REVIEW> using this schema:\n{\"items\": [\n {\"storyId\":\"REM-xxx\",\"verdict\":\"approved|needs_review\",\"reviewNotes\":\"coordinator observations\",\"qualityScore\":<0.0-1.0>,\"flags\":[{\"flag\":\"short-slug\",\"severity\":\"blocking|advisory\",\"why\":\"what you checked and what you found\"}],\"planAlignment\":\"aligned|justified_deviation|unexplained_mismatch|not_applicable\"}\n]}\n\nStories to review:\n__REVIEW_PAYLOAD__\n\n<SPEC_REVIEW>\n</SPEC_REVIEW>",
10
+ "body": "You are the EPAM CLI specification coordinator reviewing the completed spec outputs for phase __PHASE__.\n\nEach story was processed by a sequential agent pipeline:\n 1. openspec elaborated requirements (AC refinement, story splits, technical depth)\n 2. speckit reviewed openspec's output (testability, security, edge cases, gap analysis)\n\n__REVIEW_CRITERIA__\n\nMANIFEST EVIDENCE (checked against the repository, not asserted):\n__MANIFEST_EVIDENCE__\n__CODELINE_SCOPE__\n\n__MANIFEST_GROUNDING__\n\nQUALITY SCORE — what the number has to mean. It is enforced: below 0.7 halts the run\nbefore implementation, so an unanchored guess stops real work.\n 0.9-1.0 the spec is ready to implement; criteria are observable and the file set fits.\n 0.7-0.89 ready to implement, with ordinary open questions a competent writer resolves.\n 0.5-0.69 NOT ready: something concrete is wrong or missing — criteria that cannot be\n observed, a file set that cannot deliver what is described, contradictions.\n below 0.5 the spec would send a writer somewhere useless.\nScore what IS in front of you. Do NOT lower the score because an agent could not read the\nsource files, or because a human \"might want to check\" — that is true of every ticket and\nis not a defect in this spec. If your notes cannot name something concretely wrong, the\nscore belongs at 0.7 or above.\n\nRespond with JSON between <SPEC_REVIEW> and </SPEC_REVIEW> using this schema:\n{\"items\": [\n {\"storyId\":\"REM-xxx\",\"verdict\":\"approved|needs_review\",\"reviewNotes\":\"coordinator observations\",\"qualityScore\":<0.0-1.0>,\"flags\":[{\"flag\":\"short-slug\",\"severity\":\"blocking|advisory\",\"why\":\"what you checked and what you found\"}],\"planAlignment\":\"aligned|justified_deviation|unexplained_mismatch|not_applicable\"}\n]}\n\n__TICKET_AS_FILED__\n\n__OTHER_LANES_BLOCK__\n\nStories to review:\n__REVIEW_PAYLOAD__\n\n<SPEC_REVIEW>\n</SPEC_REVIEW>",
10
11
  "description": "Review a completed specification pass against the manifest and codeline scope.",
11
12
  "id": "spec-coordinator-review",
12
13
  "placeholders": [
13
14
  "__CODELINE_SCOPE__",
14
15
  "__MANIFEST_EVIDENCE__",
15
16
  "__MANIFEST_GROUNDING__",
17
+ "__OTHER_LANES_BLOCK__",
16
18
  "__PHASE__",
17
19
  "__REVIEW_CRITERIA__",
18
- "__REVIEW_PAYLOAD__"
20
+ "__REVIEW_PAYLOAD__",
21
+ "__TICKET_AS_FILED__"
19
22
  ],
20
- "version": 1,
23
+ "version": 2,
21
24
  "seams": [
22
25
  "spec-coordinator"
23
26
  ],
24
27
  "mayBeEmpty": [
25
- "__CODELINE_SCOPE__"
28
+ "__CODELINE_SCOPE__",
29
+ "__OTHER_LANES_BLOCK__"
26
30
  ],
27
31
  "$whyMayBeEmpty": "Declared 2026-08-27 by sweeping the CLASS rather than the instance, after three runs died on it one placeholder at a time. Every call site for these writes an explicit empty branch — the story is not being split, attempt one carries no forced-retry note, no documentation was fetched, the persona prefix is optional — so absence is a real state, which is the renderer's own test. Placeholders supplied by a lookup that may FAIL (`x || ''`) are deliberately NOT here: for those, empty means broken, and declaring them would hide the blank-brief defect the renderer exists to surface. Unanimity is required — one deliberate branch among several defensive lookups is not a licence.",
28
- "$mayBeEmptyWhy": "__CODELINE_SCOPE__ is a note about the OTHER codelines a story reaches, and a story that reaches only one has none. codelineScopeBlock() returns '' in three deliberate branches — no lane, no story spanning more than one codeline, no other lane — so the empty value is the author's answer, not a failed lookup. Undeclared, the renderer refused it and killed the spec pass AFTER it had produced its verification criteria: mock3, whose two stories live one per codeline, lost a completed pass to a note it had no reason to write. "
32
+ "$mayBeEmptyWhy": "__CODELINE_SCOPE__ is a note about the OTHER codelines a story reaches, and a story that reaches only one has none. codelineScopeBlock() returns '' in three deliberate branches — no lane, no story spanning more than one codeline, no other lane — so the empty value is the author's answer, not a failed lookup. Undeclared, the renderer refused it and killed the spec pass AFTER it had produced its verification criteria: mock3, whose two stories live one per codeline, lost a completed pass to a note it had no reason to write. __OTHER_LANES_BLOCK__ is the other lanes' settled specs: the first lane, or a story in one lane, has none."
29
33
  }
@@ -9,7 +9,8 @@
9
9
  "empty array as a hallucination or a persistence failure and lowered qualityScore for it,",
10
10
  "which is a gate blocking on a policy it was not told about.",
11
11
  "v2 (operator, 2026-10-22): plan and criteria are reconciled before pause 2 — run 11's gotransit plan said 'no change' while its own criterion asked for a toast longer than 5 s; nothing checked one against the other.",
12
- "v3 (operator, 2026-10-23): the unmet criteria are a required list in the answer (unmetCriteria) — live, 1 of 3 real reviews of run 13 flagged the same contrast gap as advisory under its own name, and nothing corrected it."
12
+ "v3 (operator, 2026-10-23): the unmet criteria are a required list in the answer (unmetCriteria) — live, 1 of 3 real reviews of run 13 flagged the same contrast gap as advisory under its own name, and nothing corrected it.",
13
+ "v4 — v1 (operator, 2026-10-23): run 13 — every lane's spec reviewer saw only its own lane and an agent-written plan, never the ticket as filed; a lane's spec had narrowed the ticket (\"would need its own ticket\", \"once design input lands\", neither in the ticket) and nothing compared it with the ticket. The review now accounts for every ticket requirement with quoted evidence and an owner (live TDD, 2026-10-24: test/live/spec-ticket-fidelity.live.test.js in amsd-pipeline-workflow)."
13
14
  ],
14
15
  "description": "The criteria a spec-review coordinator judges a story's collaborative spec work against.",
15
16
  "id": "spec-review-criteria",
@@ -17,9 +18,9 @@
17
18
  "spec-coordinator"
18
19
  ],
19
20
  "placeholders": [],
20
- "version": 3,
21
+ "version": 4,
21
22
  "bodies": {
22
- "brownfield": "For each story, evaluate the quality of the collaborative spec work:\n1. Did both agents add meaningful, non-overlapping value?\n2. Flag any story needing human review.\n3. PLAN ALIGNMENT — where planAlignmentEvidence is present, it tells you what the\n code-graph-detective SAID it would investigate (detectivePlan) and a deterministic,\n cheap signal (aligned: true/false) for whether the final fixSiteAnalysis shares any\n named symbol/file with that plan. This signal is NOT your verdict — it is evidence, the\n same as MANIFEST EVIDENCE below. A plan can legitimately turn out wrong once real\n exploration starts. Read detectivePlan and fixSiteAnalysis yourself and judge: did the\n detective explain WHY it moved from its plan to its final answer (a stated pivot,\n reasoning that connects the two), or did the answer just change with no explanation?\n The latter is a real defect (a fix has shipped that shared no term with the detective's\n own stated plan, with no explanation, more than once on the same ticket) — set\n planAlignment to justified_deviation when the detective justifies its pivot, or\n unexplained_mismatch when it does not, and say why in reviewNotes. aligned:true needs\n no action.\n\n(Brownfield tickets never split and their acceptance criteria are immutable —\ndo not evaluate split quality or AC completeness; there is nothing there for\neither agent to have changed.\n\nEXPECTED, NOT A DEFECT: an agent's notes may describe acceptance criteria it\nauthored while the story's acceptanceCriteria array is empty, and report\nacceptanceChanged=false. That is this pipeline REDACTING them on purpose: on a\nbrownfield ticket the ACs are the ticket's own, and a thin ticket legitimately\nhas none. The observable checks live in verificationCriteria — judge THOSE.\nDo not report the mismatch as a hallucination, a persistence failure or a\nmetadata inconsistency, and do not lower qualityScore for it. An empty\nacceptanceCriteria array on a brownfield story is correct by policy.)\n\nEVERY VERIFICATION CRITERION HAS A PLANNED CHANGE THAT MAKES IT TRUE. For each verification criterion, name what in the plan makes it observable in this codeline: a fix site whose changeRequired is true, this codeline's own change or update in overallPlanForThisCodeline, or — where this codeline consumes another's package — the provider's change it receives, which its Writer is tested against through the provider's build the pipeline places in this codeline. A criterion nothing planned makes true cannot be met by the writer: flag it as criterion-without-planned-change, severity blocking, with a why that quotes the criterion and names the change that would meet it, or says that the criterion asks for something this story does not change and should be dropped. Do not approve a spec with such a criterion. List every such criterion in unmetCriteria — the criterion quoted, and why — for every story you review; an empty list states that every criterion has a planned change behind it.\n",
23
- "greenfield": "For each story, evaluate the quality of the collaborative spec work:\n1. Did both agents add meaningful, non-overlapping value?\n2. Are the acceptance criteria complete, testable, and non-overlapping?\n3. Are story splits logical and properly scoped?\n4. Flag any story needing human review.\n\nEVERY VERIFICATION CRITERION HAS A PLANNED CHANGE THAT MAKES IT TRUE. For each verification criterion, name what in the plan makes it observable in this codeline: a fix site whose changeRequired is true, this codeline's own change or update in overallPlanForThisCodeline, or — where this codeline consumes another's package — the provider's change it receives, which its Writer is tested against through the provider's build the pipeline places in this codeline. A criterion nothing planned makes true cannot be met by the writer: flag it as criterion-without-planned-change, severity blocking, with a why that quotes the criterion and names the change that would meet it, or says that the criterion asks for something this story does not change and should be dropped. Do not approve a spec with such a criterion. List every such criterion in unmetCriteria — the criterion quoted, and why — for every story you review; an empty list states that every criterion has a planned change behind it.\n"
23
+ "brownfield": "For each story, evaluate the quality of the collaborative spec work:\n1. Did both agents add meaningful, non-overlapping value?\n2. Flag any story needing human review.\n3. PLAN ALIGNMENT — where planAlignmentEvidence is present, it tells you what the\n code-graph-detective SAID it would investigate (detectivePlan) and a deterministic,\n cheap signal (aligned: true/false) for whether the final fixSiteAnalysis shares any\n named symbol/file with that plan. This signal is NOT your verdict — it is evidence, the\n same as MANIFEST EVIDENCE below. A plan can legitimately turn out wrong once real\n exploration starts. Read detectivePlan and fixSiteAnalysis yourself and judge: did the\n detective explain WHY it moved from its plan to its final answer (a stated pivot,\n reasoning that connects the two), or did the answer just change with no explanation?\n The latter is a real defect (a fix has shipped that shared no term with the detective's\n own stated plan, with no explanation, more than once on the same ticket) — set\n planAlignment to justified_deviation when the detective justifies its pivot, or\n unexplained_mismatch when it does not, and say why in reviewNotes. aligned:true needs\n no action.\n\n(Brownfield tickets never split and their acceptance criteria are immutable —\ndo not evaluate split quality or AC completeness; there is nothing there for\neither agent to have changed.\n\nEXPECTED, NOT A DEFECT: an agent's notes may describe acceptance criteria it\nauthored while the story's acceptanceCriteria array is empty, and report\nacceptanceChanged=false. That is this pipeline REDACTING them on purpose: on a\nbrownfield ticket the ACs are the ticket's own, and a thin ticket legitimately\nhas none. The observable checks live in verificationCriteria — judge THOSE.\nDo not report the mismatch as a hallucination, a persistence failure or a\nmetadata inconsistency, and do not lower qualityScore for it. An empty\nacceptanceCriteria array on a brownfield story is correct by policy.)\n\nEVERY VERIFICATION CRITERION HAS A PLANNED CHANGE THAT MAKES IT TRUE. For each verification criterion, name what in the plan makes it observable in this codeline: a fix site whose changeRequired is true, this codeline's own change or update in overallPlanForThisCodeline, or — where this codeline consumes another's package — the provider's change it receives, which its Writer is tested against through the provider's build the pipeline places in this codeline. A criterion nothing planned makes true cannot be met by the writer: flag it as criterion-without-planned-change, severity blocking, with a why that quotes the criterion and names the change that would meet it, or says that the criterion asks for something this story does not change and should be dropped. Do not approve a spec with such a criterion. List every such criterion in unmetCriteria — the criterion quoted, and why — for every story you review; an empty list states that every criterion has a planned change behind it.\n\n\nTHE TICKET, REQUIREMENT BY REQUIREMENT. List in ticketRequirements EVERY requirement the TICKET AS FILED states (its\ndescription, acceptance criteria and comments), quoted, each with its evidence from any lane, quoted: a requirement for BEHAVIOUR\nis met by a fix site that makes it true; a requirement for a CHECK (validation, testing, an audit) is met by a verification\ncriterion that performs that check. Give its coverage: \"full\" only when the evidence meets EVERY part of the requirement — every\nkind of thing it names, and the very change it asks for (to increase something is not met by making it configurable) — otherwise\n\"partial\" or \"none\". Only \"full\" is met: true. Partial or none is met: false, with lane: the lane whose code must change (or that\nmust add the check), and it is also listed in unmetCriteria with that \"owner\". Read every lane's fix sites and criteria before\ncalling anything unmet. A lane's own spec deferring or excluding a ticket requirement does not make it met.",
24
+ "greenfield": "For each story, evaluate the quality of the collaborative spec work:\n1. Did both agents add meaningful, non-overlapping value?\n2. Are the acceptance criteria complete, testable, and non-overlapping?\n3. Are story splits logical and properly scoped?\n4. Flag any story needing human review.\n\nEVERY VERIFICATION CRITERION HAS A PLANNED CHANGE THAT MAKES IT TRUE. For each verification criterion, name what in the plan makes it observable in this codeline: a fix site whose changeRequired is true, this codeline's own change or update in overallPlanForThisCodeline, or — where this codeline consumes another's package — the provider's change it receives, which its Writer is tested against through the provider's build the pipeline places in this codeline. A criterion nothing planned makes true cannot be met by the writer: flag it as criterion-without-planned-change, severity blocking, with a why that quotes the criterion and names the change that would meet it, or says that the criterion asks for something this story does not change and should be dropped. Do not approve a spec with such a criterion. List every such criterion in unmetCriteria — the criterion quoted, and why — for every story you review; an empty list states that every criterion has a planned change behind it.\n\n\nTHE TICKET, REQUIREMENT BY REQUIREMENT. List in ticketRequirements EVERY requirement the TICKET AS FILED states (its\ndescription, acceptance criteria and comments), quoted, each with its evidence from any lane, quoted: a requirement for BEHAVIOUR\nis met by a fix site that makes it true; a requirement for a CHECK (validation, testing, an audit) is met by a verification\ncriterion that performs that check. Give its coverage: \"full\" only when the evidence meets EVERY part of the requirement — every\nkind of thing it names, and the very change it asks for (to increase something is not met by making it configurable) — otherwise\n\"partial\" or \"none\". Only \"full\" is met: true. Partial or none is met: false, with lane: the lane whose code must change (or that\nmust add the check), and it is also listed in unmetCriteria with that \"owner\". Read every lane's fix sites and criteria before\ncalling anything unmet. A lane's own spec deferring or excluding a ticket requirement does not make it met."
24
25
  }
25
26
  }