aw-spec-cli 0.1.7 → 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 (261) 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/dist/commands/init.js +2 -2
  257. package/dist/commands/init.js.map +1 -1
  258. package/dist/utils/copy-assets.js +8 -8
  259. package/dist/utils/copy-assets.js.map +1 -1
  260. package/package.json +1 -1
  261. package/assets/docs/pharma-constitution.my-ref.md +0 -86
@@ -0,0 +1,105 @@
1
+ # =============================================================================
2
+ # delta-design (orchestrator module) — author the DESIGN-side DELTA of a change
3
+ #
4
+ # Included by /appweaver design on its DELTA branch (design.md already exists).
5
+ # This is the DESIGN half of the former standalone `cr` capture, relocated here.
6
+ # JOIN-or-OPEN the change: if one is already open (specify opened it via delta-spec)
7
+ # JOIN it; otherwise OPEN one here (a DESIGN-ONLY change — the design's realisation of
8
+ # EXISTING spec ids changes without a spec delta). It then authors the DELTA-DESIGN
9
+ # ONLY — it does NOT touch the master design.md. The change stays OPEN; finalize-delta
10
+ # merges the delta into design.md later in the chain and close-delta closes it at the
11
+ # end. No version bump here, no code (that is /appweaver implement-delta).
12
+ #
13
+ # Runs in the CALLER's context (include semantics): shares vars + the sticky standards
14
+ # (design's TECHNICAL/architecture set) + the caller's scripts map + replay cache.
15
+ # EXPECTS caller vars: feature_dir, spec_file, design_doc, has_change, active_change,
16
+ # need_new_change (design_mode==delta AND no change open yet), USER_INPUT.
17
+ # PRODUCES: active_change, delta_spec, delta_design, downstream_count, impact_report.
18
+ # =============================================================================
19
+
20
+ name: delta-design
21
+ dialect: aw-spec.orchestrator/v1
22
+
23
+ # Scripts this module invokes. A module's scripts EXTEND the caller's map (setdefault, so
24
+ # the caller's refs WIN at runtime — these are inert when design already supplies them);
25
+ # declaring both keeps the module self-contained + validatable on its own. `actions` mirrors
26
+ # the caller's (design's) ref; `xref` (the OKF cross-reference substrate) is ADDED for the
27
+ # advisory blast-radius step below, which design does not otherwise provide.
28
+ scripts:
29
+ actions:
30
+ sh: .appweaver/scripts/bash/aw-spec-actions.sh
31
+ ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
32
+ xref:
33
+ sh: .appweaver/scripts/bash/aw-xref.sh
34
+ ps1: .appweaver/scripts/powershell/aw-xref.ps1
35
+
36
+ workflow:
37
+
38
+ # OPEN a change only when none is open (a design-only change). cr-setup refuses if
39
+ # one is already open, so the JOIN case (specify opened it) SKIPS this and keeps the
40
+ # caller's active_change. cr-setup also scaffolds delta-design.md from its template.
41
+ - id: open_change
42
+ condition: "{{need_new_change}} == true"
43
+ action: execute_script
44
+ script: { ref: actions }
45
+ subcommand: cr-setup
46
+ args: ["--feature-dir", "{{feature_dir}}", "--title", "{{USER_INPUT}}"]
47
+ outputs:
48
+ - { name: active_change, from: "$.cr_id" } # the design-opened change becomes the active one
49
+ - { name: delta_spec, from: "$.delta_spec" }
50
+ - { name: delta_design, from: "$.delta_design" }
51
+
52
+ # Resolve the delta doc paths from the active change (covers the JOIN case, where
53
+ # open_change was skipped; recomputes the same paths on the OPEN case — harmless).
54
+ - id: paths
55
+ action: set
56
+ vars:
57
+ delta_design: "{{feature_dir}}/changes/{{active_change}}/delta-design.md"
58
+ delta_spec: "{{feature_dir}}/changes/{{active_change}}/delta-spec.md"
59
+
60
+ - id: ctx
61
+ action: build_context
62
+ context:
63
+ - { path: "{{delta_design}}" } # the delta-design template to fill
64
+ - { path: "{{delta_spec}}" } # the spec-side change (from specify/delta-spec)
65
+ - { path: "{{spec_file}}" }
66
+ - { path: "{{design_doc}}" } # the current master design.md (READ ONLY — never amended here)
67
+ - { path: .appweaver/DESIGN-FORMAT.md }
68
+ - id: author
69
+ action: agent_author # design's technical standards stay ON (default) — correct here
70
+ output_target: { type: file, path: "{{delta_design}}" }
71
+ task: |
72
+ Fill the delta-design record (target in context) for this change, from the
73
+ delta-spec and the CURRENT master design.md (both in context) — the DELTA ONLY.
74
+ Do NOT edit design.md: finalize-delta merges the delta into the master later.
75
+ Classify every change to the design as ADDED / MODIFIED / REMOVED against the
76
+ master, per the master's OWN section structure (whatever sections it actually has
77
+ — do not assume a fixed layering), plus the cross-section impact, the regression
78
+ targets, and any new assumption (DA-n) or workaround (WA-n) the change introduces.
79
+ Stay technology-agnostic (no code). A shared element (e.g. the aggregate root) is
80
+ MODIFIED in place, never duplicated.
81
+ TWO CASES — decide from the delta-spec in context:
82
+ • SPEC-DRIVEN — the delta-spec lists ADDED/MODIFIED/REMOVED spec items: realise
83
+ them; every changed design element serves one of those spec ids.
84
+ • DESIGN-ONLY — the delta-spec is an unfilled stub (no spec delta): this change
85
+ refines HOW the EXISTING spec is realised (an architectural / decision change)
86
+ driven by the guidance below. The spec is unchanged, so every changed element
87
+ MUST still trace to an EXISTING spec id (FR-/BR-/CN-/DC-/IC-/US-/SC-) — you are
88
+ changing the realisation, never inventing a requirement.
89
+ Guidance: {{USER_INPUT}}
90
+
91
+ # ADVISORY blast radius (restored from the retired `cr`): who currently depends on THIS
92
+ # aggregate (its Cross-References in the OKF bundle). A change here may ripple to them —
93
+ # surfaced now, at delta-review time, and written to the change dir (impact.md) for the
94
+ # record. Read-only + on_error: continue: it INFORMS how to scope the change; the actual
95
+ # downstream-green enforcement is finalize-delta's job. Uses the change's own id
96
+ # ({{active_change}}) — the JOIN case inherits it from specify, the OPEN case sets it above.
97
+ - id: xref_impact
98
+ action: execute_script
99
+ on_error: continue
100
+ script: { ref: xref }
101
+ subcommand: list
102
+ args: ["--feature-dir", "{{feature_dir}}", "--out", "{{feature_dir}}/changes/{{active_change}}/impact.md"]
103
+ outputs:
104
+ - { name: downstream_count, from: "$.count" }
105
+ - { name: impact_report, from: "$.impact_report" }
@@ -0,0 +1,101 @@
1
+ # =============================================================================
2
+ # delta-spec (orchestrator module) — author the SPEC-side DELTA of a change
3
+ #
4
+ # Included by /appweaver specify on its DELTA branch (spec.md already exists).
5
+ # This is the SPEC half of the former standalone `cr` capture, relocated here: a
6
+ # later requirement is a new user story on the SAME aggregate. It opens the change
7
+ # (cr-setup — single-active-change guarded; also scaffolds delta-spec AND delta-design)
8
+ # and authors the DELTA-SPEC ONLY. It does NOT touch the master spec.md — the change
9
+ # stays OPEN; finalize-delta merges the delta into spec.md later in the chain and
10
+ # close-delta closes it at the end. No version bump here, no design (that is
11
+ # /appweaver design → delta-design).
12
+ #
13
+ # Runs in the CALLER's context (include semantics): shares vars + the sticky standards
14
+ # (specify's DDD authority + the selected domain rule files) + the caller's scripts map
15
+ # + replay cache.
16
+ # EXPECTS caller vars: feature_dir, spec_file, USER_INPUT.
17
+ # PRODUCES: cr_id, cr_dir, delta_spec (and, via cr-setup, an OPEN change + a scaffolded
18
+ # delta-design.md for the design phase to fill). cr_dir is what lets the
19
+ # caller's quality loop target THIS change (create-checklist --kind delta).
20
+ # =============================================================================
21
+
22
+ name: delta-spec
23
+ dialect: aw-spec.orchestrator/v1
24
+
25
+ # Scripts this module invokes. A module's scripts EXTEND the caller's map (setdefault, so
26
+ # the caller's refs WIN at runtime — these are inert whenever the including workflow already
27
+ # supplies them); declaring them here keeps the module self-contained and validatable on its
28
+ # own, rather than only inside a caller that happens to declare the ref.
29
+ scripts:
30
+ actions:
31
+ sh: .appweaver/scripts/bash/aw-spec-actions.sh
32
+ ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
33
+
34
+ workflow:
35
+
36
+ # Open the change (sets active_version.json.active_change) + scaffold the two delta
37
+ # docs from their templates. Refuses if a change is already open on this aggregate.
38
+ - id: cr_setup
39
+ action: execute_script
40
+ script: { ref: actions }
41
+ subcommand: cr-setup
42
+ args: ["--feature-dir", "{{feature_dir}}", "--title", "{{USER_INPUT}}"]
43
+ outputs:
44
+ - { name: cr_id, from: "$.cr_id" }
45
+ - { name: cr_dir, from: "$.cr_dir" }
46
+ - { name: delta_spec, from: "$.delta_spec" }
47
+
48
+ - id: ctx
49
+ action: build_context
50
+ context:
51
+ - "{{delta_spec}}" # the delta-spec template to fill
52
+ - "{{spec_file}}" # the current master spec (READ ONLY — never amended here)
53
+ - .appweaver/memory/constitution.domain.md # the DOMAIN authority — specify's frame. Declared
54
+ # REQUIRED (bare string, not `optional: true`) ON PURPOSE:
55
+ # specify is the ONLY phase that reads the domain rules and
56
+ # the task text below tells the agent this file is in context,
57
+ # so a missing one must ANNOUNCE (`[context] MISSING (required)`)
58
+ # rather than silently thin the payload. It announces, it does
59
+ # not stop — a delta only ever runs against an established
60
+ # feature, so the constitution is long since written.
61
+ # NOT constitution.technical: architecture is a HOW
62
+ # concern for design/implement, not domain modelling.
63
+ - { path: .appweaver/memory/constitution.ui.md, optional: true }
64
+ # The frontend lane's UX-* base — the source a UX- delta is
65
+ # lifted from. OPTIONAL, unlike the domain half: a project
66
+ # with no frontend lane has no such file, and that is the
67
+ # ordinary backend-only path, not something to announce.
68
+ - id: author
69
+ action: agent_author
70
+ include_standards: true
71
+ output_target: { type: file, path: "{{delta_spec}}" }
72
+ task: |
73
+ A change request to this aggregate's EXISTING spec (change {{cr_id}}). Fill the
74
+ delta-spec (the output target, in context) relative to the current master spec.md
75
+ (in context) — the DELTA ONLY. Do NOT edit spec.md: finalize-delta merges the delta
76
+ into the master later in the chain.
77
+ - Classify every item ADDED / MODIFIED / REMOVED vs the current master, in the
78
+ master's vocabulary — System Requirements in EARS, Business Rules (BR-n), User
79
+ Stories with Given/When/Then, and — where their rules apply — Constraints & NFRs
80
+ (CN-n), Data Classification (DC-n), Integration Contracts (IC-n) and Experience
81
+ Standards (UX-n). A change to a retention/audit rule, a data-exposure rule, an
82
+ interop obligation or a project-wide experience standard is a CN-/DC-/IC-/UX-
83
+ delta, not a code change.
84
+ - A UX- delta states the STANDARD only — accessibility conformance, interaction-state
85
+ coverage, content and language, journey integrity, responsiveness-as-a-limit — never
86
+ a screen, page, layout or component, which the prototype and design.ui.md settle. A
87
+ change to this aggregate's own interaction BEHAVIOUR is an FR- delta; only a change
88
+ to the standard governing every such behaviour is a UX- delta. A bound the SERVICE
89
+ must meet stays a CN-, because the service-side gates trace CN- and never read the
90
+ Experience Standards.
91
+ - The new operation is a NEW USER STORY — assign the next id after the highest US-n
92
+ in the master — never a new feature/aggregate. Record the regression risk (shared
93
+ behaviour that must still hold).
94
+ - Model the delta strictly in DDD terms (→ the modelling-methodology standard + the
95
+ domain's own DDD overlay, both in the sticky standards): keep the
96
+ ubiquitous language, respect the aggregate boundary and its root, entities vs
97
+ value objects, and aggregate-owned invariants — domain MODEL, never code.
98
+ Business-facing and testable; NO implementation mechanics (an external interop
99
+ OBLIGATION is a requirement → an IC- item, but never the adapter design); NO
100
+ design docs (that is the design phase).
101
+ Change request: {{USER_INPUT}}
@@ -0,0 +1,90 @@
1
+ # =============================================================================
2
+ # domain-select (orchestrator port) — shared domain rule-file selection module
3
+ #
4
+ # Included (via
5
+ # `action: include`) by every domain-aware converted skill. Same flow:
6
+ # 1. resolve the active domain + candidate rule files for {{command}}
7
+ # 2. Domain gate: no domain / no domain-rule-bindings → ask Continue (technical only)
8
+ # or EXIT (stops the whole skill, no side effects)
9
+ # 3. Selection box: all / subset / none
10
+ # 4. load the selected rule files — into the STICKY STANDARDS SET (D3: domain
11
+ # rules are SYSTEM standards; every later generation sees them without the
12
+ # caller re-declaring them per request)
13
+ #
14
+ # Runs in the CALLER's context: shares vars + standards + the caller's
15
+ # `scripts:` map + replay cache (include semantics; cache keys namespaced under
16
+ # the include id). HITL steps suspend via the checkpoint channel under EVERY
17
+ # strategy; non-interactive defaults: gate→continue, selection→all.
18
+ #
19
+ # Input (via include `with`): command = the command name (domain-rule-bindings heading).
20
+ # Produces: domain (+ dg_* internals) and the loaded standards.
21
+ # =============================================================================
22
+
23
+ name: domain-select
24
+ dialect: aw-spec.orchestrator/v1
25
+
26
+ # Scripts this module invokes. A module's scripts EXTEND the caller's map (setdefault, so
27
+ # the caller's refs WIN at runtime — these are inert whenever the including workflow already
28
+ # supplies them); declaring them here keeps the module self-contained and validatable on its
29
+ # own, rather than only inside a caller that happens to declare the ref.
30
+ scripts:
31
+ actions:
32
+ sh: .appweaver/scripts/bash/aw-spec-actions.sh
33
+ ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
34
+
35
+ workflow:
36
+
37
+ # 1. Resolve the active domain + candidate rule files.
38
+ - id: resolve
39
+ action: execute_script
40
+ script: { ref: actions }
41
+ subcommand: resolve-domain
42
+ args: ["--command", "{{command}}"]
43
+ outputs:
44
+ - { name: domain, from: "$.domain" }
45
+ - { name: dg_rulemap_exists, from: "$.rulemap_exists" }
46
+ - { name: dg_candidates, from: "$.candidates" }
47
+
48
+ # 2. Domain gate — only when the domain/domain-rule-bindings is missing.
49
+ - id: gate
50
+ action: ask
51
+ condition: "{{dg_rulemap_exists}} == false"
52
+ prompt: >
53
+ Domain is not set or its rule files are missing (domain '{{domain}}').
54
+ Continue with technical standards only, or exit to run /appweaver select-domain?
55
+ options: ["continue", "exit"]
56
+ answer_var: dg_gate
57
+ - id: gate_stop
58
+ action: verify_context
59
+ condition: "{{dg_rulemap_exists}} == false"
60
+ require_value: dg_gate
61
+ equals: "continue"
62
+ on_mismatch: stop
63
+ on_mismatch_message: "Exited — run /appweaver select-domain (or fix the domain folder) and re-run."
64
+
65
+ # 3. Selection box — only when a rule map with candidates exists.
66
+ - id: select_mode
67
+ action: ask
68
+ condition: "{{dg_candidates}} != []"
69
+ prompt: "Domain rule files for {{command}}:"
70
+ options: ["all", "subset", "none"]
71
+ answer_var: dg_mode
72
+ - id: pick_subset
73
+ action: ask
74
+ condition: "{{dg_mode}} == subset"
75
+ prompt: "Pick the domain rule files to load:"
76
+ options_from: "{{dg_candidates}}"
77
+ multi: true
78
+ answer_var: dg_subset
79
+
80
+ # 4. Load the selection into the sticky standards set (system block, D3).
81
+ - id: load_all
82
+ action: load_standards
83
+ condition: "{{dg_mode}} == all"
84
+ files_from_variable: dg_candidates
85
+ optional: true
86
+ - id: load_subset
87
+ action: load_standards
88
+ condition: "{{dg_mode}} == subset"
89
+ files_from_variable: dg_subset
90
+ optional: true
@@ -0,0 +1,126 @@
1
+ # =============================================================================
2
+ # lane-gate (orchestrator) — shared LANE + SOURCE PATH gate
3
+ #
4
+ # Included by every phase that reads or writes a lane's subtree. It answers one
5
+ # question before that phase starts doing work:
6
+ #
7
+ # is there a lane of the kind I need, and is its source path really there?
8
+ #
9
+ # WHY A GATE AND NOT A FALLBACK. A phase that cannot find a source path has two
10
+ # options: guess, or stop. Guessing is what the kit did before the lane model —
11
+ # `build` sniffed for a .sln, `run-migrate` hardcoded `src/`, and `implement` let
12
+ # the model decide where files should go. Each of those is right on the layout the
13
+ # guess was written for and quietly wrong on every other one, and "quietly" is the
14
+ # problem: a build that never compiled the frontend still reports green, and a
15
+ # generator that invents a root writes a second copy of the project. Stopping with
16
+ # the fix named costs one command and cannot be misread.
17
+ #
18
+ # WHAT IT DOES NOT DO. It never writes, never repairs a declaration, and never
19
+ # proposes one — select-stack is the sole writer and this module has no opinion
20
+ # about what the answer should be. It also does not require a lane of a kind the
21
+ # caller did not ask for: a backend-only project passes the backend gate and is
22
+ # never asked about a UI lane it declined.
23
+ #
24
+ # Inputs (via include `with`):
25
+ # require — the lane kind this phase cannot run without: backend | frontend
26
+ # command — the phase being gated, quoted back in the failure message
27
+ #
28
+ # Produces, for the required kind: WHERE it lives (lane_root / lane_source_path),
29
+ # WHAT it is (lane_profile / lane_title / lane_language / lane_ecosystem) and HOW it
30
+ # is driven (lane_build / lane_test / lane_run), plus both kinds' flattened fields,
31
+ # so the caller can put any of them into a prompt or a script argument without a
32
+ # second script call. The identity fields matter as much as the path: a phase that
33
+ # generates code has to name the language it is generating, and `implement` binding
34
+ # the stack from "the active profile" only works if something puts the profile in
35
+ # front of the model.
36
+ # =============================================================================
37
+
38
+ name: lane-gate
39
+ dialect: aw-spec.orchestrator/v1
40
+
41
+ # Scripts this module invokes. A module's scripts EXTEND the caller's map (setdefault, so
42
+ # the caller's refs WIN at runtime — these are inert whenever the including workflow already
43
+ # supplies them); declaring them here keeps the module self-contained and validatable on its
44
+ # own, rather than only inside a caller that happens to declare the ref.
45
+ scripts:
46
+ actions:
47
+ sh: .appweaver/scripts/bash/aw-spec-actions.sh
48
+ ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
49
+
50
+ workflow:
51
+
52
+ # 1. Check the declaration. Always exits 0 — the whole point is that the reason
53
+ # reaches the gate below as text rather than as a non-zero exit nobody sees.
54
+ # The on-disk check is ON here: this module only runs in phases that are about
55
+ # to read or write the subtree, which is exactly where a path that is not there
56
+ # stops being a normal greenfield state and becomes a defect.
57
+ - id: verify
58
+ action: execute_script
59
+ script: { ref: actions }
60
+ subcommand: lane-verify
61
+ args: ["--require", "{{require}}", "--command", "{{command}}"]
62
+ outputs:
63
+ - { name: lane_ok, from: "$.ok" }
64
+ - { name: lane_issues, from: "$.message" }
65
+ - { name: be_lane_id, from: "$.backend_lane_id" }
66
+ - { name: be_source_path, from: "$.backend_source_path" }
67
+ - { name: be_profile, from: "$.backend_profile" }
68
+ - { name: be_title, from: "$.backend_title" }
69
+ - { name: be_language, from: "$.backend_language" }
70
+ - { name: be_ecosystem, from: "$.backend_ecosystem" }
71
+ - { name: be_build, from: "$.backend_build" }
72
+ - { name: be_test, from: "$.backend_test" }
73
+ - { name: be_run, from: "$.backend_run" }
74
+ - { name: fe_lane_id, from: "$.frontend_lane_id" }
75
+ - { name: fe_source_path, from: "$.frontend_source_path" }
76
+ - { name: fe_profile, from: "$.frontend_profile" }
77
+ - { name: fe_title, from: "$.frontend_title" }
78
+ - { name: fe_language, from: "$.frontend_language" }
79
+ - { name: fe_ecosystem, from: "$.frontend_ecosystem" }
80
+ - { name: fe_build, from: "$.frontend_build" }
81
+ - { name: fe_test, from: "$.frontend_test" }
82
+ - { name: fe_run, from: "$.frontend_run" }
83
+
84
+ - id: gate
85
+ action: verify_context
86
+ require_true: lane_ok
87
+ on_false: stop
88
+ on_false_message: >
89
+ {{command}} cannot run: {{lane_issues}}
90
+ The lane model in .appweaver/stacks.json is what tells this phase which subtree
91
+ it owns — where to write, what to compile, and what to run. Declaring it is
92
+ the first step of both the greenfield and the brownfield sequence.
93
+
94
+ # 2. Bind the REQUIRED kind's fields to unprefixed names, so a caller that asked
95
+ # for one lane reads `lane_source_path` and never repeats the kind it already
96
+ # named. Ordered override rather than a branch: the engine has no conditional
97
+ # binding, so state the backend case and let a frontend requirement replace it.
98
+ - id: lane_fields_backend
99
+ action: set
100
+ vars:
101
+ lane_kind: "backend"
102
+ lane_id: "{{be_lane_id}}"
103
+ lane_root: "{{be_source_path}}"
104
+ lane_source_path: "{{be_source_path}}"
105
+ lane_profile: "{{be_profile}}"
106
+ lane_title: "{{be_title}}"
107
+ lane_language: "{{be_language}}"
108
+ lane_ecosystem: "{{be_ecosystem}}"
109
+ lane_build: "{{be_build}}"
110
+ lane_test: "{{be_test}}"
111
+ lane_run: "{{be_run}}"
112
+ - id: lane_fields_frontend
113
+ action: set
114
+ condition: "{{require}} == frontend"
115
+ vars:
116
+ lane_kind: "frontend"
117
+ lane_id: "{{fe_lane_id}}"
118
+ lane_root: "{{fe_source_path}}"
119
+ lane_source_path: "{{fe_source_path}}"
120
+ lane_profile: "{{fe_profile}}"
121
+ lane_title: "{{fe_title}}"
122
+ lane_language: "{{fe_language}}"
123
+ lane_ecosystem: "{{fe_ecosystem}}"
124
+ lane_build: "{{fe_build}}"
125
+ lane_test: "{{fe_test}}"
126
+ lane_run: "{{fe_run}}"
@@ -0,0 +1,123 @@
1
+ # =============================================================================
2
+ # tech-select (orchestrator) — shared TECHNICAL rule-file selection module
3
+ #
4
+ # The technical counterpart of domain-select. Where domain-select loads the
5
+ # per-command DOMAIN rule files from guardrails/projects/<project>/domain-rule-bindings.md,
6
+ # this module loads the per-command TECHNICAL rule files — the project's mapped technical rules and
7
+ # the worked examples/ samples that go with them — from
8
+ # guardrails/projects/<project>/tech-rule-bindings.md
9
+ # Included (via `action: include`) by every technical-rule consumer so the set is
10
+ # CONFIGURATION, not code — tune the map, not the workflow.
11
+ #
12
+ # Flow (mirrors domain-select):
13
+ # 1. resolve the active domain + candidate technical rule files for {{command}}
14
+ # 2. Selection box: all / subset / none (non-interactive default: all)
15
+ # 3. load the selected files into the STICKY STANDARDS SET (D3: system standards
16
+ # every later generation sees without the caller re-declaring them)
17
+ #
18
+ # DELIBERATE difference from domain-select: there is NO blocking gate/exit. When
19
+ # the domain or the map is missing the module SOFT-CONTINUES (loads nothing extra)
20
+ # — the technology base still reaches the consumer through constitution.technical.md
21
+ # (referred to directly, as-is — NOT mapped) plus the caller's minimal seed, so an
22
+ # unconfigured / greenfield project is never blocked. This keeps greenfield-safety.
23
+ #
24
+ # Runs in the CALLER's context: shares vars + standards + the caller's `scripts:`
25
+ # map + replay cache (include semantics). HITL steps suspend via the checkpoint
26
+ # channel under every strategy; non-interactive default: selection → all.
27
+ #
28
+ # Input (via include `with`): command = the command name (tech-rule-bindings heading).
29
+ # Produces: tech_domain (+ tg_* internals) and the loaded standards.
30
+ # =============================================================================
31
+
32
+ name: tech-select
33
+ dialect: aw-spec.orchestrator/v1
34
+
35
+ # Scripts this module invokes. A module's scripts EXTEND the caller's map (setdefault, so
36
+ # the caller's refs WIN at runtime — these are inert whenever the including workflow already
37
+ # supplies them); declaring them here keeps the module self-contained and validatable on its
38
+ # own, rather than only inside a caller that happens to declare the ref.
39
+ scripts:
40
+ actions:
41
+ sh: .appweaver/scripts/bash/aw-spec-actions.sh
42
+ ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
43
+
44
+ workflow:
45
+
46
+ # 1. Resolve the active domain + candidate technical rule files.
47
+ - id: resolve
48
+ action: execute_script
49
+ script: { ref: actions }
50
+ subcommand: resolve-tech
51
+ args: ["--command", "{{command}}"]
52
+ outputs:
53
+ - { name: tech_domain, from: "$.domain" }
54
+ - { name: tg_techmap_exists, from: "$.techrulemap_exists" }
55
+ - { name: tg_candidates, from: "$.candidates" }
56
+ - { name: tg_mismatch, from: "$.stack_mismatch" }
57
+ - { name: tg_mismatched, from: "$.mismatched_stacks" }
58
+ - { name: tg_declared_stacks, from: "$.declared_stacks" }
59
+
60
+ # 1a. STACK MISMATCH — the map points at a technical corpus for a stack this repo
61
+ # does not declare. These files become STICKY STANDARDS: the generator obeys
62
+ # them for the rest of the run, so a Spring repo mapped to the .NET corpus is
63
+ # told to write C# project layout and EF Core persistence for Java code. That is
64
+ # not a soft problem, but it is also not always a mistake — a shared corpus may
65
+ # be referenced on purpose — so this ASKS rather than stops. It fires ONLY on a
66
+ # real mismatch: nothing declared, no map, or a matching corpus never reaches it,
67
+ # which is what keeps the unconfigured and greenfield paths untouched. The
68
+ # non-interactive default is the first option, i.e. the historic behaviour.
69
+ - id: mismatch_ack
70
+ action: ask
71
+ condition: "{{tg_mismatch}} == true"
72
+ prompt: >
73
+ The technical rule map for `{{tech_domain}}` loads rules from {{tg_mismatched}},
74
+ but this repository declares {{tg_declared_stacks}}. These files become standards
75
+ the code generator follows. Proceed?
76
+ options:
77
+ - "load them anyway — the corpus applies here"
78
+ - "stop — fix the map first"
79
+ answer_var: tg_mismatch_ack
80
+
81
+ - id: mismatch_gate
82
+ action: verify_context
83
+ condition: "{{tg_mismatch}} == true"
84
+ require_value: tg_mismatch_ack
85
+ equals: "load them anyway — the corpus applies here"
86
+ on_mismatch: stop
87
+ on_mismatch_message: >
88
+ Stopped before loading technical rules from {{tg_mismatched}} into a
89
+ {{tg_declared_stacks}} repository. Point the `## /` headings in
90
+ guardrails/projects/{{tech_domain}}/tech-rule-bindings.md at a corpus for this
91
+ stack, or write the corpus segment of the path as a stack PLACEHOLDER (see the
92
+ header of resolve-tech) so one map resolves from .appweaver/stacks.json and serves
93
+ every stack this project declares. A corpus
94
+ for a new stack is a new directory under guardrails/technology/ plus the bullets
95
+ that map it — no workflow changes.
96
+
97
+ # 2. Selection box — only when a tech rule map with candidates exists.
98
+ # No-map path: no step fires (both conditions below are false) ⇒ soft-continue.
99
+ - id: select_mode
100
+ action: ask
101
+ condition: "{{tg_candidates}} != []"
102
+ prompt: "Technical rule files for {{command}}:"
103
+ options: ["all", "subset", "none"]
104
+ answer_var: tg_mode
105
+ - id: pick_subset
106
+ action: ask
107
+ condition: "{{tg_mode}} == subset"
108
+ prompt: "Pick the technical rule files to load:"
109
+ options_from: "{{tg_candidates}}"
110
+ multi: true
111
+ answer_var: tg_subset
112
+
113
+ # 3. Load the selection into the sticky standards set (system block, D3).
114
+ - id: load_all
115
+ action: load_standards
116
+ condition: "{{tg_mode}} == all"
117
+ files_from_variable: tg_candidates
118
+ optional: true
119
+ - id: load_subset
120
+ action: load_standards
121
+ condition: "{{tg_mode}} == subset"
122
+ files_from_variable: tg_subset
123
+ optional: true