aw-spec-cli 0.1.4 → 0.1.6

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 (225) hide show
  1. package/assets/.agents/agent.json +28 -0
  2. package/assets/.agents/skills/appweaver/SKILL.md +56 -0
  3. package/assets/.agents/skills/appweaver-demo/SKILL.md +59 -0
  4. package/assets/.claude/agent.json +27 -0
  5. package/assets/.claude/skills/appweaver/SKILL.md +55 -0
  6. package/assets/.claude/skills/appweaver-demo/SKILL.md +59 -0
  7. package/assets/.kilocode/agent.json +28 -0
  8. package/assets/.kilocode/workflows/appweaver-demo.md +59 -0
  9. package/assets/.kilocode/workflows/appweaver.md +55 -0
  10. package/dist/commands/init.d.ts.map +1 -1
  11. package/dist/commands/init.js +7 -54
  12. package/dist/commands/init.js.map +1 -1
  13. package/dist/index.js +0 -2
  14. package/dist/index.js.map +1 -1
  15. package/package.json +1 -1
  16. package/assets/.agents/skills/aw-spec-addcomponent/SKILL.md +0 -129
  17. package/assets/.agents/skills/aw-spec-agent-context-update/SKILL.md +0 -31
  18. package/assets/.agents/skills/aw-spec-analyze/SKILL.md +0 -296
  19. package/assets/.agents/skills/aw-spec-checklist/SKILL.md +0 -374
  20. package/assets/.agents/skills/aw-spec-clarify/SKILL.md +0 -320
  21. package/assets/.agents/skills/aw-spec-constitution/SKILL.md +0 -194
  22. package/assets/.agents/skills/aw-spec-fast-implement/SKILL.md +0 -268
  23. package/assets/.agents/skills/aw-spec-foundation/SKILL.md +0 -358
  24. package/assets/.agents/skills/aw-spec-implement/SKILL.md +0 -279
  25. package/assets/.agents/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
  26. package/assets/.agents/skills/aw-spec-plan/SKILL.md +0 -221
  27. package/assets/.agents/skills/aw-spec-select-domain/SKILL.md +0 -73
  28. package/assets/.agents/skills/aw-spec-specify/SKILL.md +0 -382
  29. package/assets/.agents/skills/aw-spec-tasks/SKILL.md +0 -259
  30. package/assets/.agents/skills/aw-spec-taskstoissues/SKILL.md +0 -107
  31. package/assets/.aw-spec/domain.json +0 -3
  32. package/assets/.aw-spec/extensions/.registry +0 -19
  33. package/assets/.aw-spec/extensions/agent-context/README.md +0 -57
  34. package/assets/.aw-spec/extensions/agent-context/agent-context-config.yml +0 -4
  35. package/assets/.aw-spec/extensions/agent-context/commands/aw-spec.agent-context.update.md +0 -26
  36. package/assets/.aw-spec/extensions/agent-context/extension.yml +0 -34
  37. package/assets/.aw-spec/extensions/agent-context/scripts/bash/update-agent-context.sh +0 -201
  38. package/assets/.aw-spec/extensions/agent-context/scripts/powershell/update-agent-context.ps1 +0 -237
  39. package/assets/.aw-spec/extensions.yml +0 -23
  40. package/assets/.aw-spec/feature.json +0 -3
  41. package/assets/.aw-spec/init-options.json +0 -9
  42. package/assets/.aw-spec/integration.json +0 -15
  43. package/assets/.aw-spec/integrations/aw-spec.manifest.json +0 -17
  44. package/assets/.aw-spec/integrations/claude.manifest.json +0 -17
  45. package/assets/.aw-spec/memory/constitution.md +0 -50
  46. package/assets/.aw-spec/scripts/bash/check-prerequisites.sh +0 -189
  47. package/assets/.aw-spec/scripts/bash/common.sh +0 -582
  48. package/assets/.aw-spec/scripts/bash/create-new-feature.sh +0 -299
  49. package/assets/.aw-spec/scripts/bash/setup-plan.sh +0 -84
  50. package/assets/.aw-spec/scripts/bash/setup-tasks.sh +0 -91
  51. package/assets/.aw-spec/templates/checklist-template.md +0 -40
  52. package/assets/.aw-spec/templates/constitution-template.md +0 -57
  53. package/assets/.aw-spec/templates/plan-template.md +0 -113
  54. package/assets/.aw-spec/templates/spec-template.md +0 -131
  55. package/assets/.aw-spec/templates/tasks-template.md +0 -252
  56. package/assets/.aw-spec/workflows/aw-spec/workflow.yml +0 -77
  57. package/assets/.aw-spec/workflows/workflow-registry.json +0 -13
  58. package/assets/.claude/skills/aw-spec-addcomponent/SKILL.md +0 -129
  59. package/assets/.claude/skills/aw-spec-agent-context-update/SKILL.md +0 -31
  60. package/assets/.claude/skills/aw-spec-analyze/SKILL.md +0 -296
  61. package/assets/.claude/skills/aw-spec-checklist/SKILL.md +0 -374
  62. package/assets/.claude/skills/aw-spec-clarify/SKILL.md +0 -320
  63. package/assets/.claude/skills/aw-spec-constitution/SKILL.md +0 -194
  64. package/assets/.claude/skills/aw-spec-fast-implement/SKILL.md +0 -268
  65. package/assets/.claude/skills/aw-spec-foundation/SKILL.md +0 -358
  66. package/assets/.claude/skills/aw-spec-implement/SKILL.md +0 -279
  67. package/assets/.claude/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
  68. package/assets/.claude/skills/aw-spec-plan/SKILL.md +0 -221
  69. package/assets/.claude/skills/aw-spec-select-domain/SKILL.md +0 -73
  70. package/assets/.claude/skills/aw-spec-specify/SKILL.md +0 -382
  71. package/assets/.claude/skills/aw-spec-tasks/SKILL.md +0 -259
  72. package/assets/.claude/skills/aw-spec-taskstoissues/SKILL.md +0 -107
  73. package/assets/.kilocode/rules/specify-rules.md +0 -4
  74. package/assets/.kilocode/workflows/aw-spec-addcomponent.md +0 -129
  75. package/assets/.kilocode/workflows/aw-spec-agent-context.update.md +0 -31
  76. package/assets/.kilocode/workflows/aw-spec-analyze.md +0 -296
  77. package/assets/.kilocode/workflows/aw-spec-checklist.md +0 -374
  78. package/assets/.kilocode/workflows/aw-spec-clarify.md +0 -320
  79. package/assets/.kilocode/workflows/aw-spec-constitution.md +0 -194
  80. package/assets/.kilocode/workflows/aw-spec-fast-implement.md +0 -263
  81. package/assets/.kilocode/workflows/aw-spec-foundation.md +0 -358
  82. package/assets/.kilocode/workflows/aw-spec-implement.md +0 -279
  83. package/assets/.kilocode/workflows/aw-spec-minimal-implementation.md +0 -204
  84. package/assets/.kilocode/workflows/aw-spec-plan.md +0 -221
  85. package/assets/.kilocode/workflows/aw-spec-select-domain.md +0 -73
  86. package/assets/.kilocode/workflows/aw-spec-specify.md +0 -382
  87. package/assets/.kilocode/workflows/aw-spec-tasks.md +0 -259
  88. package/assets/.kilocode/workflows/aw-spec-taskstoissues.md +0 -107
  89. package/assets/docs/ModularMonolith/ModularMonolith.Reference.pack.txt +0 -25248
  90. package/assets/docs/ModularMonolith/ModularMonolith.pack.txt +0 -5726
  91. package/assets/docs/ModularMonolith/pack-foundation.ps1 +0 -145
  92. package/assets/docs/ModularMonolith/pack-foundation.sh +0 -196
  93. package/assets/docs/ModularMonolith/pack-reference-foundation.ps1 +0 -157
  94. package/assets/docs/ModularMonolith/pack-reference-foundation.sh +0 -209
  95. package/assets/docs/ModularMonolith/unpack-foundation.ps1 +0 -126
  96. package/assets/docs/ModularMonolith/unpack-foundation.sh +0 -217
  97. package/assets/docs/ModularMonolith/unpack-reference-foundation.ps1 +0 -129
  98. package/assets/docs/ModularMonolith/unpack-reference-foundation.sh +0 -218
  99. package/assets/docs/README.md +0 -106
  100. package/assets/docs/UI.Visualization/PACKAGING.md +0 -191
  101. package/assets/docs/UI.Visualization/UI.Visualization.Reference.pack.txt +0 -11768
  102. package/assets/docs/UI.Visualization/UI.Visualization.pack.txt +0 -11214
  103. package/assets/docs/UI.Visualization/pack-foundation.ps1 +0 -165
  104. package/assets/docs/UI.Visualization/pack-foundation.sh +0 -206
  105. package/assets/docs/UI.Visualization/pack-reference-foundation.ps1 +0 -159
  106. package/assets/docs/UI.Visualization/pack-reference-foundation.sh +0 -205
  107. package/assets/docs/UI.Visualization/unpack-foundation.ps1 +0 -126
  108. package/assets/docs/UI.Visualization/unpack-foundation.sh +0 -217
  109. package/assets/docs/UI.Visualization/unpack-reference-foundation.ps1 +0 -129
  110. package/assets/docs/UI.Visualization/unpack-reference-foundation.sh +0 -218
  111. package/assets/docs/VerticalSlice/PACKAGING.md +0 -185
  112. package/assets/docs/VerticalSlice/VerticalSlice.Reference.pack.txt +0 -19318
  113. package/assets/docs/VerticalSlice/VerticalSlice.pack.txt +0 -2833
  114. package/assets/docs/VerticalSlice/pack-foundation.ps1 +0 -145
  115. package/assets/docs/VerticalSlice/pack-foundation.sh +0 -196
  116. package/assets/docs/VerticalSlice/pack-reference-foundation.ps1 +0 -157
  117. package/assets/docs/VerticalSlice/pack-reference-foundation.sh +0 -209
  118. package/assets/docs/VerticalSlice/unpack-foundation.ps1 +0 -126
  119. package/assets/docs/VerticalSlice/unpack-foundation.sh +0 -217
  120. package/assets/docs/VerticalSlice/unpack-reference-foundation.ps1 +0 -129
  121. package/assets/docs/VerticalSlice/unpack-reference-foundation.sh +0 -218
  122. package/assets/docs/architecture/clean-architecture.md +0 -71
  123. package/assets/docs/architecture/cqrs.md +0 -141
  124. package/assets/docs/architecture/eventing.md +0 -83
  125. package/assets/docs/architecture/folder-structure.md +0 -61
  126. package/assets/docs/architecture/modular-monolith.md +0 -47
  127. package/assets/docs/architecture/persistence.md +0 -269
  128. package/assets/docs/architecture/testing.md +0 -55
  129. package/assets/docs/architecture/vertical-slices.md +0 -201
  130. package/assets/docs/command.txt +0 -295
  131. package/assets/docs/components/Email/README.md +0 -119
  132. package/assets/docs/components/Email/ReferenceEndpoints/SendEmailEndpoint.cs +0 -84
  133. package/assets/docs/components/Email/integration.md +0 -300
  134. package/assets/docs/components/Jobs/README.md +0 -113
  135. package/assets/docs/components/Jobs/integration.md +0 -259
  136. package/assets/docs/components/QrGenerator/README.md +0 -85
  137. package/assets/docs/components/QrGenerator/ReferenceEndpoints/GenerateQrEndpoint.cs +0 -57
  138. package/assets/docs/components/QrGenerator/integration.md +0 -230
  139. package/assets/docs/components/README.md +0 -74
  140. package/assets/docs/domain/domain-driven-design.md +0 -212
  141. package/assets/docs/domainspecs/UIVisualization/chart-bubble.md +0 -70
  142. package/assets/docs/domainspecs/UIVisualization/chart-dimred.md +0 -58
  143. package/assets/docs/domainspecs/UIVisualization/chart-heatmap.md +0 -62
  144. package/assets/docs/domainspecs/UIVisualization/chart-network.md +0 -69
  145. package/assets/docs/domainspecs/UIVisualization/chart-parallel.md +0 -75
  146. package/assets/docs/domainspecs/UIVisualization/chart-scurve.md +0 -66
  147. package/assets/docs/domainspecs/UIVisualization/chart-survival.md +0 -69
  148. package/assets/docs/domainspecs/UIVisualization/chart-trellis.md +0 -68
  149. package/assets/docs/domainspecs/UIVisualization/chart-violin.md +0 -61
  150. package/assets/docs/domainspecs/UIVisualization/chart-volcano.md +0 -63
  151. package/assets/docs/domainspecs/UIVisualization/charting-standards.domain.md +0 -80
  152. package/assets/docs/domainspecs/UIVisualization/clean-architecture.domain.md +0 -87
  153. package/assets/docs/domainspecs/UIVisualization/coding-standards.domain.md +0 -47
  154. package/assets/docs/domainspecs/UIVisualization/comandrulemap.md +0 -130
  155. package/assets/docs/domainspecs/UIVisualization/component-contracts.domain.md +0 -67
  156. package/assets/docs/domainspecs/UIVisualization/data-source.domain.md +0 -68
  157. package/assets/docs/domainspecs/UIVisualization/domain-requirements.md +0 -110
  158. package/assets/docs/domainspecs/UIVisualization/folder-structure.domain.md +0 -55
  159. package/assets/docs/domainspecs/UIVisualization/state-management.domain.md +0 -67
  160. package/assets/docs/domainspecs/UIVisualization/testing.domain.md +0 -52
  161. package/assets/docs/domainspecs/UIVisualization/ui-viz-terms.md +0 -39
  162. package/assets/docs/domainspecs/healthcare/ai-rules.domain.md +0 -34
  163. package/assets/docs/domainspecs/healthcare/api-versioning.domain.md +0 -17
  164. package/assets/docs/domainspecs/healthcare/auditing.domain.md +0 -29
  165. package/assets/docs/domainspecs/healthcare/authorization.domain.md +0 -26
  166. package/assets/docs/domainspecs/healthcare/clinical-terms.md +0 -20
  167. package/assets/docs/domainspecs/healthcare/coding-standards.domain.md +0 -26
  168. package/assets/docs/domainspecs/healthcare/comandrulemap.md +0 -166
  169. package/assets/docs/domainspecs/healthcare/consent.md +0 -19
  170. package/assets/docs/domainspecs/healthcare/cqrs.domain.md +0 -12
  171. package/assets/docs/domainspecs/healthcare/data-classification.domain.md +0 -28
  172. package/assets/docs/domainspecs/healthcare/dependency-policy.domain.md +0 -11
  173. package/assets/docs/domainspecs/healthcare/dicom.md +0 -15
  174. package/assets/docs/domainspecs/healthcare/domain-driven-design.domain.md +0 -28
  175. package/assets/docs/domainspecs/healthcare/domain-requirements.md +0 -55
  176. package/assets/docs/domainspecs/healthcare/eventing.domain.md +0 -18
  177. package/assets/docs/domainspecs/healthcare/fhir.md +0 -36
  178. package/assets/docs/domainspecs/healthcare/folder-structure.domain.md +0 -23
  179. package/assets/docs/domainspecs/healthcare/hipaa.md +0 -34
  180. package/assets/docs/domainspecs/healthcare/hl7.md +0 -15
  181. package/assets/docs/domainspecs/healthcare/integration-terms.md +0 -21
  182. package/assets/docs/domainspecs/healthcare/persistence.domain.md +0 -20
  183. package/assets/docs/domainspecs/healthcare/terminology.md +0 -30
  184. package/assets/docs/domainspecs/healthcare/testing.domain.md +0 -15
  185. package/assets/docs/domainspecs/healthcare/vertical-slices.domain.md +0 -18
  186. package/assets/docs/domainspecs/healthcare/zero-trust.domain.md +0 -12
  187. package/assets/docs/domainspecs/pharma/ai-rules.domain.md +0 -32
  188. package/assets/docs/domainspecs/pharma/api-versioning.domain.md +0 -20
  189. package/assets/docs/domainspecs/pharma/atc.md +0 -22
  190. package/assets/docs/domainspecs/pharma/auditing.domain.md +0 -26
  191. package/assets/docs/domainspecs/pharma/authorization.domain.md +0 -25
  192. package/assets/docs/domainspecs/pharma/coding-standards.domain.md +0 -28
  193. package/assets/docs/domainspecs/pharma/comandrulemap.md +0 -186
  194. package/assets/docs/domainspecs/pharma/cqrs.domain.md +0 -16
  195. package/assets/docs/domainspecs/pharma/data-classification.domain.md +0 -24
  196. package/assets/docs/domainspecs/pharma/data-provenance.md +0 -21
  197. package/assets/docs/domainspecs/pharma/dependency-policy.domain.md +0 -11
  198. package/assets/docs/domainspecs/pharma/domain-driven-design.domain.md +0 -36
  199. package/assets/docs/domainspecs/pharma/domain-requirements.md +0 -99
  200. package/assets/docs/domainspecs/pharma/eventing.domain.md +0 -18
  201. package/assets/docs/domainspecs/pharma/fhir.md +0 -31
  202. package/assets/docs/domainspecs/pharma/folder-structure.domain.md +0 -24
  203. package/assets/docs/domainspecs/pharma/hl7.md +0 -17
  204. package/assets/docs/domainspecs/pharma/idmp.md +0 -26
  205. package/assets/docs/domainspecs/pharma/integration-terms.md +0 -21
  206. package/assets/docs/domainspecs/pharma/ndc.md +0 -28
  207. package/assets/docs/domainspecs/pharma/persistence.domain.md +0 -23
  208. package/assets/docs/domainspecs/pharma/pharma-terms.md +0 -27
  209. package/assets/docs/domainspecs/pharma/product-lifecycle.domain.md +0 -30
  210. package/assets/docs/domainspecs/pharma/regulatory-compliance.md +0 -19
  211. package/assets/docs/domainspecs/pharma/terminology.md +0 -32
  212. package/assets/docs/domainspecs/pharma/testing.domain.md +0 -19
  213. package/assets/docs/domainspecs/pharma/vertical-slices.domain.md +0 -17
  214. package/assets/docs/domainspecs/pharma/zero-trust.domain.md +0 -12
  215. package/assets/docs/glossary/ai-rules.md +0 -59
  216. package/assets/docs/governance/api-versioning.md +0 -99
  217. package/assets/docs/governance/coding-standards.md +0 -87
  218. package/assets/docs/governance/dependency-policy.md +0 -40
  219. package/assets/docs/interop/ihe-conformance.md +0 -31
  220. package/assets/docs/security/auditing.md +0 -117
  221. package/assets/docs/security/authorization-matrix.md +0 -14
  222. package/assets/docs/security/authorization.md +0 -87
  223. package/assets/docs/security/data-classification.md +0 -38
  224. package/assets/docs/security/zero-trust.md +0 -76
  225. package/assets/docs/technology-constitution.md +0 -172
@@ -1,87 +0,0 @@
1
- # Authorization Standards
2
-
3
- > Pure technology (domain-agnostic) — domain roles & matrix in [[authorization.domain]]. NON-NEGOTIABLE. Commands: `/aw-spec-plan`, `/aw-spec-tasks`, `/aw-spec-implement`.
4
-
5
- ## Authorization model
6
-
7
- - Authorization is **role-based AND scope-based** — both MUST pass.
8
- - Per-route authorization is declared per endpoint via `Roles(...)` + scope evaluation,
9
- documented in an authorization matrix.
10
- - Identity comes from an external IdP via `.AddAppWeaverSecurity(...)` — local identity stores
11
- forbidden (see [[zero-trust]]).
12
- - (The concrete role set and scope syntax are domain-specific — see [[authorization.domain]].)
13
-
14
- ## Policy evaluation
15
-
16
- - Endpoints inherit `SecureFastEndpoint<TRequest, TResponse>` and MUST override
17
- `GetSecurityCachePolicy()` to declare `SecurityLevel` and `CachePolicy`.
18
- - Mutating endpoints MUST use `CachePolicy.NoStore`.
19
- - Sensitive-data read endpoints MUST use `CachePolicy.NoStore`.
20
- - Field-level redaction (minimum-necessary) lives in **projection extensions**, not
21
- controllers (see [[data-classification]]; domain specifics in [[authorization.domain]]).
22
-
23
- ## Endpoint authorization patterns
24
-
25
- - `AllowAnonymous()` is permitted **only** for infrastructure/discovery endpoints
26
- (`/.well-known`, `/health`, `/alive`, service metadata) and during initial scaffolding
27
- before merge to a protected branch.
28
- - `AllowAnonymous()` on sensitive-data or mutating endpoints in any CI-protected branch is a
29
- Forbidden Pattern (CI grep gate; see [[coding-standards]]).
30
-
31
- ## Canonical example (agent reference — `<SampleProjectName>` sample)
32
-
33
- Secure endpoint — declare auth scheme + roles in `Configure()`, and the security/cache policy
34
- in `GetSecurityCachePolicy()`:
35
-
36
- ```csharp
37
- public override void Configure()
38
- {
39
- Post("/projects");
40
- AuthSchemes("Bearer"); // JWT from the external IdP
41
- Roles("Admin"); // role-based gate (combine with scope checks for FHIR — see .domain)
42
- Summary(s => s.Summary = "Create a new project");
43
- Options(o => o.WithTags("02 - Project - (FastEndpoints)"));
44
- }
45
-
46
- protected override SecurityCachePolicy GetSecurityCachePolicy() => new()
47
- {
48
- SecurityLevel = SecurityLevel.Internal, // Internal | Restricted (admin/sensitive)
49
- CachePolicy = CachePolicy.NoStore // NoStore for mutating/sensitive; PrivateCache for cacheable reads
50
- };
51
- ```
52
-
53
- > Mutating endpoints use `CachePolicy.NoStore`. Admin/audit endpoints (e.g. list-including-deleted)
54
- > use `SecurityLevel.Restricted`. `AllowAnonymous()` is only for infrastructure/discovery routes
55
- > or pre-merge scaffolding (the template ships endpoints scaffolded with `AllowAnonymous()` and
56
- > the `AuthSchemes`/`Roles` lines commented — replace them before merging to a protected branch).
57
-
58
- Composition — external IdP only (no local identity store), role-based authorization:
59
-
60
- ```csharp
61
- // <SampleProjectName>.Service/Program.cs
62
- builder.Services.AddAppWeaverSecurity(security =>
63
- {
64
- security
65
- .AddAuthentication(auth =>
66
- {
67
- if (authProvider == "EntraExternalID")
68
- auth.UseEntraExternalID(o => { o.TenantId = cfg["EntraExternalID:TenantId"]!;
69
- o.ClientId = cfg["EntraExternalID:ClientId"]!; }, cfg);
70
- else
71
- auth.UseAzureAdB2C(o => { o.Domain = cfg["AzureAdB2C:Domain"]!;
72
- o.ClientId = cfg["AzureAdB2C:ClientId"]!;
73
- o.SignUpSignInPolicyId = cfg["AzureAdB2C:SignUpSignInPolicyId"]!; }, cfg);
74
- })
75
- .AddAuthorization(authz => authz.UseRoleBased(o => o.AdminRole = "Admin"));
76
- // NOTE: no .AddIdentity(...) — the IdP is the source of truth (see [[zero-trust]])
77
- }, options => { }, configuration: cfg);
78
-
79
- // ... pipeline order ...
80
- app.UseAuthentication();
81
- app.UseAuthorization();
82
- app.UseFastEndpoints();
83
- ```
84
-
85
- ## Related
86
-
87
- - [[zero-trust]] · [[auditing]] · [[data-classification]] · [[authorization.domain]]
@@ -1,38 +0,0 @@
1
- # Data Classification Standards
2
-
3
- > Pure technology (domain-agnostic) — domain data categories in [[data-classification.domain]]. NON-NEGOTIABLE. Commands: `/aw-spec-specify`, `/aw-spec-plan`, `/aw-spec-implement`.
4
-
5
- ## Classification framework
6
-
7
- - Every data element is assigned a **sensitivity class**; controls (encryption, masking,
8
- logging, export) are applied per class.
9
- - The concrete sensitivity taxonomy is project/domain-specific — see
10
- [[data-classification.domain]] for the domain taxonomy.
11
-
12
- ## Masking rules
13
-
14
- - Field-level redaction is applied in **projection extensions**, not controllers
15
- (minimum-necessary by role/scope — see [[authorization]]).
16
-
17
- ## Encryption requirements
18
-
19
- - AES-256 at rest (DB TDE + customer-managed key); TLS 1.2+ in transit (1.3 target);
20
- encrypted backups.
21
- - **Application-level field encryption** for the most sensitive fields (the concrete field
22
- list is domain-specific — see [[data-classification.domain]]).
23
-
24
- ## Logging restrictions
25
-
26
- - **NEVER** log or emit in metrics/traces: authentication tokens, password material, private
27
- keys, or full payment-card data.
28
- (Domain-sensitive elements — PHI, SSN, government IDs — see [[data-classification.domain]].)
29
-
30
- ## Export restrictions
31
-
32
- - Production data MUST NOT be copied to non-production environments without an approved
33
- de-identification / anonymization step.
34
- - (Domain de-identification / anonymization specifics — see [[data-classification.domain]].)
35
-
36
- ## Related
37
-
38
- - [[auditing]] · [[authorization]] · [[zero-trust]] · [[data-classification.domain]]
@@ -1,76 +0,0 @@
1
- # Zero-Trust Standards
2
-
3
- > Pure technology (domain-agnostic) — domain additions in [[zero-trust.domain]]. NON-NEGOTIABLE where marked. Commands: `/aw-spec-plan`, `/aw-spec-implement`.
4
-
5
- ## Transport security (mTLS / TLS)
6
-
7
- - HTTPS is enforced; **TLS 1.2 is the floor, TLS 1.3 the target**.
8
- - CORS uses **explicit allow-lists** — no wildcards.
9
-
10
- ## Workload identity
11
-
12
- - Identity is composed via `.AddAppWeaverSecurity(...)` with an **external IdP**.
13
- - **Local identity stores are FORBIDDEN.**
14
-
15
- ## Service authentication
16
-
17
- - Backing services and the IdP are declared as Aspire resources; connection strings,
18
- hostnames, and ports are **discovered through Aspire — never hard-coded**.
19
-
20
- ## Token propagation
21
-
22
- - Tokens / scopes are propagated through the request pipeline and honored on every endpoint
23
- (see [[authorization]]).
24
- - Trace context propagates across `IMediator.Send`, `HttpClient`, and EF Core — bypassing the
25
- framework `HttpClientFactory` is forbidden.
26
-
27
- ## Internal authorization
28
-
29
- - Authorization is **role-based AND scope-based** — both enforced (see [[authorization]]).
30
- - Authentication tokens, password material, and private keys MUST NEVER appear in logs,
31
- metrics, traces, or error messages (see [[data-classification]]).
32
-
33
- ## Secrets
34
-
35
- - Secrets MUST come from **Aspire parameters** or a secrets manager (e.g. Azure Key Vault,
36
- AWS Secrets Manager, HashiCorp Vault) — **NEVER from `appsettings.json`**.
37
- - Hard-coded connection strings, secrets, ports, or issuer URLs in source are a Forbidden
38
- Pattern (see [[coding-standards]]).
39
-
40
- ## Canonical example (agent reference — `<SampleProjectName>` sample)
41
-
42
- Secrets/IdP config read from configuration (Aspire parameters / secrets manager) — never
43
- hard-coded; explicit CORS allow-list; HTTPS enforced outside development:
44
-
45
- ```csharp
46
- // <SampleProjectName>.Service/Program.cs
47
- var cfg = builder.Configuration;
48
-
49
- // IdP settings come from config — no client secrets or issuer URLs in source (see [[authorization]])
50
- builder.Services.AddAppWeaverSecurity(security => security
51
- .AddAuthentication(auth => auth.UseAzureAdB2C(o =>
52
- {
53
- o.Instance = cfg["AzureAdB2C:Instance"]!;
54
- o.Domain = cfg["AzureAdB2C:Domain"]!;
55
- o.ClientId = cfg["AzureAdB2C:ClientId"]!;
56
- }, cfg))
57
- .AddAuthorization(authz => authz.UseRoleBased(o => o.AdminRole = "Admin")),
58
- options => { }, configuration: cfg);
59
-
60
- // Explicit CORS allow-list — no wildcards
61
- builder.Services.AddCors(o => o.AddPolicy("DevelopmentPolicy", p => p
62
- .WithOrigins("http://localhost:7000", "http://localhost:3000")
63
- .AllowAnyMethod().AllowAnyHeader().AllowCredentials()));
64
-
65
- var app = builder.Build();
66
- app.UseCors("DevelopmentPolicy");
67
- app.UseAuthentication();
68
- app.UseAuthorization();
69
-
70
- if (!app.Environment.IsEnvironment("Development"))
71
- app.UseHttpsRedirection(); // enforce HTTPS outside dev
72
- ```
73
-
74
- ## Related
75
-
76
- - [[authorization]] · [[auditing]] · [[data-classification]] · [[zero-trust.domain]]
@@ -1,172 +0,0 @@
1
- # Technology Constitution (domain-agnostic base)
2
-
3
- > **AppWeaver template — reusable engineering constitution.**
4
- > This file holds the technology-only principles. It is **not ratified on its own** — it is
5
- > composed with exactly **one** domain addenda file at ratification time.
6
-
7
- ## How to use (compose-at-ratification)
8
-
9
- This file is **auto-loaded** by `/aw-spec-constitution` (it is in that command's auto-loaded
10
- engineering-standards set). You therefore pass only the **domain addenda**, which composes on
11
- top of this base:
12
-
13
- ```
14
- /aw-spec-constitution @docs/healthcare-constitution.md
15
- /aw-spec-constitution @docs/pharma-constitution.md
16
- ```
17
-
18
- `/aw-spec-constitution` merges the auto-loaded technology base with the supplied domain addenda
19
- into the single ratified `.aw-spec/memory/constitution.md` (auto-loaded by every command
20
- thereafter). Passing `@docs/technology-constitution.md` explicitly is harmless but redundant.
21
-
22
- - Core Principles **I–XV** below are domain-agnostic and reused verbatim across every project.
23
- - **PROJECT IDENTITY**, **REGULATORY REGIME**, domain principles (**XVI+**), folder additions,
24
- and governance-override values are **supplied by the domain addenda file** — do not fill them
25
- here.
26
- - Paths below use this repo's `docs/...` root. In a generated solution where the
27
- engineering-standards docs live under `code/docs/...`, adjust the prefix accordingly.
28
-
29
- Treat this content as the canonical, supreme engineering authority that supersedes README,
30
- CLAUDE.md, AGENTS.md, and any other guidance. The detailed rules for each principle live in the
31
- engineering-standards docs under `docs/` (see the Context-Loading Map at the end); this
32
- file stays slim and authoritative.
33
-
34
- ## Project Identity
35
-
36
- *Supplied by the domain addenda file.* Project name, mission, bounded contexts, regulatory
37
- regime, data residency, and architecture posture are provided by the composed domain addenda
38
- file (`docs/<domain>-constitution.md`). The technology base stays domain-agnostic.
39
-
40
- ## Runtime Style
41
-
42
- A Modular Monolith built to evolve into independent services. It combines Clean Architecture,
43
- Domain-Driven Design, CQRS + Mediator, Vertical Slice feature organization, and
44
- Specification-Driven Development. Cross-cutting concerns are delegated to the AppWeaver
45
- framework family; business logic lives inside aggregates inside their owning module.
46
-
47
- ## Core Principles (domain-agnostic)
48
-
49
- > Essence only — full rules in `docs/`, see the map below.
50
-
51
- ### I — Modular Monolith with Vertical Slices (NON-NEGOTIABLE)
52
- Single deployable service partitioned into modules; each module = Domain/Features/Persistence/Shared; each feature is a self-contained vertical slice; no cross-module Domain coupling; no horizontal service layers.
53
- → `docs/architecture/modular-monolith.md`, `vertical-slices.md`
54
-
55
- ### II — Clean Architecture Dependency Rule (NON-NEGOTIABLE)
56
- Dependencies flow inward: API → Application → Domain ← Infrastructure. Domain is framework-agnostic; endpoints call `IMediator`, never repositories/DbContext.
57
- → `docs/architecture/clean-architecture.md`
58
-
59
- ### III — Domain-Driven Design with Rich Aggregates (NON-NEGOTIABLE)
60
- Access entities through aggregate roots; strongly-typed Vogen IDs; sealed validating value objects; immutable domain events; invariants enforced in the aggregate; transaction boundary = aggregate boundary.
61
- → `docs/domain/domain-driven-design.md`
62
-
63
- ### IV — CQRS via Mediator with Result Pattern (NON-NEGOTIABLE)
64
- All logic dispatched via AppWeaver.Mediator; commands/queries return `Result<T>`; errors are `Result.Failure` (not exceptions); writes run in a transaction and publish domain events.
65
- → `docs/architecture/cqrs.md`
66
-
67
- ### V — Specification-Driven Persistence (NON-NEGOTIABLE)
68
- Query composition lives in Domain Specifications; no ad-hoc LINQ in handlers; no cross-aggregate EF navigation joins; reference parents by strongly-typed ID.
69
- → `docs/architecture/persistence.md`
70
-
71
- ### VI — Immutable Contracts at the Edge
72
- Shared DTOs mapped with hand-written `ToDto()`; no reflection mappers; `RowVersionBase64` on concurrency-tracked DTOs; standard `PagedResult<T>`; external projections stay parallel.
73
- → `docs/architecture/vertical-slices.md`
74
-
75
- ### VII — Optimistic Concurrency via ETag / If-Match (NON-NEGOTIABLE)
76
- Mutable aggregates implement `IConcurrencyTracked`; ETag set on every create/read/update; `If-Match` required on update/delete; mismatch → 409 `concurrency.conflict`.
77
- → `docs/architecture/persistence.md`, `docs/governance/api-versioning.md`
78
-
79
- ### VIII — Multi-Provider, Multi-Tenant Persistence
80
- Provider-aware `ContextAwareDbContext`; PostgreSQL production / SQLite dev (non-sensitive); client-managed concurrency tokens; cross-cutting soft-delete/tenant/audit behaviors; hard delete forbidden for retention-protected data.
81
- → `docs/architecture/persistence.md`
82
-
83
- ### IX — Security by Default (NON-NEGOTIABLE)
84
- `SecureFastEndpoint` + declared cache policy; external IdP only (no local identity); role-based **and** scope-based auth; secrets from a manager not appsettings; TLS 1.2+; explicit CORS; sensitive data encrypted in transit and at rest (CMK).
85
- → `docs/security/zero-trust.md`, `authorization.md`, `data-classification.md`
86
-
87
- ### X — Observability is a First-Class Citizen (NON-NEGOTIABLE)
88
- AppWeaver.ServiceDefaults (OTel + Serilog + health + resilience + discovery); `ILogger` message templates only; never log secrets/regulated data; every sensitive read/mutation emits an audit record; trace context propagates everywhere.
89
- → `docs/security/auditing.md`, `data-classification.md`
90
-
91
- ### XI — Cloud-Native Orchestration via .NET Aspire
92
- AppHost is the composition root; backing services are Aspire resources referenced via `.WithReference(...)`; no hard-coded connection strings/ports; Helm stays in sync with the AppHost projection.
93
- → `docs/security/zero-trust.md`, `architecture/eventing.md`
94
-
95
- ### XII — REST API Standards
96
- Internal REST (FastEndpoints, one endpoint/file, kebab routes); standard paging; versioned breaking changes; machine-readable contracts (OpenAPI). Domain interoperability surfaces (e.g. FHIR) are added by the domain addenda.
97
- → `docs/governance/api-versioning.md`, `architecture/vertical-slices.md`
98
-
99
- ### XIII — Test-First Engineering
100
- Tests for every aggregate behavior/value object/specification/handler/endpoint; deterministic (`IClock`/`IGuidGenerator`); contract changes ship with test updates in the same commit.
101
- → `docs/architecture/testing.md`
102
-
103
- ### XIV — Data Integration Layer / Single Source of Truth (NON-NEGOTIABLE)
104
- Authoritative system of record; consumers use the REST API / published projections / CloudEvents only; no direct DB access; inbound feeds flow through Interop adapters; versioned machine-readable schemas.
105
- → `docs/architecture/eventing.md`, `docs/governance/api-versioning.md`
106
-
107
- ### XV — Evolutionary Path to Microservices
108
- Modules own their aggregates/persistence/DTOs/projectors/events; cross-module access via Shared DTOs or `IMediator`; per-module schemas recommended; extraction approved by amendment.
109
- → `docs/architecture/modular-monolith.md`
110
-
111
- > **Domain principles (XVI and beyond) are supplied by the domain addenda file.**
112
-
113
- ## Mandatory Folder Structure
114
-
115
- Governed by the engineering-standards docs; this file does not duplicate the tree.
116
-
117
- - Technology layout (src/tests/helm/docs, module = Domain/Features/Persistence/Shared): `docs/architecture/folder-structure.md`
118
- - Domain-specific additions (Interop adapters, domain test fixtures, regulatory controls): supplied by the domain addenda + `docs/domainspecs/<domain>/folder-structure.domain.md`
119
-
120
- Project names use the `<SampleProjectName>` placeholder. Cross-cutting files (`Program.cs`, `GlobalUsings.cs`, `Directory.Build.props`, `Directory.Packages.props`, `global.json`) MUST stay at the same level they occupy in the AppWeaver template.
121
-
122
- ## Conventions, Forbidden Patterns, AI Rules, Quality Gates
123
-
124
- These are governed in full by the engineering-standards docs; this file does not duplicate them.
125
-
126
- - Naming & coding conventions, the Forbidden Patterns, and the CI Quality Gates: `docs/governance/coding-standards.md`
127
- - Package governance (approved/banned packages, supply-chain, licensing): `docs/governance/dependency-policy.md`
128
- - AI operational rules (generation, context loading, refusal conditions): `docs/glossary/ai-rules.md` (the domain addenda extends this with domain-specific masking / code / refusal rules)
129
-
130
- ## Governance
131
-
132
- - This constitution supersedes all other engineering documentation in the repository (README.md, CLAUDE.md, AGENTS.md, wiki pages). Where they disagree, this document wins. The `docs/` engineering standards are the authorized expansion of these principles; if a doc contradicts a principle here, this file wins and the doc is corrected.
133
- - Amendments are proposed via pull request that modifies `.aw-spec/memory/constitution.md` (and the affected `docs/` files), includes a migration plan for non-compliant code, bumps the version per the policy below, and is approved per the roles named in the domain addenda's Governance Overrides (at minimum one Principal Engineer + the domain's mandatory approver).
134
- - Versioning follows SemVer applied to governance:
135
- - **MAJOR** — removal or weakening of a NON-NEGOTIABLE principle, or a backward-incompatible change to the Mandatory Folder Structure or a domain's canonical interoperability surface.
136
- - **MINOR** — addition of a new principle, new mandatory section, or new bounded context.
137
- - **PATCH** — clarifications, wording fixes, non-semantic edits.
138
- - Compliance review happens on every PR. Reviewers MUST cite the principle number when requesting changes.
139
- - A quarterly architecture and security review MUST audit a random sample of modules against this constitution and file remediation tickets for any deviation.
140
- - Runtime guidance (CLAUDE.md / AGENTS.md) MUST contain a single pointer to this constitution and MUST NOT duplicate or paraphrase its rules.
141
- - Domain-specific governance overrides (approver roles, regulatory review triggers, control mappings) are supplied by the domain addenda file.
142
-
143
- ## Context-Loading Map
144
-
145
- > Include only the relevant docs per AW-Spec command. Full index: `docs/README.md`.
146
-
147
- **Doc naming convention (technology vs. domain):**
148
-
149
- - `docs/<area>/<name>.md` = **pure technology** rule, domain-agnostic — reusable across any project. **Loaded automatically** by each AW-Spec command (see the command's SKILL.md); you do not pass them by hand.
150
- - `docs/domainspecs/<domain>/<name>.md` and `<name>.domain.md` = **domain-specific** rules under one folder. The `.domain.md` files extend the matching technology file; the plain `.md` files are inherently domain.
151
-
152
- **Per-command file map** (technical default that auto-loads vs. domain files to add):
153
-
154
- - Technical defaults: the *Auto-Loaded Engineering Standards* section in each `.claude/skills/aw-spec-<command>/SKILL.md` (authoritative).
155
- - Domain files: the active domain's `docs/domainspecs/<domain>/comandrulemap.md`.
156
-
157
- Rule of thumb: technology standards auto-load; add only the domain files listed in the active domain's `comandrulemap.md` for the slice you are building.
158
-
159
- ## Domain Requirements
160
-
161
- Project-specific and maintained separately so it can be updated independently per project:
162
- → `docs/domainspecs/<domain>/domain-requirements.md` (named by the domain addenda file)
163
-
164
- This holds `[DOMAIN: Bounded Contexts / Modules]`, the per-subsection pointers into `docs/`, `[DOMAIN: Platform Topology]`, and `[DOMAIN: Governance Overrides]`. The technology base above stays domain-agnostic.
165
-
166
- ## Ratification Metadata
167
-
168
- > Finalized by the composed domain addenda.
169
-
170
- - **Version:** 1.0.0
171
- - **Ratified:** `<YYYY-MM-DD>`
172
- - **Last Amended:** `<YYYY-MM-DD>`