aw-spec-cli 0.1.4 → 0.1.5

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 (254) hide show
  1. package/assets/.agents/agent.json +28 -0
  2. package/assets/.agents/skills/aw-spec-orch/SKILL.md +56 -0
  3. package/assets/.agents/skills/aw-spec-orch-demo/SKILL.md +59 -0
  4. package/assets/.aw-spec/DESIGN-FORMAT.md +151 -0
  5. package/assets/.aw-spec/ORCH-DIALECT.md +156 -0
  6. package/assets/.aw-spec/RULE-PARTITION.md +126 -0
  7. package/assets/.aw-spec/extensions/agent-context/extension.yml +12 -9
  8. package/assets/.aw-spec/extensions.yml +12 -19
  9. package/assets/.aw-spec/integrations/aw-spec.manifest.json +1 -9
  10. package/assets/.aw-spec/interpreter/run-skill.py +1158 -0
  11. package/assets/.aw-spec/orchestrator/AGENT-PROFILE.md +94 -0
  12. package/assets/.aw-spec/orchestrator/README.md +300 -0
  13. package/assets/.aw-spec/orchestrator/adapters/claude_agent_sdk.py +74 -0
  14. package/assets/.aw-spec/orchestrator/adapters/google_antigravity.py +74 -0
  15. package/assets/.aw-spec/orchestrator/modules/delta-design.orch.yaml +105 -0
  16. package/assets/.aw-spec/orchestrator/modules/delta-spec.orch.yaml +79 -0
  17. package/assets/.aw-spec/orchestrator/modules/domain-select.orch.yaml +81 -0
  18. package/assets/.aw-spec/orchestrator/modules/tech-select.orch.yaml +75 -0
  19. package/assets/.aw-spec/orchestrator/orchestrator.py +1721 -0
  20. package/assets/.aw-spec/orchestrator/rev-templates/ai-rules.reference.md +40 -0
  21. package/assets/.aw-spec/orchestrator/rev-templates/comandrulemap.skeleton.md +59 -0
  22. package/assets/.aw-spec/orchestrator/rev-templates/commandtechrulemap.skeleton.md +97 -0
  23. package/assets/.aw-spec/orchestrator/rev-templates/domain-constitution.skeleton.md +61 -0
  24. package/assets/.aw-spec/orchestrator/rev-templates/domain-requirements.skeleton.md +48 -0
  25. package/assets/.aw-spec/orchestrator/rev-templates/domain-rule-file.skeleton.md +39 -0
  26. package/assets/.aw-spec/orchestrator/rev-templates/technical-constitution.skeleton.md +106 -0
  27. package/assets/.aw-spec/orchestrator/rev-templates/technical-rule-file.skeleton.md +54 -0
  28. package/assets/.aw-spec/orchestrator/workflows/_smoke.orch.yaml +160 -0
  29. package/assets/.aw-spec/orchestrator/workflows/aw-spec-add-component.orch.yaml +244 -0
  30. package/assets/.aw-spec/orchestrator/workflows/aw-spec-adopt.orch.yaml +775 -0
  31. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +248 -0
  32. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +261 -0
  33. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +425 -0
  34. package/assets/.aw-spec/orchestrator/workflows/aw-spec-build.orch.yaml +188 -0
  35. package/assets/.aw-spec/orchestrator/workflows/aw-spec-characterize.orch.yaml +474 -0
  36. package/assets/.aw-spec/orchestrator/workflows/aw-spec-close-delta.orch.yaml +181 -0
  37. package/assets/.aw-spec/orchestrator/workflows/aw-spec-constitution.orch.yaml +284 -0
  38. package/assets/.aw-spec/orchestrator/workflows/aw-spec-demo.orch.yaml +103 -0
  39. package/assets/.aw-spec/orchestrator/workflows/aw-spec-dependency-tree.orch.yaml +69 -0
  40. package/assets/.aw-spec/orchestrator/workflows/aw-spec-deploy.orch.yaml +85 -0
  41. package/assets/.aw-spec/orchestrator/workflows/aw-spec-design.orch.yaml +382 -0
  42. package/assets/.aw-spec/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +382 -0
  43. package/assets/.aw-spec/orchestrator/workflows/aw-spec-foundation.orch.yaml +246 -0
  44. package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +231 -0
  45. package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement.orch.yaml +258 -0
  46. package/assets/.aw-spec/orchestrator/workflows/aw-spec-inventory.orch.yaml +236 -0
  47. package/assets/.aw-spec/orchestrator/workflows/aw-spec-onboard.orch.yaml +949 -0
  48. package/assets/.aw-spec/orchestrator/workflows/aw-spec-parity.orch.yaml +293 -0
  49. package/assets/.aw-spec/orchestrator/workflows/aw-spec-run.orch.yaml +177 -0
  50. package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-domain.orch.yaml +79 -0
  51. package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-feature.orch.yaml +128 -0
  52. package/assets/.aw-spec/orchestrator/workflows/aw-spec-specify.orch.yaml +412 -0
  53. package/assets/.aw-spec/scripts/bash/aw-inventory.sh +14 -0
  54. package/assets/.aw-spec/scripts/bash/aw-parity.sh +13 -0
  55. package/assets/.aw-spec/scripts/bash/aw-rev-constitution.sh +13 -0
  56. package/assets/.aw-spec/scripts/bash/aw-spec-actions.sh +1899 -0
  57. package/assets/.aw-spec/scripts/bash/aw-xref.sh +15 -0
  58. package/assets/.aw-spec/scripts/bash/common.sh +11 -60
  59. package/assets/.aw-spec/scripts/powershell/aw-inventory.ps1 +14 -0
  60. package/assets/.aw-spec/scripts/powershell/aw-parity.ps1 +13 -0
  61. package/assets/.aw-spec/scripts/powershell/aw-rev-constitution.ps1 +13 -0
  62. package/assets/.aw-spec/scripts/powershell/aw-spec-actions.ps1 +1563 -0
  63. package/assets/.aw-spec/scripts/powershell/aw-xref.ps1 +15 -0
  64. package/assets/.aw-spec/scripts/python/aw-inventory.py +683 -0
  65. package/assets/.aw-spec/scripts/python/aw-parity.py +380 -0
  66. package/assets/.aw-spec/scripts/python/aw-rev-constitution.py +312 -0
  67. package/assets/.aw-spec/scripts/python/aw-xref.py +1330 -0
  68. package/assets/.aw-spec/scripts/python/validate_okf.py +349 -0
  69. package/assets/.aw-spec/templates/constitution-domain-template.md +75 -0
  70. package/assets/.aw-spec/templates/constitution-technical-template.md +70 -0
  71. package/assets/.aw-spec/templates/delta-design-template.md +69 -0
  72. package/assets/.aw-spec/templates/delta-spec-template.md +60 -0
  73. package/assets/.aw-spec/templates/design-template.md +383 -0
  74. package/assets/.aw-spec/templates/okf-concept-template.md +103 -0
  75. package/assets/.aw-spec/templates/parity-manifest-template.json +49 -0
  76. package/assets/.aw-spec/templates/source-map-template.md +85 -0
  77. package/assets/.aw-spec/templates/spec-template.md +192 -71
  78. package/assets/.claude/agent.json +27 -0
  79. package/assets/.claude/skills/aw-spec-orch/SKILL.md +55 -0
  80. package/assets/.claude/skills/aw-spec-orch-demo/SKILL.md +59 -0
  81. package/assets/.kilocode/agent.json +28 -0
  82. package/assets/.kilocode/workflows/aw-spec-orch-demo.md +59 -0
  83. package/assets/.kilocode/workflows/aw-spec-orch.md +55 -0
  84. package/assets/docs/architecture/clean-architecture.md +1 -1
  85. package/assets/docs/architecture/cqrs.md +1 -1
  86. package/assets/docs/architecture/eventing.md +1 -1
  87. package/assets/docs/architecture/folder-structure.md +1 -1
  88. package/assets/docs/architecture/modular-monolith.md +1 -1
  89. package/assets/docs/architecture/persistence.md +1 -1
  90. package/assets/docs/architecture/testing.md +1 -1
  91. package/assets/docs/architecture/vertical-slices.md +1 -1
  92. package/assets/docs/components/Email/README.md +1 -1
  93. package/assets/docs/components/Jobs/README.md +1 -1
  94. package/assets/docs/components/QrGenerator/README.md +1 -1
  95. package/assets/docs/components/README.md +1 -1
  96. package/assets/docs/domain/domain-driven-design.md +1 -1
  97. package/assets/docs/domainspecs/healthcare/api-versioning.domain.md +1 -1
  98. package/assets/docs/domainspecs/healthcare/auditing.domain.md +86 -18
  99. package/assets/docs/domainspecs/healthcare/authorization.domain.md +1 -1
  100. package/assets/docs/domainspecs/healthcare/clinical-terms.md +1 -1
  101. package/assets/docs/domainspecs/healthcare/coding-standards.domain.md +1 -1
  102. package/assets/docs/domainspecs/healthcare/comandrulemap.md +58 -124
  103. package/assets/docs/domainspecs/healthcare/commandtechrulemap.md +119 -0
  104. package/assets/docs/domainspecs/healthcare/consent.md +1 -1
  105. package/assets/docs/domainspecs/healthcare/cqrs.domain.md +1 -1
  106. package/assets/docs/domainspecs/healthcare/data-classification.domain.md +1 -1
  107. package/assets/docs/domainspecs/healthcare/dependency-policy.domain.md +1 -1
  108. package/assets/docs/domainspecs/healthcare/dicom.md +1 -1
  109. package/assets/docs/domainspecs/healthcare/domain-driven-design.domain.md +1 -1
  110. package/assets/docs/domainspecs/healthcare/eventing.domain.md +1 -1
  111. package/assets/docs/domainspecs/healthcare/fhir.md +1 -1
  112. package/assets/docs/domainspecs/healthcare/folder-structure.domain.md +1 -1
  113. package/assets/docs/domainspecs/healthcare/hipaa.md +1 -1
  114. package/assets/docs/domainspecs/healthcare/hl7.md +1 -1
  115. package/assets/docs/domainspecs/healthcare/integration-terms.md +1 -1
  116. package/assets/docs/domainspecs/healthcare/persistence.domain.md +1 -1
  117. package/assets/docs/domainspecs/healthcare/terminology.md +1 -1
  118. package/assets/docs/domainspecs/healthcare/testing.domain.md +1 -1
  119. package/assets/docs/domainspecs/healthcare/vertical-slices.domain.md +1 -1
  120. package/assets/docs/domainspecs/healthcare/zero-trust.domain.md +1 -1
  121. package/assets/docs/domainspecs/pharma/api-versioning.domain.md +1 -1
  122. package/assets/docs/domainspecs/pharma/atc.md +1 -1
  123. package/assets/docs/domainspecs/pharma/auditing.domain.md +80 -16
  124. package/assets/docs/domainspecs/pharma/authorization.domain.md +1 -1
  125. package/assets/docs/domainspecs/pharma/coding-standards.domain.md +1 -1
  126. package/assets/docs/domainspecs/pharma/comandrulemap.md +64 -142
  127. package/assets/docs/domainspecs/pharma/commandtechrulemap.md +119 -0
  128. package/assets/docs/domainspecs/pharma/cqrs.domain.md +1 -1
  129. package/assets/docs/domainspecs/pharma/data-classification.domain.md +1 -1
  130. package/assets/docs/domainspecs/pharma/data-provenance.md +1 -1
  131. package/assets/docs/domainspecs/pharma/dependency-policy.domain.md +1 -1
  132. package/assets/docs/domainspecs/pharma/domain-driven-design.domain.md +1 -1
  133. package/assets/docs/domainspecs/pharma/eventing.domain.md +1 -1
  134. package/assets/docs/domainspecs/pharma/fhir.md +1 -1
  135. package/assets/docs/domainspecs/pharma/folder-structure.domain.md +1 -1
  136. package/assets/docs/domainspecs/pharma/hl7.md +1 -1
  137. package/assets/docs/domainspecs/pharma/idmp.md +1 -1
  138. package/assets/docs/domainspecs/pharma/integration-terms.md +1 -1
  139. package/assets/docs/domainspecs/pharma/ndc.md +1 -1
  140. package/assets/docs/domainspecs/pharma/persistence.domain.md +1 -1
  141. package/assets/docs/domainspecs/pharma/pharma-terms.md +1 -1
  142. package/assets/docs/domainspecs/pharma/product-lifecycle.domain.md +1 -1
  143. package/assets/docs/domainspecs/pharma/regulatory-compliance.md +1 -1
  144. package/assets/docs/domainspecs/pharma/terminology.md +1 -1
  145. package/assets/docs/domainspecs/pharma/testing.domain.md +1 -1
  146. package/assets/docs/domainspecs/pharma/vertical-slices.domain.md +1 -1
  147. package/assets/docs/domainspecs/pharma/zero-trust.domain.md +1 -1
  148. package/assets/docs/governance/api-versioning.md +1 -1
  149. package/assets/docs/governance/coding-standards.md +1 -1
  150. package/assets/docs/governance/dependency-policy.md +1 -1
  151. package/assets/docs/requirement-spec.txt +27 -0
  152. package/assets/docs/security/auditing.md +54 -11
  153. package/assets/docs/security/authorization.md +1 -1
  154. package/assets/docs/security/data-classification.md +1 -1
  155. package/assets/docs/security/zero-trust.md +1 -1
  156. package/dist/commands/init.d.ts.map +1 -1
  157. package/dist/commands/init.js +7 -54
  158. package/dist/commands/init.js.map +1 -1
  159. package/dist/index.js +0 -2
  160. package/dist/index.js.map +1 -1
  161. package/dist/utils/paths.js +2 -2
  162. package/dist/utils/paths.js.map +1 -1
  163. package/package.json +1 -1
  164. package/assets/.agents/skills/aw-spec-addcomponent/SKILL.md +0 -129
  165. package/assets/.agents/skills/aw-spec-agent-context-update/SKILL.md +0 -31
  166. package/assets/.agents/skills/aw-spec-analyze/SKILL.md +0 -296
  167. package/assets/.agents/skills/aw-spec-checklist/SKILL.md +0 -374
  168. package/assets/.agents/skills/aw-spec-clarify/SKILL.md +0 -320
  169. package/assets/.agents/skills/aw-spec-constitution/SKILL.md +0 -194
  170. package/assets/.agents/skills/aw-spec-fast-implement/SKILL.md +0 -268
  171. package/assets/.agents/skills/aw-spec-foundation/SKILL.md +0 -358
  172. package/assets/.agents/skills/aw-spec-implement/SKILL.md +0 -279
  173. package/assets/.agents/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
  174. package/assets/.agents/skills/aw-spec-plan/SKILL.md +0 -221
  175. package/assets/.agents/skills/aw-spec-select-domain/SKILL.md +0 -73
  176. package/assets/.agents/skills/aw-spec-specify/SKILL.md +0 -382
  177. package/assets/.agents/skills/aw-spec-tasks/SKILL.md +0 -259
  178. package/assets/.agents/skills/aw-spec-taskstoissues/SKILL.md +0 -107
  179. package/assets/.aw-spec/integrations/claude.manifest.json +0 -17
  180. package/assets/.aw-spec/scripts/bash/check-prerequisites.sh +0 -189
  181. package/assets/.aw-spec/scripts/bash/create-new-feature.sh +0 -299
  182. package/assets/.aw-spec/scripts/bash/setup-plan.sh +0 -84
  183. package/assets/.aw-spec/scripts/bash/setup-tasks.sh +0 -91
  184. package/assets/.aw-spec/templates/checklist-template.md +0 -40
  185. package/assets/.aw-spec/templates/constitution-template.md +0 -57
  186. package/assets/.aw-spec/templates/plan-template.md +0 -113
  187. package/assets/.aw-spec/templates/tasks-template.md +0 -252
  188. package/assets/.aw-spec/workflows/aw-spec/workflow.yml +0 -77
  189. package/assets/.aw-spec/workflows/workflow-registry.json +0 -13
  190. package/assets/.claude/skills/aw-spec-addcomponent/SKILL.md +0 -129
  191. package/assets/.claude/skills/aw-spec-agent-context-update/SKILL.md +0 -31
  192. package/assets/.claude/skills/aw-spec-analyze/SKILL.md +0 -296
  193. package/assets/.claude/skills/aw-spec-checklist/SKILL.md +0 -374
  194. package/assets/.claude/skills/aw-spec-clarify/SKILL.md +0 -320
  195. package/assets/.claude/skills/aw-spec-constitution/SKILL.md +0 -194
  196. package/assets/.claude/skills/aw-spec-fast-implement/SKILL.md +0 -268
  197. package/assets/.claude/skills/aw-spec-foundation/SKILL.md +0 -358
  198. package/assets/.claude/skills/aw-spec-implement/SKILL.md +0 -279
  199. package/assets/.claude/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
  200. package/assets/.claude/skills/aw-spec-plan/SKILL.md +0 -221
  201. package/assets/.claude/skills/aw-spec-select-domain/SKILL.md +0 -73
  202. package/assets/.claude/skills/aw-spec-specify/SKILL.md +0 -382
  203. package/assets/.claude/skills/aw-spec-tasks/SKILL.md +0 -259
  204. package/assets/.claude/skills/aw-spec-taskstoissues/SKILL.md +0 -107
  205. package/assets/.kilocode/rules/specify-rules.md +0 -4
  206. package/assets/.kilocode/workflows/aw-spec-addcomponent.md +0 -129
  207. package/assets/.kilocode/workflows/aw-spec-agent-context.update.md +0 -31
  208. package/assets/.kilocode/workflows/aw-spec-analyze.md +0 -296
  209. package/assets/.kilocode/workflows/aw-spec-checklist.md +0 -374
  210. package/assets/.kilocode/workflows/aw-spec-clarify.md +0 -320
  211. package/assets/.kilocode/workflows/aw-spec-constitution.md +0 -194
  212. package/assets/.kilocode/workflows/aw-spec-fast-implement.md +0 -263
  213. package/assets/.kilocode/workflows/aw-spec-foundation.md +0 -358
  214. package/assets/.kilocode/workflows/aw-spec-implement.md +0 -279
  215. package/assets/.kilocode/workflows/aw-spec-minimal-implementation.md +0 -204
  216. package/assets/.kilocode/workflows/aw-spec-plan.md +0 -221
  217. package/assets/.kilocode/workflows/aw-spec-select-domain.md +0 -73
  218. package/assets/.kilocode/workflows/aw-spec-specify.md +0 -382
  219. package/assets/.kilocode/workflows/aw-spec-tasks.md +0 -259
  220. package/assets/.kilocode/workflows/aw-spec-taskstoissues.md +0 -107
  221. package/assets/docs/UI.Visualization/PACKAGING.md +0 -191
  222. package/assets/docs/UI.Visualization/UI.Visualization.Reference.pack.txt +0 -11768
  223. package/assets/docs/UI.Visualization/UI.Visualization.pack.txt +0 -11214
  224. package/assets/docs/UI.Visualization/pack-foundation.ps1 +0 -165
  225. package/assets/docs/UI.Visualization/pack-foundation.sh +0 -206
  226. package/assets/docs/UI.Visualization/pack-reference-foundation.ps1 +0 -159
  227. package/assets/docs/UI.Visualization/pack-reference-foundation.sh +0 -205
  228. package/assets/docs/UI.Visualization/unpack-foundation.ps1 +0 -126
  229. package/assets/docs/UI.Visualization/unpack-foundation.sh +0 -217
  230. package/assets/docs/UI.Visualization/unpack-reference-foundation.ps1 +0 -129
  231. package/assets/docs/UI.Visualization/unpack-reference-foundation.sh +0 -218
  232. package/assets/docs/command.txt +0 -295
  233. package/assets/docs/domainspecs/UIVisualization/chart-bubble.md +0 -70
  234. package/assets/docs/domainspecs/UIVisualization/chart-dimred.md +0 -58
  235. package/assets/docs/domainspecs/UIVisualization/chart-heatmap.md +0 -62
  236. package/assets/docs/domainspecs/UIVisualization/chart-network.md +0 -69
  237. package/assets/docs/domainspecs/UIVisualization/chart-parallel.md +0 -75
  238. package/assets/docs/domainspecs/UIVisualization/chart-scurve.md +0 -66
  239. package/assets/docs/domainspecs/UIVisualization/chart-survival.md +0 -69
  240. package/assets/docs/domainspecs/UIVisualization/chart-trellis.md +0 -68
  241. package/assets/docs/domainspecs/UIVisualization/chart-violin.md +0 -61
  242. package/assets/docs/domainspecs/UIVisualization/chart-volcano.md +0 -63
  243. package/assets/docs/domainspecs/UIVisualization/charting-standards.domain.md +0 -80
  244. package/assets/docs/domainspecs/UIVisualization/clean-architecture.domain.md +0 -87
  245. package/assets/docs/domainspecs/UIVisualization/coding-standards.domain.md +0 -47
  246. package/assets/docs/domainspecs/UIVisualization/comandrulemap.md +0 -130
  247. package/assets/docs/domainspecs/UIVisualization/component-contracts.domain.md +0 -67
  248. package/assets/docs/domainspecs/UIVisualization/data-source.domain.md +0 -68
  249. package/assets/docs/domainspecs/UIVisualization/domain-requirements.md +0 -110
  250. package/assets/docs/domainspecs/UIVisualization/folder-structure.domain.md +0 -55
  251. package/assets/docs/domainspecs/UIVisualization/state-management.domain.md +0 -67
  252. package/assets/docs/domainspecs/UIVisualization/testing.domain.md +0 -52
  253. package/assets/docs/domainspecs/UIVisualization/ui-viz-terms.md +0 -39
  254. package/assets/docs/pharma-constitution.my-ref.md +0 -86
@@ -0,0 +1,412 @@
1
+ # =============================================================================
2
+ # aw-spec-specify (orchestrator) — author the SPEC for the ACTIVE feature
3
+ #
4
+ # Spec-anchored pipeline, spec phase. feature = AGGREGATE (picked/created by
5
+ # /aw-spec-orch select-feature, which sets .aw-spec/feature.json). specify does
6
+ # NOT guess or create the feature — it CONSUMES the active one, and is phase-pure
7
+ # (spec side only; the single design.md is the `design` phase).
8
+ #
9
+ # Auto-detects first-vs-subsequent from spec.md:
10
+ # • BOOTSTRAP (no spec.md) → author the MASTER spec (US-1) + init active_version.json.
11
+ # • DELTA (spec.md exists) → delegate to the delta-spec module: open a change (cr-setup)
12
+ # and author the delta-spec ONLY. The master spec.md is left UNTOUCHED — the change
13
+ # stays OPEN; finalize-delta merges the delta into spec.md + design.md, and the
14
+ # change is not closed until close-delta at the end of the chain.
15
+ # (The former standalone `cr` capture's spec half now lives here.)
16
+ #
17
+ # Both paths then run ONE converge block — checklist + clarify + validate — over the
18
+ # document THIS invocation authored, never the other one:
19
+ # • BOOTSTRAP → the master spec, graded by the spec checklist.
20
+ # • DELTA → the delta-spec, graded by a DELTA-SHAPED checklist written inside
21
+ # changes/<cr-id>/. The master is not read, not graded, NOT written.
22
+ # The pairing is bound from create-checklist's own output (checklist_file + target →
23
+ # quality_target), so the checklist and the document it grades can never diverge.
24
+ # Why it matters: the delta is authored relative to the master, so a "quality" rewrite
25
+ # of the master mid-change would leave the delta computed against a stale baseline —
26
+ # and in brownfield it would silently edit an adopted, code-derived spec that nothing
27
+ # downstream re-checks for fidelity. Narrow rewrites run include_standards:false.
28
+ # Accuracy of the delta AGAINST the master (id continuity, conflicts) stays where it
29
+ # belongs: /aw-spec-orch analyze-delta-design.
30
+ #
31
+ # Forward paths:
32
+ # NEW : specify → design → analyze-design → implement
33
+ # CHANGE : specify (delta-spec) → design (delta-design) → analyze-delta-design →
34
+ # implement-delta → build → finalize-delta → analyze-slice → close-delta
35
+ #
36
+ # Launch: /aw-spec-orch specify [strategy] <what the feature/change does>
37
+ # e.g. /aw-spec-orch specify Customers place an order for one or more items
38
+ # Prereq: /aw-spec-orch select-feature (sets the active aggregate)
39
+ # =============================================================================
40
+
41
+ name: aw-spec-specify
42
+ description: Author the specification of the ACTIVE feature (aggregate). First call writes the master spec (US-1); a later call (spec.md exists) delegates to the delta-spec module to author a delta-spec ONLY (master spec.md untouched — finalize-delta merges it) and leaves the change OPEN. The checklist/clarify/validate loops grade whichever document the call authored, using a delta-shaped checklist on the change path. Spec phase only — design is separate.
43
+ version: 2.3.0
44
+ agent_agnostic: true
45
+ dialect: aw-spec.orchestrator/v1
46
+
47
+ inputs:
48
+ user_input:
49
+ description: What the feature (first call) or the change (later calls) should do, in natural language.
50
+ required: true
51
+ bind: USER_INPUT
52
+
53
+ scripts:
54
+ actions:
55
+ sh: .aw-spec/scripts/bash/aw-spec-actions.sh
56
+ ps1: .aw-spec/scripts/powershell/aw-spec-actions.ps1
57
+
58
+ # Sticky standards seed = the UNIVERSAL always-on rule only (ai-rules). Specify's ONE
59
+ # technical input — the MODELLING METHODOLOGY (DDD tactical patterns) — is no longer
60
+ # hardcoded here: it is now CONFIGURATION, loaded per-command from
61
+ # docs/domainspecs/<domain>/commandtechrulemap.md by the tech-select module (see the
62
+ # tech_select step below), exactly as the DOMAIN rule files are loaded by domain-select.
63
+ # Per the rule-partition that heading may carry a modelling methodology ONLY — never an
64
+ # architecture / persistence / codegen file; those belong to design + implement, and
65
+ # putting one here would break specify's domain purity. The domain classification /
66
+ # constraint rules still arrive via domain-select (D3). The BASE security/
67
+ # data-classification.md is a design doc — specify gets the domain data-classification
68
+ # overlay via domain-select, and lifts its taxonomy into the spec's Data Classification
69
+ # (DC-) section. (missing files are skipped at assembly time)
70
+ standards:
71
+ - { path: docs/glossary/ai-rules.md, optional: true }
72
+
73
+ vars:
74
+ spec_all_pass: "false" # validation-loop guard, flipped by the validate query
75
+ checklist_total: "0" # bound by checklist-read
76
+ checklist_passed: "0" # stays 0 when the checklist has no items to score
77
+ cr_id: "" # set on the DELTA path only
78
+ cr_dir: "" # set on the DELTA path only — changes/<cr-id>/
79
+ quality_target: "" # the document the converge loops grade AND rewrite:
80
+ # spec.md (bootstrap) | delta-spec.md (delta). Bound from
81
+ # create-checklist's own output so it always agrees with
82
+ # the checklist. NEVER hand-set to spec_file on the delta
83
+ # path — that is what silently drifts an adopted spec.
84
+ version: "" # current active_version.json version (for the report)
85
+
86
+ workflow:
87
+
88
+ # 1. CONSUME the active feature (set by select-feature). No derive-names.
89
+ - id: feature_paths
90
+ action: execute_script
91
+ on_error: continue
92
+ script: { ref: actions }
93
+ subcommand: feature-paths
94
+ outputs:
95
+ - { name: feature_dir, from: "$.feature_dir" }
96
+ - { name: spec_file, from: "$.spec_file" }
97
+ - { name: spec_exists, from: "$.spec_exists" }
98
+
99
+ - id: require_feature
100
+ action: verify_context
101
+ require_non_empty: feature_dir
102
+ on_empty: stop
103
+ on_empty_message: "No active feature. Run /aw-spec-orch select-feature first (pick or create the aggregate, e.g. Order), then re-run specify."
104
+
105
+ # 2. TECHNICAL rule files → sticky standards (configuration, not hardcoded).
106
+ # tech-select reads docs/domainspecs/<domain>/commandtechrulemap.md under
107
+ # "## /aw-spec-specify" and loads that set. Per the rule-partition that heading is
108
+ # the MODELLING-METHODOLOGY slot only (DDD tactical patterns) — it must never list an
109
+ # architecture / persistence / codegen file, which would break specify's domain purity.
110
+ # No blocking gate: an unconfigured project (no domain, no map, or no specify heading)
111
+ # soft-continues and simply loads nothing extra. Placed AFTER require_feature so the
112
+ # no-feature stop fires before any selection box.
113
+ - id: tech_select
114
+ action: include
115
+ module: .aw-spec/orchestrator/modules/tech-select.orch.yaml
116
+ with: { command: aw-spec-specify }
117
+
118
+ # 3. Resolve the active domain + its rule files → sticky standards (D3).
119
+ - id: domain_select
120
+ action: include
121
+ module: .aw-spec/orchestrator/modules/domain-select.orch.yaml
122
+ with: { command: aw-spec-specify }
123
+
124
+ # 4. Pre-execution hooks: resolve (script) then dispatch (invoking agent).
125
+ - id: resolve_pre_hooks
126
+ action: execute_script
127
+ script: { ref: actions }
128
+ subcommand: resolve-hooks
129
+ args: ["--phase", "before_specify"]
130
+ outputs:
131
+ - { name: before_hooks, from: "$.hooks" }
132
+ - id: dispatch_pre_hooks
133
+ action: dispatch_hooks
134
+ hooks_from_variable: before_hooks
135
+
136
+ # ═══════════════════════ BOOTSTRAP — no spec.md yet ═══════════════════════
137
+ # Copy the spec template into the (already-existing) feature dir + init version.
138
+ - id: boot_scaffold
139
+ condition: "{{spec_exists}} == false"
140
+ action: execute_script
141
+ script: { ref: actions }
142
+ subcommand: scaffold
143
+ args: ["--feature-dir", "{{feature_dir}}", "--allow-existing"]
144
+
145
+ - id: boot_version_init
146
+ condition: "{{spec_exists}} == false"
147
+ action: execute_script
148
+ script: { ref: actions }
149
+ subcommand: version-init
150
+ args: ["--feature-dir", "{{feature_dir}}"]
151
+
152
+ - id: boot_ctx
153
+ condition: "{{spec_exists}} == false"
154
+ action: build_context
155
+ context:
156
+ - "{{spec_file}}" # the copied template = section structure
157
+ - .aw-spec/memory/constitution.domain.md # the DOMAIN authority — specify's frame. Declared
158
+ # REQUIRED (bare string, not `optional: true`) ON PURPOSE:
159
+ # specify is the ONLY phase that reads the domain rules and
160
+ # its task text tells the agent this file is in context, so
161
+ # a missing one must ANNOUNCE (`[context] MISSING (required)`)
162
+ # rather than silently thin the payload. It announces, it does
163
+ # not stop — constitution/onboard write this file before
164
+ # specify ever runs on either flow.
165
+ # NOT constitution.technical: architecture (I–XV) is a
166
+ # HOW concern for design/implement, not domain modelling.
167
+ - id: boot_generate
168
+ condition: "{{spec_exists}} == false"
169
+ action: agent_author
170
+ output_target: { type: file, path: "{{spec_file}}" }
171
+ task: |
172
+ Author the MASTER specification for this aggregate by filling out the
173
+ template in context. This is the first user story, US-1. Base everything on:
174
+
175
+ {{USER_INPUT}}
176
+
177
+ Rules for the content you generate:
178
+ - The feature IS the aggregate; set the Aggregate field and keep US-1's id.
179
+ - Preserve the template's section order and headings.
180
+ - SPECIFY IS THE ONLY PHASE THAT READS THE DOMAIN RULES. Design and implement
181
+ work from the spec/design, never the domain docs — so this spec is the SOLE
182
+ carrier of the domain into the pipeline. Model the domain COMPLETELY here, or
183
+ it is lost downstream.
184
+ - DDD IS THE RATIFIED MODELLING STANDARD (NON-NEGOTIABLE → the modelling-methodology
185
+ standard in the sticky standards, wired per-project via commandtechrulemap
186
+ "## /aw-spec-specify", plus the domain's own DDD overlay). The domain
187
+ model in this spec MUST be expressed strictly in DDD terms: a consistent
188
+ ubiquitous language; the aggregate + its root; entities vs value objects;
189
+ invariants owned by the aggregate; the bounded-context boundary. Capture these
190
+ as domain MODEL, not code — no C# types, no persistence, no framework. This is
191
+ the one technical standard specify applies, because the domain model is part of
192
+ the spec; design/implement inherit it through the spec, never re-derive it.
193
+ - Focus on WHAT users need and WHY. Include NO implementation mechanics
194
+ (languages, frameworks, code structure, endpoint/adapter design). Note: an
195
+ external interoperability OBLIGATION — which standard/resources must be met —
196
+ is a requirement, not implementation; record it as an Integration Contract,
197
+ but never how the adapter is built.
198
+ - Write for non-technical business stakeholders.
199
+ - Write System Requirements in EARS as the template shows (THE SYSTEM SHALL
200
+ / WHEN…/ IF…THEN / WHILE…/ WHERE…) — each atomic and testable.
201
+ - Capture always-true BUSINESS invariants as Business Rules (BR-n), and state
202
+ the aggregate boundary (what it owns vs references by id, and out of scope).
203
+ Record reasonable defaults in Assumptions.
204
+ - DOMAIN LIFT — when the active domain's rules impose them, lift into the three
205
+ dedicated sections (stable ids; cite the source rule where lifted):
206
+ • Constraints & NFRs (CN-n) — regulatory / retention / immutability /
207
+ audit-mandate and performance-as-a-limit rules. These are NOT business
208
+ invariants (those are BR) and NOT behaviour (those are FR).
209
+ • Data Classification (DC-n) — sensitivity categories + where each may /
210
+ MUST NOT appear (public surface, logs, metrics, traces, projections).
211
+ • Integration Contracts (IC-n) — external interop obligations (outbound
212
+ projections, terminology / reference services, inbound feeds) at contract
213
+ level, mapped to the Key Entities they concern.
214
+ If the domain imposes none, write "None (as of v1.0)" — never delete a section.
215
+ - This is v1.0: fill the initial Change History row's date and keep US-1's
216
+ "Added: v1.0" marker.
217
+ - ALWAYS include a "## Success Criteria" section with 2-4 measurable,
218
+ technology-agnostic, verifiable SC-nnn outcomes derived from the acceptance
219
+ criteria. It is MANDATORY — never drop it; when a metric must be inferred,
220
+ state a reasonable, testable target rather than omitting the section.
221
+ - Add at most 3 "[NEEDS CLARIFICATION: <question>]" markers, and only for
222
+ choices that materially affect scope/UX and have no reasonable default.
223
+ - Every section the template marks *(mandatory)* — at minimum System
224
+ Requirements and Success Criteria — plus Business Need, User Stories, and
225
+ the Change History row MUST be present and populated. The domain-lift sections
226
+ (Constraints & NFRs, Data Classification, Integration Contracts) MUST also be
227
+ present — populated when the domain applies, else "None (as of v1.0)". You may
228
+ omit only a genuinely inapplicable OPTIONAL item (e.g. the WHERE optional-feature
229
+ requirement, or an empty Assumptions list) — never a mandatory section, and
230
+ never write "N/A".
231
+ - Do NOT embed any checklist and NO design/implementation.
232
+
233
+ # ═════════════════════════ DELTA — spec.md exists ═════════════════════════
234
+ # A later requirement = a new user story on the SAME aggregate. Delegate to the
235
+ # delta-spec module: it opens the change (cr-setup, single-active-change guarded) and
236
+ # authors the delta-spec ONLY — the master spec.md is left UNTOUCHED. The change
237
+ # stays OPEN; finalize-delta merges the delta into spec.md later in the chain. Runs in
238
+ # this context (shares vars + the DDD + domain sticky standards). The former standalone
239
+ # `cr` capture's spec half now lives here. Downstream: design (delta-design) →
240
+ # analyze-delta-design → implement-delta → build → finalize-delta → analyze-slice →
241
+ # close-delta (close-delta is what finally archives the change and bumps the version).
242
+ - id: delta_spec_module
243
+ condition: "{{spec_exists}} == true"
244
+ action: include
245
+ module: .aw-spec/orchestrator/modules/delta-spec.orch.yaml
246
+
247
+ # ══════ CONVERGE — checklist + clarify + validate, ON THE DOCUMENT JUST WRITTEN ══════
248
+ # These loops run on WHICHEVER document this invocation authored — the master spec on
249
+ # the bootstrap path, the delta-spec on the change path. They must NEVER write the
250
+ # master while a change is open: the delta is authored relative to the master, so
251
+ # mutating the master here would leave the delta computed against a stale baseline
252
+ # AND (brownfield) silently edit an adopted, code-derived spec that no downstream
253
+ # stage re-checks for fidelity. Hence quality_target — bound from the SAME script call
254
+ # that creates the checklist, so the checklist and the graded document cannot diverge.
255
+ #
256
+ # 5. Quality checklist (shared script — static content, NO model). Idempotent in
257
+ # content; note it rewrites the file, so it is deliberately scoped to the path that
258
+ # authored the document (a delta run no longer resets the master's scored boxes).
259
+ - id: create_checklist
260
+ condition: "{{spec_exists}} == false"
261
+ action: execute_script
262
+ script: { ref: actions }
263
+ subcommand: create-checklist
264
+ args: ["--feature-dir", "{{feature_dir}}"]
265
+ outputs:
266
+ - { name: checklist_file, from: "$.checklist_file" }
267
+ - { name: quality_target, from: "$.target" } # → spec.md
268
+
269
+ # Delta twin: a DELTA-SHAPED checklist (ADDED/MODIFIED/REMOVED completeness, merge
270
+ # readiness) written INSIDE changes/<cr-id>/, grading the delta-spec. The master
271
+ # checklist's items assume a full spec and would mis-fire here, which is exactly why
272
+ # this is a separate checklist rather than the same one re-pointed.
273
+ - id: create_delta_checklist
274
+ condition: "{{spec_exists}} == true"
275
+ action: execute_script
276
+ script: { ref: actions }
277
+ subcommand: create-checklist
278
+ args: ["--feature-dir", "{{feature_dir}}", "--kind", "delta", "--change-dir", "{{cr_dir}}"]
279
+ outputs:
280
+ - { name: checklist_file, from: "$.checklist_file" }
281
+ - { name: quality_target, from: "$.target" } # → changes/<cr-id>/delta-spec.md
282
+
283
+ # 6. Resolve [NEEDS CLARIFICATION] markers interactively (≤3). Non-interactive
284
+ # runs answer with the first/recommended option (a documented default).
285
+ - id: extract_clarifications
286
+ action: agent_query
287
+ context: ["{{quality_target}}"]
288
+ include_standards: false
289
+ task: |
290
+ Extract up to 3 unresolved "[NEEDS CLARIFICATION: <question>]" markers from
291
+ the document in context (a feature spec, or one change's delta-spec), most
292
+ scope/security/UX-impacting first. Return {"clarifications":[]} if there are none.
293
+ schema: { clarifications: [ { id: c1, question: "<the question>", options: ["<answer A>", "<answer B>", "<answer C>"] } ] }
294
+ mock: { clarifications: [] }
295
+ outputs:
296
+ - { name: clarifications, from: "$.clarifications" }
297
+
298
+ - id: clarify_loop
299
+ action: loop
300
+ over: "{{clarifications}}"
301
+ as: c
302
+ max_iterations: 3
303
+ steps:
304
+ - id: ask_clar
305
+ action: ask
306
+ prompt: "{{c.question}}"
307
+ options_from: "{{c.options}}"
308
+ answer_key: "{{c.id}}"
309
+ answer_var: c_answer
310
+ - id: resolve_clar
311
+ action: agent_author
312
+ context: ["{{quality_target}}"]
313
+ include_standards: false # rewrite-in-place: the graded document only
314
+ task: |
315
+ Replace the matching "[NEEDS CLARIFICATION]" marker in the document in
316
+ context with this answer and update the affected requirement/section
317
+ accordingly. Preserve structure and headings. If it is a delta-spec, stay
318
+ within the delta — keep every item's ADDED / MODIFIED / REMOVED placement.
319
+ Question: {{c.question}}
320
+ Answer: {{c_answer}}
321
+ output_target: { type: file, path: "{{quality_target}}" }
322
+
323
+ # 7. Spec-quality validation loop — evaluate the spec against the checklist,
324
+ # fix failing items, re-check (max 3), then score the checklist file.
325
+ - id: checklist_read
326
+ action: execute_script
327
+ script: { ref: actions }
328
+ subcommand: checklist-read
329
+ args: ["--file", "{{checklist_file}}"]
330
+ outputs:
331
+ - { name: checklist_total, from: "$.total" }
332
+
333
+ - id: validation_loop
334
+ action: loop
335
+ while: "{{spec_all_pass}} != true"
336
+ max_iterations: 3
337
+ steps:
338
+ - id: validate
339
+ action: agent_query
340
+ context: ["{{checklist_file}}", "{{quality_target}}"]
341
+ include_standards: false
342
+ task: |
343
+ Evaluate the document under review (in context) against each checklist item
344
+ (in context, 1-based in order). The checklist's own title states which kind
345
+ of document it grades — a feature spec, or one change's delta-spec; judge it
346
+ as that kind and nothing more. An item passes when the document satisfies it.
347
+ (An item about remaining [NEEDS CLARIFICATION] markers passes once none
348
+ remain.) In "failing", quote the offending/absent part per failed item.
349
+ schema: { all_pass: false, results: { "1": true, "2": false }, failing: [ { n: 2, issue: "<quote>" } ] }
350
+ mock: { all_pass: true, results: {}, failing: [] }
351
+ outputs:
352
+ - { name: spec_all_pass, from: "$.all_pass" }
353
+ - { name: spec_results, from: "$.results" }
354
+ - { name: spec_failing, from: "$.failing" }
355
+ - id: pass_break
356
+ action: break
357
+ condition: "{{spec_all_pass}} == true"
358
+ - id: patch_spec
359
+ action: agent_author
360
+ context: ["{{quality_target}}"]
361
+ include_standards: false
362
+ task: |
363
+ Fix these quality failures in the document in context, preserving its
364
+ section order and headings. Do NOT add implementation detail; keep it
365
+ business-facing and testable.
366
+ If the document is a DELTA-SPEC: it describes one change, not the whole
367
+ feature. Fix it AS a delta — keep the ADDED / MODIFIED / REMOVED structure,
368
+ never expand it into a full specification, never copy in unchanged master
369
+ content to satisfy an item, and never edit the master spec.
370
+ Failures: {{spec_failing}}
371
+ output_target: { type: file, path: "{{quality_target}}" }
372
+
373
+ - id: score_checklist
374
+ action: execute_script
375
+ condition: "{{checklist_total}} != 0"
376
+ script: { ref: actions }
377
+ subcommand: checklist-apply
378
+ args: ["--file", "{{checklist_file}}", "--results", "{{spec_results}}"]
379
+ outputs:
380
+ - { name: checklist_passed, from: "$.after_checked" }
381
+
382
+ # 8. Read the current version for the report (both paths).
383
+ - id: version_read
384
+ action: execute_script
385
+ script: { ref: actions }
386
+ subcommand: version-read
387
+ args: ["--feature-dir", "{{feature_dir}}"]
388
+ outputs:
389
+ - { name: version, from: "$.version" }
390
+ - { name: active_change, from: "$.active_change" }
391
+
392
+ # 9. Post-execution hooks: resolve (script) then dispatch (invoking agent).
393
+ - id: resolve_post_hooks
394
+ action: execute_script
395
+ script: { ref: actions }
396
+ subcommand: resolve-hooks
397
+ args: ["--phase", "after_specify"]
398
+ outputs:
399
+ - { name: after_hooks, from: "$.hooks" }
400
+ - id: dispatch_post_hooks
401
+ action: dispatch_hooks
402
+ hooks_from_variable: after_hooks
403
+
404
+ outputs:
405
+ feature_directory: "{{feature_dir}}"
406
+ spec_file: "{{spec_file}}"
407
+ version: "{{version}}"
408
+ change_id: "{{cr_id}}"
409
+ authored_document: "{{quality_target}}" # spec.md (bootstrap) | delta-spec.md (delta)
410
+ checklist_file: "{{checklist_file}}"
411
+ checklist_quality: "{{checklist_passed}}/{{checklist_total}} items passing"
412
+ next: "/aw-spec-orch design — BOOTSTRAP authors design.md from the spec; a DELTA (this run opened change {{cr_id}}) authors the delta-design for it. A change then flows: analyze-delta-design → implement-delta → build → finalize-delta → analyze-slice → close-delta (finalize-delta merges the delta into spec.md + design.md but leaves the change open; analyze-slice verifies the slice against the merged master; close-delta archives the change and bumps the version)."
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env bash
2
+ # aw-inventory.sh — thin wrapper: delegate to the single python core.
3
+ #
4
+ # The brownfield inventory logic lives ONCE in ../python/aw-inventory.py (a
5
+ # faithful cross-platform port of Reference/okf-inventory.sh + aggregate-root
6
+ # signals). This wrapper exists only so the orchestrator's execute_script,
7
+ # which dispatches sh:/ps1: variants, can invoke it. All args (subcommand +
8
+ # options) pass straight through.
9
+ #
10
+ # aw-inventory.sh scan [--root <dir>] [--out <path>] [--bundle <dir>] [--config <yml>]
11
+ # aw-inventory.sh validate --bundle <dir> [--repo-root <dir>]
12
+ set -euo pipefail
13
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14
+ exec python3 "$DIR/../python/aw-inventory.py" "$@"
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env bash
2
+ # aw-parity.sh — thin wrapper: delegate to the single python core.
3
+ #
4
+ # Brownfield PARITY runner (the cutover gate). Logic lives ONCE in
5
+ # ../python/aw-parity.py; this wrapper exists only so the orchestrator's
6
+ # execute_script (sh:/ps1: dispatch) can invoke it. All args pass through.
7
+ #
8
+ # aw-parity.sh scaffold --feature-dir <dir>
9
+ # aw-parity.sh check --manifest <path>
10
+ # aw-parity.sh run --manifest <path> [--out <report.md>]
11
+ set -euo pipefail
12
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
13
+ exec python3 "$DIR/../python/aw-parity.py" "$@"
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env bash
2
+ # aw-rev-constitution.sh — thin wrapper: delegate to the single python core.
3
+ #
4
+ # Brownfield GOVERN-BACKWARD substrate, driven by `/aw-spec-orch onboard` (the
5
+ # standalone rev-constitution workflow is RETIRED). Logic lives
6
+ # ONCE in ../python/aw-rev-constitution.py; this wrapper exists only so the
7
+ # orchestrator's execute_script (sh:/ps1: dispatch) can invoke it. Args pass through.
8
+ #
9
+ # aw-rev-constitution.sh list-adopted [--root <dir>] [--specs <dir>] [--bundle <dir>]
10
+ # aw-rev-constitution.sh pack-setup --name <domain> [--fallback <name>] [--root <dir>]
11
+ set -euo pipefail
12
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
13
+ exec python3 "$DIR/../python/aw-rev-constitution.py" "$@"