aw-spec-cli 0.1.16 → 0.1.17
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 +18 -18
- package/assets/.appweaver/ORCH-DIALECT.md +1 -3
- package/assets/.appweaver/RULE-PARTITION.md +29 -13
- package/assets/.appweaver/STACK-PROFILES.md +10 -9
- package/assets/.appweaver/orchestrator/.state/smoke.state.json +32 -0
- package/assets/.appweaver/orchestrator/AGENT-PROFILE.md +4 -1
- package/assets/.appweaver/orchestrator/modules/delta-plan.orch.yaml +251 -0
- package/assets/.appweaver/orchestrator/modules/delta-spec.orch.yaml +104 -35
- package/assets/.appweaver/orchestrator/orchestrator.py +5 -4
- package/assets/.appweaver/orchestrator/rev-templates/delta-design-template.skeleton.md +94 -36
- package/assets/.appweaver/orchestrator/rev-templates/design-template.skeleton.md +1 -1
- package/assets/.appweaver/orchestrator/rev-templates/domain-model-template.skeleton.md +115 -0
- package/assets/.appweaver/orchestrator/rev-templates/domain-rule-bindings.skeleton.md +2 -9
- package/assets/.appweaver/orchestrator/rev-templates/tech-rule-bindings.skeleton.md +16 -40
- package/assets/.appweaver/orchestrator/rev-templates/ui-delta-design-template.skeleton.md +38 -17
- package/assets/.appweaver/orchestrator/rev-templates/ui-design-template.skeleton.md +8 -8
- package/assets/.appweaver/orchestrator/workflows/aw-spec-adopt.orch.yaml +10 -11
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-plan-delta.orch.yaml +673 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-plan.orch.yaml +535 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-slice-delta.orch.yaml +643 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +84 -701
- package/assets/.appweaver/orchestrator/workflows/aw-spec-build.orch.yaml +4 -4
- package/assets/.appweaver/orchestrator/workflows/aw-spec-characterize.orch.yaml +7 -7
- package/assets/.appweaver/orchestrator/workflows/aw-spec-close-delta.orch.yaml +16 -14
- package/assets/.appweaver/orchestrator/workflows/aw-spec-constitution.orch.yaml +2 -2
- package/assets/.appweaver/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +243 -144
- package/assets/.appweaver/orchestrator/workflows/aw-spec-implement.orch.yaml +877 -578
- package/assets/.appweaver/orchestrator/workflows/aw-spec-inventory.orch.yaml +4 -4
- package/assets/.appweaver/orchestrator/workflows/aw-spec-onboard.orch.yaml +32 -91
- package/assets/.appweaver/orchestrator/workflows/aw-spec-parity.orch.yaml +2 -2
- package/assets/.appweaver/orchestrator/workflows/aw-spec-plan.orch.yaml +836 -514
- package/assets/.appweaver/orchestrator/workflows/aw-spec-run.orch.yaml +2 -2
- package/assets/.appweaver/orchestrator/workflows/aw-spec-select-bounded-context.orch.yaml +132 -0
- package/assets/.appweaver/orchestrator/workflows/aw-spec-select-feature.orch.yaml +38 -5
- package/assets/.appweaver/orchestrator/workflows/aw-spec-select-stack.orch.yaml +3 -3
- package/assets/.appweaver/orchestrator/workflows/aw-spec-specify.orch.yaml +271 -979
- package/assets/.appweaver/scripts/bash/aw-spec-actions.sh +1085 -3385
- package/assets/.appweaver/scripts/bash/aw-xref.sh +1 -2
- package/assets/.appweaver/scripts/bash/common.sh +47 -0
- package/assets/.appweaver/scripts/powershell/aw-spec-actions.ps1 +914 -3220
- package/assets/.appweaver/scripts/powershell/aw-xref.ps1 +1 -2
- package/assets/.appweaver/scripts/python/aw-payload-parity.py +19 -3
- package/assets/.appweaver/scripts/python/aw-stack.py +6 -2
- package/assets/.appweaver/scripts/python/aw-xref.py +86 -350
- package/assets/.appweaver/templates/constitution-ui-template.md +1 -1
- package/assets/.appweaver/templates/delta-design-template.md +120 -30
- package/assets/.appweaver/templates/delta-domain-model-template.md +81 -0
- package/assets/.appweaver/templates/delta-spec-template.md +43 -17
- package/assets/.appweaver/templates/design-template.md +68 -98
- package/assets/.appweaver/templates/domain-model-template.md +130 -0
- package/assets/.appweaver/templates/okf-concept-template.md +2 -2
- package/assets/.appweaver/templates/source-map-template.md +3 -3
- package/assets/.appweaver/templates/spec-template.md +100 -122
- package/assets/.appweaver/templates/ui-delta-design-template.md +159 -0
- package/assets/.appweaver/templates/ui-design-template.md +46 -75
- package/assets/guardrails/projects/dotnet-default-project/domain-rule-bindings.md +7 -18
- package/assets/guardrails/projects/dotnet-default-project/tech-rule-bindings.md +34 -39
- package/assets/guardrails/requirement-spec.txt +2 -2
- package/assets/guardrails/technology/dotnet-webapi/testing.md +1 -1
- package/package.json +1 -1
- package/assets/.appweaver/orchestrator/modules/delta-design.orch.yaml +0 -105
- package/assets/.appweaver/orchestrator/modules/spec-state-gate.orch.yaml +0 -87
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +0 -251
- package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +0 -813
- package/assets/.appweaver/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +0 -253
- package/assets/.appweaver/orchestrator/workflows/aw-spec-implement-ui.orch.yaml +0 -663
- package/assets/.appweaver/orchestrator/workflows/aw-spec-plan-ui.orch.yaml +0 -600
- package/assets/.appweaver/orchestrator/workflows/aw-spec-story-plan.orch.yaml +0 -1147
- package/assets/.appweaver/orchestrator/workflows/aw-spec-sync-stories.orch.yaml +0 -1121
- package/assets/.appweaver/templates/story-template.md +0 -178
|
@@ -1,251 +0,0 @@
|
|
|
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)"
|