aw-spec-cli 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/.agents/agent.json +1 -1
- package/assets/.agents/skills/{aw-spec-orch → appweaver}/SKILL.md +10 -10
- package/assets/.agents/skills/{aw-spec-orch-demo → appweaver-demo}/SKILL.md +9 -9
- package/assets/.claude/agent.json +1 -1
- package/assets/.claude/skills/{aw-spec-orch → appweaver}/SKILL.md +10 -10
- package/assets/.claude/skills/{aw-spec-orch-demo → appweaver-demo}/SKILL.md +9 -9
- package/assets/.kilocode/agent.json +1 -1
- package/assets/.kilocode/workflows/{aw-spec-orch-demo.md → appweaver-demo.md} +9 -9
- package/assets/.kilocode/workflows/{aw-spec-orch.md → appweaver.md} +10 -10
- package/assets/docs/pharma-constitution.my-ref.md +86 -0
- package/dist/utils/paths.js +2 -2
- package/dist/utils/paths.js.map +1 -1
- package/package.json +1 -1
- package/assets/.aw-spec/DESIGN-FORMAT.md +0 -151
- package/assets/.aw-spec/ORCH-DIALECT.md +0 -156
- package/assets/.aw-spec/RULE-PARTITION.md +0 -126
- package/assets/.aw-spec/domain.json +0 -3
- package/assets/.aw-spec/extensions/.registry +0 -19
- package/assets/.aw-spec/extensions/agent-context/README.md +0 -57
- package/assets/.aw-spec/extensions/agent-context/agent-context-config.yml +0 -4
- package/assets/.aw-spec/extensions/agent-context/commands/aw-spec.agent-context.update.md +0 -26
- package/assets/.aw-spec/extensions/agent-context/extension.yml +0 -37
- package/assets/.aw-spec/extensions/agent-context/scripts/bash/update-agent-context.sh +0 -201
- package/assets/.aw-spec/extensions/agent-context/scripts/powershell/update-agent-context.ps1 +0 -237
- package/assets/.aw-spec/extensions.yml +0 -16
- package/assets/.aw-spec/feature.json +0 -3
- package/assets/.aw-spec/init-options.json +0 -9
- package/assets/.aw-spec/integration.json +0 -15
- package/assets/.aw-spec/integrations/aw-spec.manifest.json +0 -9
- package/assets/.aw-spec/interpreter/run-skill.py +0 -1158
- package/assets/.aw-spec/memory/constitution.md +0 -50
- package/assets/.aw-spec/orchestrator/AGENT-PROFILE.md +0 -94
- package/assets/.aw-spec/orchestrator/README.md +0 -300
- package/assets/.aw-spec/orchestrator/adapters/claude_agent_sdk.py +0 -74
- package/assets/.aw-spec/orchestrator/adapters/google_antigravity.py +0 -74
- package/assets/.aw-spec/orchestrator/modules/delta-design.orch.yaml +0 -105
- package/assets/.aw-spec/orchestrator/modules/delta-spec.orch.yaml +0 -79
- package/assets/.aw-spec/orchestrator/modules/domain-select.orch.yaml +0 -81
- package/assets/.aw-spec/orchestrator/modules/tech-select.orch.yaml +0 -75
- package/assets/.aw-spec/orchestrator/orchestrator.py +0 -1721
- package/assets/.aw-spec/orchestrator/rev-templates/ai-rules.reference.md +0 -40
- package/assets/.aw-spec/orchestrator/rev-templates/comandrulemap.skeleton.md +0 -59
- package/assets/.aw-spec/orchestrator/rev-templates/commandtechrulemap.skeleton.md +0 -97
- package/assets/.aw-spec/orchestrator/rev-templates/domain-constitution.skeleton.md +0 -61
- package/assets/.aw-spec/orchestrator/rev-templates/domain-requirements.skeleton.md +0 -48
- package/assets/.aw-spec/orchestrator/rev-templates/domain-rule-file.skeleton.md +0 -39
- package/assets/.aw-spec/orchestrator/rev-templates/technical-constitution.skeleton.md +0 -106
- package/assets/.aw-spec/orchestrator/rev-templates/technical-rule-file.skeleton.md +0 -54
- package/assets/.aw-spec/orchestrator/workflows/_smoke.orch.yaml +0 -160
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-add-component.orch.yaml +0 -244
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-adopt.orch.yaml +0 -775
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +0 -248
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +0 -261
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +0 -425
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-build.orch.yaml +0 -188
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-characterize.orch.yaml +0 -474
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-close-delta.orch.yaml +0 -181
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-constitution.orch.yaml +0 -284
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-demo.orch.yaml +0 -103
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-dependency-tree.orch.yaml +0 -69
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-deploy.orch.yaml +0 -85
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-design.orch.yaml +0 -382
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +0 -382
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-foundation.orch.yaml +0 -246
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +0 -231
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement.orch.yaml +0 -258
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-inventory.orch.yaml +0 -236
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-onboard.orch.yaml +0 -949
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-parity.orch.yaml +0 -293
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-run.orch.yaml +0 -177
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-domain.orch.yaml +0 -79
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-feature.orch.yaml +0 -128
- package/assets/.aw-spec/orchestrator/workflows/aw-spec-specify.orch.yaml +0 -412
- package/assets/.aw-spec/scripts/bash/aw-inventory.sh +0 -14
- package/assets/.aw-spec/scripts/bash/aw-parity.sh +0 -13
- package/assets/.aw-spec/scripts/bash/aw-rev-constitution.sh +0 -13
- package/assets/.aw-spec/scripts/bash/aw-spec-actions.sh +0 -1899
- package/assets/.aw-spec/scripts/bash/aw-xref.sh +0 -15
- package/assets/.aw-spec/scripts/bash/common.sh +0 -533
- package/assets/.aw-spec/scripts/powershell/aw-inventory.ps1 +0 -14
- package/assets/.aw-spec/scripts/powershell/aw-parity.ps1 +0 -13
- package/assets/.aw-spec/scripts/powershell/aw-rev-constitution.ps1 +0 -13
- package/assets/.aw-spec/scripts/powershell/aw-spec-actions.ps1 +0 -1563
- package/assets/.aw-spec/scripts/powershell/aw-xref.ps1 +0 -15
- package/assets/.aw-spec/scripts/python/aw-inventory.py +0 -683
- package/assets/.aw-spec/scripts/python/aw-parity.py +0 -380
- package/assets/.aw-spec/scripts/python/aw-rev-constitution.py +0 -312
- package/assets/.aw-spec/scripts/python/aw-xref.py +0 -1330
- package/assets/.aw-spec/scripts/python/validate_okf.py +0 -349
- package/assets/.aw-spec/templates/constitution-domain-template.md +0 -75
- package/assets/.aw-spec/templates/constitution-technical-template.md +0 -70
- package/assets/.aw-spec/templates/delta-design-template.md +0 -69
- package/assets/.aw-spec/templates/delta-spec-template.md +0 -60
- package/assets/.aw-spec/templates/design-template.md +0 -383
- package/assets/.aw-spec/templates/okf-concept-template.md +0 -103
- package/assets/.aw-spec/templates/parity-manifest-template.json +0 -49
- package/assets/.aw-spec/templates/source-map-template.md +0 -85
- package/assets/.aw-spec/templates/spec-template.md +0 -252
- package/assets/docs/ModularMonolith/ModularMonolith.Reference.pack.txt +0 -25248
- package/assets/docs/ModularMonolith/ModularMonolith.pack.txt +0 -5726
- package/assets/docs/ModularMonolith/pack-foundation.ps1 +0 -145
- package/assets/docs/ModularMonolith/pack-foundation.sh +0 -196
- package/assets/docs/ModularMonolith/pack-reference-foundation.ps1 +0 -157
- package/assets/docs/ModularMonolith/pack-reference-foundation.sh +0 -209
- package/assets/docs/ModularMonolith/unpack-foundation.ps1 +0 -126
- package/assets/docs/ModularMonolith/unpack-foundation.sh +0 -217
- package/assets/docs/ModularMonolith/unpack-reference-foundation.ps1 +0 -129
- package/assets/docs/ModularMonolith/unpack-reference-foundation.sh +0 -218
- package/assets/docs/README.md +0 -106
- package/assets/docs/VerticalSlice/PACKAGING.md +0 -185
- package/assets/docs/VerticalSlice/VerticalSlice.Reference.pack.txt +0 -19318
- package/assets/docs/VerticalSlice/VerticalSlice.pack.txt +0 -2833
- package/assets/docs/VerticalSlice/pack-foundation.ps1 +0 -145
- package/assets/docs/VerticalSlice/pack-foundation.sh +0 -196
- package/assets/docs/VerticalSlice/pack-reference-foundation.ps1 +0 -157
- package/assets/docs/VerticalSlice/pack-reference-foundation.sh +0 -209
- package/assets/docs/VerticalSlice/unpack-foundation.ps1 +0 -126
- package/assets/docs/VerticalSlice/unpack-foundation.sh +0 -217
- package/assets/docs/VerticalSlice/unpack-reference-foundation.ps1 +0 -129
- package/assets/docs/VerticalSlice/unpack-reference-foundation.sh +0 -218
- package/assets/docs/architecture/clean-architecture.md +0 -71
- package/assets/docs/architecture/cqrs.md +0 -141
- package/assets/docs/architecture/eventing.md +0 -83
- package/assets/docs/architecture/folder-structure.md +0 -61
- package/assets/docs/architecture/modular-monolith.md +0 -47
- package/assets/docs/architecture/persistence.md +0 -269
- package/assets/docs/architecture/testing.md +0 -55
- package/assets/docs/architecture/vertical-slices.md +0 -201
- package/assets/docs/components/Email/README.md +0 -119
- package/assets/docs/components/Email/ReferenceEndpoints/SendEmailEndpoint.cs +0 -84
- package/assets/docs/components/Email/integration.md +0 -300
- package/assets/docs/components/Jobs/README.md +0 -113
- package/assets/docs/components/Jobs/integration.md +0 -259
- package/assets/docs/components/QrGenerator/README.md +0 -85
- package/assets/docs/components/QrGenerator/ReferenceEndpoints/GenerateQrEndpoint.cs +0 -57
- package/assets/docs/components/QrGenerator/integration.md +0 -230
- package/assets/docs/components/README.md +0 -74
- package/assets/docs/domain/domain-driven-design.md +0 -212
- package/assets/docs/domainspecs/healthcare/ai-rules.domain.md +0 -34
- package/assets/docs/domainspecs/healthcare/api-versioning.domain.md +0 -17
- package/assets/docs/domainspecs/healthcare/auditing.domain.md +0 -97
- package/assets/docs/domainspecs/healthcare/authorization.domain.md +0 -26
- package/assets/docs/domainspecs/healthcare/clinical-terms.md +0 -20
- package/assets/docs/domainspecs/healthcare/coding-standards.domain.md +0 -26
- package/assets/docs/domainspecs/healthcare/comandrulemap.md +0 -100
- package/assets/docs/domainspecs/healthcare/commandtechrulemap.md +0 -119
- package/assets/docs/domainspecs/healthcare/consent.md +0 -19
- package/assets/docs/domainspecs/healthcare/cqrs.domain.md +0 -12
- package/assets/docs/domainspecs/healthcare/data-classification.domain.md +0 -28
- package/assets/docs/domainspecs/healthcare/dependency-policy.domain.md +0 -11
- package/assets/docs/domainspecs/healthcare/dicom.md +0 -15
- package/assets/docs/domainspecs/healthcare/domain-driven-design.domain.md +0 -28
- package/assets/docs/domainspecs/healthcare/domain-requirements.md +0 -55
- package/assets/docs/domainspecs/healthcare/eventing.domain.md +0 -18
- package/assets/docs/domainspecs/healthcare/fhir.md +0 -36
- package/assets/docs/domainspecs/healthcare/folder-structure.domain.md +0 -23
- package/assets/docs/domainspecs/healthcare/hipaa.md +0 -34
- package/assets/docs/domainspecs/healthcare/hl7.md +0 -15
- package/assets/docs/domainspecs/healthcare/integration-terms.md +0 -21
- package/assets/docs/domainspecs/healthcare/persistence.domain.md +0 -20
- package/assets/docs/domainspecs/healthcare/terminology.md +0 -30
- package/assets/docs/domainspecs/healthcare/testing.domain.md +0 -15
- package/assets/docs/domainspecs/healthcare/vertical-slices.domain.md +0 -18
- package/assets/docs/domainspecs/healthcare/zero-trust.domain.md +0 -12
- package/assets/docs/domainspecs/pharma/ai-rules.domain.md +0 -32
- package/assets/docs/domainspecs/pharma/api-versioning.domain.md +0 -20
- package/assets/docs/domainspecs/pharma/atc.md +0 -22
- package/assets/docs/domainspecs/pharma/auditing.domain.md +0 -90
- package/assets/docs/domainspecs/pharma/authorization.domain.md +0 -25
- package/assets/docs/domainspecs/pharma/coding-standards.domain.md +0 -28
- package/assets/docs/domainspecs/pharma/comandrulemap.md +0 -108
- package/assets/docs/domainspecs/pharma/commandtechrulemap.md +0 -119
- package/assets/docs/domainspecs/pharma/cqrs.domain.md +0 -16
- package/assets/docs/domainspecs/pharma/data-classification.domain.md +0 -24
- package/assets/docs/domainspecs/pharma/data-provenance.md +0 -21
- package/assets/docs/domainspecs/pharma/dependency-policy.domain.md +0 -11
- package/assets/docs/domainspecs/pharma/domain-driven-design.domain.md +0 -36
- package/assets/docs/domainspecs/pharma/domain-requirements.md +0 -99
- package/assets/docs/domainspecs/pharma/eventing.domain.md +0 -18
- package/assets/docs/domainspecs/pharma/fhir.md +0 -31
- package/assets/docs/domainspecs/pharma/folder-structure.domain.md +0 -24
- package/assets/docs/domainspecs/pharma/hl7.md +0 -17
- package/assets/docs/domainspecs/pharma/idmp.md +0 -26
- package/assets/docs/domainspecs/pharma/integration-terms.md +0 -21
- package/assets/docs/domainspecs/pharma/ndc.md +0 -28
- package/assets/docs/domainspecs/pharma/persistence.domain.md +0 -23
- package/assets/docs/domainspecs/pharma/pharma-terms.md +0 -27
- package/assets/docs/domainspecs/pharma/product-lifecycle.domain.md +0 -30
- package/assets/docs/domainspecs/pharma/regulatory-compliance.md +0 -19
- package/assets/docs/domainspecs/pharma/terminology.md +0 -32
- package/assets/docs/domainspecs/pharma/testing.domain.md +0 -19
- package/assets/docs/domainspecs/pharma/vertical-slices.domain.md +0 -17
- package/assets/docs/domainspecs/pharma/zero-trust.domain.md +0 -12
- package/assets/docs/glossary/ai-rules.md +0 -59
- package/assets/docs/governance/api-versioning.md +0 -99
- package/assets/docs/governance/coding-standards.md +0 -87
- package/assets/docs/governance/dependency-policy.md +0 -40
- package/assets/docs/interop/ihe-conformance.md +0 -31
- package/assets/docs/requirement-spec.txt +0 -27
- package/assets/docs/security/auditing.md +0 -160
- package/assets/docs/security/authorization-matrix.md +0 -14
- package/assets/docs/security/authorization.md +0 -87
- package/assets/docs/security/data-classification.md +0 -38
- package/assets/docs/security/zero-trust.md +0 -76
- package/assets/docs/technology-constitution.md +0 -172
|
@@ -1,382 +0,0 @@
|
|
|
1
|
-
# =============================================================================
|
|
2
|
-
# aw-spec-finalize-delta (orchestrator) — MERGE the delta into the master docs
|
|
3
|
-
#
|
|
4
|
-
# The fourth of the five CR stages. Fold the open change's delta docs into the single
|
|
5
|
-
# master spec.md + design.md (doc-first merge) and refresh the cross-slice edges from
|
|
6
|
-
# the now-merged design. After this the master docs describe the shipped-plus-change
|
|
7
|
-
# state — but THE CHANGE REMAINS OPEN.
|
|
8
|
-
#
|
|
9
|
-
# specify → design → analyze-delta-design → implement-delta → build
|
|
10
|
-
# → finalize-delta ← you are here
|
|
11
|
-
# → analyze-slice → close-delta
|
|
12
|
-
#
|
|
13
|
-
# MERGE HERE, CLOSE LATER. Archiving the change + bumping the version used to happen in
|
|
14
|
-
# this stage; both moved to close-delta, which runs AFTER analyze-slice. The split buys
|
|
15
|
-
# two things:
|
|
16
|
-
# 1. analyze-slice reads a master spec.md that ALREADY carries the change, so its fix
|
|
17
|
-
# loops repair code against the true current requirements — no delta-awareness, no
|
|
18
|
-
# risk of "fixing" the change's new tests back toward pre-change behaviour.
|
|
19
|
-
# 2. A red analyze-slice still lands on an OPEN change, so the remedy is "fix and
|
|
20
|
-
# re-run" rather than a NEW change to repair the one already shipped.
|
|
21
|
-
# The downstream fence below still guards the MERGE (a change that breaks a dependent
|
|
22
|
-
# must not reach the master docs); close-delta guards nothing — it is the bookkeeping.
|
|
23
|
-
#
|
|
24
|
-
# Prereqs: run /aw-spec-orch implement-delta then build first (the delta's code is
|
|
25
|
-
# generated and compiles), so after the merge the master docs and the code agree.
|
|
26
|
-
# finalize-delta edits ONLY the two master docs; it does not generate code.
|
|
27
|
-
#
|
|
28
|
-
# Launch: /aw-spec-orch finalize-delta [strategy]
|
|
29
|
-
# Prereq: an OPEN change whose delta was implemented.
|
|
30
|
-
# =============================================================================
|
|
31
|
-
|
|
32
|
-
name: aw-spec-finalize-delta
|
|
33
|
-
description: Merge the open change's delta-spec into spec.md and delta-design into design.md (doc-first), append the Change History, and refresh the cross-slice edges from the merged design. Gated first by a SCOPED downstream fence over the transitive blast radius (fence_green), which writes a triage report and asks Abort/Override on red. Leaves the change OPEN — analyze-slice runs next against the merged master, and close-delta archives the change and bumps the version.
|
|
34
|
-
version: 1.2.0
|
|
35
|
-
agent_agnostic: true
|
|
36
|
-
dialect: aw-spec.orchestrator/v1
|
|
37
|
-
|
|
38
|
-
scripts:
|
|
39
|
-
actions:
|
|
40
|
-
sh: .aw-spec/scripts/bash/aw-spec-actions.sh
|
|
41
|
-
ps1: .aw-spec/scripts/powershell/aw-spec-actions.ps1
|
|
42
|
-
xref:
|
|
43
|
-
sh: .aw-spec/scripts/bash/aw-xref.sh
|
|
44
|
-
ps1: .aw-spec/scripts/powershell/aw-xref.ps1
|
|
45
|
-
|
|
46
|
-
vars:
|
|
47
|
-
active_change: ""
|
|
48
|
-
has_change: "false"
|
|
49
|
-
version: "" # the CURRENT version — unchanged by this stage
|
|
50
|
-
next_version: "" # what close-delta will bump to; the number the Change History rows carry
|
|
51
|
-
downstream_count: "0" # transitive + placeholder-filtered dependents (blast radius); drives the gate
|
|
52
|
-
downstream_csv: "" # the blast-radius names, fed to the scoped fence's --also and shown to the human
|
|
53
|
-
fence_ok: "true" # default green so the gate is a no-op when nothing downstream
|
|
54
|
-
gate_decision: "clean" # audit: 'clean' unless a RED fence was deliberately overridden
|
|
55
|
-
|
|
56
|
-
workflow:
|
|
57
|
-
|
|
58
|
-
# 1. Resolve the current feature + its spec; require the spec (a merge target).
|
|
59
|
-
- id: feature_paths
|
|
60
|
-
action: execute_script
|
|
61
|
-
on_error: continue # never crash raw on 'no feature set' — the gate below explains it
|
|
62
|
-
script: { ref: actions }
|
|
63
|
-
subcommand: feature-paths
|
|
64
|
-
outputs:
|
|
65
|
-
- { name: feature_dir, from: "$.feature_dir" }
|
|
66
|
-
- { name: spec_file, from: "$.spec_file" }
|
|
67
|
-
- { name: spec_exists, from: "$.spec_exists" }
|
|
68
|
-
|
|
69
|
-
- id: require_feature
|
|
70
|
-
action: verify_context
|
|
71
|
-
require_non_empty: feature_dir
|
|
72
|
-
on_empty: stop
|
|
73
|
-
on_empty_message: "No active feature. Run /aw-spec-orch select-feature first (pick or create the aggregate, e.g. Order), then re-run finalize-delta."
|
|
74
|
-
|
|
75
|
-
- id: verify_spec
|
|
76
|
-
action: verify_context
|
|
77
|
-
require_true: spec_exists
|
|
78
|
-
on_false: stop
|
|
79
|
-
on_false_message: "No spec.md for the current feature. Run /aw-spec-orch specify + design first."
|
|
80
|
-
|
|
81
|
-
# 1b. Read the OPEN change (opened by cr). finalize-delta needs a change to close.
|
|
82
|
-
- id: read_change
|
|
83
|
-
action: execute_script
|
|
84
|
-
script: { ref: actions }
|
|
85
|
-
subcommand: version-read
|
|
86
|
-
args: ["--feature-dir", "{{feature_dir}}"]
|
|
87
|
-
outputs:
|
|
88
|
-
- { name: active_change, from: "$.active_change" }
|
|
89
|
-
- { name: has_change, from: "$.has_change" }
|
|
90
|
-
- { name: version, from: "$.version" }
|
|
91
|
-
- { name: next_version, from: "$.next_version" }
|
|
92
|
-
|
|
93
|
-
- id: require_change
|
|
94
|
-
action: verify_context
|
|
95
|
-
require_true: has_change
|
|
96
|
-
on_false: stop
|
|
97
|
-
on_false_message: "No open change on this feature — nothing to finalize. Run /aw-spec-orch specify → design → analyze-delta-design → implement-delta first."
|
|
98
|
-
|
|
99
|
-
# 1c. DOWNSTREAM GATE (hard, with a REVIEWED override). Who depends on this aggregate —
|
|
100
|
-
# its OKF Cross-References, TRANSITIVELY (C→B→A all count) and placeholder-filtered
|
|
101
|
-
# (the "_(none observed)_" row is NOT a dependent) = the real blast radius. If any
|
|
102
|
-
# slice does, this change could ripple into it, so run a SCOPED regression fence over
|
|
103
|
-
# this feature + its downstream closure (--scope slice --also <closure>) BEFORE the
|
|
104
|
-
# doc merge, so a block leaves the repo untouched. The fence binds fence_GREEN (ran
|
|
105
|
-
# AND matched >=1), not raw ok, so an empty / zero-match run is RED, never a vacuous
|
|
106
|
-
# pass. If RED we do NOT hard-stop blindly: we WRITE a triage report, then surface the
|
|
107
|
-
# failing log + dependent slices and ASK the developer — Abort (a real downstream
|
|
108
|
-
# break: fix it first) or, having reviewed the log (pre-existing / flaky / unrelated),
|
|
109
|
-
# deliberately Override and close anyway. Non-interactive / CI runs take the FIRST
|
|
110
|
-
# option (Abort), so automation never silently overrides. Skipped when nothing depends
|
|
111
|
-
# on this slice (count 0) or the fence is green.
|
|
112
|
-
- id: xref_impact
|
|
113
|
-
action: execute_script
|
|
114
|
-
on_error: continue
|
|
115
|
-
script: { ref: xref }
|
|
116
|
-
subcommand: list
|
|
117
|
-
args: ["--feature-dir", "{{feature_dir}}"]
|
|
118
|
-
outputs:
|
|
119
|
-
- { name: downstream_count, from: "$.referrer_closure_count" } # transitive + placeholder-filtered
|
|
120
|
-
- { name: downstream_csv, from: "$.referrer_closure_csv" } # blast-radius names → --also + display
|
|
121
|
-
|
|
122
|
-
- id: run_downstream_fence
|
|
123
|
-
condition: "{{downstream_count}} != 0"
|
|
124
|
-
action: execute_script
|
|
125
|
-
on_error: continue
|
|
126
|
-
script: { ref: actions }
|
|
127
|
-
subcommand: test-run
|
|
128
|
-
args: ["--feature-dir", "{{feature_dir}}", "--scope", "slice", "--also", "{{downstream_csv}}"]
|
|
129
|
-
outputs:
|
|
130
|
-
- { name: fence_ok, from: "$.fence_green" }
|
|
131
|
-
- { name: fence_tool, from: "$.tool" }
|
|
132
|
-
- { name: fence_log, from: "$.log_tail" }
|
|
133
|
-
|
|
134
|
-
# Whenever the fence RAN (there are dependents), write a durable report BEFORE asking /
|
|
135
|
-
# stopping — written green OR red, mirroring characterize's drifted-tests.md, so a later green
|
|
136
|
-
# close never archives a STALE red report. On red it is the triage a developer reads while
|
|
137
|
-
# deciding Abort vs Override and, if Overridden, is ARCHIVED with the change as the "closed over
|
|
138
|
-
# red" record; on green it is a short all-clear that overwrites any prior red report. Skipped
|
|
139
|
-
# only when nothing depends on this slice (no fence ran, nothing to report).
|
|
140
|
-
- id: ctx_broken_downstream
|
|
141
|
-
action: build_context
|
|
142
|
-
condition: "{{downstream_count}} != 0"
|
|
143
|
-
vars:
|
|
144
|
-
active_change: "{{active_change}}"
|
|
145
|
-
downstream_count: "{{downstream_count}}"
|
|
146
|
-
downstream_csv: "{{downstream_csv}}"
|
|
147
|
-
fence_ok: "{{fence_ok}}"
|
|
148
|
-
fence_log: "{{fence_log}}"
|
|
149
|
-
context:
|
|
150
|
-
- { path: "{{spec_file}}" }
|
|
151
|
-
- { path: "{{feature_dir}}/changes/{{active_change}}/delta-design.md" }
|
|
152
|
-
- id: write_broken_downstream
|
|
153
|
-
action: agent_author
|
|
154
|
-
condition: "{{downstream_count}} != 0"
|
|
155
|
-
include_standards: false # a triage report, not generated code
|
|
156
|
-
output_target: { type: file, path: "{{feature_dir}}/changes/{{active_change}}/broken-downstream.md" }
|
|
157
|
-
task: |
|
|
158
|
-
Author the DOWNSTREAM report for change {{active_change}}: the result of re-running this
|
|
159
|
-
change against the aggregates that DEPEND ON this feature. finalize-delta does NOT fix a
|
|
160
|
-
downstream slice (that is the downstream slice's own job). Downstream blast radius
|
|
161
|
-
({{downstream_count}}): {{downstream_csv}}. The fence result was fence_green={{fence_ok}}
|
|
162
|
-
(true = every downstream test passed; false = at least one failed). Test log:
|
|
163
|
-
{{fence_log}}
|
|
164
|
-
Always write the file (it is regenerated on every finalize-delta run so a green close never
|
|
165
|
-
leaves a stale red report standing). Stamp when it was generated in both cases.
|
|
166
|
-
|
|
167
|
-
IF fence_green is TRUE (all passed): write a SHORT all-clear — the heading
|
|
168
|
-
`# Broken Downstream — change {{active_change}}`, then a few lines stating that the
|
|
169
|
-
{{downstream_count}} slice(s) that use this feature ({{downstream_csv}}) were re-run against
|
|
170
|
-
this change and all passed, so nothing downstream broke. No per-slice sections; invent nothing.
|
|
171
|
-
|
|
172
|
-
IF fence_green is FALSE (something failed): write the triage record —
|
|
173
|
-
- `# Broken Downstream — change {{active_change}}` and a one-line statement: aggregates that
|
|
174
|
-
USE this feature and whose tests went red when this change was run against them, found by
|
|
175
|
-
finalize-delta's downstream gate. Note it is the record a human reads while deciding Abort vs
|
|
176
|
-
Override, and if the change is Overridden it is archived with the change as the record of
|
|
177
|
-
what was knowingly closed over.
|
|
178
|
-
- A SUMMARY line: total downstream slices in the blast radius, and how many have a failing test.
|
|
179
|
-
- One `##` section per DOWNSTREAM slice that has a failing test — attribute a failure to a
|
|
180
|
-
slice by matching the failing test names in the log to the slice's name. Under it, on their
|
|
181
|
-
own labelled lines: the downstream aggregate, the failing test(s) named in the log, what
|
|
182
|
-
broke (as far as the log shows), and a RESOLUTION line — either this change broke the
|
|
183
|
-
downstream slice's expected contract (fix it in the downstream slice's OWN CR, or re-baseline
|
|
184
|
-
its golden-master) or the failure is pre-existing / flaky / unrelated (a candidate for a
|
|
185
|
-
reviewed Override). Recommend one; do not claim certainty the log does not support.
|
|
186
|
-
- A closing `## How to use this file`: if you Abort, resolve each finding in the downstream
|
|
187
|
-
slice (or re-baseline its golden-master via a CR) then re-run /aw-spec-orch finalize-delta; if
|
|
188
|
-
you Override, this is the archived record of what was knowingly closed over. Do not edit in place.
|
|
189
|
-
Attribute only what the log supports; invent no failures. Do NOT propose an edit to THIS
|
|
190
|
-
feature's code or docs to silence a downstream failure — that would hide a real contract break.
|
|
191
|
-
outputs:
|
|
192
|
-
- { name: broken_downstream_file, from: "$.files" }
|
|
193
|
-
|
|
194
|
-
# Fires ONLY when the fence is RED — a failed test-run binds fence_ok=false, which renders
|
|
195
|
-
# as the string 'false' (json.dumps), so this condition is exactly "the fence is red".
|
|
196
|
-
# A green fence or no downstream users leaves fence_ok truthy and skips both this and the
|
|
197
|
-
# gate. The FIRST option is the safe default (non-interactive / CI → Abort). The chosen
|
|
198
|
-
# label is bound to gate_decision and later written into the OKF log for an audit trail.
|
|
199
|
-
- id: ask_override
|
|
200
|
-
condition: "{{fence_ok}} == false"
|
|
201
|
-
action: ask
|
|
202
|
-
prompt: |
|
|
203
|
-
DOWNSTREAM REGRESSION FENCE RED after change {{active_change}}.
|
|
204
|
-
{{downstream_count}} slice(s) depend on this aggregate: {{downstream_csv}}
|
|
205
|
-
Triage report: {{feature_dir}}/changes/{{active_change}}/broken-downstream.md
|
|
206
|
-
-- last test log ------------------------------------------------------------
|
|
207
|
-
{{fence_log}}
|
|
208
|
-
-----------------------------------------------------------------------------
|
|
209
|
-
Review the failing test(s) and the triage report. Is this break caused by THIS
|
|
210
|
-
change, or is it unrelated (a pre-existing / flaky / different-slice failure)?
|
|
211
|
-
- Abort = a real downstream break: stop, fix the downstream slice (or open
|
|
212
|
-
a CR on it to re-baseline its golden-master), then re-run finalize-delta.
|
|
213
|
-
- Override = you have reviewed the log and are DELIBERATELY closing X anyway.
|
|
214
|
-
options:
|
|
215
|
-
- "Abort (fix downstream first)"
|
|
216
|
-
- "Override (reviewed; close X anyway)"
|
|
217
|
-
answer_var: gate_decision
|
|
218
|
-
|
|
219
|
-
- id: downstream_gate
|
|
220
|
-
condition: "{{fence_ok}} == false"
|
|
221
|
-
action: verify_context
|
|
222
|
-
require_value: gate_decision
|
|
223
|
-
equals: "Override (reviewed; close X anyway)"
|
|
224
|
-
on_mismatch: stop
|
|
225
|
-
on_mismatch_message: "finalize-delta ABORTED — downstream fence RED after change {{active_change}} and the override was declined. {{downstream_count}} slice(s) depend on this aggregate ({{downstream_csv}}): the change would break a slice that USES this one. Triage: {{feature_dir}}/changes/{{active_change}}/broken-downstream.md. Fix the downstream break; or, if the behaviour change is intended, open a CR on the affected slice to re-baseline its golden-master. Then re-run /aw-spec-orch finalize-delta. Last log: {{fence_log}}"
|
|
226
|
-
|
|
227
|
-
# 2. Ensure the master design.md exists (idempotent) — the second merge target.
|
|
228
|
-
- id: design_scaffold
|
|
229
|
-
action: execute_script
|
|
230
|
-
script: { ref: actions }
|
|
231
|
-
subcommand: design-scaffold
|
|
232
|
-
args: ["--feature-dir", "{{feature_dir}}"]
|
|
233
|
-
outputs:
|
|
234
|
-
- { name: design_doc, from: "$.design_doc" }
|
|
235
|
-
|
|
236
|
-
# 3. Pre-execution hooks.
|
|
237
|
-
- id: resolve_pre_hooks
|
|
238
|
-
action: execute_script
|
|
239
|
-
script: { ref: actions }
|
|
240
|
-
subcommand: resolve-hooks
|
|
241
|
-
args: ["--phase", "before_finalize_cr"]
|
|
242
|
-
outputs:
|
|
243
|
-
- { name: before_hooks, from: "$.hooks" }
|
|
244
|
-
- id: dispatch_pre_hooks
|
|
245
|
-
action: dispatch_hooks
|
|
246
|
-
hooks_from_variable: before_hooks
|
|
247
|
-
|
|
248
|
-
# 4. DOC-FIRST merge: fold the two delta docs into the two master docs in place.
|
|
249
|
-
# Context is fed via build_context — agent_generate reads the ENVELOPE, not a
|
|
250
|
-
# step-level context: key (unlike agent_author/agent_query which read both).
|
|
251
|
-
- id: ctx_merge
|
|
252
|
-
action: build_context
|
|
253
|
-
context:
|
|
254
|
-
- { path: "{{feature_dir}}/changes/{{active_change}}/delta-spec.md" }
|
|
255
|
-
- { path: "{{feature_dir}}/changes/{{active_change}}/delta-design.md" }
|
|
256
|
-
- { path: "{{spec_file}}" }
|
|
257
|
-
- { path: "{{design_doc}}" }
|
|
258
|
-
- id: merge_delta
|
|
259
|
-
action: agent_generate
|
|
260
|
-
tools: "Read,Write,Edit"
|
|
261
|
-
permission_mode: acceptEdits
|
|
262
|
-
task: |
|
|
263
|
-
Merge the open change {{active_change}} into the two MASTER docs (both in
|
|
264
|
-
context), DOC-FIRST. The delta docs (in context) are the source of the change;
|
|
265
|
-
apply them and change nothing else.
|
|
266
|
-
To spec.md:
|
|
267
|
-
- Add each ADDED user story as a US-n tagged `Added: {{active_change}}`, and fold
|
|
268
|
-
the ADDED / MODIFIED / REMOVED FR / BR / CN- / DC- / IC- items into their
|
|
269
|
-
sections using the master's vocabulary (EARS FR, BR invariants, etc.).
|
|
270
|
-
- Apply every MODIFIED item as an in-place edit of the existing item; apply every
|
|
271
|
-
REMOVED item by removing it. Keep the rest of spec.md VERBATIM.
|
|
272
|
-
- Append a Change History row for {{active_change}} (date + one-line summary).
|
|
273
|
-
Its Version cell is {{next_version}} — the version this change ships as.
|
|
274
|
-
To design.md:
|
|
275
|
-
- ADD each new design element in its layer section; apply each MODIFIED element as
|
|
276
|
-
an in-place edit of the existing element; remove each REMOVED element.
|
|
277
|
-
- Fold the delta's new DA-n / WA-n into the design's §7 / §8 ledgers, and keep §6
|
|
278
|
-
Traceability in sync (every new spec id has a design home). Keep the rest of
|
|
279
|
-
design.md VERBATIM.
|
|
280
|
-
- Append a Change History row for {{active_change}} (date + one-line summary),
|
|
281
|
-
Version cell {{next_version}}, in lockstep with the spec's row.
|
|
282
|
-
Leave the `**Version**:` HEADER of BOTH documents exactly as it is — it still reads
|
|
283
|
-
{{version}} and does not move here. close-delta stamps both headers to
|
|
284
|
-
{{next_version}} at the moment it bumps active_version.json, so all three carriers
|
|
285
|
-
of the number change in one step by one mechanism. Do not invent a version anywhere.
|
|
286
|
-
Preserve every unrelated section of BOTH docs byte-for-byte. Do NOT touch the
|
|
287
|
-
delta docs (close-delta archives them later) and do NOT touch any source code.
|
|
288
|
-
Report the two files you changed.
|
|
289
|
-
outputs:
|
|
290
|
-
- { name: merged_docs, from: "$.files" }
|
|
291
|
-
|
|
292
|
-
- id: verify_merged
|
|
293
|
-
action: verify_context
|
|
294
|
-
require_non_empty: merged_docs
|
|
295
|
-
on_empty: stop
|
|
296
|
-
on_empty_message: "The merge produced no changes — expected edits to spec.md and design.md. Ensure the delta docs are filled (not the empty template) and re-run."
|
|
297
|
-
|
|
298
|
-
# 4b. Refresh the cross-slice EDGES from the NOW-MERGED master design.md — the delta's
|
|
299
|
-
# added / removed references have just landed, so this is the first point they are
|
|
300
|
-
# authoritative. Reconcile-on-write: new deps appear in the used slices'
|
|
301
|
-
# Cross-References, dropped deps are pruned. `--origin auto` keeps the slice's
|
|
302
|
-
# provenance (greenfield vs reverse-engineered) from its design.md, so this works
|
|
303
|
-
# identically for a greenfield CR and a brownfield CR. Best-effort (never blocks close).
|
|
304
|
-
- id: xref_record
|
|
305
|
-
action: execute_script
|
|
306
|
-
on_error: continue
|
|
307
|
-
script: { ref: xref }
|
|
308
|
-
subcommand: record
|
|
309
|
-
args: ["--feature-dir", "{{feature_dir}}", "--design", "{{design_doc}}", "--origin", "auto"]
|
|
310
|
-
outputs:
|
|
311
|
-
- { name: xref_edge_count, from: "$.edge_count" }
|
|
312
|
-
- { name: xref_origin, from: "$.origin" }
|
|
313
|
-
|
|
314
|
-
# 4b-ii. Re-author the concept's Overview from the NOW-MERGED master design.md — the
|
|
315
|
-
# change may have moved the aggregate's boundary or invariants, and this is the
|
|
316
|
-
# first point the master states them. Section-scoped splice (the Cross-References
|
|
317
|
-
# rows other slices own are untouched). Best-effort; an empty answer is a no-op.
|
|
318
|
-
- id: okf_overview
|
|
319
|
-
action: agent_query
|
|
320
|
-
context: ["{{design_doc}}"]
|
|
321
|
-
include_standards: false
|
|
322
|
-
schema: { overview: "<2-4 sentences of prose>" }
|
|
323
|
-
mock: { overview: "" }
|
|
324
|
-
task: |
|
|
325
|
-
Write the OKF knowledge-concept Overview for the aggregate that the merged
|
|
326
|
-
design.md (in context) describes. 2-4 sentences of PROSE, distilled from §1
|
|
327
|
-
Domain Model: name the aggregate ROOT and what the aggregate IS; state the
|
|
328
|
-
INVARIANTS it guards; state its TRANSACTION BOUNDARY — what it OWNS inside the
|
|
329
|
-
boundary vs what it only REFERENCES by id. Plain prose only: no headings, no
|
|
330
|
-
bullets, no code fences, no file paths, and no restating of the dependency edges
|
|
331
|
-
(those live in the Depends-On / Cross-References tables). Describe only what the
|
|
332
|
-
design states — invent nothing.
|
|
333
|
-
outputs:
|
|
334
|
-
- { name: okf_overview, from: "$.overview" }
|
|
335
|
-
|
|
336
|
-
- id: okf_overview_write
|
|
337
|
-
action: execute_script
|
|
338
|
-
on_error: continue
|
|
339
|
-
script: { ref: xref }
|
|
340
|
-
subcommand: concept-overview
|
|
341
|
-
args: ["--feature-dir", "{{feature_dir}}", "--text", "{{okf_overview}}"]
|
|
342
|
-
|
|
343
|
-
# 4c. Anchor the OKF bundle's freshness journal to the current commit (log.md, OKF §7).
|
|
344
|
-
# Best-effort + git-aware: a no-op when there is no bundle or no commit, so it never
|
|
345
|
-
# writes a non-conformant block. Records that this CR refreshed the cross-references.
|
|
346
|
-
- id: xref_log
|
|
347
|
-
action: execute_script
|
|
348
|
-
on_error: continue
|
|
349
|
-
script: { ref: xref }
|
|
350
|
-
subcommand: log
|
|
351
|
-
args: ["--note", "CR {{active_change}} merged (downstream gate: {{gate_decision}}) — OKF cross-references refreshed"]
|
|
352
|
-
outputs:
|
|
353
|
-
- { name: xref_log, from: "$.log" }
|
|
354
|
-
|
|
355
|
-
# 5. NO ARCHIVE, NO VERSION BUMP HERE. Both moved to close-delta, which runs after
|
|
356
|
-
# analyze-slice — see the header. The change stays OPEN past this stage on purpose:
|
|
357
|
-
# it is what keeps a red analyze-slice recoverable ("fix and re-run") instead of
|
|
358
|
-
# landing on an already-shipped version. The delta docs therefore remain in
|
|
359
|
-
# changes/{{active_change}}/ even though their content is now merged; close-delta
|
|
360
|
-
# moves them to changes/archive/.
|
|
361
|
-
|
|
362
|
-
# 6. Post-execution hooks.
|
|
363
|
-
- id: resolve_post_hooks
|
|
364
|
-
action: execute_script
|
|
365
|
-
script: { ref: actions }
|
|
366
|
-
subcommand: resolve-hooks
|
|
367
|
-
args: ["--phase", "after_finalize_cr"]
|
|
368
|
-
outputs:
|
|
369
|
-
- { name: after_hooks, from: "$.hooks" }
|
|
370
|
-
- id: dispatch_post_hooks
|
|
371
|
-
action: dispatch_hooks
|
|
372
|
-
hooks_from_variable: after_hooks
|
|
373
|
-
|
|
374
|
-
outputs:
|
|
375
|
-
feature_dir: "{{feature_dir}}"
|
|
376
|
-
cr_id: "{{active_change}}"
|
|
377
|
-
merged_docs: "{{merged_docs}}"
|
|
378
|
-
version: "{{version}}"
|
|
379
|
-
downstream_count: "{{downstream_count}}"
|
|
380
|
-
gate_decision: "{{gate_decision}}"
|
|
381
|
-
xref_edge_count: "{{xref_edge_count}}"
|
|
382
|
-
next: "Delta MERGED into spec.md + design.md; OKF edges refreshed ({{xref_edge_count}} dep(s)), {{downstream_count}} downstream slice(s) fenced (gate: {{gate_decision}}). Change {{active_change}} is STILL OPEN and the version is still {{version}}. Next: /aw-spec-orch analyze-slice — it now reads a master spec that carries this change, and a red result is still recoverable because nothing has been archived. Then /aw-spec-orch close-delta archives the change and bumps the version."
|
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
# =============================================================================
|
|
2
|
-
# aw-spec-foundation (orchestrator) — scaffold a project from a foundation bundle
|
|
3
|
-
#
|
|
4
|
-
# Almost entirely deterministic script orchestration (unpack the verified
|
|
5
|
-
# byte-for-byte bundle, rename the sentinel); the model is used ONLY for the
|
|
6
|
-
# optional DbContext merge when the reference sample is included. That merge
|
|
7
|
-
# is an `agent_author` (decl `llm_generate` port): generation is READ-ONLY
|
|
8
|
-
# under every strategy and the ENGINE writes the merged file, so sdk-apply
|
|
9
|
-
# degrades to sdk. No standards/domain/hooks — pure scaffolding, so the merge
|
|
10
|
-
# runs with include_standards: false and a narrow two-file context.
|
|
11
|
-
#
|
|
12
|
-
# Interactive confirmations (proceed / overwrite / reference sample) ride the
|
|
13
|
-
# checkpoint channel under EVERY strategy.
|
|
14
|
-
#
|
|
15
|
-
# Launch via the parametric skill: /aw-spec-orch foundation [strategy]
|
|
16
|
-
# Interactive (no args): LISTS the available foundations to pick from, then ASKS
|
|
17
|
-
# for the app (project) name — both deterministic, no LLM. Fast path still works:
|
|
18
|
-
# /aw-spec-orch foundation agent VerticalSlice AppWeaver.Health
|
|
19
|
-
#
|
|
20
|
-
# Headless:
|
|
21
|
-
# python3 .aw-spec/orchestrator/orchestrator.py \
|
|
22
|
-
# .aw-spec/orchestrator/workflows/aw-spec-foundation.orch.yaml \
|
|
23
|
-
# --checkpoint .aw-spec/orchestrator/.state/foundation.state.json \
|
|
24
|
-
# --input "VerticalSlice AppWeaver.Health" --json
|
|
25
|
-
# =============================================================================
|
|
26
|
-
|
|
27
|
-
name: aw-spec-foundation
|
|
28
|
-
description: Scaffold a complete, compiling project — pick from the available foundation bundles and enter the app name, then unpack the verified bundle and rename its sentinel to your app name. Selection is zero-LLM (list + pick + ask).
|
|
29
|
-
version: 1.1.0
|
|
30
|
-
agent_agnostic: true
|
|
31
|
-
dialect: aw-spec.orchestrator/v1
|
|
32
|
-
|
|
33
|
-
inputs:
|
|
34
|
-
user_input:
|
|
35
|
-
description: "Optional fast path: FoundationName [AppName] [OutputDirectory]. Omit to pick a foundation from the list and be asked for the app name."
|
|
36
|
-
required: false
|
|
37
|
-
bind: USER_INPUT
|
|
38
|
-
|
|
39
|
-
scripts:
|
|
40
|
-
actions:
|
|
41
|
-
sh: .aw-spec/scripts/bash/aw-spec-actions.sh
|
|
42
|
-
ps1: .aw-spec/scripts/powershell/aw-spec-actions.ps1
|
|
43
|
-
|
|
44
|
-
vars:
|
|
45
|
-
overwrite: "no" # flipped by ask_overwrite only when the dry run finds collisions
|
|
46
|
-
ref_written: "0" # stays 0 when the reference sample is declined
|
|
47
|
-
stash_found: "false" # true only when the reference flow stashed a DbContext
|
|
48
|
-
app: "" # resolved app name: fast-path 2nd token, else the ask below
|
|
49
|
-
app_typed: "" # app name entered interactively (empty on the fast path)
|
|
50
|
-
|
|
51
|
-
workflow:
|
|
52
|
-
|
|
53
|
-
# 1a. LIST the available foundations (deterministic docs/<Name>/<Name>.pack.txt
|
|
54
|
-
# scan — no LLM). A direct "Foundation App [out]" argument is parsed here too
|
|
55
|
-
# as an optional fast path (preselect_name / preselect_app / out_dir).
|
|
56
|
-
- id: list_foundations
|
|
57
|
-
action: execute_script
|
|
58
|
-
script: { ref: actions }
|
|
59
|
-
subcommand: foundation-list
|
|
60
|
-
args: ["--args", "{{USER_INPUT}}"]
|
|
61
|
-
outputs:
|
|
62
|
-
- { name: foundations, from: "$.foundations" }
|
|
63
|
-
- { name: foundation_count, from: "$.count" }
|
|
64
|
-
- { name: preselect_name, from: "$.preselect_name" }
|
|
65
|
-
- { name: preselect_app, from: "$.preselect_app" }
|
|
66
|
-
- { name: out_dir, from: "$.out_dir" }
|
|
67
|
-
|
|
68
|
-
- id: have_foundations
|
|
69
|
-
action: verify_context
|
|
70
|
-
require_non_empty: foundations
|
|
71
|
-
on_empty: stop
|
|
72
|
-
on_empty_message: "No foundations found under docs/<Name>/<Name>.pack.txt. Add a foundation bundle (see docs/<Name>/PACKAGING.md) and re-run."
|
|
73
|
-
|
|
74
|
-
# 1b. PICK the foundation. A matching fast-path arg auto-selects; a lone
|
|
75
|
-
# foundation auto-confirms; otherwise the user chooses from the list.
|
|
76
|
-
- id: pick_foundation
|
|
77
|
-
action: user_select
|
|
78
|
-
prompt: "Select a foundation to scaffold from:"
|
|
79
|
-
options_from_variable: foundations
|
|
80
|
-
preselect_from: preselect_name
|
|
81
|
-
single_option_confirm: true
|
|
82
|
-
outputs:
|
|
83
|
-
- { name: fname, from: selection }
|
|
84
|
-
|
|
85
|
-
# 1c. ASK for the app (project) name — deterministic free-text, no LLM. Skipped
|
|
86
|
-
# when the fast-path arg already supplied it (preselect_app non-empty).
|
|
87
|
-
- id: ask_app
|
|
88
|
-
action: ask
|
|
89
|
-
condition: "{{preselect_app}} == "
|
|
90
|
-
prompt: >
|
|
91
|
-
Enter the project (application) name — it replaces the foundation's sentinel
|
|
92
|
-
across the generated tree (dotted / underscored / hyphen / lower forms),
|
|
93
|
-
e.g. AppWeaver.Health:
|
|
94
|
-
answer_var: app_typed
|
|
95
|
-
|
|
96
|
-
# 1d. Coalesce the app name (engine has no compound conditions → two ordered
|
|
97
|
-
# sets): default to the typed answer, then override with the fast-path token.
|
|
98
|
-
- id: app_from_typed
|
|
99
|
-
action: set
|
|
100
|
-
vars: { app: "{{app_typed}}" }
|
|
101
|
-
- id: app_from_arg
|
|
102
|
-
action: set
|
|
103
|
-
condition: "{{preselect_app}} != "
|
|
104
|
-
vars: { app: "{{preselect_app}}" }
|
|
105
|
-
|
|
106
|
-
# 1e. Locate the bundle/unpacker for the CHOSEN foundation + read the (bounded)
|
|
107
|
-
# pack header (sentinel + file_count shown in the confirm below).
|
|
108
|
-
- id: locate
|
|
109
|
-
action: execute_script
|
|
110
|
-
script: { ref: actions }
|
|
111
|
-
subcommand: foundation-locate
|
|
112
|
-
args: ["--name", "{{fname}}", "--app", "{{app}}", "--out", "{{out_dir}}"]
|
|
113
|
-
outputs:
|
|
114
|
-
- { name: locate_ok, from: "$.ok" }
|
|
115
|
-
- { name: locate_msg, from: "$.reason" }
|
|
116
|
-
- { name: available, from: "$.available" }
|
|
117
|
-
- { name: fname, from: "$.name" }
|
|
118
|
-
- { name: app, from: "$.app" }
|
|
119
|
-
- { name: out_dir, from: "$.out_dir" }
|
|
120
|
-
- { name: sentinel, from: "$.sentinel" }
|
|
121
|
-
- { name: file_count, from: "$.file_count" }
|
|
122
|
-
|
|
123
|
-
- id: locate_gate
|
|
124
|
-
action: verify_context
|
|
125
|
-
require_true: locate_ok
|
|
126
|
-
on_false: stop
|
|
127
|
-
on_false_message: "{{locate_msg}} (available foundations: {{available}})"
|
|
128
|
-
|
|
129
|
-
# 2. Confirm the scaffold plan (checkpoint kind 'ask' under every strategy).
|
|
130
|
-
- id: confirm
|
|
131
|
-
action: ask
|
|
132
|
-
prompt: |
|
|
133
|
-
Foundation: {{fname}} (sentinel {{sentinel}}, {{file_count}} files)
|
|
134
|
-
App Name: {{app}}
|
|
135
|
-
Output: {{out_dir}}
|
|
136
|
-
Rename {{sentinel}} -> {{app}} (dotted/underscored/hyphen/lower forms).
|
|
137
|
-
Unchanged: 'Projects' sample domain + AppWeaver.* framework packages. Proceed?
|
|
138
|
-
options: ["yes", "no"]
|
|
139
|
-
answer_var: proceed
|
|
140
|
-
|
|
141
|
-
- id: confirm_gate
|
|
142
|
-
action: verify_context
|
|
143
|
-
require_value: proceed
|
|
144
|
-
equals: "yes"
|
|
145
|
-
on_mismatch: stop
|
|
146
|
-
on_mismatch_message: "Cancelled by user."
|
|
147
|
-
|
|
148
|
-
# 3. Dry-run to surface collisions, then confirm overwrite if needed.
|
|
149
|
-
- id: dry_run
|
|
150
|
-
action: execute_script
|
|
151
|
-
script: { ref: actions }
|
|
152
|
-
subcommand: foundation-unpack
|
|
153
|
-
args: ["--name", "{{fname}}", "--app", "{{app}}", "--out", "{{out_dir}}", "--dry-run"]
|
|
154
|
-
outputs:
|
|
155
|
-
- { name: has_collisions, from: "$.has_collisions" }
|
|
156
|
-
|
|
157
|
-
- id: ask_overwrite
|
|
158
|
-
action: ask
|
|
159
|
-
condition: "{{has_collisions}} == true"
|
|
160
|
-
prompt: "Output files already exist. Overwrite them?"
|
|
161
|
-
options: ["yes", "no"]
|
|
162
|
-
answer_var: overwrite
|
|
163
|
-
|
|
164
|
-
- id: overwrite_gate
|
|
165
|
-
action: verify_context
|
|
166
|
-
condition: "{{has_collisions}} == true"
|
|
167
|
-
require_value: overwrite
|
|
168
|
-
equals: "yes"
|
|
169
|
-
on_mismatch: stop
|
|
170
|
-
on_mismatch_message: "Aborted — output files exist and overwrite was declined."
|
|
171
|
-
|
|
172
|
-
# 4. Unpack for real.
|
|
173
|
-
- id: unpack
|
|
174
|
-
action: execute_script
|
|
175
|
-
script: { ref: actions }
|
|
176
|
-
subcommand: foundation-unpack
|
|
177
|
-
args: ["--name", "{{fname}}", "--app", "{{app}}", "--out", "{{out_dir}}", "--force", "{{overwrite}}"]
|
|
178
|
-
outputs:
|
|
179
|
-
- { name: written, from: "$.written" }
|
|
180
|
-
|
|
181
|
-
# 5. Optional reference sample.
|
|
182
|
-
- id: ask_reference
|
|
183
|
-
action: ask
|
|
184
|
-
prompt: "Include the reference sample project (Projects, Users, Reports slices)?"
|
|
185
|
-
options: ["yes", "no"]
|
|
186
|
-
answer_var: want_reference
|
|
187
|
-
|
|
188
|
-
- id: stash_dbcontext
|
|
189
|
-
action: execute_script
|
|
190
|
-
condition: "{{want_reference}} == yes"
|
|
191
|
-
script: { ref: actions }
|
|
192
|
-
subcommand: foundation-stash-dbcontext
|
|
193
|
-
args: ["--out", "{{out_dir}}"]
|
|
194
|
-
outputs:
|
|
195
|
-
- { name: stash_found, from: "$.found" }
|
|
196
|
-
- { name: db_context, from: "$.dbcontext" }
|
|
197
|
-
- { name: db_backup, from: "$.backup" }
|
|
198
|
-
|
|
199
|
-
- id: reference_unpack
|
|
200
|
-
action: execute_script
|
|
201
|
-
condition: "{{want_reference}} == yes"
|
|
202
|
-
script: { ref: actions }
|
|
203
|
-
subcommand: foundation-unpack
|
|
204
|
-
args: ["--name", "{{fname}}", "--app", "{{app}}", "--out", "{{out_dir}}", "--reference"]
|
|
205
|
-
outputs:
|
|
206
|
-
- { name: ref_written, from: "$.written" }
|
|
207
|
-
|
|
208
|
-
# 6. Merge the foundation DbContext (usings + DbSet<>) back over the reference
|
|
209
|
-
# one. agent_author: read-only generation, the ENGINE writes the target.
|
|
210
|
-
- id: merge_dbcontext
|
|
211
|
-
action: agent_author
|
|
212
|
-
condition: "{{stash_found}} == true"
|
|
213
|
-
context: ["{{db_backup}}", "{{db_context}}"]
|
|
214
|
-
include_standards: false
|
|
215
|
-
task: |
|
|
216
|
-
The target file ({{db_context}}) currently holds the REFERENCE DbContext
|
|
217
|
-
(sample DbSet<> properties, no OnModelCreating). The backup ({{db_backup}})
|
|
218
|
-
holds the FOUNDATION DbContext (full OnModelCreating, no DbSet<>). Produce a
|
|
219
|
-
single merged ApplicationDbContext:
|
|
220
|
-
- Base = the FOUNDATION file (backup).
|
|
221
|
-
- Add any `using` directives from the reference that are missing.
|
|
222
|
-
- Insert every reference `public DbSet<…>` line as a block right after the
|
|
223
|
-
class opening brace (before OnModelCreating), preserving any comment above them.
|
|
224
|
-
- Keep everything else in the foundation file unchanged.
|
|
225
|
-
output_target: { type: file, path: "{{db_context}}" }
|
|
226
|
-
|
|
227
|
-
# 7. Verify (sentinel residue must be zero in the generated tree).
|
|
228
|
-
- id: verify
|
|
229
|
-
action: execute_script
|
|
230
|
-
script: { ref: actions }
|
|
231
|
-
subcommand: foundation-verify
|
|
232
|
-
args: ["--out", "{{out_dir}}", "--sentinel", "{{sentinel}}"]
|
|
233
|
-
outputs:
|
|
234
|
-
- { name: clean, from: "$.clean" }
|
|
235
|
-
- { name: residue, from: "$.residue" }
|
|
236
|
-
|
|
237
|
-
outputs:
|
|
238
|
-
foundation: "{{fname}}"
|
|
239
|
-
app: "{{app}}"
|
|
240
|
-
output_dir: "{{out_dir}}"
|
|
241
|
-
files_written: "{{written}}"
|
|
242
|
-
reference_files: "{{ref_written}}"
|
|
243
|
-
sentinel_clean: "{{clean}}"
|
|
244
|
-
sentinel_residue: "{{residue}}"
|
|
245
|
-
note: "Foundation scaffolded into {{out_dir}} ({{written}} file(s), sentinel renamed to {{app}}). Configure your AppWeaver.* NuGet feed and run the AppHost to confirm the scaffold starts before building on it."
|
|
246
|
-
next: "/aw-spec-orch select-feature (pick the feature to build; every stage from specify onward reads that active feature and stops without it. If this project has domain rule packs under docs/domainspecs/, run /aw-spec-orch select-domain first — it is one-time and optional.)"
|