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,293 @@
1
+ # =============================================================================
2
+ # aw-spec-parity (orchestrator) — the CUTOVER GATE of the Brownfield Pipeline
3
+ #
4
+ # The migration-grade oracle. Once a slice has a new (candidate) implementation
5
+ # (forward pipeline) and a green characterization fence, PARITY runs every case
6
+ # in a manifest against BOTH the running LEGACY system and the new CANDIDATE and
7
+ # diffs observable output (response status + body, and optional resulting-state
8
+ # probes). The seam cuts over to the candidate ONLY when parity HOLDS — the
9
+ # running legacy system is the oracle, not a written spec.
10
+ #
11
+ # inventory → adopt → characterize → [ forward pipeline ] → PARITY → cutover ← you are here
12
+ #
13
+ # Parity is what analyze-slice/characterize can't be: it compares against a LIVE oracle,
14
+ # so it catches behaviour no static test captured. Approved intended differences
15
+ # are whitelisted in the manifest's `expected_deviations` — and each MUST be
16
+ # recorded as a MODIFIED spec item via the CR loop, so behaviour never drifts
17
+ # silently.
18
+ #
19
+ # Two things the operator supplies (the pipeline cannot guess them): WHERE the
20
+ # legacy and candidate systems are running (the two `sides` in the manifest).
21
+ # parity AUTHORS the input corpus from the spec + source-map, then STOPS for you
22
+ # to fill the endpoints, then diffs on re-run.
23
+ #
24
+ # On a mismatch: triage — a REGRESSION is fixed in the CANDIDATE code (to match
25
+ # legacy); an INTENDED difference is added to expected_deviations (+ recorded as a
26
+ # MODIFIED spec item via /appweaver specify). parity never changes the spec here and
27
+ # never forces a match by breaking the candidate.
28
+ #
29
+ # Launch: /appweaver parity [strategy] [focus/guidance]
30
+ # Prereq: /appweaver adopt (spec.md + design.md + source-map.md) + a running
31
+ # candidate, and the legacy system reachable.
32
+ # =============================================================================
33
+
34
+ name: aw-spec-parity
35
+ description: Run a parity manifest's cases against the running legacy system and the new candidate, diff observable output, and gate cutover on parity holding. Authors the corpus from the spec + source-map; the operator supplies the two endpoints. Mismatches are triaged (fix the candidate, or whitelist an intended deviation that must become a MODIFIED spec item). The live legacy system is the oracle.
36
+ version: 1.0.0
37
+ agent_agnostic: true
38
+ dialect: aw-spec.orchestrator/v1
39
+
40
+ inputs:
41
+ user_input:
42
+ description: Optional focus / guidance (an area or extra input cases to cover).
43
+ required: false
44
+ bind: USER_INPUT
45
+
46
+ scripts:
47
+ parity:
48
+ sh: .appweaver/scripts/bash/aw-parity.sh
49
+ ps1: .appweaver/scripts/powershell/aw-parity.ps1
50
+ actions:
51
+ sh: .appweaver/scripts/bash/aw-spec-actions.sh
52
+ ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
53
+
54
+ # Sticky standards seed = the UNIVERSAL always-on rule only (ai-rules). The code-generation
55
+ # set (triage may fix the CANDIDATE code to match legacy) is no longer hardcoded here — it is
56
+ # now CONFIGURATION, loaded per-command from guardrails/projects/<project>/tech-rule-bindings.md
57
+ # under "## /aw-spec-parity" by the tech-select module (see the tech_select step below). No
58
+ # domain files: the target behaviour is defined by the running legacy system, not domain rules —
59
+ # the tech map lists only technical files. (parity does not reference constitution.technical.md.)
60
+ standards:
61
+ - { path: .appweaver/ai-rules.md } # kit-resident: the universal operating rules, every flow
62
+
63
+ vars:
64
+ parity_ok: "false"
65
+ case_count: "0"
66
+ sides_configured: "false"
67
+
68
+ workflow:
69
+
70
+ # 0. TECHNICAL rule files → sticky standards (configuration, not hardcoded). tech-select
71
+ # reads guardrails/projects/<project>/tech-rule-bindings.md under "## /aw-spec-parity" and
72
+ # loads that code-generation set into the sticky standards the agent_generate triage step
73
+ # ALWAYS prepends. No domain rule file is loaded here — the tech map lists only technical
74
+ # files. No blocking gate: an unconfigured project soft-continues (the target behaviour is
75
+ # the running legacy system, not any rule file).
76
+ - id: tech_select
77
+ action: include
78
+ module: .appweaver/orchestrator/modules/tech-select.orch.yaml
79
+ with: { command: aw-spec-parity }
80
+
81
+ # 1. Resolve the feature + require the adopted artifacts (spec/design/source-map).
82
+ - id: feature_paths
83
+ action: execute_script
84
+ on_error: continue # never crash raw on 'no feature set' — the gate below explains it
85
+ script: { ref: actions }
86
+ subcommand: feature-paths
87
+ outputs:
88
+ - { name: feature_dir, from: "$.feature_dir" }
89
+ - { name: spec_file, from: "$.spec_file" }
90
+ - { name: design_file, from: "$.design_file" }
91
+ - { name: spec_exists, from: "$.spec_exists" }
92
+ - { name: design_exists, from: "$.design_exists" }
93
+
94
+ - id: require_feature
95
+ action: verify_context
96
+ require_non_empty: feature_dir
97
+ on_empty: stop
98
+ on_empty_message: "No active feature. Run /appweaver select-feature first (pick or create the aggregate, e.g. Order), then re-run parity."
99
+
100
+ - id: verify_spec
101
+ action: verify_context
102
+ require_true: spec_exists
103
+ on_false: stop
104
+ on_false_message: "No spec.md for the current feature. Adopt the slice first: /appweaver adopt <Aggregate>."
105
+
106
+ - id: verify_design
107
+ action: verify_context
108
+ require_true: design_exists
109
+ on_false: stop
110
+ on_false_message: "No design.md for the current feature. Run /appweaver adopt <Aggregate> (or /appweaver design) first."
111
+
112
+ - id: set_source_map
113
+ action: set
114
+ vars:
115
+ source_map: "{{feature_dir}}/source-map.md"
116
+ # required_files raises a fixed Stop naming the missing file → run adopt first.
117
+ - id: require_source_map
118
+ action: verify_context
119
+ required_files: ["{{source_map}}"]
120
+
121
+ # 2. Scaffold the parity manifest (idempotent — keeps an existing one, incl. the
122
+ # operator's endpoints and any cases already authored).
123
+ - id: scaffold_parity
124
+ action: execute_script
125
+ script: { ref: parity }
126
+ subcommand: scaffold
127
+ args: ["--feature-dir", "{{feature_dir}}"]
128
+ outputs:
129
+ - { name: manifest_path, from: "$.manifest_path" }
130
+
131
+ # 3. Read current manifest readiness BEFORE authoring, so cases are only authored
132
+ # once (a re-run after the operator fills endpoints skips authoring).
133
+ - id: check_initial
134
+ action: execute_script
135
+ script: { ref: parity }
136
+ subcommand: check
137
+ args: ["--manifest", "{{manifest_path}}"]
138
+ outputs:
139
+ - { name: case_count, from: "$.case_count" }
140
+ - { name: sides_configured, from: "$.sides_configured" }
141
+
142
+ # 4. Pre-execution hooks.
143
+ - id: resolve_pre_hooks
144
+ action: execute_script
145
+ script: { ref: actions }
146
+ subcommand: resolve-hooks
147
+ args: ["--phase", "before_parity"]
148
+ outputs:
149
+ - { name: before_hooks, from: "$.hooks" }
150
+ - id: dispatch_pre_hooks
151
+ action: dispatch_hooks
152
+ hooks_from_variable: before_hooks
153
+
154
+ # 5. AUTHOR the parity corpus (only when no real cases exist yet). Derive cases
155
+ # from the spec's US/FR and the source-map's as-built quirks. Edits ONLY the
156
+ # `cases` array — the operator owns `sides`.
157
+ - id: ctx_author_cases
158
+ condition: "{{case_count}} == 0"
159
+ action: build_context
160
+ context:
161
+ - { path: "{{manifest_path}}" } # the manifest to edit (cases only)
162
+ - { path: "{{spec_file}}" } # US / FR / SC — the observable surface
163
+ - { path: "{{source_map}}" } # as-built quirks (each MUST get a case)
164
+ - { path: "{{design_file}}" } # endpoints / handlers / events
165
+ - id: author_cases
166
+ condition: "{{case_count}} == 0"
167
+ action: agent_generate
168
+ tools: "Read,Write,Edit"
169
+ permission_mode: acceptEdits
170
+ task: |
171
+ Author the PARITY CORPUS by editing the `cases` array of the parity manifest
172
+ (in context) — the inputs whose outputs must match between the running legacy
173
+ system and the new candidate. Guidance: {{USER_INPUT}}
174
+ Rules:
175
+ - Derive cases from the spec's User Stories / FR / Success Criteria (in context)
176
+ and the design's endpoints/handlers: one case per observable behaviour, with
177
+ representative inputs — the happy path, boundaries, and error paths.
178
+ - Every AS-BUILT QUIRK recorded in source-map.md (in context) MUST get a case
179
+ that will confirm the candidate REPRODUCES it (parity fails if the new code
180
+ "fixes" a quirk that was not turned into an intended deviation).
181
+ - Each case: a stable `id` (PC-002, PC-003, …), a `description`, `spec_ids`, a
182
+ `request` (method/path/headers/body — compared on status + body), and — where
183
+ resulting STATE matters — an optional `state_probe` request (a follow-up
184
+ read compared on body). Use the routes/fields the design + code actually use.
185
+ - Edit ONLY the `cases` array. Preserve `sides`, `compare`, `expected_deviations`
186
+ and every other key BYTE-FOR-BYTE (the operator owns the two `sides`
187
+ endpoints). Remove the PC-001-EXAMPLE placeholder. Emit VALID JSON.
188
+ outputs:
189
+ - { name: authored, from: "$.files" }
190
+
191
+ # 6. Re-read readiness after authoring.
192
+ - id: check_ready
193
+ action: execute_script
194
+ script: { ref: parity }
195
+ subcommand: check
196
+ args: ["--manifest", "{{manifest_path}}"]
197
+ outputs:
198
+ - { name: case_count, from: "$.case_count" }
199
+ - { name: sides_configured, from: "$.sides_configured" }
200
+ - { name: check_error, from: "$.error" }
201
+
202
+ - id: cases_gate
203
+ action: verify_context
204
+ require_true: case_count
205
+ on_false: stop
206
+ on_false_message: "No parity cases in {{manifest_path}} (check error: {{check_error}}). Authoring produced none or the JSON is invalid — add cases by hand (derived from the spec + source-map) and re-run."
207
+
208
+ # 7. OPERATOR HANDOFF: the two `sides` endpoints cannot be guessed. Stop here until
209
+ # they are filled (where the legacy + candidate systems are running).
210
+ - id: sides_gate
211
+ action: verify_context
212
+ require_true: sides_configured
213
+ on_false: stop
214
+ on_false_message: "Parity corpus is ready ({{case_count}} case(s)), but the endpoints are not set. Edit {{manifest_path}} → set sides.legacy and sides.candidate to where your LEGACY and NEW systems are running (kind:http base_url, or kind:shell command), then re-run /appweaver parity."
215
+
216
+ # 8. PARITY + TRIAGE loop: run both sides + diff; on mismatch, fix the CANDIDATE
217
+ # (regression) or whitelist an INTENDED deviation, then re-run. Bounded (3×).
218
+ - id: parity_loop
219
+ action: loop
220
+ while: "{{parity_ok}} != true"
221
+ max_iterations: 3
222
+ steps:
223
+ - id: run_parity
224
+ action: execute_script
225
+ on_error: continue
226
+ script: { ref: parity }
227
+ subcommand: run
228
+ args: ["--manifest", "{{manifest_path}}"]
229
+ outputs:
230
+ - { name: parity_ok, from: "$.ok" }
231
+ - { name: mismatched, from: "$.mismatched" }
232
+ - { name: matched, from: "$.matched" }
233
+ - { name: par_errors, from: "$.errors" }
234
+ - { name: report_path, from: "$.report_path" }
235
+ - id: hold_break
236
+ action: break
237
+ condition: "{{parity_ok}} == true"
238
+ - id: ctx_triage
239
+ action: build_context
240
+ context:
241
+ - { path: "{{report_path}}" } # the unaccepted diffs + accepted deviations
242
+ - { path: "{{manifest_path}}" } # to add expected_deviations
243
+ - { path: "{{spec_file}}" }
244
+ - { path: "{{source_map}}" }
245
+ - id: triage
246
+ action: agent_generate
247
+ tools: "Read,Write,Edit,Bash"
248
+ permission_mode: acceptEdits
249
+ task: |
250
+ Parity did not hold. Triage EACH unaccepted diff in the report (in context)
251
+ — the LEGACY output is the oracle:
252
+ - REGRESSION (the candidate is wrong): fix the CANDIDATE (new) code so its
253
+ observable output matches legacy. Read the candidate code, correct it, and
254
+ keep behaviour aligned with the legacy value shown in the report. Never
255
+ change the legacy side, and never edit a test just to hide the diff.
256
+ - INTENDED difference (a deliberate modernization): add an entry to the
257
+ manifest's `expected_deviations` ({case, path, reason}) so parity accepts
258
+ it — AND state in the reason that it must be recorded as a MODIFIED spec
259
+ item via /appweaver specify (do NOT edit spec.md here, and do NOT change code
260
+ to force a match). An as-built quirk the candidate dropped is a REGRESSION
261
+ unless it is a reviewed intended change.
262
+ - INVOKE ERROR (a side unreachable / bad request): report it — the operator
263
+ must make both systems reachable / fix the case; do not fake a pass.
264
+ Change ONLY candidate code and/or the manifest's expected_deviations.
265
+ Report:
266
+ {{report_path}}
267
+ outputs:
268
+ - { name: triaged_files, from: "$.files" }
269
+
270
+ - id: parity_gate
271
+ action: verify_context
272
+ require_true: parity_ok
273
+ on_false: stop
274
+ on_false_message: "Parity does NOT hold after 3 attempts ({{mismatched}} mismatch(es), {{par_errors}} error(s)). See {{report_path}}. Resolve each unaccepted diff — fix the candidate to match legacy, or whitelist an intended deviation (and record it as a MODIFIED spec item via /appweaver specify) — then re-run. Do NOT cut over until parity holds."
275
+
276
+ # 9. Post-execution hooks.
277
+ - id: resolve_post_hooks
278
+ action: execute_script
279
+ script: { ref: actions }
280
+ subcommand: resolve-hooks
281
+ args: ["--phase", "after_parity"]
282
+ outputs:
283
+ - { name: after_hooks, from: "$.hooks" }
284
+ - id: dispatch_post_hooks
285
+ action: dispatch_hooks
286
+ hooks_from_variable: after_hooks
287
+
288
+ outputs:
289
+ feature_dir: "{{feature_dir}}"
290
+ manifest_path: "{{manifest_path}}"
291
+ report_path: "{{report_path}}"
292
+ matched: "{{matched}}"
293
+ next: "PARITY HOLDS — the slice is cutover-ready. Route the seam to the candidate (Run/Deploy); the legacy path goes dark and roll back = re-route. Fold every accepted deviation into spec.md as a MODIFIED item via /appweaver specify. Repeat inventory→adopt→characterize→parity for the next slice."
@@ -0,0 +1,194 @@
1
+ # =============================================================================
2
+ # aw-spec-run (orchestrator) — migrate + prepare to run
3
+ #
4
+ # Apply database migrations; on failure fix (up to 3×) and record the touched files
5
+ # in the slice's OKF concept; then surface the launch command. A live server is not
6
+ # held by the batch engine — the launch hint is reported for the user/agent to start.
7
+ # Run after /appweaver analyze-slice.
8
+ #
9
+ # 1.1.0 — the fix loop's file list now comes from the OKF concept's `source_files`
10
+ # (`aw-xref concept-paths`) instead of the retired `design-paths` scan for
11
+ # ```lang path=… fences, and the tail step records fix-loop files in that concept
12
+ # instead of copying file bodies back into design fences (`design-reconcile`).
13
+ #
14
+ # Launch: /appweaver run [strategy]
15
+ # =============================================================================
16
+
17
+ name: aw-spec-run
18
+ description: Apply migrations, fix migration/runtime errors, record the touched files in the slice's knowledge concept, and report the launch command.
19
+ version: 1.1.0
20
+ agent_agnostic: true
21
+ dialect: aw-spec.orchestrator/v1
22
+
23
+ scripts:
24
+ actions:
25
+ sh: .appweaver/scripts/bash/aw-spec-actions.sh
26
+ ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
27
+ xref:
28
+ sh: .appweaver/scripts/bash/aw-xref.sh
29
+ ps1: .appweaver/scripts/powershell/aw-xref.ps1
30
+
31
+ # No hardcoded TECHNICAL standards seed — the sticky set carries only the kit's universal
32
+ # operating rules, which is where "never run a migration against a shared environment"
33
+ # lives. The technical rule file
34
+ # the migration step works against (persistence) is now CONFIGURATION, loaded per-command from
35
+ # guardrails/projects/<project>/tech-rule-bindings.md under "## /aw-spec-run" by the tech-select
36
+ # module (see the tech_select step below). No domain files; run does not reference
37
+ # constitution.technical.md. (missing files skipped at assembly time)
38
+ standards:
39
+ - { path: .appweaver/ai-rules.md } # kit-resident: the universal operating rules, every flow
40
+
41
+ vars:
42
+ migrate_ok: "false"
43
+
44
+ workflow:
45
+
46
+ # 0. TECHNICAL rule files → sticky standards (configuration, not hardcoded). tech-select
47
+ # reads guardrails/projects/<project>/tech-rule-bindings.md under "## /aw-spec-run" and loads
48
+ # that set (persistence) into the sticky standards the agent_generate migration step ALWAYS
49
+ # prepends. No domain rule file here. No blocking gate: an unconfigured project soft-continues.
50
+ - id: tech_select
51
+ action: include
52
+ module: .appweaver/orchestrator/modules/tech-select.orch.yaml
53
+ with: { command: aw-spec-run }
54
+
55
+ - id: feature_paths
56
+ action: execute_script
57
+ on_error: continue # never crash raw on 'no feature set' — the gate below explains it
58
+ script: { ref: actions }
59
+ subcommand: feature-paths
60
+ outputs:
61
+ - { name: feature_dir, from: "$.feature_dir" }
62
+
63
+ - id: require_feature
64
+ action: verify_context
65
+ require_non_empty: feature_dir
66
+ on_empty: stop
67
+ on_empty_message: "No active feature. Run /appweaver select-feature first (pick or create the aggregate, e.g. Order), then re-run run."
68
+
69
+ # Require the SERVICE LANE and its source path. Migrations belong to the backend
70
+ # lane by definition, and run-migrate searches that lane's root for the project
71
+ # instead of assuming `src/` — which is what lets a repo whose service code sits
72
+ # in `Legacy/App/` or `backend/` find its own migrations.
73
+ - id: lane_gate
74
+ action: include
75
+ module: .appweaver/orchestrator/modules/lane-gate.orch.yaml
76
+ with: { require: backend, command: "/appweaver run" }
77
+
78
+ # The slice's source files, from its OKF concept — what the migration fix loop below is
79
+ # handed. Replaces the retired `design-paths` fence scan (the tech-agnostic design.md
80
+ # carries no ```lang path=… code blocks, so it returned nothing and the fixer got an
81
+ # EMPTY context). Read-only, exits 0 with paths=[] when there is no concept yet, and
82
+ # on_error: continue so a missing bundle can never block a migration.
83
+ - id: concept_paths
84
+ action: execute_script
85
+ on_error: continue
86
+ script: { ref: xref }
87
+ subcommand: concept-paths
88
+ args: ["--feature-dir", "{{feature_dir}}"]
89
+ outputs:
90
+ - { name: all_paths, from: "$.paths" }
91
+ - { name: paths_missing, from: "$.missing" }
92
+
93
+ - id: resolve_pre_hooks
94
+ action: execute_script
95
+ script: { ref: actions }
96
+ subcommand: resolve-hooks
97
+ args: ["--phase", "before_run"]
98
+ outputs:
99
+ - { name: before_hooks, from: "$.hooks" }
100
+ - id: dispatch_pre_hooks
101
+ action: dispatch_hooks
102
+ hooks_from_variable: before_hooks
103
+
104
+ # Migrate → (if red) fix → re-migrate, up to 3×.
105
+ - id: migrate_loop
106
+ action: loop
107
+ while: "{{migrate_ok}} != true"
108
+ max_iterations: 3
109
+ steps:
110
+ - id: migrate
111
+ action: execute_script
112
+ on_error: continue
113
+ script: { ref: actions }
114
+ subcommand: run-migrate
115
+ args: ["--feature-dir", "{{feature_dir}}"]
116
+ outputs:
117
+ - { name: migrate_ok, from: "$.ok" }
118
+ - { name: migrate_tool, from: "$.tool" }
119
+ - { name: migrate_log, from: "$.log_tail" }
120
+ - id: green_break
121
+ action: break
122
+ condition: "{{migrate_ok}} == true"
123
+ - id: ctx_fix
124
+ action: build_context
125
+ vars:
126
+ migrate_log: "{{migrate_log}}"
127
+ context_from: all_paths
128
+ - id: fix
129
+ action: agent_generate
130
+ tools: "Read,Write,Edit,Bash"
131
+ permission_mode: acceptEdits
132
+ task: |
133
+ A migration/runtime step failed. Fix the migration or configuration in
134
+ the files in context (usually the Infra layer), preserving intent. Log:
135
+ {{migrate_log}}
136
+ outputs:
137
+ - { name: fixed_files, from: "$.files" }
138
+
139
+ - id: run_gate
140
+ action: verify_context
141
+ require_true: migrate_ok
142
+ on_false: stop
143
+ on_false_message: "Migration still failing after 3 fix attempts. Last log: {{migrate_log}}"
144
+
145
+ # Record what the migration fix loop touched in the slice's OKF concept. Replaces the
146
+ # retired `design-reconcile` (which copied file bodies back into design fences — a
147
+ # silent no-op since design.md stopped carrying code). The fix loop can CREATE files
148
+ # (a new migration, a config) that implement never recorded. UNION (--merge), never
149
+ # replace. Advisory: conditioned + on_error: continue, never gated.
150
+ - id: okf_merge_run_fixes
151
+ action: execute_script
152
+ condition: "{{fixed_files}}"
153
+ on_error: continue
154
+ script: { ref: xref }
155
+ subcommand: concept-upsert
156
+ args: ["--feature-dir", "{{feature_dir}}", "--source-files", "{{fixed_files}}", "--merge"]
157
+ outputs:
158
+ - { name: okf_concept, from: "$.concept" }
159
+
160
+ # Surface the launch command (does not start a long-lived server). The lane's own
161
+ # `run` is the answer — it is what the profile declares and what `run-phase` would
162
+ # execute — so the hint is right on every stack instead of on one. find-host-project
163
+ # still runs because a .NET host directory is worth naming when there is one, but it
164
+ # is advisory: it locates a Program.cs, so it finds nothing on a Spring or a Go lane
165
+ # and that is a blank field, not a failure (on_error: continue, no gate).
166
+ - id: locate_host
167
+ action: execute_script
168
+ on_error: continue
169
+ script: { ref: actions }
170
+ subcommand: find-host-project
171
+ outputs:
172
+ - { name: host_found, from: "$.found" }
173
+ - { name: host_project, from: "$.project_dir" }
174
+
175
+ - id: resolve_post_hooks
176
+ action: execute_script
177
+ script: { ref: actions }
178
+ subcommand: resolve-hooks
179
+ args: ["--phase", "after_run"]
180
+ outputs:
181
+ - { name: after_hooks, from: "$.hooks" }
182
+ - id: dispatch_post_hooks
183
+ action: dispatch_hooks
184
+ hooks_from_variable: after_hooks
185
+
186
+ outputs:
187
+ feature_dir: "{{feature_dir}}"
188
+ migrate_tool: "{{migrate_tool}}"
189
+ okf_concept: "{{okf_concept}}"
190
+ # Declared in the concept but absent on disk — advisory index drift, never gated.
191
+ stale_source_files: "{{paths_missing}}"
192
+ host_project: "{{host_project}}"
193
+ launch_hint: "{{lane_run}} (the {{lane_id}} lane's declared run command, from .appweaver/stacks.json)"
194
+ next: "/appweaver deploy"
@@ -0,0 +1,83 @@
1
+ # =============================================================================
2
+ # aw-spec-select-domain (orchestrator) — select the active PROJECT under guardrails/projects/
3
+ #
4
+ # The command name and .appweaver/domain.json are historical: what is selected is a
5
+ # project folder, and a project is bound to rules by its two maps, not by an industry.
6
+ #
7
+ # Pure orchestration/governance, NO generation: scripts + one gate + one HITL select.
8
+ # Exercises the D1 interaction channel: under ANY strategy the `user_select`
9
+ # step suspends via --checkpoint (kind 'select') so the LAUNCHING agent asks
10
+ # the user; headless runs prefill with --input, --select select_domain=<name>,
11
+ # or --non-interactive.
12
+ #
13
+ # Run (interactive via launcher):
14
+ # python3 .appweaver/orchestrator/orchestrator.py \
15
+ # .appweaver/orchestrator/workflows/aw-spec-select-domain.orch.yaml \
16
+ # --checkpoint .appweaver/orchestrator/.state/select-domain.state.json --json
17
+ # =============================================================================
18
+
19
+ name: aw-spec-select-domain
20
+ description: Select the active project under guardrails/projects/ and store it in .appweaver/domain.json, binding both of that project's rule maps — domain-rule-bindings.md and tech-rule-bindings.md — so every AW-Spec command loads the right domain AND technical rule files.
21
+ version: 1.0.0
22
+ agent_agnostic: true
23
+ dialect: aw-spec.orchestrator/v1
24
+
25
+ inputs:
26
+ user_input:
27
+ description: Optional project folder name under guardrails/projects/ to set directly (e.g. dotnet-default-project). An industry name is not a valid value — an industry is a corpus a project's map points at, never a selection.
28
+ required: false
29
+ bind: USER_INPUT
30
+
31
+ scripts:
32
+ actions:
33
+ sh: .appweaver/scripts/bash/aw-spec-actions.sh
34
+ ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
35
+
36
+ workflow:
37
+
38
+ # 1. Discover candidate projects = subdirs of guardrails/projects/ carrying a rule map.
39
+ - id: list_domains
40
+ action: execute_script
41
+ script: { ref: actions }
42
+ subcommand: list-domains
43
+ outputs:
44
+ - { name: domains, from: "$.domains" }
45
+
46
+ # 2. Stop early if there are no domains to choose from.
47
+ - id: guard_no_domains
48
+ action: verify_context
49
+ require_non_empty: domains
50
+ on_empty_message: >
51
+ No governed projects found. Copy guardrails/projects/dotnet-default-project/ to
52
+ guardrails/projects/<name>/ and repoint its two maps at the technology and domain
53
+ corpora this project uses, then re-run.
54
+ on_empty: stop
55
+
56
+ # 3. Choose the domain. If USER_INPUT names a valid domain it is used directly;
57
+ # otherwise the launcher relays the choice to the user. One option => confirm.
58
+ - id: select_domain
59
+ action: user_select
60
+ prompt: "Select the active domain:"
61
+ options_from_variable: domains
62
+ preselect_from: USER_INPUT # direct-argument fast path
63
+ single_option_confirm: true
64
+ outputs:
65
+ - { name: chosen, from: selection }
66
+
67
+ # 4. Persist the choice to .appweaver/domain.json and report map status.
68
+ - id: set_domain
69
+ action: execute_script
70
+ script: { ref: actions }
71
+ subcommand: set-domain
72
+ args: ["--domain", "{{chosen}}"]
73
+ outputs:
74
+ - { name: domain, from: "$.domain" }
75
+ - { name: map_path, from: "$.map_path" }
76
+ - { name: map_exists, from: "$.map_exists" }
77
+
78
+ outputs:
79
+ domain: "{{domain}}"
80
+ domain_rule_bindings: "{{map_path}}"
81
+ domain_rule_bindings_exists: "{{map_exists}}"
82
+ note: "Active project '{{domain}}' persisted to .appweaver/domain.json. It selects TWO rule maps under guardrails/projects/{{domain}}/ — domain-rule-bindings.md (DOMAIN rules; read by constitution + specify only, because the spec is the pivot) and tech-rule-bindings.md (TECHNICAL rules; read by 10 workflows incl. design, implement, build and run). The rule FILES themselves live in shared corpora — guardrails/technology/<stack>/ and guardrails/domain/<industry>/ — and the maps are what bind this project to them, so two projects can share a corpus and differ only in their maps and their own three requirements files. domain_rule_bindings_exists reports the domain half only. A map that is absent, or a command with no heading in one, loads nothing for that class and SOFT-CONTINUES — an absent heading is a valid state, never a failure."
83
+ next: "/appweaver select-feature (then specify — the per-feature path). Re-run /appweaver select-domain any time to switch projects; it rebinds both maps at once."