aw-spec-cli 0.1.8 → 0.1.9

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 (257) hide show
  1. package/assets/.appweaver/DESIGN-FORMAT.md +200 -0
  2. package/assets/.appweaver/ORCH-DIALECT.md +156 -0
  3. package/assets/.appweaver/RULE-PARTITION.md +175 -0
  4. package/assets/.appweaver/STACK-PROFILES.md +461 -0
  5. package/assets/.appweaver/ai-rules.md +180 -0
  6. package/assets/.appweaver/domain.json +1 -0
  7. package/assets/.appweaver/extensions/.registry +19 -0
  8. package/assets/.appweaver/extensions/agent-context/README.md +57 -0
  9. package/assets/.appweaver/extensions/agent-context/agent-context-config.yml +4 -0
  10. package/assets/.appweaver/extensions/agent-context/commands/aw-spec.agent-context.update.md +26 -0
  11. package/assets/.appweaver/extensions/agent-context/extension.yml +37 -0
  12. package/assets/.appweaver/extensions/agent-context/scripts/bash/update-agent-context.sh +201 -0
  13. package/assets/.appweaver/extensions/agent-context/scripts/powershell/update-agent-context.ps1 +237 -0
  14. package/assets/.appweaver/extensions.yml +16 -0
  15. package/assets/.appweaver/feature.json +3 -0
  16. package/assets/.appweaver/init-options.json +9 -0
  17. package/assets/.appweaver/integration.json +15 -0
  18. package/assets/.appweaver/integrations/aw-spec.manifest.json +9 -0
  19. package/assets/.appweaver/interpreter/run-skill.py +1176 -0
  20. package/assets/.appweaver/memory/constitution.md +50 -0
  21. package/assets/.appweaver/orchestrator/.smoke-out/smoke.md +6 -0
  22. package/assets/.appweaver/orchestrator/AGENT-PROFILE.md +94 -0
  23. package/assets/.appweaver/orchestrator/README.md +300 -0
  24. package/assets/.appweaver/orchestrator/adapters/claude_agent_sdk.py +74 -0
  25. package/assets/.appweaver/orchestrator/adapters/google_antigravity.py +74 -0
  26. package/assets/.appweaver/orchestrator/modules/delta-design.orch.yaml +105 -0
  27. package/assets/.appweaver/orchestrator/modules/delta-spec.orch.yaml +101 -0
  28. package/assets/.appweaver/orchestrator/modules/domain-select.orch.yaml +90 -0
  29. package/assets/.appweaver/orchestrator/modules/lane-gate.orch.yaml +126 -0
  30. package/assets/.appweaver/orchestrator/modules/tech-select.orch.yaml +123 -0
  31. package/assets/.appweaver/orchestrator/orchestrator.py +1721 -0
  32. package/assets/.appweaver/orchestrator/rev-templates/ai-rules.reference.md +40 -0
  33. package/assets/.appweaver/orchestrator/rev-templates/delta-design-template.skeleton.md +101 -0
  34. package/assets/.appweaver/orchestrator/rev-templates/design-template.skeleton.md +245 -0
  35. package/assets/.appweaver/orchestrator/rev-templates/domain-constitution.skeleton.md +63 -0
  36. package/assets/.appweaver/orchestrator/rev-templates/domain-requirements.skeleton.md +48 -0
  37. package/assets/.appweaver/orchestrator/rev-templates/domain-rule-bindings.skeleton.md +59 -0
  38. package/assets/.appweaver/orchestrator/rev-templates/domain-rule-file.skeleton.md +39 -0
  39. package/assets/.appweaver/orchestrator/rev-templates/frontend-rule-file.skeleton.md +63 -0
  40. package/assets/.appweaver/orchestrator/rev-templates/tech-rule-bindings.skeleton.md +116 -0
  41. package/assets/.appweaver/orchestrator/rev-templates/technical-constitution.skeleton.md +106 -0
  42. package/assets/.appweaver/orchestrator/rev-templates/technical-rule-file.skeleton.md +54 -0
  43. package/assets/.appweaver/orchestrator/rev-templates/ui-constitution.skeleton.md +125 -0
  44. package/assets/.appweaver/orchestrator/rev-templates/ui-delta-design-template.skeleton.md +123 -0
  45. package/assets/.appweaver/orchestrator/rev-templates/ui-design-template.skeleton.md +294 -0
  46. package/assets/.appweaver/orchestrator/workflows/_smoke.orch.yaml +160 -0
  47. package/assets/.appweaver/orchestrator/workflows/aw-spec-add-component.orch.yaml +270 -0
  48. package/assets/.appweaver/orchestrator/workflows/aw-spec-adopt.orch.yaml +934 -0
  49. package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +251 -0
  50. package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +265 -0
  51. package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +437 -0
  52. package/assets/.appweaver/orchestrator/workflows/aw-spec-build.orch.yaml +197 -0
  53. package/assets/.appweaver/orchestrator/workflows/aw-spec-characterize.orch.yaml +475 -0
  54. package/assets/.appweaver/orchestrator/workflows/aw-spec-close-delta.orch.yaml +181 -0
  55. package/assets/.appweaver/orchestrator/workflows/aw-spec-constitution.orch.yaml +727 -0
  56. package/assets/.appweaver/orchestrator/workflows/aw-spec-demo.orch.yaml +100 -0
  57. package/assets/.appweaver/orchestrator/workflows/aw-spec-dependency-tree.orch.yaml +69 -0
  58. package/assets/.appweaver/orchestrator/workflows/aw-spec-deploy.orch.yaml +85 -0
  59. package/assets/.appweaver/orchestrator/workflows/aw-spec-design-ui.orch.yaml +386 -0
  60. package/assets/.appweaver/orchestrator/workflows/aw-spec-design.orch.yaml +382 -0
  61. package/assets/.appweaver/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +462 -0
  62. package/assets/.appweaver/orchestrator/workflows/aw-spec-foundation.orch.yaml +265 -0
  63. package/assets/.appweaver/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +253 -0
  64. package/assets/.appweaver/orchestrator/workflows/aw-spec-implement-ui.orch.yaml +267 -0
  65. package/assets/.appweaver/orchestrator/workflows/aw-spec-implement.orch.yaml +287 -0
  66. package/assets/.appweaver/orchestrator/workflows/aw-spec-inventory.orch.yaml +238 -0
  67. package/assets/.appweaver/orchestrator/workflows/aw-spec-onboard.orch.yaml +1822 -0
  68. package/assets/.appweaver/orchestrator/workflows/aw-spec-parity.orch.yaml +293 -0
  69. package/assets/.appweaver/orchestrator/workflows/aw-spec-run.orch.yaml +194 -0
  70. package/assets/.appweaver/orchestrator/workflows/aw-spec-select-domain.orch.yaml +83 -0
  71. package/assets/.appweaver/orchestrator/workflows/aw-spec-select-feature.orch.yaml +128 -0
  72. package/assets/.appweaver/orchestrator/workflows/aw-spec-select-stack.orch.yaml +296 -0
  73. package/assets/.appweaver/orchestrator/workflows/aw-spec-specify.orch.yaml +439 -0
  74. package/assets/.appweaver/scripts/bash/aw-inventory.sh +17 -0
  75. package/assets/.appweaver/scripts/bash/aw-parity.sh +13 -0
  76. package/assets/.appweaver/scripts/bash/aw-rev-constitution.sh +13 -0
  77. package/assets/.appweaver/scripts/bash/aw-spec-actions.sh +2626 -0
  78. package/assets/.appweaver/scripts/bash/aw-xref.sh +15 -0
  79. package/assets/.appweaver/scripts/bash/common.sh +533 -0
  80. package/assets/.appweaver/scripts/powershell/aw-inventory.ps1 +17 -0
  81. package/assets/.appweaver/scripts/powershell/aw-parity.ps1 +13 -0
  82. package/assets/.appweaver/scripts/powershell/aw-rev-constitution.ps1 +13 -0
  83. package/assets/.appweaver/scripts/powershell/aw-spec-actions.ps1 +2232 -0
  84. package/assets/.appweaver/scripts/powershell/aw-xref.ps1 +15 -0
  85. package/assets/.appweaver/scripts/python/aw-component-catalog.py +121 -0
  86. package/assets/.appweaver/scripts/python/aw-inventory.py +1180 -0
  87. package/assets/.appweaver/scripts/python/aw-parity.py +380 -0
  88. package/assets/.appweaver/scripts/python/aw-rev-constitution.py +329 -0
  89. package/assets/.appweaver/scripts/python/aw-stack.py +1251 -0
  90. package/assets/.appweaver/scripts/python/aw-xref.py +1330 -0
  91. package/assets/.appweaver/scripts/python/validate_okf.py +352 -0
  92. package/assets/.appweaver/stack-profiles/angular.json +16 -0
  93. package/assets/.appweaver/stack-profiles/blazor-wasm.json +17 -0
  94. package/assets/.appweaver/stack-profiles/dotnet-webapi.json +15 -0
  95. package/assets/.appweaver/stack-profiles/go-chi.json +14 -0
  96. package/assets/.appweaver/stack-profiles/java-spring.json +16 -0
  97. package/assets/.appweaver/stack-profiles/nextjs.json +16 -0
  98. package/assets/.appweaver/stack-profiles/node-express.json +15 -0
  99. package/assets/.appweaver/stack-profiles/python-fastapi.json +16 -0
  100. package/assets/.appweaver/stack-profiles/react-vite.json +17 -0
  101. package/assets/.appweaver/stack-profiles/sveltekit.json +16 -0
  102. package/assets/.appweaver/stack-profiles/vue-vite.json +17 -0
  103. package/assets/.appweaver/stacks.json +3 -0
  104. package/assets/.appweaver/templates/constitution-domain-template.md +116 -0
  105. package/assets/.appweaver/templates/constitution-technical-template.md +108 -0
  106. package/assets/.appweaver/templates/constitution-ui-template.md +116 -0
  107. package/assets/.appweaver/templates/delta-design-template.md +69 -0
  108. package/assets/.appweaver/templates/delta-spec-template.md +63 -0
  109. package/assets/.appweaver/templates/design-template.md +383 -0
  110. package/assets/.appweaver/templates/okf-concept-template.md +114 -0
  111. package/assets/.appweaver/templates/parity-manifest-template.json +49 -0
  112. package/assets/.appweaver/templates/source-map-template.md +85 -0
  113. package/assets/.appweaver/templates/spec-template.md +309 -0
  114. package/assets/.appweaver/templates/ui-design-template.md +273 -0
  115. package/assets/foundations/dotnet/ModularMonolith/ModularMonolith.Reference.pack.txt +25248 -0
  116. package/assets/foundations/dotnet/ModularMonolith/ModularMonolith.pack.txt +5726 -0
  117. package/assets/foundations/dotnet/ModularMonolith/pack-foundation.ps1 +145 -0
  118. package/assets/foundations/dotnet/ModularMonolith/pack-foundation.sh +196 -0
  119. package/assets/foundations/dotnet/ModularMonolith/pack-reference-foundation.ps1 +157 -0
  120. package/assets/foundations/dotnet/ModularMonolith/pack-reference-foundation.sh +209 -0
  121. package/assets/foundations/dotnet/ModularMonolith/unpack-foundation.ps1 +126 -0
  122. package/assets/foundations/dotnet/ModularMonolith/unpack-foundation.sh +217 -0
  123. package/assets/foundations/dotnet/ModularMonolith/unpack-reference-foundation.ps1 +129 -0
  124. package/assets/foundations/dotnet/ModularMonolith/unpack-reference-foundation.sh +218 -0
  125. package/assets/foundations/dotnet/VerticalSlice/VerticalSlice.Reference.pack.txt +19318 -0
  126. package/assets/foundations/dotnet/VerticalSlice/VerticalSlice.pack.txt +2833 -0
  127. package/assets/foundations/dotnet/VerticalSlice/pack-foundation.ps1 +145 -0
  128. package/assets/foundations/dotnet/VerticalSlice/pack-foundation.sh +196 -0
  129. package/assets/foundations/dotnet/VerticalSlice/pack-reference-foundation.ps1 +157 -0
  130. package/assets/foundations/dotnet/VerticalSlice/pack-reference-foundation.sh +209 -0
  131. package/assets/foundations/dotnet/VerticalSlice/unpack-foundation.ps1 +126 -0
  132. package/assets/foundations/dotnet/VerticalSlice/unpack-foundation.sh +217 -0
  133. package/assets/foundations/dotnet/VerticalSlice/unpack-reference-foundation.ps1 +129 -0
  134. package/assets/foundations/dotnet/VerticalSlice/unpack-reference-foundation.sh +218 -0
  135. package/assets/foundations/dotnet/components/Email/README.md +119 -0
  136. package/assets/foundations/dotnet/components/Email/ReferenceEndpoints/SendEmailEndpoint.cs +84 -0
  137. package/assets/foundations/dotnet/components/Email/integration.md +300 -0
  138. package/assets/foundations/dotnet/components/Jobs/README.md +113 -0
  139. package/assets/foundations/dotnet/components/Jobs/integration.md +259 -0
  140. package/assets/foundations/dotnet/components/QrGenerator/README.md +85 -0
  141. package/assets/foundations/dotnet/components/QrGenerator/ReferenceEndpoints/GenerateQrEndpoint.cs +57 -0
  142. package/assets/foundations/dotnet/components/QrGenerator/integration.md +230 -0
  143. package/assets/foundations/dotnet/components/README.md +74 -0
  144. package/assets/guardrails/README.md +222 -0
  145. package/assets/guardrails/domain/healthcare/ai-rules.domain.md +34 -0
  146. package/assets/guardrails/domain/healthcare/api-versioning.domain.md +17 -0
  147. package/assets/guardrails/domain/healthcare/auditing.domain.md +97 -0
  148. package/assets/guardrails/domain/healthcare/authorization.domain.md +26 -0
  149. package/assets/guardrails/domain/healthcare/clinical-terms.md +20 -0
  150. package/assets/guardrails/domain/healthcare/coding-standards.domain.md +26 -0
  151. package/assets/guardrails/domain/healthcare/consent.md +19 -0
  152. package/assets/guardrails/domain/healthcare/cqrs.domain.md +12 -0
  153. package/assets/guardrails/domain/healthcare/data-classification.domain.md +28 -0
  154. package/assets/guardrails/domain/healthcare/dependency-policy.domain.md +11 -0
  155. package/assets/guardrails/domain/healthcare/dicom.md +15 -0
  156. package/assets/guardrails/domain/healthcare/domain-constitution.md +119 -0
  157. package/assets/guardrails/domain/healthcare/domain-driven-design.domain.md +28 -0
  158. package/assets/guardrails/domain/healthcare/eventing.domain.md +18 -0
  159. package/assets/guardrails/domain/healthcare/fhir.md +36 -0
  160. package/assets/guardrails/domain/healthcare/folder-structure.domain.md +25 -0
  161. package/assets/guardrails/domain/healthcare/hipaa.md +34 -0
  162. package/assets/guardrails/domain/healthcare/hl7.md +15 -0
  163. package/assets/guardrails/domain/healthcare/ihe-conformance.md +31 -0
  164. package/assets/guardrails/domain/healthcare/integration-terms.md +21 -0
  165. package/assets/guardrails/domain/healthcare/persistence.domain.md +20 -0
  166. package/assets/guardrails/domain/healthcare/terminology.md +30 -0
  167. package/assets/guardrails/domain/healthcare/testing.domain.md +15 -0
  168. package/assets/guardrails/domain/healthcare/ux/accessibility-standards.md +36 -0
  169. package/assets/guardrails/domain/healthcare/ux/content-design.md +32 -0
  170. package/assets/guardrails/domain/healthcare/ux/interaction-states.md +44 -0
  171. package/assets/guardrails/domain/healthcare/ux/journey-mapping.md +40 -0
  172. package/assets/guardrails/domain/healthcare/vertical-slices.domain.md +18 -0
  173. package/assets/guardrails/domain/healthcare/zero-trust.domain.md +12 -0
  174. package/assets/guardrails/domain/pharma/ai-rules.domain.md +32 -0
  175. package/assets/guardrails/domain/pharma/api-versioning.domain.md +20 -0
  176. package/assets/guardrails/domain/pharma/atc.md +22 -0
  177. package/assets/guardrails/domain/pharma/auditing.domain.md +90 -0
  178. package/assets/guardrails/domain/pharma/authorization.domain.md +25 -0
  179. package/assets/guardrails/domain/pharma/coding-standards.domain.md +28 -0
  180. package/assets/guardrails/domain/pharma/cqrs.domain.md +16 -0
  181. package/assets/guardrails/domain/pharma/data-classification.domain.md +24 -0
  182. package/assets/guardrails/domain/pharma/data-provenance.md +21 -0
  183. package/assets/guardrails/domain/pharma/dependency-policy.domain.md +11 -0
  184. package/assets/guardrails/domain/pharma/domain-constitution.md +113 -0
  185. package/assets/guardrails/domain/pharma/domain-driven-design.domain.md +36 -0
  186. package/assets/guardrails/domain/pharma/domain-requirements.sample.md +103 -0
  187. package/assets/guardrails/domain/pharma/eventing.domain.md +18 -0
  188. package/assets/guardrails/domain/pharma/fhir.md +31 -0
  189. package/assets/guardrails/domain/pharma/folder-structure.domain.md +26 -0
  190. package/assets/guardrails/domain/pharma/hl7.md +17 -0
  191. package/assets/guardrails/domain/pharma/idmp.md +26 -0
  192. package/assets/guardrails/domain/pharma/integration-terms.md +21 -0
  193. package/assets/guardrails/domain/pharma/ndc.md +28 -0
  194. package/assets/guardrails/domain/pharma/persistence.domain.md +23 -0
  195. package/assets/guardrails/domain/pharma/pharma-terms.md +27 -0
  196. package/assets/guardrails/domain/pharma/product-lifecycle.domain.md +30 -0
  197. package/assets/guardrails/domain/pharma/regulatory-compliance.md +19 -0
  198. package/assets/guardrails/domain/pharma/terminology.md +32 -0
  199. package/assets/guardrails/domain/pharma/testing.domain.md +19 -0
  200. package/assets/guardrails/domain/pharma/vertical-slices.domain.md +17 -0
  201. package/assets/guardrails/domain/pharma/zero-trust.domain.md +12 -0
  202. package/assets/guardrails/projects/dotnet-default-project/domain/domain-requirements.md +58 -0
  203. package/assets/guardrails/projects/dotnet-default-project/domain-rule-bindings.md +113 -0
  204. package/assets/guardrails/projects/dotnet-default-project/frontend/ui-requirements.md +43 -0
  205. package/assets/guardrails/projects/dotnet-default-project/service/technical-requirements.md +40 -0
  206. package/assets/guardrails/projects/dotnet-default-project/tech-rule-bindings.md +263 -0
  207. package/assets/guardrails/requirement-spec.txt +27 -0
  208. package/assets/guardrails/technology/dotnet-webapi/PACKAGING.md +184 -0
  209. package/assets/guardrails/technology/dotnet-webapi/api-versioning.md +44 -0
  210. package/assets/guardrails/technology/dotnet-webapi/auditing.md +96 -0
  211. package/assets/guardrails/technology/dotnet-webapi/authorization-matrix.md +14 -0
  212. package/assets/guardrails/technology/dotnet-webapi/authorization.md +39 -0
  213. package/assets/guardrails/technology/dotnet-webapi/clean-architecture.md +54 -0
  214. package/assets/guardrails/technology/dotnet-webapi/coding-standards.md +87 -0
  215. package/assets/guardrails/technology/dotnet-webapi/cqrs.md +63 -0
  216. package/assets/guardrails/technology/dotnet-webapi/data-classification.md +38 -0
  217. package/assets/guardrails/technology/dotnet-webapi/dependency-policy.md +40 -0
  218. package/assets/guardrails/technology/dotnet-webapi/domain-driven-design.md +91 -0
  219. package/assets/guardrails/technology/dotnet-webapi/eventing.md +57 -0
  220. package/assets/guardrails/technology/dotnet-webapi/examples/api-versioning.md +75 -0
  221. package/assets/guardrails/technology/dotnet-webapi/examples/auditing.md +84 -0
  222. package/assets/guardrails/technology/dotnet-webapi/examples/authorization.md +68 -0
  223. package/assets/guardrails/technology/dotnet-webapi/examples/clean-architecture.md +37 -0
  224. package/assets/guardrails/technology/dotnet-webapi/examples/cqrs.md +97 -0
  225. package/assets/guardrails/technology/dotnet-webapi/examples/domain-driven-design.md +141 -0
  226. package/assets/guardrails/technology/dotnet-webapi/examples/eventing.md +46 -0
  227. package/assets/guardrails/technology/dotnet-webapi/examples/persistence.md +207 -0
  228. package/assets/guardrails/technology/dotnet-webapi/examples/vertical-slices.md +151 -0
  229. package/assets/guardrails/technology/dotnet-webapi/examples/zero-trust.md +48 -0
  230. package/assets/guardrails/technology/dotnet-webapi/folder-structure.md +61 -0
  231. package/assets/guardrails/technology/dotnet-webapi/modular-monolith.md +47 -0
  232. package/assets/guardrails/technology/dotnet-webapi/persistence.md +82 -0
  233. package/assets/guardrails/technology/dotnet-webapi/technology-constitution.md +162 -0
  234. package/assets/guardrails/technology/dotnet-webapi/testing.md +55 -0
  235. package/assets/guardrails/technology/dotnet-webapi/vertical-slices.md +70 -0
  236. package/assets/guardrails/technology/dotnet-webapi/zero-trust.md +48 -0
  237. package/assets/guardrails/technology/java-spring/README.md +62 -0
  238. package/assets/guardrails/technology/nextjs/accessibility-implementation.md +56 -0
  239. package/assets/guardrails/technology/nextjs/api-client.md +56 -0
  240. package/assets/guardrails/technology/nextjs/api-integration.dotnet-webapi.md +174 -0
  241. package/assets/guardrails/technology/nextjs/api-integration.java-spring.md +203 -0
  242. package/assets/guardrails/technology/nextjs/auth-session.md +68 -0
  243. package/assets/guardrails/technology/nextjs/client-security.md +69 -0
  244. package/assets/guardrails/technology/nextjs/component-architecture.md +60 -0
  245. package/assets/guardrails/technology/nextjs/component-conventions.md +58 -0
  246. package/assets/guardrails/technology/nextjs/design-system.md +60 -0
  247. package/assets/guardrails/technology/nextjs/error-handling.md +72 -0
  248. package/assets/guardrails/technology/nextjs/forms-and-validation.md +75 -0
  249. package/assets/guardrails/technology/nextjs/frontend-testing.md +94 -0
  250. package/assets/guardrails/technology/nextjs/i18n.md +57 -0
  251. package/assets/guardrails/technology/nextjs/observability.md +67 -0
  252. package/assets/guardrails/technology/nextjs/performance-budgets.md +66 -0
  253. package/assets/guardrails/technology/nextjs/routing-navigation.md +52 -0
  254. package/assets/guardrails/technology/nextjs/state-management.md +70 -0
  255. package/assets/guardrails/technology/nextjs/ui-constitution.md +166 -0
  256. package/package.json +1 -1
  257. package/assets/docs/pharma-constitution.my-ref.md +0 -86
@@ -0,0 +1,128 @@
1
+ # =============================================================================
2
+ # aw-spec-select-feature (orchestrator) — pick or create the active FEATURE
3
+ #
4
+ # feature = AGGREGATE (e.g. Order). This is the FIRST step of the spec-anchored
5
+ # pipeline: it fixes the aggregate boundary BEFORE any spec/design exists, so the
6
+ # feature's single spec.md + design.md and every command (CreateOrder/UpdateOrder =
7
+ # user stories) hang off one directory. It replaces guessing the aggregate out of prose in
8
+ # `specify` — that is why finding #1 (feature=aggregate) is enforced here, not hoped for.
9
+ #
10
+ # The pickable list is TWO merged sources (deduped by name): specs/ sub-folders
11
+ # (features already scaffolded/adopted) AND the OKF bundle's Aggregate concepts —
12
+ # the brownfield feature map `/appweaver onboard` reverse-engineers. So in a
13
+ # brownfield repo you pick a real discovered code feature BEFORE anything is under
14
+ # specs/; on greenfield (no bundle) the list is specs-only, exactly as before.
15
+ #
16
+ # ZERO LLM: only scripts + one select + (conditionally) one ask. No generation,
17
+ # no standards, no domain-select. Pure, deterministic orchestration/governance.
18
+ #
19
+ # list-features (specs/ ∪ OKF aggregates) → user_select (existing | "+ create new") → [ask name] → set-feature
20
+ #
21
+ # Persists .appweaver/feature.json {"feature_directory":"specs/<Feature>"} so every
22
+ # later command operates on it: the forward loop (specify/design/analyze-design/implement/
23
+ # build/analyze-slice/run/deploy) and the CR loop (analyze-delta-design/implement-delta/
24
+ # finalize-delta/close-delta — the standalone `cr` is retired; specify and design author
25
+ # the delta docs themselves).
26
+ #
27
+ # Launch:
28
+ # /appweaver select-feature # interactive: list + add-new
29
+ # /appweaver select-feature Order # direct: create-or-select Order
30
+ # =============================================================================
31
+
32
+ name: aw-spec-select-feature
33
+ description: Pick an existing feature (aggregate) or create a new one, and store it in .appweaver/feature.json so every AW-Spec command operates on it. Zero LLM — scripts + one selection only.
34
+ version: 1.0.0
35
+ agent_agnostic: true
36
+ dialect: aw-spec.orchestrator/v1
37
+
38
+ inputs:
39
+ user_input:
40
+ description: Optional feature (aggregate) name to create or select directly, e.g. Order.
41
+ required: false
42
+ bind: USER_INPUT
43
+
44
+ scripts:
45
+ actions:
46
+ sh: .appweaver/scripts/bash/aw-spec-actions.sh
47
+ ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
48
+
49
+ vars:
50
+ new_sentinel: "+ Create a new feature" # source of truth is list-features $.sentinel; overwritten below
51
+ typed_name: ""
52
+ target_name: ""
53
+ bundle_dir: "knowledge" # where /appweaver onboard writes the OKF feature map (repo-root default)
54
+
55
+ workflow:
56
+
57
+ # 1. Enumerate selectable aggregates from TWO merged sources (deduped by name):
58
+ # specs/ sub-folders (already scaffolded/adopted) AND the OKF bundle's
59
+ # Aggregate concepts — the brownfield feature map onboard reverse-engineers,
60
+ # so a not-yet-adopted code feature is pickable before its specs/ dir exists.
61
+ # On greenfield (no bundle) the OKF source is empty → specs-only, as before.
62
+ # `select_options` carries the "+ create new" sentinel and (when USER_INPUT
63
+ # names a not-yet feature) that name injected — a direct arg is one-list select.
64
+ - id: list_features
65
+ action: execute_script
66
+ script: { ref: actions }
67
+ subcommand: list-features
68
+ args: ["--preselect", "{{USER_INPUT}}", "--bundle", "{{bundle_dir}}"]
69
+ outputs:
70
+ - { name: features, from: "$.features" }
71
+ - { name: feature_names, from: "$.names" }
72
+ - { name: feature_count, from: "$.count" }
73
+ - { name: select_options, from: "$.select_options" }
74
+ - { name: new_sentinel, from: "$.sentinel" }
75
+
76
+ # 2. Choose. A matching USER_INPUT auto-selects (existing OR injected-new) with
77
+ # no prompt; the lone sentinel at bootstrap (no features yet) auto-confirms.
78
+ - id: pick
79
+ action: user_select
80
+ prompt: "Select a feature (the aggregate, e.g. Order) — or create a new one:"
81
+ options_from_variable: select_options
82
+ preselect_from: USER_INPUT
83
+ single_option_confirm: true
84
+ outputs:
85
+ - { name: chosen, from: selection }
86
+
87
+ # 3. Only when the user chose "+ create new" (or bootstrapped) do we ask a name.
88
+ - id: ask_new_name
89
+ action: ask
90
+ condition: "{{chosen}} == {{new_sentinel}}"
91
+ prompt: >
92
+ Name the new feature — this is the AGGREGATE root (e.g. Order, Invoice,
93
+ Customer), NOT a single command. Operations like CreateOrder / UpdateOrder
94
+ become user stories inside it:
95
+ answer_var: typed_name
96
+
97
+ # 4. Coalesce the target name. The engine has no compound conditions, so this
98
+ # is two ordered sets: default to the pick, then override with the typed
99
+ # name only on the "create new" branch.
100
+ - id: name_from_pick
101
+ action: set
102
+ vars: { target_name: "{{chosen}}" }
103
+ - id: name_from_new
104
+ action: set
105
+ condition: "{{chosen}} == {{new_sentinel}}"
106
+ vars: { target_name: "{{typed_name}}" }
107
+
108
+ # 5. Create-or-select the aggregate dir + persist it as the active feature.
109
+ - id: set_feature
110
+ action: execute_script
111
+ script: { ref: actions }
112
+ subcommand: set-feature
113
+ args: ["--feature", "{{target_name}}"]
114
+ outputs:
115
+ - { name: feature, from: "$.feature" }
116
+ - { name: feature_dir, from: "$.feature_dir" }
117
+ - { name: spec_file, from: "$.spec_file" }
118
+ - { name: existed, from: "$.existed" }
119
+ - { name: created, from: "$.created" }
120
+ - { name: spec_exists, from: "$.spec_exists" }
121
+
122
+ outputs:
123
+ feature: "{{feature}}"
124
+ feature_dir: "{{feature_dir}}"
125
+ created: "{{created}}"
126
+ spec_exists: "{{spec_exists}}"
127
+ note: "Active feature set in .appweaver/feature.json — the aggregate boundary for its single spec.md + design.md."
128
+ next: "/appweaver specify <what this feature does> (authors {{feature_dir}}/spec.md; each operation = a user story)"
@@ -0,0 +1,296 @@
1
+ # =============================================================================
2
+ # aw-spec-select-stack (orchestrator) — declare the project's LANES
3
+ #
4
+ # THE FIRST COMMAND OF EVERY SEQUENCE. Greenfield runs it before constitution;
5
+ # brownfield runs it before onboard. What it writes decides which constitution
6
+ # halves are authored, which rule sets are generated, which subtree each phase may
7
+ # write into, and — in brownfield — which subtree onboard reverse-engineers. It
8
+ # answers one question per lane, twice:
9
+ #
10
+ # what is this lane's STACK, and where is its SOURCE?
11
+ #
12
+ # Four steps per lane and none of them guess: the menu opens on the stack this
13
+ # repo's own files point at, the source-path question leads with the directory that
14
+ # evidence sits in, and both are only ever proposals — an operator selects from the
15
+ # list or types a path the kit has never seen.
16
+ #
17
+ # stack-list --suggest backend → select stack → ask source path → lane-declare
18
+ # stack-list --suggest frontend → select stack → ask source path → lane-declare
19
+ #
20
+ # (none) IS A REAL ANSWER FOR EITHER LANE, and it is how a project says "I do not
21
+ # have one of these". A backend-only project answers (none) to the UI lane; a
22
+ # UI-only project answers (none) to the service lane. Declining a lane here is what
23
+ # stops `constitution` authoring that lane's half and stops `onboard` generating
24
+ # that lane's rule files — a lane nobody declared is a lane nobody governs.
25
+ #
26
+ # THE POINT OF THIS WORKFLOW is that it is the ONLY writer of .appweaver/stacks.json.
27
+ # `lane-declare` appears in exactly two workflows — this one, where a person picks,
28
+ # and `onboard`, which declares what it reverse-engineered and never overwrites a
29
+ # lane a person already declared. Every other workflow calls `lane-resolve` to read
30
+ # and `lane-verify` to gate, and neither can write.
31
+ #
32
+ # WHY THE SOURCE PATH IS ASKED AND NOT INHERITED. A lane's root is the subtree it
33
+ # OWNS: the only place its implement phase may write, the directory its build and
34
+ # run commands act on, and in brownfield the code onboard reads. A profile's default
35
+ # root describes how a NEW project of that stack is usually laid out, which is a
36
+ # reasonable proposal and a poor assumption — a repo that already exists did not
37
+ # choose its layout from our profiles. So the default is offered, the detected
38
+ # directory is offered ahead of it, and the answer is the operator's.
39
+ #
40
+ # THE PATH IS NOT REQUIRED TO EXIST HERE. Greenfield declares `src/` on day one and
41
+ # `implement` creates it; requiring the directory would make the command unusable
42
+ # for the projects it matters most to. `lane-verify` runs the on-disk check, in the
43
+ # phases that actually read the subtree — implement, build, run, onboard.
44
+ #
45
+ # ZERO LLM: scripts, two gates, two selects and two questions. No generation, no
46
+ # rule resolution.
47
+ #
48
+ # Run (interactive via launcher):
49
+ # /appweaver select-stack # ask everything
50
+ # /appweaver select-stack dotnet-webapi react-vite # answer both stacks
51
+ # /appweaver select-stack none # UI lane: none
52
+ # Headless:
53
+ # --select select_api_stack=<label> --select select_ui_stack=<label>
54
+ # --answer ask_api_source_path=<path> --answer ask_ui_source_path=<path>
55
+ # =============================================================================
56
+
57
+ name: aw-spec-select-stack
58
+ description: Declare the project's lanes — each lane's STACK and its SOURCE PATH — and persist them to .appweaver/stacks.json, the single channel every later workflow resolves and gates on. The first command of both the greenfield and the brownfield sequence, and the sole writer of the lane model.
59
+ version: 2.0.0
60
+ agent_agnostic: true
61
+ dialect: aw-spec.orchestrator/v1
62
+
63
+ inputs:
64
+ user_input:
65
+ description: >
66
+ Optional stack ids to answer the selections directly, e.g.
67
+ "dotnet-webapi react-vite". Each id is matched only against its own kind,
68
+ so one argument can answer both selections, either, or neither. Use "none"
69
+ to decline a lane.
70
+ required: false
71
+ bind: USER_INPUT
72
+
73
+ scripts:
74
+ actions:
75
+ sh: .appweaver/scripts/bash/aw-spec-actions.sh
76
+ ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
77
+
78
+ workflow:
79
+
80
+ # ═══════════════ SERVICE LANE ═══════════════════════════════════════════════
81
+
82
+ # 1. Candidates = the installed backend profiles, plus (none), and — because of
83
+ # --suggest — this repo's own answer. Detection and listing are ONE call: both
84
+ # questions below need the same file walk, and doing it twice would double the
85
+ # only real cost this workflow has. A detected stack LEADS the menu; only an
86
+ # explicit argument fills `preselect`, so a scan can never overrule a person.
87
+ - id: list_api_stacks
88
+ action: execute_script
89
+ script: { ref: actions }
90
+ subcommand: stack-list
91
+ args: ["--kind", "backend", "--suggest", "--include-none", "--preselect", "{{USER_INPUT}}"]
92
+ outputs:
93
+ - { name: api_options, from: "$.select_options" }
94
+ - { name: api_ids, from: "$.ids" }
95
+ - { name: api_preselect, from: "$.preselect" }
96
+ - { name: api_root_options, from: "$.root_options" }
97
+ - { name: api_detected, from: "$.detected_profile" }
98
+ - { name: api_detected_root, from: "$.detected_root" }
99
+ - { name: api_none_sentinel, from: "$.none_sentinel" }
100
+
101
+ # 2. No profiles installed is a setup error, not an empty menu. Gated on the
102
+ # PROFILE ids rather than on the options, because (none) is always an option
103
+ # and would make an empty menu look populated.
104
+ - id: guard_no_api_stacks
105
+ action: verify_context
106
+ require_non_empty: api_ids
107
+ on_empty_message: >
108
+ No backend stack profiles found under .appweaver/stack-profiles/. Add one
109
+ (the format is in .appweaver/STACK-PROFILES.md — a project ships its own
110
+ stacks there), then re-run.
111
+ on_empty: stop
112
+
113
+ # 3. Choose the service stack. A matching id in USER_INPUT auto-selects, and so
114
+ # does a detected stack; a project with exactly one candidate auto-confirms.
115
+ - id: select_api_stack
116
+ action: user_select
117
+ prompt: "Select the API (backend) stack — it owns the service lane. This repo's own files point at: {{api_detected}} (leading the list). (none) declares a project with no service lane at all, and stops the technical constitution half and the service rule files being authored:"
118
+ options_from_variable: api_options
119
+ preselect_from: api_preselect
120
+ single_option_confirm: true
121
+ outputs:
122
+ - { name: chosen_api, from: selection }
123
+
124
+ # 4. Did the operator decline the lane? Compared against the sentinel the lister
125
+ # itself returned, so the two never drift apart on a wording change. Stated as
126
+ # a positive flag: every step below that only makes sense for a real lane
127
+ # conditions on it, and the engine's truthiness test is the whole expression.
128
+ - id: api_lane_selected
129
+ action: set
130
+ vars: { api_selected: "true", api_source_path: "" }
131
+ - id: api_lane_declined
132
+ action: set
133
+ condition: "{{chosen_api}} == {{api_none_sentinel}}"
134
+ vars: { api_selected: "" }
135
+
136
+ # 5. WHERE the service lane's source lives. Offered best-first — where the
137
+ # evidence actually sits, then each profile's own default — and free text is
138
+ # accepted, because a repo that matches no profile still has a source path.
139
+ # The label after the path says why it is offered and is stripped on the way in.
140
+ - id: ask_api_source_path
141
+ action: ask
142
+ condition: "{{api_selected}}"
143
+ prompt: "Service lane SOURCE PATH — the subtree this lane owns, the only place implement may write, and the directory build/test/run act on. Pick one or type your own:"
144
+ options_from_variable: api_root_options
145
+ answer_var: api_source_path
146
+
147
+ # 6. Persist it. Root and build/test/run default from the profile; the commands
148
+ # are project-supplied strings, so the engine stays stdlib-only and
149
+ # stack-ignorant — it shells out and never knows what a compiler is. (none)
150
+ # routes through the SAME writer, which is what makes a re-run correct: a lane
151
+ # declared in an earlier run is REMOVED here rather than left stranded.
152
+ - id: declare_api_lane
153
+ action: execute_script
154
+ script: { ref: actions }
155
+ subcommand: lane-declare
156
+ args: ["--profile", "{{chosen_api}}", "--kind", "backend", "--source-path", "{{api_source_path}}"]
157
+ outputs:
158
+ - { name: api_declared, from: "$.declared" }
159
+ - { name: api_lane_id, from: "$.lane_id" }
160
+ - { name: api_profile, from: "$.profile" }
161
+ - { name: api_root, from: "$.source_path" }
162
+ - { name: api_root_exists, from: "$.root_exists" }
163
+
164
+ # ═══════════════ UI LANE ════════════════════════════════════════════════════
165
+
166
+ # 7. Candidates for the UI lane, same shape. The service lane is already declared
167
+ # at this point, so a UI stack that would relocate onto it is refused by the
168
+ # writer's roots-disjoint check rather than discovered later as two generators
169
+ # writing one file.
170
+ - id: list_ui_stacks
171
+ action: execute_script
172
+ script: { ref: actions }
173
+ subcommand: stack-list
174
+ args: ["--kind", "frontend", "--suggest", "--include-none", "--preselect", "{{USER_INPUT}}"]
175
+ outputs:
176
+ - { name: ui_options, from: "$.select_options" }
177
+ - { name: ui_ids, from: "$.ids" }
178
+ - { name: ui_preselect, from: "$.preselect" }
179
+ - { name: ui_root_options, from: "$.root_options" }
180
+ - { name: ui_detected, from: "$.detected_profile" }
181
+ - { name: ui_detected_root, from: "$.detected_root" }
182
+ - { name: ui_none_sentinel, from: "$.none_sentinel" }
183
+
184
+ # 8. Choose the UI stack.
185
+ - id: select_ui_stack
186
+ action: user_select
187
+ prompt: "Select the UI (frontend) stack — it owns the web lane, and its root must not overlap the service lane's. This repo's own files point at: {{ui_detected}} (leading the list). (none) declares a backend-only project, and stops the UI constitution half and the frontend rule files being authored:"
188
+ options_from_variable: ui_options
189
+ preselect_from: ui_preselect
190
+ single_option_confirm: true
191
+ outputs:
192
+ - { name: chosen_ui, from: selection }
193
+
194
+ - id: ui_lane_selected
195
+ action: set
196
+ vars: { ui_selected: "true", ui_source_path: "" }
197
+ - id: ui_lane_declined
198
+ action: set
199
+ condition: "{{chosen_ui}} == {{ui_none_sentinel}}"
200
+ vars: { ui_selected: "" }
201
+
202
+ # 9. WHERE the UI lane's source lives.
203
+ - id: ask_ui_source_path
204
+ action: ask
205
+ condition: "{{ui_selected}}"
206
+ prompt: "UI lane SOURCE PATH — the subtree this lane owns, the only place ui-implement may write. It must not overlap the service lane's. Pick one or type your own:"
207
+ options_from_variable: ui_root_options
208
+ answer_var: ui_source_path
209
+
210
+ - id: declare_ui_lane
211
+ action: execute_script
212
+ script: { ref: actions }
213
+ subcommand: lane-declare
214
+ args: ["--profile", "{{chosen_ui}}", "--kind", "frontend", "--source-path", "{{ui_source_path}}"]
215
+ outputs:
216
+ - { name: ui_declared, from: "$.declared" }
217
+ - { name: ui_lane_id, from: "$.lane_id" }
218
+ - { name: ui_profile, from: "$.profile" }
219
+ - { name: ui_root, from: "$.source_path" }
220
+ - { name: ui_root_exists, from: "$.root_exists" }
221
+
222
+ # ═══════════════ CHECK + REPORT ═════════════════════════════════════════════
223
+
224
+ # 10. Is what was just written sound? --allow-missing-root because a source path
225
+ # declared here legitimately does not exist yet; what this catches is a lane
226
+ # declared with NO path at all, which no later phase could act on. The on-disk
227
+ # check belongs to the phases that read the subtree, and runs there.
228
+ - id: verify_lanes
229
+ action: execute_script
230
+ script: { ref: actions }
231
+ subcommand: lane-verify
232
+ args: ["--allow-missing-root", "--command", "/appweaver select-stack"]
233
+ outputs:
234
+ - { name: lanes_ok, from: "$.ok" }
235
+ - { name: lanes_issues, from: "$.message" }
236
+ - { name: be_root_exists, from: "$.backend_root_exists" }
237
+ - { name: fe_root_exists, from: "$.frontend_root_exists" }
238
+
239
+ # Declining BOTH lanes lands here too, and stopping is right: a project with no
240
+ # lane at all has nothing for any later phase to govern, build or write into, and
241
+ # the mistake is cheaper to say now than to discover at constitution.
242
+ - id: lanes_gate
243
+ action: verify_context
244
+ require_true: lanes_ok
245
+ on_false_message: >
246
+ Nothing was declared: {{lanes_issues}}
247
+ Re-run /appweaver select-stack and choose a stack for at least one lane —
248
+ a service lane, a UI lane, or both.
249
+ on_false: stop
250
+
251
+ # 11. Two ordered sets per lane, because the engine has no conditionals in
252
+ # `outputs:`: state the declined case, then override it where a lane was
253
+ # actually declared.
254
+ - id: api_summary_none
255
+ action: set
256
+ vars: { api_summary: "(none) — no service lane declared; the technical constitution half and the service rule files are SKIPPED" }
257
+ - id: api_summary_lane
258
+ action: set
259
+ condition: "{{api_declared}}"
260
+ vars: { api_summary: "{{api_lane_id}} ({{api_profile}}) at {{api_root}} — source path exists: {{api_root_exists}}" }
261
+
262
+ - id: ui_summary_none
263
+ action: set
264
+ vars: { ui_summary: "(none) — backend-only project; the UI constitution half and the frontend rule files are SKIPPED" }
265
+ - id: ui_summary_lane
266
+ action: set
267
+ condition: "{{ui_declared}}"
268
+ vars: { ui_summary: "{{ui_lane_id}} ({{ui_profile}}) at {{ui_root}} — source path exists: {{ui_root_exists}}" }
269
+
270
+ # 12. Read the finished declaration back through the reader every later workflow
271
+ # uses, so what this run reports is what they will resolve.
272
+ - id: resolve_lanes
273
+ action: execute_script
274
+ script: { ref: actions }
275
+ subcommand: lane-resolve
276
+ outputs:
277
+ - { name: lanes, from: "$.lanes" }
278
+ - { name: lane_count, from: "$.lane_count" }
279
+ - { name: lane_kinds, from: "$.kinds" }
280
+ - { name: prototype, from: "$.prototype" }
281
+
282
+ outputs:
283
+ lanes: "{{lanes}}"
284
+ lane_count: "{{lane_count}}"
285
+ lane_kinds: "{{lane_kinds}}"
286
+ api_lane: "{{api_summary}}"
287
+ ui_lane: "{{ui_summary}}"
288
+ api_source_path: "{{api_root}}"
289
+ ui_source_path: "{{ui_root}}"
290
+ api_source_path_exists: "{{be_root_exists}}"
291
+ ui_source_path_exists: "{{fe_root_exists}}"
292
+ api_detected: "{{api_detected}} at {{api_detected_root}}"
293
+ ui_detected: "{{ui_detected}} at {{ui_detected_root}}"
294
+ prototype: "{{prototype}}"
295
+ note: "Lanes persisted to .appweaver/stacks.json. Each lane carries a STACK and a SOURCE PATH, and both are load-bearing. The SOURCE PATH is ownership: implement writes only under the service lane's, ui-implement only under the UI lane's, build/test/run act on it, and onboard reverse-engineers out of it — overlapping paths are refused here rather than discovered later as two generators writing one file. The build/test/run commands are project-supplied strings the engine shells out to, which is how it stays stdlib-only and stack-ignorant. api_detected / ui_detected report what this repo's own files pointed at, whether or not it was chosen — empty on a greenfield repo with nothing to detect. A source path that does not exist yet is NORMAL here and reported rather than refused: greenfield declares src/ before implement creates it. The on-disk check runs in the phases that read the subtree — implement, implement-delta, build, run and onboard all call lane-verify and STOP with the fix named. Declining a lane with (none) is a real declaration and removes any lane of that kind a previous run left behind; it is also what stops that lane's constitution half and rule files being authored. `prototype` is not a lane — it has a root and a run command so an operator can open it, and nothing else. Re-run this workflow any time to re-stack a lane, move a source path, or drop a lane with (none); it is the only workflow that may write this file."
296
+ next: "GREENFIELD: /appweaver select-domain → constitution → select-feature → specify. BROWNFIELD: /appweaver onboard — it reverse-engineers out of the source paths declared here and generates the project (no select-domain; onboard derives and activates it from the code). Run this workflow FIRST in either sequence: constitution reads the declaration to decide which halves to author, and onboard reads it to decide what to scan."