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,251 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# aw-spec-analyze-delta-design (orchestrator) — the delta-spec↔delta-design GATE
|
|
3
|
+
#
|
|
4
|
+
# The CR analog of analyze-design, scoped to the OPEN change. The delta spec is the
|
|
5
|
+
# ANCHOR: confirm delta-design.md STRICTLY realises delta-spec.md (+ the domain gate
|
|
6
|
+
# overlays as a backstop), and that every MODIFIED element names a real element in
|
|
7
|
+
# the master design.md. On drift, REPORT the gaps and ASK whether to repair, then
|
|
8
|
+
# UPDATE delta-design.md to conform (the delta spec wins). This stage VALIDATES the
|
|
9
|
+
# delta only — it does NOT touch spec.md / design.md and does NOT close the change
|
|
10
|
+
# (finalize-delta merges the delta later; close-delta closes it at the very end).
|
|
11
|
+
#
|
|
12
|
+
# specify → design → ⟨review⟩ → analyze-delta-design ← you are here
|
|
13
|
+
# → implement-delta → build → finalize-delta → analyze-slice → close-delta
|
|
14
|
+
#
|
|
15
|
+
# Launch: /appweaver analyze-delta-design [strategy]
|
|
16
|
+
# Prereq: /appweaver specify (delta-spec) + design (delta-design) — an OPEN change with both delta docs.
|
|
17
|
+
# =============================================================================
|
|
18
|
+
|
|
19
|
+
name: aw-spec-analyze-delta-design
|
|
20
|
+
description: The delta-spec↔delta-design conformance gate for an open change — confirm delta-design.md realises delta-spec.md (delta spec is the anchor; domain overlays are a backstop; MODIFIED elements must exist in the master design) and, with approval, repair it. Does not modify the master docs or close the change.
|
|
21
|
+
version: 1.0.0
|
|
22
|
+
agent_agnostic: true
|
|
23
|
+
dialect: aw-spec.orchestrator/v1
|
|
24
|
+
|
|
25
|
+
scripts:
|
|
26
|
+
actions:
|
|
27
|
+
sh: .appweaver/scripts/bash/aw-spec-actions.sh
|
|
28
|
+
ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
|
|
29
|
+
|
|
30
|
+
standards:
|
|
31
|
+
- { path: .appweaver/ai-rules.md } # kit-resident: the universal operating rules, every flow
|
|
32
|
+
|
|
33
|
+
vars:
|
|
34
|
+
analyze_ok: "false"
|
|
35
|
+
active_change: ""
|
|
36
|
+
has_change: "false"
|
|
37
|
+
|
|
38
|
+
workflow:
|
|
39
|
+
|
|
40
|
+
# 1. Resolve the current feature + its spec; require the spec (delta context base).
|
|
41
|
+
- id: feature_paths
|
|
42
|
+
action: execute_script
|
|
43
|
+
on_error: continue # never crash raw on 'no feature set' — the gate below explains it
|
|
44
|
+
script: { ref: actions }
|
|
45
|
+
subcommand: feature-paths
|
|
46
|
+
outputs:
|
|
47
|
+
- { name: feature_dir, from: "$.feature_dir" }
|
|
48
|
+
- { name: spec_file, from: "$.spec_file" }
|
|
49
|
+
- { name: spec_exists, from: "$.spec_exists" }
|
|
50
|
+
|
|
51
|
+
- id: require_feature
|
|
52
|
+
action: verify_context
|
|
53
|
+
require_non_empty: feature_dir
|
|
54
|
+
on_empty: stop
|
|
55
|
+
on_empty_message: "No active feature. Run /appweaver select-feature first (pick or create the aggregate, e.g. Order), then re-run analyze-delta-design."
|
|
56
|
+
|
|
57
|
+
- id: verify_spec
|
|
58
|
+
action: verify_context
|
|
59
|
+
require_true: spec_exists
|
|
60
|
+
on_false: stop
|
|
61
|
+
on_false_message: "No spec.md for the current feature. Run /appweaver specify (and design) first."
|
|
62
|
+
|
|
63
|
+
# 1b. Read the OPEN change (opened by cr). A CR gate needs a change to gate.
|
|
64
|
+
- id: read_change
|
|
65
|
+
action: execute_script
|
|
66
|
+
script: { ref: actions }
|
|
67
|
+
subcommand: version-read
|
|
68
|
+
args: ["--feature-dir", "{{feature_dir}}"]
|
|
69
|
+
outputs:
|
|
70
|
+
- { name: active_change, from: "$.active_change" }
|
|
71
|
+
- { name: has_change, from: "$.has_change" }
|
|
72
|
+
|
|
73
|
+
- id: require_change
|
|
74
|
+
action: verify_context
|
|
75
|
+
require_true: has_change
|
|
76
|
+
on_false: stop
|
|
77
|
+
on_false_message: "No open change on this feature. Run /appweaver specify <change> (opens the change + delta-spec) then /appweaver design (delta-design) first — analyze-delta-design gates an open change's delta docs."
|
|
78
|
+
|
|
79
|
+
# 2. Ensure the master design.md exists (idempotent) — the base the delta MODIFIED
|
|
80
|
+
# elements must refer to. Delta doc paths are derived from the open change id.
|
|
81
|
+
- id: design_scaffold
|
|
82
|
+
action: execute_script
|
|
83
|
+
script: { ref: actions }
|
|
84
|
+
subcommand: design-scaffold
|
|
85
|
+
args: ["--feature-dir", "{{feature_dir}}"]
|
|
86
|
+
outputs:
|
|
87
|
+
- { name: design_doc, from: "$.design_doc" }
|
|
88
|
+
|
|
89
|
+
# 2b. Load the domain GATE overlays (the domain-rule-bindings `/aw-spec-gate` checklist) as
|
|
90
|
+
# the conformance checklist — VALIDATION input only, NEVER authoring. analyze sees
|
|
91
|
+
# them (include_standards: true); reconcile does NOT (the delta conforms to the
|
|
92
|
+
# delta SPEC, not to the overlays). Empty/no-op for a non-domain project.
|
|
93
|
+
- id: resolve_gate_overlays
|
|
94
|
+
action: execute_script
|
|
95
|
+
script: { ref: actions }
|
|
96
|
+
subcommand: resolve-domain
|
|
97
|
+
args: ["--command", "aw-spec-gate"]
|
|
98
|
+
outputs:
|
|
99
|
+
- { name: gate_overlays, from: "$.candidates" }
|
|
100
|
+
- id: load_gate_overlays
|
|
101
|
+
action: load_standards
|
|
102
|
+
files_from_variable: gate_overlays
|
|
103
|
+
optional: true
|
|
104
|
+
|
|
105
|
+
# 3. Pre-execution hooks.
|
|
106
|
+
- id: resolve_pre_hooks
|
|
107
|
+
action: execute_script
|
|
108
|
+
script: { ref: actions }
|
|
109
|
+
subcommand: resolve-hooks
|
|
110
|
+
args: ["--phase", "before_analyze_cr"]
|
|
111
|
+
outputs:
|
|
112
|
+
- { name: before_hooks, from: "$.hooks" }
|
|
113
|
+
- id: dispatch_pre_hooks
|
|
114
|
+
action: dispatch_hooks
|
|
115
|
+
hooks_from_variable: before_hooks
|
|
116
|
+
|
|
117
|
+
# 4. Conformance + REPAIR loop (the delta spec is the anchor): check → REPORT gaps +
|
|
118
|
+
# ASK → Repair on approval → re-check; "Report and Skip" writes the report + stops.
|
|
119
|
+
# Bounded (3×). Delta docs live under changes/<open change>/.
|
|
120
|
+
- id: analyze_loop
|
|
121
|
+
action: loop
|
|
122
|
+
while: "{{analyze_ok}} != true"
|
|
123
|
+
max_iterations: 3
|
|
124
|
+
steps:
|
|
125
|
+
- id: analyze
|
|
126
|
+
action: agent_query
|
|
127
|
+
context:
|
|
128
|
+
- "{{feature_dir}}/changes/{{active_change}}/delta-spec.md"
|
|
129
|
+
- "{{feature_dir}}/changes/{{active_change}}/delta-design.md"
|
|
130
|
+
- "{{spec_file}}"
|
|
131
|
+
- "{{design_doc}}"
|
|
132
|
+
include_standards: true # the gate overlays (checklist) are in the standards
|
|
133
|
+
schema: { ok: true, gaps: [ { severity: "high", spec_ref: "<delta FR/BR/CN/DC/IC/US or overlay or —>", where: "<delta-design section>", gap: "<how it drifts>" } ] }
|
|
134
|
+
mock: { ok: true, gaps: [] }
|
|
135
|
+
task: |
|
|
136
|
+
delta-spec.md is the ANCHOR for this change. Check that delta-design.md
|
|
137
|
+
(in context) STRICTLY realises the delta spec (in context) and list EVERY
|
|
138
|
+
drift as a gap:
|
|
139
|
+
(1) every ADDED / MODIFIED delta-spec item — FR / BR / CN- / DC- / IC- /
|
|
140
|
+
user story — has a home in the delta design (an ADDED or MODIFIED design
|
|
141
|
+
element that serves it). A delta-spec item with no delta-design element is
|
|
142
|
+
a HIGH gap;
|
|
143
|
+
(2) every MODIFIED delta-design element names a REAL element that exists in
|
|
144
|
+
the master design.md (also in context) — you cannot MODIFY what the master
|
|
145
|
+
does not define (that would be an ADD). A dangling MODIFIED reference is a
|
|
146
|
+
HIGH gap;
|
|
147
|
+
(3) the delta design introduces NOTHING beyond the delta spec — any design
|
|
148
|
+
element with no delta-spec basis is a drift (unless logged as a delta DA-n);
|
|
149
|
+
(4) shared elements have ONE owning definition (no duplicate path=/element);
|
|
150
|
+
the layers stay coherent (Application→Domain, API→Application, Infra→ports)
|
|
151
|
+
and technology-agnostic;
|
|
152
|
+
(5) OVERLAY BACKSTOP — the domain gate checklist is loaded in the standards.
|
|
153
|
+
For each constraint it states (retention, immutability, append-only audit,
|
|
154
|
+
data-exposure, interop obligation, etc.) that this CHANGE touches, confirm
|
|
155
|
+
the delta realises it via a delta CN-/DC-/IC-. If the change touches such a
|
|
156
|
+
constraint but it is in NEITHER the delta spec nor the delta design, it is a
|
|
157
|
+
HIGH gap — set spec_ref to the overlay name and PREFIX the gap text with
|
|
158
|
+
"LIFT-FAILURE:" (re-run /appweaver specify to lift it into the delta spec; do
|
|
159
|
+
NOT fabricate it in the delta design).
|
|
160
|
+
(If delta-design.md is still the empty template, treat the WHOLE delta spec
|
|
161
|
+
as gaps.) Set ok=true ONLY when delta-design.md fully realises the delta spec
|
|
162
|
+
AND no touched checklist constraint is unaccounted for.
|
|
163
|
+
outputs:
|
|
164
|
+
- { name: analyze_ok, from: "$.ok" }
|
|
165
|
+
- { name: analyze_gaps, from: "$.gaps" }
|
|
166
|
+
- id: conform_break
|
|
167
|
+
action: break
|
|
168
|
+
condition: "{{analyze_ok}} == true"
|
|
169
|
+
- id: ask_repair
|
|
170
|
+
action: ask
|
|
171
|
+
prompt: |
|
|
172
|
+
analyze-delta-design found delta-spec↔delta-design gaps (the delta spec is the anchor):
|
|
173
|
+
{{analyze_gaps}}
|
|
174
|
+
Repair delta-design.md to conform to the delta spec now, or report the gaps and stop?
|
|
175
|
+
options: ["Repair", "Report and Skip"]
|
|
176
|
+
answer_var: repair_choice
|
|
177
|
+
- id: write_report
|
|
178
|
+
condition: "{{repair_choice}} == Report and Skip"
|
|
179
|
+
action: agent_author
|
|
180
|
+
context: ["{{feature_dir}}/changes/{{active_change}}/delta-design.md"]
|
|
181
|
+
include_standards: false
|
|
182
|
+
output_target: { type: file, path: "{{feature_dir}}/changes/{{active_change}}/delta-design-analyze-report.md" }
|
|
183
|
+
task: |
|
|
184
|
+
Write a Delta Design Analyze Report to the output from these
|
|
185
|
+
delta-spec↔delta-design conformance gaps (the delta spec is the ANCHOR; the
|
|
186
|
+
user chose to skip repair):
|
|
187
|
+
{{analyze_gaps}}
|
|
188
|
+
Markdown format:
|
|
189
|
+
- "# Delta Design Analyze Report — {{active_change}}" plus today's date.
|
|
190
|
+
- A verdict line: "verdict: GAPS ✗ · <n> gap(s)".
|
|
191
|
+
- "## Gaps" as a table: | # | severity | delta-spec ref | delta-design location | gap |.
|
|
192
|
+
- "## How to resolve": the delta spec is the anchor — update delta-design.md
|
|
193
|
+
to realise it for each gap (out of band; a "LIFT-FAILURE:" gap means re-run
|
|
194
|
+
/appweaver specify to lift the constraint into the delta spec), then re-run
|
|
195
|
+
/appweaver analyze-delta-design to clear the report.
|
|
196
|
+
Return the complete report markdown only.
|
|
197
|
+
- id: skip_break
|
|
198
|
+
action: break
|
|
199
|
+
condition: "{{repair_choice}} == Report and Skip"
|
|
200
|
+
- id: reconcile
|
|
201
|
+
action: agent_author
|
|
202
|
+
context:
|
|
203
|
+
- "{{feature_dir}}/changes/{{active_change}}/delta-spec.md"
|
|
204
|
+
- "{{feature_dir}}/changes/{{active_change}}/delta-design.md"
|
|
205
|
+
- "{{design_doc}}"
|
|
206
|
+
include_standards: false # rewrite-in-place: the delta spec anchors — NOT the overlays
|
|
207
|
+
output_target: { type: file, path: "{{feature_dir}}/changes/{{active_change}}/delta-design.md" }
|
|
208
|
+
task: |
|
|
209
|
+
delta-spec.md is the ANCHOR — update delta-design.md (in context) to REALISE
|
|
210
|
+
it, closing these gaps (the delta spec WINS every time):
|
|
211
|
+
{{analyze_gaps}}
|
|
212
|
+
- Add a delta-design element for each uncovered ADDED/MODIFIED delta-spec
|
|
213
|
+
FR/BR/CN/DC/IC/US, in the correct layer section, serving that spec id.
|
|
214
|
+
- Ensure every MODIFIED element names a REAL element from the master
|
|
215
|
+
design.md (in context); if the master does not define it, make it an ADDED
|
|
216
|
+
element instead.
|
|
217
|
+
- REMOVE, or move to a delta DA-n note, any delta-design element with no
|
|
218
|
+
delta-spec basis — never keep design that exceeds the delta spec.
|
|
219
|
+
- A "LIFT-FAILURE:" gap you CANNOT close — the constraint is not in the delta
|
|
220
|
+
spec, and you must NOT invent a domain rule it omits. Leave it open and add
|
|
221
|
+
a note "lift-failure: <constraint> — re-run /appweaver specify to lift it into
|
|
222
|
+
the delta spec". (The gate will stop and direct the user to cr.)
|
|
223
|
+
- Keep the technology-agnostic form (signatures + pre/post/invariant, field
|
|
224
|
+
shapes — NO code). Preserve every already-conformant section VERBATIM. Do
|
|
225
|
+
NOT change the delta spec or the master design.md.
|
|
226
|
+
Return the COMPLETE updated delta-design.md content only.
|
|
227
|
+
|
|
228
|
+
- id: analyze_gate
|
|
229
|
+
action: verify_context
|
|
230
|
+
require_true: analyze_ok
|
|
231
|
+
on_false: stop
|
|
232
|
+
on_false_message: "delta-design.md does not realise the delta spec (gaps: {{analyze_gaps}}) — repair was skipped (see changes/{{active_change}}/delta-design-analyze-report.md), or it could not be reconciled in 3 passes. A 'LIFT-FAILURE:' gap means a domain constraint from the gate checklist was never lifted into the delta spec — re-run /appweaver specify to add it (CN-/DC-/IC-). Otherwise fix out of band, or re-run and choose Repair."
|
|
233
|
+
|
|
234
|
+
# 5. Post-execution hooks.
|
|
235
|
+
- id: resolve_post_hooks
|
|
236
|
+
action: execute_script
|
|
237
|
+
script: { ref: actions }
|
|
238
|
+
subcommand: resolve-hooks
|
|
239
|
+
args: ["--phase", "after_analyze_cr"]
|
|
240
|
+
outputs:
|
|
241
|
+
- { name: after_hooks, from: "$.hooks" }
|
|
242
|
+
- id: dispatch_post_hooks
|
|
243
|
+
action: dispatch_hooks
|
|
244
|
+
hooks_from_variable: after_hooks
|
|
245
|
+
|
|
246
|
+
outputs:
|
|
247
|
+
feature_dir: "{{feature_dir}}"
|
|
248
|
+
cr_id: "{{active_change}}"
|
|
249
|
+
conformant: "{{analyze_ok}}"
|
|
250
|
+
gaps: "{{analyze_gaps}}"
|
|
251
|
+
next: "/appweaver implement-delta → build → finalize-delta → analyze-slice → close-delta (the delta design realises the delta spec; the change stays OPEN through finalize-delta's merge and analyze-slice's verification, and only close-delta archives it and bumps the version)"
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# aw-spec-analyze-design (orchestrator) — the spec↔design conformance GATE
|
|
3
|
+
#
|
|
4
|
+
# The single, discrete conformance gate on the forward path:
|
|
5
|
+
# specify → design → analyze-design → implement.
|
|
6
|
+
# spec.md is the ANCHOR. Confirm design.md STRICTLY follows the spec (+ the domain
|
|
7
|
+
# gate overlays as a backstop); on drift, REPORT the gaps and ASK whether to repair,
|
|
8
|
+
# then UPDATE design.md to conform (spec wins). Design AUTHORS; this stage VALIDATES.
|
|
9
|
+
#
|
|
10
|
+
# BOOTSTRAP-ONLY, and it NEVER opens, merges or closes a change. It gates a feature
|
|
11
|
+
# whose spec.md + design.md ARE the masters. With a change OPEN the delta docs are the
|
|
12
|
+
# authoritative in-flight edit and the master pair must not be rewritten under them, so
|
|
13
|
+
# the run STOPS and routes to /appweaver analyze-delta-design (the delta's own gate).
|
|
14
|
+
# The change is closed by close-delta, the SINGLE cr-archive caller, and only after
|
|
15
|
+
# finalize-delta has merged the delta into the masters. Also runnable on demand to
|
|
16
|
+
# re-anchor a hand-edited spec — again, only when no change is open.
|
|
17
|
+
#
|
|
18
|
+
# Launch: /appweaver analyze-design [strategy]
|
|
19
|
+
# Prereq: /appweaver design (a spec.md + design.md for the active feature).
|
|
20
|
+
# =============================================================================
|
|
21
|
+
|
|
22
|
+
name: aw-spec-analyze-design
|
|
23
|
+
description: The spec↔design conformance gate — confirm design.md conforms to spec.md (spec is the anchor; domain overlays are a backstop) and, with approval, repair it. Bootstrap-only — with a change open it stops and routes to analyze-delta-design; it never closes a change.
|
|
24
|
+
version: 2.1.0
|
|
25
|
+
agent_agnostic: true
|
|
26
|
+
dialect: aw-spec.orchestrator/v1
|
|
27
|
+
|
|
28
|
+
scripts:
|
|
29
|
+
actions:
|
|
30
|
+
sh: .appweaver/scripts/bash/aw-spec-actions.sh
|
|
31
|
+
ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
|
|
32
|
+
|
|
33
|
+
standards:
|
|
34
|
+
- { path: .appweaver/ai-rules.md } # kit-resident: the universal operating rules, every flow
|
|
35
|
+
|
|
36
|
+
vars:
|
|
37
|
+
analyze_ok: "false"
|
|
38
|
+
active_change: ""
|
|
39
|
+
has_change: "false"
|
|
40
|
+
version: ""
|
|
41
|
+
no_open_change: "true" # NOT has_change ⇒ the masters are authoritative ⇒ this gate applies
|
|
42
|
+
|
|
43
|
+
workflow:
|
|
44
|
+
|
|
45
|
+
# 1. Resolve the current feature + its spec; require the spec (the anchor).
|
|
46
|
+
- id: feature_paths
|
|
47
|
+
action: execute_script
|
|
48
|
+
on_error: continue # never crash raw on 'no feature set' — the gate below explains it
|
|
49
|
+
script: { ref: actions }
|
|
50
|
+
subcommand: feature-paths
|
|
51
|
+
outputs:
|
|
52
|
+
- { name: feature_dir, from: "$.feature_dir" }
|
|
53
|
+
- { name: spec_file, from: "$.spec_file" }
|
|
54
|
+
- { name: spec_exists, from: "$.spec_exists" }
|
|
55
|
+
|
|
56
|
+
- id: require_feature
|
|
57
|
+
action: verify_context
|
|
58
|
+
require_non_empty: feature_dir
|
|
59
|
+
on_empty: stop
|
|
60
|
+
on_empty_message: "No active feature. Run /appweaver select-feature first (pick or create the aggregate, e.g. Order), then re-run analyze-design."
|
|
61
|
+
|
|
62
|
+
- id: verify_spec
|
|
63
|
+
action: verify_context
|
|
64
|
+
require_true: spec_exists
|
|
65
|
+
on_false: stop
|
|
66
|
+
on_false_message: "No spec.md for the current feature. Run /appweaver specify (and design) first."
|
|
67
|
+
|
|
68
|
+
# 1b. Read the open change (opened by specify, or by design on a design-only change).
|
|
69
|
+
# has_change drives the BOOTSTRAP-ONLY guard below — it closes nothing.
|
|
70
|
+
- id: read_change
|
|
71
|
+
action: execute_script
|
|
72
|
+
script: { ref: actions }
|
|
73
|
+
subcommand: version-read
|
|
74
|
+
args: ["--feature-dir", "{{feature_dir}}"]
|
|
75
|
+
outputs:
|
|
76
|
+
- { name: active_change, from: "$.active_change" }
|
|
77
|
+
- { name: has_change, from: "$.has_change" }
|
|
78
|
+
- { name: version, from: "$.version" }
|
|
79
|
+
|
|
80
|
+
# 1c. BOOTSTRAP-ONLY GUARD. A change open ⇒ delta-spec/delta-design are the
|
|
81
|
+
# authoritative in-flight edit and this stage is the WRONG gate: its repair loop
|
|
82
|
+
# rewrites the MASTER design.md, which would drift the masters out from under the
|
|
83
|
+
# delta before finalize-delta merges it. Stop BEFORE any scaffold/authoring so the
|
|
84
|
+
# wrong-stage run has zero side effects, and route to the delta's own gate.
|
|
85
|
+
- id: flag_change_open
|
|
86
|
+
condition: "{{has_change}} == true"
|
|
87
|
+
action: set
|
|
88
|
+
vars: { no_open_change: "false" }
|
|
89
|
+
|
|
90
|
+
- id: require_no_change
|
|
91
|
+
action: verify_context
|
|
92
|
+
require_true: no_open_change
|
|
93
|
+
on_false: stop
|
|
94
|
+
on_false_message: "Change {{active_change}} is OPEN on this feature — analyze-design is the BOOTSTRAP gate and must not rewrite the master design.md while a delta is in flight. Gate the delta instead: /appweaver analyze-delta-design → implement-delta → build → finalize-delta (merges the delta into spec.md + design.md) → analyze-slice → close-delta (archives the change + bumps the version). Re-run analyze-design once the change is closed, to re-anchor the masters."
|
|
95
|
+
|
|
96
|
+
# 2. Ensure design.md exists (idempotent scaffold — returns the existing path, or
|
|
97
|
+
# a fresh template the repair loop will author to conform to the spec).
|
|
98
|
+
- id: design_scaffold
|
|
99
|
+
action: execute_script
|
|
100
|
+
script: { ref: actions }
|
|
101
|
+
subcommand: design-scaffold
|
|
102
|
+
args: ["--feature-dir", "{{feature_dir}}"]
|
|
103
|
+
outputs:
|
|
104
|
+
- { name: design_doc, from: "$.design_doc" }
|
|
105
|
+
|
|
106
|
+
# 2b. Load the domain GATE overlays (the domain-rule-bindings `/aw-spec-gate` checklist) as
|
|
107
|
+
# the conformance checklist — VALIDATION input only, NEVER authoring. The analyze
|
|
108
|
+
# step sees them (include_standards: true); reconcile does NOT (design conforms to
|
|
109
|
+
# the SPEC, not to the overlays). Empty/no-op for a non-domain project.
|
|
110
|
+
- id: resolve_gate_overlays
|
|
111
|
+
action: execute_script
|
|
112
|
+
script: { ref: actions }
|
|
113
|
+
subcommand: resolve-domain
|
|
114
|
+
args: ["--command", "aw-spec-gate"]
|
|
115
|
+
outputs:
|
|
116
|
+
- { name: gate_overlays, from: "$.candidates" }
|
|
117
|
+
- id: load_gate_overlays
|
|
118
|
+
action: load_standards
|
|
119
|
+
files_from_variable: gate_overlays
|
|
120
|
+
optional: true
|
|
121
|
+
|
|
122
|
+
# 3. Pre-execution hooks.
|
|
123
|
+
- id: resolve_pre_hooks
|
|
124
|
+
action: execute_script
|
|
125
|
+
script: { ref: actions }
|
|
126
|
+
subcommand: resolve-hooks
|
|
127
|
+
args: ["--phase", "before_analyze"]
|
|
128
|
+
outputs:
|
|
129
|
+
- { name: before_hooks, from: "$.hooks" }
|
|
130
|
+
- id: dispatch_pre_hooks
|
|
131
|
+
action: dispatch_hooks
|
|
132
|
+
hooks_from_variable: before_hooks
|
|
133
|
+
|
|
134
|
+
# 4. Conformance + REPAIR loop (spec is the anchor): check → REPORT gaps + ASK →
|
|
135
|
+
# Repair on approval → re-check; "Report and Skip" writes design-analyze-report.md
|
|
136
|
+
# and stops. Bounded (3×).
|
|
137
|
+
- id: analyze_loop
|
|
138
|
+
action: loop
|
|
139
|
+
while: "{{analyze_ok}} != true"
|
|
140
|
+
max_iterations: 3
|
|
141
|
+
steps:
|
|
142
|
+
- id: analyze
|
|
143
|
+
action: agent_query
|
|
144
|
+
context: ["{{spec_file}}", "{{design_doc}}"]
|
|
145
|
+
include_standards: true # the gate overlays (checklist) are in the standards
|
|
146
|
+
schema: { ok: true, gaps: [ { severity: "high", spec_ref: "<FR/BR/CN/DC/IC/US/SC or overlay or —>", where: "<design section>", gap: "<how it drifts>" } ] }
|
|
147
|
+
mock: { ok: true, gaps: [] }
|
|
148
|
+
task: |
|
|
149
|
+
spec.md is the ANCHOR. Check that design.md (in context) STRICTLY follows
|
|
150
|
+
the spec (in context) and list EVERY drift as a gap:
|
|
151
|
+
(1) every spec item — FR / Business Rule / Constraint (CN-) / Data
|
|
152
|
+
Classification (DC-) / Integration Contract (IC-) / user story / success
|
|
153
|
+
criterion — has a design home (the Traceability section is complete). A lifted
|
|
154
|
+
CN-/DC-/IC- with no design row is a HIGH gap;
|
|
155
|
+
(2) the DOMAIN model matches the spec EXACTLY — entities/value objects are
|
|
156
|
+
the spec's Key Entities (same names), invariants are the spec's Business
|
|
157
|
+
Rules, and the boundary is the spec's Aggregate Boundary;
|
|
158
|
+
(3) NO design element exceeds or contradicts the spec — anything without a
|
|
159
|
+
spec basis is a drift unless already logged as a DA-n assumption;
|
|
160
|
+
(4) the layers are coherent (Application→Domain, API→Application, Infra
|
|
161
|
+
implements the declared ports) and it stays high-level + technology-agnostic.
|
|
162
|
+
(5) OVERLAY BACKSTOP — the domain gate checklist is loaded in the standards.
|
|
163
|
+
For each constraint it states (retention, immutability, append-only audit,
|
|
164
|
+
data-exposure, interop obligation, etc.), confirm design.md realises it via a
|
|
165
|
+
spec CN-/DC-/IC-. If a checklist constraint is present in NEITHER the spec nor
|
|
166
|
+
the design, it is a HIGH gap — set spec_ref to the overlay name and PREFIX the
|
|
167
|
+
gap text with "LIFT-FAILURE:" (it was never lifted into the spec; the fix is
|
|
168
|
+
/appweaver specify, not design — do not fabricate it in the design).
|
|
169
|
+
(If design.md is still the empty template, treat the WHOLE spec as gaps.)
|
|
170
|
+
Set ok=true ONLY when design.md fully conforms to the spec AND no checklist
|
|
171
|
+
constraint is unaccounted for.
|
|
172
|
+
outputs:
|
|
173
|
+
- { name: analyze_ok, from: "$.ok" }
|
|
174
|
+
- { name: analyze_gaps, from: "$.gaps" }
|
|
175
|
+
- id: conform_break
|
|
176
|
+
action: break
|
|
177
|
+
condition: "{{analyze_ok}} == true"
|
|
178
|
+
- id: ask_repair
|
|
179
|
+
action: ask
|
|
180
|
+
prompt: |
|
|
181
|
+
Analyze found spec↔design gaps (spec.md is the anchor):
|
|
182
|
+
{{analyze_gaps}}
|
|
183
|
+
Repair design.md to conform to the spec now, or report the gaps and stop?
|
|
184
|
+
options: ["Repair", "Report and Skip"]
|
|
185
|
+
answer_var: repair_choice
|
|
186
|
+
- id: write_report
|
|
187
|
+
condition: "{{repair_choice}} == Report and Skip"
|
|
188
|
+
action: agent_author
|
|
189
|
+
context: ["{{design_doc}}"]
|
|
190
|
+
include_standards: false
|
|
191
|
+
output_target: { type: file, path: "{{feature_dir}}/design-analyze-report.md" }
|
|
192
|
+
task: |
|
|
193
|
+
Write a Design Analyze Report to the output from these spec↔design
|
|
194
|
+
conformance gaps (spec.md is the ANCHOR; the user chose to skip repair):
|
|
195
|
+
{{analyze_gaps}}
|
|
196
|
+
Markdown format:
|
|
197
|
+
- "# Design Analyze Report — <aggregate>" plus today's date.
|
|
198
|
+
- A verdict line: "verdict: GAPS ✗ · <n> gap(s)".
|
|
199
|
+
- "## Gaps" as a table: | # | severity | spec ref | design location | gap |.
|
|
200
|
+
- "## How to resolve": the spec is the anchor — update design.md to follow
|
|
201
|
+
the spec for each gap (out of band), then re-run /appweaver analyze-design
|
|
202
|
+
to clear the report.
|
|
203
|
+
Return the complete report markdown only.
|
|
204
|
+
- id: skip_break
|
|
205
|
+
action: break
|
|
206
|
+
condition: "{{repair_choice}} == Report and Skip"
|
|
207
|
+
- id: reconcile
|
|
208
|
+
action: agent_author
|
|
209
|
+
context: ["{{spec_file}}", "{{design_doc}}"]
|
|
210
|
+
include_standards: false # rewrite-in-place: spec anchors — NOT the overlays
|
|
211
|
+
output_target: { type: file, path: "{{design_doc}}" }
|
|
212
|
+
task: |
|
|
213
|
+
spec.md is the ANCHOR — update design.md (in context) to CONFORM to it,
|
|
214
|
+
closing these gaps (the spec WINS every time):
|
|
215
|
+
{{analyze_gaps}}
|
|
216
|
+
- Add a design home for each uncovered spec FR/BR/CN/DC/IC/US/SC (a lifted
|
|
217
|
+
CN-/DC-/IC- lands in a §1 domain invariant · the persistence component or an
|
|
218
|
+
External Integrations table adapter row · a Cross-Cutting Concerns row).
|
|
219
|
+
- Realign the DOMAIN model to the spec: entity/value-object names = the
|
|
220
|
+
spec's Key Entities, invariants = the spec's Business Rules, boundary =
|
|
221
|
+
the spec's Aggregate Boundary.
|
|
222
|
+
- REMOVE, or move to a DA-n assumption, any design element with no spec
|
|
223
|
+
basis — never keep design that exceeds or contradicts the spec. EXCEPTION:
|
|
224
|
+
do NOT remove a cross-cutting element that is (or may be) mandated by the
|
|
225
|
+
technical constitution — it cites a principle as its basis ("per Const.
|
|
226
|
+
§<n>"), or it is standing technical/infrastructure machinery rather than
|
|
227
|
+
invented domain logic. MOVE such an element to a DA-n citing the mandating
|
|
228
|
+
principle; removing it could violate the constitution. Reserve REMOVE for
|
|
229
|
+
genuine over-reach — invented domain entities/rules/behaviour the spec omits.
|
|
230
|
+
- A "LIFT-FAILURE:" gap you CANNOT close — the constraint is not in the spec,
|
|
231
|
+
and you must NOT invent a domain rule the spec omits. Leave it open and add a
|
|
232
|
+
DA-n note "lift-failure: <constraint> — re-run /appweaver specify to lift
|
|
233
|
+
it into CN-/DC-/IC-". (The gate will stop and direct the user to specify.)
|
|
234
|
+
- Keep the Traceability section in sync. Preserve every already-conformant section
|
|
235
|
+
VERBATIM. Do NOT change the spec.
|
|
236
|
+
Return the COMPLETE updated design.md content only.
|
|
237
|
+
|
|
238
|
+
- id: analyze_gate
|
|
239
|
+
action: verify_context
|
|
240
|
+
require_true: analyze_ok
|
|
241
|
+
on_false: stop
|
|
242
|
+
on_false_message: "design.md does not conform to the spec (gaps: {{analyze_gaps}}) — repair was skipped (see design-analyze-report.md), or it could not be reconciled in 3 passes. A 'LIFT-FAILURE:' gap means a domain constraint from the gate checklist was never lifted into the spec — re-run /appweaver specify to add it (CN-/DC-/IC-). Otherwise fix out of band, or re-run and choose Repair; resolve an ambiguous spec via /appweaver specify."
|
|
243
|
+
|
|
244
|
+
# (No change-close here by design — this stage only ever runs with NO change open,
|
|
245
|
+
# and cr-archive belongs to close-delta, which runs after finalize-delta's merge.)
|
|
246
|
+
|
|
247
|
+
# 5. Post-execution hooks.
|
|
248
|
+
- id: resolve_post_hooks
|
|
249
|
+
action: execute_script
|
|
250
|
+
script: { ref: actions }
|
|
251
|
+
subcommand: resolve-hooks
|
|
252
|
+
args: ["--phase", "after_analyze"]
|
|
253
|
+
outputs:
|
|
254
|
+
- { name: after_hooks, from: "$.hooks" }
|
|
255
|
+
- id: dispatch_post_hooks
|
|
256
|
+
action: dispatch_hooks
|
|
257
|
+
hooks_from_variable: after_hooks
|
|
258
|
+
|
|
259
|
+
outputs:
|
|
260
|
+
feature_dir: "{{feature_dir}}"
|
|
261
|
+
design_doc: "{{design_doc}}"
|
|
262
|
+
conformant: "{{analyze_ok}}"
|
|
263
|
+
gaps: "{{analyze_gaps}}"
|
|
264
|
+
version: "{{version}}"
|
|
265
|
+
next: "/appweaver implement (design conforms to the spec; version unchanged — this gate closes nothing)"
|