aw-spec-cli 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/.appweaver/DESIGN-FORMAT.md +200 -0
- package/assets/.appweaver/ORCH-DIALECT.md +156 -0
- package/assets/.appweaver/RULE-PARTITION.md +175 -0
- package/assets/.appweaver/STACK-PROFILES.md +461 -0
- package/assets/.appweaver/ai-rules.md +180 -0
- package/assets/.appweaver/domain.json +1 -0
- package/assets/.appweaver/extensions/.registry +19 -0
- package/assets/.appweaver/extensions/agent-context/README.md +57 -0
- package/assets/.appweaver/extensions/agent-context/agent-context-config.yml +4 -0
- package/assets/.appweaver/extensions/agent-context/commands/aw-spec.agent-context.update.md +26 -0
- package/assets/.appweaver/extensions/agent-context/extension.yml +37 -0
- package/assets/.appweaver/extensions/agent-context/scripts/bash/update-agent-context.sh +201 -0
- package/assets/.appweaver/extensions/agent-context/scripts/powershell/update-agent-context.ps1 +237 -0
- package/assets/.appweaver/extensions.yml +16 -0
- package/assets/.appweaver/feature.json +3 -0
- package/assets/.appweaver/init-options.json +9 -0
- package/assets/.appweaver/integration.json +15 -0
- package/assets/.appweaver/integrations/aw-spec.manifest.json +9 -0
- package/assets/.appweaver/interpreter/run-skill.py +1176 -0
- package/assets/.appweaver/memory/constitution.md +50 -0
- package/assets/.appweaver/orchestrator/.smoke-out/smoke.md +6 -0
- package/assets/.appweaver/orchestrator/AGENT-PROFILE.md +94 -0
- package/assets/.appweaver/orchestrator/README.md +300 -0
- package/assets/.appweaver/orchestrator/adapters/claude_agent_sdk.py +74 -0
- package/assets/.appweaver/orchestrator/adapters/google_antigravity.py +74 -0
- package/assets/.appweaver/orchestrator/modules/delta-design.orch.yaml +105 -0
- package/assets/.appweaver/orchestrator/modules/delta-spec.orch.yaml +101 -0
- package/assets/.appweaver/orchestrator/modules/domain-select.orch.yaml +90 -0
- package/assets/.appweaver/orchestrator/modules/lane-gate.orch.yaml +126 -0
- package/assets/.appweaver/orchestrator/modules/tech-select.orch.yaml +123 -0
- package/assets/.appweaver/orchestrator/orchestrator.py +1721 -0
- package/assets/.appweaver/orchestrator/rev-templates/ai-rules.reference.md +40 -0
- package/assets/.appweaver/orchestrator/rev-templates/delta-design-template.skeleton.md +101 -0
- package/assets/.appweaver/orchestrator/rev-templates/design-template.skeleton.md +245 -0
- package/assets/.appweaver/orchestrator/rev-templates/domain-constitution.skeleton.md +63 -0
- package/assets/.appweaver/orchestrator/rev-templates/domain-requirements.skeleton.md +48 -0
- package/assets/.appweaver/orchestrator/rev-templates/domain-rule-bindings.skeleton.md +59 -0
- package/assets/.appweaver/orchestrator/rev-templates/domain-rule-file.skeleton.md +39 -0
- package/assets/.appweaver/orchestrator/rev-templates/frontend-rule-file.skeleton.md +63 -0
- package/assets/.appweaver/orchestrator/rev-templates/tech-rule-bindings.skeleton.md +116 -0
- package/assets/.appweaver/orchestrator/rev-templates/technical-constitution.skeleton.md +106 -0
- package/assets/.appweaver/orchestrator/rev-templates/technical-rule-file.skeleton.md +54 -0
- package/assets/.appweaver/orchestrator/rev-templates/ui-constitution.skeleton.md +125 -0
- package/assets/.appweaver/orchestrator/rev-templates/ui-delta-design-template.skeleton.md +123 -0
- package/assets/.appweaver/orchestrator/rev-templates/ui-design-template.skeleton.md +294 -0
- package/assets/.appweaver/orchestrator/workflows/_smoke.orch.yaml +160 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-add-component.orch.yaml +270 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-adopt.orch.yaml +934 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +251 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +265 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +437 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-build.orch.yaml +197 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-characterize.orch.yaml +475 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-close-delta.orch.yaml +181 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-constitution.orch.yaml +727 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-demo.orch.yaml +100 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-dependency-tree.orch.yaml +69 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-deploy.orch.yaml +85 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-design-ui.orch.yaml +386 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-design.orch.yaml +382 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +462 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-foundation.orch.yaml +265 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +253 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-implement-ui.orch.yaml +267 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-implement.orch.yaml +287 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-inventory.orch.yaml +238 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-onboard.orch.yaml +1822 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-parity.orch.yaml +293 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-run.orch.yaml +194 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-select-domain.orch.yaml +83 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-select-feature.orch.yaml +128 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-select-stack.orch.yaml +296 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-specify.orch.yaml +439 -0
- package/assets/.appweaver/scripts/bash/aw-inventory.sh +17 -0
- package/assets/.appweaver/scripts/bash/aw-parity.sh +13 -0
- package/assets/.appweaver/scripts/bash/aw-rev-constitution.sh +13 -0
- package/assets/.appweaver/scripts/bash/aw-spec-actions.sh +2626 -0
- package/assets/.appweaver/scripts/bash/aw-xref.sh +15 -0
- package/assets/.appweaver/scripts/bash/common.sh +533 -0
- package/assets/.appweaver/scripts/powershell/aw-inventory.ps1 +17 -0
- package/assets/.appweaver/scripts/powershell/aw-parity.ps1 +13 -0
- package/assets/.appweaver/scripts/powershell/aw-rev-constitution.ps1 +13 -0
- package/assets/.appweaver/scripts/powershell/aw-spec-actions.ps1 +2232 -0
- package/assets/.appweaver/scripts/powershell/aw-xref.ps1 +15 -0
- package/assets/.appweaver/scripts/python/aw-component-catalog.py +121 -0
- package/assets/.appweaver/scripts/python/aw-inventory.py +1180 -0
- package/assets/.appweaver/scripts/python/aw-parity.py +380 -0
- package/assets/.appweaver/scripts/python/aw-rev-constitution.py +329 -0
- package/assets/.appweaver/scripts/python/aw-stack.py +1251 -0
- package/assets/.appweaver/scripts/python/aw-xref.py +1330 -0
- package/assets/.appweaver/scripts/python/validate_okf.py +352 -0
- package/assets/.appweaver/stack-profiles/angular.json +16 -0
- package/assets/.appweaver/stack-profiles/blazor-wasm.json +17 -0
- package/assets/.appweaver/stack-profiles/dotnet-webapi.json +15 -0
- package/assets/.appweaver/stack-profiles/go-chi.json +14 -0
- package/assets/.appweaver/stack-profiles/java-spring.json +16 -0
- package/assets/.appweaver/stack-profiles/nextjs.json +16 -0
- package/assets/.appweaver/stack-profiles/node-express.json +15 -0
- package/assets/.appweaver/stack-profiles/python-fastapi.json +16 -0
- package/assets/.appweaver/stack-profiles/react-vite.json +17 -0
- package/assets/.appweaver/stack-profiles/sveltekit.json +16 -0
- package/assets/.appweaver/stack-profiles/vue-vite.json +17 -0
- package/assets/.appweaver/stacks.json +3 -0
- package/assets/.appweaver/templates/constitution-domain-template.md +116 -0
- package/assets/.appweaver/templates/constitution-technical-template.md +108 -0
- package/assets/.appweaver/templates/constitution-ui-template.md +116 -0
- package/assets/.appweaver/templates/delta-design-template.md +69 -0
- package/assets/.appweaver/templates/delta-spec-template.md +63 -0
- package/assets/.appweaver/templates/design-template.md +383 -0
- package/assets/.appweaver/templates/okf-concept-template.md +114 -0
- package/assets/.appweaver/templates/parity-manifest-template.json +49 -0
- package/assets/.appweaver/templates/source-map-template.md +85 -0
- package/assets/.appweaver/templates/spec-template.md +309 -0
- package/assets/.appweaver/templates/ui-design-template.md +273 -0
- package/assets/foundations/dotnet/ModularMonolith/ModularMonolith.Reference.pack.txt +25248 -0
- package/assets/foundations/dotnet/ModularMonolith/ModularMonolith.pack.txt +5726 -0
- package/assets/foundations/dotnet/ModularMonolith/pack-foundation.ps1 +145 -0
- package/assets/foundations/dotnet/ModularMonolith/pack-foundation.sh +196 -0
- package/assets/foundations/dotnet/ModularMonolith/pack-reference-foundation.ps1 +157 -0
- package/assets/foundations/dotnet/ModularMonolith/pack-reference-foundation.sh +209 -0
- package/assets/foundations/dotnet/ModularMonolith/unpack-foundation.ps1 +126 -0
- package/assets/foundations/dotnet/ModularMonolith/unpack-foundation.sh +217 -0
- package/assets/foundations/dotnet/ModularMonolith/unpack-reference-foundation.ps1 +129 -0
- package/assets/foundations/dotnet/ModularMonolith/unpack-reference-foundation.sh +218 -0
- package/assets/foundations/dotnet/VerticalSlice/VerticalSlice.Reference.pack.txt +19318 -0
- package/assets/foundations/dotnet/VerticalSlice/VerticalSlice.pack.txt +2833 -0
- package/assets/foundations/dotnet/VerticalSlice/pack-foundation.ps1 +145 -0
- package/assets/foundations/dotnet/VerticalSlice/pack-foundation.sh +196 -0
- package/assets/foundations/dotnet/VerticalSlice/pack-reference-foundation.ps1 +157 -0
- package/assets/foundations/dotnet/VerticalSlice/pack-reference-foundation.sh +209 -0
- package/assets/foundations/dotnet/VerticalSlice/unpack-foundation.ps1 +126 -0
- package/assets/foundations/dotnet/VerticalSlice/unpack-foundation.sh +217 -0
- package/assets/foundations/dotnet/VerticalSlice/unpack-reference-foundation.ps1 +129 -0
- package/assets/foundations/dotnet/VerticalSlice/unpack-reference-foundation.sh +218 -0
- package/assets/foundations/dotnet/components/Email/README.md +119 -0
- package/assets/foundations/dotnet/components/Email/ReferenceEndpoints/SendEmailEndpoint.cs +84 -0
- package/assets/foundations/dotnet/components/Email/integration.md +300 -0
- package/assets/foundations/dotnet/components/Jobs/README.md +113 -0
- package/assets/foundations/dotnet/components/Jobs/integration.md +259 -0
- package/assets/foundations/dotnet/components/QrGenerator/README.md +85 -0
- package/assets/foundations/dotnet/components/QrGenerator/ReferenceEndpoints/GenerateQrEndpoint.cs +57 -0
- package/assets/foundations/dotnet/components/QrGenerator/integration.md +230 -0
- package/assets/foundations/dotnet/components/README.md +74 -0
- package/assets/guardrails/README.md +222 -0
- package/assets/guardrails/domain/healthcare/ai-rules.domain.md +34 -0
- package/assets/guardrails/domain/healthcare/api-versioning.domain.md +17 -0
- package/assets/guardrails/domain/healthcare/auditing.domain.md +97 -0
- package/assets/guardrails/domain/healthcare/authorization.domain.md +26 -0
- package/assets/guardrails/domain/healthcare/clinical-terms.md +20 -0
- package/assets/guardrails/domain/healthcare/coding-standards.domain.md +26 -0
- package/assets/guardrails/domain/healthcare/consent.md +19 -0
- package/assets/guardrails/domain/healthcare/cqrs.domain.md +12 -0
- package/assets/guardrails/domain/healthcare/data-classification.domain.md +28 -0
- package/assets/guardrails/domain/healthcare/dependency-policy.domain.md +11 -0
- package/assets/guardrails/domain/healthcare/dicom.md +15 -0
- package/assets/guardrails/domain/healthcare/domain-constitution.md +119 -0
- package/assets/guardrails/domain/healthcare/domain-driven-design.domain.md +28 -0
- package/assets/guardrails/domain/healthcare/eventing.domain.md +18 -0
- package/assets/guardrails/domain/healthcare/fhir.md +36 -0
- package/assets/guardrails/domain/healthcare/folder-structure.domain.md +25 -0
- package/assets/guardrails/domain/healthcare/hipaa.md +34 -0
- package/assets/guardrails/domain/healthcare/hl7.md +15 -0
- package/assets/guardrails/domain/healthcare/ihe-conformance.md +31 -0
- package/assets/guardrails/domain/healthcare/integration-terms.md +21 -0
- package/assets/guardrails/domain/healthcare/persistence.domain.md +20 -0
- package/assets/guardrails/domain/healthcare/terminology.md +30 -0
- package/assets/guardrails/domain/healthcare/testing.domain.md +15 -0
- package/assets/guardrails/domain/healthcare/ux/accessibility-standards.md +36 -0
- package/assets/guardrails/domain/healthcare/ux/content-design.md +32 -0
- package/assets/guardrails/domain/healthcare/ux/interaction-states.md +44 -0
- package/assets/guardrails/domain/healthcare/ux/journey-mapping.md +40 -0
- package/assets/guardrails/domain/healthcare/vertical-slices.domain.md +18 -0
- package/assets/guardrails/domain/healthcare/zero-trust.domain.md +12 -0
- package/assets/guardrails/domain/pharma/ai-rules.domain.md +32 -0
- package/assets/guardrails/domain/pharma/api-versioning.domain.md +20 -0
- package/assets/guardrails/domain/pharma/atc.md +22 -0
- package/assets/guardrails/domain/pharma/auditing.domain.md +90 -0
- package/assets/guardrails/domain/pharma/authorization.domain.md +25 -0
- package/assets/guardrails/domain/pharma/coding-standards.domain.md +28 -0
- package/assets/guardrails/domain/pharma/cqrs.domain.md +16 -0
- package/assets/guardrails/domain/pharma/data-classification.domain.md +24 -0
- package/assets/guardrails/domain/pharma/data-provenance.md +21 -0
- package/assets/guardrails/domain/pharma/dependency-policy.domain.md +11 -0
- package/assets/guardrails/domain/pharma/domain-constitution.md +113 -0
- package/assets/guardrails/domain/pharma/domain-driven-design.domain.md +36 -0
- package/assets/guardrails/domain/pharma/domain-requirements.sample.md +103 -0
- package/assets/guardrails/domain/pharma/eventing.domain.md +18 -0
- package/assets/guardrails/domain/pharma/fhir.md +31 -0
- package/assets/guardrails/domain/pharma/folder-structure.domain.md +26 -0
- package/assets/guardrails/domain/pharma/hl7.md +17 -0
- package/assets/guardrails/domain/pharma/idmp.md +26 -0
- package/assets/guardrails/domain/pharma/integration-terms.md +21 -0
- package/assets/guardrails/domain/pharma/ndc.md +28 -0
- package/assets/guardrails/domain/pharma/persistence.domain.md +23 -0
- package/assets/guardrails/domain/pharma/pharma-terms.md +27 -0
- package/assets/guardrails/domain/pharma/product-lifecycle.domain.md +30 -0
- package/assets/guardrails/domain/pharma/regulatory-compliance.md +19 -0
- package/assets/guardrails/domain/pharma/terminology.md +32 -0
- package/assets/guardrails/domain/pharma/testing.domain.md +19 -0
- package/assets/guardrails/domain/pharma/vertical-slices.domain.md +17 -0
- package/assets/guardrails/domain/pharma/zero-trust.domain.md +12 -0
- package/assets/guardrails/projects/dotnet-default-project/domain/domain-requirements.md +58 -0
- package/assets/guardrails/projects/dotnet-default-project/domain-rule-bindings.md +113 -0
- package/assets/guardrails/projects/dotnet-default-project/frontend/ui-requirements.md +43 -0
- package/assets/guardrails/projects/dotnet-default-project/service/technical-requirements.md +40 -0
- package/assets/guardrails/projects/dotnet-default-project/tech-rule-bindings.md +263 -0
- package/assets/guardrails/requirement-spec.txt +27 -0
- package/assets/guardrails/technology/dotnet-webapi/PACKAGING.md +184 -0
- package/assets/guardrails/technology/dotnet-webapi/api-versioning.md +44 -0
- package/assets/guardrails/technology/dotnet-webapi/auditing.md +96 -0
- package/assets/guardrails/technology/dotnet-webapi/authorization-matrix.md +14 -0
- package/assets/guardrails/technology/dotnet-webapi/authorization.md +39 -0
- package/assets/guardrails/technology/dotnet-webapi/clean-architecture.md +54 -0
- package/assets/guardrails/technology/dotnet-webapi/coding-standards.md +87 -0
- package/assets/guardrails/technology/dotnet-webapi/cqrs.md +63 -0
- package/assets/guardrails/technology/dotnet-webapi/data-classification.md +38 -0
- package/assets/guardrails/technology/dotnet-webapi/dependency-policy.md +40 -0
- package/assets/guardrails/technology/dotnet-webapi/domain-driven-design.md +91 -0
- package/assets/guardrails/technology/dotnet-webapi/eventing.md +57 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/api-versioning.md +75 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/auditing.md +84 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/authorization.md +68 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/clean-architecture.md +37 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/cqrs.md +97 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/domain-driven-design.md +141 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/eventing.md +46 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/persistence.md +207 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/vertical-slices.md +151 -0
- package/assets/guardrails/technology/dotnet-webapi/examples/zero-trust.md +48 -0
- package/assets/guardrails/technology/dotnet-webapi/folder-structure.md +61 -0
- package/assets/guardrails/technology/dotnet-webapi/modular-monolith.md +47 -0
- package/assets/guardrails/technology/dotnet-webapi/persistence.md +82 -0
- package/assets/guardrails/technology/dotnet-webapi/technology-constitution.md +162 -0
- package/assets/guardrails/technology/dotnet-webapi/testing.md +55 -0
- package/assets/guardrails/technology/dotnet-webapi/vertical-slices.md +70 -0
- package/assets/guardrails/technology/dotnet-webapi/zero-trust.md +48 -0
- package/assets/guardrails/technology/java-spring/README.md +62 -0
- package/assets/guardrails/technology/nextjs/accessibility-implementation.md +56 -0
- package/assets/guardrails/technology/nextjs/api-client.md +56 -0
- package/assets/guardrails/technology/nextjs/api-integration.dotnet-webapi.md +174 -0
- package/assets/guardrails/technology/nextjs/api-integration.java-spring.md +203 -0
- package/assets/guardrails/technology/nextjs/auth-session.md +68 -0
- package/assets/guardrails/technology/nextjs/client-security.md +69 -0
- package/assets/guardrails/technology/nextjs/component-architecture.md +60 -0
- package/assets/guardrails/technology/nextjs/component-conventions.md +58 -0
- package/assets/guardrails/technology/nextjs/design-system.md +60 -0
- package/assets/guardrails/technology/nextjs/error-handling.md +72 -0
- package/assets/guardrails/technology/nextjs/forms-and-validation.md +75 -0
- package/assets/guardrails/technology/nextjs/frontend-testing.md +94 -0
- package/assets/guardrails/technology/nextjs/i18n.md +57 -0
- package/assets/guardrails/technology/nextjs/observability.md +67 -0
- package/assets/guardrails/technology/nextjs/performance-budgets.md +66 -0
- package/assets/guardrails/technology/nextjs/routing-navigation.md +52 -0
- package/assets/guardrails/technology/nextjs/state-management.md +70 -0
- package/assets/guardrails/technology/nextjs/ui-constitution.md +166 -0
- package/dist/commands/init.js +2 -2
- package/dist/commands/init.js.map +1 -1
- package/dist/utils/copy-assets.js +8 -8
- package/dist/utils/copy-assets.js.map +1 -1
- package/package.json +1 -1
- package/assets/docs/pharma-constitution.my-ref.md +0 -86
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ISO IDMP — Identification of Medicinal Products
|
|
2
|
+
|
|
3
|
+
> NON-NEGOTIABLE. Commands: `/aw-spec-constitution`, `/aw-spec-specify`.
|
|
4
|
+
|
|
5
|
+
## Alignment principle
|
|
6
|
+
- The model SHALL align with the ISO IDMP suite (**ISO 11615/11616/11238/11239/11240**) **where applicable** — IDMP shapes the ubiquitous language + aggregate boundaries; it is **not** a wire format and does not replace the internal model (see [[domain-driven-design.domain]]).
|
|
7
|
+
- Even where IDMP messages aren't yet exchanged, preserve the IDMP concept boundaries so future exchange is additive, not a rewrite.
|
|
8
|
+
|
|
9
|
+
## Required concepts → model home
|
|
10
|
+
| IDMP concept | Model home |
|
|
11
|
+
|---|---|
|
|
12
|
+
| **Medicinal Product** | `MedicinalProduct` aggregate root |
|
|
13
|
+
| **Manufactured Item** | manufactured dose-form item (within the aggregate or a related entity) |
|
|
14
|
+
| **Pharmaceutical Product** | administrable product = `DosageForm` + `Strength` + `RouteOfAdministration` |
|
|
15
|
+
| **Substance** | `Substance` aggregate, UNII-identified (see [[terminology]]); referenced by `ActiveIngredient` |
|
|
16
|
+
| **Marketing Authorization Holder** | `MarketingAuthorizationHolder` → FHIR `Organization` (see [[fhir]]) |
|
|
17
|
+
| **Packaging** | `PackagingConfiguration` (Package NDC, description, quantity, UoM) (see [[ndc]]) |
|
|
18
|
+
| **Strength** | `Strength` VO (numerator/denominator `Quantity`, UCUM) |
|
|
19
|
+
| **Route of Administration** | `RouteOfAdministration` VO (coded) |
|
|
20
|
+
|
|
21
|
+
## Identifiers & terminology
|
|
22
|
+
- IDMP identifiers (**MPID**, **PhPID**) SHALL be representable as FHIR `Identifier`-shaped VOs when adopted; they coexist with NDC, not replace it (see [[ndc]]).
|
|
23
|
+
- IDMP controlled vocabularies (dose form, route, units, packaging) bind to the Terminology module's code systems, never free text (see [[terminology]], [[atc]]).
|
|
24
|
+
|
|
25
|
+
## Related
|
|
26
|
+
- [[domain-driven-design.domain]] · [[ndc]] · [[terminology]] · [[atc]] · [[fhir]] · [[pharma-terms]]
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Glossary — Integration Terms (Pharma)
|
|
2
|
+
|
|
3
|
+
> Ubiquitous language for pharma interoperability standards + identifiers. Commands: `/aw-spec-specify`. See [[pharma-terms]] (aggregates) + [[terminology]] (coding).
|
|
4
|
+
|
|
5
|
+
| Term | Definition |
|
|
6
|
+
|---|---|
|
|
7
|
+
| **NDC** | US FDA product/package identifier (Labeler + Product + Package); the `NdcCode` VO; format-validated, unique (see [[ndc]]). |
|
|
8
|
+
| **ISO IDMP** | Identification of Medicinal Products (ISO 11615/11616/11238/11239/11240); conceptual alignment; may carry MPID/PhPID (see [[idmp]]). |
|
|
9
|
+
| **UNII** | FDA substance identity for ingredients/moieties; maps to FHIR `Substance.code` (see [[terminology]]). |
|
|
10
|
+
| **RxNorm** | Normalized clinical-drug naming (US); optional product identifier (see [[terminology]]). |
|
|
11
|
+
| **WHO ATC** | Therapeutic class codes; multiple per product, validated against configured sets (see [[atc]]). |
|
|
12
|
+
| **SNOMED CT** | Terminology for dosage forms, routes, product classification (see [[terminology]]). |
|
|
13
|
+
| **UCUM** | Units for strength + package quantity (see [[terminology]]). |
|
|
14
|
+
| **FHIR** | Canonical external contract (R4 default, R5 additive); projects to `Medication`/`MedicationKnowledge`/`Substance`/`Organization` over aggregates (see [[fhir]]). |
|
|
15
|
+
| **HL7** | **HL7 v2.x** legacy messaging via adapters where a consumer needs it; **HL7 FHIR** is the primary contract (see [[hl7]], [[fhir]]). |
|
|
16
|
+
| **Provenance** | Source metadata for externally sourced data; may project to FHIR `Provenance` (see [[data-provenance]]). |
|
|
17
|
+
| **CloudEvents** | CNCF durable async event-stream spec; carries product domain events (see [[eventing.domain]]). |
|
|
18
|
+
| **OpenAPI / CapabilityStatement** | Versioned machine-readable contracts for REST / FHIR (see [[api-versioning.domain]]). |
|
|
19
|
+
|
|
20
|
+
## Related
|
|
21
|
+
- [[pharma-terms]] · [[terminology]] · [[ndc]] · [[idmp]] · [[atc]] · [[fhir]] · [[hl7]] · [[data-provenance]] · [[eventing.domain]] · [[api-versioning.domain]]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# NDC — National Drug Code Standards
|
|
2
|
+
|
|
3
|
+
> NON-NEGOTIABLE. Commands: `/aw-spec-constitution`, `/aw-spec-specify`.
|
|
4
|
+
|
|
5
|
+
## Value Object
|
|
6
|
+
- **NDC SHALL be a Value Object** (`NdcCode`) — immutable, equality by value (see [[domain-driven-design.domain]]).
|
|
7
|
+
- Product-level NDC lives on `MedicinalProduct`; package-level (`PackageIdentifier` / Package NDC) on each `PackagingConfiguration`.
|
|
8
|
+
- Free-text storage of an NDC is a Forbidden Pattern.
|
|
9
|
+
|
|
10
|
+
## Segments & format
|
|
11
|
+
- Three segments: **Labeler Code**, **Product Code**, **Package Code** — retain each segment discretely **plus** the canonical formatted string (boundaries MUST NOT be lost to a concatenated string).
|
|
12
|
+
- Common configurations (5-4-2, 5-3-2, 4-4-2 10-digit + the 11-digit normalized form) SHALL be representable as **data, not compiled constants**.
|
|
13
|
+
- The Labeler Code is FDA-assigned to the **Labeler** organization; the registry does not mint Labeler Codes (see [[domain-requirements]]).
|
|
14
|
+
|
|
15
|
+
## Uniqueness
|
|
16
|
+
- **NDC uniqueness SHALL be enforced** — a product NDC maps to <=1 active `MedicinalProduct`; a Package NDC to <=1 `PackagingConfiguration`.
|
|
17
|
+
- Duplicate detection runs at registration + any identifier change; enforced at the aggregate boundary **and** a persistence-level unique constraint (see [[persistence.domain]], [[auditing.domain]]).
|
|
18
|
+
|
|
19
|
+
## Validation
|
|
20
|
+
- **NDC validation rules SHALL be configurable** (segment lengths, allowed configurations, check rules = value-set data).
|
|
21
|
+
- Runs on registration, identifier change, and external import (see [[data-provenance]]); an invalid NDC raises a domain error — the Domain MUST NOT persist it.
|
|
22
|
+
- Never invent NDC values or Labeler Codes — validate external codes against the configured rules + FDA NDC directory via the Terminology module (see [[terminology]], [[ai-rules.domain]]).
|
|
23
|
+
|
|
24
|
+
## FHIR mapping
|
|
25
|
+
- `NdcCode` → FHIR `Identifier` (NDC system URI); also participates in `Medication.code` as a `CodeableConcept` coding (see [[fhir]]).
|
|
26
|
+
|
|
27
|
+
## Related
|
|
28
|
+
- [[domain-driven-design.domain]] · [[idmp]] · [[terminology]] · [[fhir]] · [[data-provenance]] · [[persistence.domain]] · [[auditing.domain]] · [[ai-rules.domain]]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Persistence — Pharma Domain Addenda
|
|
2
|
+
|
|
3
|
+
> Technology base: [[persistence]]. NON-NEGOTIABLE. Commands: `/aw-spec-specify`, `/aw-spec-gate`.
|
|
4
|
+
|
|
5
|
+
## Version history
|
|
6
|
+
- Maintain a **version history** of product information: each approved change produces a new, immutable **`ProductVersion`** snapshot.
|
|
7
|
+
- **Historical versions remain queryable** — a read model exposes prior versions by product + effective time; superseded versions are never overwritten or purged. Snapshots complement audit (who/what/when; see [[auditing.domain]]) and provenance (source; see [[data-provenance]]).
|
|
8
|
+
|
|
9
|
+
## Retention-protected data
|
|
10
|
+
- Hard delete FORBIDDEN for `MedicinalProduct` and all product history — delete logically via `MarkAsDeleted(...)` / lifecycle retirement.
|
|
11
|
+
- **Product retirement** (Discontinued/Withdrawn) is a state change, not a delete (see [[product-lifecycle.domain]]).
|
|
12
|
+
- `AuditRecord` is **append-only** — no delete (see [[auditing.domain]]).
|
|
13
|
+
- Retention: registry + version history per regulatory policy (registration lifetime + statutory tail); `AuditRecord` per [[auditing.domain]]; daily encrypted backups.
|
|
14
|
+
|
|
15
|
+
## Constraints & concurrency
|
|
16
|
+
- Persistence-level **unique constraints** on NDC and Package NDC, beyond the aggregate check (see [[ndc]], [[domain-driven-design.domain]]).
|
|
17
|
+
- Optimistic concurrency token → FHIR **weak** ETag at the projection boundary (see [[fhir]]).
|
|
18
|
+
|
|
19
|
+
## Dev data
|
|
20
|
+
- Fixtures use synthetic data + **synthetic/clearly-marked test NDCs** — never real identifiers that could collide with the FDA NDC directory (see [[ndc]], [[testing.domain]]).
|
|
21
|
+
|
|
22
|
+
## Related
|
|
23
|
+
- [[persistence]] · [[auditing.domain]] · [[data-provenance]] · [[product-lifecycle.domain]] · [[ndc]] · [[fhir]] · [[domain-driven-design.domain]] · [[testing.domain]]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Glossary — Pharmaceutical Terms
|
|
2
|
+
|
|
3
|
+
> Ubiquitous language for the medicinal product registry. Commands: `/aw-spec-constitution`, `/aw-spec-specify`. See [[domain-driven-design.domain]] (modeling), [[terminology]] (coding), [[integration-terms]] (interop).
|
|
4
|
+
|
|
5
|
+
| Term | Definition |
|
|
6
|
+
|---|---|
|
|
7
|
+
| **MedicinalProduct** | The **Aggregate Root** — authoritative record of a registered medicine (ProductRegistry); owns ingredients, packaging, marketing authorization; aligned to IDMP *Medicinal Product* (see [[idmp]], [[domain-driven-design.domain]]). |
|
|
8
|
+
| **NDC** | US FDA product identifier (Labeler + Product + Package); the `NdcCode` VO; unique, format-validated (see [[ndc]]). |
|
|
9
|
+
| **PackageIdentifier** | Package-level NDC on a `PackagingConfiguration` (see [[ndc]]). |
|
|
10
|
+
| **ActiveIngredient** | **Entity**: Name, UNII, Strength, Strength Unit; **>= 1** per product (see [[domain-driven-design.domain]]). |
|
|
11
|
+
| **Substance / ActiveMoiety** | Chemical substance + active moiety; UNII-identified (see [[terminology]]); FHIR `Substance`. |
|
|
12
|
+
| **Strength** | Active-ingredient amount per dose unit — `Strength` VO (numerator/denominator `Quantity`, UCUM) (see [[terminology]]). |
|
|
13
|
+
| **DosageForm** | Physical form (tablet/capsule/solution); coded (SNOMED CT); `DosageForm` VO (see [[terminology]]). |
|
|
14
|
+
| **RouteOfAdministration** | Administration path (oral/IV/topical); coded; `RouteOfAdministration` VO (see [[terminology]]). |
|
|
15
|
+
| **AtcCode** | WHO ATC class code; **multiple per product**; validated against configured sets (see [[atc]]). |
|
|
16
|
+
| **MarketingStatus** | Regulatory marketing state (`MarketingStatus` VO); distinct from lifecycle state (see [[product-lifecycle.domain]]). |
|
|
17
|
+
| **MarketingAuthorization** | **Entity** — authorization granted by a regulator; IDMP-aligned (see [[idmp]]). |
|
|
18
|
+
| **MarketingAuthorizationHolder (MAH)** | Organization holding the authorization; FHIR `Organization`. |
|
|
19
|
+
| **Labeler** | Firm whose Labeler Code forms the first NDC segment (see [[ndc]]). |
|
|
20
|
+
| **PackagingConfiguration** | **Entity**: Package NDC, Description, Quantity, Unit of Measure; **>= 1** per product (see [[domain-driven-design.domain]]). |
|
|
21
|
+
| **ManufacturedItem / PharmaceuticalProduct** | IDMP concepts: manufactured dose-form item + administrable product (see [[idmp]]). |
|
|
22
|
+
| **ProvenanceRecord** | Provenance for externally sourced data (source, method, timestamp, agent) (see [[data-provenance]]). |
|
|
23
|
+
| **AuditRecord** | Append-only audit entry for create/modify/retire/identifier/classification changes (see [[auditing.domain]]). |
|
|
24
|
+
| **ProductVersion** | Queryable historical snapshot of product information (see [[persistence.domain]]). |
|
|
25
|
+
|
|
26
|
+
## Related
|
|
27
|
+
- [[domain-driven-design.domain]] · [[idmp]] · [[ndc]] · [[atc]] · [[terminology]] · [[fhir]] · [[integration-terms]] · [[product-lifecycle.domain]] · [[data-provenance]]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Product Lifecycle — Medicinal Product State Machine
|
|
2
|
+
|
|
3
|
+
> Technology base: [[domain-driven-design]]. NON-NEGOTIABLE. Commands: `/aw-spec-constitution`, `/aw-spec-specify`.
|
|
4
|
+
|
|
5
|
+
## States
|
|
6
|
+
`Draft` → `Under Review` → `Approved` → `Active` → `Discontinued` / `Withdrawn`
|
|
7
|
+
- Lifecycle state is owned by the aggregate root and is distinct from the `MarketingStatus` value object, though the two MUST stay consistent (see [[domain-driven-design.domain]]).
|
|
8
|
+
|
|
9
|
+
## Valid transitions (guarded; any other rejected as `lifecycle.invalid_transition`)
|
|
10
|
+
| From | Allowed to |
|
|
11
|
+
|---|---|
|
|
12
|
+
| Draft | Under Review |
|
|
13
|
+
| Under Review | Approved, Draft (returned for correction) |
|
|
14
|
+
| Approved | Active |
|
|
15
|
+
| Active | Discontinued, Withdrawn |
|
|
16
|
+
| Discontinued | Withdrawn |
|
|
17
|
+
| Withdrawn | *(terminal)* |
|
|
18
|
+
|
|
19
|
+
The allowed set MAY be configurable policy, but the default above is enforced; no transition bypasses the guard.
|
|
20
|
+
|
|
21
|
+
## Guards
|
|
22
|
+
- Leaving **Draft** requires registration completeness (all required attributes, >= 1 ingredient, >= 1 packaging, valid NDC/dosage form/route/ATC) (see [[domain-driven-design.domain]], [[ndc]], [[terminology]], [[atc]]).
|
|
23
|
+
- Approve/activate/retire are **authorized** actions — only `RegulatoryOfficer` (see [[authorization.domain]]).
|
|
24
|
+
- Retirement is a **logical** state change, never a hard delete (see [[persistence.domain]], [[auditing.domain]]).
|
|
25
|
+
|
|
26
|
+
## Events
|
|
27
|
+
Each transition emits a domain event (`MedicinalProductSubmittedForReview`/`Approved`/`Activated`/`Discontinued`/`Withdrawn`) and is audit-mandatory (see [[eventing.domain]], [[auditing.domain]]).
|
|
28
|
+
|
|
29
|
+
## Related
|
|
30
|
+
- [[domain-driven-design.domain]] · [[authorization.domain]] · [[ndc]] · [[terminology]] · [[atc]] · [[eventing.domain]] · [[auditing.domain]] · [[persistence.domain]]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Regulatory & Compliance Standards — Pharma
|
|
2
|
+
|
|
3
|
+
> NON-NEGOTIABLE. Commands: `/aw-spec-constitution`, `/aw-spec-specify`.
|
|
4
|
+
|
|
5
|
+
> Umbrella for the compliance requirements — mechanisms live in the linked files.
|
|
6
|
+
|
|
7
|
+
## Posture
|
|
8
|
+
- Built for **regulatory compliance readiness** — auditability, traceability, data integrity, provenance designed in.
|
|
9
|
+
- GxP-relevant records follow **ALCOA+** (Attributable, Legible, Contemporaneous, Original, Accurate + Complete, Consistent, Enduring, Available).
|
|
10
|
+
|
|
11
|
+
## Requirements
|
|
12
|
+
- **Audit trail** — immutable records for product creation, modification, retirement, identifier changes, classification changes; each carries User, Timestamp, Action, Previous Value, New Value (see [[auditing.domain]]).
|
|
13
|
+
- **Provenance** — capture source/method/agent/timestamp for externally sourced data (see [[data-provenance]]).
|
|
14
|
+
- **Versioning** — full, queryable version history of product information (see [[persistence.domain]]).
|
|
15
|
+
- **Traceability** — every change to identifiers (NDC), classification (ATC), ingredients, packaging, marketing status, lifecycle is traceable command → event → audit record → version snapshot (see [[eventing.domain]], [[auditing.domain]], [[persistence.domain]]).
|
|
16
|
+
- **Authorized actions** — registration, approval, retirement are authorized operations (see [[authorization.domain]], [[product-lifecycle.domain]]).
|
|
17
|
+
|
|
18
|
+
## Related
|
|
19
|
+
- [[auditing.domain]] · [[data-provenance]] · [[persistence.domain]] · [[eventing.domain]] · [[product-lifecycle.domain]] · [[authorization.domain]] · [[domain-driven-design.domain]]
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Terminology Standards — Pharma
|
|
2
|
+
|
|
3
|
+
> NON-NEGOTIABLE. Commands: `/aw-spec-constitution`, `/aw-spec-specify`.
|
|
4
|
+
|
|
5
|
+
## Coded value objects
|
|
6
|
+
- **Coded data MUST use industry terminologies — free-text strings for coded concepts are FORBIDDEN.**
|
|
7
|
+
- Every code-bearing field is a **`Codeable` value object** `{ system, code, version, display }` (mirrors FHIR `CodeableConcept`/`Coding`; see [[fhir]]).
|
|
8
|
+
|
|
9
|
+
## Standard terminologies
|
|
10
|
+
| Concept | Terminology | Conformance |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| Product / package identity | **NDC** | SHALL (see [[ndc]]) |
|
|
13
|
+
| Substances / active ingredients | **UNII** | SHOULD |
|
|
14
|
+
| Substance / clinical drug | **RxNorm** | SHOULD |
|
|
15
|
+
| Dosage form / route / classification | **SNOMED CT** | SHOULD |
|
|
16
|
+
| Therapeutic classification | **WHO ATC** | SHALL (see [[atc]]) |
|
|
17
|
+
| Units (strength, package qty) | **UCUM** | SHALL |
|
|
18
|
+
|
|
19
|
+
- **UNII** is the substance identity for IDMP `Substance` alignment (see [[idmp]]) and maps to FHIR `Substance.code`.
|
|
20
|
+
|
|
21
|
+
## Validation
|
|
22
|
+
- Hard-coded coded literals FORBIDDEN outside the Terminology module's seed data.
|
|
23
|
+
- Never invent NDC/UNII/RxNorm/SNOMED/ATC/UCUM codes — confirm against value sets (see [[ai-rules.domain]]).
|
|
24
|
+
- Invalid dosage forms/routes rejected at validation time; the bound value set is configuration (see [[domain-driven-design.domain]]).
|
|
25
|
+
|
|
26
|
+
## Terminology module
|
|
27
|
+
- Lookup/validation/expansion **MUST** go through a dedicated **Terminology module** (internal cache or external TS via FHIR `$expand` / `$validate-code`).
|
|
28
|
+
- Aggregates: `CodeSystem`, `ValueSet`, `ConceptMap` (subsets; expansions cached from RxNorm/SNOMED/FDA UNII-NDC/WHO ATC).
|
|
29
|
+
- Code-set versions are pinned + recorded; a terminology release (e.g. WHO ATC annual update) is a tracked, audited change (see [[auditing.domain]]).
|
|
30
|
+
|
|
31
|
+
## Related
|
|
32
|
+
- [[ndc]] · [[atc]] · [[idmp]] · [[fhir]] · [[domain-driven-design.domain]] · [[testing.domain]] · [[ai-rules.domain]]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Testing — Pharma Domain Addenda
|
|
2
|
+
|
|
3
|
+
> Technology base: [[testing]]. Commands: `/aw-spec-gate`.
|
|
4
|
+
|
|
5
|
+
## What MUST be tested
|
|
6
|
+
- **Aggregate invariants** — required attributes; >= 1 ActiveIngredient; >= 1 PackagingConfiguration; NDC uniqueness + format; invalid dosage forms/routes rejected (see [[domain-driven-design.domain]], [[ndc]], [[terminology]]).
|
|
7
|
+
- **Lifecycle state machine** — every allowed transition passes; every disallowed one is rejected (see [[product-lifecycle.domain]]).
|
|
8
|
+
- **NDC validation** — segment configurations, configurable rules, duplicate detection (see [[ndc]]).
|
|
9
|
+
- **Terminology binding** — ATC/UNII/SNOMED/RxNorm/UCUM validated against value sets; invented codes rejected (see [[terminology]], [[atc]]).
|
|
10
|
+
- **FHIR round-trip** — `domain -> FHIR -> domain` for Medication/MedicationKnowledge/Substance/Organization; FHIR validator passes (CI gate; see [[fhir]]).
|
|
11
|
+
- **Audit & versioning** — every audited op writes an immutable record (User/Timestamp/Action/Previous/New); historical versions remain queryable (see [[auditing.domain]], [[persistence.domain]]).
|
|
12
|
+
- **Provenance** — external imports attach a `ProvenanceRecord` (see [[data-provenance]]).
|
|
13
|
+
|
|
14
|
+
## Test data & gates
|
|
15
|
+
- Use **synthetic/clearly-marked test NDCs and codes** — never real identifiers that could collide with the FDA NDC directory (see [[persistence.domain]], [[ndc]]); pin the terminology code-set version under test (see [[terminology]]).
|
|
16
|
+
- CI: FHIR validator passes for every modified resource/profile/example; HL7 outbound conformance checked against the internal corpus (see [[hl7]]).
|
|
17
|
+
|
|
18
|
+
## Related
|
|
19
|
+
- [[testing]] · [[domain-driven-design.domain]] · [[product-lifecycle.domain]] · [[ndc]] · [[terminology]] · [[atc]] · [[fhir]] · [[auditing.domain]] · [[persistence.domain]] · [[data-provenance]] · [[hl7]]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Vertical Slices — Pharma Domain Addenda
|
|
2
|
+
|
|
3
|
+
> Technology base: [[vertical-slices]]. Commands: `/aw-spec-specify`, `/aw-spec-gate`.
|
|
4
|
+
|
|
5
|
+
## Interop adapters in the slice
|
|
6
|
+
`{Module}/Interop/` carries the pharma external-protocol adapters:
|
|
7
|
+
```
|
|
8
|
+
Fhir/ Medication / MedicationKnowledge / Substance / Organization projectors (see [[fhir]])
|
|
9
|
+
Hl7v2/ inbound parsers + outbound emitters (added when a consumer needs them) (see [[hl7]])
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Rules
|
|
13
|
+
- FHIR resources live in a **parallel projection layer** and **MUST NOT** replace internal `Shared` DTOs; projections, never the system of record (see [[fhir]], [[domain-driven-design.domain]]).
|
|
14
|
+
- Domain DTOs (`MedicinalProductDto`, `ActiveIngredientDto`, `PackagingConfigurationDto`) — no setters, required `init`, base64 `RowVersionBase64` (see [[coding-standards.domain]]).
|
|
15
|
+
|
|
16
|
+
## Related
|
|
17
|
+
- [[vertical-slices]] · [[fhir]] · [[hl7]] · [[domain-driven-design.domain]] · [[coding-standards.domain]]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Zero-Trust — Pharma Domain Addenda
|
|
2
|
+
|
|
3
|
+
> Technology base: [[zero-trust]]. Commands: `/aw-spec-constitution`, `/aw-spec-specify`, `/aw-spec-gate`.
|
|
4
|
+
|
|
5
|
+
## Rules
|
|
6
|
+
- All registry traffic MUST be TLS-encrypted; commercially-sensitive pre-market data in transit MUST be TLS-protected; at-rest: see [[data-classification.domain]], [[persistence.domain]].
|
|
7
|
+
- FHIR/REST scopes (`system/Medication.read`, `system/*.write` for authorized backends) enforced on every endpoint + propagated through the pipeline. **No patient-context (SMART) launch** — product master data (see [[authorization.domain]], [[fhir]]).
|
|
8
|
+
- Mutating operations **re-check change authority** at the handler edge (only `RegulatoryOfficer` approves/retires; identifier/classification changes are privileged) (see [[authorization.domain]]).
|
|
9
|
+
- Trace context MUST propagate across outbound **FHIR / HL7v2** calls and the CloudEvents stream (see [[eventing.domain]], [[auditing.domain]]).
|
|
10
|
+
|
|
11
|
+
## Related
|
|
12
|
+
- [[zero-trust]] · [[authorization.domain]] · [[data-classification.domain]] · [[persistence.domain]] · [[auditing.domain]] · [[eventing.domain]] · [[fhir]]
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# DOMAIN REQUIREMENTS (project-specific)
|
|
2
|
+
|
|
3
|
+
> Project-specific input, **authored by the project owner** and updated independently per
|
|
4
|
+
> project. It is the last file in the set mapped under `## /aw-spec-constitution` in
|
|
5
|
+
> `domain-rule-bindings.md`, and the only one there expected to differ between two projects on this
|
|
6
|
+
> corpus; the standard industry rules beside it are shared. Its mapping is optional — a project
|
|
7
|
+
> that has not authored it yet ratifies the standard set alone.
|
|
8
|
+
>
|
|
9
|
+
> This file holds the per-project enumeration and headline profiles. Detailed domain *rules*
|
|
10
|
+
> are expanded in the sibling files in this folder.
|
|
11
|
+
>
|
|
12
|
+
> Replace `<SampleProjectName>` and the bounded-context list below for a new project.
|
|
13
|
+
|
|
14
|
+
=====================================================================
|
|
15
|
+
[DOMAIN: Bounded Contexts / Modules]
|
|
16
|
+
=====================================================================
|
|
17
|
+
- Patients — aggregates: Patient (master patient index), Consent, RelatedPerson; cross-references via PIX/PDQ.
|
|
18
|
+
- Appointments — aggregates: Appointment, Slot, Schedule, Waitlist.
|
|
19
|
+
- Encounters — aggregates: Encounter (inpatient, outpatient, emergency), Admission, Transfer, Discharge.
|
|
20
|
+
- EMR — aggregates: ClinicalNote, ProblemList, AllergyIntolerance, MedicationStatement, Observation (vitals, social history), Immunization, CarePlan, ServiceRequest, Procedure.
|
|
21
|
+
- Radiology — aggregates: ImagingOrder, ImagingStudy (DICOM metadata), DiagnosticReport (radiology); pixel data lives in PACS/VNA.
|
|
22
|
+
- Lab — aggregates: LabOrder, Specimen, Observation (lab result), DiagnosticReport (lab).
|
|
23
|
+
- Pharmacy — aggregates: MedicationRequest, MedicationDispense, MedicationAdministration, Formulary, ControlledSubstanceLedger.
|
|
24
|
+
- Billing — aggregates: ChargeItem, Invoice, Claim, ClaimResponse, PaymentReconciliation, Account, AdjustmentEntry.
|
|
25
|
+
- Insurance — aggregates: Coverage, Payer, Plan, EligibilityRequest, EligibilityResponse, PriorAuth.
|
|
26
|
+
- Inventory — aggregates: InventoryItem, Lot, StockMovement, Reservation, ExpiryAlert.
|
|
27
|
+
- Interoperability — aggregates: IntegrationEndpoint, MessageEnvelope (HL7v2), FhirSubscription, BulkExportJob.
|
|
28
|
+
- PatientPortal — aggregates: PortalAccount (identity-bound), MessageThread, AppointmentRequest, RecordAccessRequest.
|
|
29
|
+
- Identity — aggregates: Practitioner, PractitionerRole, Organization, Location, HealthcareService.
|
|
30
|
+
- Auditing — aggregates: AuditRecord (append-only, ATNA + FHIR AuditEvent shape).
|
|
31
|
+
- Terminology — aggregates: CodeSystem, ValueSet, ConceptMap (project-managed subsets; expansions cached from external TS).
|
|
32
|
+
|
|
33
|
+
=====================================================================
|
|
34
|
+
[DOMAIN: subsection pointers]
|
|
35
|
+
=====================================================================
|
|
36
|
+
[DOMAIN: Aggregates and Business Invariants] -> guardrails/domain/healthcare/domain-driven-design.domain.md
|
|
37
|
+
[DOMAIN: Persistence Profile] -> guardrails/domain/healthcare/persistence.domain.md
|
|
38
|
+
[DOMAIN: Security Profile] -> guardrails/domain/healthcare/authorization.domain.md, guardrails/domain/healthcare/data-classification.domain.md
|
|
39
|
+
[DOMAIN: Testing Profile] -> guardrails/domain/healthcare/testing.domain.md
|
|
40
|
+
[DOMAIN: AI Policy Addenda] -> guardrails/domain/healthcare/ai-rules.domain.md
|
|
41
|
+
[DOMAIN: Platform Topology] -> below
|
|
42
|
+
|
|
43
|
+
=====================================================================
|
|
44
|
+
[DOMAIN: Platform Topology]
|
|
45
|
+
=====================================================================
|
|
46
|
+
- Target runtime: Kubernetes (AKS, EKS, or on-prem). Single-region by default; multi-region active/passive for DR.
|
|
47
|
+
- External dependencies (Aspire resources): PostgreSQL (primary), Redis (cache + portal session), a message broker (Azure Service Bus, AWS SQS/SNS, or RabbitMQ) for CloudEvents, an OTel collector, the configured IdP, an external Terminology Service (optional), a FHIR validator container, a PACS/VNA endpoint (DICOMweb), an HL7v2 broker (MLLP), an SMTP/SMS gateway, an object store (S3/Blob) for binaries.
|
|
48
|
+
- Scale targets: P95 read latency < 200 ms at 200 RPS per module; FHIR search P95 < 500 ms; HL7v2 ingest sustains 50 messages/sec per channel.
|
|
49
|
+
- Disaster recovery: RPO <= 15 minutes, RTO <= 4 hours; daily encrypted backups with 35-day retention plus monthly archive >= 7 years.
|
|
50
|
+
|
|
51
|
+
=====================================================================
|
|
52
|
+
[DOMAIN: Governance Overrides]
|
|
53
|
+
=====================================================================
|
|
54
|
+
- Principal Engineers (approvers): TBD — fill at ratification.
|
|
55
|
+
- Security/Compliance Officer (mandatory approver for any PHI/security change): TBD.
|
|
56
|
+
- Domain Owners (per module): TBD — assign one clinical and one technical owner per bounded context.
|
|
57
|
+
- Quarterly review cadence: first business week of each quarter; security review additionally after every significant regulatory update.
|
|
58
|
+
- Exception process: a time-boxed waiver via a Waiver Request issue, approved by a Principal Engineer + the Compliance Officer, with a mandatory expiry <= 90 days and a remediation plan recorded in the issue.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# dotnet-default-project — Command → Domain-Rule-File Map
|
|
2
|
+
|
|
3
|
+
Per-command list of the **domain** rule files this project loads (via `resolve-domain`
|
|
4
|
+
+ the `domain-select` module, into the sticky standards set) for the spec-anchored
|
|
5
|
+
orchestrator pipeline. This project draws its domain from the **healthcare** corpus.
|
|
6
|
+
|
|
7
|
+
**The model:** domain files feed
|
|
8
|
+
only three consumers — **specify** (authors them into the spec as FR/BR/CN-/DC-/IC-),
|
|
9
|
+
**constitution** (the domain principles), and the **gates** (conformance checklist).
|
|
10
|
+
**design** and **implement** load **NO** domain file — the domain reaches them solely
|
|
11
|
+
through the spec/design (as CN-/DC-/IC- ids).
|
|
12
|
+
|
|
13
|
+
- All paths are workspace-relative. The **standard industry rules** live in
|
|
14
|
+
`guardrails/domain/healthcare/` — shared, reusable by every project that maps them. The
|
|
15
|
+
one file this project authors, `domain/domain-requirements.md`, lives beside this map.
|
|
16
|
+
- A mapped file that does not exist is skipped rather than failing the run, so a project
|
|
17
|
+
that has not authored its `domain-requirements.md` yet still gets the standard set.
|
|
18
|
+
- `resolve-domain --command <name>` collects the `- ` bullets under `## /<name>`.
|
|
19
|
+
- To govern a different industry, repoint these bullets at another
|
|
20
|
+
`guardrails/domain/<industry>/` corpus — `guardrails/domain/pharma/` also ships. Nothing
|
|
21
|
+
else changes: the technical map, the workflows and the engine are untouched.
|
|
22
|
+
- This file is the **canonical domain mapping** for this project; `/appweaver
|
|
23
|
+
select-domain` selects this project folder as active.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## /aw-spec-constitution
|
|
28
|
+
<!-- What the DOMAIN half ratifies into constitution.domain.md as domain principles XVI+.
|
|
29
|
+
The industry constitution first, then the STANDARD industry rules — identity,
|
|
30
|
+
regulatory, interop, security overlays — which every project on this corpus shares, and
|
|
31
|
+
LAST the PROJECT-SUPPLIED domain-requirements.md the project team authors. Only that
|
|
32
|
+
last file is expected to differ between two projects on the same corpus, and its mapping is
|
|
33
|
+
OPTIONAL: the project owner supplies the file, and where it is absent the set loads
|
|
34
|
+
without it rather than failing. -->
|
|
35
|
+
- guardrails/domain/healthcare/domain-constitution.md
|
|
36
|
+
- guardrails/domain/healthcare/clinical-terms.md
|
|
37
|
+
- guardrails/domain/healthcare/terminology.md
|
|
38
|
+
- guardrails/domain/healthcare/consent.md
|
|
39
|
+
- guardrails/domain/healthcare/hipaa.md
|
|
40
|
+
- guardrails/domain/healthcare/fhir.md
|
|
41
|
+
- guardrails/domain/healthcare/hl7.md
|
|
42
|
+
- guardrails/domain/healthcare/dicom.md
|
|
43
|
+
- guardrails/domain/healthcare/data-classification.domain.md
|
|
44
|
+
- guardrails/domain/healthcare/auditing.domain.md
|
|
45
|
+
- guardrails/domain/healthcare/authorization.domain.md
|
|
46
|
+
- guardrails/domain/healthcare/zero-trust.domain.md
|
|
47
|
+
- guardrails/domain/healthcare/ai-rules.domain.md
|
|
48
|
+
- guardrails/projects/dotnet-default-project/domain/domain-requirements.md
|
|
49
|
+
|
|
50
|
+
## /aw-spec-specify
|
|
51
|
+
<!-- The FULL domain set. Specify models the domain COMPLETELY and LIFTS the constraint
|
|
52
|
+
overlays into the spec's CN-/DC-/IC- sections (design/implement never see these files). -->
|
|
53
|
+
- guardrails/projects/dotnet-default-project/domain/domain-requirements.md
|
|
54
|
+
- guardrails/domain/healthcare/domain-driven-design.domain.md
|
|
55
|
+
- guardrails/domain/healthcare/clinical-terms.md
|
|
56
|
+
- guardrails/domain/healthcare/terminology.md
|
|
57
|
+
- guardrails/domain/healthcare/integration-terms.md
|
|
58
|
+
- guardrails/domain/healthcare/consent.md
|
|
59
|
+
- guardrails/domain/healthcare/hipaa.md
|
|
60
|
+
- guardrails/domain/healthcare/fhir.md
|
|
61
|
+
- guardrails/domain/healthcare/hl7.md
|
|
62
|
+
- guardrails/domain/healthcare/dicom.md
|
|
63
|
+
- guardrails/domain/healthcare/data-classification.domain.md
|
|
64
|
+
- guardrails/domain/healthcare/persistence.domain.md
|
|
65
|
+
- guardrails/domain/healthcare/cqrs.domain.md
|
|
66
|
+
- guardrails/domain/healthcare/eventing.domain.md
|
|
67
|
+
- guardrails/domain/healthcare/auditing.domain.md
|
|
68
|
+
- guardrails/domain/healthcare/authorization.domain.md
|
|
69
|
+
- guardrails/domain/healthcare/zero-trust.domain.md
|
|
70
|
+
- guardrails/domain/healthcare/api-versioning.domain.md
|
|
71
|
+
- guardrails/domain/healthcare/vertical-slices.domain.md
|
|
72
|
+
|
|
73
|
+
## /aw-spec-design
|
|
74
|
+
_None — design loads no domain file. Domain reaches design only through the spec (BR-/CN-/DC-/IC-)._
|
|
75
|
+
|
|
76
|
+
## /aw-spec-implement
|
|
77
|
+
_None — implement loads no domain file. Domain reaches implement only through design.md. Framework
|
|
78
|
+
components are added separately via `/appweaver add-component`._
|
|
79
|
+
|
|
80
|
+
## /aw-spec-gate
|
|
81
|
+
<!-- Conformance checklist for the gates (analyze-design · analyze-slice): the domain-derived
|
|
82
|
+
constraints design/implement were NOT given as authoring input, VALIDATED against the
|
|
83
|
+
output. Domain re-enters here as a check, never as authoring input. -->
|
|
84
|
+
- guardrails/domain/healthcare/persistence.domain.md
|
|
85
|
+
- guardrails/domain/healthcare/cqrs.domain.md
|
|
86
|
+
- guardrails/domain/healthcare/eventing.domain.md
|
|
87
|
+
- guardrails/domain/healthcare/auditing.domain.md
|
|
88
|
+
- guardrails/domain/healthcare/authorization.domain.md
|
|
89
|
+
- guardrails/domain/healthcare/zero-trust.domain.md
|
|
90
|
+
- guardrails/domain/healthcare/data-classification.domain.md
|
|
91
|
+
- guardrails/domain/healthcare/api-versioning.domain.md
|
|
92
|
+
- guardrails/domain/healthcare/vertical-slices.domain.md
|
|
93
|
+
- guardrails/domain/healthcare/folder-structure.domain.md
|
|
94
|
+
- guardrails/domain/healthcare/coding-standards.domain.md
|
|
95
|
+
- guardrails/domain/healthcare/dependency-policy.domain.md
|
|
96
|
+
- guardrails/domain/healthcare/testing.domain.md
|
|
97
|
+
- guardrails/domain/healthcare/ai-rules.domain.md
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Quick reference (command → domain file count)
|
|
102
|
+
|
|
103
|
+
| Command | Domain rule files | Role |
|
|
104
|
+
|---|---|---|
|
|
105
|
+
| /aw-spec-constitution | 14 | domain principles (XVI+) — the industry constitution + standard industry rules + the project's own requirements |
|
|
106
|
+
| /aw-spec-specify | 19 | author into spec (lift → CN-/DC-/IC-) |
|
|
107
|
+
| /aw-spec-design | 0 | none — spec is the only domain input |
|
|
108
|
+
| /aw-spec-implement | 0 | none — design is the only domain input |
|
|
109
|
+
| /aw-spec-gate | 14 | conformance checklist (validate, don't author) |
|
|
110
|
+
|
|
111
|
+
> Retired in the orchestrator pipeline: `/aw-spec-plan`, `/aw-spec-tasks`, `/aw-spec-taskplan`,
|
|
112
|
+
> `/aw-spec-clarify`, `/aw-spec-analyze` (clarify folds into specify; plan/tasks into design). The
|
|
113
|
+
> collapsed tiers `/aw-spec-fast-implement` and `/aw-spec-minimal-implementation` are pending a ruling.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# UI Requirements — project-supplied
|
|
2
|
+
|
|
3
|
+
> **This file is authored by the project team, not by the corpus.**
|
|
4
|
+
> `guardrails/technology/nextjs/ui-constitution.md` is the standard frontend rule set for that
|
|
5
|
+
> stack, reusable by every project that maps it. This file is where one project's own experience
|
|
6
|
+
> decisions go.
|
|
7
|
+
|
|
8
|
+
It is mapped under `## /aw-spec-ui-constitution` in `tech-rule-bindings.md`, so its
|
|
9
|
+
content is ratified into `constitution.ui.md` alongside the standard rules.
|
|
10
|
+
|
|
11
|
+
Keep it **domain-free**, exactly like the standard set: regulatory and terminology rules
|
|
12
|
+
belong to `domain-constitution.md`, and reach the UI lane through the spec.
|
|
13
|
+
|
|
14
|
+
## Declared Lane
|
|
15
|
+
|
|
16
|
+
<!-- The lane id, its stack and the root it owns. Must match .appweaver/stacks.json where that
|
|
17
|
+
file exists — STACK-MISMATCH: is the failure, not a silent rewrite. -->
|
|
18
|
+
|
|
19
|
+
## Design System
|
|
20
|
+
|
|
21
|
+
<!-- Which design system and token set this project adopts, its version, and who may change
|
|
22
|
+
it. UX-II makes it the only source of visual truth; this says WHICH one. -->
|
|
23
|
+
|
|
24
|
+
## Conformance Target
|
|
25
|
+
|
|
26
|
+
<!-- The accessibility conformance level this project commits to, and the waiver authority.
|
|
27
|
+
UX-I makes it non-negotiable; this names the level. -->
|
|
28
|
+
|
|
29
|
+
## Performance Budget
|
|
30
|
+
|
|
31
|
+
<!-- Core Web Vitals thresholds and the per-route JavaScript budget CI enforces. UX-IX makes
|
|
32
|
+
the budget a gate; this sets the numbers. -->
|
|
33
|
+
|
|
34
|
+
## Deviations from the Standard Rules
|
|
35
|
+
|
|
36
|
+
<!-- Each deviation: which UX-* principle, what this project does instead, why, and who
|
|
37
|
+
approved it. Empty is the expected state for a new project. -->
|
|
38
|
+
|
|
39
|
+
## Ratification Metadata
|
|
40
|
+
|
|
41
|
+
- **Version:** 0.1.0
|
|
42
|
+
- **Ratified:** `<YYYY-MM-DD>`
|
|
43
|
+
- **Last Amended:** `<YYYY-MM-DD>`
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Technical Requirements — project-supplied
|
|
2
|
+
|
|
3
|
+
> **This file is authored by the project team, not by the corpus.** The rules this project's
|
|
4
|
+
> technical map lists live in `guardrails/technology/dotnet-webapi/` — the standard set for that
|
|
5
|
+
> stack, reusable by every project that maps it. This file is where one project's own technology
|
|
6
|
+
> decisions go, and it is the only technical file a second project on the same stack replaces.
|
|
7
|
+
|
|
8
|
+
It is mapped under `## /aw-spec-constitution` in `tech-rule-bindings.md`, so its content
|
|
9
|
+
is ratified into `constitution.technical.md` alongside the standard rules — which is what
|
|
10
|
+
lets a project's own constraints become governed principles rather than folklore.
|
|
11
|
+
|
|
12
|
+
Where this file is silent, the standard rules govern unchanged. Where it adds a constraint,
|
|
13
|
+
say which standard rule it extends, so the ratified principle can cite both.
|
|
14
|
+
|
|
15
|
+
## Project Identity
|
|
16
|
+
|
|
17
|
+
<!-- Project name, mission, the bounded contexts it owns, and its deployment posture. -->
|
|
18
|
+
|
|
19
|
+
## Technology Decisions
|
|
20
|
+
|
|
21
|
+
<!-- The choices this project has made WITHIN the standard rules: target framework version,
|
|
22
|
+
database engine and hosting, messaging broker, identity provider, cloud target. State
|
|
23
|
+
the decision, not the tutorial. -->
|
|
24
|
+
|
|
25
|
+
## Deviations from the Standard Rules
|
|
26
|
+
|
|
27
|
+
<!-- Each deviation: which standard rule, what this project does instead, why, and who
|
|
28
|
+
approved it. A deviation with no approver is a defect, not a decision. Empty is the
|
|
29
|
+
expected state for a new project. -->
|
|
30
|
+
|
|
31
|
+
## Project-Specific Constraints
|
|
32
|
+
|
|
33
|
+
<!-- Performance budgets, availability targets, data residency, integration deadlines, or
|
|
34
|
+
anything else that must become a governed principle for THIS project. -->
|
|
35
|
+
|
|
36
|
+
## Ratification Metadata
|
|
37
|
+
|
|
38
|
+
- **Version:** 0.1.0
|
|
39
|
+
- **Ratified:** `<YYYY-MM-DD>`
|
|
40
|
+
- **Last Amended:** `<YYYY-MM-DD>`
|