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,263 @@
1
+ # dotnet-default-project — Command → Technical-Rule-File Map
2
+
3
+ Per-command list of the **technical** rule files this project loads (via `resolve-tech` +
4
+ the `tech-select` module, into the sticky standards set) for the spec-anchored
5
+ orchestrator pipeline. This is the technical counterpart of `domain-rule-bindings.md`
6
+ (which maps the DOMAIN rule files).
7
+
8
+ **The model:** the technical rule files are CONFIGURATION — tune this map, not the
9
+ workflows. They live in the **shared technology corpora**, one folder per stack, and this
10
+ map is what binds a project to them. The ratified output (`constitution.technical.md`) is
11
+ NOT listed here — every consumer refers to it directly, as-is.
12
+
13
+ - All paths are workspace-relative. This project maps two stacks:
14
+ `guardrails/technology/dotnet-webapi/` (the service) and
15
+ `guardrails/technology/nextjs/` (the frontend lane). Both are **standard rules shared by
16
+ every project that maps them**, and neither is domain-specific. The frontend corpus is
17
+ read by three headings — `## /aw-spec-ui-constitution` ratifies the lane's base, and
18
+ `## /aw-spec-design-ui` / `## /aw-spec-implement-ui` carry the detail rules under it.
19
+ - The two files this project authors — `service/technical-requirements.md` and
20
+ `frontend/ui-requirements.md` — live beside this map. They are the only mapped technical
21
+ files expected to differ between two projects on the same stacks.
22
+ - `technology/dotnet-webapi/examples/` holds the worked `<SampleProjectName>` sample for the
23
+ rule file beside it, split out so a phase can load the rules without the sample code. The
24
+ code-generating phases map both; `## /aw-spec-constitution` maps the rules alone, because a
25
+ thin authority document has no use for sample code.
26
+ - `resolve-tech --command <name>` collects the `- ` bullets under `## /<name>`.
27
+ - Adding a stack is adding a corpus and mapping it — `guardrails/technology/java-spring/`
28
+ ships unmapped for exactly that. No workflow, script or engine change is involved.
29
+ - **This map is pinned to .NET on purpose** — it is the *default .NET project*, and the stack
30
+ directories below are spelled out. Read from a repo whose lanes declare another stack,
31
+ `resolve-tech` returns `stack_mismatch` and `tech-select` asks before loading, because these
32
+ files become sticky standards the code generator follows. A project on another stack should
33
+ copy this folder and repoint the bullets, not adopt it as-is.
34
+ - A bullet may name its stack with a **placeholder** instead — `{{stack}}`,
35
+ `{{backend_stack}}`, `{{frontend_stack}}`, `{{backend_ecosystem}}`, `{{frontend_ecosystem}}`
36
+ — resolved from `.appweaver/stacks.json`. `guardrails/technology/{{stack}}/persistence.md`
37
+ reads as `java-spring/` in a Spring repo and `dotnet-webapi/` here, so ONE map serves every
38
+ stack a project declares. A placeholder for an undeclared lane skips that bullet; a resolved
39
+ path with no file on disk is reported, not silently dropped. See STACK-PROFILES.md §7a.
40
+ - This file is the **canonical technical mapping** for this project; it is selected whenever
41
+ `dotnet-default-project` is the active project (`.appweaver/domain.json`).
42
+ - A command with no heading here loads no mapped technical file (only the workflow's
43
+ universal `ai-rules.md` seed + `constitution.technical.md`, referred to directly).
44
+ - `## /aw-spec-specify` is the one **modelling-methodology** slot (see the rule partition):
45
+ a domain-agnostic way of *modelling*, never a technology choice. Everything below it is a
46
+ HOW-phase technical set.
47
+
48
+ ---
49
+
50
+ ## /aw-spec-specify
51
+ <!-- MODELLING METHODOLOGY ONLY, in two halves. Specify is the domain phase: the single kind
52
+ of technical input it may take is a domain-agnostic way of MODELLING, never a technology
53
+ choice. Do NOT add an architecture / persistence / codegen file here — that would break
54
+ specify's domain purity (design/implement own those). The domain's own DDD overlay
55
+ (domain-driven-design.domain.md) arrives separately via domain-rule-bindings.
56
+
57
+ 1. THE DOMAIN MODEL — DDD tactical patterns, plus the same methodology worked through
58
+ in code as the example beside it.
59
+ 2. THE EXPERIENCE MODEL — the ux/ rules that govern how specify states the experience:
60
+ Experience Scope, and the project-wide Experience Standards it lifts as UX- ids for
61
+ prototype / design-ui / implement-ui to author and verify against. These are
62
+ methodology, not visual design; each file's own "What must NOT appear" section is
63
+ what keeps screens out of the spec.
64
+
65
+ ⚠ The ux/ files sit in a DOMAIN corpus folder but are TECHNICAL-tier inputs: a file's
66
+ tier is the map that lists it, not the folder it lives in. guardrails/domain/healthcare/
67
+ ihe-conformance.md under ## /aw-spec-design is the same pattern. Unmapping them does not
68
+ make the spec's Experience Standards section disappear — the section is unconditional and
69
+ resolves to "None" — it removes the methodology specify fills it from. -->
70
+ - guardrails/technology/dotnet-webapi/domain-driven-design.md
71
+ - guardrails/technology/dotnet-webapi/examples/domain-driven-design.md
72
+ - guardrails/domain/healthcare/ux/journey-mapping.md
73
+ - guardrails/domain/healthcare/ux/interaction-states.md
74
+ - guardrails/domain/healthcare/ux/accessibility-standards.md
75
+ - guardrails/domain/healthcare/ux/content-design.md
76
+
77
+ ## /aw-spec-design
78
+ <!-- The technical/architecture rule files the design author works from (alongside the
79
+ spec and constitution.technical.md), each followed by its worked example. NO domain file
80
+ here — domain reaches design only as spec ids (BR-/CN-/DC-/IC-). -->
81
+ - guardrails/technology/dotnet-webapi/clean-architecture.md
82
+ - guardrails/technology/dotnet-webapi/cqrs.md
83
+ - guardrails/technology/dotnet-webapi/eventing.md
84
+ - guardrails/technology/dotnet-webapi/modular-monolith.md
85
+ - guardrails/technology/dotnet-webapi/vertical-slices.md
86
+ - guardrails/technology/dotnet-webapi/persistence.md
87
+ - guardrails/technology/dotnet-webapi/folder-structure.md
88
+ - guardrails/technology/dotnet-webapi/testing.md
89
+ - guardrails/technology/dotnet-webapi/api-versioning.md
90
+ - guardrails/technology/dotnet-webapi/zero-trust.md
91
+ - guardrails/technology/dotnet-webapi/authorization.md
92
+ - guardrails/technology/dotnet-webapi/authorization-matrix.md
93
+ - guardrails/technology/dotnet-webapi/auditing.md
94
+ - guardrails/technology/dotnet-webapi/data-classification.md
95
+ - guardrails/domain/healthcare/ihe-conformance.md
96
+ - guardrails/technology/dotnet-webapi/examples/clean-architecture.md
97
+ - guardrails/technology/dotnet-webapi/examples/cqrs.md
98
+ - guardrails/technology/dotnet-webapi/examples/eventing.md
99
+ - guardrails/technology/dotnet-webapi/examples/vertical-slices.md
100
+ - guardrails/technology/dotnet-webapi/examples/persistence.md
101
+ - guardrails/technology/dotnet-webapi/examples/api-versioning.md
102
+ - guardrails/technology/dotnet-webapi/examples/zero-trust.md
103
+ - guardrails/technology/dotnet-webapi/examples/authorization.md
104
+ - guardrails/technology/dotnet-webapi/examples/auditing.md
105
+
106
+ ## /aw-spec-design-ui
107
+ <!-- The FRONTEND LANE's design phase. Its own heading, not a branch of ## /aw-spec-design:
108
+ the two lanes are governed by different constitution halves and own disjoint source
109
+ paths, so keying the map on this command name gives the lane its own rule set for zero
110
+ mechanism change. NO domain file here — the domain reaches design.ui.md as spec ids,
111
+ exactly as it reaches design.md. The lane's ratified base (constitution.ui.md) is
112
+ referred to directly and is NOT mapped.
113
+
114
+ THE SERVICE LANE ENTERS THROUGH ONE FILE. api-integration.{{backend_stack}}.md is the
115
+ CROSS-LANE pairing rule set — what the service guarantees (paging shape, concurrency
116
+ token, error codes, redaction, caching, CORS) and what the client therefore must do.
117
+ It is named for the service stack and mapped through the placeholder, so ONE bullet
118
+ serves every backend: it resolves to api-integration.dotnet-webapi.md here and to
119
+ api-integration.java-spring.md in a Spring repo — both authored — and to a REPORTED
120
+ missing file for a backend whose pairing nobody has written yet, rather than silently
121
+ loading one stack's assumptions into another. A repo with no backend lane skips the
122
+ bullet entirely. No other service-lane file is mapped here: design.ui.md consumes the
123
+ published surface, never the service's internals. -->
124
+ - guardrails/technology/nextjs/component-architecture.md
125
+ - guardrails/technology/nextjs/routing-navigation.md
126
+ - guardrails/technology/nextjs/state-management.md
127
+ - guardrails/technology/nextjs/error-handling.md
128
+ - guardrails/technology/nextjs/forms-and-validation.md
129
+ - guardrails/technology/nextjs/auth-session.md
130
+ - guardrails/technology/nextjs/design-system.md
131
+ - guardrails/technology/nextjs/accessibility-implementation.md
132
+ - guardrails/technology/nextjs/i18n.md
133
+ - guardrails/technology/nextjs/performance-budgets.md
134
+ - guardrails/technology/nextjs/api-integration.{{backend_stack}}.md
135
+
136
+ ## /aw-spec-implement
137
+ <!-- The FRAMEWORK / code-generation rule files the code generator builds against
138
+ (alongside design.md and constitution.technical.md). NO domain file — domain
139
+ reaches implement only through design.md. clean-architecture/cqrs are design
140
+ concerns; component wiring is a separate /appweaver add-component step. -->
141
+ - guardrails/technology/dotnet-webapi/coding-standards.md
142
+ - guardrails/technology/dotnet-webapi/dependency-policy.md
143
+ - guardrails/technology/dotnet-webapi/folder-structure.md
144
+ - guardrails/technology/dotnet-webapi/testing.md
145
+ - guardrails/technology/dotnet-webapi/PACKAGING.md
146
+
147
+ ## /aw-spec-implement-ui
148
+ <!-- The FRONTEND LANE's code-generation set — the HOW the UI generator builds against,
149
+ alongside design.ui.md and constitution.ui.md. NO domain file: domain reached the lane
150
+ through spec -> design.ui.md. NO service-lane file beyond the pairing rules below —
151
+ this phase never writes outside the lane's declared source path.
152
+
153
+ EIGHT FILES ARE MAPPED FOR BOTH LANE PHASES on purpose. error-handling,
154
+ forms-and-validation, auth-session, design-system, accessibility-implementation, i18n,
155
+ performance-budgets and the api-integration pairing each carry a DESIGN half and an
156
+ IMPLEMENT half of one rule: the design decides the states, the affordances and the
157
+ targets; this phase realises them. A rule read by only one of the two loses the
158
+ pairing, and the half that goes unread is always the one that then goes unbuilt. -->
159
+ - guardrails/technology/nextjs/component-conventions.md
160
+ - guardrails/technology/nextjs/api-client.md
161
+ - guardrails/technology/nextjs/api-integration.{{backend_stack}}.md
162
+ - guardrails/technology/nextjs/auth-session.md
163
+ - guardrails/technology/nextjs/client-security.md
164
+ - guardrails/technology/nextjs/error-handling.md
165
+ - guardrails/technology/nextjs/forms-and-validation.md
166
+ - guardrails/technology/nextjs/design-system.md
167
+ - guardrails/technology/nextjs/accessibility-implementation.md
168
+ - guardrails/technology/nextjs/i18n.md
169
+ - guardrails/technology/nextjs/performance-budgets.md
170
+ - guardrails/technology/nextjs/observability.md
171
+ - guardrails/technology/nextjs/frontend-testing.md
172
+
173
+ ## /aw-spec-implement-delta
174
+ <!-- The CR analog of implement — same FRAMEWORK / code-generation set (HOW to build).
175
+ The delta's code is generated against the master design.md + delta-design.md; no
176
+ domain file (domain reached the delta via delta-spec → delta-design). -->
177
+ - guardrails/technology/dotnet-webapi/coding-standards.md
178
+ - guardrails/technology/dotnet-webapi/dependency-policy.md
179
+ - guardrails/technology/dotnet-webapi/folder-structure.md
180
+ - guardrails/technology/dotnet-webapi/testing.md
181
+ - guardrails/technology/dotnet-webapi/PACKAGING.md
182
+
183
+ ## /aw-spec-build
184
+ <!-- The compile/fix reference set: the layering + coding rules the fixer respects when
185
+ repairing compile errors against the design intent, plus the layering example it repairs
186
+ towards. NO domain file (build loads domain rules separately via domain-select) and no
187
+ constitution.technical here. -->
188
+ - guardrails/technology/dotnet-webapi/clean-architecture.md
189
+ - guardrails/technology/dotnet-webapi/coding-standards.md
190
+ - guardrails/technology/dotnet-webapi/examples/clean-architecture.md
191
+
192
+ ## /aw-spec-analyze-slice
193
+ <!-- The design↔code conformance gate's TECHNICAL checklist: the code + tests are
194
+ validated against these (alongside the DOMAIN gate overlays, loaded separately via
195
+ resolve-domain `## /aw-spec-gate`). Validation input only — never authoring. -->
196
+ - guardrails/technology/dotnet-webapi/testing.md
197
+ - guardrails/technology/dotnet-webapi/coding-standards.md
198
+
199
+ ## /aw-spec-constitution
200
+ <!-- What the TECHNICAL half of the split constitution ratifies into
201
+ constitution.technical.md: the technology base, then the STANDARD technical rules for
202
+ this industry — the same corpus design and implement build against, so a ratified
203
+ principle can cite the rule it governs — and last the PROJECT-SUPPLIED file the project
204
+ team authors. Loaded BEFORE the technical half and before domain-select, so the
205
+ technical author stays domain-free (the seam). NO domain file here: the domain half's
206
+ sources are the domain map's ## /aw-spec-constitution. NO examples/ file either — the
207
+ ratified half is one declarative line and a `→` pointer per principle, so sample code is
208
+ weight without a reader. -->
209
+ - guardrails/technology/dotnet-webapi/technology-constitution.md
210
+ - guardrails/technology/dotnet-webapi/clean-architecture.md
211
+ - guardrails/technology/dotnet-webapi/modular-monolith.md
212
+ - guardrails/technology/dotnet-webapi/vertical-slices.md
213
+ - guardrails/technology/dotnet-webapi/cqrs.md
214
+ - guardrails/technology/dotnet-webapi/persistence.md
215
+ - guardrails/technology/dotnet-webapi/eventing.md
216
+ - guardrails/technology/dotnet-webapi/folder-structure.md
217
+ - guardrails/technology/dotnet-webapi/testing.md
218
+ - guardrails/technology/dotnet-webapi/zero-trust.md
219
+ - guardrails/technology/dotnet-webapi/authorization.md
220
+ - guardrails/technology/dotnet-webapi/auditing.md
221
+ - guardrails/technology/dotnet-webapi/data-classification.md
222
+ - guardrails/technology/dotnet-webapi/api-versioning.md
223
+ - guardrails/technology/dotnet-webapi/coding-standards.md
224
+ - guardrails/technology/dotnet-webapi/dependency-policy.md
225
+ - guardrails/projects/dotnet-default-project/service/technical-requirements.md
226
+
227
+ ## /aw-spec-ui-constitution
228
+ <!-- What the UI half ratifies into constitution.ui.md as a UX-* principle series: the
229
+ standard frontend rules for this industry, then the PROJECT-SUPPLIED file. This heading
230
+ is also the AUTHORITATIVE signal that the project HAS a frontend lane — with no heading
231
+ here the constitution command skips the UI half and creates no file at all. Domain-free,
232
+ and loaded before domain-select for the same reason as the set above. -->
233
+ - guardrails/technology/nextjs/ui-constitution.md
234
+ - guardrails/projects/dotnet-default-project/frontend/ui-requirements.md
235
+
236
+ ## /aw-spec-run
237
+ <!-- Execution / data migration: the persistence rules the migration step generates against,
238
+ plus their worked example. NO domain file; run does not reference constitution.technical.md. -->
239
+ - guardrails/technology/dotnet-webapi/persistence.md
240
+ - guardrails/technology/dotnet-webapi/examples/persistence.md
241
+
242
+ ---
243
+
244
+ ## Quick reference (command → technical file count)
245
+
246
+ | Command | Technical rule files | Role |
247
+ |---|---|---|
248
+ | /aw-spec-specify | 6 | the modelling methodology the spec is expressed in: DDD for the domain model (+ its example), and the four ux/ rules for the experience model it lifts as UX- ids — no technology |
249
+ | /aw-spec-design | 24 | architecture/security/interop the design author mediates the spec against, each with its example |
250
+ | /aw-spec-design-ui | 11 | the frontend lane's design set — composition, routing, client state, interaction states, forms, auth surface, design system, accessibility, i18n, performance, and the cross-lane API pairing the UI design author works from (from spec.md) |
251
+ | /aw-spec-implement | 5 | governance/architecture the code generator builds against (from design.md) |
252
+ | /aw-spec-implement-ui | 13 | the frontend lane's code-generation set the UI generator builds against (from design.ui.md) — conventions, the generated client + its service pairing, auth, client security, states, forms, design system, accessibility, i18n, performance, observability and testing |
253
+ | /aw-spec-implement-delta | 5 | same code-generation set, scoped to the open change's delta-design |
254
+ | /aw-spec-build | 3 | layering + coding rules the compile-fixer respects, + the layering example |
255
+ | /aw-spec-analyze-slice | 2 | testing + coding rules the design↔code gate validates against |
256
+ | /aw-spec-constitution | 17 | what the technical half ratifies — the technology base, the standard technical rules, and the project team's technical-requirements.md |
257
+ | /aw-spec-ui-constitution | 2 | what the frontend lane's half ratifies — the UI base + the project team's ui-requirements.md — and the signal that the lane exists |
258
+ | /aw-spec-run | 2 | persistence rules the execution / data-migration step generates against, + its example |
259
+
260
+ > All migrated workflows are on this map. The conformance-gate workflows **analyze-design**
261
+ > and **analyze-delta-design** are intentionally NOT here — they validate design/delta
262
+ > against the spec + DOMAIN gate overlays only (domain-rule-bindings `## /aw-spec-gate`), with no
263
+ > technical gate checklist.
@@ -0,0 +1,27 @@
1
+ MedicinalProduct/
2
+
3
+ /appweaver constitution
4
+
5
+ /appweaver specify RegisterMedicinalProduct
6
+
7
+ Allow an authorized user to register a new medicinal product in the registry.
8
+
9
+ On registration the user provides: product name, generic name, NDC, dosage form, strength, route of administration, manufacturer, one or more active ingredients with details, one or more packaging configurations and one or more ATC classification codes.
10
+
11
+ The system validates the submission (required attributes, duplicate NDC, valid dosage form and route of administration) and creates the product in the Draft state. A successful registration is auditable and emits a registration event.
12
+
13
+ Acceptance:
14
+ - A valid submission creates a Draft MedicinalProduct and returns its identifier.
15
+ - A malformed or duplicate NDC is rejected with a clear validation error.
16
+ - A product missing a required attribute, an active ingredient, or a packaging configuration is rejected.
17
+ - The creation is recorded in the audit trail.
18
+
19
+ /appweaver design
20
+
21
+ /appweaver analyze-design
22
+
23
+ /appweaver implement
24
+
25
+
26
+
27
+ ==============================================================================================
@@ -0,0 +1,184 @@
1
+ # VerticalSlice — Foundation Packaging Rules
2
+
3
+ > **Why this exists.** The old `/aw-spec-foundation` skill *reconstructed* every project
4
+ > file from prose rule docs. Any omission or namespace drift produced a broken,
5
+ > non-compiling skeleton. This packaging model replaces reconstruction with a
6
+ > **byte-for-byte bundle of a real, verified solution**.
7
+ >
8
+ > You build the foundation **once** (a solution that actually compiles and runs),
9
+ > pack it into a single text file, and the scaffolder just **unpacks + renames** it.
10
+ > No regeneration, no drift.
11
+
12
+ ---
13
+
14
+ ## The single artifact
15
+
16
+ ```
17
+ foundations/dotnet/VerticalSlice/
18
+ ├── VerticalSlice.pack.txt ← THE BUNDLE: every source file, in one text file
19
+ ├── pack-foundation.ps1 ← produces VerticalSlice.pack.txt from a solution
20
+ └── unpack-foundation.ps1 ← extracts + renames into a target app (used by the skill)
21
+ ```
22
+
23
+ The bundle is the single source of truth for scaffolding. The engineering standards
24
+ the foundation solution must satisfy (vertical slices, DDD, CQRS, persistence, etc.)
25
+ live in the project constitution and the domain-specs rule files, not in this folder.
26
+
27
+ ---
28
+
29
+ ## The sentinel convention
30
+
31
+ You author the foundation solution under one fixed **sentinel app name**:
32
+
33
+ ```
34
+ AppWeaver.Foundation
35
+ ```
36
+
37
+ This is the placeholder that the scaffolder rewrites into the caller's app name.
38
+ It must be a **distinctive two-segment token** that is **not a prefix of any
39
+ `AppWeaver.*` NuGet package** (it isn't — there is no `AppWeaver.Foundation` package),
40
+ so a full-token replacement can never clobber a framework reference.
41
+
42
+ The scaffolder rewrites the sentinel in **four case forms** (ordinal, case-sensitive),
43
+ applied to **file contents and to file/folder paths**:
44
+
45
+ | Form | Sentinel | Example target (`AppWeaver.Health`) | Where it appears |
46
+ |-------------|------------------------|-------------------------------------|---------------------------------------------------|
47
+ | dotted | `AppWeaver.Foundation` | `AppWeaver.Health` | namespaces, `.csproj`/`.sln` names, project refs |
48
+ | underscored | `AppWeaver_Foundation` | `AppWeaver_Health` | Aspire project class names (`Projects.X_Service`) |
49
+ | lower-hyphen| `appweaver-foundation` | `appweaver-health` | `UserSecretsId`, db/container names |
50
+ | lower-dot | `appweaver.foundation` | `appweaver.health` | any lowercased identifiers |
51
+
52
+ **Never** rename the bare `AppWeaver` company segment on its own — only the full
53
+ sentinel token in the forms above. The framework packages (`AppWeaver.Mediator`,
54
+ `AppWeaver.Repository`, …) stay exactly as written.
55
+
56
+ ### What does NOT get renamed
57
+
58
+ - `AppWeaver.*` framework package references (`Directory.Packages.props`, every `.csproj`).
59
+ - The sample domain folder **`Projects`** (aggregate `Project`, `CreateProject`, etc.).
60
+ This is intentional sample content the caller renames to their own bounded context later.
61
+ - `<Company>` / `<Authors>` metadata in `Directory.Build.props` (display-only; edit manually if desired).
62
+
63
+ ---
64
+
65
+ ## How to author the foundation solution (do this once)
66
+
67
+ 1. **Pick a scratch folder** outside `foundations/`, e.g.
68
+ `E:\Work\Bytestrone\AppWeaver\Testing\AppWeaver.Spec\.foundation-build\`.
69
+ 2. **Create the solution under the sentinel name** `AppWeaver.Foundation`, following the
70
+ engineering standards in the project constitution and domain-specs rule files:
71
+ ```
72
+ AppWeaver.Foundation.sln
73
+ global.json
74
+ Directory.Build.props
75
+ Directory.Packages.props
76
+ src/
77
+ AppWeaver.Foundation.AppHost/
78
+ AppWeaver.Foundation.ServiceDefaults/
79
+ AppWeaver.Foundation.Service/ (includes the sample 'Projects' domain)
80
+ AppWeaver.Foundation.Web/
81
+ ```
82
+ 3. **Make it actually work.** This is the whole point — the bundle is only as good as
83
+ the solution you pack. Verify before packing:
84
+ ```powershell
85
+ dotnet restore .foundation-build/AppWeaver.Foundation.sln
86
+ dotnet build .foundation-build/AppWeaver.Foundation.sln -c Debug
87
+ # optional end-to-end:
88
+ dotnet run --project .foundation-build/src/AppWeaver.Foundation.AppHost
89
+ ```
90
+ Fix every error and warning-as-error here, in the real project, where the compiler
91
+ tells you exactly what's wrong. The packed bundle inherits this correctness.
92
+ 4. **Use the sentinel everywhere** the app name belongs: namespaces, project/folder
93
+ names, `UserSecretsId`, the Aspire db resource name, container names. Use the correct
94
+ case form for each (see table above).
95
+
96
+ ---
97
+
98
+ ## How to build the bundle
99
+
100
+ From `foundations/dotnet/VerticalSlice/`:
101
+
102
+ ```powershell
103
+ # This foundation intentionally ships the org-internal Azure Artifacts PAT in NuGet.config,
104
+ # so the secret guard must be overridden with -AllowSecrets (org-internal use only — rotate periodically).
105
+ ./pack-foundation.ps1 -SourceDir ../../../.foundation-build -OutFile ./VerticalSlice.pack.txt -AllowSecrets
106
+ ```
107
+
108
+ The packer:
109
+
110
+ - walks the solution, **excluding** build/IDE artifacts and secret-bearing files:
111
+ - dirs: `bin obj .vs .git .idea .vscode TestResults node_modules packages App_Data artifacts .next logs`
112
+ - files: `*.user *.suo *.DotSettings.user *.db *.db-shm *.db-wal *.sqlite *.log`
113
+ and **secrets**: `.env.* *.pfx *.pem *.key *.snk id_rsa id_rsa.pub secrets.json`;
114
+ > The root **`.env` is bundled on purpose** (required sample config); only per-environment
115
+ > overrides (`.env.local`, `.env.production`, …) are excluded. Keep the bundle org-internal
116
+ > and rotate any real values — the content scan still blocks PATs/keys regardless of filename.
117
+ - **fails closed on detected secrets** — it scans file *contents* for credential markers
118
+ (`ClearTextPassword`, private-key blocks, AWS keys, Azure DevOps PAT patterns) and
119
+ **refuses to pack** if any are found, unless you pass `-AllowSecrets`. This is what stops
120
+ a `NuGet.config` PAT from being baked into the committed bundle. **Fix the source** (rotate
121
+ the secret, switch the feed to env/CLI auth) rather than overriding the guard;
122
+ - stores text files **verbatim** and binary files (e.g. a `.png`) **base64-encoded**;
123
+ - writes a header (foundation, sentinel, file count, format version, replacement contract);
124
+ - **warns** if the sentinel token appears in zero files (a sign you used the wrong name).
125
+
126
+ > **Credentials in a scaffold.** The bundled `NuGet.config` should contain only feed
127
+ > *definitions* and `packageSourceMapping` — never `<packageSourceCredentials>`. Developers
128
+ > authenticate to private feeds with `dotnet nuget` / the Azure Artifacts credential provider
129
+ > / environment variables, not a checked-in PAT.
130
+
131
+ Re-run it whenever the foundation changes; commit the regenerated `VerticalSlice.pack.txt`.
132
+
133
+ ---
134
+
135
+ ## Pack file format (`aw-spec-pack/v1`)
136
+
137
+ ```
138
+ # AW-SPEC FOUNDATION PACK
139
+ # foundation: VerticalSlice
140
+ # sentinel: AppWeaver.Foundation
141
+ # generated: 2026-06-14T10:00:00.0000000Z
142
+ # files: 47
143
+ # format: aw-spec-pack/v1
144
+ # --- replacement contract ... ---
145
+ # ============================================================
146
+
147
+ <<<FILE path="Directory.Build.props">>>
148
+ ...verbatim file content...
149
+ <<<ENDFILE>>>
150
+ <<<FILE path="src/AppWeaver.Foundation.AppHost/Program.cs">>>
151
+ ...verbatim file content...
152
+ <<<ENDFILE>>>
153
+ <<<FILE path="src/AppWeaver.Foundation.Web/wwwroot/favicon.ico" encoding="base64">>>
154
+ AAABAAE...
155
+ <<<ENDFILE>>>
156
+ ```
157
+
158
+ - Paths are repo-root-relative with `/` separators.
159
+ - The marker lines `<<<FILE …>>>` and `<<<ENDFILE>>>` are **reserved** — they must never
160
+ occur as a literal line inside a source file (they can't in C#/XML/JSON/Razor).
161
+ - `encoding="base64"` marks a binary file; everything else is UTF-8 text.
162
+
163
+ ---
164
+
165
+ ## How scaffolding consumes the bundle
166
+
167
+ `/appweaver foundation VerticalSlice <AppName> [OutputDir]` runs `unpack-foundation.ps1`,
168
+ which reads the sentinel from the pack header, derives the four target case forms, and
169
+ writes the renamed files to the output directory (**repo root by default**). The phase is
170
+ defined in `.appweaver/orchestrator/workflows/aw-spec-foundation.orch.yaml`.
171
+
172
+ ```powershell
173
+ ./unpack-foundation.ps1 -PackFile ./VerticalSlice.pack.txt -TargetAppName AppWeaver.Health -OutDir ../../../
174
+ ```
175
+
176
+ ---
177
+
178
+ ## Maintenance checklist
179
+
180
+ - [ ] Foundation solution builds clean (`dotnet build`, warnings-as-errors satisfied).
181
+ - [ ] Sentinel `AppWeaver.Foundation` used consistently in all four case forms.
182
+ - [ ] No `bin/obj/.vs` or local `.db` files committed into the pack.
183
+ - [ ] `pack-foundation.ps1` reported a non-zero sentinel hit count.
184
+ - [ ] `VerticalSlice.pack.txt` regenerated and committed after any change.
@@ -0,0 +1,44 @@
1
+ # API Versioning Policy
2
+
3
+ > Pure technology (domain-agnostic) — domain (e.g. FHIR) versioning in [[api-versioning.domain]]. Commands: `/aw-spec-design`.
4
+
5
+ ## REST versioning
6
+
7
+ - Internal REST (FastEndpoints) serves first-party apps and operational tooling.
8
+ - List endpoints accept `pageNumber` (1-based) + `pageSize` and return `PagedResult<TDto>`
9
+ (see [[vertical-slices]]).
10
+ - Breaking changes to internal REST require a **versioned route prefix** (`v2/...`).
11
+ - Endpoints MUST NOT swallow exceptions; the central exception handler owns the contract.
12
+
13
+ ## ETag / concurrency at the edge
14
+
15
+ - The server sets the ETag header on every create/read/update via `SetETagFromBase64(...)`.
16
+ - Update/Delete extract `If-Match` via `GetIfMatchBase64Token()`; mismatch -> `409
17
+ concurrency.conflict`. ETag tokens are strong; `W/` weak prefixes stripped on read.
18
+ See [[persistence]].
19
+
20
+ ## Machine-readable schemas
21
+
22
+ - The service publishes versioned, machine-readable schemas:
23
+ - **OpenAPI** for REST,
24
+ - **AsyncAPI** for events (see [[eventing]]).
25
+ - All schemas regenerate cleanly in CI; diffs are reviewed for breaking changes
26
+ (see [[coding-standards]]).
27
+ - (FHIR CapabilityStatement — see [[api-versioning.domain]].)
28
+
29
+ ## Deprecation lifecycle & sunset policy
30
+
31
+ - **Breaking changes are MAJOR version bumps** (per the constitution's governance SemVer).
32
+ - A superseded REST version remains available through a documented deprecation window before
33
+ sunset; the deprecation and sunset are announced via the published schema diffs and the
34
+ governance amendment process.
35
+
36
+ ## Canonical example
37
+
38
+ The worked `<SampleProjectName>` example for these rules lives in
39
+ `guardrails/technology/dotnet-webapi/examples/api-versioning.md`, mapped for `design`. The
40
+ constitution set maps the rules without it.
41
+
42
+ ## Related
43
+
44
+ - [[vertical-slices]] · [[persistence]] · [[eventing]] · [[coding-standards]] · [[api-versioning.domain]]
@@ -0,0 +1,96 @@
1
+ # Auditing & Observability Standards
2
+
3
+ > Pure technology (domain-agnostic) — domain audit additions in [[auditing.domain]]. NON-NEGOTIABLE. Commands: `/aw-spec-design`.
4
+
5
+ ## Observability baseline
6
+
7
+ - All services consume `AppWeaver.ServiceDefaults` (`builder.AddServiceDefaults()`):
8
+ OpenTelemetry (ASP.NET Core, HttpClient, EF Core, runtime), Serilog structured logging with
9
+ enrichment (environment/machine/thread/correlation IDs), health checks at `/health` and
10
+ `/alive`, standard HTTP resilience handlers, and Aspire service discovery.
11
+
12
+ ## Structured logging
13
+
14
+ - All logging goes through `ILogger<T>` with **message templates** (no string interpolation in
15
+ log calls).
16
+ - `Console.WriteLine`, `Debug.WriteLine`, and `System.Diagnostics.Trace` are **forbidden** in
17
+ production code.
18
+ - Log levels: Information (state transitions), Warning (recoverable anomalies), Error
19
+ (handled failures), Critical (invariant breaches). Debug/Trace MUST be safe to enable in
20
+ production.
21
+
22
+ ## Metrics & tracing
23
+
24
+ - Custom metrics follow OTel semantic conventions, registered via a single `Meter` per module.
25
+ - Trace context MUST propagate across `IMediator.Send`, `HttpClient`, and EF Core; bypassing
26
+ the framework's `HttpClientFactory` is forbidden.
27
+
28
+ ## Secrets never in telemetry
29
+
30
+ - Authentication tokens, password material, private keys, and full payment-card numbers MUST
31
+ NEVER appear in logs, metrics labels, exception messages, or trace attributes.
32
+ (Domain-sensitive data — PHI, SSN, government IDs — see [[data-classification.domain]] and
33
+ [[auditing.domain]].)
34
+
35
+ ## Immutable audit strategy (generic)
36
+
37
+ - Audit records are **append-only**: no update, no delete (no hard-delete path).
38
+ - An audit-access pipeline behavior runs on every mediator request (see [[cqrs]]).
39
+ - Audit records are retained per the applicable retention policy (see [[persistence]];
40
+ regulatory retention in [[auditing.domain]]).
41
+
42
+ ## Two auditing levels
43
+
44
+ Auditing has exactly **two levels**, chosen **per aggregate** by the marker interfaces the root
45
+ implements. The interceptor populates every audit field automatically (no manual
46
+ `CreatedOn`/`ModifiedBy` assignment in handlers):
47
+
48
+ | Level | Aggregate root implements | Captured | Depth |
49
+ |-------|---------------------------|----------|-------|
50
+ | **Basic** | `IAuditedObject` (creation+modification) or `IFullAuditedObject` (+soft-delete) | `CreatedBy/On`, `ModifiedBy/On`, `DeletedBy/On`; one `AuditLog` per root per SaveChanges | entity-level (Created/Updated/Deleted) — no before/after |
51
+ | **Advanced** | Basic markers **+ `IFieldAudited`** | Basic + field-level before/after (`PropertyChange`: original → new) | entity + property-level previous/new |
52
+
53
+ Field-level before/after values exist **only** at the Advanced tier. Children marked
54
+ `IAggregateChild` fold into the root's `AuditLog`.
55
+
56
+ ## Canonical example
57
+
58
+ The worked `<SampleProjectName>` example for these rules lives in
59
+ `guardrails/technology/dotnet-webapi/examples/auditing.md`, mapped for `design`. The
60
+ constitution set maps the rules without it.
61
+
62
+ ## Querying the audit trail (framework-provided)
63
+
64
+ The audit store is queryable out of the box via `IAuditEntity` — no bespoke read model required:
65
+
66
+ ```csharp
67
+ // by resource identity
68
+ var logs = await auditEntity.GetAuditLogsAsync(typeof(Project).FullName!, projectId.ToString());
69
+ // by user / action / time, with paging
70
+ var page = await auditEntity.GetAuditLogsAsync(new AuditLogFilter { UserId = "u1", Action = AuditAction.Updated, Take = 10 });
71
+ // by user / tenant
72
+ await auditEntity.GetAuditLogsByUserAsync("u1");
73
+ await auditEntity.GetAuditLogsByTenantAsync("tenant-alpha");
74
+ ```
75
+
76
+ Each `AuditLog` carries `{ UserId, UserName, Timestamp, Action, EntityType, EntityId, Metadata
77
+ (correlationId, …) }`; its `EntityChanges` hold entity-level `ChangeType`, and — for `IFieldAudited`
78
+ roots — nested `PropertyChanges` with `OriginalValue → NewValue`.
79
+
80
+ Observability baseline — `ServiceDefaults` (OTel + Serilog + health) wired once in `Program.cs`:
81
+
82
+ ```csharp
83
+ // <SampleProjectName>.Service/Program.cs
84
+ builder.AddServiceDefaults(); // OTel, resilience, service discovery, health
85
+ Log.Logger = new LoggerConfiguration()
86
+ .ReadFrom.Configuration(builder.Configuration)
87
+ .Enrich.FromLogContext()
88
+ .CreateLogger();
89
+ builder.Host.UseSerilog();
90
+ // ...
91
+ app.MapDefaultEndpoints(); // /health, /alive
92
+ ```
93
+
94
+ ## Related
95
+
96
+ - [[data-classification]] · [[cqrs]] · [[persistence]] · [[auditing.domain]]
@@ -0,0 +1,14 @@
1
+ # Authorization Matrix
2
+
3
+ Per-route role + SMART-scope authorization (authorization.domain). PHI endpoints are
4
+ `SecurityLevel.Restricted`, `CachePolicy.NoStore`, and emit ATNA audit records.
5
+
6
+ | Route | Method | Roles | SMART scope | Security level | Notes |
7
+ |---|---|---|---|---|---|
8
+ | `/patients` | POST | `FrontDesk`, `SystemAdmin`, `ExternalSystem` | `system/Patient.write` or `user/Patient.write` | Restricted | Register patient (PHI write). 400/409/422 per spec. |
9
+ | `/fhir/R4/Patient/{id}` | GET | `Physician`, `Nurse`, `SystemAdmin`, `ExternalSystem` | `patient/Patient.read`, `user/Patient.read`, or `patient/Patient.read.full` for un-redacted demographics | Restricted | Minimum-necessary redaction in the projection extension. |
10
+ | `/fhir/metadata` | GET | — (anonymous) | — | Public | CapabilityStatement (infra/discovery allowlist). |
11
+ | HL7 v2 MLLP ingress (ADT^A04) | MLLP | `ExternalSystem` (node-authenticated) | n/a | Restricted | Receipt ACK; async registration via canonical command. |
12
+
13
+ > The `patient/Patient.read.full` scope gates full demographics (telecom/address/secondary identifiers);
14
+ > without it the FHIR read returns identity essentials only.