aw-spec-cli 0.1.5 → 0.1.7

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 (205) hide show
  1. package/assets/.agents/agent.json +1 -1
  2. package/assets/.agents/skills/{aw-spec-orch → appweaver}/SKILL.md +10 -10
  3. package/assets/.agents/skills/{aw-spec-orch-demo → appweaver-demo}/SKILL.md +9 -9
  4. package/assets/.claude/agent.json +1 -1
  5. package/assets/.claude/skills/{aw-spec-orch → appweaver}/SKILL.md +10 -10
  6. package/assets/.claude/skills/{aw-spec-orch-demo → appweaver-demo}/SKILL.md +9 -9
  7. package/assets/.kilocode/agent.json +1 -1
  8. package/assets/.kilocode/workflows/{aw-spec-orch-demo.md → appweaver-demo.md} +9 -9
  9. package/assets/.kilocode/workflows/{aw-spec-orch.md → appweaver.md} +10 -10
  10. package/assets/docs/pharma-constitution.my-ref.md +86 -0
  11. package/dist/utils/paths.js +1 -1
  12. package/dist/utils/paths.js.map +1 -1
  13. package/package.json +1 -1
  14. package/assets/.aw-spec/DESIGN-FORMAT.md +0 -151
  15. package/assets/.aw-spec/ORCH-DIALECT.md +0 -156
  16. package/assets/.aw-spec/RULE-PARTITION.md +0 -126
  17. package/assets/.aw-spec/domain.json +0 -3
  18. package/assets/.aw-spec/extensions/.registry +0 -19
  19. package/assets/.aw-spec/extensions/agent-context/README.md +0 -57
  20. package/assets/.aw-spec/extensions/agent-context/agent-context-config.yml +0 -4
  21. package/assets/.aw-spec/extensions/agent-context/commands/aw-spec.agent-context.update.md +0 -26
  22. package/assets/.aw-spec/extensions/agent-context/extension.yml +0 -37
  23. package/assets/.aw-spec/extensions/agent-context/scripts/bash/update-agent-context.sh +0 -201
  24. package/assets/.aw-spec/extensions/agent-context/scripts/powershell/update-agent-context.ps1 +0 -237
  25. package/assets/.aw-spec/extensions.yml +0 -16
  26. package/assets/.aw-spec/feature.json +0 -3
  27. package/assets/.aw-spec/init-options.json +0 -9
  28. package/assets/.aw-spec/integration.json +0 -15
  29. package/assets/.aw-spec/integrations/aw-spec.manifest.json +0 -9
  30. package/assets/.aw-spec/interpreter/run-skill.py +0 -1158
  31. package/assets/.aw-spec/memory/constitution.md +0 -50
  32. package/assets/.aw-spec/orchestrator/AGENT-PROFILE.md +0 -94
  33. package/assets/.aw-spec/orchestrator/README.md +0 -300
  34. package/assets/.aw-spec/orchestrator/adapters/claude_agent_sdk.py +0 -74
  35. package/assets/.aw-spec/orchestrator/adapters/google_antigravity.py +0 -74
  36. package/assets/.aw-spec/orchestrator/modules/delta-design.orch.yaml +0 -105
  37. package/assets/.aw-spec/orchestrator/modules/delta-spec.orch.yaml +0 -79
  38. package/assets/.aw-spec/orchestrator/modules/domain-select.orch.yaml +0 -81
  39. package/assets/.aw-spec/orchestrator/modules/tech-select.orch.yaml +0 -75
  40. package/assets/.aw-spec/orchestrator/orchestrator.py +0 -1721
  41. package/assets/.aw-spec/orchestrator/rev-templates/ai-rules.reference.md +0 -40
  42. package/assets/.aw-spec/orchestrator/rev-templates/comandrulemap.skeleton.md +0 -59
  43. package/assets/.aw-spec/orchestrator/rev-templates/commandtechrulemap.skeleton.md +0 -97
  44. package/assets/.aw-spec/orchestrator/rev-templates/domain-constitution.skeleton.md +0 -61
  45. package/assets/.aw-spec/orchestrator/rev-templates/domain-requirements.skeleton.md +0 -48
  46. package/assets/.aw-spec/orchestrator/rev-templates/domain-rule-file.skeleton.md +0 -39
  47. package/assets/.aw-spec/orchestrator/rev-templates/technical-constitution.skeleton.md +0 -106
  48. package/assets/.aw-spec/orchestrator/rev-templates/technical-rule-file.skeleton.md +0 -54
  49. package/assets/.aw-spec/orchestrator/workflows/_smoke.orch.yaml +0 -160
  50. package/assets/.aw-spec/orchestrator/workflows/aw-spec-add-component.orch.yaml +0 -244
  51. package/assets/.aw-spec/orchestrator/workflows/aw-spec-adopt.orch.yaml +0 -775
  52. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +0 -248
  53. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +0 -261
  54. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +0 -425
  55. package/assets/.aw-spec/orchestrator/workflows/aw-spec-build.orch.yaml +0 -188
  56. package/assets/.aw-spec/orchestrator/workflows/aw-spec-characterize.orch.yaml +0 -474
  57. package/assets/.aw-spec/orchestrator/workflows/aw-spec-close-delta.orch.yaml +0 -181
  58. package/assets/.aw-spec/orchestrator/workflows/aw-spec-constitution.orch.yaml +0 -284
  59. package/assets/.aw-spec/orchestrator/workflows/aw-spec-demo.orch.yaml +0 -103
  60. package/assets/.aw-spec/orchestrator/workflows/aw-spec-dependency-tree.orch.yaml +0 -69
  61. package/assets/.aw-spec/orchestrator/workflows/aw-spec-deploy.orch.yaml +0 -85
  62. package/assets/.aw-spec/orchestrator/workflows/aw-spec-design.orch.yaml +0 -382
  63. package/assets/.aw-spec/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +0 -382
  64. package/assets/.aw-spec/orchestrator/workflows/aw-spec-foundation.orch.yaml +0 -246
  65. package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +0 -231
  66. package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement.orch.yaml +0 -258
  67. package/assets/.aw-spec/orchestrator/workflows/aw-spec-inventory.orch.yaml +0 -236
  68. package/assets/.aw-spec/orchestrator/workflows/aw-spec-onboard.orch.yaml +0 -949
  69. package/assets/.aw-spec/orchestrator/workflows/aw-spec-parity.orch.yaml +0 -293
  70. package/assets/.aw-spec/orchestrator/workflows/aw-spec-run.orch.yaml +0 -177
  71. package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-domain.orch.yaml +0 -79
  72. package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-feature.orch.yaml +0 -128
  73. package/assets/.aw-spec/orchestrator/workflows/aw-spec-specify.orch.yaml +0 -412
  74. package/assets/.aw-spec/scripts/bash/aw-inventory.sh +0 -14
  75. package/assets/.aw-spec/scripts/bash/aw-parity.sh +0 -13
  76. package/assets/.aw-spec/scripts/bash/aw-rev-constitution.sh +0 -13
  77. package/assets/.aw-spec/scripts/bash/aw-spec-actions.sh +0 -1899
  78. package/assets/.aw-spec/scripts/bash/aw-xref.sh +0 -15
  79. package/assets/.aw-spec/scripts/bash/common.sh +0 -533
  80. package/assets/.aw-spec/scripts/powershell/aw-inventory.ps1 +0 -14
  81. package/assets/.aw-spec/scripts/powershell/aw-parity.ps1 +0 -13
  82. package/assets/.aw-spec/scripts/powershell/aw-rev-constitution.ps1 +0 -13
  83. package/assets/.aw-spec/scripts/powershell/aw-spec-actions.ps1 +0 -1563
  84. package/assets/.aw-spec/scripts/powershell/aw-xref.ps1 +0 -15
  85. package/assets/.aw-spec/scripts/python/aw-inventory.py +0 -683
  86. package/assets/.aw-spec/scripts/python/aw-parity.py +0 -380
  87. package/assets/.aw-spec/scripts/python/aw-rev-constitution.py +0 -312
  88. package/assets/.aw-spec/scripts/python/aw-xref.py +0 -1330
  89. package/assets/.aw-spec/scripts/python/validate_okf.py +0 -349
  90. package/assets/.aw-spec/templates/constitution-domain-template.md +0 -75
  91. package/assets/.aw-spec/templates/constitution-technical-template.md +0 -70
  92. package/assets/.aw-spec/templates/delta-design-template.md +0 -69
  93. package/assets/.aw-spec/templates/delta-spec-template.md +0 -60
  94. package/assets/.aw-spec/templates/design-template.md +0 -383
  95. package/assets/.aw-spec/templates/okf-concept-template.md +0 -103
  96. package/assets/.aw-spec/templates/parity-manifest-template.json +0 -49
  97. package/assets/.aw-spec/templates/source-map-template.md +0 -85
  98. package/assets/.aw-spec/templates/spec-template.md +0 -252
  99. package/assets/docs/ModularMonolith/ModularMonolith.Reference.pack.txt +0 -25248
  100. package/assets/docs/ModularMonolith/ModularMonolith.pack.txt +0 -5726
  101. package/assets/docs/ModularMonolith/pack-foundation.ps1 +0 -145
  102. package/assets/docs/ModularMonolith/pack-foundation.sh +0 -196
  103. package/assets/docs/ModularMonolith/pack-reference-foundation.ps1 +0 -157
  104. package/assets/docs/ModularMonolith/pack-reference-foundation.sh +0 -209
  105. package/assets/docs/ModularMonolith/unpack-foundation.ps1 +0 -126
  106. package/assets/docs/ModularMonolith/unpack-foundation.sh +0 -217
  107. package/assets/docs/ModularMonolith/unpack-reference-foundation.ps1 +0 -129
  108. package/assets/docs/ModularMonolith/unpack-reference-foundation.sh +0 -218
  109. package/assets/docs/README.md +0 -106
  110. package/assets/docs/VerticalSlice/PACKAGING.md +0 -185
  111. package/assets/docs/VerticalSlice/VerticalSlice.Reference.pack.txt +0 -19318
  112. package/assets/docs/VerticalSlice/VerticalSlice.pack.txt +0 -2833
  113. package/assets/docs/VerticalSlice/pack-foundation.ps1 +0 -145
  114. package/assets/docs/VerticalSlice/pack-foundation.sh +0 -196
  115. package/assets/docs/VerticalSlice/pack-reference-foundation.ps1 +0 -157
  116. package/assets/docs/VerticalSlice/pack-reference-foundation.sh +0 -209
  117. package/assets/docs/VerticalSlice/unpack-foundation.ps1 +0 -126
  118. package/assets/docs/VerticalSlice/unpack-foundation.sh +0 -217
  119. package/assets/docs/VerticalSlice/unpack-reference-foundation.ps1 +0 -129
  120. package/assets/docs/VerticalSlice/unpack-reference-foundation.sh +0 -218
  121. package/assets/docs/architecture/clean-architecture.md +0 -71
  122. package/assets/docs/architecture/cqrs.md +0 -141
  123. package/assets/docs/architecture/eventing.md +0 -83
  124. package/assets/docs/architecture/folder-structure.md +0 -61
  125. package/assets/docs/architecture/modular-monolith.md +0 -47
  126. package/assets/docs/architecture/persistence.md +0 -269
  127. package/assets/docs/architecture/testing.md +0 -55
  128. package/assets/docs/architecture/vertical-slices.md +0 -201
  129. package/assets/docs/components/Email/README.md +0 -119
  130. package/assets/docs/components/Email/ReferenceEndpoints/SendEmailEndpoint.cs +0 -84
  131. package/assets/docs/components/Email/integration.md +0 -300
  132. package/assets/docs/components/Jobs/README.md +0 -113
  133. package/assets/docs/components/Jobs/integration.md +0 -259
  134. package/assets/docs/components/QrGenerator/README.md +0 -85
  135. package/assets/docs/components/QrGenerator/ReferenceEndpoints/GenerateQrEndpoint.cs +0 -57
  136. package/assets/docs/components/QrGenerator/integration.md +0 -230
  137. package/assets/docs/components/README.md +0 -74
  138. package/assets/docs/domain/domain-driven-design.md +0 -212
  139. package/assets/docs/domainspecs/healthcare/ai-rules.domain.md +0 -34
  140. package/assets/docs/domainspecs/healthcare/api-versioning.domain.md +0 -17
  141. package/assets/docs/domainspecs/healthcare/auditing.domain.md +0 -97
  142. package/assets/docs/domainspecs/healthcare/authorization.domain.md +0 -26
  143. package/assets/docs/domainspecs/healthcare/clinical-terms.md +0 -20
  144. package/assets/docs/domainspecs/healthcare/coding-standards.domain.md +0 -26
  145. package/assets/docs/domainspecs/healthcare/comandrulemap.md +0 -100
  146. package/assets/docs/domainspecs/healthcare/commandtechrulemap.md +0 -119
  147. package/assets/docs/domainspecs/healthcare/consent.md +0 -19
  148. package/assets/docs/domainspecs/healthcare/cqrs.domain.md +0 -12
  149. package/assets/docs/domainspecs/healthcare/data-classification.domain.md +0 -28
  150. package/assets/docs/domainspecs/healthcare/dependency-policy.domain.md +0 -11
  151. package/assets/docs/domainspecs/healthcare/dicom.md +0 -15
  152. package/assets/docs/domainspecs/healthcare/domain-driven-design.domain.md +0 -28
  153. package/assets/docs/domainspecs/healthcare/domain-requirements.md +0 -55
  154. package/assets/docs/domainspecs/healthcare/eventing.domain.md +0 -18
  155. package/assets/docs/domainspecs/healthcare/fhir.md +0 -36
  156. package/assets/docs/domainspecs/healthcare/folder-structure.domain.md +0 -23
  157. package/assets/docs/domainspecs/healthcare/hipaa.md +0 -34
  158. package/assets/docs/domainspecs/healthcare/hl7.md +0 -15
  159. package/assets/docs/domainspecs/healthcare/integration-terms.md +0 -21
  160. package/assets/docs/domainspecs/healthcare/persistence.domain.md +0 -20
  161. package/assets/docs/domainspecs/healthcare/terminology.md +0 -30
  162. package/assets/docs/domainspecs/healthcare/testing.domain.md +0 -15
  163. package/assets/docs/domainspecs/healthcare/vertical-slices.domain.md +0 -18
  164. package/assets/docs/domainspecs/healthcare/zero-trust.domain.md +0 -12
  165. package/assets/docs/domainspecs/pharma/ai-rules.domain.md +0 -32
  166. package/assets/docs/domainspecs/pharma/api-versioning.domain.md +0 -20
  167. package/assets/docs/domainspecs/pharma/atc.md +0 -22
  168. package/assets/docs/domainspecs/pharma/auditing.domain.md +0 -90
  169. package/assets/docs/domainspecs/pharma/authorization.domain.md +0 -25
  170. package/assets/docs/domainspecs/pharma/coding-standards.domain.md +0 -28
  171. package/assets/docs/domainspecs/pharma/comandrulemap.md +0 -108
  172. package/assets/docs/domainspecs/pharma/commandtechrulemap.md +0 -119
  173. package/assets/docs/domainspecs/pharma/cqrs.domain.md +0 -16
  174. package/assets/docs/domainspecs/pharma/data-classification.domain.md +0 -24
  175. package/assets/docs/domainspecs/pharma/data-provenance.md +0 -21
  176. package/assets/docs/domainspecs/pharma/dependency-policy.domain.md +0 -11
  177. package/assets/docs/domainspecs/pharma/domain-driven-design.domain.md +0 -36
  178. package/assets/docs/domainspecs/pharma/domain-requirements.md +0 -99
  179. package/assets/docs/domainspecs/pharma/eventing.domain.md +0 -18
  180. package/assets/docs/domainspecs/pharma/fhir.md +0 -31
  181. package/assets/docs/domainspecs/pharma/folder-structure.domain.md +0 -24
  182. package/assets/docs/domainspecs/pharma/hl7.md +0 -17
  183. package/assets/docs/domainspecs/pharma/idmp.md +0 -26
  184. package/assets/docs/domainspecs/pharma/integration-terms.md +0 -21
  185. package/assets/docs/domainspecs/pharma/ndc.md +0 -28
  186. package/assets/docs/domainspecs/pharma/persistence.domain.md +0 -23
  187. package/assets/docs/domainspecs/pharma/pharma-terms.md +0 -27
  188. package/assets/docs/domainspecs/pharma/product-lifecycle.domain.md +0 -30
  189. package/assets/docs/domainspecs/pharma/regulatory-compliance.md +0 -19
  190. package/assets/docs/domainspecs/pharma/terminology.md +0 -32
  191. package/assets/docs/domainspecs/pharma/testing.domain.md +0 -19
  192. package/assets/docs/domainspecs/pharma/vertical-slices.domain.md +0 -17
  193. package/assets/docs/domainspecs/pharma/zero-trust.domain.md +0 -12
  194. package/assets/docs/glossary/ai-rules.md +0 -59
  195. package/assets/docs/governance/api-versioning.md +0 -99
  196. package/assets/docs/governance/coding-standards.md +0 -87
  197. package/assets/docs/governance/dependency-policy.md +0 -40
  198. package/assets/docs/interop/ihe-conformance.md +0 -31
  199. package/assets/docs/requirement-spec.txt +0 -27
  200. package/assets/docs/security/auditing.md +0 -160
  201. package/assets/docs/security/authorization-matrix.md +0 -14
  202. package/assets/docs/security/authorization.md +0 -87
  203. package/assets/docs/security/data-classification.md +0 -38
  204. package/assets/docs/security/zero-trust.md +0 -76
  205. package/assets/docs/technology-constitution.md +0 -172
@@ -1,252 +0,0 @@
1
- # Specification: [AGGREGATE]
2
-
3
- **Aggregate (feature)**: `[Aggregate]` <!-- the feature = the aggregate, e.g. Order -->
4
-
5
- **Spec home**: `specs/[Aggregate]/`
6
-
7
- **Version**: v1.0 <!-- living truth; every applied change request bumps this — see Change History -->
8
-
9
- **Status**: Draft
10
-
11
- **Input**: User description: "$ARGUMENTS"
12
-
13
- <!--
14
- AGGREGATE = FEATURE. This spec covers ONE aggregate (e.g. Order) and is the
15
- single LIVING source of truth for its whole lifecycle. Every operation on it
16
- (CreateOrder, UpdateOrder, …) is a USER STORY below — NOT a separate feature.
17
- A later requirement is a new US-n added here as a delta (see .aw-spec/changes/
18
- and delta-spec-template.md), never a new spec folder. One spec + one design.md
19
- (specs/[Aggregate]/design.md) — the DESIGN derives from THIS document.
20
-
21
- Section order is intentional: establish the business need and scope, then the
22
- stable core the aggregate IS (requirements → rules → constraints → entities →
23
- data classification → integration contracts → edge cases), then the prioritized
24
- user journeys that exercise it, then measurable success.
25
-
26
- DOMAIN LIFT (specify's job): three sections — Constraints & NFRs (CN-), Data
27
- Classification (DC-), Integration Contracts (IC-) — are where specify LIFTS
28
- domain-derived constraints out of the domain rule files into the spec. Design
29
- authors architecture from the spec ONLY, so anything not captured here never
30
- reaches design. Fill them when the domain applies; keep them (empty → "None")
31
- otherwise.
32
- -->
33
-
34
- ## Business Need
35
-
36
- <!--
37
- ACTION REQUIRED: Why this aggregate exists — the problem, the affected users,
38
- and the value delivered. Business-facing; no implementation detail.
39
- -->
40
-
41
- [The problem this aggregate solves, who it serves, and the value it delivers.]
42
-
43
- ## Scope & Assumptions
44
-
45
- ### Aggregate Boundary
46
-
47
- <!--
48
- The aggregate = the largest slice whose code no other feature owns. State what
49
- it OWNS, what it only REFERENCES (by identifier, not owned), and what is out of
50
- scope. This anchors the design's "dependencies point inward" and keeps commands
51
- as deltas on THIS aggregate rather than new features.
52
- -->
53
-
54
- - **Owns**: [entities/behaviour inside this aggregate — e.g. Order, OrderLine]
55
- - **References (by id, not owned)**: [Customer, Product — read-only / by identifier]
56
- - **Out of scope / non-goals**: [explicitly excluded — e.g. payment settlement, shipping]
57
-
58
- ### Assumptions
59
-
60
- <!--
61
- Reasonable defaults chosen where the description was silent, plus dependencies
62
- on existing systems/services.
63
- -->
64
-
65
- - [Assumption about target users, e.g., "Users have stable internet connectivity"]
66
- - [Assumption about scope, e.g., "Mobile support is out of scope for v1"]
67
- - [Dependency on an existing system/service, e.g., "Requires the existing user-profile API"]
68
-
69
- ## System Requirements *(mandatory)*
70
-
71
- <!--
72
- Functional requirements in EARS notation (Easy Approach to Requirements Syntax):
73
- atomic, testable, unambiguous. Choose the pattern that fits each requirement —
74
-
75
- • Ubiquitous THE SYSTEM SHALL <requirement>
76
- • Event-driven WHEN <trigger> THE SYSTEM SHALL <response>
77
- • State-driven WHILE <in a state> THE SYSTEM SHALL <response>
78
- • Unwanted IF <condition/error> THEN THE SYSTEM SHALL <response>
79
- • Optional WHERE <feature is present> THE SYSTEM SHALL <response>
80
-
81
- Give each a STABLE id (FR-001, …) — design sections and code trace to these ids.
82
- Mark genuine unknowns "[NEEDS CLARIFICATION: <question>]" (≤3; scope/UX/security
83
- only, and only where no reasonable default exists).
84
- -->
85
-
86
- - **FR-001**: WHEN [a customer submits an order] THE SYSTEM SHALL [create it in Draft state].
87
- - **FR-002**: THE SYSTEM SHALL [persist every order under a unique identifier].
88
- - **FR-003**: IF [the order has no line items] THEN THE SYSTEM SHALL [reject the submission].
89
- - **FR-004**: WHILE [an order is in Draft] THE SYSTEM SHALL [allow line items to be added or removed].
90
- - **FR-005**: WHERE [tax calculation is enabled] THE SYSTEM SHALL [apply the regional tax rule].
91
-
92
- ## Business Rules *(invariants — always true, technology-agnostic)*
93
-
94
- <!--
95
- ACTION REQUIRED: Constraints that must ALWAYS hold for the aggregate, independent
96
- of any single operation. These become the design's §Domain invariants and must be
97
- enforceable and testable. Give each a STABLE id (BR-001, …).
98
- -->
99
-
100
- - **BR-001**: [An order's total MUST never be negative.]
101
- - **BR-002**: [A submitted order MUST always have at least one line item.]
102
- - **BR-003**: [An order's identifier is immutable once created.]
103
-
104
- ## Constraints & Non-Functional Requirements *(domain lift — CN)*
105
-
106
- <!--
107
- ACTION REQUIRED (when the domain applies; else "None (as of vX.Y)"). Constraints the
108
- aggregate MUST satisfy that are NEITHER functional behaviour (those are FR) NOR
109
- always-true business invariants (those are BR): the regulatory, retention,
110
- immutability, audit-mandate, and performance-as-a-limit rules. Many are LIFTED here
111
- by specify from the domain rule files (e.g. persistence.domain, auditing.domain,
112
- data-classification.domain) so they survive into design — which reads the spec ONLY.
113
- Give each a STABLE id (CN-001, …); design's §5 Cross-Cutting and the analyze gate
114
- trace to these ids. State each as testable; where lifted, cite the source rule.
115
- -->
116
-
117
- - **CN-001**: [Retention — e.g. submitted orders + their audit trail are retained for [period] per [policy]; hard delete is forbidden once submitted (logical/retire only). — lifted from persistence.domain]
118
- - **CN-002**: [Audit immutability — e.g. every create/modify/cancel emits an append-only audit entry (User, Timestamp, Action, Previous, New). — lifted from auditing.domain]
119
- - **CN-003**: [Data integrity — e.g. records subject to [regime] satisfy [integrity standard].]
120
- - **CN-004**: [Performance-as-a-limit — e.g. P95 read latency < 200 ms at 200 RPS; not a behaviour, a bound.]
121
-
122
- ## Key Entities *(the aggregate's conceptual model — no implementation detail)*
123
-
124
- <!--
125
- The aggregate root and the entities/value objects inside its boundary: what each
126
- represents, its key attributes, lifecycle/states, and relationships. Reference to
127
- OTHER aggregates is by identifier only (see Aggregate Boundary).
128
- -->
129
-
130
- - **[Aggregate root — e.g. Order]**: [what it represents; key attributes; lifecycle/states, e.g. Draft → Submitted → Fulfilled]
131
- - **[Entity / value object — e.g. OrderLine]**: [what it represents; relationship to the root]
132
-
133
- ## Data Classification *(domain lift — DC)*
134
-
135
- <!--
136
- ACTION REQUIRED (when the aggregate handles sensitive data; else "None (as of vX.Y)").
137
- The sensitivity taxonomy for this aggregate's data and the exposure rules that follow:
138
- which categories exist, which Key-Entity fields fall in each, and where each category
139
- MAY / MUST NOT appear (public API surface, logs, metrics, traces, external projections).
140
- Lifted by specify from the domain data-classification rules. Design enforces these; the
141
- analyze-design / analyze-slice gates check them. Give each a STABLE id (DC-001, …); reference fields by
142
- the names used in Key Entities.
143
- -->
144
-
145
- | id | Category | Applies to (fields / entities) | Exposure rule |
146
- |---|---|---|---|
147
- | DC-001 | [Public] | [id, status, non-sensitive attributes] | [may appear on the public API + external projections] |
148
- | DC-002 | [Sensitive / restricted] | [PII, pre-release, commercially-sensitive fields] | [MUST NOT appear on the public surface, nor in logs / metrics / traces] |
149
- | DC-003 | [Externally-sourced] | [imported fields] | [carries provenance; [handling rule]] |
150
-
151
- ## Integration Contracts *(domain lift — IC)*
152
-
153
- <!--
154
- ACTION REQUIRED (when the aggregate interoperates; else "None (as of vX.Y)"). The
155
- external contracts this aggregate MUST satisfy — interoperability obligations lifted by
156
- specify from the domain interop rules (e.g. FHIR/HL7/DICOM projections, terminology
157
- services, inbound feeds). State each at CONTRACT level: which standard, which resources,
158
- direction (inbound/outbound), projection vs system-of-record — NOT the adapter design
159
- (design realises these in its API / Infrastructure layers). Give each a STABLE id
160
- (IC-001, …); design's §4.2 External Integrations traces to these ids.
161
- -->
162
-
163
- - **IC-001**: [Outbound projection — e.g. the aggregate SHALL project to [external standard / resources] as read-only projections (not the system of record); identifiers map to [external identifier]; coded fields to [coded type].]
164
- - **IC-002**: [Reference-data validation — e.g. coded values SHALL validate against [terminology / reference service]; no invented codes.]
165
- - **IC-003**: [Inbound feed — e.g. inbound [feed/standard] SHALL flow through an Interop adapter, never a direct write path to the aggregate.]
166
-
167
- ## Edge Cases & Exceptional Scenarios
168
-
169
- <!--
170
- ACTION REQUIRED: Boundary conditions, error paths, and concurrency/consistency
171
- cases. Each should map to a System Requirement (often an IF…THEN unwanted-behaviour
172
- requirement) or a Business Rule.
173
- -->
174
-
175
- - What happens when [boundary condition, e.g., the same order is submitted twice]?
176
- - How does the system handle [error scenario, e.g., a referenced product no longer exists]?
177
-
178
- ## User Stories *(prioritized)*
179
-
180
- <!--
181
- Prioritized user journeys (P1 = most critical). Each MUST be INDEPENDENTLY
182
- TESTABLE — implementing just one still yields a viable slice of value that can be
183
- developed, tested, deployed, and demonstrated on its own.
184
-
185
- Give each a STABLE id (US-1, US-2, …); design sections trace to these ids. Each
186
- story exercises specific System Requirements / Business Rules — cite them so the
187
- spine (US ↔ FR/BR ↔ design ↔ code) stays exact. On this living spec, note when a
188
- story entered or changed: "Added: vX.Y (CR-…)" / "Modified: vX.Y (CR-…)".
189
- -->
190
-
191
- ### US-1 - [Brief Title] (Priority: P1) · _Added: v1.0_
192
-
193
- [Describe this user journey in plain language.]
194
-
195
- **Why this priority**: [The value and why it ranks here.]
196
-
197
- **Exercises**: [FR-001, FR-003, BR-001]
198
-
199
- **Acceptance Criteria**:
200
-
201
- 1. **Given** [initial state], **When** [action], **Then** [expected outcome]
202
- 2. **Given** [initial state], **When** [action], **Then** [expected outcome]
203
-
204
- **Independent Test**: [How this story is verified on its own and the value it delivers.]
205
-
206
- ---
207
-
208
- ### US-2 - [Brief Title] (Priority: P2) · _Added: v1.0_
209
-
210
- [Describe this user journey in plain language.]
211
-
212
- **Why this priority**: [The value and why it ranks here.]
213
-
214
- **Exercises**: [FR-…, BR-…]
215
-
216
- **Acceptance Criteria**:
217
-
218
- 1. **Given** [initial state], **When** [action], **Then** [expected outcome]
219
-
220
- **Independent Test**: [How this story is verified on its own.]
221
-
222
- ---
223
-
224
- [Add more user stories as needed (US-3, US-4, …), each with a priority and a stable id.]
225
-
226
- ## Success Criteria *(mandatory)*
227
-
228
- <!--
229
- ACTION REQUIRED: Measurable, technology-agnostic outcomes — verified at the
230
- `analyze-slice` phase. Give each a STABLE id (SC-001, …).
231
- -->
232
-
233
- ### Measurable Outcomes
234
-
235
- - **SC-001**: [Measurable metric, e.g., "A customer can place an order in under 2 minutes."]
236
- - **SC-002**: [Measurable metric, e.g., "The system sustains 1000 concurrent orders without degradation."]
237
- - **SC-003**: [User-satisfaction metric, e.g., "90% of first-time users complete an order without assistance."]
238
- - **SC-004**: [Business metric, e.g., "Reduce order-related support tickets by 50%."]
239
-
240
- ## Change History
241
-
242
- <!--
243
- The living-truth ledger. Every applied change request appends a row here, carrying
244
- the version it ships as. finalize-delta writes the row when it merges the delta;
245
- close-delta then archives the CR, bumps the minor version in active_version.json and
246
- stamps that same number into this document's **Version** header — one mechanism, one
247
- stage, so header, row and active_version.json never disagree. Newest last.
248
- -->
249
-
250
- | Version | Date | Change | User stories | CR |
251
- |---------|------|--------|--------------|-----|
252
- | v1.0 | [DATE] | Initial specification | US-1 | — |