specky-sdd 3.10.2 → 3.11.1

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 (322) hide show
  1. package/.apm/agents/specky-design-architect.agent.md +8 -28
  2. package/.apm/agents/specky-implementer.agent.md +15 -27
  3. package/.apm/agents/specky-onboarding.agent.md +8 -49
  4. package/.apm/agents/specky-orchestrator.agent.md +12 -37
  5. package/.apm/agents/specky-quality-reviewer.agent.md +9 -30
  6. package/.apm/agents/specky-release-engineer.agent.md +8 -30
  7. package/.apm/agents/specky-requirements-engineer.agent.md +1 -1
  8. package/.apm/agents/specky-research-analyst.agent.md +1 -1
  9. package/.apm/agents/specky-sdd-clarify.agent.md +1 -1
  10. package/.apm/agents/specky-sdd-init.agent.md +8 -19
  11. package/.apm/agents/specky-spec-engineer.agent.md +8 -30
  12. package/.apm/agents/specky-task-planner.agent.md +7 -26
  13. package/.apm/agents/specky-test-verifier.agent.md +7 -17
  14. package/.apm/hooks/scripts/specky-artifact-validator.sh +14 -10
  15. package/.apm/hooks/scripts/specky-auto-checkpoint.sh +9 -4
  16. package/.apm/hooks/scripts/specky-branch-validator.sh +29 -116
  17. package/.apm/hooks/scripts/specky-cognitive-debt-alert.sh +6 -3
  18. package/.apm/hooks/scripts/specky-contract-context.bash +24 -0
  19. package/.apm/hooks/scripts/specky-contract-context.mjs +219 -0
  20. package/.apm/hooks/scripts/specky-drift-monitor.sh +6 -3
  21. package/.apm/hooks/scripts/specky-ears-validator.sh +5 -2
  22. package/.apm/hooks/scripts/specky-lgtm-gate.sh +12 -10
  23. package/.apm/hooks/scripts/specky-metrics-dashboard.sh +5 -2
  24. package/.apm/hooks/scripts/specky-phase-gate.sh +18 -9
  25. package/.apm/hooks/scripts/specky-pipeline-guard.sh +19 -26
  26. package/.apm/hooks/scripts/specky-release-gate.sh +38 -46
  27. package/.apm/hooks/scripts/specky-security-scan.sh +53 -36
  28. package/.apm/hooks/scripts/specky-session-banner.sh +22 -74
  29. package/.apm/hooks/scripts/specky-spec-quality.sh +7 -4
  30. package/.apm/hooks/scripts/specky-spec-sync.sh +12 -11
  31. package/.apm/hooks/scripts/specky-task-tracer.sh +5 -2
  32. package/.apm/hooks/specky-run.sh +3 -0
  33. package/.apm/instructions/claude-instructions.instructions.md +3 -3
  34. package/.apm/instructions/copilot-instructions.instructions.md +3 -3
  35. package/.apm/instructions/cursor-instructions.instructions.md +3 -3
  36. package/.apm/instructions/opencode-instructions.instructions.md +2 -2
  37. package/.apm/prompts/specky-brownfield.prompt.md +8 -5
  38. package/.apm/prompts/specky-greenfield.prompt.md +7 -5
  39. package/.apm/prompts/specky-implement.prompt.md +1 -1
  40. package/.apm/prompts/specky-orchestrate.prompt.md +1 -1
  41. package/.apm/skills/specky-design-architect/SKILL.md +39 -16
  42. package/.apm/skills/specky-implementer/SKILL.md +46 -158
  43. package/.apm/skills/specky-onboarding/SKILL.md +50 -156
  44. package/.apm/skills/specky-orchestrator/SKILL.md +28 -26
  45. package/.apm/skills/specky-quality-reviewer/SKILL.md +38 -23
  46. package/.apm/skills/specky-release-engineer/SKILL.md +38 -270
  47. package/.apm/skills/specky-research-analyst/SKILL.md +1 -1
  48. package/.apm/skills/specky-sdd-init/SKILL.md +61 -23
  49. package/.apm/skills/specky-sdd-pipeline/SKILL.md +36 -216
  50. package/.apm/skills/specky-spec-engineer/SKILL.md +40 -17
  51. package/.apm/skills/specky-task-planner/SKILL.md +31 -12
  52. package/.apm/skills/specky-test-verifier/SKILL.md +23 -202
  53. package/CHANGELOG.md +39 -0
  54. package/README.md +49 -47
  55. package/SECURITY.md +5 -1
  56. package/apm-policy.yml +2 -0
  57. package/apm.lock.yaml +55 -53
  58. package/apm.yml +3 -3
  59. package/config.yml +32 -53
  60. package/dist/cli/commands/doctor.d.ts.map +1 -1
  61. package/dist/cli/commands/doctor.js +106 -20
  62. package/dist/cli/commands/doctor.js.map +1 -1
  63. package/dist/cli/commands/init.d.ts +2 -0
  64. package/dist/cli/commands/init.d.ts.map +1 -1
  65. package/dist/cli/commands/init.js +105 -7
  66. package/dist/cli/commands/init.js.map +1 -1
  67. package/dist/cli/commands/migrate-contracts.d.ts +15 -0
  68. package/dist/cli/commands/migrate-contracts.d.ts.map +1 -0
  69. package/dist/cli/commands/migrate-contracts.js +311 -0
  70. package/dist/cli/commands/migrate-contracts.js.map +1 -0
  71. package/dist/cli/commands/status.d.ts.map +1 -1
  72. package/dist/cli/commands/status.js +63 -48
  73. package/dist/cli/commands/status.js.map +1 -1
  74. package/dist/cli/index.js +82 -27
  75. package/dist/cli/index.js.map +1 -1
  76. package/dist/cli/lib/apm/policy.d.ts +1 -0
  77. package/dist/cli/lib/apm/policy.d.ts.map +1 -1
  78. package/dist/cli/lib/apm/policy.js +15 -0
  79. package/dist/cli/lib/apm/policy.js.map +1 -1
  80. package/dist/cli/lib/asset-copier.d.ts +1 -0
  81. package/dist/cli/lib/asset-copier.d.ts.map +1 -1
  82. package/dist/cli/lib/asset-copier.js +4 -4
  83. package/dist/cli/lib/asset-copier.js.map +1 -1
  84. package/dist/cli/lib/cursor-plugin-writer.d.ts.map +1 -1
  85. package/dist/cli/lib/cursor-plugin-writer.js +34 -9
  86. package/dist/cli/lib/cursor-plugin-writer.js.map +1 -1
  87. package/dist/cli/lib/harness/compilers/claude.js +3 -3
  88. package/dist/cli/lib/harness/compilers/claude.js.map +1 -1
  89. package/dist/cli/lib/harness/compilers/common.d.ts +10 -1
  90. package/dist/cli/lib/harness/compilers/common.d.ts.map +1 -1
  91. package/dist/cli/lib/harness/compilers/common.js +71 -8
  92. package/dist/cli/lib/harness/compilers/common.js.map +1 -1
  93. package/dist/cli/lib/harness/compilers/copilot.js +3 -3
  94. package/dist/cli/lib/harness/compilers/copilot.js.map +1 -1
  95. package/dist/cli/lib/harness/compilers/cursor.js +3 -3
  96. package/dist/cli/lib/harness/compilers/cursor.js.map +1 -1
  97. package/dist/cli/lib/harness/compilers/opencode.js +3 -3
  98. package/dist/cli/lib/harness/compilers/opencode.js.map +1 -1
  99. package/dist/cli/lib/harness/tool-map.d.ts +8 -1
  100. package/dist/cli/lib/harness/tool-map.d.ts.map +1 -1
  101. package/dist/cli/lib/harness/tool-map.js +74 -0
  102. package/dist/cli/lib/harness/tool-map.js.map +1 -1
  103. package/dist/cli/lib/harness/types.d.ts +11 -1
  104. package/dist/cli/lib/harness/types.d.ts.map +1 -1
  105. package/dist/cli/lib/mcp-writer.d.ts +2 -1
  106. package/dist/cli/lib/mcp-writer.d.ts.map +1 -1
  107. package/dist/cli/lib/mcp-writer.js +13 -5
  108. package/dist/cli/lib/mcp-writer.js.map +1 -1
  109. package/dist/cli/lib/settings-merger.d.ts +15 -0
  110. package/dist/cli/lib/settings-merger.d.ts.map +1 -1
  111. package/dist/cli/lib/settings-merger.js +66 -1
  112. package/dist/cli/lib/settings-merger.js.map +1 -1
  113. package/dist/config.d.ts +110 -42
  114. package/dist/config.d.ts.map +1 -1
  115. package/dist/config.js +129 -140
  116. package/dist/config.js.map +1 -1
  117. package/dist/constants.d.ts +1 -1
  118. package/dist/constants.d.ts.map +1 -1
  119. package/dist/contracts/pipeline-profiles.d.ts +61 -0
  120. package/dist/contracts/pipeline-profiles.d.ts.map +1 -0
  121. package/dist/contracts/pipeline-profiles.js +303 -0
  122. package/dist/contracts/pipeline-profiles.js.map +1 -0
  123. package/dist/contracts/tool-contracts.d.ts +449 -0
  124. package/dist/contracts/tool-contracts.d.ts.map +1 -0
  125. package/dist/contracts/tool-contracts.js +83 -0
  126. package/dist/contracts/tool-contracts.js.map +1 -0
  127. package/dist/contracts/use-case.d.ts +736 -0
  128. package/dist/contracts/use-case.d.ts.map +1 -0
  129. package/dist/contracts/use-case.js +352 -0
  130. package/dist/contracts/use-case.js.map +1 -0
  131. package/dist/index.js +7 -4
  132. package/dist/index.js.map +1 -1
  133. package/dist/schemas/common.d.ts +3 -3
  134. package/dist/schemas/common.d.ts.map +1 -1
  135. package/dist/schemas/common.js +1 -4
  136. package/dist/schemas/common.js.map +1 -1
  137. package/dist/schemas/context.d.ts +2 -2
  138. package/dist/schemas/environment.d.ts +6 -17
  139. package/dist/schemas/environment.d.ts.map +1 -1
  140. package/dist/schemas/environment.js +1 -28
  141. package/dist/schemas/environment.js.map +1 -1
  142. package/dist/schemas/feature-content.d.ts +116 -0
  143. package/dist/schemas/feature-content.d.ts.map +1 -0
  144. package/dist/schemas/feature-content.js +65 -0
  145. package/dist/schemas/feature-content.js.map +1 -0
  146. package/dist/schemas/infrastructure.d.ts +6 -28
  147. package/dist/schemas/infrastructure.d.ts.map +1 -1
  148. package/dist/schemas/infrastructure.js +1 -30
  149. package/dist/schemas/infrastructure.js.map +1 -1
  150. package/dist/schemas/input.d.ts +412 -8
  151. package/dist/schemas/input.d.ts.map +1 -1
  152. package/dist/schemas/input.js +6 -7
  153. package/dist/schemas/input.js.map +1 -1
  154. package/dist/schemas/integration.d.ts +22 -28
  155. package/dist/schemas/integration.d.ts.map +1 -1
  156. package/dist/schemas/integration.js +11 -47
  157. package/dist/schemas/integration.js.map +1 -1
  158. package/dist/schemas/metrics.d.ts +3 -2
  159. package/dist/schemas/metrics.d.ts.map +1 -1
  160. package/dist/schemas/metrics.js +2 -1
  161. package/dist/schemas/metrics.js.map +1 -1
  162. package/dist/schemas/pbt.d.ts +2 -7
  163. package/dist/schemas/pbt.d.ts.map +1 -1
  164. package/dist/schemas/pbt.js +1 -9
  165. package/dist/schemas/pbt.js.map +1 -1
  166. package/dist/schemas/pipeline.d.ts +282 -35
  167. package/dist/schemas/pipeline.d.ts.map +1 -1
  168. package/dist/schemas/pipeline.js +29 -15
  169. package/dist/schemas/pipeline.js.map +1 -1
  170. package/dist/schemas/quality.d.ts +15 -19
  171. package/dist/schemas/quality.d.ts.map +1 -1
  172. package/dist/schemas/quality.js +6 -3
  173. package/dist/schemas/quality.js.map +1 -1
  174. package/dist/schemas/routing.d.ts +2 -2
  175. package/dist/schemas/routing.d.ts.map +1 -1
  176. package/dist/schemas/routing.js +2 -4
  177. package/dist/schemas/routing.js.map +1 -1
  178. package/dist/schemas/testing.d.ts +4 -13
  179. package/dist/schemas/testing.d.ts.map +1 -1
  180. package/dist/schemas/testing.js +2 -10
  181. package/dist/schemas/testing.js.map +1 -1
  182. package/dist/schemas/transcript.d.ts +648 -10
  183. package/dist/schemas/transcript.d.ts.map +1 -1
  184. package/dist/schemas/transcript.js +25 -12
  185. package/dist/schemas/transcript.js.map +1 -1
  186. package/dist/schemas/utility.d.ts +28 -15
  187. package/dist/schemas/utility.d.ts.map +1 -1
  188. package/dist/schemas/utility.js +23 -14
  189. package/dist/schemas/utility.js.map +1 -1
  190. package/dist/schemas/visualization.d.ts +66 -15
  191. package/dist/schemas/visualization.d.ts.map +1 -1
  192. package/dist/schemas/visualization.js +36 -12
  193. package/dist/schemas/visualization.js.map +1 -1
  194. package/dist/services/codebase-scanner.d.ts +1 -1
  195. package/dist/services/codebase-scanner.d.ts.map +1 -1
  196. package/dist/services/codebase-scanner.js +2 -2
  197. package/dist/services/codebase-scanner.js.map +1 -1
  198. package/dist/services/compliance-engine.d.ts +3 -2
  199. package/dist/services/compliance-engine.d.ts.map +1 -1
  200. package/dist/services/compliance-engine.js +34 -21
  201. package/dist/services/compliance-engine.js.map +1 -1
  202. package/dist/services/diagram-generator.d.ts +4 -96
  203. package/dist/services/diagram-generator.d.ts.map +1 -1
  204. package/dist/services/diagram-generator.js +18 -1051
  205. package/dist/services/diagram-generator.js.map +1 -1
  206. package/dist/services/doc-generator.d.ts +19 -52
  207. package/dist/services/doc-generator.d.ts.map +1 -1
  208. package/dist/services/doc-generator.js +389 -524
  209. package/dist/services/doc-generator.js.map +1 -1
  210. package/dist/services/execution-context.d.ts +32 -0
  211. package/dist/services/execution-context.d.ts.map +1 -0
  212. package/dist/services/execution-context.js +120 -0
  213. package/dist/services/execution-context.js.map +1 -0
  214. package/dist/services/file-manager.d.ts +16 -4
  215. package/dist/services/file-manager.d.ts.map +1 -1
  216. package/dist/services/file-manager.js +81 -5
  217. package/dist/services/file-manager.js.map +1 -1
  218. package/dist/services/iac-generator.d.ts +9 -10
  219. package/dist/services/iac-generator.d.ts.map +1 -1
  220. package/dist/services/iac-generator.js +36 -99
  221. package/dist/services/iac-generator.js.map +1 -1
  222. package/dist/services/methodology.js +1 -1
  223. package/dist/services/methodology.js.map +1 -1
  224. package/dist/services/metrics-generator.d.ts +1 -1
  225. package/dist/services/metrics-generator.d.ts.map +1 -1
  226. package/dist/services/metrics-generator.js +2 -2
  227. package/dist/services/metrics-generator.js.map +1 -1
  228. package/dist/services/pbt-generator.d.ts +10 -31
  229. package/dist/services/pbt-generator.d.ts.map +1 -1
  230. package/dist/services/pbt-generator.js +43 -515
  231. package/dist/services/pbt-generator.js.map +1 -1
  232. package/dist/services/state-machine.d.ts +22 -16
  233. package/dist/services/state-machine.d.ts.map +1 -1
  234. package/dist/services/state-machine.js +176 -179
  235. package/dist/services/state-machine.js.map +1 -1
  236. package/dist/services/template-engine.d.ts +11 -5
  237. package/dist/services/template-engine.d.ts.map +1 -1
  238. package/dist/services/template-engine.js +48 -21
  239. package/dist/services/template-engine.js.map +1 -1
  240. package/dist/services/test-generator.d.ts +11 -7
  241. package/dist/services/test-generator.d.ts.map +1 -1
  242. package/dist/services/test-generator.js +45 -54
  243. package/dist/services/test-generator.js.map +1 -1
  244. package/dist/templates/design.md +6 -0
  245. package/dist/tools/analysis.d.ts.map +1 -1
  246. package/dist/tools/analysis.js +8 -9
  247. package/dist/tools/analysis.js.map +1 -1
  248. package/dist/tools/checkpoint.d.ts.map +1 -1
  249. package/dist/tools/checkpoint.js +43 -46
  250. package/dist/tools/checkpoint.js.map +1 -1
  251. package/dist/tools/context.d.ts.map +1 -1
  252. package/dist/tools/context.js +5 -7
  253. package/dist/tools/context.js.map +1 -1
  254. package/dist/tools/documentation.d.ts +1 -4
  255. package/dist/tools/documentation.d.ts.map +1 -1
  256. package/dist/tools/documentation.js +112 -193
  257. package/dist/tools/documentation.js.map +1 -1
  258. package/dist/tools/environment.d.ts +1 -1
  259. package/dist/tools/environment.d.ts.map +1 -1
  260. package/dist/tools/environment.js +58 -99
  261. package/dist/tools/environment.js.map +1 -1
  262. package/dist/tools/infrastructure.d.ts.map +1 -1
  263. package/dist/tools/infrastructure.js +36 -38
  264. package/dist/tools/infrastructure.js.map +1 -1
  265. package/dist/tools/input.d.ts.map +1 -1
  266. package/dist/tools/input.js +18 -11
  267. package/dist/tools/input.js.map +1 -1
  268. package/dist/tools/integration.d.ts.map +1 -1
  269. package/dist/tools/integration.js +64 -65
  270. package/dist/tools/integration.js.map +1 -1
  271. package/dist/tools/metrics.d.ts.map +1 -1
  272. package/dist/tools/metrics.js +18 -30
  273. package/dist/tools/metrics.js.map +1 -1
  274. package/dist/tools/pbt.d.ts.map +1 -1
  275. package/dist/tools/pbt.js +10 -12
  276. package/dist/tools/pbt.js.map +1 -1
  277. package/dist/tools/pipeline.d.ts.map +1 -1
  278. package/dist/tools/pipeline.js +156 -274
  279. package/dist/tools/pipeline.js.map +1 -1
  280. package/dist/tools/quality.d.ts.map +1 -1
  281. package/dist/tools/quality.js +58 -45
  282. package/dist/tools/quality.js.map +1 -1
  283. package/dist/tools/response-builder.d.ts.map +1 -1
  284. package/dist/tools/response-builder.js +12 -10
  285. package/dist/tools/response-builder.js.map +1 -1
  286. package/dist/tools/testing.d.ts.map +1 -1
  287. package/dist/tools/testing.js +28 -29
  288. package/dist/tools/testing.js.map +1 -1
  289. package/dist/tools/tool-enforcement.d.ts +2 -0
  290. package/dist/tools/tool-enforcement.d.ts.map +1 -1
  291. package/dist/tools/tool-enforcement.js +84 -59
  292. package/dist/tools/tool-enforcement.js.map +1 -1
  293. package/dist/tools/transcript.d.ts.map +1 -1
  294. package/dist/tools/transcript.js +304 -374
  295. package/dist/tools/transcript.js.map +1 -1
  296. package/dist/tools/turnkey.d.ts +1 -31
  297. package/dist/tools/turnkey.d.ts.map +1 -1
  298. package/dist/tools/turnkey.js +104 -488
  299. package/dist/tools/turnkey.js.map +1 -1
  300. package/dist/tools/utility.d.ts.map +1 -1
  301. package/dist/tools/utility.js +115 -134
  302. package/dist/tools/utility.js.map +1 -1
  303. package/dist/tools/visualization.d.ts +1 -25
  304. package/dist/tools/visualization.d.ts.map +1 -1
  305. package/dist/tools/visualization.js +187 -562
  306. package/dist/tools/visualization.js.map +1 -1
  307. package/dist/types.d.ts +21 -11
  308. package/dist/types.d.ts.map +1 -1
  309. package/dist/utils/artifact-metadata.d.ts +8 -0
  310. package/dist/utils/artifact-metadata.d.ts.map +1 -0
  311. package/dist/utils/artifact-metadata.js +10 -0
  312. package/dist/utils/artifact-metadata.js.map +1 -0
  313. package/dist/utils/requirement-partition.d.ts +8 -0
  314. package/dist/utils/requirement-partition.d.ts.map +1 -0
  315. package/dist/utils/requirement-partition.js +15 -0
  316. package/dist/utils/requirement-partition.js.map +1 -0
  317. package/package.json +11 -2
  318. package/templates/design.md +6 -0
  319. package/dist/utils/design-stubs.d.ts +0 -32
  320. package/dist/utils/design-stubs.d.ts.map +0 -1
  321. package/dist/utils/design-stubs.js +0 -103
  322. package/dist/utils/design-stubs.js.map +0 -1
@@ -6,11 +6,14 @@ argument-hint: <feature to add>
6
6
  Add the Specky SDD pipeline to this existing codebase.
7
7
 
8
8
  **Feature:** [FEATURE NAME]
9
+ **Feature number:** [NNN — explicit, three digits]
10
+ **Workload:** [api | web-application | service | cli | library | infrastructure]
11
+ **Execution mode:** [full | rapid | emergency]
9
12
  **What to modernize:** [Component, module, or area to target]
10
- **Tech stack:** [detected or stated]
13
+ **Capabilities and parameters:** [explicit]
11
14
 
12
15
  Please:
13
- 1. Call @specky-sdd-init with project_type=brownfield
14
- 2. Run @specky-research-analyst to scan the codebase and detect the tech stack
15
- 3. Show me what was detected and suggest next steps
16
- 4. Create branch `spec/NNN-[feature]` from `develop` for all pipeline work
16
+ 1. Run `sdd_scan_codebase` with explicit depth and exclusion patterns
17
+ 2. Call @specky-sdd-init with lifecycle `brownfield`, selected workload/mode, explicit number, and exact capability configuration
18
+ 3. Pass the codebase summary into brownfield discovery and capture compatibility/rollback evidence
19
+ 4. Do not create a branch unless the persisted release policy enables it in the current phase
@@ -6,13 +6,15 @@ argument-hint: <project idea>
6
6
  Start a greenfield project with the Specky SDD pipeline.
7
7
 
8
8
  **Project:** [PROJECT NAME]
9
+ **Feature number:** [NNN — explicit, three digits]
10
+ **Workload:** [api | web-application | service | cli | library | infrastructure]
11
+ **Execution mode:** [full | rapid | emergency]
9
12
  **Description:** [What the system will do in 1-2 sentences]
10
- **Stack:** [e.g., Node.js + PostgreSQL + React | Python + FastAPI | undecided]
11
- **Timeline:** [e.g., MVP in 8 weeks | no deadline]
12
- **Compliance:** [e.g., GDPR | HIPAA | SOC 2 | none]
13
+ **Capabilities:** [explicit list, or none]
14
+ **Capability parameters:** [complete configuration for every enabled capability]
13
15
 
14
16
  Please:
15
17
  1. Call @specky-requirements-engineer to extract FRD and NFRD
16
18
  2. Then @specky-sdd-init to initialize the pipeline and create CONSTITUTION.md
17
- 3. Show me the feature number (NNN) and the path `.specs/NNN-[feature]/`
18
- 4. Create branch `spec/NNN-[feature]` from `develop` for all pipeline work
19
+ 3. Initialize exactly the selected feature and show its contract fingerprint and signed state path
20
+ 4. Do not create a branch unless release capability is enabled and the feature reaches an allowed branch phase
@@ -5,4 +5,4 @@ argument-hint: <feature-number>
5
5
  ---
6
6
  Run the SDD implementation phase for feature [FEATURE NUMBER].
7
7
 
8
- @specky-implementer — generate implementation plan, quality checklists, test stubs with REQ-* traceability, and infrastructure scaffolding.
8
+ @specky-implementer — follow the persisted capability contract to generate an implementation plan, executable requirement-bound tests/properties, and only the explicitly configured IaC/development artifacts.
@@ -5,4 +5,4 @@ argument-hint: <feature description or number>
5
5
  ---
6
6
  Run the full SDD pipeline for feature [FEATURE NUMBER or NAME].
7
7
 
8
- @specky-orchestrator — coordinate all 10 phases (Init Discover → Specify → Clarify → Design → Tasks → Analyze → Implement → Verify → Release), validate artifacts between phases, enforce LGTM gates at Phases 2/4/5, and route to the correct agent per phase.
8
+ @specky-orchestrator — resolve the selected feature's signed phase graph, validate contract-specific evidence, enforce configured LGTM/gate policy, and route the current phase to its lean agent.
@@ -3,19 +3,42 @@ name: specky-design-architect
3
3
  description: "Use for Phase 4 (Design): produce DESIGN.md with architecture, API contracts, data model, and Mermaid diagrams. Trigger on sdd_write_design, sdd_generate_all_diagrams, or /specky-design."
4
4
  ---
5
5
 
6
- # Phase 4 Design
7
-
8
- ## Prerequisites
9
- - Approved SPECIFICATION.md at the Phase 2 LGTM gate
10
-
11
- ## Workflow
12
- 1. Read SPECIFICATION.md and CONSTITUTION.md
13
- 2. Call `sdd_write_design` for architecture, API contracts, data model, and deployment topology
14
- 3. Call `sdd_generate_all_diagrams`
15
- 4. Trace every design decision to a REQ-ID
16
- 5. Present DESIGN.md for LGTM at the Phase 4 gate
17
-
18
- ## Hard Rules
19
- - API contracts cover all functional REQ-IDs
20
- - Diagrams use Mermaid syntax only
21
- - Branch must be `spec/NNN-*`
6
+ # DesignComplete Evidence Contract
7
+
8
+ ## Preconditions
9
+
10
+ Read the signed feature contract, Constitution, and Specification. The selected workload controls `workload_design` and `required_diagrams`.
11
+
12
+ ## Common Required Fields
13
+
14
+ `sdd_write_design` requires all of the following; no section is inferred:
15
+
16
+ - `architecture_overview`, `system_context`, `container_architecture`
17
+ - `component_design`, `code_level_design`
18
+ - `data_models`, `infrastructure`, `security_architecture`
19
+ - `error_handling`, `cross_cutting`
20
+ - at least one `mermaid_diagrams` entry and one ADR
21
+ - `workload_design` whose `type` exactly matches persisted workload
22
+ - `api_contracts`: required and non-empty for API; explicit empty array for non-API workloads with no network API
23
+ - explicit `spec_dir`, `feature_number`, and `force`
24
+
25
+ ## Workload Payloads
26
+
27
+ | Workload | Required fields |
28
+ |---|---|
29
+ | API | versioning strategy, error model, authentication, rate limits |
30
+ | Web application | user journeys, UI states, accessibility, responsive behavior, API integration |
31
+ | Service | protocols, dependencies, failure modes, operability, observability |
32
+ | CLI | command grammar, arguments, exit codes, standard streams, shell compatibility |
33
+ | Library | public API, compatibility, versioning, error surface, consumer examples |
34
+ | Infrastructure | topology, provider, state management, identity, network security |
35
+
36
+ Every design must contain real REQ-ID references. Missing Specification IDs or incomplete architecture evidence blocks writing.
37
+
38
+ ## Diagrams
39
+
40
+ Use `required_diagrams` from signed state. For each required type, provide Mermaid code and source `evidence_refs`. `sdd_generate_all_diagrams` requires the exact set: no missing, extra, or duplicate types. Sources are contract-defined; the tool does not infer nodes from headings.
41
+
42
+ ## Review
43
+
44
+ Present DESIGN.md, ADR decisions, API contracts when applicable, and every grounded diagram. Do not present placeholders, skeletons, or generic C4 content.
@@ -1,171 +1,59 @@
1
1
  ---
2
2
  name: specky-implementer
3
- description: "This skill should be used when the user asks to 'generate implementation plan', 'create test stubs', 'set up infrastructure', 'generate quality checklists', 'transition from spec to code', or needs guidance on Phase 7 implementation scaffolding. Also trigger on 'sdd implement', 'implementation handoff', 'IaC generation', or 'test framework selection'."
3
+ description: "Use for contracted implementation planning, executable TDD bindings, IaC, Docker, devcontainer, local environment, or Codespaces tools after an APPROVE analysis gate."
4
4
  ---
5
5
 
6
- # Implementation Orchestrator (Phase 7)
6
+ # Implement Persisted Capability Execution
7
7
 
8
- ## Overview
9
-
10
- Phase 7 transforms specification and design artifacts into a structured implementation plan with code scaffolding, infrastructure definitions, and quality assurance frameworks.
11
-
12
- ## Prerequisites Check
13
-
14
- Before starting implementation, verify:
15
- - You are on the correct `spec/NNN-*` branch (not develop, stage, or main)
16
- - SPECIFICATION.md is complete with EARS notation requirements
17
- - DESIGN.md includes architecture, API contracts, and data schema
18
- - TASKS.md has work breakdown structure with dependencies
19
- - All stakeholders have approved DESIGN.md
20
- - Technical team has reviewed and confirmed feasibility
21
- - Infrastructure resources are allocated and accessible
8
+ ## Preconditions
22
9
 
23
- Run `/specky:check-phase-5` to validate prerequisites.
10
+ Read signed feature state, DESIGN.md, TASKS.md, and ANALYSIS.md. Implementation-sensitive tools require gate `APPROVE`. Every call includes explicit `spec_dir` and `feature_number`.
24
11
 
25
- ## Implementation Plan Generation
12
+ ## Implementation Plan
26
13
 
27
- Generate a phased implementation plan with four distinct stages:
14
+ Call `sdd_implement` with:
28
15
 
29
- ### Foundation Stage
30
- Set up project skeleton, CI/CD pipelines, database migrations, and authentication framework. Duration typically 15-20% of total effort. Outputs:
31
- - Empty project structure matching DESIGN.md architecture
32
- - Docker/container definitions for local and production
33
- - Database migration system initialized
34
- - GitHub Actions/CI configuration from DESIGN.md
16
+ - `task_ids`: explicit IDs; `[]` intentionally selects every task
17
+ - `checkpoint`: explicit boolean
35
18
 
36
- ### Core Stage
37
- Implement core business logic per TASKS.md sequencing. Focus on entities, APIs, and critical paths. Duration 40-50% of effort. Outputs:
38
- - Data models and ORM definitions
39
- - REST/GraphQL APIs matching DESIGN.md contracts
40
- - Business logic implementation
41
- - Unit test stubs for all modules
19
+ The tool orders existing tasks. It does not implement application code.
42
20
 
43
- ### Integration Stage
44
- Connect subsystems, external APIs, and third-party services. Duration 20-25% of effort. Outputs:
45
- - Third-party integrations (payment, auth, analytics)
46
- - Message queue/event system setup
47
- - Cross-module integration tests
48
- - API gateway configuration
49
-
50
- ### Polish Stage
51
- Performance optimization, error handling, logging, and observability. Duration 10-15% of effort. Outputs:
52
- - Caching strategy implementation
53
- - Comprehensive error handling
54
- - Structured logging framework
55
- - Monitoring and alerting setup
21
+ ## Executable TDD
56
22
 
57
- ## Quality Checklist Generation
23
+ Use only when `tdd` capability is enabled. Frameworks, output directory, threshold, trace marker, imports, example-test bindings, and property bindings are persisted in `capability_config.tdd`.
58
24
 
59
- Generate domain-specific quality checklists from SPECIFICATION.md:
60
-
61
- **Security Domain:**
62
- - OWASP Top 10 items applicable to architecture
63
- - Data encryption requirements (in-transit, at-rest)
64
- - Authentication and authorization mechanisms
65
- - Input validation and sanitization rules
66
- - Audit logging and compliance tracking
67
-
68
- **Testing Domain:**
69
- - Unit test coverage targets (default 80% minimum)
70
- - Integration test scenarios per SPECIFICATION.md
71
- - End-to-end test paths for critical user flows
72
- - Performance benchmarks from DESIGN.md NFRs
73
- - Security test cases (SQL injection, XSS, CSRF)
74
-
75
- **Conditional NFRs:**
76
- If SPECIFICATION.md includes scalability requirements:
77
- - Load testing strategy with target RPS
78
- - Database query optimization checklist
79
- - Caching strategy validation
80
- - Horizontal scaling test scenarios
81
-
82
- If high availability required:
83
- - Failover test procedures
84
- - Data consistency verification
85
- - Recovery time objectives (RTO) validation
86
- - Backup and restore procedures
87
-
88
- ## Test Framework Auto-Detection
89
-
90
- Analyze technology stack from DESIGN.md and recommend test frameworks:
91
-
92
- **Python projects** pytest + pytest-cov
93
- **Node.js projects** Jest + Vitest for unit, Playwright for E2E
94
- **Go projects** → testing package + testify
95
- **Java projects** → JUnit 5 + Mockito + TestContainers
96
- **C#/.NET projects** → xUnit + Moq + SpecFlow
97
- **Rust projects** → built-in testing + proptest
98
-
99
- Generate starter test configuration files and example test templates.
100
-
101
- ## Infrastructure Decision Tree
102
-
103
- From DESIGN.md deployment topology, auto-generate infrastructure choices:
104
-
105
- 1. **Container Runtime** — Docker recommended; Podman alternative
106
- 2. **Orchestration** — Kubernetes if multi-replica; Docker Compose if single-node dev
107
- 3. **Database** — SQL (PostgreSQL) vs NoSQL per DESIGN.md data schema
108
- 4. **Caching Layer** — Redis for session/cache, memcached alternative
109
- 5. **Message Queue** — RabbitMQ/Kafka per event volume in SPECIFICATION.md
110
- 6. **Monitoring** — Prometheus + Grafana stack
111
- 7. **Log Aggregation** — ELK (Elasticsearch) or Loki
112
-
113
- Generate Terraform/CloudFormation/Helm templates matching selections.
114
-
115
- ## Spec-Sync During Implementation
116
-
117
- Continuous synchronization between SPECIFICATION.md and implementation:
118
-
119
- - When code deviates from SPECIFICATION.md, flag as spec drift
120
- - When implementation discovers missing requirement, update SPECIFICATION.md
121
- - If design changes needed mid-implementation, update DESIGN.md and notify stakeholders
122
- - Daily specky-spec-sync report comparing implemented features to SPECIFICATION.md
123
-
124
- ## Implementation Handoff Template
125
-
126
- When Phase 7 completes, provide handoff document including:
127
-
128
- ```
129
- ## Implementation Status
130
- - Artifacts generated: [list]
131
- - Scaffolding complete: [yes/no]
132
- - Quality checklist items: [count]
133
- - Framework selections validated: [yes/no]
134
- - Infrastructure templates generated: [yes/no]
135
-
136
- ## Next Phase Entry Criteria
137
- All Phase 7 outputs ready for Phase 8 (Verify):
138
- - Code compiles without errors
139
- - All test stubs created
140
- - CI/CD pipeline functional
141
- - Infrastructure definitions validated
142
-
143
- ## Known Gaps
144
- - [List of incomplete items, if any]
145
- - Estimated effort to complete: [hours]
146
-
147
- ## Recommendations
148
- - [Technical notes for implementation team]
149
- ```
150
-
151
- Reference: **arXiv:2502.08235** — Use standard inference (no extended thinking) for Phase 7 scaffolding to optimize quality-cost tradeoff. Extended thinking adds 43% cost with 30% quality reduction in code generation.
152
-
153
- ## MCP Tools
154
-
155
- | Tool | Purpose |
156
- |------|---------|
157
- | `sdd_implement` | Generate ordered implementation plan (Foundation → Core → Integration → Polish) |
158
- | `sdd_checklist` | Generate domain-specific quality checklists (security, testing, NFRs) |
159
- | `sdd_generate_tests` | Generate test stubs with REQ-ID traceability (vitest, jest, pytest, junit, xunit, playwright) |
160
- | `sdd_generate_pbt` | Generate property-based tests from EARS invariants |
161
- | `sdd_generate_iac` | Generate Terraform/Bicep infrastructure from DESIGN.md |
162
- | `sdd_validate_iac` | Validate generated IaC against best practices |
163
- | `sdd_generate_dockerfile` | Generate Dockerfile + docker-compose from tech stack |
164
- | `sdd_generate_devcontainer` | Generate devcontainer.json for Codespaces/Dev Containers |
165
- | `sdd_setup_local_env` | Generate local development environment setup |
166
- | `sdd_setup_codespaces` | Generate GitHub Codespaces configuration |
167
- | `sdd_create_branch` | Generate branch name following spec/NNN-feature convention |
168
-
169
- ## Companion Agent
170
-
171
- **@specky-implementer** — Phase 7 agent that calls these tools in sequence. Load this skill as first step.
25
+ - `sdd_generate_tests` takes only feature identity. It rejects missing/unknown requirement bindings, TODO bodies, and trivial assertions.
26
+ - `sdd_generate_pbt` takes only feature identity. Property code must include its REQ-ID and cannot use generated model stubs.
27
+ - Do not auto-detect or override frameworks per call.
28
+
29
+ ## IaC
30
+
31
+ Use only when `iac` capability is enabled. `capability_config.iac` fixes:
32
+
33
+ - provider (`terraform`)
34
+ - cloud
35
+ - concrete `{module, service}` resource list
36
+ - state backend
37
+ - region policy
38
+
39
+ `sdd_generate_iac` requires DESIGN.md evidence and accepts no provider/cloud/module override. Run `sdd_validate_iac` before any external plan/apply. Specky returns validation routing; it does not apply infrastructure.
40
+
41
+ ## Development Environment
42
+
43
+ Use only when `dev-environment` is enabled. The persisted contract fixes language, framework, runtime, package manager, port, sidecar services, Codespaces machine, extensions, base image, features, compose, and multi-stage choices.
44
+
45
+ The local environment, Dockerfile, devcontainer, and Codespaces tools accept feature identity only. Unsupported stacks fail; no generic Ubuntu or TypeScript fallback is emitted.
46
+
47
+ ## Checklists and Evidence
48
+
49
+ Run checklist domains explicitly and preserve implementation/code paths for Verify. Never claim files, containers, cloud resources, or Codespaces exist unless the writing/routed tool confirms them.
50
+
51
+ ## Handoff
52
+
53
+ Report:
54
+
55
+ - selected contract and capability fingerprints
56
+ - task IDs included
57
+ - generated executable test/property files
58
+ - generated and validated IaC/environment files
59
+ - remaining external actions and their exact routing payloads
@@ -1,161 +1,55 @@
1
1
  ---
2
2
  name: specky-onboarding
3
- description: "This skill should be used when the user asks 'help me with specky', 'what is specky', 'how to use specky', 'specky onboarding', 'get started', or needs guidance on project setup, work modes, or available agents/tools/prompts. Also trigger on '@specky', 'specky help', or 'show me specky commands'."
3
+ description: "Use when starting or resuming Specky work, selecting lifecycle/workload/mode/capabilities, diagnosing config/state, or choosing an agent/tool."
4
4
  ---
5
5
 
6
- # Specky SDD Onboarding Guide
7
-
8
- ## Overview
9
-
10
- Specky SDD is a Spec-Driven Development CLI toolkit with 58 MCP tools, 13 agents, 22 prompts, 14 skills, and 16 hook scripts. It enforces a 10-phase pipeline from requirements through release.
11
-
12
- ## 5-Step Wizard Flow
13
-
14
- ### Step 1: Detect Context
15
- Check for:
16
- - `.specs/` directory → existing pipeline, offer resume
17
- - `.sdd-state.json` → current phase state
18
- - `*.vtt`, `*.srt` files → meeting transcripts available
19
- - `src/`, `package.json`, `*.py` → existing codebase
20
- - Empty workspace → fresh start
21
-
22
- ### Step 2: Project Type
23
- - **Greenfield** → New project from scratch → /specky-greenfield
24
- - **Brownfield** → Add features to existing code → /specky-brownfield
25
- - **Modernization** → Migrate/upgrade existing system → /specky-migration
26
- - **API Design** → Design an API specification → /specky-api
27
-
28
- ### Step 3: Input Source
29
- - **Documents** → sdd_import_document, sdd_batch_import
30
- - **Transcripts** → sdd_import_transcript, sdd_auto_pipeline (end-to-end)
31
- - **Figma** → sdd_figma_to_spec
32
- - **Nothing** → sdd_discover (7 guided questions)
33
-
34
- ### Step 4: Work Mode
35
- - **Full Pipeline** → @specky-orchestrator coordinates all 10 phases
36
- - **Agent-by-agent** → User picks agents manually
37
- - **Direct MCP tools** → User calls sdd_* tools directly
38
-
39
- ### Step 5: Branch Setup
40
- - **Auto** → `git checkout develop && git checkout -b spec/NNN-feature`
41
- - **Manual** → Show git commands
42
- - **Skip** → No branching (solo/prototype work)
6
+ # Specky Onboarding — Explicit Contract Wizard
43
7
 
44
- ## All 13 Agents
45
-
46
- | Agent | Phase | Purpose |
47
- |-------|-------|---------|
48
- | @specky-onboarding | Pre | Interactive wizard and help |
49
- | @specky-orchestrator | All | Full pipeline coordinator |
50
- | @specky-sdd-init | 0 | Initialize pipeline + create spec branch |
51
- | @specky-research-analyst | 1 | Codebase scan + discovery |
52
- | @specky-spec-engineer | 2 | Write SPECIFICATION.md with EARS |
53
- | @specky-sdd-clarify | 3 | Resolve ambiguities + EARS validation |
54
- | @specky-design-architect | 4 | Write DESIGN.md + diagrams |
55
- | @specky-task-planner | 5 | Write TASKS.md + CHECKLIST.md |
56
- | @specky-quality-reviewer | 6 | Completeness audit + compliance |
57
- | @specky-implementer | 7 | Implementation plan + test stubs + IaC |
58
- | @specky-test-verifier | 8 | Coverage + drift + phantom detection |
59
- | @specky-requirements-engineer | Pre | FRD + NFRD from raw input |
60
- | @specky-release-engineer | 9 | Gates + PR + docs + work items |
61
-
62
- ## All 22 Prompts
63
-
64
- **Quick Start:**
65
- - /specky-onboarding — Interactive wizard
66
- - /specky-orchestrate Full pipeline
67
- - /specky-greenfield — New project
68
- - /specky-brownfield Existing codebase
69
- - /specky-migration System migration
70
- - /specky-api API design
71
-
72
- **Pipeline Phases:**
73
- - /specky-research — Phase 1 (Discover)
74
- - /specky-specify Phase 2 (Specify)
75
- - /specky-clarify Phase 3 (Clarify)
76
- - /specky-design Phase 4
77
- - /specky-tasks Phase 5
78
- - /specky-implement — Phase 7 (Implement)
79
- - /specky-verify Phase 8 (Verify)
80
- - /specky-release — Phase 9
81
- - /specky-deploy Deployment artifacts
82
-
83
- **Special:**
84
- - /specky-from-figma — Import Figma designs
85
- - /specky-from-meeting — Import meeting transcripts
86
- - /specky-check-drift — Detect spec-code drift
87
- - /specky-resolve-conflict Resolve spec conflicts
88
-
89
- **Debug:**
90
- - /specky-debug-hook — Debug hook execution
91
- - /specky-pipeline-status Check pipeline status
92
- - /specky-reset-phase — Reset a pipeline phase
93
-
94
- ## All 14 Skills
95
-
96
- | Skill | Triggers On |
97
- |-------|-------------|
98
- | specky-sdd-pipeline | "specky", "SDD pipeline", "EARS notation", "pipeline phases" |
99
- | specky-orchestrator | "orchestrate", "run full pipeline", "advance phase" |
100
- | specky-onboarding | "help", "get started", "what is specky" |
101
- | specky-sdd-init | "initialize", "greenfield", "new feature bootstrap" |
102
- | specky-spec-engineer | "write specification", "EARS", "REQ-ID" |
103
- | specky-sdd-clarify | "clarify", "ambiguous requirements", "EARS validation" |
104
- | specky-design-architect | "design", "architecture", "Mermaid diagrams" |
105
- | specky-task-planner | "tasks", "checklist", "implementation plan" |
106
- | specky-quality-reviewer | "analysis", "quality review", "compliance" |
107
- | implementer | "implementation plan", "test stubs", "IaC generation" |
108
- | test-verifier | "verify tests", "check coverage", "phantom detection" |
109
- | release-engineer | "prepare release", "create PR", "release gates" |
110
- | research-analyst | "research codebase", "scan tech stack", "import documents" |
111
- | specky-sdd-markdown-standard | "artifact format", "spec formatting" |
112
-
113
- ## 58 MCP Tools by Category
114
-
115
- **Pipeline Core (8):** sdd_init, sdd_discover, sdd_write_spec, sdd_clarify, sdd_write_design, sdd_write_tasks, sdd_run_analysis, sdd_advance_phase
116
-
117
- **Input/Conversion (6):** sdd_import_transcript, sdd_auto_pipeline, sdd_batch_transcripts, sdd_import_document, sdd_batch_import, sdd_figma_to_spec
118
-
119
- **Quality/Validation (5):** sdd_checklist, sdd_verify_tasks, sdd_compliance_check, sdd_cross_analyze, sdd_validate_ears
120
-
121
- **Visualization (4):** sdd_generate_diagram, sdd_generate_all_diagrams, sdd_generate_user_stories, sdd_figma_diagram
122
-
123
- **Infrastructure (3):** sdd_generate_iac, sdd_validate_iac, sdd_generate_dockerfile
124
-
125
- **Environment (3):** sdd_setup_local_env, sdd_setup_codespaces, sdd_generate_devcontainer
126
-
127
- **Integration/Export (5):** sdd_create_branch, sdd_export_work_items, sdd_create_pr, sdd_implement, sdd_research
128
-
129
- **Documentation (5):** sdd_generate_docs, sdd_generate_api_docs, sdd_generate_runbook, sdd_generate_onboarding, sdd_generate_all_docs
130
-
131
- **Testing (3):** sdd_generate_tests, sdd_verify_tests, sdd_generate_pbt
132
-
133
- **Turnkey (1):** sdd_turnkey_spec
134
-
135
- **Checkpointing (3):** sdd_checkpoint, sdd_restore, sdd_list_checkpoints
136
-
137
- **Utility (8):** sdd_get_status, sdd_get_template, sdd_write_bugfix, sdd_scan_codebase, sdd_amend, sdd_check_ecosystem, sdd_check_sync, sdd_metrics
138
-
139
- **Governance (4):** sdd_model_routing, sdd_context_status, sdd_check_access, sdd_verify_audit
140
-
141
- ## 16 Hook Scripts
142
-
143
- **Blocking (exit 2 = halt):**
144
- - specky-artifact-validator.sh — Prerequisite .md files exist
145
- - specky-phase-gate.sh — Output artifact created with quality
146
- - specky-security-scan.sh — OWASP + secrets scan
147
- - specky-release-gate.sh — 90% pass rate + artifact checks
148
-
149
- **Advisory (exit 0 = warn):**
150
- - specky-branch-validator.sh — Branch matches phase expectations
151
- - specky-pipeline-guard.sh — Pipeline ordering / phase-skip guard
152
- - specky-lgtm-gate.sh — Human review reminder at Phases 2/4/5
153
- - specky-session-banner.sh — Session start pipeline-status banner
154
- - specky-spec-sync.sh — Detect spec-code drift
155
- - specky-auto-checkpoint.sh — Suggest checkpoint after writes
156
- - specky-spec-quality.sh — Specification quality metrics
157
- - specky-ears-validator.sh — EARS pattern compliance
158
- - specky-task-tracer.sh — Task dependency graph
159
- - specky-drift-monitor.sh — CONSTITUTION drift detection
160
- - specky-cognitive-debt-alert.sh — Cognitive surrender detection
161
- - specky-metrics-dashboard.sh — Quality metrics collection
8
+ ## 1. Validate Workspace
9
+
10
+ 1. Validate `.specky/config.yml`; an existing invalid/partial file blocks execution.
11
+ 2. Enumerate `.specs/NNN-name/` directories.
12
+ 3. Report signed v5 state per feature. Root `.specs/.sdd-state.json`, unsigned state, or older versions require `specky migrate-contracts --dry-run` before tools run.
13
+ 4. Never select the latest or first feature automatically.
14
+
15
+ ## 2. Select the Use Case
16
+
17
+ Collect independently:
18
+
19
+ - lifecycle: greenfield, brownfield, migration
20
+ - workload: API, web application, service, CLI, library, infrastructure
21
+ - execution mode: full, rapid, emergency
22
+ - explicit three-digit feature number
23
+
24
+ The selected mode produces a persisted phase graph. Do not describe rapid/emergency as “skipping” a mandatory full graph; their contracted graphs are different by design.
25
+
26
+ ## 3. Select Capabilities
27
+
28
+ Capabilities are opt-in and require matching parameter objects. Review the exact table in the `specky-sdd-init` skill. Ask for every provider, framework, resource, branch, threshold, format, platform, and environment value. `capabilities: []` requires `capability_config: {}`.
29
+
30
+ ## 4. Gather Lifecycle Evidence
31
+
32
+ - Greenfield: outcome, boundaries, stakeholders, fixed/open constraints.
33
+ - Brownfield: run `sdd_scan_codebase` with explicit depth/exclusions; preserve baseline, compatibility, insertion, and rollback evidence.
34
+ - Migration: preserve named source inventory, target inventory, parity/divergence, wave, cutover, rollback, and decommission evidence.
35
+
36
+ ## 5. Choose Input Source
37
+
38
+ - Documents: enable `document-import`; explicitly allow formats.
39
+ - Transcripts: enable `transcript-import`; import may parse source, but auto/batch orchestration also requires explicit Constitution, source-backed requirements, complete architecture, tasks, and gates. Source quotes are validated before writes.
40
+ - Figma: enable `figma` and select extraction scope/diagram types.
41
+ - Direct discovery: questions are lifecycle/workload-specific.
42
+
43
+ ## 6. Choose Execution Surface
44
+
45
+ - Orchestrator: follows signed phase graph and delegates to lean agents.
46
+ - Agent: first reads its rich companion skill.
47
+ - Direct MCP: caller supplies every required field; no Zod defaults exist.
48
+
49
+ ## 7. Branching
50
+
51
+ Do not create a branch in Init. When `release` capability is enabled and phase policy permits, use persisted branch prefix/base/draft/checkpoint parameters.
52
+
53
+ ## Completion
54
+
55
+ Before routing, repeat the full selection and obtain confirmation. Then initialize or resume the exact feature and report the contract ID, fingerprint, canonical state path, and next contracted phase.