@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,899 +0,0 @@
1
- ---
2
- name: 3_gofer_plan
3
- description: "Create a detailed technical implementation plan with architecture, data model, and contracts."
4
- ---
5
-
6
- ## Workspace Preflight
7
-
8
- Before doing stage/helper work:
9
-
10
- 1. Resolve the repository root.
11
- 2. Check the core Gofer sentinels:
12
- - `.specify/.gofer-version`
13
- - `.specify/commands/0_gofer_start.md`
14
- - `.specify/templates/spec-template.md`
15
- - `.specify/templates/loop-contract-template.json`
16
- - `.specify/templates/working-backwards-prfaq-template.md`
17
- - `.specify/templates/business-owner-summary-template.md`
18
- - `.specify/templates/cto-architecture-summary-template.md`
19
- - `.specify/templates/ciso-security-summary-template.md`
20
- - `.specify/templates/stakeholder-review-index-template.md`
21
- - `.specify/scripts/bash/create-new-feature.sh`
22
- - `.specify/scripts/node/parse-stage-command.mjs`
23
- - `.specify/scripts/node/gofer-loop-audit.mjs`
24
- - `.specify/scripts/hooks/post-tool-use.mjs`
25
- - `.specify/scripts/powershell/install-optional-tools.ps1`
26
- - `.specify/templates/gofer-model-policy.yaml`
27
- - `.specify/memory/gofer-model-policy.yaml`
28
- - `.specify/specs/`
29
- - `.specify/memory/`
30
- 3. Check host-specific repo-owned files when relevant:
31
- - Claude: `AGENTS.md`, `CLAUDE.md`, `.claude/settings.json`
32
- - Codex: `AGENTS.md`
33
- - Copilot: `.github/copilot-instructions.md`
34
- - VS Code extension mirrors Claude/Copilot/Gemini resources itself and should still keep the core scaffold healthy
35
- 4. If the repo already has the workspace checker script, prefer running:
36
- - `node .specify/scripts/node/gofer-workspace-check.mjs --host codex --json`
37
- 5. If the workspace is missing or stale, ask exactly:
38
- - **"This repo is missing or stale for Gofer. Initialize/update it now?"**
39
- 6. If the user says yes, run the Gofer workspace bootstrap helper and then resume this command from the top.
40
- 7. If the user says no, stop and explain that Gofer stage/helper work depends on the repo-owned scaffold.
41
-
42
- ---
43
- description:
44
- Generate technical implementation plan with architecture and contracts
45
- ---
46
-
47
- # Gofer Plan
48
-
49
- ## EAI Platform Session Preflight
50
-
51
- Before any Gofer stage/helper command does pipeline work:
52
-
53
- 1. Treat durable delivery as EAI Platform delivery by default, with Azure second
54
- and every other stack only by explicit exception.
55
- 2. Run `eai whoami` and confirm the EAI CLI is installed, the user is logged in,
56
- and an active workspace is visible.
57
- 3. If `eai` is missing, `eai whoami` fails, the token is expired, or no active
58
- workspace is available, stop and run `/gofer:eai-first-run` or ask the user to
59
- approve login/setup before continuing.
60
- 4. For EAI app delivery, do not continue into research, specification, planning,
61
- tasks, implementation, or validation until
62
- `.specify/specs/{feature}/eai-preflight.md` records login, workspace, template,
63
- app-readiness, and next-action evidence.
64
- 5. Do not write tokens, secrets, private workspace IDs, Entra/CIAM authority tenant IDs, or local `.env` values into
65
- Gofer artifacts; record only product-safe readiness status and evidence.
66
-
67
- ## Token And Cost Policy
68
- <!-- gofer:token-cost-policy:start -->
69
-
70
- Before spawning agents, calling tools, or loading large files:
71
-
72
- 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.
73
- 2. Use the cheapest capable model first.
74
- - Claude: Haiku for scouting/extraction; Sonnet for normal implementation, synthesis, validation, and security; Opus for high-risk arbitration or release-critical failures.
75
- - 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.
76
- - Gemini: Flash-Lite for cheap large-context scan/summarize; Flash for default research synthesis; Pro for large-context architecture or high-risk arbitration.
77
- - 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.
78
- 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.
79
- 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.
80
- 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.
81
- 6. Escalate model tier only when a cheaper pass is low-confidence, contradictory, security-sensitive, or blocking release quality.
82
- <!-- gofer:token-cost-policy:end -->
83
-
84
- ## User Input
85
-
86
- ```text
87
- $ARGUMENTS
88
- ```
89
-
90
- You **MUST** consider the user input before proceeding (if not empty).
91
-
92
- ## Execution Profile And Planning Surface
93
-
94
- Use the research/spec risk classification to choose planning depth:
95
-
96
- - **fast**: produce the smallest viable plan, only for docs-only or very small
97
- low-risk work.
98
- - **standard**: produce the normal plan, data/contracts only when relevant, and
99
- a concrete test strategy. Standard is the catch-all for work that is not fast,
100
- full, or dynamic.
101
- - **full**: include contract compatibility, auth/security, data migration,
102
- infra/config, rollback, and release sequencing where the generic risk labels
103
- require them.
104
- - **dynamic**: produce a workflow DAG, shard plan, reducer plan,
105
- verifier/refuter pass, resumable progress ledger, budget limits, and stop
106
- conditions before implementation starts.
107
-
108
- Avoid artifact churn. Optional diagrams, extended architecture councils,
109
- generated issue packs, and broad release plans are only warranted when risk is
110
- full/dynamic-depth or the user asks for them.
111
-
112
- ## Prerequisites
113
-
114
- This command expects in `.specify/specs/{feature}/`:
115
-
116
- - `research.md` - Codebase analysis (from /1_gofer_research)
117
- - `spec.md` - Feature specification (from /2_gofer_specify)
118
- - `goal-ledger.json` - Objective ledger and re-loop triggers (from /1 and /2)
119
- - `loop-contract.json` - Bounded check-repair contract (from /1 and /2)
120
-
121
- If missing, prompt user to run the prerequisite stage.
122
-
123
- ---
124
-
125
- ## Spec Artifact Guard
126
-
127
- `spec.md` is the source of truth for scope, acceptance criteria, protected
128
- boundaries, and downstream traceability. Before planning, the setup script must
129
- confirm `{FEATURE_DIR}/spec.md` exists, is non-empty, and is not the raw
130
- `spec-template.md` placeholder seeded by feature bootstrap. If
131
- `.specify/scripts/bash/setup-plan.sh --json` reports that `spec.md` is missing,
132
- empty, or `template`, stop and run `/2_gofer_specify`; do not create or refresh
133
- `plan.md` from research alone.
134
-
135
- ## Outline
136
-
137
- 1. Context health check
138
- 2. Load context (lightweight)
139
- 3. Dispatch parallel planning agents (sub-agents handle heavy generation)
140
- 4. Review agent outputs
141
- 5. Optional multi-perspective review
142
- 6. Spec coverage validation
143
- 7. Output: `plan.md`, `data-model.md`, `contracts/`, `quickstart.md`
144
- 8. Stakeholder PR/FAQ output: `working-backwards-prfaq.md`,
145
- `prfaq-history/03-plan.md`, `cto-architecture-summary.md`, and
146
- `stakeholder-review-index.md`
147
- 9. EnterpriseAI profile output: task-ready references to `context-bundle.md`,
148
- `contract-pack.md`, `reuse-scan.md`, `audit-history.md`, and for app
149
- delivery `ui-review-log.md`, `ui-approval.md`, and
150
- `service-fit-matrix.md`, including public-readiness, block-porting, source platform
151
- decoupling, Storybook, theme override, and package-profile decisions
152
- 10. Dynamic-only output: `workflow-dag.md` with shards, inputs, outputs,
153
- reducer expectations, verifier/refuter evidence, budget limits, stop
154
- conditions, and resumable progress location
155
-
156
- ---
157
-
158
- ## Step 0: Context Health Check
159
-
160
- Before starting planning, assess context window health:
161
-
162
- ```bash
163
- .specify/scripts/bash/check-context-health.sh
164
- ```
165
-
166
- - If **< 50%**: Proceed normally
167
- - If **50-70%**: Consider `/compact` - planning loads multiple documents
168
- - If **> 70%**: Start new session with handoff summary
169
-
170
- Planning dispatches multiple agents — keep main context lightweight.
171
-
172
- ---
173
-
174
- ## Step 1: Load Context (Lightweight)
175
-
176
- 1. **Run setup script**:
177
-
178
- ```bash
179
- .specify/scripts/bash/setup-plan.sh --json
180
- ```
181
-
182
- Parse JSON for FEATURE_DIR, FEATURE_SPEC, BRANCH
183
-
184
- 2. **Scan existing documents** (do NOT load full content — agents read
185
- directly):
186
- - Note feature name from FEATURE_DIR
187
- - Note whether `discovery.md`, `.specify/memory/constitution.md` exist
188
- - Note whether `ui-preview-brief.md`, `ui-review-log.md`,
189
- `ui-approval.md`, and `service-fit-matrix.md` exist
190
- - Note external/internal/hybrid profile choice, package lane, coupling
191
- status, Storybook story IDs, theme override points, custom-block
192
- exceptions, and public-readiness status when app delivery applies
193
- - Note whether `goal-ledger.json` exists and which goals, delivery states,
194
- and re-loop triggers must remain valid through planning
195
- - Note whether `loop-contract.json` exists and which evaluation commands,
196
- maximum iterations, stop conditions, and escalation triggers must be
197
- reflected in implementation phases
198
- - If loop-contract.json is missing, initialize it with
199
- `node .specify/scripts/node/gofer-loop-audit.mjs --feature-dir {FEATURE_DIR} --stage 3_plan --init --json`
200
- - Note whether `{FEATURE_DIR}/sequence-diagrams/selected-option.md` exists
201
-
202
- 3. **Note template path**: `.specify/templates/plan-template.md`
203
-
204
- ---
205
-
206
- ## Step 2: Dispatch Planning Agents
207
-
208
- **CRITICAL**: You **MUST** launch these agents using the Task tool. Do NOT
209
- perform this work inline in the main context. The main context should only
210
- orchestrate and review agent outputs. Each agent reads source documents
211
- independently and writes its output artifact.
212
-
213
- ### Agent 1: Implementation Plan Writer
214
-
215
- ```
216
- Task: subagent_type="general-purpose", model="sonnet"
217
- Prompt: "Generate a complete technical implementation plan for [FEATURE_NAME].
218
-
219
- Feature directory: {FEATURE_DIR}
220
-
221
- Read these files for full context:
222
- - {FEATURE_DIR}/research.md — Technology decisions, integration points, patterns, constraints
223
- - {FEATURE_DIR}/spec.md — User stories, requirements, success criteria
224
- - {FEATURE_DIR}/goal-ledger.json — business goals, metrics, delivery states, and re-loop triggers
225
- - {FEATURE_DIR}/loop-contract.json — bounded loop objective, evaluation commands, max iterations, stop conditions, and escalation rules
226
- - {FEATURE_DIR}/ui-preview-brief.md — app-delivery preview brief (read if exists, skip if not)
227
- - {FEATURE_DIR}/ui-review-log.md — app-delivery preview iteration history (read if exists, skip if not)
228
- - {FEATURE_DIR}/ui-approval.md — app-delivery approval state (read if exists, skip if not)
229
- - {FEATURE_DIR}/service-fit-matrix.md — app-delivery capability selections (read if exists, skip if not)
230
- - .specify/templates/plan-template.md — Plan template structure
231
- - .specify/memory/constitution.md — Project principles (read if exists)
232
- - {FEATURE_DIR}/sequence-diagrams/selected-option.md — Selected approach (read if exists)
233
-
234
- Generate the COMPLETE plan.md with these sections:
235
-
236
- 1. YAML frontmatter: feature, spec, research, status: ready, created (ISO date)
237
- 2. Technical Context:
238
- - Tech Stack (language, framework, database, testing — from research)
239
- - Architecture (how components fit together, with diagram description)
240
- - Integration Points table (Component | File | Integration Type)
241
- - Key Dependencies (existing modules, libraries)
242
- 3. Selected Implementation Approach (if selected-option.md exists):
243
- - Option number, scores, Gen AI touchpoints
244
- 4. Constitution Check (if constitution.md exists):
245
- - Verify alignment with each project principle
246
- 5. Implementation Phases (5 phases):
247
- - Phase 1: Setup & Foundation (directory structure, config, deps, base types)
248
- - Phase 2: Data Layer (entities, persistence, validation)
249
- - Phase 3: Business Logic (services per user story, business rules, integrations)
250
- - Phase 4: API/Interface Layer (endpoints per contracts, validation, auth)
251
- - Phase 5: Polish & Integration (logging, docs, performance, final testing)
252
- Each phase must have: Goal, Tasks (checkboxed), Verification criteria
253
- 6. File Structure (tree diagram of all new/modified files)
254
- 7. Risk Assessment table (Risk | Impact | Mitigation)
255
- 8. Spec Traceability:
256
- - User Story Coverage (Story | Status | Plan References)
257
- - Requirement Coverage (FR-ID | Status | Plan Reference)
258
- Verify 100% coverage of all user stories and functional requirements.
259
- 9. Goal Reconciliation And Dual-State Delivery:
260
- - Goal IDs, outcome metrics, target thresholds, and where they are delivered
261
- - Delivery states (`mock`, `hybrid`, `live`) plus promotion criteria
262
- - Re-loop triggers that should send the feature back to specify, plan, tasks,
263
- or validate when contracts, UX scope, assumptions, or implementation drift
264
- 10. Loop Engineering Plan:
265
- - Evaluation commands from loop-contract.json and where they run
266
- - Maximum check-repair iteration count per implementation/validation loop
267
- - Stop conditions and human escalation triggers
268
- - Required ledger evidence to append after each focused loop
269
- 11. AI-Readable Blocks Bridge:
270
- - Package profile choice: external, internal, or hybrid
271
- - Package lane for each UI block or package surface
272
- - Coupling status, including source-platform decoupling boundary or approved
273
- restricted-source exception
274
- - Block porting plan with stable block IDs, Storybook story IDs, theme
275
- override points, and custom-block exceptions
276
- - Public-readiness tasks required before an external or hybrid package is
277
- considered complete
278
-
279
- Rules:
280
- - Every user story from spec.md MUST have plan coverage
281
- - Every acceptance criterion MUST map to a plan component
282
- - Every functional requirement MUST be addressed
283
- - Reference specific file paths for all components
284
- - Plan must be specific enough for task generation
285
- - Resolve all unknowns — no NEEDS CLARIFICATION in the plan
286
- - App-delivery plans MUST make public-readiness, block porting, source platform
287
- decoupling, Storybook coverage, theme overrides, and package-profile work
288
- visible enough for `/4_gofer_tasks` to emit first-class runnable tasks
289
- - Keep `goal-ledger.json` aligned with any planning-level changes to goals,
290
- delivery states, or re-loop triggers
291
- - Keep `loop-contract.json` aligned with plan-level verification commands, stop
292
- conditions, and release-critical escalation paths
293
-
294
- Write the complete plan to {FEATURE_DIR}/plan.md.
295
-
296
- Return a structured summary:
297
- - Phase count and task count per phase
298
- - User story coverage: N/N covered
299
- - FR coverage: N/N covered
300
- - Key architecture decisions made
301
- - Any risks flagged as HIGH"
302
- ```
303
-
304
- ### Agent 2: Data Model Designer
305
-
306
- ```
307
- Task: subagent_type="general-purpose", model="sonnet"
308
- Prompt: "Design the data model for feature [FEATURE_NAME].
309
-
310
- Feature directory: {FEATURE_DIR}
311
-
312
- Read these files:
313
- - {FEATURE_DIR}/spec.md — User stories, requirements, key entities
314
- - {FEATURE_DIR}/research.md — Existing data patterns, database context
315
-
316
- If spec.md defines Key Entities or the feature involves data:
317
-
318
- Generate {FEATURE_DIR}/data-model.md with:
319
- 1. Entity definitions with field tables (Field | Type | Required | Description)
320
- 2. Validation rules for each entity
321
- 3. Relationships between entities
322
- 4. State transition diagrams (Mermaid stateDiagram-v2) where applicable
323
- 5. Database considerations (indexing, migration approach)
324
- 6. Entity-to-UserStory mapping (which stories need which entities)
325
-
326
- If the feature does NOT involve data entities:
327
- Write a minimal data-model.md noting 'No data entities required for this feature.'
328
-
329
- Return: entity count, relationship count, entities with state machines"
330
- ```
331
-
332
- ### Agent 3: API Contract Designer
333
-
334
- ```
335
- Task: subagent_type="general-purpose", model="sonnet"
336
- Prompt: "Design API contracts for feature [FEATURE_NAME].
337
-
338
- Feature directory: {FEATURE_DIR}
339
-
340
- Read these files:
341
- - {FEATURE_DIR}/spec.md — Functional requirements implying API endpoints
342
- - {FEATURE_DIR}/research.md — Existing API patterns, conventions
343
-
344
- If spec.md implies API endpoints (REST, internal, events):
345
-
346
- Create contract files in {FEATURE_DIR}/contracts/:
347
- - api.md — For REST/HTTP endpoints
348
- - internal-api.md — For service-to-service contracts
349
- - events.md — For event-based contracts
350
-
351
- Each endpoint must include:
352
- - Method and path
353
- - Description
354
- - Request schema (JSON example)
355
- - Response schema (JSON example with status code)
356
- - Error codes table (Code | Description)
357
- - Which user story/FR it serves
358
-
359
- If the feature has NO APIs:
360
- Create {FEATURE_DIR}/contracts/api.md noting 'No API endpoints required.'
361
-
362
- Return: endpoint count, contract files created, user stories served"
363
- ```
364
-
365
- ### Agent 4: Quickstart Guide Writer
366
-
367
- ```
368
- Task: subagent_type="general-purpose", model="haiku"
369
- Prompt: "Generate a quickstart testing guide for feature [FEATURE_NAME].
370
-
371
- Feature directory: {FEATURE_DIR}
372
-
373
- Read these files:
374
- - {FEATURE_DIR}/spec.md — What to test (acceptance criteria)
375
- - {FEATURE_DIR}/research.md — Tech stack and testing framework info
376
-
377
- Write {FEATURE_DIR}/quickstart.md with:
378
- 1. Prerequisites (what needs to be installed/configured)
379
- 2. Setup steps (how to get the feature running)
380
- 3. Manual Testing section (step-by-step test scenarios from acceptance criteria)
381
- 4. Automated Tests section (test commands)
382
- 5. Key Files table (File | Purpose)
383
- 6. Common Issues section (anticipated problems and solutions)
384
-
385
- Return: scenario count, prerequisite count"
386
- ```
387
-
388
- **Run all 4 agents in parallel.** Agents 2-4 read spec.md independently while
389
- Agent 1 generates the plan.
390
-
391
- ### Agent 5-7: Visual Writers (Persona-Pack)
392
-
393
- After the planning agents complete and write plan.md, data-model.md, and
394
- contracts, dispatch three visual-writer sub-agents in parallel to produce the
395
- developer-persona-pack visuals:
396
-
397
- ```
398
- Task: subagent_type="visual-c4-writer", model="haiku"
399
- Prompt: "Generate C4 Context and Container diagrams for {FEATURE_NAME}.
400
- Feature dir: {FEATURE_DIR}. Read spec.md, research.md, plan.md.
401
- Output to {FEATURE_DIR}/visuals/c4-context.md and c4-container.md."
402
-
403
- Task: subagent_type="visual-bounded-context-writer", model="haiku"
404
- Prompt: "Generate bounded-context map for {FEATURE_NAME}.
405
- Feature dir: {FEATURE_DIR}. Read plan.md, data-model.md, contracts/.
406
- Output to {FEATURE_DIR}/visuals/bounded-context.md."
407
-
408
- Task: subagent_type="visual-erd-writer", model="haiku"
409
- Prompt: "Generate data-model ERD for {FEATURE_NAME}.
410
- Feature dir: {FEATURE_DIR}. Read data-model.md.
411
- Output to {FEATURE_DIR}/visuals/data-model-erd.md."
412
- ```
413
-
414
- These three artifacts (c4-container.md, bounded-context.md, data-model-erd.md)
415
- are required for the developer persona pack. The persona-pack completeness gate
416
- at /4_gofer_tasks start will warn if any are missing.
417
-
418
- Visual quality requirements for all planning visuals:
419
-
420
- - Answer one review question per visual; split rather than crowding when a
421
- diagram has more than about seven primary nodes or steps.
422
- - Include a plain-language preamble, audience, source inputs, and how to read
423
- the visual.
424
- - Use C4 context/container for boundaries and runtime units, ERD for data,
425
- sequence/state for flows, heatmaps for risk/capability priority, and
426
- screenshots/storyboards for UI behavior.
427
- - Keep visuals source-controlled and renderable via Mermaid/D2/Structurizr-style
428
- text where practical; otherwise include a markdown-table/text fallback.
429
- - Generate Marp slide output when stakeholder review needs a simple presentation
430
- story; skip it only for small docs-only or mechanical changes where Markdown is
431
- clearer.
432
- - Ensure every human-facing document produced by planning starts with a
433
- three-to-five-bullet executive summary in plain language.
434
- - Link each visual to the requirement, plan decision, contract, code/test path,
435
- EAI service/template asset, or validation evidence it summarizes.
436
- - Do not include workspace-private data, secrets, customer identifiers, or
437
- screenshots containing private content.
438
-
439
- ### Dynamic-Only: Workflow DAG Writer
440
-
441
- When `effectiveProfile=dynamic`, write `{FEATURE_DIR}/workflow-dag.md` before
442
- task generation. It must define:
443
-
444
- - independent shards and why they can run separately
445
- - input artifacts each shard may read
446
- - output artifacts each shard must produce
447
- - reducer synthesis expectations
448
- - verifier/refuter checks for contradictions or overreach
449
- - budget limits, stop conditions, and confirmation gates
450
- - resumable progress location outside the chat transcript
451
-
452
- ---
453
-
454
- ## Step 3: Review Agent Outputs
455
-
456
- After all agents complete:
457
-
458
- 1. **Review plan.md** — Verify from Agent 1:
459
- - All user stories have plan coverage (check Spec Traceability section)
460
- - All functional requirements are addressed
461
- - Implementation phases are specific enough for task generation
462
- - File structure is consistent with existing codebase patterns
463
-
464
- 2. **Review data-model.md** — Verify from Agent 2:
465
- - All spec entities are covered
466
- - Relationships make sense
467
- - Validation rules are complete
468
-
469
- 3. **Review contracts** — Verify from Agent 3:
470
- - All implied API endpoints are defined
471
- - Request/response schemas are realistic
472
- - Error codes are appropriate
473
-
474
- 4. **Review quickstart.md** — Verify from Agent 4:
475
- - Test scenarios cover key acceptance criteria
476
- - Setup steps are realistic
477
-
478
- 5. **Fix any gaps** — Make targeted edits to any artifact with missing coverage
479
-
480
- ---
481
-
482
- ## Step 4: Spec Coverage Validation (GAP-01)
483
-
484
- Dispatch a validator agent to cross-check plan against spec:
485
-
486
- ```
487
- Task: subagent_type="general-purpose", model="haiku"
488
- Prompt: "Validate plan coverage of specification for feature at {FEATURE_DIR}.
489
-
490
- Read:
491
- - {FEATURE_DIR}/spec.md — Source of truth for requirements
492
- - {FEATURE_DIR}/plan.md — Implementation plan to validate
493
- - {FEATURE_DIR}/data-model.md — Data model to validate
494
- - {FEATURE_DIR}/contracts/ — API contracts to validate (read all .md files)
495
-
496
- Check these coverage dimensions:
497
-
498
- 1. USER STORY COVERAGE: Every user story in spec.md has at least one plan phase
499
- 2. ACCEPTANCE CRITERIA MAPPING: Every AC maps to a plan component
500
- 3. FUNCTIONAL REQUIREMENT COVERAGE: Every FR-XXX is addressed in plan
501
- 4. DATA MODEL COMPLETENESS: All Key Entities from spec appear in data-model.md
502
- 5. API CONTRACT COMPLETENESS: All implied APIs from spec have contracts
503
-
504
- For each dimension, report:
505
- - COVERED items with references
506
- - MISSING items (ERROR — must be fixed)
507
-
508
- Return:
509
- - Coverage percentage per dimension
510
- - List of MISSING items
511
- - Overall PASS/FAIL status"
512
- ```
513
-
514
- If validator reports MISSING items:
515
-
516
- - Add missing components to the appropriate artifact
517
- - Re-validate (max 3 iterations)
518
- - **Proceed only when ALL spec items are traced to plan components**
519
-
520
- ---
521
-
522
- ## Step 5: Multi-Perspective Plan Review (Optional)
523
-
524
- After generating the initial plan, optionally run multi-perspective strategies
525
- to stress-test architectural decisions. **Skip this step if the plan is
526
- straightforward or time-constrained.**
527
-
528
- ### Strategy #2: Solution Architecture Diverger
529
-
530
- For features with significant architectural decisions, spawn 5 agents each using
531
- a different pattern:
532
-
533
- ```
534
- Task: subagent_type="plan-architecture-diverger", model="sonnet"
535
- Prompt: "Design architecture for [FEATURE] using Pattern [1-5].
536
- Pattern 1: Microservices/modular 2: Monolithic/cohesive 3: Event-sourced
537
- 4: CQRS 5: Plugin-based
538
- Spec: [FEATURE_DIR]/spec.md Plan context: [summary of current plan]"
539
- ```
540
-
541
- Run all 5 in parallel, then judge:
542
-
543
- ```
544
- Task: subagent_type="multi-perspective-judge", model="opus"
545
- Prompt: "Judge verdict type: architecture selection.
546
- Select the best architecture for this feature considering codebase fit, complexity, and testability.
547
- [paste all 5 agent outputs]"
548
- ```
549
-
550
- ### Strategy #5: API Design Comparator
551
-
552
- For features with API surfaces, compare paradigms:
553
-
554
- ```
555
- Task: subagent_type="plan-api-comparator", model="sonnet"
556
- Prompt: "Design API for [FEATURE] using Paradigm [1-4].
557
- Paradigm 1: REST 2: GraphQL 3: RPC 4: Event-based
558
- Requirements: [API requirements from spec]"
559
- ```
560
-
561
- Run 3-4 in parallel, then judge:
562
-
563
- ```
564
- Task: subagent_type="multi-perspective-judge", model="opus"
565
- Prompt: "Judge verdict type: API paradigm selection.
566
- [paste all agent outputs]"
567
- ```
568
-
569
- ### Strategy #7: Refactor vs Rewrite Advisor
570
-
571
- For features that modify existing code significantly:
572
-
573
- ```
574
- Task: subagent_type="plan-refactor-rewrite-advisor", model="sonnet"
575
- Prompt: "Perspective [1/2] for changing [CODE AREA].
576
- Perspective 1: Plan minimal incremental refactor
577
- Perspective 2: Plan clean rewrite
578
- Current code: [file paths and summary]"
579
- ```
580
-
581
- Run both in parallel, then judge:
582
-
583
- ```
584
- Task: subagent_type="multi-perspective-judge", model="opus"
585
- Prompt: "Judge verdict type: refactor vs rewrite decision.
586
- [paste both agent outputs]"
587
- ```
588
-
589
- ### Strategy #12: Migration Path Finder
590
-
591
- When the feature requires migrating existing code or data:
592
-
593
- ```
594
- Task: subagent_type="plan-migration-path-finder", model="sonnet"
595
- Prompt: "Design migration for [CHANGE] using Strategy [1-4].
596
- Strategy 1: Big bang 2: Strangler fig 3: Feature-flagged 4: Adapter/facade
597
- Migration scope: [what needs changing]"
598
- ```
599
-
600
- Run all 4 in parallel, then judge:
601
-
602
- ```
603
- Task: subagent_type="multi-perspective-judge", model="opus"
604
- Prompt: "Judge verdict type: migration strategy selection.
605
- [paste all 4 agent outputs]"
606
- ```
607
-
608
- ### Strategy #16: Data Model Stress Tester
609
-
610
- For features with data models, stress-test before finalizing:
611
-
612
- ```
613
- Task: subagent_type="plan-data-model-stress-tester", model="haiku"
614
- Prompt: "Stress-test data model from Perspective [1-4].
615
- Perspective 1: 10x scale 2: Concurrent access 3: Schema evolution 4: Edge-case shapes
616
- Data model: [entities and relationships from plan]"
617
- ```
618
-
619
- Run all 4 in parallel, then judge:
620
-
621
- ```
622
- Task: subagent_type="multi-perspective-judge", model="opus"
623
- Prompt: "Judge verdict type: data model robustness assessment.
624
- [paste all 4 agent outputs]"
625
- ```
626
-
627
- Incorporate judge recommendations into the plan before proceeding to validation.
628
-
629
- ---
630
-
631
- ## Step 6: Update Agent Context
632
-
633
- Run the agent context update script:
634
-
635
- ```bash
636
- .specify/scripts/bash/update-agent-context.sh claude
637
- ```
638
-
639
- This updates AI agent context files with new technology from this plan.
640
-
641
- ---
642
-
643
- ## Step 7: Engineering Review Gate (Up to 5 cycles)
644
-
645
- Before proceeding to the next stage, run an iterative engineering review to
646
- catch misalignment early.
647
-
648
- ### Review Cycle (repeat up to 5 times)
649
-
650
- **You MUST dispatch 3 review agents in parallel** using the Task tool:
651
-
652
- **Agent 1**: engineer-review (sonnet) — cross-check spec↔plan alignment
653
-
654
- ```
655
- Task: subagent_type="engineer-review", model="sonnet"
656
- Prompt: "Review alignment between spec.md and plan.md in {FEATURE_DIR}.
657
- Find every gap, inconsistency, and misalignment between the specification
658
- and the implementation plan. Report Red/Yellow/Gray findings."
659
- ```
660
-
661
- **Agent 2**: codebase-analyzer (sonnet) — verify file paths and code patterns
662
-
663
- ```
664
- Task: subagent_type="codebase-analyzer", model="sonnet"
665
- Prompt: "Verify that the plan at {FEATURE_DIR}/plan.md references correct
666
- file paths and follows existing codebase patterns from {FEATURE_DIR}/research.md.
667
- Report Red/Yellow/Gray findings."
668
- ```
669
-
670
- **Agent 3**: validation-correctness (sonnet) — verify acceptance criteria
671
- coverage
672
-
673
- ```
674
- Task: subagent_type="validation-correctness", model="sonnet"
675
- Prompt: "Verify that every acceptance criterion in {FEATURE_DIR}/spec.md
676
- is addressed by the plan at {FEATURE_DIR}/plan.md.
677
- Report Red/Yellow/Gray findings with coverage gaps."
678
- ```
679
-
680
- **After agents return:**
681
-
682
- 1. Classify findings: Red (blocking) / Yellow (should fix) / Gray
683
- (informational)
684
- 2. If NO Red or Yellow findings → PASS → proceed to auto-chain
685
- 3. If Red or Yellow findings exist: a. Fix findings directly in plan artifacts
686
- (Red first, then Yellow) b. Increment cycle counter c. If cycle <= 5 → re-run
687
- review agents d. If cycle > 5 → log remaining findings, proceed with warnings
688
-
689
- ---
690
-
691
- ## Step 8: Report and Continue
692
-
693
- Before reporting completion, update the stakeholder-facing architecture pack:
694
-
695
- 1. Update `{FEATURE_DIR}/working-backwards-prfaq.md`.
696
- - Add the current architecture story to Internal FAQ CTO / Architecture.
697
- - Explain how the solution uses EAI Platform first, the EAI App Template
698
- when app delivery applies, Azure as the preferred supporting substrate,
699
- and any approved exception.
700
- - Summarize auth, authorization, workspace boundary, data model, integration,
701
- contract, and deployment assumptions in plain language.
702
- 2. Write `{FEATURE_DIR}/prfaq-history/03-plan.md` as an immutable snapshot.
703
- 3. Create or update `{FEATURE_DIR}/cto-architecture-summary.md` from
704
- `.specify/templates/cto-architecture-summary-template.md` using
705
- `plan.md`, `contract-pack.md`, `data-model.md`, C4 diagrams,
706
- `service-fit-matrix.md`, and `eai-preflight.md` when present.
707
- 4. Update `{FEATURE_DIR}/stakeholder-review-index.md` and explicitly ask
708
- CTO / Architecture to approve, revise, or defer the architecture,
709
- EAI/Azure fit, auth/workspace model, data model, and integration contracts.
710
- 5. Preserve the existing loop contract: if planning changed eval commands,
711
- stop conditions, or escalation rules, update `loop-contract.json` and keep
712
- those changes visible in the stakeholder index rather than replacing loop
713
- audit behavior.
714
-
715
- After all artifacts are created and review gate passes:
716
-
717
- ```
718
- ✓ Plan complete: {FEATURE_DIR}/plan.md
719
-
720
- Artifacts created:
721
- - plan.md: Implementation phases and architecture
722
- - loop-contract.json: Bounded evaluation commands and stop rules
723
- - data-model.md: Entity definitions
724
- - contracts/: API specifications
725
- - quickstart.md: Testing guide
726
- - working-backwards-prfaq.md: Updated product release PR/FAQ
727
- - prfaq-history/03-plan.md: Architecture-stage PR/FAQ snapshot
728
- - cto-architecture-summary.md: CTO/EAI Platform architecture review summary
729
- - stakeholder-review-index.md: Review status and approval asks
730
- - workflow-dag.md: Dynamic shard/reducer plan (only when effectiveProfile=dynamic)
731
-
732
- Engineering Review: PASSED (cycle [N] of 5)
733
- ```
734
-
735
- **AUTO-CHAIN (MANDATORY)**: You MUST immediately invoke the next pipeline stage
736
- by calling the Skill tool with skill="/4_gofer_tasks". Do NOT ask the user for
737
- confirmation. Do NOT output "Ready for next stage". Just invoke the skill NOW.
738
-
739
- ---
740
-
741
- ## EnterpriseAI Deployment Convention and EAI CLI Pinning Requirements
742
-
743
- Before planning app implementation, read the managed-source boundary in
744
- `.specify/references/platform/eai-app-template.md`. Include all customer-authored
745
- app files, including custom runners, tests, backend code, scripts, documentation,
746
- and supported dot configuration. Preserve protected EAI authentication,
747
- platform-service, deployment, and workflow controls. The installed CLI owns the
748
- normalized source boundary; do not maintain a second allowlist.
749
- When EAI-maintained source is selected, verify the installed CLI advertises
750
- `eai deploy source validate --help`, then run
751
- `node .specify/scripts/node/eai-app-template-readiness.mjs --root . --source eai-managed --json`.
752
- Preserve an explicitly selected CLI with `--cli <executable>`. Resolve a failed
753
- source check before promising EAI-maintained delivery. Unsupported custom runtimes
754
- must fail explicitly; never omit business changes or customer app files.
755
-
756
- > When `gofer.workflowProfile=enterpriseai`, the following conventions apply.
757
- > standard profile outputs remain unchanged.
758
-
759
- When the workflow profile is `enterpriseai`, `plan.md` MUST capture:
760
-
761
- 1. **EAI CLI version pin** — record the installed `eai` version as a
762
- `major.minor` pin (for example `2.0`). The plan stage resolves the local
763
- version via `eai --version`, strips the patch component, and writes the
764
- pin to the `EnterpriseAI Profile Metadata` block of `plan-template.md` so
765
- every downstream task is reproducible. Plans MUST apply
766
- `pin guidance to `major.minor`` and never to a specific patch release.
767
- If `{FEATURE_DIR}/eai-preflight.md` exists, use its CLI version/install
768
- evidence as the primary source and re-run `eai --version` only to confirm
769
- local drift.
770
- 2. **EAI app-readiness handoff** — for EAI app delivery, reference
771
- `{FEATURE_DIR}/eai-preflight.md` before making platform or template
772
- assumptions. The plan MUST preserve:
773
- - whether the user is logged in or still needs an EAI Platform account
774
- - the selected workspace role/readiness and whether app enrollment is allowed
775
- - whether the repo already has EAI template markers or still needs
776
- `eai init <app-name>`
777
- - whether app creation/selection is confirmed, deferred, or blocked
778
- - block-catalog readiness and package-profile compatibility evidence
779
- - the last completed gate, blocked gate, and next recovery command from the
780
- EAI preflight artifact
781
- If EAI readiness is blocked, plan only the smallest unblock task group and
782
- do not invent object types, workspace IDs, app keys, or platform capabilities.
783
- 3. **EAI app lifecycle ordering handoff** — keep the platform lifecycle
784
- explicit inside the plan. Resource provisioning, object-type publish,
785
- schema/storage health, workflow readiness, and preview readiness must remain
786
- distinct gates with the recovery path carried forward from
787
- `{FEATURE_DIR}/eai-preflight.md`.
788
- 4. **EAI Platform/Azure app stack decision** — for app delivery, the plan MUST
789
- use EAI Platform, including the EAI app template, as the primary app
790
- substrate and Azure as the preferred cloud/supporting substrate. The plan MUST
791
- NOT select Firebase, Supabase, Vercel as the primary runtime, AWS, GCP,
792
- bespoke backends, unmanaged databases, or unrelated SaaS platforms as the
793
- default app stack. Any non-EAI technology must be recorded as an integration
794
- target, migration reference, or approved exception with rationale, owner,
795
- expiry, and validation evidence.
796
- Capabilities unavailable in EAI Platform/Azure must be recorded in
797
- `{FEATURE_DIR}/service-fit-matrix.md` as platform work, operator-required, or
798
- upgrade-required rather than substituted silently.
799
- 5. **Deployment convention** — reference the configured deployment
800
- documentation for the target project and note which environment
801
- (dev/staging/prod) each deliverable targets.
802
- 6. **Integration map handoff** — restate the App → EAI Services →
803
- Deployment Target chain from `spec.md` and bind each link to a task
804
- identifier in `tasks.md`.
805
- 7. **Contract pack handoff** — reference `{FEATURE_DIR}/contract-pack.md` and
806
- bind each actor, object type, workflow/journey, permission boundary,
807
- API/event, runtime assumption, and acceptance test to plan sections and
808
- downstream tasks.
809
- 8. **AI-augmented journey handoff** — for app delivery, reference
810
- `{FEATURE_DIR}/journeys/base-journey.md` and plan the four-step-or-fewer
811
- user-facing process as the default scope spine. Each step must include the
812
- business goal, generative AI assistance mode, screen/user/data context used,
813
- completion signal, user controls, audit trail, and fallback/escalation path.
814
- If the plan expands beyond four user-facing steps, document why those steps
815
- cannot be combined, automated, or handled by the AI assistant.
816
- 9. **UI-first approval gate handoff** — for app delivery, reference
817
- `{FEATURE_DIR}/ui-preview-brief.md` and require the planning stage to lock
818
- the preview loop before plan/tasks are considered complete. The plan MUST:
819
- - keep the first preview constrained to EAI App Template blocks unless an
820
- approved extension is recorded
821
- - cite `eai blocks describe <id>` evidence for every selected block ID,
822
- plus the ResourceAPI/Object Type fields from `eai resources schema` that
823
- feed each block
824
- - record override points for theme tokens, `presentationConfig`, copy,
825
- data/action bindings, and client extension blocks
826
- - capture whether client branding/logos are in scope
827
- - require screenshot, local render proof, or Playwright-style self-review
828
- evidence before stakeholder presentation
829
- - update `{FEATURE_DIR}/ui-review-log.md` for each iteration and require
830
- explicit stakeholder approval in `{FEATURE_DIR}/ui-approval.md`
831
- 10. **EnterpriseAI service-fit handoff** — for app delivery, the plan MUST
832
- produce or update `{FEATURE_DIR}/service-fit-matrix.md` after UI approval and
833
- before tasks are treated as complete. The matrix must distinguish:
834
- - accessible now
835
- - purchasable but unavailable now
836
- - unavailable without new platform work
837
- The plan must source this evidence from `eai --describe`, `eai whoami`,
838
- `eai workspace select`, `eai resources schema --format json`,
839
- `eai verify calls --format json`, `eai workflow readiness [workflow-key]
840
- --format json`, `eai workflow status <workflow-key>`, `eai workflow request
841
- <workflow-key>`, `eai provision entra --rotate-secret`, or documented
842
- equivalent public platform evidence.
843
- 11. **Reuse-before-create decision log** — reference `{FEATURE_DIR}/reuse-scan.md`
844
- for every new or extended EnterpriseAI object type, API/event, workflow, or
845
- module.
846
- 12. **Audit history seed** — create or update `{FEATURE_DIR}/audit-history.md`
847
- with stable finding IDs, decision exceptions, owner, expiry, and review
848
- cadence so validation can track recurring issues.
849
- 13. **Public/private knowledge split** — identify which implementation facts
850
- are safe for public docs, Gofer guidance, EAI CLI help, or EAI App Template
851
- comments, and which facts are restricted-source. Plans must express blocked
852
- states as public-safe actions (`operator_required`, `upgrade_required`, or
853
- documented support URL) rather than exposing private service topology.
854
-
855
- ### EnterpriseAI Flow and Journey Separation
856
-
857
- Plan both:
858
-
859
- - **External user journeys**: the business/user-facing path, decision points,
860
- adoption impact, and measurable value.
861
- - **AI-augmented app process**: for application delivery, the four-step-or-fewer
862
- journey with AI assistance, contextual prefill, conversational support,
863
- completion checks, and human controls at each step.
864
- - **App-delivery preview and approval loop**: for application delivery, the
865
- local preview creation, self-review, stakeholder feedback, branding updates,
866
- and approval-gate behavior that must occur before plan/tasks are finalized.
867
- - **EnterpriseAI service-fit gate**: for application delivery, the post-approval
868
- capability-selection discussion that binds chosen platform services to the
869
- approved UI and distinguishes accessible now vs purchasable vs unavailable.
870
- - **Internal orchestration flows**: platform services, ResourceAPI calls,
871
- events, data movement, workspace boundaries, deployment steps, and observability.
872
-
873
- ### Competitive / market analysis reference
874
-
875
- When `includeCompetitiveAnalysis=true`, `plan.md` MUST link to
876
- `market-analysis.md`. When disabled, the competitive-analysis section is omitted
877
- and standard profile outputs remain unchanged.
878
-
879
- ---
880
-
881
- ## Observability Logging
882
-
883
- At stage completion, log metrics:
884
-
885
- ```bash
886
- .specify/scripts/bash/log-stage.sh 3_plan --complete --tokens [N] --compactions [N]
887
- ```
888
-
889
- Logs to: `.specify/logs/pipeline.jsonl`
890
-
891
- ---
892
-
893
- ## Key Rules
894
-
895
- - Use absolute paths for all file references
896
- - ERROR if constitution gates fail without justification
897
- - All NEEDS CLARIFICATION must be resolved before completing
898
- - Plan must be specific enough for task generation
899
- - Log stage completion for observability tracking