@enterpriseai/cli 3.19.0 → 3.19.2

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 (364) hide show
  1. package/package.json +3 -3
  2. package/resources/deploy/eai-app-template/producer-pin.json +5 -5
  3. package/resources/deploy/eai-app-template/tests/source-unknown-deployment-evidence.test.mjs +2141 -1
  4. package/resources/gofer/.gofer-version +4 -357
  5. package/resources/gofer/agents-skills/eai/SKILL.md +365 -0
  6. package/resources/gofer/agents-skills/eai-update/SKILL.md +56 -0
  7. package/resources/gofer/agents-skills/gofer-documentation/SKILL.md +93 -0
  8. package/resources/gofer/bash-scripts/create-new-feature.sh +3 -1
  9. package/resources/gofer/bash-scripts/sync-implementation-status.sh +4 -3
  10. package/resources/gofer/bash-scripts/update-agent-context.sh +7 -8
  11. package/resources/gofer/bash-scripts/validate-artifact.sh +10 -6
  12. package/resources/gofer/bash-scripts/verify-object-type-routing-workspace.sh +184 -0
  13. package/resources/gofer/claude-commands/eai-update.md +46 -0
  14. package/resources/gofer/claude-commands/eai.md +355 -0
  15. package/resources/gofer/claude-skills/eai/SKILL.md +365 -0
  16. package/resources/gofer/claude-skills/eai-update/SKILL.md +56 -0
  17. package/resources/gofer/claude-skills/gofer-documentation/SKILL.md +93 -0
  18. package/resources/gofer/commands/0_gofer_start.md +440 -99
  19. package/resources/gofer/commands/0a_problem_validation.md +187 -27
  20. package/resources/gofer/commands/10_gofer_cloud.md +183 -23
  21. package/resources/gofer/commands/1_gofer_research.md +239 -30
  22. package/resources/gofer/commands/2_gofer_specify.md +239 -35
  23. package/resources/gofer/commands/3_gofer_plan.md +259 -43
  24. package/resources/gofer/commands/4_gofer_tasks.md +401 -81
  25. package/resources/gofer/commands/5_gofer_implement.md +375 -84
  26. package/resources/gofer/commands/6_gofer_validate.md +284 -53
  27. package/resources/gofer/commands/7_gofer_save.md +187 -26
  28. package/resources/gofer/commands/7a_stakeholder_comms.md +183 -23
  29. package/resources/gofer/commands/8_gofer_branding.md +183 -23
  30. package/resources/gofer/commands/9_gofer_tests.md +212 -23
  31. package/resources/gofer/commands/gofer_bootstrap_workspace.md +121 -8
  32. package/resources/gofer/commands/gofer_check_workspace.md +123 -8
  33. package/resources/gofer/commands/gofer_constitution.md +183 -23
  34. package/resources/gofer/commands/gofer_diagnose.md +183 -23
  35. package/resources/gofer/commands/gofer_eai_first_run.md +254 -25
  36. package/resources/gofer/commands/gofer_hydrate.md +183 -23
  37. package/resources/gofer/commands/gofer_personality.md +117 -6
  38. package/resources/gofer/commands/gofer_plan.md +117 -6
  39. package/resources/gofer/commands/gofer_side.md +117 -6
  40. package/resources/gofer/commands/gofer_spec_summary.md +183 -23
  41. package/resources/gofer/commands/gofer_tdd.md +183 -23
  42. package/resources/gofer/commands/gofer_vocabulary.md +185 -25
  43. package/resources/gofer/commands/gofer_zoom_out.md +183 -23
  44. package/resources/gofer/config/typesafe-learning-review.json +16 -0
  45. package/resources/gofer/config/typesafe-semantic-review.json +9 -0
  46. package/resources/gofer/copilot-instructions/gofer-cost.instructions.md +15 -6
  47. package/resources/gofer/copilot-instructions/typescript.instructions.md +1 -1
  48. package/resources/gofer/copilot-prompts/eai-update.prompt.md +58 -0
  49. package/resources/gofer/copilot-prompts/eai.prompt.md +367 -0
  50. package/resources/gofer/gemini/commands/gofer/eai-update.md +22 -0
  51. package/resources/gofer/gemini/commands/gofer/eai-update.toml +2 -0
  52. package/resources/gofer/gemini/commands/gofer/eai.md +357 -0
  53. package/resources/gofer/gemini/commands/gofer/eai.toml +2 -0
  54. package/resources/gofer/gemini/commands/gofer/manifest.json +3 -27
  55. package/resources/gofer/gemini/extension.json +4 -4
  56. package/resources/gofer/github-agents/eai.agent.md +83 -0
  57. package/resources/gofer/github-agents/gofer-business.agent.md +73 -4
  58. package/resources/gofer/github-agents/gofer-implement.agent.md +71 -2
  59. package/resources/gofer/github-agents/gofer-plan.agent.md +72 -2
  60. package/resources/gofer/github-agents/gofer-research.agent.md +72 -2
  61. package/resources/gofer/github-agents/gofer-validate.agent.md +72 -2
  62. package/resources/gofer/github-skills/eai/SKILL.md +365 -0
  63. package/resources/gofer/github-skills/eai-update/SKILL.md +56 -0
  64. package/resources/gofer/github-skills/gofer-documentation/SKILL.md +93 -0
  65. package/resources/gofer/grok-skills/eai/SKILL.md +267 -14
  66. package/resources/gofer/grok-skills/eai-update/SKILL.md +56 -0
  67. package/resources/gofer/hook-scripts/user-prompt-submit.mjs +58 -13
  68. package/resources/gofer/instruction-templates/base/agents-base.md +8 -4
  69. package/resources/gofer/instruction-templates/gofer/gofer-claude.md +7 -5
  70. package/resources/gofer/instruction-templates/gofer/gofer-copilot.md +10 -8
  71. package/resources/gofer/memory/constitution.md +9 -7
  72. package/resources/gofer/memory/gofer-model-policy.yaml +23 -1
  73. package/resources/gofer/memory/lessons.md +0 -31
  74. package/resources/gofer/node-scripts/canonical-descriptions.mjs +1 -1
  75. package/resources/gofer/node-scripts/check-version-alignment.mjs +4 -7
  76. package/resources/gofer/node-scripts/delivery-lineage-corpus.mjs +156 -0
  77. package/resources/gofer/node-scripts/generate-commands.mjs +1073 -265
  78. package/resources/gofer/node-scripts/gofer-acceptance-check.mjs +143 -0
  79. package/resources/gofer/node-scripts/gofer-agent-catalog.mjs +271 -0
  80. package/resources/gofer/node-scripts/gofer-benchmark-executor.mjs +123 -0
  81. package/resources/gofer/node-scripts/gofer-benchmark-sign.mjs +62 -0
  82. package/resources/gofer/node-scripts/gofer-benchmark-signer.mjs +89 -0
  83. package/resources/gofer/node-scripts/gofer-benchmark.mjs +76 -0
  84. package/resources/gofer/node-scripts/gofer-blocker-control.mjs +274 -0
  85. package/resources/gofer/node-scripts/gofer-claude-adapter.mjs +154 -0
  86. package/resources/gofer/node-scripts/gofer-closed-loop-audit.mjs +19 -2
  87. package/resources/gofer/node-scripts/gofer-delivery-check.mjs +121 -0
  88. package/resources/gofer/node-scripts/gofer-encrypted-key.mjs +58 -0
  89. package/resources/gofer/node-scripts/gofer-execution-metrics.mjs +477 -0
  90. package/resources/gofer/node-scripts/gofer-execution-recovery.mjs +334 -0
  91. package/resources/gofer/node-scripts/gofer-grok-adapter.mjs +184 -0
  92. package/resources/gofer/node-scripts/gofer-heldout-corpus.mjs +73 -0
  93. package/resources/gofer/node-scripts/gofer-heldout-snapshot.mjs +286 -0
  94. package/resources/gofer/node-scripts/gofer-heldout-verifier.mjs +211 -0
  95. package/resources/gofer/node-scripts/gofer-host-capability.mjs +335 -0
  96. package/resources/gofer/node-scripts/gofer-independent-reviewer.mjs +130 -0
  97. package/resources/gofer/node-scripts/gofer-live-routing.mjs +109 -0
  98. package/resources/gofer/node-scripts/gofer-local-capability-issuer.mjs +71 -0
  99. package/resources/gofer/node-scripts/gofer-local-isolation.mjs +175 -0
  100. package/resources/gofer/node-scripts/gofer-local-settings-cleanup.mjs +388 -0
  101. package/resources/gofer/node-scripts/gofer-loop-audit.mjs +54 -3
  102. package/resources/gofer/node-scripts/gofer-native-adapter.mjs +567 -0
  103. package/resources/gofer/node-scripts/gofer-native-benchmark-dispatch.mjs +145 -0
  104. package/resources/gofer/node-scripts/gofer-native-runtime.mjs +169 -0
  105. package/resources/gofer/node-scripts/gofer-pre-edit-check.mjs +204 -0
  106. package/resources/gofer/node-scripts/gofer-priority-check.mjs +214 -0
  107. package/resources/gofer/node-scripts/gofer-response-check.mjs +56 -0
  108. package/resources/gofer/node-scripts/gofer-reviewed-learning.mjs +1232 -0
  109. package/resources/gofer/node-scripts/gofer-run-verified-task.mjs +330 -0
  110. package/resources/gofer/node-scripts/gofer-runtime-ledger.mjs +289 -0
  111. package/resources/gofer/node-scripts/gofer-semantic-drift.mjs +584 -0
  112. package/resources/gofer/node-scripts/gofer-surface-update.mjs +1178 -0
  113. package/resources/gofer/node-scripts/gofer-trust-bootstrap.mjs +77 -0
  114. package/resources/gofer/node-scripts/gofer-trusted-benchmark.mjs +102 -0
  115. package/resources/gofer/node-scripts/gofer-trusted-evaluator.mjs +274 -0
  116. package/resources/gofer/node-scripts/gofer-tty-prompt.mjs +34 -0
  117. package/resources/gofer/node-scripts/gofer-typesafe-credentials.mjs +435 -0
  118. package/resources/gofer/node-scripts/gofer-ui-preview.mjs +1212 -0
  119. package/resources/gofer/node-scripts/gofer-verified-execution.mjs +484 -0
  120. package/resources/gofer/node-scripts/gofer-verifier-key-ceremony.mjs +101 -0
  121. package/resources/gofer/node-scripts/gofer-worktree-layout.mjs +32 -0
  122. package/resources/gofer/node-scripts/object-type-routing-phase-bundle.mjs +360 -0
  123. package/resources/gofer/node-scripts/package-agent-plugin.mjs +574 -82
  124. package/resources/gofer/node-scripts/parse-stage-command.mjs +1 -1
  125. package/resources/gofer/node-scripts/render-delivery-lineage.mjs +178 -0
  126. package/resources/gofer/node-scripts/sync-extension-resources.mjs +78 -2
  127. package/resources/gofer/node-scripts/validate-object-type-identifiers.mjs +767 -0
  128. package/resources/gofer/node-scripts/validate-object-type-routing-workspace.mjs +1325 -0
  129. package/resources/gofer/node-scripts/validate-v4-resource-contract.d.mts +44 -0
  130. package/resources/gofer/node-scripts/validate-v4-resource-contract.mjs +957 -0
  131. package/resources/gofer/node-scripts/workspace-bootstrap-lib.mjs +685 -116
  132. package/resources/gofer/references/agent-catalog.json +126 -0
  133. package/resources/gofer/references/blocker-mediation.md +156 -0
  134. package/resources/gofer/references/business-updates-and-goal-checks.md +109 -0
  135. package/resources/gofer/references/delivery-lineage.md +48 -0
  136. package/resources/gofer/references/mvp-capability-validation.md +102 -0
  137. package/resources/gofer/references/platform/README.md +1 -1
  138. package/resources/gofer/references/platform/eai-app-template.md +15 -13
  139. package/resources/gofer/references/platform/eai-auth-access.md +104 -0
  140. package/resources/gofer/references/platform/eai-config-driven-ui.md +5 -5
  141. package/resources/gofer/references/platform/eai-error-catalog.yaml +77 -19
  142. package/resources/gofer/references/platform/eai-repo-contract.md +61 -23
  143. package/resources/gofer/references/platform/eai-service-patterns.md +102 -105
  144. package/resources/gofer/references/platform/eai.md +44 -8
  145. package/resources/gofer/references/platform/vertical-template.md +10 -9
  146. package/resources/gofer/references/priority-outcome-protection.md +152 -0
  147. package/resources/gofer/references/verified-agent-execution.md +179 -0
  148. package/resources/gofer/schemas/gofer-learning-trace-v1.json +70 -0
  149. package/resources/gofer/specify-commands/0_gofer_start.md +440 -99
  150. package/resources/gofer/specify-commands/0a_problem_validation.md +187 -27
  151. package/resources/gofer/specify-commands/10_gofer_cloud.md +183 -23
  152. package/resources/gofer/specify-commands/1_gofer_research.md +239 -30
  153. package/resources/gofer/specify-commands/2_gofer_specify.md +239 -35
  154. package/resources/gofer/specify-commands/3_gofer_plan.md +259 -43
  155. package/resources/gofer/specify-commands/4_gofer_tasks.md +401 -81
  156. package/resources/gofer/specify-commands/5_gofer_implement.md +375 -84
  157. package/resources/gofer/specify-commands/6_gofer_validate.md +284 -53
  158. package/resources/gofer/specify-commands/7_gofer_save.md +187 -26
  159. package/resources/gofer/specify-commands/7a_stakeholder_comms.md +183 -23
  160. package/resources/gofer/specify-commands/8_gofer_branding.md +183 -23
  161. package/resources/gofer/specify-commands/9_gofer_tests.md +212 -23
  162. package/resources/gofer/specify-commands/gofer_bootstrap_workspace.md +121 -8
  163. package/resources/gofer/specify-commands/gofer_check_workspace.md +123 -8
  164. package/resources/gofer/specify-commands/gofer_constitution.md +183 -23
  165. package/resources/gofer/specify-commands/gofer_diagnose.md +183 -23
  166. package/resources/gofer/specify-commands/gofer_eai_first_run.md +254 -25
  167. package/resources/gofer/specify-commands/gofer_hydrate.md +183 -23
  168. package/resources/gofer/specify-commands/gofer_personality.md +117 -6
  169. package/resources/gofer/specify-commands/gofer_plan.md +117 -6
  170. package/resources/gofer/specify-commands/gofer_side.md +117 -6
  171. package/resources/gofer/specify-commands/gofer_spec_summary.md +183 -23
  172. package/resources/gofer/specify-commands/gofer_tdd.md +183 -23
  173. package/resources/gofer/specify-commands/gofer_vocabulary.md +185 -25
  174. package/resources/gofer/specify-commands/gofer_zoom_out.md +183 -23
  175. package/resources/gofer/specify-config/object-type-routing.json +24 -0
  176. package/resources/gofer/specify-config/typesafe-learning-review.json +16 -0
  177. package/resources/gofer/specify-config/typesafe-semantic-review.json +9 -0
  178. package/resources/gofer/system-skills/eai/SKILL.md +365 -0
  179. package/resources/gofer/system-skills/eai-update/SKILL.md +56 -0
  180. package/resources/gofer/system-skills/gofer-documentation/SKILL.md +93 -0
  181. package/resources/gofer/templates/build-map-template.md +64 -0
  182. package/resources/gofer/templates/business-scenarios-template.json +14 -0
  183. package/resources/gofer/templates/ciso-security-summary-template.md +3 -3
  184. package/resources/gofer/templates/context-bundle-template.md +4 -3
  185. package/resources/gofer/templates/contract-pack-template.md +8 -8
  186. package/resources/gofer/templates/cto-architecture-summary-template.md +3 -3
  187. package/resources/gofer/templates/delivery-lineage-template.json +8 -0
  188. package/resources/gofer/templates/eai-preflight-template.md +109 -68
  189. package/resources/gofer/templates/goal-ledger-template.json +1 -1
  190. package/resources/gofer/templates/gofer-model-policy.yaml +28 -6
  191. package/resources/gofer/templates/loop-contract-template.json +3 -1
  192. package/resources/gofer/templates/plan-template.md +8 -7
  193. package/resources/gofer/templates/priority-plan-template.json +29 -0
  194. package/resources/gofer/templates/proposal-review-template.md +6 -3
  195. package/resources/gofer/templates/release-capability-ledger-template.md +24 -0
  196. package/resources/gofer/templates/research-template.md +7 -6
  197. package/resources/gofer/templates/spec-summary-template.md +1 -1
  198. package/resources/gofer/templates/spec-template.md +45 -6
  199. package/resources/gofer/templates/tasks-template.md +12 -3
  200. package/resources/gofer/templates/ui-preview-brief-template.md +55 -5
  201. package/resources/gofer/templates/ui-review-log-template.md +21 -3
  202. package/resources/gofer/templates/ui-show-and-tell-template.md +46 -0
  203. package/resources/gofer/templates/visuals/capability-heatmap-template.md +2 -2
  204. package/resources/gofer/templates/working-backwards-prfaq-template.md +9 -8
  205. package/resources/linked-sources.json +4 -4
  206. package/resources/gofer/agents-skills/0_gofer_start/SKILL.md +0 -1287
  207. package/resources/gofer/agents-skills/0a_problem_validation/SKILL.md +0 -429
  208. package/resources/gofer/agents-skills/10_gofer_cloud/SKILL.md +0 -635
  209. package/resources/gofer/agents-skills/1_gofer_research/SKILL.md +0 -1159
  210. package/resources/gofer/agents-skills/2_gofer_specify/SKILL.md +0 -860
  211. package/resources/gofer/agents-skills/3_gofer_plan/SKILL.md +0 -899
  212. package/resources/gofer/agents-skills/4_gofer_tasks/SKILL.md +0 -760
  213. package/resources/gofer/agents-skills/5_gofer_implement/SKILL.md +0 -944
  214. package/resources/gofer/agents-skills/6_gofer_validate/SKILL.md +0 -2302
  215. package/resources/gofer/agents-skills/7_gofer_save/SKILL.md +0 -423
  216. package/resources/gofer/agents-skills/7a_stakeholder_comms/SKILL.md +0 -508
  217. package/resources/gofer/agents-skills/8_gofer_branding/SKILL.md +0 -315
  218. package/resources/gofer/agents-skills/9_gofer_tests/SKILL.md +0 -558
  219. package/resources/gofer/agents-skills/gofer_bootstrap_workspace/SKILL.md +0 -148
  220. package/resources/gofer/agents-skills/gofer_check_workspace/SKILL.md +0 -119
  221. package/resources/gofer/agents-skills/gofer_constitution/SKILL.md +0 -612
  222. package/resources/gofer/agents-skills/gofer_diagnose/SKILL.md +0 -114
  223. package/resources/gofer/agents-skills/gofer_eai_first_run/SKILL.md +0 -397
  224. package/resources/gofer/agents-skills/gofer_hydrate/SKILL.md +0 -561
  225. package/resources/gofer/agents-skills/gofer_personality/SKILL.md +0 -44
  226. package/resources/gofer/agents-skills/gofer_plan/SKILL.md +0 -40
  227. package/resources/gofer/agents-skills/gofer_side/SKILL.md +0 -45
  228. package/resources/gofer/agents-skills/gofer_spec_summary/SKILL.md +0 -112
  229. package/resources/gofer/agents-skills/gofer_tdd/SKILL.md +0 -112
  230. package/resources/gofer/agents-skills/gofer_vocabulary/SKILL.md +0 -112
  231. package/resources/gofer/agents-skills/gofer_zoom_out/SKILL.md +0 -112
  232. package/resources/gofer/claude-commands/0_gofer_start.md +0 -1282
  233. package/resources/gofer/claude-commands/0a_problem_validation.md +0 -424
  234. package/resources/gofer/claude-commands/10_gofer_cloud.md +0 -630
  235. package/resources/gofer/claude-commands/1_gofer_research.md +0 -1154
  236. package/resources/gofer/claude-commands/2_gofer_specify.md +0 -855
  237. package/resources/gofer/claude-commands/3_gofer_plan.md +0 -894
  238. package/resources/gofer/claude-commands/4_gofer_tasks.md +0 -755
  239. package/resources/gofer/claude-commands/5_gofer_implement.md +0 -939
  240. package/resources/gofer/claude-commands/6_gofer_validate.md +0 -2297
  241. package/resources/gofer/claude-commands/7_gofer_save.md +0 -418
  242. package/resources/gofer/claude-commands/7a_stakeholder_comms.md +0 -503
  243. package/resources/gofer/claude-commands/8_gofer_branding.md +0 -310
  244. package/resources/gofer/claude-commands/9_gofer_tests.md +0 -553
  245. package/resources/gofer/claude-commands/gofer_bootstrap_workspace.md +0 -143
  246. package/resources/gofer/claude-commands/gofer_check_workspace.md +0 -114
  247. package/resources/gofer/claude-commands/gofer_constitution.md +0 -607
  248. package/resources/gofer/claude-commands/gofer_diagnose.md +0 -109
  249. package/resources/gofer/claude-commands/gofer_eai_first_run.md +0 -392
  250. package/resources/gofer/claude-commands/gofer_hydrate.md +0 -556
  251. package/resources/gofer/claude-commands/gofer_personality.md +0 -39
  252. package/resources/gofer/claude-commands/gofer_plan.md +0 -35
  253. package/resources/gofer/claude-commands/gofer_side.md +0 -40
  254. package/resources/gofer/claude-commands/gofer_spec_summary.md +0 -107
  255. package/resources/gofer/claude-commands/gofer_tdd.md +0 -107
  256. package/resources/gofer/claude-commands/gofer_vocabulary.md +0 -107
  257. package/resources/gofer/claude-commands/gofer_zoom_out.md +0 -107
  258. package/resources/gofer/claude-skills/eai-gofer/SKILL.md +0 -56
  259. package/resources/gofer/copilot-prompts/0_gofer_start.prompt.md +0 -1308
  260. package/resources/gofer/copilot-prompts/0a_problem_validation.prompt.md +0 -429
  261. package/resources/gofer/copilot-prompts/10_gofer_cloud.prompt.md +0 -644
  262. package/resources/gofer/copilot-prompts/1_gofer_research.prompt.md +0 -1177
  263. package/resources/gofer/copilot-prompts/2_gofer_specify.prompt.md +0 -878
  264. package/resources/gofer/copilot-prompts/3_gofer_plan.prompt.md +0 -917
  265. package/resources/gofer/copilot-prompts/4_gofer_tasks.prompt.md +0 -778
  266. package/resources/gofer/copilot-prompts/5_gofer_implement.prompt.md +0 -962
  267. package/resources/gofer/copilot-prompts/6_gofer_validate.prompt.md +0 -2310
  268. package/resources/gofer/copilot-prompts/7_gofer_save.prompt.md +0 -433
  269. package/resources/gofer/copilot-prompts/7a_stakeholder_comms.prompt.md +0 -516
  270. package/resources/gofer/copilot-prompts/8_gofer_branding.prompt.md +0 -323
  271. package/resources/gofer/copilot-prompts/9_gofer_tests.prompt.md +0 -566
  272. package/resources/gofer/copilot-prompts/gofer_bootstrap_workspace.prompt.md +0 -161
  273. package/resources/gofer/copilot-prompts/gofer_check_workspace.prompt.md +0 -132
  274. package/resources/gofer/copilot-prompts/gofer_constitution.prompt.md +0 -621
  275. package/resources/gofer/copilot-prompts/gofer_diagnose.prompt.md +0 -127
  276. package/resources/gofer/copilot-prompts/gofer_eai_first_run.prompt.md +0 -410
  277. package/resources/gofer/copilot-prompts/gofer_hydrate.prompt.md +0 -571
  278. package/resources/gofer/copilot-prompts/gofer_personality.prompt.md +0 -57
  279. package/resources/gofer/copilot-prompts/gofer_plan.prompt.md +0 -53
  280. package/resources/gofer/copilot-prompts/gofer_side.prompt.md +0 -58
  281. package/resources/gofer/copilot-prompts/gofer_spec_summary.prompt.md +0 -125
  282. package/resources/gofer/copilot-prompts/gofer_tdd.prompt.md +0 -125
  283. package/resources/gofer/copilot-prompts/gofer_vocabulary.prompt.md +0 -125
  284. package/resources/gofer/copilot-prompts/gofer_zoom_out.prompt.md +0 -125
  285. package/resources/gofer/gemini/commands/gofer/0_gofer_start.md +0 -1282
  286. package/resources/gofer/gemini/commands/gofer/0_gofer_start.toml +0 -2
  287. package/resources/gofer/gemini/commands/gofer/0a_problem_validation.md +0 -424
  288. package/resources/gofer/gemini/commands/gofer/0a_problem_validation.toml +0 -2
  289. package/resources/gofer/gemini/commands/gofer/10_gofer_cloud.md +0 -630
  290. package/resources/gofer/gemini/commands/gofer/10_gofer_cloud.toml +0 -2
  291. package/resources/gofer/gemini/commands/gofer/1_gofer_research.md +0 -1154
  292. package/resources/gofer/gemini/commands/gofer/1_gofer_research.toml +0 -2
  293. package/resources/gofer/gemini/commands/gofer/2_gofer_specify.md +0 -855
  294. package/resources/gofer/gemini/commands/gofer/2_gofer_specify.toml +0 -2
  295. package/resources/gofer/gemini/commands/gofer/3_gofer_plan.md +0 -894
  296. package/resources/gofer/gemini/commands/gofer/3_gofer_plan.toml +0 -2
  297. package/resources/gofer/gemini/commands/gofer/4_gofer_tasks.md +0 -755
  298. package/resources/gofer/gemini/commands/gofer/4_gofer_tasks.toml +0 -2
  299. package/resources/gofer/gemini/commands/gofer/5_gofer_implement.md +0 -939
  300. package/resources/gofer/gemini/commands/gofer/5_gofer_implement.toml +0 -2
  301. package/resources/gofer/gemini/commands/gofer/6_gofer_validate.md +0 -2297
  302. package/resources/gofer/gemini/commands/gofer/6_gofer_validate.toml +0 -2
  303. package/resources/gofer/gemini/commands/gofer/7_gofer_save.md +0 -418
  304. package/resources/gofer/gemini/commands/gofer/7_gofer_save.toml +0 -2
  305. package/resources/gofer/gemini/commands/gofer/7a_stakeholder_comms.md +0 -503
  306. package/resources/gofer/gemini/commands/gofer/7a_stakeholder_comms.toml +0 -2
  307. package/resources/gofer/gemini/commands/gofer/8_gofer_branding.md +0 -310
  308. package/resources/gofer/gemini/commands/gofer/8_gofer_branding.toml +0 -2
  309. package/resources/gofer/gemini/commands/gofer/9_gofer_tests.md +0 -553
  310. package/resources/gofer/gemini/commands/gofer/9_gofer_tests.toml +0 -2
  311. package/resources/gofer/gemini/commands/gofer/gofer_bootstrap_workspace.md +0 -143
  312. package/resources/gofer/gemini/commands/gofer/gofer_bootstrap_workspace.toml +0 -2
  313. package/resources/gofer/gemini/commands/gofer/gofer_check_workspace.md +0 -114
  314. package/resources/gofer/gemini/commands/gofer/gofer_check_workspace.toml +0 -2
  315. package/resources/gofer/gemini/commands/gofer/gofer_constitution.md +0 -607
  316. package/resources/gofer/gemini/commands/gofer/gofer_constitution.toml +0 -2
  317. package/resources/gofer/gemini/commands/gofer/gofer_diagnose.md +0 -109
  318. package/resources/gofer/gemini/commands/gofer/gofer_diagnose.toml +0 -2
  319. package/resources/gofer/gemini/commands/gofer/gofer_eai_first_run.md +0 -392
  320. package/resources/gofer/gemini/commands/gofer/gofer_eai_first_run.toml +0 -2
  321. package/resources/gofer/gemini/commands/gofer/gofer_hydrate.md +0 -556
  322. package/resources/gofer/gemini/commands/gofer/gofer_hydrate.toml +0 -2
  323. package/resources/gofer/gemini/commands/gofer/gofer_personality.md +0 -39
  324. package/resources/gofer/gemini/commands/gofer/gofer_personality.toml +0 -2
  325. package/resources/gofer/gemini/commands/gofer/gofer_plan.md +0 -35
  326. package/resources/gofer/gemini/commands/gofer/gofer_plan.toml +0 -2
  327. package/resources/gofer/gemini/commands/gofer/gofer_side.md +0 -40
  328. package/resources/gofer/gemini/commands/gofer/gofer_side.toml +0 -2
  329. package/resources/gofer/gemini/commands/gofer/gofer_spec_summary.md +0 -107
  330. package/resources/gofer/gemini/commands/gofer/gofer_spec_summary.toml +0 -2
  331. package/resources/gofer/gemini/commands/gofer/gofer_tdd.md +0 -107
  332. package/resources/gofer/gemini/commands/gofer/gofer_tdd.toml +0 -2
  333. package/resources/gofer/gemini/commands/gofer/gofer_vocabulary.md +0 -107
  334. package/resources/gofer/gemini/commands/gofer/gofer_vocabulary.toml +0 -2
  335. package/resources/gofer/gemini/commands/gofer/gofer_zoom_out.md +0 -107
  336. package/resources/gofer/gemini/commands/gofer/gofer_zoom_out.toml +0 -2
  337. package/resources/gofer/github-skills/eai-gofer/SKILL.md +0 -56
  338. package/resources/gofer/system-skills/0_gofer_start/SKILL.md +0 -1287
  339. package/resources/gofer/system-skills/0a_problem_validation/SKILL.md +0 -429
  340. package/resources/gofer/system-skills/10_gofer_cloud/SKILL.md +0 -635
  341. package/resources/gofer/system-skills/1_gofer_research/SKILL.md +0 -1159
  342. package/resources/gofer/system-skills/2_gofer_specify/SKILL.md +0 -860
  343. package/resources/gofer/system-skills/3_gofer_plan/SKILL.md +0 -899
  344. package/resources/gofer/system-skills/4_gofer_tasks/SKILL.md +0 -760
  345. package/resources/gofer/system-skills/5_gofer_implement/SKILL.md +0 -944
  346. package/resources/gofer/system-skills/6_gofer_validate/SKILL.md +0 -2302
  347. package/resources/gofer/system-skills/7_gofer_save/SKILL.md +0 -423
  348. package/resources/gofer/system-skills/7a_stakeholder_comms/SKILL.md +0 -508
  349. package/resources/gofer/system-skills/8_gofer_branding/SKILL.md +0 -315
  350. package/resources/gofer/system-skills/9_gofer_tests/SKILL.md +0 -558
  351. package/resources/gofer/system-skills/gofer_bootstrap_workspace/SKILL.md +0 -148
  352. package/resources/gofer/system-skills/gofer_check_workspace/SKILL.md +0 -119
  353. package/resources/gofer/system-skills/gofer_constitution/SKILL.md +0 -612
  354. package/resources/gofer/system-skills/gofer_diagnose/SKILL.md +0 -114
  355. package/resources/gofer/system-skills/gofer_eai_first_run/SKILL.md +0 -397
  356. package/resources/gofer/system-skills/gofer_hydrate/SKILL.md +0 -561
  357. package/resources/gofer/system-skills/gofer_personality/SKILL.md +0 -44
  358. package/resources/gofer/system-skills/gofer_plan/SKILL.md +0 -40
  359. package/resources/gofer/system-skills/gofer_side/SKILL.md +0 -45
  360. package/resources/gofer/system-skills/gofer_spec_summary/SKILL.md +0 -112
  361. package/resources/gofer/system-skills/gofer_tdd/SKILL.md +0 -112
  362. package/resources/gofer/system-skills/gofer_vocabulary/SKILL.md +0 -112
  363. package/resources/gofer/system-skills/gofer_zoom_out/SKILL.md +0 -112
  364. package/resources/gofer/templates/ui-approval-template.md +0 -32
@@ -1,2297 +0,0 @@
1
- ## Workspace Preflight
2
-
3
- Before doing stage/helper work:
4
-
5
- 1. Resolve the repository root.
6
- 2. Check the core Gofer sentinels:
7
- - `.specify/.gofer-version`
8
- - `.specify/commands/0_gofer_start.md`
9
- - `.specify/templates/spec-template.md`
10
- - `.specify/templates/loop-contract-template.json`
11
- - `.specify/templates/working-backwards-prfaq-template.md`
12
- - `.specify/templates/business-owner-summary-template.md`
13
- - `.specify/templates/cto-architecture-summary-template.md`
14
- - `.specify/templates/ciso-security-summary-template.md`
15
- - `.specify/templates/stakeholder-review-index-template.md`
16
- - `.specify/scripts/bash/create-new-feature.sh`
17
- - `.specify/scripts/node/parse-stage-command.mjs`
18
- - `.specify/scripts/node/gofer-loop-audit.mjs`
19
- - `.specify/scripts/hooks/post-tool-use.mjs`
20
- - `.specify/scripts/powershell/install-optional-tools.ps1`
21
- - `.specify/templates/gofer-model-policy.yaml`
22
- - `.specify/memory/gofer-model-policy.yaml`
23
- - `.specify/specs/`
24
- - `.specify/memory/`
25
- 3. Check host-specific repo-owned files when relevant:
26
- - Claude: `AGENTS.md`, `CLAUDE.md`, `.claude/settings.json`
27
- - Codex: `AGENTS.md`
28
- - Copilot: `.github/copilot-instructions.md`
29
- - VS Code extension mirrors Claude/Copilot/Gemini resources itself and should still keep the core scaffold healthy
30
- 4. If the repo already has the workspace checker script, prefer running:
31
- - `node .specify/scripts/node/gofer-workspace-check.mjs --host claude --json`
32
- 5. If the workspace is missing or stale, ask exactly:
33
- - **"This repo is missing or stale for Gofer. Initialize/update it now?"**
34
- 6. If the user says yes, run the Gofer workspace bootstrap helper and then resume this command from the top.
35
- 7. If the user says no, stop and explain that Gofer stage/helper work depends on the repo-owned scaffold.
36
-
37
- ---
38
- description:
39
- Unified validation, blast-radius analysis, and engineering review (3 phases,
40
- 110-point rubric)
41
- ---
42
-
43
- # Gofer Validate
44
-
45
- ## EAI Platform Session Preflight
46
-
47
- Before any Gofer stage/helper command does pipeline work:
48
-
49
- 1. Treat durable delivery as EAI Platform delivery by default, with Azure second
50
- and every other stack only by explicit exception.
51
- 2. Run `eai whoami` and confirm the EAI CLI is installed, the user is logged in,
52
- and an active workspace is visible.
53
- 3. If `eai` is missing, `eai whoami` fails, the token is expired, or no active
54
- workspace is available, stop and run `/gofer:eai-first-run` or ask the user to
55
- approve login/setup before continuing.
56
- 4. For EAI app delivery, do not continue into research, specification, planning,
57
- tasks, implementation, or validation until
58
- `.specify/specs/{feature}/eai-preflight.md` records login, workspace, template,
59
- app-readiness, and next-action evidence.
60
- 5. Do not write tokens, secrets, private workspace IDs, Entra/CIAM authority tenant IDs, or local `.env` values into
61
- Gofer artifacts; record only product-safe readiness status and evidence.
62
-
63
- ## Token And Cost Policy
64
- <!-- gofer:token-cost-policy:start -->
65
-
66
- Before spawning agents, calling tools, or loading large files:
67
-
68
- 1. Treat `.specify/memory/gofer-model-policy.yaml` as the repo-owned source of truth for simple, medium, hard, and arbiter model routing. If it is missing, run `/gofer:bootstrap-workspace` before continuing.
69
- 2. Use the cheapest capable model first.
70
- - Claude: Haiku for scouting/extraction; Sonnet for normal implementation, synthesis, validation, and security; Opus for high-risk arbitration or release-critical failures.
71
- - Codex/OpenAI: GPT mini for simple coding; GPT nano only for locate/classify/summarize/mechanical work; GPT-5.3-Codex or flagship GPT for tool-heavy coding, architecture, and release-critical validation.
72
- - Gemini: Flash-Lite for cheap large-context scan/summarize; Flash for default research synthesis; Pro for large-context architecture or high-risk arbitration.
73
- - Copilot: prefer Auto for simple and default work; ask the user before choosing a paid/high-tier picker model for hard security, architecture, or release gates.
74
- 3. Keep raw tool output out of the main conversation context. Save stable findings to `.specify/specs/{feature}/context-bundle.md`, then work from summaries.
75
- 4. Use provider prompt/context caching only for stable, non-secret prefixes: Gofer scaffold, AGENTS/CLAUDE/Copilot instructions, constitution, repo map, stage contracts, and validation rubric.
76
- 5. Before continuing after large research, planning, implementation, or validation bursts, checkpoint the durable artifacts and compact/clear/resume context when the host supports it.
77
- 6. Escalate model tier only when a cheaper pass is low-confidence, contradictory, security-sensitive, or blocking release quality.
78
- <!-- gofer:token-cost-policy:end -->
79
-
80
- ## User Input
81
-
82
- ```text
83
- $ARGUMENTS
84
- ```
85
-
86
- You **MUST** consider the user input before proceeding (if not empty).
87
-
88
- ## Execution Profile And Validation Cost
89
-
90
- Validation must respect the final risk label:
91
-
92
- - **fast**: for `docs-only` or very small low-risk changes, run focused checks
93
- and verify no unnecessary artifact churn or unrelated files were changed.
94
- - **standard**: run the normal rubric, focused build/test/lint/typecheck
95
- evidence, and traceability checks.
96
- - **full**: preserve the existing blast-radius, evidence gates, review loop,
97
- scoring, and release-readiness checks; require evidence for contract,
98
- security, data, infra/config, rollback, and cross-repository claims.
99
- - **dynamic**: preserve the full validation behavior, then also verify
100
- `execution-profile.md`, `workflow-dag.md`, shard outputs, reducer synthesis,
101
- verifier/refuter evidence, budget/stop-condition evidence, and any explicit
102
- user confirmation required before broad fanout work.
103
-
104
- Archived specs under `.specify/specs/_*/` are historical context and must not
105
- inflate active context-health estimates or current blast-radius manifests.
106
-
107
- ## Prerequisites
108
-
109
- This command expects in `.specify/specs/{feature}/`:
110
-
111
- - `research.md` - Codebase analysis (from /1_gofer_research)
112
- - `spec.md` - Feature specification (from /2_gofer_specify)
113
- - `plan.md` - Implementation plan (from /3_gofer_plan)
114
- - `tasks.md` - Task breakdown (from /4_gofer_tasks)
115
- - `goal-ledger.json` - Goal, metric, delivery-state, and re-loop contract
116
- - `loop-contract.json` - Bounded eval commands and stop rules
117
- - `loop-ledger.jsonl` - Implementation and validation loop evidence
118
- - `traceability.md` - Requirement -> task -> code -> test matrix
119
- - Implemented code (from /5_gofer_implement)
120
-
121
- ---
122
-
123
- ## Spec Artifact Guard
124
-
125
- Before validation, `.specify/scripts/bash/check-prerequisites.sh --json
126
- --require-tasks` must confirm that `{FEATURE_DIR}/spec.md` exists, is
127
- non-empty, and is not the unfilled spec template. If the helper reports
128
- `spec.md` as missing, empty, or `template`, stop and run `/2_gofer_specify`.
129
- Validation cannot score functional correctness, traceability, or objective
130
- outcomes without a real specification.
131
-
132
- ## Outline
133
-
134
- 1. Context health check
135
- 2. Load implementation context
136
- 3. Closed-loop objective audit
137
- 4. **Phase A** — Spawn 6 specialist rubric validation agents in parallel
138
- 4. Evidence gate pre-check and pending-gate tracking
139
- 5. **Phase B** — Spawn 5 blast-radius analysis agents in parallel
140
- 7. Blast-radius synthesis (change graph, interface diff, observability,
141
- dependency/submodule impact, rollback readiness, release checklist)
142
- 8. Run automated checks (build, test, lint, typecheck)
143
- 9. Mutation testing gate
144
- 10. Mock ratio analysis
145
- 11. Semantic slop detection
146
- 12. Score the 11-category rubric (110 points)
147
- 13. Generate enhanced validation report + blast-radius report
148
- 14. Determine rubric PASS/FAIL outcome
149
- 15. Brownfield restart on failure
150
- 16. **Phase C** — Engineering review loop (3 agents × up to 5 cycles with
151
- auto-fix)
152
- 17. Generate engineering review report
153
- 18. Attribution logging to JSONL
154
- 19. Memory update check
155
-
156
- ---
157
-
158
- ## Execution Strategy by Platform
159
-
160
- | Platform | Validation Execution Strategy |
161
- | -------------------------------------- | --------------------------------------------------------------------------------------------- |
162
- | Claude Code CLI | Run all validation agents in parallel using the Task tool |
163
- | GitHub Copilot Chat (2026+) | Use multi-agent delegation to run validation in parallel |
164
- | GitHub Copilot Chat (2025 and earlier) | Run validation checks sequentially using the **Legacy Workflow** in `docs/legacy-workflow.md` |
165
-
166
- For pre-2026 Copilot environments, execute the validation phases
167
- **sequentially** instead of parallel spawning.
168
-
169
- ---
170
-
171
- ## The Engineering Quality Rubric
172
-
173
- ### 11-Category Scoring (110 Points)
174
-
175
- | # | Category | Points | Pass Criteria | Agent |
176
- | --- | ---------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
177
- | 1 | Functional Correctness | 15 | Every acceptance criterion in spec.md has a passing test exercising real code | validation-correctness |
178
- | 2 | Test Authenticity | 15 | Zero skips, zero placeholders, zero mock-only assertions. Mutation score >= 60% if Stryker available | validation-test-quality |
179
- | 3 | UI/E2E Verification | 10 | If feature has UI: real rendering tests pass. If no UI: points redistribute | N/A (automated check) |
180
- | 4 | Security Posture | 10 | Zero hardcoded secrets, no disabled security features, no client-side keys | validation-security |
181
- | 5 | Integration Reality | 10 | Integration tests use real dependencies where possible. Contract tests validate boundaries | validation-integration |
182
- | 6 | Error Path Coverage | 10 | Public functions tested for failure modes. No empty catch blocks | validation-correctness + validation-standards |
183
- | 7 | Architecture Compliance | 10 | File structure, patterns, visual explanations, and human-facing document summaries match plan.md and research.md. Required visuals are simple, rendered or fallback-safe, and traceable to requirements, code, and EAI Platform decisions | validation-standards |
184
- | 8 | Performance Baseline | 5 | No synchronous I/O in async paths, no unbounded loops, no N+1 patterns | validation-performance |
185
- | 9 | Code Hygiene | 10 | Zero AI slop: no TODO placeholders, no redundant comments, no magic numbers | validation-standards |
186
- | 10 | Specification Traceability | 5 | Every user story maps to tests, every test maps to code | validation-correctness |
187
- | 11 | **Blast Radius Containment** | 10 | No unmitigated breaking API changes, full-surface consumer/import audit, new error paths log, no new High/Critical CVEs, rollback/feature-flag path exists, release checklist complete | codebase-analyzer + validation-integration + validation-standards + research-dependency-evaluator + tasks-rollback-planner |
188
-
189
- ### Point Redistribution (No-UI Features)
190
-
191
- When a feature has **no UI component** (no web pages, no frontend, no visual
192
- interface), the 10 points from UI/E2E Verification are redistributed:
193
-
194
- - **+5 to Functional Correctness** (total: 20 points)
195
- - **+5 to Test Authenticity** (total: 20 points)
196
-
197
- Total remains **110/110** across all 11 categories.
198
-
199
- **Detection**: Check plan.md tech stack. If no UI framework (React, Vue,
200
- Angular, Svelte) and no Playwright/Cypress tests exist, this is a no-UI feature.
201
-
202
- ### Scoring Rules
203
-
204
- - Each category scores **full points** or **0**. There is no partial credit.
205
- - A category scores 0 if its agent reports any **Red (blocking)** finding.
206
- - A category scores 0 if its automated check fails.
207
- - **Total score** = sum of all category scores (max **110**, was 100).
208
- - **PASS** = 110/110 and a passing objective outcome gate. Anything less = FAIL.
209
- - Legacy consumers reading `status: PASS` / `score: 100` from historical reports
210
- should migrate to the 110-point scale. The report keeps the `score` field as
211
- the numerator and `score_max` to disambiguate.
212
-
213
- **Honest-scoring rule (FR-012)**: If an agent reports `EVIDENCE ABSENT:`, the
214
- orchestrating stage MUST score that category 0 regardless of other findings.
215
- Phrases like `likely correct`, `appears wired`, or `should be passing` are NOT
216
- evidence and MUST NOT contribute to any score. Any rubric category where
217
- evidence is absent, unverifiable, fabricated, or implied scores exactly 0 — no
218
- partial credit.
219
-
220
- ---
221
-
222
- ## Step 0: Context Health Check
223
-
224
- Before starting validation, assess context window health:
225
-
226
- ```bash
227
- .specify/scripts/bash/check-context-health.sh
228
- ```
229
-
230
- - If **< 50%**: Proceed normally
231
- - If **50-70%**: Use sub-agents heavily, minimize main context
232
- - If **> 70%**: Run `/7_gofer_save`, start a fresh session, read the
233
- checkpoint, and continue validation
234
-
235
- Validation loads all artifacts and spawns 6 agents — context pressure is high.
236
-
237
- ---
238
-
239
- ## Step 1: Load Context
240
-
241
- 1. **Run setup script**:
242
-
243
- ```bash
244
- .specify/scripts/bash/check-prerequisites.sh --json --require-tasks
245
- ```
246
-
247
- Parse JSON for FEATURE_DIR
248
-
249
- 2. **Load all artifacts**:
250
- - spec.md (user stories, acceptance criteria)
251
- - plan.md (architecture, file structure, tech stack)
252
- - tasks.md (task completion status)
253
- - goal-ledger.json (goal IDs, metrics, delivery states, re-loop triggers)
254
- - loop-contract.json (loop objective, eval commands, max iterations, stop conditions)
255
- - loop-ledger.jsonl (implementation and validation loop evidence)
256
- - traceability.md (requirement-to-code/test evidence matrix)
257
- - research.md (codebase patterns to follow)
258
-
259
- 3. **Detect iteration count**:
260
- - Check if `{FEATURE_DIR}/remediation-report.md` exists
261
- - If yes, read the iteration count from it
262
- - Track: `ITERATION = [1|2|3]` (first run = 1)
263
-
264
- 4. **Determine UI presence**:
265
- - Read plan.md tech stack
266
- - If UI framework present AND Playwright/Cypress tests exist: `HAS_UI = true`
267
- - Otherwise: `HAS_UI = false` → apply point redistribution
268
-
269
- **Deployment/Render Scope Detection** (FR-011):
270
-
271
- Scan `spec.md`, `plan.md`, `contract-pack.md`, and `quickstart.md` (when
272
- present) for the following signals:
273
-
274
- - `DEPLOY_SIGNAL_1`: any acceptance criterion contains: `rendered`,
275
- `live route`, `live API`, `deployed`, `production`, `staging`,
276
- `SharePoint`, `Azure`, `smoke`, `E2E`, `browser`
277
- - `DEPLOY_SIGNAL_2`: `plan.md`, `contract-pack.md`, or `quickstart.md`
278
- names a deployment target: SharePoint, Azure, staging, production, Vercel,
279
- Netlify, Docker, Kubernetes, or any server/environment referenced in the
280
- acceptance chain
281
- - `DEPLOY_SIGNAL_3`: `plan.md` declares a UI/rendered experience AND at least
282
- one acceptance criterion uses: `sees`, `displays`, `shows`, `renders`,
283
- `navigates to`
284
-
285
- Set `DEPLOY_IN_SCOPE = true` if ANY signal is present.
286
- Set `DEPLOY_IN_SCOPE = false` if NO signal is present.
287
- Record the determination in the validation report preamble.
288
-
289
- ## Managed-Source Readiness Gate
290
-
291
- Before rubric scoring or declaring selected EAI-maintained source ready, verify
292
- `eai deploy source validate --help` and check the current app:
293
-
294
- ```bash
295
- node .specify/scripts/node/eai-app-template-readiness.mjs --root . --source eai-managed --json
296
- ```
297
-
298
- Add `--cli <executable>` for the app's explicitly selected CLI. Require
299
- `ready: true` and `sourceValidation.status: passed`; missing, malformed, or failed
300
- validation blocks managed-source readiness. Include all customer-authored app
301
- files, including runners, tests, backend code, scripts, documentation, and
302
- supported dot configuration. Preserve protected EAI authentication,
303
- platform-service, deployment, and workflow controls. Unsupported custom runtimes
304
- must fail explicitly. Do not omit business changes or customer app files,
305
- restore files automatically, or weaken protected controls. Recheck after source
306
- changes. This gate is read-only and cannot prove deployment success. Do not
307
- apply it to local-only or customer-owned source.
308
-
309
- ## Step 1.5: Closed-Loop Objective And Loop Evidence Audit
310
-
311
- Before rubric scoring, run the closed-loop audit and write a fresh rebaseline
312
- report:
313
-
314
- ```bash
315
- node .specify/scripts/node/gofer-closed-loop-audit.mjs --feature-dir {FEATURE_DIR} --json --strict
316
- ```
317
-
318
- Also write/update `{FEATURE_DIR}/goal-rebaseline-report.md`.
319
-
320
- Then run the bounded loop audit:
321
-
322
- ```bash
323
- node .specify/scripts/node/gofer-loop-audit.mjs --feature-dir {FEATURE_DIR} --stage 6_validate --json --strict
324
- ```
325
-
326
- This writes/updates `{FEATURE_DIR}/loop-audit-report.md`.
327
-
328
- Validation MUST treat the closed-loop and loop audits as objective gates:
329
-
330
- - If the audit reports missing goal coverage, missing code/test evidence,
331
- expired assumptions, or invalid goal-ledger structure, validation FAILS.
332
- - If the loop audit reports a missing/invalid loop contract, missing
333
- `loop-ledger.jsonl` evidence, maxIterations breach, or required human
334
- escalation, validation FAILS.
335
- - If the audit recommends reopening `/2_gofer_specify`, `/3_gofer_plan`,
336
- `/4_gofer_tasks`, or `/6_gofer_validate`, record that as a blocking drift
337
- finding and FAIL the run. The feature is no longer in a closed state even if
338
- the code still compiles.
339
- - If the audit only reports low-severity warnings with no recommended reopen
340
- stage, continue but record them in the validation report.
341
-
342
- ## Object Type Identifier Contract
343
-
344
- - Preserve PascalCase source/model `name` and exact lowercase kebab-case
345
- transport/storage `slug` as distinct identifiers.
346
- - Generated `linkTypes[].targetObjectType`, runtime `target_type`, paths, and
347
- governed v4 fields contain exact stored slugs.
348
- - Resolve same-manifest model-name shorthand through the declared slug before
349
- publication; reject unresolved names instead of guessing.
350
- - Use the shared platform SDK for app routes. Never hand-write v4 resource
351
- paths or add a local slugifier.
352
- - Historical stored slugs are authoritative. Never normalize, alias, or rename
353
- them to match current derivation.
354
-
355
- ---
356
-
357
- # Phase A — Rubric Validation
358
-
359
- Phase A runs the 10-category engineering rubric (Categories 1-10, up to 100
360
- points before Category 11 is added).
361
-
362
- ## Step 2: Spawn 6 Specialist Validation Agents
363
-
364
- **CRITICAL**: You **MUST** launch all 6 agents **in parallel** using the Task
365
- tool. Do NOT perform validation work inline in the main context. The main
366
- context should only orchestrate, score the rubric, and review agent outputs.
367
- Each agent receives the feature context and returns structured findings.
368
-
369
- ### Agent 1: Correctness Validator
370
-
371
- ```
372
- Task: subagent_type="validation-correctness", model="sonnet"
373
- Prompt: "Validate functional correctness for feature [FEATURE_NAME].
374
-
375
- Feature directory: {FEATURE_DIR}
376
- Spec: {FEATURE_DIR}/spec.md
377
- Plan: {FEATURE_DIR}/plan.md
378
-
379
- Check every acceptance criterion in spec.md.
380
- For each criterion, find the test that exercises it and verify it tests real code.
381
- Return findings in your standard report format (<2000 tokens)."
382
- ```
383
-
384
- ### Agent 2: Security Validator
385
-
386
- ```
387
- Task: subagent_type="validation-security", model="sonnet"
388
- Prompt: "Validate security posture for feature [FEATURE_NAME].
389
-
390
- Scan all new/modified files (from tasks.md file paths).
391
- Check for: hardcoded secrets, disabled security, auth bypass, client-side keys.
392
- Return findings with Red/Yellow/Gray severity (<2000 tokens)."
393
- ```
394
-
395
- ### Agent 3: Performance Validator
396
-
397
- ```
398
- Task: subagent_type="validation-performance", model="haiku"
399
- Prompt: "Validate performance characteristics for feature [FEATURE_NAME].
400
-
401
- Scan all new/modified source files (from tasks.md file paths).
402
- Check for: sync I/O in async paths, cyclomatic complexity > 12, unbounded loops.
403
- Build scripts and test files are exempt.
404
- Return findings with complexity scores (<2000 tokens)."
405
- ```
406
-
407
- ### Agent 4: Test Quality Validator
408
-
409
- ```
410
- Task: subagent_type="validation-test-quality", model="haiku"
411
- Prompt: "Validate test quality for feature [FEATURE_NAME].
412
-
413
- Scan test files related to the feature.
414
- Check for: placeholder assertions, skipped tests, mock ratio, mock-only tests.
415
- VSCode API mocks marked '// mock-justified: VSCode API' are exempt from ratio.
416
- Return findings with mock ratio calculation (<2000 tokens)."
417
- ```
418
-
419
- ### Agent 5: Integration Validator
420
-
421
- ```
422
- Task: subagent_type="validation-integration", model="sonnet"
423
- Prompt: "Validate integration contracts for feature [FEATURE_NAME].
424
-
425
- Feature directory: {FEATURE_DIR}
426
- Check contracts/ directory if it exists.
427
- Verify cross-component boundaries, type compatibility, integration test coverage.
428
- Return findings with contract compliance status (<2000 tokens)."
429
- ```
430
-
431
- ### Agent 6: Standards Validator
432
-
433
- ```
434
- Task: subagent_type="validation-standards", model="sonnet"
435
- Prompt: "Validate standards compliance for feature [FEATURE_NAME].
436
-
437
- Feature directory: {FEATURE_DIR}
438
- Check against constitution.md (if exists) and research.md patterns.
439
- Detect AI slop: redundant comments, over-engineered abstractions, silent failures.
440
- Check code hygiene: TODO/FIXME, magic numbers, unused imports.
441
- Return findings with severity tiers (<2000 tokens)."
442
- ```
443
-
444
- ### Agent 7: Security Red Team (Optional — Multi-Perspective)
445
-
446
- When the feature involves security-sensitive code (authentication,
447
- authorization, user input handling, external APIs), run the security red team
448
- strategy (#13):
449
-
450
- ```
451
- # Diverge: 3 attack perspectives
452
- Task: subagent_type="validate-security-red-team", model="opus"
453
- Prompt: "Perspective 1: OWASP Top 10 attack analysis for feature [FEATURE_NAME].
454
- Scan all new/modified files from tasks.md. Attack from OWASP perspective.
455
- Return findings with exploit steps (<2000 tokens)."
456
-
457
- Task: subagent_type="validate-security-red-team", model="opus"
458
- Prompt: "Perspective 2: Business logic abuse analysis for feature [FEATURE_NAME].
459
- Scan all new/modified files from tasks.md. Attack business logic.
460
- Return findings with exploit steps (<2000 tokens)."
461
-
462
- Task: subagent_type="validate-security-red-team", model="opus"
463
- Prompt: "Perspective 3: CVE search for feature [FEATURE_NAME].
464
- Check package.json dependencies for known CVEs.
465
- Return findings with advisory references (<2000 tokens)."
466
-
467
- # Converge: Judge synthesizes attack findings
468
- Task: subagent_type="multi-perspective-judge", model="opus"
469
- Prompt: "Synthesize 3 security red team perspectives for [FEATURE_NAME].
470
- Perspective 1 (OWASP): [result]. Perspective 2 (Business Logic): [result].
471
- Perspective 3 (CVE): [result].
472
- Identify confirmed vulnerabilities vs false positives. Prioritize by exploitability."
473
- ```
474
-
475
- **Run all 6 core agents in parallel.** Run Agent 7 (if applicable) in parallel
476
- with the core agents.
477
-
478
- ## Step 2.2: Evidence Gate Pre-Check
479
-
480
- Evaluate the truthfulness gates before final scoring. If a gate is still
481
- pending here, re-check it after Step 3 automated checks complete and before the
482
- PASS/FAIL synthesis.
483
-
484
- ```
485
- GATE-1 (Integration Proof — Category 5):
486
- Require: runtime wiring artifact OR integration-test execution output
487
- present in the current session context by final scoring time.
488
- If absent during Step 2.2, record GATE-1 as pending and re-check it after
489
- Step 3 automated checks complete.
490
- Still absent after Step 3 → Category 5 score = 0; mark GATE_FAIL = true
491
-
492
- GATE-2 (Test Execution — Categories 1 and 2):
493
- Require: real, executed npm test output with pass/fail count already present
494
- or produced by Step 3 automated checks before final scoring.
495
- If absent during Step 2.2, record GATE-2 as pending and re-check it after
496
- Step 3 automated checks complete.
497
- Still absent after Step 3 → Categories 1 and 2 score = 0; mark GATE_FAIL = true
498
-
499
- GATE-3 (Render/Deployment Proof — Category 3):
500
- IF HAS_UI = false:
501
- Record "N/A — HAS_UI=false" in evidence table.
502
- Record a matching not-in-scope reason in `Absent / Reason for 0`.
503
- Apply existing no-UI point redistribution.
504
- IF HAS_UI = true AND DEPLOY_IN_SCOPE = false:
505
- Require: local render proof (screenshot, component render assertion,
506
- headless browser assertion, or local smoke-check output) present by final
507
- scoring time.
508
- If absent during Step 2.2, record GATE-3 as pending and re-check before
509
- final PASS/FAIL synthesis.
510
- Still absent → Category 3 score = 0; mark GATE_FAIL = true
511
- If present, record "Render proof only — deployment target not in scope" in
512
- the evidence table and do not redistribute Category 3 points.
513
- IF HAS_UI = true AND DEPLOY_IN_SCOPE = true:
514
- Require: screenshot, curl/HTTP transcript, deployment log, headless browser
515
- assertion, or smoke-check output present by final scoring time, with at
516
- least one artifact proving rendered/live behavior on the declared route or
517
- deployment target.
518
- If absent during Step 2.2, record GATE-3 as pending and re-check before
519
- final PASS/FAIL synthesis.
520
- Still absent → Category 3 score = 0; mark GATE_FAIL = true
521
-
522
- If any GATE_FAIL = true:
523
- - Any agent that would have scored the gated category is still run
524
- - The category score remains 0 unless the missing evidence appears before
525
- final scoring
526
- ```
527
-
528
- Collect all results before proceeding.
529
-
530
- ---
531
-
532
- # Phase B — Blast Radius Analysis
533
-
534
- Phase B quantifies the **ripple effect** of the implementation. It assesses risk
535
- to code outside the feature boundary, interface-contract stability,
536
- observability preservation, dependency / submodule impact, rollback readiness,
537
- and release-checklist compliance. Phase B results score **Category 11 (10
538
- points)** and produce a separate `blast-radius-report.md` artifact.
539
-
540
- Phase B runs **after** Phase A agents have returned (Step 2 complete) and
541
- **before** automated checks in Step 3, because breaking-change detection informs
542
- how to interpret failing tests/types.
543
-
544
- ## Step 2.5: Pre-Flight Change Surface Discovery
545
-
546
- Before spawning Phase B agents, build a **change manifest** the agents can
547
- reference. This is a cheap main-context pass, not an agent task.
548
-
549
- 1. **Modified file list** — from `tasks.md` completed tasks and git:
550
-
551
- ```bash
552
- git diff --name-only $(git merge-base HEAD main 2>/dev/null || echo HEAD~1) HEAD
553
- ```
554
-
555
- 2. **Submodule inventory** — detect repo submodules and workspace packages:
556
-
557
- ```bash
558
- git submodule status 2>/dev/null
559
- cat package.json 2>/dev/null | grep -E '"workspaces"' -A 20
560
- ls -d */package.json 2>/dev/null | xargs -I {} dirname {}
561
- ```
562
-
563
- Record which submodules/workspaces contain modified files. For this repo the
564
- canonical submodules are `extension/`, `language-server/`, `docs/`.
565
-
566
- 3. **Public-surface detection** — identify exported symbols at risk:
567
- - `index.ts` / `index.js` files in modified directories
568
- - `*.d.ts` files in modified directories
569
- - Entries in the `exports` / `main` / `types` fields of modified
570
- `package.json` files
571
- - Files under `contracts/` or `.specify/specs/{feature}/contracts/`
572
-
573
- 4. **Dependency manifest diff** — capture dependency churn:
574
-
575
- ```bash
576
- git diff $(git merge-base HEAD main 2>/dev/null || echo HEAD~1) HEAD -- package.json package-lock.json extension/package.json language-server/package.json 2>/dev/null
577
- ```
578
-
579
- 5. **Rollback-relevant assets** — flag anything that needs a reverse path:
580
- - Files under `migrations/`, `db/migrations/`, `prisma/migrations/`
581
- - Files named `*.sql`, `schema.*`
582
- - Feature-flag definitions (search for `featureFlag`, `growthbook`,
583
- `launchdarkly`, `flags.`)
584
- - `CHANGELOG.md`, `RELEASES.md`, version fields in `package.json`
585
-
586
- Record these into `CHANGE_MANIFEST` for the Phase B prompts.
587
-
588
- ---
589
-
590
- ## Step 2.6: Spawn 5 Blast-Radius Analysis Agents
591
-
592
- Launch all 5 agents **in parallel** using the Task tool. Pass the
593
- `CHANGE_MANIFEST` from Step 2.5 into each prompt so agents see the same ground
594
- truth.
595
-
596
- ### Agent 8: Change Graph / Ripple Analyzer
597
-
598
- ```
599
- Task: subagent_type="codebase-analyzer", model="sonnet"
600
- Prompt: "Blast-radius change-graph analysis for feature [FEATURE_NAME].
601
-
602
- Feature directory: {FEATURE_DIR}
603
- Change manifest (modified files): {CHANGE_MANIFEST.modifiedFiles}
604
- Submodules: {CHANGE_MANIFEST.submodules}
605
-
606
- Build a change-graph table for EVERY modified symbol (function, class, type,
607
- const) in the modified files:
608
- 1. List every direct importer/caller (file:line references).
609
- 2. Classify each as Direct (imports the symbol) or Transitive (imports a
610
- re-export of it) or Runtime (dynamic require / reflection).
611
- 3. Flag any cross-submodule ripple (symbol defined in submodule A, consumed
612
- in submodule B) — this is Red if unplanned.
613
- 4. Flag any consumer whose tests do NOT exercise the changed code path —
614
- Yellow.
615
- 5. Count orphan changes (modified code with zero importers) — Gray.
616
-
617
- Return findings with Red/Yellow/Gray severity and a concise ripple summary
618
- (<2500 tokens). Output sections: 'Ripple Summary', 'Cross-submodule Crossings',
619
- 'Consumer Coverage Gaps', 'Orphans'."
620
- ```
621
-
622
- ### Agent 9: Interface Contract Diff
623
-
624
- ```
625
- Task: subagent_type="validation-integration", model="sonnet"
626
- Prompt: "Interface contract blast-radius analysis for feature [FEATURE_NAME].
627
-
628
- Feature directory: {FEATURE_DIR}
629
- Public-surface manifest: {CHANGE_MANIFEST.publicSurface}
630
- Contracts directory: {FEATURE_DIR}/contracts (if present)
631
-
632
- For every public export, package.json exports field entry, contract file,
633
- and .d.ts symbol that was modified, deleted, or added:
634
- 1. Diff old signature vs new signature (parameters, return types, generics,
635
- optional vs required, default values).
636
- 2. Classify each change:
637
- - BREAKING: removed export, renamed export, narrowed return type, widened
638
- required-param set, removed optional param callers rely on.
639
- - ADDITIVE: new export, new optional param, widened return type.
640
- - NEUTRAL: implementation change with identical signature.
641
- 3. Red = any BREAKING change without a corresponding entry in CHANGELOG.md
642
- or a migration note in the spec.
643
- 4. Yellow = BREAKING change with CHANGELOG entry but no migration guide.
644
- 5. Gray = ADDITIVE changes for informational tracking.
645
-
646
- Verify contract tests still cover all pre-existing contract clauses (no
647
- silent coverage regression). Return findings (<2000 tokens) with sections:
648
- 'Breaking Changes', 'Additive Changes', 'Contract Coverage Regression'."
649
- ```
650
-
651
- ### Agent 10: Error Logging & Observability Integrity
652
-
653
- ```
654
- Task: subagent_type="validation-standards", model="sonnet"
655
- Prompt: "Observability blast-radius analysis for feature [FEATURE_NAME].
656
-
657
- Feature directory: {FEATURE_DIR}
658
- Modified files: {CHANGE_MANIFEST.modifiedFiles}
659
-
660
- Assess whether observability was preserved, degraded, or improved:
661
- 1. For every new/modified catch block: does it log? Use the same structured
662
- logger used elsewhere in the repo (detect the logger by scanning for
663
- common imports: winston, pino, bunyan, console, vscode.window.showError,
664
- telemetry module). Red if any catch swallows silently in production code.
665
- 2. For every removed log statement: is removal justified by a comment or
666
- spec? Red if production-relevant logs disappeared without justification.
667
- 3. Log-level hygiene: no `console.log` in production code (test files
668
- exempt); no debug-level logs left at info/warn level.
669
- 4. PII / secrets leakage in new log messages — Red if detected.
670
- 5. Telemetry/metrics coverage: if the feature touched hot paths that
671
- previously emitted metrics, verify emission is preserved.
672
- 6. Correlation IDs / trace context propagation: if the repo uses them,
673
- verify new code paths propagate them.
674
-
675
- Return findings (<2000 tokens) with sections: 'Silent Failures', 'Removed
676
- Logs', 'PII Risk', 'Metric Coverage Delta', 'Trace Propagation'."
677
- ```
678
-
679
- ### Agent 11: Dependency & Submodule Impact (with npm audit delta)
680
-
681
- ```
682
- Task: subagent_type="research-dependency-evaluator", model="haiku"
683
- Prompt: "Dependency and submodule blast-radius analysis for feature
684
- [FEATURE_NAME].
685
-
686
- Dependency manifest diff: {CHANGE_MANIFEST.dependencyDiff}
687
- Submodules affected: {CHANGE_MANIFEST.submodules}
688
-
689
- 1. New dependencies: list each with source (npm / git / local), license, and
690
- bundle-size impact (approx). Red if license is incompatible (GPL/AGPL in
691
- a permissive-licensed repo), or if the package is unmaintained (>2 years
692
- since last release, <1000 weekly downloads).
693
- 2. Version bumps: classify as major / minor / patch. Red for major bumps
694
- without migration notes.
695
- 3. Lockfile churn: if package.json is unchanged but package-lock.json
696
- changed materially (>20 lines), flag as Yellow (indirect dep drift).
697
- 4. npm audit delta: run `npm audit --json 2>/dev/null` on the current branch
698
- and compare vulnerability counts vs baseline (main). Red if the branch
699
- adds any new High or Critical CVE. Yellow for new Moderate. Gray for new
700
- Low.
701
- 5. Submodule boundary crossings: if the feature modifies code in multiple
702
- submodules (extension/, language-server/, docs/), verify each submodule
703
- independently builds and tests. Red if a cross-submodule change breaks
704
- any submodule's standalone build.
705
-
706
- Return findings (<2500 tokens) with sections: 'New Dependencies', 'Version
707
- Bumps', 'Lockfile Drift', 'CVE Delta', 'Submodule Boundary Crossings'."
708
- ```
709
-
710
- ### Agent 12: Rollback Readiness & Release Checklist
711
-
712
- ```
713
- Task: subagent_type="tasks-rollback-planner", model="haiku"
714
- Prompt: "Rollback readiness + release-checklist review for feature
715
- [FEATURE_NAME].
716
-
717
- Feature directory: {FEATURE_DIR}
718
- Rollback assets: {CHANGE_MANIFEST.rollbackAssets}
719
-
720
- Assess reversibility and release readiness:
721
- 1. DB migrations: is every forward migration paired with a down/reverse
722
- migration? Red if any irreversible migration lacks explicit justification
723
- in the spec or plan.
724
- 2. Feature flags: if the feature is risky, is it gated behind a flag? Is the
725
- flag default-off? Is the pre-flag code path preserved so disabling the
726
- flag restores prior behavior? Red if a risky change is unflagged and
727
- irreversible.
728
- 3. Data-shape changes: detect schema changes that cannot be rolled back
729
- without data loss (column drops, type narrowings). Red if no backfill or
730
- dual-write strategy.
731
- 4. Release checklist for user-visible changes:
732
- - CHANGELOG.md updated for this feature — Red if missing and feature is
733
- user-visible.
734
- - Version bump planned (semver correct for breaking/additive/patch) — Red
735
- if breaking change present without major bump plan.
736
- - Migration guide present for breaking changes — Red if missing.
737
- - Documentation updated (docs/ or README.md) for new user-facing
738
- capabilities — Yellow if missing.
739
- 5. Rollback runbook: is there a documented 'how to revert' path? Yellow if
740
- absent for non-trivial changes.
741
-
742
- Return findings (<2000 tokens) with sections: 'Migration Reversibility',
743
- 'Feature Flag Coverage', 'Data-Shape Rollback Risk', 'Release Checklist',
744
- 'Rollback Runbook'."
745
- ```
746
-
747
- **Run all 5 Phase B agents in parallel.** Collect results before synthesis.
748
-
749
- ---
750
-
751
- ## Step 2.7: Blast Radius Synthesis
752
-
753
- Aggregate Phase B agent findings into a single blast-radius verdict.
754
-
755
- ### Consolidated Finding Table
756
-
757
- ```
758
- | # | Dimension | Finding | Severity | Agent | File | Line |
759
- |---|-----------|---------|----------|-------|------|------|
760
- | 1 | Change graph | [desc] | Red | codebase-analyzer | [file] | [line] |
761
- | 2 | Interface contract | [desc] | Red | validation-integration | [file] | [line] |
762
- | 3 | Observability | [desc] | Yellow | validation-standards | [file] | [line] |
763
- | 4 | Dependency | [desc] | Yellow | research-dependency-evaluator | [file] | [line] |
764
- | 5 | Rollback | [desc] | Red | tasks-rollback-planner | [file] | [line] |
765
- ```
766
-
767
- ### Severity Rollup
768
-
769
- ```
770
- BLAST_RADIUS_RED = count of Red findings across all 5 agents
771
- BLAST_RADIUS_YELLOW = count of Yellow findings
772
- BLAST_RADIUS_GRAY = count of Gray findings
773
- ```
774
-
775
- ### Write `blast-radius-report.md`
776
-
777
- Write to `{FEATURE_DIR}/blast-radius-report.md`:
778
-
779
- ```markdown
780
- ---
781
- feature: [Feature Name]
782
- generated: [ISO timestamp]
783
- reviewer: Claude
784
- GeneratedAt: [ISO timestamp]
785
- SourceCommandId: /6_gofer_validate
786
- SourceInputs: [spec.md, plan.md, tasks.md, research.md, blast-radius inputs]
787
- OverwriteNoticeWhenApplicable: [new file or overwrite note]
788
- dimensions_checked:
789
- [
790
- change_graph,
791
- interface_contract,
792
- observability,
793
- dependency_submodule,
794
- rollback_release,
795
- ]
796
- red_count: [N]
797
- yellow_count: [N]
798
- gray_count: [N]
799
- verdict: [CONTAINED | BREACHED]
800
- ---
801
-
802
- # Blast Radius Report: [Feature Name]
803
-
804
- ## Changed Surfaces
805
-
806
- - Modified files: [N]
807
- - Submodules touched: [list]
808
- - Public-surface symbols affected: [N]
809
- - New dependencies: [N]
810
- - Version bumps: [list]
811
- - Migration files: [list]
812
- - Feature flags introduced/modified: [list]
813
-
814
- ## Risk Vectors
815
-
816
- ### 1. Change Graph / Ripple (Agent: codebase-analyzer)
817
-
818
- - Cross-submodule crossings: [list or "none"]
819
- - Consumer coverage gaps: [N]
820
- - Orphan changes: [N]
821
- - Red findings: [table]
822
-
823
- ### 2. Interface Contracts (Agent: validation-integration)
824
-
825
- - Breaking changes: [N] ([list])
826
- - Additive changes: [N]
827
- - Contract coverage regressions: [list]
828
- - Red findings: [table]
829
-
830
- ### 3. Error Logging & Observability (Agent: validation-standards)
831
-
832
- - Silent failures introduced: [N]
833
- - Logs removed without justification: [N]
834
- - PII/secret leakage risk: [list]
835
- - Metric/trace coverage delta: [summary]
836
- - Red findings: [table]
837
-
838
- ### 4. Dependencies & Submodules (Agent: research-dependency-evaluator)
839
-
840
- - New dependencies: [table with license/size/maintenance]
841
- - Version bumps: [list]
842
- - Lockfile drift: [summary]
843
- - CVE delta: Critical +[N], High +[N], Moderate +[N], Low +[N]
844
- - Submodule boundary crossings: [list]
845
- - Red findings: [table]
846
-
847
- ### 5. Rollback Readiness & Release Checklist (Agent: tasks-rollback-planner)
848
-
849
- - Migration reversibility: [OK / BREACHED]
850
- - Feature flag coverage: [OK / BREACHED / N/A]
851
- - Data-shape rollback risk: [OK / BREACHED]
852
- - Release checklist:
853
- - CHANGELOG updated: [Yes / No / N/A]
854
- - Version bump planned: [patch / minor / major / N/A]
855
- - Migration guide: [Yes / No / N/A]
856
- - Docs updated: [Yes / No / N/A]
857
- - Rollback runbook: [Present / Absent / N/A]
858
- - Red findings: [table]
859
-
860
- ## Containment Summary
861
-
862
- - **CONTAINED** if `BLAST_RADIUS_RED == 0` — Category 11 scores full 10 pts.
863
- - **BREACHED** if `BLAST_RADIUS_RED > 0` — Category 11 scores 0.
864
-
865
- Yellow findings do NOT fail Category 11 but are reported to the engineering
866
- review loop (Phase C) for mandatory attention.
867
- ```
868
-
869
- Proceed to Step 3 (automated checks) with blast-radius results attached to the
870
- context.
871
-
872
- ---
873
-
874
- # End of Phase B
875
-
876
- ---
877
-
878
- ## Step 3: Run Automated Checks
879
-
880
- Execute verification commands and capture results:
881
-
882
- ### Build Check
883
-
884
- ```bash
885
- npm run build # or appropriate build command
886
- ```
887
-
888
- ### Test Check
889
-
890
- ```bash
891
- npm test # or appropriate test command
892
- ```
893
-
894
- ### Lint Check
895
-
896
- ```bash
897
- npm run lint # or appropriate lint command
898
- ```
899
-
900
- ### Type Check (if TypeScript)
901
-
902
- ```bash
903
- npm run typecheck # or tsc --noEmit
904
- ```
905
-
906
- Record results:
907
-
908
- ```
909
- | Check | Command | Result |
910
- |-----------|------------------|---------------|
911
- | Build | npm run build | PASS / FAIL |
912
- | Tests | npm test | PASS / FAIL |
913
- | Lint | npm run lint | PASS / FAIL |
914
- | TypeCheck | tsc --noEmit | PASS / FAIL |
915
- ```
916
-
917
- **If Build or Tests FAIL**: Mark Functional Correctness as 0 immediately.
918
-
919
- ---
920
-
921
- ## Step 4: Mutation Testing Gate
922
-
923
- Check if mutation testing tools are available:
924
-
925
- ```bash
926
- npx stryker --version 2>/dev/null
927
- ```
928
-
929
- ### If Stryker is available:
930
-
931
- 1. Run mutation testing:
932
- ```bash
933
- npx stryker run --reporters clear-text 2>&1 | tail -50
934
- ```
935
- 2. Parse mutation score from output
936
- 3. Record: `MUTATION_SCORE = [N]%`
937
- 4. If score < 60%: contributes to Test Authenticity scoring 0
938
-
939
- ### If Stryker is NOT available:
940
-
941
- 1. Record: `MUTATION_SCORE = "unavailable"`
942
- 2. Log recommendation: "Install @stryker-mutator/core for mutation testing"
943
- 3. Test Authenticity is scored based on other criteria only (placeholders,
944
- skips, mock ratio)
945
- 4. Do NOT block on mutation score when Stryker is absent
946
-
947
- ---
948
-
949
- ## Step 5: Mock Ratio Analysis
950
-
951
- Count mocking patterns vs real assertions across feature test files:
952
-
953
- ### Count Mock Calls
954
-
955
- Use Grep to count in test files related to the feature:
956
-
957
- - `vi.mock(` — module-level mocks
958
- - `vi.fn(` — individual function mocks
959
- - `jest.mock(` — Jest module mocks
960
- - `jest.fn(` — Jest function mocks
961
- - `.mockReturnValue(` — mock configurations
962
- - `.mockResolvedValue(` — async mock configurations
963
-
964
- ### Count Real Assertions
965
-
966
- Use Grep to count:
967
-
968
- - `expect(` followed by `.toBe(`, `.toEqual(`, `.toContain(`, `.toThrow(`,
969
- `.toMatch(`, `.toBeGreaterThan(`, `.toBeLessThan(`, `.toBeDefined(`,
970
- `.toBeNull(`, `.toHaveLength(`, `.toHaveProperty(`
971
-
972
- ### Exclude Justified Mocks
973
-
974
- Lines containing `// mock-justified:` are excluded from the mock count. This
975
- allows VSCode API mocks and other unavoidable mocks to be documented and exempt.
976
-
977
- ### Calculate Ratio
978
-
979
- ```
980
- MOCK_RATIO = mock_calls / (mock_calls + real_assertions)
981
- ```
982
-
983
- ### Evaluate
984
-
985
- - If `MOCK_RATIO > 0.30` (30%): contributes to Test Authenticity scoring 0
986
- - Report per-file ratios for the worst offenders
987
-
988
- ---
989
-
990
- ## Step 6: Semantic Slop Detection
991
-
992
- ### Automated Pattern Detection (Grep-based)
993
-
994
- Run these checks on new/modified source files (not test files):
995
-
996
- #### Red Severity (Blocks)
997
-
998
- ```
999
- Pattern: expect(true).toBe(true)
1000
- Also: expect(1).toBe(1), expect('a').toBe('a')
1001
- Method: Grep for tautological assertions in test files
1002
- ```
1003
-
1004
- ```
1005
- Pattern: test.skip / it.skip / describe.skip / xit / xdescribe
1006
- Method: Grep for skip patterns in feature-related test files
1007
- ```
1008
-
1009
- #### Yellow Severity (Must Address)
1010
-
1011
- ```
1012
- Pattern: TODO / FIXME / XXX / HACK in source code (not test helpers)
1013
- Method: Grep in new/modified .ts/.js/.py files
1014
- ```
1015
-
1016
- ```
1017
- Pattern: Empty catch blocks — catch (e) {} or catch { }
1018
- Method: Grep for catch blocks with empty or whitespace-only bodies
1019
- ```
1020
-
1021
- #### Gray Severity (Informational)
1022
-
1023
- Gray-level findings are reported by the specialist agents (Standards and Test
1024
- Quality). They include:
1025
-
1026
- - Redundant comments restating code (agent: validation-standards)
1027
- - Over-engineered abstractions for one-time use (agent: validation-standards)
1028
- - Magic numbers without named constants (agent: validation-standards)
1029
- - Mock-only tests that verify wiring not behavior (agent:
1030
- validation-test-quality)
1031
-
1032
- ### Consolidate Slop Findings
1033
-
1034
- Combine automated Grep results with agent findings:
1035
-
1036
- ```
1037
- | # | Pattern | Severity | Source | Description | File | Line |
1038
- |---|---------|----------|--------|-------------|------|------|
1039
- | 1 | Placeholder test | Red | Grep | expect(true).toBe(true) | test.ts | 45 |
1040
- | 2 | Skipped test | Red | Grep | it.skip('should...') | spec.ts | 12 |
1041
- | 3 | TODO placeholder | Yellow | Grep | // TODO: implement | service.ts | 89 |
1042
- | 4 | Redundant comment | Yellow | Agent | "// create user" above createUser() | user.ts | 23 |
1043
- ```
1044
-
1045
- ---
1046
-
1047
- ## Step 7: Score the 10-Category Rubric
1048
-
1049
- Using agent reports, automated checks, and analysis from Steps 3-6, score each
1050
- category:
1051
-
1052
- ### Scoring Logic
1053
-
1054
- **Category 1: Functional Correctness** ({15 or 20 if no UI} pts)
1055
-
1056
- - Input: validation-correctness agent report + `GATE-2` + automated test results
1057
- - Score 0 if: `GATE-2` fails, OR any Red finding from correctness agent, OR
1058
- build/tests fail, OR tests fail to import
1059
- - Score full if: All acceptance criteria verified with real tests
1060
-
1061
- **Category 2: Test Authenticity** ({15 or 20 if no UI} pts)
1062
-
1063
- - Input: validation-test-quality agent report + `GATE-2` + mutation score +
1064
- mock ratio
1065
- - Score 0 if: Any placeholder assertion found, OR any test.skip found, OR mock
1066
- ratio > 30%, OR mutation score < 60% (when Stryker available), OR
1067
- `GATE-2` fails
1068
- - Score full if: Zero placeholders, zero skips, mock ratio <= 30%
1069
-
1070
- **Category 3: UI/E2E Verification** (10 pts, or 0 if redistributed)
1071
-
1072
- - If `HAS_UI = false`: Record `N/A — HAS_UI=false` plus an explicit not-in-scope
1073
- reason in the evidence table and apply the existing no-UI redistribution.
1074
- - If `HAS_UI = true` and `DEPLOY_IN_SCOPE = false`: Check `GATE-3` for local
1075
- render proof and record `Render proof only — deployment target not in scope`
1076
- when that proof exists. Score 0 if `GATE-3` fails or no local render proof
1077
- exists. Do not redistribute Category 3 points.
1078
- - If `HAS_UI = true` and `DEPLOY_IN_SCOPE = true`: Check `GATE-3` for
1079
- screenshot, curl/HTTP transcript, deployment log, headless browser
1080
- assertion, or smoke-check output with proof of rendered/live behavior on the
1081
- declared route or target. Score 0 if `GATE-3` fails or no real render/deploy
1082
- proof exists.
1083
-
1084
- **Category 4: Security Posture** (10 pts)
1085
-
1086
- - Input: validation-security agent report
1087
- - Score 0 if: Any Red finding from security agent
1088
- - Score full if: No Red or Yellow findings
1089
-
1090
- **Category 5: Integration Reality** (10 pts)
1091
-
1092
- - Input: validation-integration agent report + `GATE-1`
1093
- - Score 0 if: `GATE-1` fails, OR any contract violation, OR critical boundary
1094
- with zero tests
1095
- - Score full if: All contracts satisfied, integration tests use real deps
1096
-
1097
- **Category 6: Error Path Coverage** (10 pts)
1098
-
1099
- - Input: validation-correctness agent (error paths) + validation-standards agent
1100
- (empty catch blocks)
1101
- - Score 0 if: Empty catch blocks found, OR public functions lack error path
1102
- tests
1103
- - Score full if: Error paths tested, catch blocks handle errors properly
1104
-
1105
- **Category 7: Architecture Compliance** (10 pts)
1106
-
1107
- - Input: validation-standards agent report (architecture section)
1108
- - Score 0 if: File structure deviates from plan.md without justification, OR
1109
- required diagrams/pictures are stale, unreadable, unrendered without fallback,
1110
- disconnected from the requirements/code/EAI Platform evidence they explain, OR
1111
- human-facing artifacts lack a plain-language executive summary
1112
- - Score full if: All files in expected locations, patterns followed
1113
-
1114
- **Visual And Document Comprehension Gate** (part of Category 7, no extra points):
1115
-
1116
- Use this gate whenever the feature has architecture, process, security,
1117
- workflow, data, UI, or EAI Platform behavior that a human reviewer or future AI
1118
- loop must understand. This is benchmarked against C4-style abstraction levels,
1119
- diagram-as-code/source-controlled visuals, 8090-style requirement/blueprint
1120
- alignment, Marp-style narrative decks, and UI proof practices such as screenshot
1121
- or visual-test evidence.
1122
-
1123
- - Executive summaries: every human-facing document starts with three to five
1124
- plain-language bullets that cover the decision, value, risk, evidence, and next
1125
- ask. Technical detail comes after the summary.
1126
- - Purpose clarity: every visual states the question it answers, audience,
1127
- source inputs, and how to read it in plain language.
1128
- - Simplicity: each diagram focuses on one decision or flow, keeps primary
1129
- nodes/steps to about seven or fewer where practical, and splits crowded
1130
- diagrams instead of making a spaghetti map.
1131
- - Correct visual type: use context/container C4 views for system boundaries,
1132
- sequence/state diagrams for flows, ERD for data, value stream for process,
1133
- heatmaps for capability/risk priority, and screenshot/storyboard evidence for
1134
- UI behavior.
1135
- - Renderability: Mermaid/D2/Structurizr-style source must render locally or
1136
- provide a markdown-table/text fallback; Marp decks must be valid Markdown with
1137
- slide frontmatter; UI visuals need screenshot, Storybook/component,
1138
- Playwright, or equivalent render proof.
1139
- - Traceability: each visual links to the requirement, plan, contract, code/test,
1140
- EAI service/template asset, or validation evidence it summarizes.
1141
- - Freshness: validation must check whether visuals changed or were reapproved
1142
- after spec, plan, code, workspace/auth, or validation changes; stale visuals fail
1143
- Category 7 even when the code passes.
1144
- - Public safety: visuals must not expose workspace-private data, secrets, customer
1145
- identifiers, internal-only architecture names, or screenshots containing
1146
- private content.
1147
-
1148
- **Category 8: Performance Baseline** (5 pts)
1149
-
1150
- - Input: validation-performance agent report
1151
- - Score 0 if: Sync I/O in async paths, OR complexity > 12, OR unbounded loops
1152
- - Score full if: No blocking performance findings
1153
-
1154
- **Category 9: Code Hygiene** (10 pts)
1155
-
1156
- - Input: validation-standards agent report (hygiene section) + slop detection
1157
- - Score 0 if: TODO placeholders in production code, OR > 5 redundant comments,
1158
- OR silent error swallowing found
1159
- - Score full if: Clean code, no slop findings above Gray
1160
-
1161
- **Category 10: Specification Traceability** (5 pts)
1162
-
1163
- - Input: validation-correctness agent (criteria mapping)
1164
- - Score 0 if: User stories cannot be traced to tests and code
1165
- - Score full if: Every US has tests, every test maps to implementing code
1166
-
1167
- **Category 11: Blast Radius Containment** (10 pts) — NEW
1168
-
1169
- - Input: Phase B blast-radius-report.md (Agents 8-12)
1170
- - Score 0 if **any** of:
1171
- - `BLAST_RADIUS_RED > 0` (verdict BREACHED in blast-radius-report.md), OR
1172
- - Interface Contract Diff found a BREAKING change without CHANGELOG entry, OR
1173
- - Observability agent found a silent failure in production code, OR
1174
- - Dependency agent reports a new High or Critical CVE, OR
1175
- - Rollback agent reports an irreversible migration without justification, OR
1176
- - Cross-submodule ripple detected that was not planned in plan.md
1177
- - Score full (10) if: `BLAST_RADIUS_RED == 0` — verdict CONTAINED in
1178
- blast-radius-report.md. Yellow/Gray findings do not block the category but are
1179
- forwarded to Phase C for attention.
1180
-
1181
- ### Calculate Total Score
1182
-
1183
- ```
1184
- TOTAL = Cat1 + Cat2 + Cat3 + ... + Cat10 + Cat11
1185
- ```
1186
-
1187
- Must equal **110** to PASS (no-UI features: Cat3 redistributes +5 to Cat1 and +5
1188
- to Cat2; total is still 110).
1189
-
1190
- ---
1191
-
1192
- ## Step 7.4: Two-Pass Canvas Refresh (Impact Canvas)
1193
-
1194
- After the validation council completes, refresh the Impact Canvas with
1195
- validation findings. This is a SURGICAL update: only the `topThreeRisks` slot of
1196
- `impact-canvas.md` is replaced; all other canvas content (header, problem
1197
- statement, personas, AI-leverage pie, outcomes) is preserved byte-for-byte. The
1198
- frontmatter `pass:` marker is bumped from 1 to 2 so downstream consumers can
1199
- tell which pass produced the artefact.
1200
-
1201
- ```
1202
- Task: subagent_type="visual-canvas-writer", model="haiku"
1203
- Prompt: "Pass-2 refresh for {FEATURE_DIR}/visuals/impact-canvas.md.
1204
- Read validation council output from {FEATURE_DIR}/validation.md.
1205
- Replace ONLY the topThreeRisks section with the council's top three risks.
1206
- Preserve all other content byte-for-byte.
1207
-
1208
- Use the runPass2() helper at .specify/scripts/node/lib/visual-pass-pipeline.mjs
1209
- which implements the surgical replacement (regex-bounded swap of the
1210
- '## Top Three Risks' section + frontmatter pass: 1 -> 2 bump).
1211
-
1212
- Return: absolute path of file written and the three risk strings used."
1213
- ```
1214
-
1215
- The `runPass2()` function in
1216
- `.specify/scripts/node/lib/visual-pass-pipeline.mjs` already implements the
1217
- surgical replacement; the writer agent only needs to provide the three
1218
- council-validated risk strings. This satisfies FR-016 (two-pass canvas refresh)
1219
- and the locked decision recorded in `plan.md:912-919`.
1220
-
1221
- ---
1222
-
1223
- ## Step 7.5: Refresh Risk Heatmap (Persona Pack — US4)
1224
-
1225
- After the rubric is scored and validation council findings are available,
1226
- dispatch `visual-risk-writer` in **pass-2 mode** to refresh the risk heatmap
1227
- with critical risks identified by the council. This replaces the heuristic
1228
- top-quadrant entries that pass-1 (run from this same stage before validation)
1229
- populated from the spec NFR / Out-of-Scope sections.
1230
-
1231
- ```
1232
- Task: subagent_type="visual-risk-writer", model="haiku"
1233
- Prompt: "Pass 2: refresh risk heatmap for feature [FEATURE_NAME].
1234
-
1235
- Feature directory: {FEATURE_DIR}
1236
- Spec: {FEATURE_DIR}/spec.md
1237
- Validation council findings: {FEATURE_DIR}/validation-report.md (in-progress)
1238
- Existing heatmap (pass-1): {FEATURE_DIR}/visuals/risk-heatmap.md
1239
- Template: .specify/templates/visuals/risk-heatmap-template.md
1240
-
1241
- Replace top-quadrant risks with the validation council's critical findings.
1242
- Preserve pass-1 risks that did not surface in validation.
1243
- Honour ≥30 ≤200 word plain-language preamble (NFR-010).
1244
-
1245
- Return: absolute path of file written and risk counts per quadrant."
1246
- ```
1247
-
1248
- The validation report (Step 8) MUST link to the refreshed risk heatmap under its
1249
- `## Risk Posture` section. If the Mermaid renderer fails for a downstream
1250
- consumer, the `mermaid-tabular-fallback.mjs` helper provides a markdown-table
1251
- fallback for the `quadrantChart` block.
1252
-
1253
- ---
1254
-
1255
- ## Step 8: Generate Validation Report
1256
-
1257
- Write to `{FEATURE_DIR}/validation-report.md`:
1258
-
1259
- ```markdown
1260
- ---
1261
- feature: [Feature Name]
1262
- validated: [ISO timestamp]
1263
- validator: Claude
1264
- status: [PASS/FAIL]
1265
- score: [N]
1266
- score_max: 110
1267
- iteration: [N]
1268
- has_ui: [true/false]
1269
- deploy_in_scope: [true/false]
1270
- objective_gate_status: [PASS/FAIL]
1271
- goal_rebaseline_report: goal-rebaseline-report.md
1272
- loop_audit_report: loop-audit-report.md
1273
- blast_radius_verdict: [CONTAINED | BREACHED]
1274
- blast_radius_report: blast-radius-report.md
1275
- GeneratedAt: [ISO timestamp]
1276
- SourceCommandId: /6_gofer_validate
1277
- SourceInputs: [spec.md, plan.md, tasks.md, research.md, automated checks, agent findings]
1278
- OverwriteNoticeWhenApplicable: [new file or overwrite note]
1279
- ---
1280
-
1281
- # Validation Report: [Feature Name]
1282
-
1283
- ## Objective Outcome Gate
1284
-
1285
- - Goal ledger: `goal-ledger.json`
1286
- - Rebaseline report: `goal-rebaseline-report.md`
1287
- - Loop contract: `loop-contract.json`
1288
- - Loop ledger: `loop-ledger.jsonl`
1289
- - Loop audit report: `loop-audit-report.md`
1290
- - Outcome gate status: [PASS/FAIL]
1291
- - Recommended reopen stage: [none | 2_specify | 3_plan | 4_tasks | 6_validate]
1292
- - Summary: [why objectives remain aligned or why the loop must reopen]
1293
-
1294
- ## Rubric Score
1295
-
1296
- | # | Category | Points | Score | Status | Evidence |
1297
- | --- | -------------------------- | ------- | ---------- | --------------- | --------- |
1298
- | 1 | Functional Correctness | [15/20] | [0/15/20] | PASS/FAIL | [summary] |
1299
- | 2 | Test Authenticity | [15/20] | [0/15/20] | PASS/FAIL | [summary] |
1300
- | 3 | UI/E2E Verification | [10/0] | [0/10/N/A] | PASS/FAIL/SKIP | [summary] |
1301
- | 4 | Security Posture | 10 | [0/10] | PASS/FAIL | [summary] |
1302
- | 5 | Integration Reality | 10 | [0/10] | PASS/FAIL | [summary] |
1303
- | 6 | Error Path Coverage | 10 | [0/10] | PASS/FAIL | [summary] |
1304
- | 7 | Architecture Compliance | 10 | [0/10] | PASS/FAIL | [summary] |
1305
- | 8 | Performance Baseline | 5 | [0/5] | PASS/FAIL | [summary] |
1306
- | 9 | Code Hygiene | 10 | [0/10] | PASS/FAIL | [summary] |
1307
- | 10 | Specification Traceability | 5 | [0/5] | PASS/FAIL | [summary] |
1308
- | 11 | Blast Radius Containment | 10 | [0/10] | PASS/FAIL | [summary] |
1309
- | | **TOTAL** | **110** | **[N]** | **[PASS/FAIL]** | |
1310
-
1311
- ## Automated Check Results
1312
-
1313
- | Check | Command | Result |
1314
- | --------- | ------------- | ------------------- |
1315
- | Build | npm run build | [PASS/FAIL] |
1316
- | Tests | npm test | [PASS/FAIL] |
1317
- | Lint | npm run lint | [PASS/FAIL + count] |
1318
- | TypeCheck | tsc --noEmit | [PASS/FAIL] |
1319
-
1320
- ## Closed-Loop Traceability
1321
-
1322
- | Requirement ID | Goal ID | Code Evidence | Test Evidence | Status |
1323
- | -------------- | ------- | ------------- | ------------- | ------ |
1324
- | [FR-001] | [G1] | [path] | [path] | [PASS/FAIL] |
1325
-
1326
- ## Mutation Testing
1327
-
1328
- - **Stryker available**: [Yes/No]
1329
- - **Mutation score**: [N]% (target: >= 60%)
1330
-
1331
- ## Mock Ratio Analysis
1332
-
1333
- - **Total mock calls**: [N]
1334
- - **Total real assertions**: [N]
1335
- - **Mock ratio**: [N]% (target: <= 30%)
1336
- - **Justified mocks excluded**: [N]
1337
-
1338
- ### Worst Offenders by File
1339
-
1340
- | File | Mocks | Assertions | Ratio | Status |
1341
- | ------ | ----- | ---------- | ----- | ------- |
1342
- | [file] | [N] | [N] | [N]% | OK/FAIL |
1343
-
1344
- ## Specialist Agent Findings
1345
-
1346
- ### Red (Blocking)
1347
-
1348
- | # | Category | Finding | File | Line |
1349
- | --- | ---------- | ------------- | ------ | ------ |
1350
- | [N] | [category] | [description] | [file] | [line] |
1351
-
1352
- ### Yellow (Must Address)
1353
-
1354
- | # | Category | Finding | File | Line |
1355
- | --- | ---------- | ------------- | ------ | ------ |
1356
- | [N] | [category] | [description] | [file] | [line] |
1357
-
1358
- ### Gray (Informational)
1359
-
1360
- | # | Category | Finding | File | Line |
1361
- | --- | ---------- | ------------- | ------ | ------ |
1362
- | [N] | [category] | [description] | [file] | [line] |
1363
-
1364
- ## AI Slop Detection Summary
1365
-
1366
- | Pattern | Count | Severity |
1367
- | ---------------------------- | ----- | -------- |
1368
- | Placeholder assertions | [N] | Red |
1369
- | Skipped tests | [N] | Red |
1370
- | TODO/FIXME placeholders | [N] | Yellow |
1371
- | Empty catch blocks | [N] | Yellow |
1372
- | Redundant comments | [N] | Yellow |
1373
- | Over-engineered abstractions | [N] | Gray |
1374
- | Magic numbers | [N] | Gray |
1375
-
1376
- ## Blast Radius Summary (Phase B)
1377
-
1378
- See `{FEATURE_DIR}/blast-radius-report.md` for the full dimension report.
1379
-
1380
- | Dimension | Agent | Red | Yellow | Gray | Verdict |
1381
- | ----------------------------------- | ----------------------------- | --- | ------ | ---- | ------------------------ |
1382
- | Change graph / ripple | codebase-analyzer | [N] | [N] | [N] | [OK/BREACHED] |
1383
- | Interface contracts | validation-integration | [N] | [N] | [N] | [OK/BREACHED] |
1384
- | Error logging & observability | validation-standards | [N] | [N] | [N] | [OK/BREACHED] |
1385
- | Dependency & submodule impact | research-dependency-evaluator | [N] | [N] | [N] | [OK/BREACHED] |
1386
- | Rollback readiness & release chklst | tasks-rollback-planner | [N] | [N] | [N] | [OK/BREACHED] |
1387
- | | **TOTAL** | [N] | [N] | [N] | **[CONTAINED/BREACHED]** |
1388
-
1389
- **Change Surface Summary**
1390
-
1391
- - Modified files: [N]
1392
- - Submodules touched: [list]
1393
- - Public-surface symbols modified: [N]
1394
- - Breaking API changes: [N]
1395
- - New dependencies: [N]
1396
- - New High/Critical CVEs: [N]
1397
- - Irreversible migrations: [N]
1398
- - CHANGELOG updated: [Yes/No/N/A]
1399
-
1400
- **Phase B Gate**: Cat 11 scores 10 only if verdict is **CONTAINED**.
1401
-
1402
- ## Spec Compliance
1403
-
1404
- ### [US1 Name]
1405
-
1406
- - [x/] Acceptance criterion 1
1407
- - [x/] Acceptance criterion 2
1408
-
1409
- ### [US2 Name]
1410
-
1411
- - [x/] Acceptance criterion 1
1412
-
1413
- ## Recommendations
1414
-
1415
- ### Before Merge (Must Fix)
1416
-
1417
- - [Red and Yellow findings requiring action]
1418
-
1419
- ### Future Improvements (Informational)
1420
-
1421
- - [Gray findings and suggestions]
1422
-
1423
- ## Evidence Table
1424
-
1425
- | Category | Score | Evidence Artifact / Command Output | Absent / Reason for 0 |
1426
- | --- | --- | --- | --- |
1427
- | 1 — Functional Correctness | [0/15/20] | [file path, executed `npm test` output with timestamp, or agent citation] | [reason if 0] |
1428
- | 2 — Test Authenticity | [0/15/20] | [file path, mutation output, or agent citation] | [reason if 0] |
1429
- | 3 — UI/E2E Verification | [0/10/N/A] | [`N/A — HAS_UI=false`, `Render proof only — deployment target not in scope`, or render/deploy artifact] | [reason if 0 or not in scope] |
1430
- | 4 — Security Posture | [0/10] | [agent finding citation] | [reason if 0] |
1431
- | 5 — Integration Reality | [0/10] | [runtime wiring proof, integration-test output, or agent citation] | [reason if 0] |
1432
- | 6 — Error Path Coverage | [0/10] | [agent finding citation] | [reason if 0] |
1433
- | 7 — Architecture Compliance | [0/10] | [agent finding citation] | [reason if 0] |
1434
- | 8 — Performance Baseline | [0/5] | [agent finding citation] | [reason if 0] |
1435
- | 9 — Code Hygiene | [0/10] | [agent finding citation] | [reason if 0] |
1436
- | 10 — Specification Traceability | [0/5] | [agent finding citation] | [reason if 0] |
1437
- | 11 — Blast Radius Containment | [0/10] | [blast-radius-report.md reference] | [reason if 0] |
1438
- | **Total** | **[N]/110** | | |
1439
- ```
1440
-
1441
- This evidence table is required on **EVERY run (PASS and FAIL)**.
1442
-
1443
- Each `Evidence Artifact / Command Output` cell MUST contain at least one of:
1444
-
1445
- - A file path visible in the current session
1446
- - An executed command and its real output (with timestamp)
1447
- - A sub-agent finding citation (agent name + finding ID)
1448
-
1449
- An empty evidence cell or a cell containing only inferences/assumptions MUST
1450
- cause that category to score 0.
1451
-
1452
- Category 11's evidence cell MUST cite `blast-radius-report.md`.
1453
-
1454
- When Category 3 is not in scope, the report preamble or row text MUST make the
1455
- redistribution explicit enough that normalization/effective contribution remains
1456
- derivable from the persisted report, and `Absent / Reason for 0` must record
1457
- the matching not-in-scope reason.
1458
-
1459
- ---
1460
-
1461
- ## Step 9: Determine Outcome
1462
-
1463
- ### If TOTAL = 110 and objective_gate_status = PASS: PASS (Phase A + B)
1464
-
1465
- ```
1466
- ════════════════════════════════════════════════════════════════
1467
- RUBRIC PASSED: [Feature Name]
1468
- ════════════════════════════════════════════════════════════════
1469
-
1470
- Score: 110/110
1471
-
1472
- Rubric:
1473
- ✓ Functional Correctness [15/20]/[15/20]
1474
- ✓ Test Authenticity [15/20]/[15/20]
1475
- ✓ UI/E2E Verification [10/10 or N/A]
1476
- ✓ Security Posture 10/10
1477
- ✓ Integration Reality 10/10
1478
- ✓ Error Path Coverage 10/10
1479
- ✓ Architecture Compliance 10/10
1480
- ✓ Performance Baseline 5/5
1481
- ✓ Code Hygiene 10/10
1482
- ✓ Specification Traceability 5/5
1483
- ✓ Blast Radius Containment 10/10
1484
-
1485
- Reports:
1486
- {FEATURE_DIR}/validation-report.md
1487
- {FEATURE_DIR}/blast-radius-report.md
1488
-
1489
- ════════════════════════════════════════════════════════════════
1490
- ```
1491
-
1492
- Proceed to **Phase C: Engineering Review Loop** (inline, Step 10a below), then
1493
- **Step 11: Attribution Logging** and **Step 12: Memory Update Check**.
1494
-
1495
- **No external auto-chain is needed** — Phase C runs inline in this command.
1496
- After Phase C completes, the feature pipeline is complete.
1497
-
1498
- ### If TOTAL < 110 or objective_gate_status = FAIL: FAIL
1499
-
1500
- Proceed to **Step 10: Brownfield Restart** (Phase C does not run when the rubric
1501
- fails — fix the rubric first).
1502
-
1503
- ---
1504
-
1505
- ## Step 10: Brownfield Restart Loop
1506
-
1507
- When validation fails (score < score_max), generate a remediation report and signal
1508
- the orchestrator to restart the pipeline focused on failed areas.
1509
-
1510
- ### 10.1 Check Iteration Count
1511
-
1512
- - If `ITERATION >= 3`: Generate **escalation report** instead (see 10.4)
1513
- - If `ITERATION < 3`: Generate **remediation report** and signal restart
1514
-
1515
- ### 10.2 Generate Remediation Report
1516
-
1517
- Write to `{FEATURE_DIR}/remediation-report.md`:
1518
-
1519
- ```markdown
1520
- ---
1521
- feature: [Feature Name]
1522
- iteration: [N]
1523
- score: [N]
1524
- score_max: 110
1525
- generated: [ISO timestamp]
1526
- failed_categories: [list]
1527
- ---
1528
-
1529
- # Remediation Report: [Feature Name]
1530
-
1531
- ## Iteration [N] of 3
1532
-
1533
- **Score**: [N]/110 **Status**: FAIL — Remediation Required
1534
-
1535
- ## Failed Categories
1536
-
1537
- ### [Category Name] (0/[points])
1538
-
1539
- **Evidence**: [Specific findings from agent reports]
1540
-
1541
- **Required Actions**:
1542
-
1543
- 1. [Specific action to fix this category]
1544
- 2. [Another specific action]
1545
-
1546
- **Files to modify**:
1547
-
1548
- - `path/to/file.ts:line` — [what to change]
1549
-
1550
- ### [Next Failed Category]
1551
-
1552
- ...
1553
-
1554
- ## Remediation Scope
1555
-
1556
- The following pipeline stages should re-run focused on these areas:
1557
-
1558
- - **Research**: [Any new research needed, or "Not needed"]
1559
- - **Plan**: [Any plan updates, or "Not needed"]
1560
- - **Implement**: [Specific tasks to re-implement]
1561
- - **Validate**: Re-run after fixes
1562
-
1563
- ## Previous Iterations
1564
-
1565
- | Iteration | Score | Failed Categories | Date |
1566
- | --------- | ------- | ----------------- | ------ |
1567
- | 1 | [N]/110 | [list] | [date] |
1568
- | 2 | [N]/110 | [list] | [date] |
1569
- ```
1570
-
1571
- ### 10.3 Signal Orchestrator
1572
-
1573
- Output the routing instruction:
1574
-
1575
- ```
1576
- ════════════════════════════════════════════════════════════════
1577
- VALIDATION FAILED: [Feature Name]
1578
- ════════════════════════════════════════════════════════════════
1579
-
1580
- Score: [N]/110
1581
- Iteration: [N] of 3
1582
-
1583
- Failed categories:
1584
- ✗ [Category] — 0/[points]: [brief reason]
1585
- ✗ [Category] — 0/[points]: [brief reason]
1586
-
1587
- Remediation report: {FEATURE_DIR}/remediation-report.md
1588
-
1589
- REMEDIATION REQUIRED: [feature-name]
1590
- Failed categories: [list]
1591
- Iteration: [N] of 3
1592
- Route: /5_gofer_implement → focused on [failed areas]
1593
-
1594
- ════════════════════════════════════════════════════════════════
1595
- ```
1596
-
1597
- Then proceed to **Step 11: Attribution Logging**.
1598
-
1599
- ### 10.4 Escalation (Iteration 3 Failure)
1600
-
1601
- If this is the 3rd iteration and validation still fails, generate
1602
- `{FEATURE_DIR}/escalation-report.md`:
1603
-
1604
- ```markdown
1605
- ---
1606
- feature: [Feature Name]
1607
- iteration: 3
1608
- final_score: [N]/110
1609
- escalated: [ISO timestamp]
1610
- ---
1611
-
1612
- # Escalation Report: [Feature Name]
1613
-
1614
- ## Human Review Required
1615
-
1616
- After 3 remediation attempts, the following categories still fail:
1617
-
1618
- ### [Category] — All 3 attempts failed
1619
-
1620
- **Iteration history**:
1621
-
1622
- 1. Score [N] — [what was tried]
1623
- 2. Score [N] — [what was tried]
1624
- 3. Score [N] — [what was tried]
1625
-
1626
- **Root cause assessment**: [Why automated remediation isn't working]
1627
-
1628
- **Recommended human action**: [What a developer should do]
1629
-
1630
- ## Full Score History
1631
-
1632
- | Iteration | Total | Cat1 | Cat2 | Cat3 | Cat4 | Cat5 | Cat6 | Cat7 | Cat8 | Cat9 | Cat10 | Cat11 |
1633
- | --------- | ----- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ----- | ----- |
1634
- | 1 | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] |
1635
- | 2 | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] |
1636
- | 3 | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] | [N] |
1637
- ```
1638
-
1639
- Output:
1640
-
1641
- ```
1642
- ════════════════════════════════════════════════════════════════
1643
- ESCALATION: [Feature Name]
1644
- ════════════════════════════════════════════════════════════════
1645
-
1646
- After 3 remediation attempts, validation still fails.
1647
- Score: [N]/110
1648
-
1649
- Escalation report: {FEATURE_DIR}/escalation-report.md
1650
-
1651
- This feature requires human review before proceeding.
1652
- The automated pipeline cannot resolve the remaining issues.
1653
-
1654
- ════════════════════════════════════════════════════════════════
1655
- ```
1656
-
1657
- ---
1658
-
1659
- # Phase C — Engineering Review Loop
1660
-
1661
- Phase C runs **only when the rubric passes** (110/110). It performs 1-5
1662
- iterative review→fix→re-review cycles using 3 additional review agents per
1663
- cycle, catching issues that the rubric-based validation might miss (edge cases,
1664
- race conditions, API-contract drift against the as-implemented code, spec spirit
1665
- violations).
1666
-
1667
- Phase C is the terminal stage of `/6_gofer_validate`. After Phase C completes,
1668
- the feature pipeline is complete.
1669
-
1670
- ## Step 10a: Initialize Phase C
1671
-
1672
- 1. **Guard**: only proceed if rubric `status == PASS` and the objective outcome
1673
- gate passes (Step 9 TOTAL = 110 and Step 1.5 PASS). If
1674
- FAIL, skip Phase C entirely — brownfield restart (Step 10) already triggered.
1675
-
1676
- 2. **Initialize cycle counter**: `CYCLE = 1`
1677
-
1678
- 3. **Initialize findings history**: Empty array to accumulate across cycles.
1679
-
1680
- 4. **Seed findings from Phase B Yellow/Gray**: All Yellow findings from the
1681
- blast-radius report are added to the Phase C finding list for mandatory
1682
- attention. Gray findings are logged but not auto-fixed.
1683
-
1684
- ## Step 10b: Spawn 3 Parallel Review Agents (Cycle N of 5)
1685
-
1686
- Launch all 3 agents **in parallel** using the Task tool. Each agent receives the
1687
- feature context and returns structured findings.
1688
-
1689
- ### Agent 13: Engineer Review (Spec↔Plan↔Tasks↔Research Alignment)
1690
-
1691
- ```
1692
- Task: subagent_type="engineer-review", model="sonnet"
1693
- Prompt: "Post-implementation engineering review for feature [FEATURE_NAME].
1694
-
1695
- Feature directory: {FEATURE_DIR}
1696
- Spec: {FEATURE_DIR}/spec.md
1697
- Plan: {FEATURE_DIR}/plan.md
1698
- Tasks: {FEATURE_DIR}/tasks.md
1699
- Research: {FEATURE_DIR}/research.md
1700
-
1701
- This is a POST-IMPLEMENTATION review (code is already written).
1702
- In addition to your standard spec↔plan↔tasks alignment checks:
1703
- 1. Verify spec completeness against research.md — are all research findings addressed?
1704
- 2. Check all acceptance criteria are addressed in the actual code (not just tasks)
1705
- 3. Verify research.md patterns were followed in implementation
1706
-
1707
- Return findings in your standard report format (<2000 tokens)."
1708
- ```
1709
-
1710
- ### Agent 14: Codebase Analyzer (Code↔Tasks Verification)
1711
-
1712
- ```
1713
- Task: subagent_type="codebase-analyzer", model="sonnet"
1714
- Prompt: "Post-implementation code verification for feature [FEATURE_NAME].
1715
-
1716
- Feature directory: {FEATURE_DIR}
1717
- Tasks: {FEATURE_DIR}/tasks.md
1718
-
1719
- Verify the following:
1720
- 1. Every task marked [x] in tasks.md has corresponding code changes — check file paths
1721
- 2. Search for TODO/FIXME/HACK comments in files listed in tasks.md
1722
- 3. Check for dead code or unused imports in changed files
1723
- 4. Verify any API contracts/interfaces match their actual implementations
1724
- 5. Check for inconsistencies between task descriptions and what was implemented
1725
-
1726
- Return findings with Red/Yellow/Gray severity (<2000 tokens).
1727
- Red = task marked complete but no code found, or API contract mismatch
1728
- Yellow = TODO/FIXME comments, unused imports, minor inconsistencies
1729
- Gray = style suggestions, optional improvements"
1730
- ```
1731
-
1732
- ### Agent 15: Correctness Re-verification
1733
-
1734
- ```
1735
- Task: subagent_type="validation-correctness", model="sonnet"
1736
- Prompt: "Post-implementation correctness re-verification for feature [FEATURE_NAME].
1737
-
1738
- Feature directory: {FEATURE_DIR}
1739
- Spec: {FEATURE_DIR}/spec.md
1740
- Plan: {FEATURE_DIR}/plan.md
1741
-
1742
- This is a focused re-check after validation passed. Look for issues that
1743
- rubric-based validation might miss:
1744
- 1. Edge cases from spec that may not have explicit tests
1745
- 2. Error handling completeness — are all failure modes covered?
1746
- 3. Race conditions or concurrency issues in async code
1747
- 4. Input validation at system boundaries
1748
- 5. Any acceptance criteria that are technically 'covered' by tests but
1749
- the implementation doesn't fully satisfy the spirit of the requirement
1750
-
1751
- Return findings with Red/Yellow/Gray severity (<2000 tokens).
1752
- Red = acceptance criterion not genuinely satisfied, critical error path missing
1753
- Yellow = edge case not covered, partial error handling
1754
- Gray = potential improvement, defensive coding suggestion"
1755
- ```
1756
-
1757
- **Run all 3 agents in parallel.** Collect all results before proceeding.
1758
-
1759
- ## Step 10c: Run Build/Test/Lint Verification
1760
-
1761
- Execute verification commands and capture results:
1762
-
1763
- ### Build Check
1764
-
1765
- ```bash
1766
- cd extension && npm run compile
1767
- ```
1768
-
1769
- ### Test Check
1770
-
1771
- ```bash
1772
- cd extension && npm test
1773
- ```
1774
-
1775
- ### Lint Check
1776
-
1777
- ```bash
1778
- cd extension && npm run lint
1779
- ```
1780
-
1781
- Record results:
1782
-
1783
- ```
1784
- | Check | Command | Result |
1785
- |--------|----------------------|-------------|
1786
- | Build | npm run compile | PASS / FAIL |
1787
- | Tests | npm test | PASS / FAIL |
1788
- | Lint | npm run lint | PASS / FAIL |
1789
- ```
1790
-
1791
- **If any check FAILS**: Record as a Red finding.
1792
-
1793
- ## Step 10d: Synthesize Findings
1794
-
1795
- Collect all agent reports and build/test/lint results. Merge with Phase B
1796
- Yellow/Gray carryovers. Classify each finding:
1797
-
1798
- - **Red** (blocking): Task marked complete but no code, API contract mismatch,
1799
- acceptance criterion not genuinely satisfied, build/test/lint failure,
1800
- critical error path missing
1801
- - **Yellow** (should fix): TODO/FIXME comments, unused imports, edge cases not
1802
- covered, partial error handling, minor inconsistencies, Phase B Yellows
1803
- - **Gray** (informational): Style suggestions, optional improvements, defensive
1804
- coding suggestions, Phase B Grays
1805
-
1806
- ### Compile Finding Table
1807
-
1808
- ```
1809
- | # | Finding | Severity | Source | File | Line | Status |
1810
- |---|---------|----------|---------------------------|--------|--------|--------|
1811
- | 1 | [desc] | Red | engineer-review | [file] | [line] | OPEN |
1812
- | 2 | [desc] | Yellow | codebase-analyzer | [file] | [line] | OPEN |
1813
- | 3 | [desc] | Yellow | phase-b:observability | [file] | [line] | OPEN |
1814
- ```
1815
-
1816
- ### Decision Logic
1817
-
1818
- - If **NO Red or Yellow findings** → PASS → proceed to Step 10g (Report)
1819
- - If **Red or Yellow findings exist** → proceed to Step 10e (Fix)
1820
-
1821
- ## Step 10e: Fix Findings
1822
-
1823
- For each Red and Yellow finding from the current cycle:
1824
-
1825
- 1. **Read the affected file** at the specified line
1826
- 2. **Apply the fix** directly using Edit tool
1827
- 3. **Mark the finding as FIXED** in the finding table
1828
-
1829
- ### Fix Priority
1830
-
1831
- 1. Red findings first (blocking issues)
1832
- 2. Yellow findings second (should fix)
1833
- 3. Gray findings are logged but NOT auto-fixed
1834
-
1835
- ### After Fixing
1836
-
1837
- Re-run build/test/lint to verify fixes don't introduce regressions:
1838
-
1839
- ```bash
1840
- cd extension && npm run compile && npm test && npm run lint
1841
- ```
1842
-
1843
- If the verification fails after fixes, record new failures as Red findings for
1844
- the next cycle.
1845
-
1846
- ## Step 10f: Loop or Complete
1847
-
1848
- ### Increment Cycle
1849
-
1850
- ```
1851
- CYCLE = CYCLE + 1
1852
- ```
1853
-
1854
- ### Decision
1855
-
1856
- - If `CYCLE <= 5` AND findings were fixed in the previous cycle → **Go to Step
1857
- 10b** (re-review with fresh agent runs to verify fixes and catch any new
1858
- issues)
1859
- - If `CYCLE > 5` AND Red/Yellow findings still remain → **Generate escalation
1860
- section** in the report, declare pipeline complete with warnings
1861
- - If **all findings resolved** (no Red or Yellow) → **Declare pipeline
1862
- complete** (proceed to Step 10g)
1863
-
1864
- ## Step 10g: Generate Engineering Review Report
1865
-
1866
- Write to `{FEATURE_DIR}/engineering-review-report.md`:
1867
-
1868
- ```markdown
1869
- ---
1870
- feature: [Feature Name]
1871
- reviewed: [ISO timestamp]
1872
- reviewer: Claude
1873
- status: [PASS/PASS_WITH_WARNINGS/ESCALATED]
1874
- cycles: [N]
1875
- total_findings: [N]
1876
- resolved_findings: [N]
1877
- blast_radius_carryovers: [N]
1878
- ---
1879
-
1880
- # Engineering Review Report: [Feature Name]
1881
-
1882
- ## Summary
1883
-
1884
- - **Status**: [PASS / PASS_WITH_WARNINGS / ESCALATED]
1885
- - **Review cycles**: [N] of 5 max
1886
- - **Total findings**: [N] (Red: [N], Yellow: [N], Gray: [N])
1887
- - **Resolved**: [N] findings fixed across [N] cycles
1888
- - **Remaining**: [N] findings (if any)
1889
- - **Phase B carryovers addressed**: [N] of [N]
1890
-
1891
- ## Cycle History
1892
-
1893
- ### Cycle 1
1894
-
1895
- **Agents**: engineer-review, codebase-analyzer, validation-correctness
1896
- **Build/Test/Lint**: [PASS/FAIL details]
1897
-
1898
- | # | Finding | Severity | Source | File | Line | Resolution |
1899
- | --- | ------- | -------- | ------ | ------ | ------ | ------------ |
1900
- | 1 | [desc] | [sev] | [src] | [file] | [line] | [FIXED/OPEN] |
1901
-
1902
- ### Cycle 2 (if applicable)
1903
-
1904
- ...
1905
-
1906
- ## Remaining Findings (if any)
1907
-
1908
- | # | Finding | Severity | Source | File | Line | Reason Not Fixed |
1909
- | --- | ------- | -------- | ------ | ------ | ------ | ---------------- |
1910
- | 1 | [desc] | [sev] | [src] | [file] | [line] | [why] |
1911
-
1912
- ## Recommendations
1913
-
1914
- ### Must Address Before Merge
1915
-
1916
- - [Any remaining Red/Yellow findings]
1917
-
1918
- ### Future Improvements
1919
-
1920
- - [Gray findings and suggestions]
1921
- ```
1922
-
1923
- ## Step 10g.5: Final Working Backwards PR/FAQ And CISO Summary
1924
-
1925
- After the validation report, blast-radius report, loop audit, and engineering
1926
- review report are written:
1927
-
1928
- 1. Update `{FEATURE_DIR}/working-backwards-prfaq.md`.
1929
- - Mark each Press Release claim as validated, changed, or unvalidated based
1930
- on `validation-report.md`, `blast-radius-report.md`,
1931
- `goal-rebaseline-report.md`, and `loop-audit-report.md`.
1932
- - Fill Internal FAQ CISO / Risk with data handled, identity controls,
1933
- workspace boundaries, secrets handling, residual risks, validation evidence,
1934
- and launch gates.
1935
- - Update "What happens if something goes wrong?" with rollback/support
1936
- evidence from validation and blast-radius analysis.
1937
- 2. Write `{FEATURE_DIR}/prfaq-history/06-validate.md` as an immutable final
1938
- validation snapshot.
1939
- 3. Create or update `{FEATURE_DIR}/ciso-security-summary.md` from
1940
- `.specify/templates/ciso-security-summary-template.md` using
1941
- `validation-report.md`, `blast-radius-report.md`, `audit-history.md`,
1942
- `visuals/risk-heatmap.md`, auth/workspace evidence, secrets/data handling
1943
- evidence, and loop audit evidence.
1944
- 4. Refresh `{FEATURE_DIR}/business-owner-summary.md` with final validation
1945
- status, business value confidence, and any validated/disproven assumptions.
1946
- 5. Refresh `{FEATURE_DIR}/cto-architecture-summary.md` with validation status,
1947
- blast-radius verdict, and any architecture/security exceptions.
1948
- 6. Update `{FEATURE_DIR}/stakeholder-review-index.md` and make the final
1949
- approve/revise/defer asks explicit:
1950
- - Business Owner: release value, user/process impact, assumptions.
1951
- - CTO / Architecture: platform/architecture evidence and exceptions.
1952
- - CISO / Risk: controls, residual risks, security posture, launch gate.
1953
- - Delivery: rollout, rollback, support, and evidence completeness.
1954
-
1955
- If any validation gate failed, write these documents honestly with `FAIL`,
1956
- `Pending`, or `Blocked` status; do not polish a failed feature as ready.
1957
-
1958
- ## Step 10h: Output Completion Banner
1959
-
1960
- ### If PASS (all findings resolved or no findings):
1961
-
1962
- ```
1963
- ════════════════════════════════════════════════════════════════
1964
- ENGINEERING REVIEW PASSED: [Feature Name]
1965
- ════════════════════════════════════════════════════════════════
1966
-
1967
- Cycles: [N] of 5 max
1968
- Findings: [N] found, [N] resolved
1969
- Report: {FEATURE_DIR}/engineering-review-report.md
1970
- Working Backwards PR/FAQ: {FEATURE_DIR}/working-backwards-prfaq.md
1971
- CISO summary: {FEATURE_DIR}/ciso-security-summary.md
1972
- Stakeholder review index: {FEATURE_DIR}/stakeholder-review-index.md
1973
-
1974
- ════════════════════════════════════════════════════════════════
1975
- FEATURE PIPELINE COMPLETE!
1976
-
1977
- All Gofer stages finished:
1978
- 1. /1_gofer_research ✓
1979
- 2. /2_gofer_specify ✓
1980
- 3. /3_gofer_plan ✓
1981
- 4. /4_gofer_tasks ✓
1982
- 5. /5_gofer_implement ✓
1983
- 6. /6_gofer_validate ✓ (Phase A ✓, Phase B ✓, Phase C ✓)
1984
-
1985
- The feature is ready for review and merge.
1986
- Stakeholder PR/FAQ and persona summaries are ready for Business Owner,
1987
- CTO/Architecture, CISO/Risk, and Delivery review.
1988
- ════════════════════════════════════════════════════════════════
1989
- ```
1990
-
1991
- ### If PASS_WITH_WARNINGS (5 cycles exhausted, only Gray remaining):
1992
-
1993
- ```
1994
- ════════════════════════════════════════════════════════════════
1995
- ENGINEERING REVIEW PASSED (WITH WARNINGS): [Feature Name]
1996
- ════════════════════════════════════════════════════════════════
1997
-
1998
- Cycles: 5 of 5 max
1999
- Findings: [N] found, [N] resolved, [N] Gray remaining
2000
- Report: {FEATURE_DIR}/engineering-review-report.md
2001
- Working Backwards PR/FAQ: {FEATURE_DIR}/working-backwards-prfaq.md
2002
- CISO summary: {FEATURE_DIR}/ciso-security-summary.md
2003
- Stakeholder review index: {FEATURE_DIR}/stakeholder-review-index.md
2004
-
2005
- ⚠ Gray findings remain — see report for details.
2006
-
2007
- ════════════════════════════════════════════════════════════════
2008
- FEATURE PIPELINE COMPLETE!
2009
-
2010
- All Gofer stages finished:
2011
- 1. /1_gofer_research ✓
2012
- 2. /2_gofer_specify ✓
2013
- 3. /3_gofer_plan ✓
2014
- 4. /4_gofer_tasks ✓
2015
- 5. /5_gofer_implement ✓
2016
- 6. /6_gofer_validate ✓ (Phase A ✓, Phase B ✓, Phase C ⚠)
2017
-
2018
- The feature is ready for review and merge (review Gray findings).
2019
- ════════════════════════════════════════════════════════════════
2020
- ```
2021
-
2022
- ### If ESCALATED (5 cycles exhausted, Red/Yellow remain):
2023
-
2024
- ```
2025
- ════════════════════════════════════════════════════════════════
2026
- ENGINEERING REVIEW ESCALATED: [Feature Name]
2027
- ════════════════════════════════════════════════════════════════
2028
-
2029
- Cycles: 5 of 5 max (exhausted)
2030
- Findings: [N] found, [N] resolved, [N] Red/Yellow remaining
2031
-
2032
- Remaining issues:
2033
- ✗ [Finding] — [severity]: [brief reason]
2034
-
2035
- Report: {FEATURE_DIR}/engineering-review-report.md
2036
- Working Backwards PR/FAQ: {FEATURE_DIR}/working-backwards-prfaq.md
2037
- CISO summary: {FEATURE_DIR}/ciso-security-summary.md
2038
- Stakeholder review index: {FEATURE_DIR}/stakeholder-review-index.md
2039
-
2040
- This feature requires human review of remaining findings
2041
- before merging.
2042
-
2043
- ════════════════════════════════════════════════════════════════
2044
- ```
2045
-
2046
- ---
2047
-
2048
- # End of Phase C
2049
-
2050
- ---
2051
-
2052
- ## Step 11: Attribution Logging
2053
-
2054
- Log every finding to `.specify/logs/validation-findings.jsonl`.
2055
- For EnterpriseAI runs, also mirror the same finding lifecycle to
2056
- `{FEATURE_DIR}/audit-history.md` so executive, architecture, CISO, data, CIO,
2057
- delivery, finance, operations, and risk/compliance stakeholders can see stable
2058
- finding IDs, recurrence, disposition, owner, expiry, and review cadence.
2059
-
2060
- ### Finding Format
2061
-
2062
- For each finding from all agents and automated checks, append a JSON line:
2063
-
2064
- ```json
2065
- {
2066
- "finding_id": "F[NNN]",
2067
- "timestamp": "[ISO timestamp]",
2068
- "feature": "[feature-name]",
2069
- "category": "[rubric_category_snake_case]",
2070
- "severity": "[red|yellow|gray]",
2071
- "description": "[finding description]",
2072
- "file": "[file path]",
2073
- "line": [line number or null],
2074
- "agent": "[agent name or 'automated']",
2075
- "resolution": null,
2076
- "iteration": [N]
2077
- }
2078
- ```
2079
-
2080
- ### Categories for `category` field
2081
-
2082
- - `functional_correctness`
2083
- - `test_authenticity`
2084
- - `ui_e2e_verification`
2085
- - `security_posture`
2086
- - `integration_reality`
2087
- - `error_path_coverage`
2088
- - `architecture_compliance`
2089
- - `performance_baseline`
2090
- - `code_hygiene`
2091
- - `specification_traceability`
2092
- - `blast_radius_containment` — **NEW** (Cat 11, Phase B)
2093
- - Sub-dimensions for the `dimension` sub-field: `change_graph`,
2094
- `interface_contract`, `observability`, `dependency_submodule`,
2095
- `rollback_release`
2096
- - `engineering_review` — Phase C findings (agent-specific sub-dimensions:
2097
- `spec_alignment`, `code_verification`, `correctness_reverify`)
2098
-
2099
- ### EnterpriseAI Persistent Audit Requirements
2100
-
2101
- `audit-history.md` MUST include:
2102
-
2103
- | Field | Requirement |
2104
- | ----- | ----------- |
2105
- | Finding ID | Stable across validation cycles; never renumber existing findings |
2106
- | Source | Rubric category, agent, automated check, or stakeholder gate |
2107
- | Status | Open, fixed, accepted, or escalated |
2108
- | Recurrence | Count and prior cycle references for repeated findings |
2109
- | Owner | Named accountable role or team |
2110
- | Expiry | Required for accepted exceptions |
2111
- | Evidence | Links to validation report, tests, contract pack, or code references |
2112
-
2113
- Recurring red findings must escalate to the relevant decision owner and block
2114
- launch unless explicitly accepted with owner, expiry, and review cadence.
2115
-
2116
- For application delivery, validation MUST also check
2117
- `{FEATURE_DIR}/journeys/base-journey.md` against the delivered implementation:
2118
-
2119
- - The app process has four user-facing steps or fewer, or an approved exception
2120
- explains why extra steps could not be combined, automated, or handled by
2121
- generative AI assistance.
2122
- - Each journey step preserves its business goal, AI assistance mode, data/context
2123
- used, completion signal, human controls, evidence/confidence display, audit
2124
- trail, and fallback/escalation path.
2125
- - `{FEATURE_DIR}/ui-review-log.md` contains at least one pre-presentation
2126
- self-review entry for each preview round that was shown to the stakeholder,
2127
- with screenshot, local render proof, Playwright-style evidence, or an
2128
- explicit reasoned exception.
2129
- - `{FEATURE_DIR}/ui-approval.md` records the approved preview, approved
2130
- branding/logo decisions, any approved EAI App Template exceptions, the
2131
- approver, and approval timestamp.
2132
- - `{FEATURE_DIR}/service-fit-matrix.md` records each desired platform
2133
- capability, the evidence source used to evaluate it, and whether it is
2134
- accessible now, purchasable but unavailable now, or unavailable without new
2135
- platform work.
2136
- - The delivered app uses EAI Platform, including the EAI app template, as the
2137
- primary app substrate and Azure as the preferred cloud/supporting substrate.
2138
- Any Firebase, Supabase, Vercel primary runtime, AWS, GCP, bespoke backend,
2139
- unmanaged database, or unrelated SaaS dependency is rejected unless it is
2140
- recorded as an approved integration/migration/exception with rationale, owner,
2141
- expiry, and validation evidence.
2142
- - The approved external/internal/hybrid profile choice, package lane, coupling
2143
- status, Storybook story IDs, theme override points, public-readiness target,
2144
- and custom-block exceptions are present in the preview/approval/service-fit
2145
- artifacts and match the delivered implementation.
2146
- - Validation confirms that app-delivery runs used EAI App Template blocks by
2147
- default and that any create-new UI concept was explicitly approved rather
2148
- than silently introduced.
2149
- - Validation confirms that block-porting tasks produced the expected package
2150
- surface and that public or hybrid lanes do not directly depend on source platform
2151
- internals unless an approved restricted-source exception is recorded.
2152
- - Chatbot, voice, accessibility, translation, contextual prefill, validation,
2153
- and step-goal assistance claims are covered by acceptance tests where they are
2154
- in scope.
2155
-
2156
- For explicit non-app work, validation MUST treat `ui-preview-brief.md`,
2157
- `ui-review-log.md`, `ui-approval.md`, and `service-fit-matrix.md` as
2158
- **not applicable** rather than as missing blocking artifacts.
2159
-
2160
- ### Log Summary Entry
2161
-
2162
- After all findings, append a summary entry:
2163
-
2164
- ```json
2165
- {
2166
- "finding_id": "SUMMARY",
2167
- "timestamp": "[ISO timestamp]",
2168
- "feature": "[feature-name]",
2169
- "category": "summary",
2170
- "severity": "info",
2171
- "description": "Validation score: [N]/110. Categories failed: [list or 'none']",
2172
- "file": null,
2173
- "line": null,
2174
- "agent": "rubric",
2175
- "resolution": "[PASS|FAIL|ESCALATED]",
2176
- "iteration": [N]
2177
- }
2178
- ```
2179
-
2180
- ### Historical Reference
2181
-
2182
- Before logging, read existing entries in `validation-findings.jsonl` for the
2183
- same feature. If the same finding (same file, same line, same category) appears
2184
- in a previous iteration, note it as a **repeat finding** in the description:
2185
-
2186
- ```
2187
- "description": "[REPEAT from iteration 1] expect(true).toBe(true) still present"
2188
- ```
2189
-
2190
- This enables tracking of findings that persist across remediation attempts.
2191
-
2192
- ---
2193
-
2194
- ## Step 12: Memory Update Check
2195
-
2196
- After validation, assess whether learnings should be persisted.
2197
-
2198
- ### 12.1 Memory Update Decision Matrix
2199
-
2200
- | Learning Type | Update Location | When to Update |
2201
- | ---------------------------- | ---------------------------- | ----------------------------------------- |
2202
- | **Project-wide patterns** | `CLAUDE.md` | New conventions affecting all future work |
2203
- | **Architectural decisions** | `.specify/memory/decisions/` | Significant design choices with rationale |
2204
- | **Feature-specific context** | `{FEATURE_DIR}/research.md` | Discoveries relevant only to this feature |
2205
- | **Reusable code patterns** | `CLAUDE.md` or constitution | Patterns other features should follow |
2206
- | **Bug workarounds** | `.specify/memory/decisions/` | Issues that may recur |
2207
-
2208
- ### 12.2 CLAUDE.md Update Criteria
2209
-
2210
- **DO update CLAUDE.md when**:
2211
-
2212
- - Discovered a new coding convention used across the codebase
2213
- - Identified a critical dependency or integration pattern
2214
- - Found a gotcha that affects multiple features
2215
- - Established a new testing or build pattern
2216
-
2217
- **DO NOT update CLAUDE.md when**:
2218
-
2219
- - Learning is specific to one feature
2220
- - Information will become stale quickly
2221
- - Pattern is already documented elsewhere
2222
- - Change is experimental/temporary
2223
-
2224
- ### 12.3 Memory Update Checklist
2225
-
2226
- Before completing validation, verify:
2227
-
2228
- - [ ] Any project-wide patterns discovered -> added to CLAUDE.md?
2229
- - [ ] Any significant decisions made -> recorded in decisions/?
2230
- - [ ] Any gotchas or workarounds -> documented for future reference?
2231
- - [ ] Feature-specific learnings -> captured in research.md?
2232
-
2233
- ---
2234
-
2235
- ## Observability Logging
2236
-
2237
- At stage completion, log metrics:
2238
-
2239
- ```bash
2240
- .specify/scripts/bash/log-stage.sh 6_validate --complete --tokens [N] --compactions [N]
2241
- ```
2242
-
2243
- This also logs quality metrics (rubric scores, finding counts) to:
2244
- `.specify/logs/quality-metrics.jsonl`
2245
-
2246
- ---
2247
-
2248
- ## Key Rules
2249
-
2250
- ### Phase A (Rubric)
2251
-
2252
- - **110/110 is the only passing score** — there is no "close enough"
2253
- - **Agents run in parallel** — spawn all 6 (or 7 with red team) at once, do not
2254
- serialize
2255
- - **Red findings block** — any Red finding in any agent zeroes that category
2256
- - **Mutation testing is optional** — gracefully degrade when Stryker absent
2257
- - **Mock ratio excludes justified mocks** — mark with `// mock-justified:`
2258
- comment
2259
- - **Maximum 3 remediation iterations** — then escalate to human
2260
-
2261
- ### Phase B (Blast Radius)
2262
-
2263
- - **5 blast-radius agents run in parallel** — do not serialize across dimensions
2264
- - **The change manifest is ground truth** — build it once in Step 2.5, pass the
2265
- same manifest to every Phase B agent
2266
- - **Breaking change + no CHANGELOG entry = Red** — always. Release-checklist
2267
- compliance is mandatory for user-visible changes.
2268
- - **New High/Critical CVE = Red** — block before merge; Moderate is Yellow; Low
2269
- is Gray
2270
- - **Cross-submodule ripple requires explicit plan.md approval** — otherwise Red
2271
- - **Blast-radius verdict CONTAINED gives Cat 11 = 10**; BREACHED gives Cat 11 =
2272
- 0 — this is the only way Cat 11 scores
2273
- - **Phase B writes `blast-radius-report.md`** alongside `validation-report.md`
2274
- - **Phase B Yellows seed Phase C** — Phase C must address them
2275
-
2276
- ### Phase C (Engineering Review Loop)
2277
-
2278
- - **3 review agents per cycle** — spawn all in parallel, do not serialize
2279
- - **5 cycles maximum** — hard cap to prevent infinite loops
2280
- - **Fix Red before Yellow** — priority ordering matters
2281
- - **Re-verify after fixes** — always re-run build/test/lint after changes
2282
- - **Gray findings are logged, not auto-fixed** — they go in the report
2283
- - **Phase C only runs if the rubric passes** — a failing rubric triggers
2284
- brownfield restart instead
2285
- - **This stage is the pipeline terminal** — "PIPELINE COMPLETE" only appears at
2286
- the end of Phase C
2287
- - **Engineering review is inline** — there is no separate follow-up stage after
2288
- validation
2289
-
2290
- ### Across All Phases
2291
-
2292
- - **Attribution logging is mandatory** — every finding (A, B, C) gets logged to
2293
- JSONL with its phase and sub-dimension
2294
- - **Be specific** — cite file paths and line numbers for all findings
2295
- - **Score the rubric honestly** — the goal is to catch real problems, not to
2296
- pass
2297
- - Log stage completion for observability tracking