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.
Files changed (70) hide show
  1. package/assets/.appweaver/DESIGN-FORMAT.md +18 -18
  2. package/assets/.appweaver/ORCH-DIALECT.md +1 -3
  3. package/assets/.appweaver/RULE-PARTITION.md +29 -13
  4. package/assets/.appweaver/STACK-PROFILES.md +10 -9
  5. package/assets/.appweaver/orchestrator/.state/smoke.state.json +32 -0
  6. package/assets/.appweaver/orchestrator/AGENT-PROFILE.md +4 -1
  7. package/assets/.appweaver/orchestrator/modules/delta-plan.orch.yaml +251 -0
  8. package/assets/.appweaver/orchestrator/modules/delta-spec.orch.yaml +104 -35
  9. package/assets/.appweaver/orchestrator/orchestrator.py +5 -4
  10. package/assets/.appweaver/orchestrator/rev-templates/delta-design-template.skeleton.md +94 -36
  11. package/assets/.appweaver/orchestrator/rev-templates/design-template.skeleton.md +1 -1
  12. package/assets/.appweaver/orchestrator/rev-templates/domain-model-template.skeleton.md +115 -0
  13. package/assets/.appweaver/orchestrator/rev-templates/domain-rule-bindings.skeleton.md +2 -9
  14. package/assets/.appweaver/orchestrator/rev-templates/tech-rule-bindings.skeleton.md +16 -40
  15. package/assets/.appweaver/orchestrator/rev-templates/ui-delta-design-template.skeleton.md +38 -17
  16. package/assets/.appweaver/orchestrator/rev-templates/ui-design-template.skeleton.md +8 -8
  17. package/assets/.appweaver/orchestrator/workflows/aw-spec-adopt.orch.yaml +10 -11
  18. package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-plan-delta.orch.yaml +673 -0
  19. package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-plan.orch.yaml +535 -0
  20. package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-slice-delta.orch.yaml +643 -0
  21. package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +84 -701
  22. package/assets/.appweaver/orchestrator/workflows/aw-spec-build.orch.yaml +4 -4
  23. package/assets/.appweaver/orchestrator/workflows/aw-spec-characterize.orch.yaml +7 -7
  24. package/assets/.appweaver/orchestrator/workflows/aw-spec-close-delta.orch.yaml +16 -14
  25. package/assets/.appweaver/orchestrator/workflows/aw-spec-constitution.orch.yaml +2 -2
  26. package/assets/.appweaver/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +243 -144
  27. package/assets/.appweaver/orchestrator/workflows/aw-spec-implement.orch.yaml +877 -578
  28. package/assets/.appweaver/orchestrator/workflows/aw-spec-inventory.orch.yaml +4 -4
  29. package/assets/.appweaver/orchestrator/workflows/aw-spec-onboard.orch.yaml +32 -91
  30. package/assets/.appweaver/orchestrator/workflows/aw-spec-parity.orch.yaml +2 -2
  31. package/assets/.appweaver/orchestrator/workflows/aw-spec-plan.orch.yaml +836 -514
  32. package/assets/.appweaver/orchestrator/workflows/aw-spec-run.orch.yaml +2 -2
  33. package/assets/.appweaver/orchestrator/workflows/aw-spec-select-bounded-context.orch.yaml +132 -0
  34. package/assets/.appweaver/orchestrator/workflows/aw-spec-select-feature.orch.yaml +38 -5
  35. package/assets/.appweaver/orchestrator/workflows/aw-spec-select-stack.orch.yaml +3 -3
  36. package/assets/.appweaver/orchestrator/workflows/aw-spec-specify.orch.yaml +271 -979
  37. package/assets/.appweaver/scripts/bash/aw-spec-actions.sh +1085 -3385
  38. package/assets/.appweaver/scripts/bash/aw-xref.sh +1 -2
  39. package/assets/.appweaver/scripts/bash/common.sh +47 -0
  40. package/assets/.appweaver/scripts/powershell/aw-spec-actions.ps1 +914 -3220
  41. package/assets/.appweaver/scripts/powershell/aw-xref.ps1 +1 -2
  42. package/assets/.appweaver/scripts/python/aw-payload-parity.py +19 -3
  43. package/assets/.appweaver/scripts/python/aw-stack.py +6 -2
  44. package/assets/.appweaver/scripts/python/aw-xref.py +86 -350
  45. package/assets/.appweaver/templates/constitution-ui-template.md +1 -1
  46. package/assets/.appweaver/templates/delta-design-template.md +120 -30
  47. package/assets/.appweaver/templates/delta-domain-model-template.md +81 -0
  48. package/assets/.appweaver/templates/delta-spec-template.md +43 -17
  49. package/assets/.appweaver/templates/design-template.md +68 -98
  50. package/assets/.appweaver/templates/domain-model-template.md +130 -0
  51. package/assets/.appweaver/templates/okf-concept-template.md +2 -2
  52. package/assets/.appweaver/templates/source-map-template.md +3 -3
  53. package/assets/.appweaver/templates/spec-template.md +100 -122
  54. package/assets/.appweaver/templates/ui-delta-design-template.md +159 -0
  55. package/assets/.appweaver/templates/ui-design-template.md +46 -75
  56. package/assets/guardrails/projects/dotnet-default-project/domain-rule-bindings.md +7 -18
  57. package/assets/guardrails/projects/dotnet-default-project/tech-rule-bindings.md +34 -39
  58. package/assets/guardrails/requirement-spec.txt +2 -2
  59. package/assets/guardrails/technology/dotnet-webapi/testing.md +1 -1
  60. package/package.json +1 -1
  61. package/assets/.appweaver/orchestrator/modules/delta-design.orch.yaml +0 -105
  62. package/assets/.appweaver/orchestrator/modules/spec-state-gate.orch.yaml +0 -87
  63. package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +0 -251
  64. package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +0 -813
  65. package/assets/.appweaver/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +0 -253
  66. package/assets/.appweaver/orchestrator/workflows/aw-spec-implement-ui.orch.yaml +0 -663
  67. package/assets/.appweaver/orchestrator/workflows/aw-spec-plan-ui.orch.yaml +0 -600
  68. package/assets/.appweaver/orchestrator/workflows/aw-spec-story-plan.orch.yaml +0 -1147
  69. package/assets/.appweaver/orchestrator/workflows/aw-spec-sync-stories.orch.yaml +0 -1121
  70. package/assets/.appweaver/templates/story-template.md +0 -178
@@ -1,253 +0,0 @@
1
- # =============================================================================
2
- # aw-spec-implement-delta (orchestrator) — generate the DELTA's code from the design
3
- #
4
- # The CR analog of implement, SCOPED to the open change. GENERATE / edit exactly the
5
- # source files + paired tests that delta-design.md marks ADDED or MODIFIED, into the
6
- # existing project tree, using the master design.md as the base context. The delta
7
- # design is the authoritative source for WHAT the change is — analyze-delta-design already
8
- # conformed it to the delta spec. The target STACK is bound from the constitution.
9
- # implement-delta does NOT touch spec.md / design.md and does NOT close the change —
10
- # finalize-delta merges the delta into the master docs afterward, and close-delta bumps
11
- # the version at the very end.
12
- #
13
- # specify → design → ⟨review⟩ → analyze-delta-design → implement-delta ← you are here
14
- # → build → finalize-delta → analyze-slice → close-delta
15
- #
16
- # Prereqs: run /appweaver analyze-delta-design first (the delta design is conformed),
17
- # and the project must already be scaffolded (/appweaver foundation) — implement-delta
18
- # GENERATES into that tree.
19
- #
20
- # Launch: /appweaver implement-delta [strategy] [guidance]
21
- # =============================================================================
22
-
23
- name: aw-spec-implement-delta
24
- description: Generate only the source files + paired tests the open change's delta-design.md marks ADDED/MODIFIED, into the existing project tree, bound to the project's stack. Model-driven, delta-design-scoped; does not touch the master docs or close the change.
25
- version: 1.0.0
26
- agent_agnostic: true
27
- dialect: aw-spec.orchestrator/v1
28
-
29
- inputs:
30
- user_input:
31
- description: Optional implementation guidance (stack hints, focus area).
32
- required: false
33
- bind: USER_INPUT
34
-
35
- scripts:
36
- actions:
37
- sh: .appweaver/scripts/bash/aw-spec-actions.sh
38
- ps1: .appweaver/scripts/powershell/aw-spec-actions.ps1
39
- xref:
40
- sh: .appweaver/scripts/bash/aw-xref.sh
41
- ps1: .appweaver/scripts/powershell/aw-xref.ps1
42
-
43
- # Sticky standards seed = the UNIVERSAL always-on rule only (ai-rules). Same FRAMEWORK /
44
- # code-generation set as the forward implement — HOW to build — but no longer hardcoded:
45
- # it is CONFIGURATION, loaded per-command from guardrails/projects/<project>/tech-rule-bindings.md
46
- # by the tech-select module (see the tech_select step below). No domain rule files:
47
- # everything domain reached the delta via delta-spec → delta-design; the tech map lists
48
- # only technical files. The architecture principles come via constitution.technical.md
49
- # (referred to directly, as-is — NOT mapped); the structure via design.md. (missing skipped)
50
- standards:
51
- - { path: .appweaver/ai-rules.md } # kit-resident: the universal operating rules, every flow
52
-
53
- workflow:
54
-
55
- # 0. TECHNICAL rule files → sticky standards (configuration, not hardcoded).
56
- # tech-select reads guardrails/projects/<project>/tech-rule-bindings.md under
57
- # "## /aw-spec-implement-delta" and loads that set into the sticky standards the
58
- # agent_generate step ALWAYS prepends. No domain rule file is loaded here — the tech
59
- # map lists only technical files (rule-partition intact). No blocking gate: an
60
- # unconfigured project soft-continues (constitution.technical.md still carries the
61
- # tech base, referred to directly below).
62
- - id: tech_select
63
- action: include
64
- module: .appweaver/orchestrator/modules/tech-select.orch.yaml
65
- with: { command: aw-spec-implement-delta }
66
-
67
- # 1. Resolve the current feature + its master design (the base context).
68
- - id: feature_paths
69
- action: execute_script
70
- on_error: continue # never crash raw on 'no feature set' — the gate below explains it
71
- script: { ref: actions }
72
- subcommand: feature-paths
73
- outputs:
74
- - { name: feature_dir, from: "$.feature_dir" }
75
- - { name: design_doc, from: "$.design_file" }
76
- - { name: design_exists, from: "$.design_exists" }
77
-
78
- - id: require_feature
79
- action: verify_context
80
- require_non_empty: feature_dir
81
- on_empty: stop
82
- on_empty_message: "No active feature. Run /appweaver select-feature first (pick or create the aggregate, e.g. Order), then re-run implement-delta."
83
-
84
- - id: verify_design
85
- action: verify_context
86
- require_true: design_exists
87
- on_false: stop
88
- on_false_message: "No design.md for the current feature. Run /appweaver design (and, for a change, /appweaver specify + design + analyze-delta-design) first."
89
-
90
- # 1b. Read the OPEN change (opened by cr). implement-delta needs a change to implement.
91
- # Require the SERVICE LANE and its source path — implement-delta writes into the
92
- # subtree the lane owns, exactly as implement does.
93
- - id: lane_gate
94
- action: include
95
- module: .appweaver/orchestrator/modules/lane-gate.orch.yaml
96
- with: { require: backend, command: "/appweaver implement-delta" }
97
-
98
- - id: read_change
99
- action: execute_script
100
- script: { ref: actions }
101
- subcommand: version-read
102
- args: ["--feature-dir", "{{feature_dir}}"]
103
- outputs:
104
- - { name: active_change, from: "$.active_change" }
105
- - { name: has_change, from: "$.has_change" }
106
-
107
- - id: require_change
108
- action: verify_context
109
- require_true: has_change
110
- on_false: stop
111
- on_false_message: "No open change on this feature. Run /appweaver specify <change> then /appweaver design, review the delta docs, and /appweaver analyze-delta-design before implement-delta."
112
-
113
- # 1c. Require the PROJECT — a scaffolded, compiling tree — to be present. implement-delta
114
- # GENERATES the delta's code INTO it; with no project there is nowhere to place the
115
- # files. Searches the LANE'S OWN subtree for any ecosystem manifest before falling
116
- # back to the whole repo, so a stack that ships no foundation bundle passes on the
117
- # project its team scaffolded.
118
- - id: detect_foundation
119
- action: execute_script
120
- script: { ref: actions }
121
- subcommand: detect-project
122
- args: ["--root", "{{lane_source_path}}"]
123
- outputs:
124
- - { name: foundation_present, from: "$.scaffolded" }
125
- - { name: project_markers, from: "$.markers" }
126
- - { name: project_scope, from: "$.scope" }
127
-
128
- - id: foundation_gate
129
- action: verify_context
130
- require_true: foundation_present
131
- on_false: stop
132
- on_false_message: "No project found under the {{lane_id}} lane's source path `{{lane_source_path}}`, nor anywhere else in this repository. implement-delta GENERATES the delta's code into an existing project tree, so one has to be scaffolded first: run /appweaver foundation <FoundationName> <AppName> where a foundation bundle ships for this stack, or create the project with the stack's own tooling under that path. Any ecosystem manifest marks it — .sln/.csproj, pom.xml, build.gradle(.kts), package.json, go.mod, Cargo.toml or pyproject.toml."
133
-
134
- # 2. Pre-execution hooks.
135
- - id: resolve_pre_hooks
136
- action: execute_script
137
- script: { ref: actions }
138
- subcommand: resolve-hooks
139
- args: ["--phase", "before_implement_cr"]
140
- outputs:
141
- - { name: before_hooks, from: "$.hooks" }
142
- - id: dispatch_pre_hooks
143
- action: dispatch_hooks
144
- hooks_from_variable: before_hooks
145
-
146
- # 3. Model-driven generation SCOPED to the delta: delta-design.md → the ADDED/MODIFIED
147
- # source files + paired tests. The master design.md is the base (unchanged elements
148
- # the delta depends on); the constitution/stack profile fixes HOW. The delta spec is
149
- # in context ONLY to cite traceability ids on the paired tests.
150
- # Context is fed via build_context — agent_generate reads the ENVELOPE, not a
151
- # step-level context: key (unlike agent_author/agent_query which read both).
152
- - id: ctx_generate
153
- action: build_context
154
- context:
155
- - { path: "{{feature_dir}}/changes/{{active_change}}/delta-design.md" }
156
- - { path: "{{feature_dir}}/changes/{{active_change}}/delta-spec.md" }
157
- - { path: "{{design_doc}}" }
158
- - { path: .appweaver/memory/constitution.technical.md, optional: true } # technology base ONLY — no domain
159
- - id: generate
160
- action: agent_generate
161
- tools: "Read,Write,Edit"
162
- permission_mode: acceptEdits
163
- task: |
164
- Implement ONLY this change into the existing project tree, STRICTLY from its
165
- delta-design.md (in context). The delta design is the authoritative source of
166
- WHAT changed — analyze-delta-design already conformed it to the delta spec. The
167
- master design.md (in context) is the BASE: the unchanged elements the delta
168
- depends on; do NOT regenerate them. Guidance: {{USER_INPUT}}
169
- Rules:
170
- - SCOPE = THE DELTA ONLY. Realise exactly the elements delta-design.md marks
171
- ADDED (create the new file) or MODIFIED (edit the existing file in place).
172
- Touch NOTHING the delta does not list, except the regression re-tests below.
173
- - THE DELTA DESIGN IS THE ONLY DOMAIN INPUT. You have the delta design + master
174
- design.md + framework/code standards, and NO domain rule files. Introduce NO
175
- domain rule, identifier, terminology, or behaviour the delta design does not
176
- state. If something domain seems missing, STOP and surface it (fix it in cr /
177
- analyze-delta-design); never invent it from memory.
178
- - BIND THE STACK: this lane is `{{lane_id}}` — {{lane_title}}, language
179
- {{lane_language}} ({{lane_ecosystem}}), declared in .appweaver/stacks.json and
180
- compiled with `{{lane_build}}`, tested with `{{lane_test}}`. Generate in THAT
181
- language and framework and no other, using its idioms, its project layout and
182
- its test framework. Take persistence, messaging and the remaining technology
183
- choices from the constitution's technology base + the loaded standards; the
184
- design is technology-agnostic, so do not re-decide anything already fixed there.
185
- If the loaded standards describe a DIFFERENT stack than the one above, the lane
186
- wins on language and layout — the standards' stack-specific mechanics do not
187
- apply, so follow their INTENT and STOP to surface the mismatch in your summary.
188
- - WRITE ONLY UNDER `{{lane_source_path}}` — the source path the `{{lane_id}}`
189
- lane declares in .appweaver/stacks.json. That subtree is this lane's, and a file
190
- outside it belongs to another lane or to no lane at all.
191
- - Follow the project's existing folder/layer convention + the loaded
192
- coding-standards, dependency-policy and testing standards for HOW to structure,
193
- name, and place files WITHIN that subtree. Match the surrounding code already
194
- in the tree.
195
- - Realise EVERY ADDED/MODIFIED delta element as code: one file per Domain type /
196
- Application use-case / API endpoint / Infrastructure adapter, placed by layer.
197
- Preserve the ubiquitous-language names verbatim. Enforce each new/changed
198
- Domain invariant, handler orchestration, API error contract, the Cross-Cutting
199
- Concerns realisations (audit / retention / data-exposure — CN-/DC-) and the
200
- External Integrations table's contracts (IC-) exactly as the delta design states.
201
- - COMPONENTS: if a delta element depends on a framework component, code against
202
- its ABSTRACTION / port as the delta design declares — do NOT hand-roll it.
203
- Installing the component (packages, wiring, config) is /appweaver
204
- add-component <Component>; if the port isn't present, code to it and note that
205
- as the prerequisite.
206
- - Author a paired test for every ADDED/MODIFIED behaviour / use-case / endpoint;
207
- derive the cases from the delta design's pre/post/invariant contracts and cite
208
- the delta-spec id (FR / BR / CN / DC / IC / US).
209
- - REGRESSION: for each element in the delta design's "Regression targets", verify
210
- (add/adjust a test where needed) that the existing behaviour still holds after
211
- a shared element changed — but do NOT rewrite that existing behaviour.
212
- - Where generated code depends on a delta Assumption (DA-n) / Workaround (WA-n),
213
- mark it with a comment citing that id.
214
- outputs:
215
- - { name: files, from: "$.files" }
216
-
217
- - id: verify_generated
218
- action: verify_context
219
- require_non_empty: files
220
- on_empty: stop
221
- on_empty_message: "No files generated. Ensure /appweaver design produced a filled delta-design.md (not the empty template) and it passed /appweaver analyze-delta-design, then re-run."
222
-
223
- # 3b. Refresh THIS slice's OKF concept source_files with the delta's changed files —
224
- # UNION, never replace (the delta is scoped; {{files}} is only the ADDED/MODIFIED
225
- # files). The cross-slice EDGES are refreshed later in finalize-delta, AFTER the delta
226
- # merges into the master design.md (here the master still holds the pre-change deps,
227
- # so recording edges now would read stale references). Best-effort enrichment.
228
- - id: xref_concept_merge
229
- action: execute_script
230
- on_error: continue
231
- script: { ref: xref }
232
- subcommand: concept-upsert
233
- args: ["--feature-dir", "{{feature_dir}}", "--source-files", "{{files}}", "--merge"]
234
- outputs:
235
- - { name: okf_concept, from: "$.concept" }
236
-
237
- # 4. Post-execution hooks.
238
- - id: resolve_post_hooks
239
- action: execute_script
240
- script: { ref: actions }
241
- subcommand: resolve-hooks
242
- args: ["--phase", "after_implement_cr"]
243
- outputs:
244
- - { name: after_hooks, from: "$.hooks" }
245
- - id: dispatch_post_hooks
246
- action: dispatch_hooks
247
- hooks_from_variable: after_hooks
248
-
249
- outputs:
250
- feature_dir: "{{feature_dir}}"
251
- cr_id: "{{active_change}}"
252
- files: "{{files}}"
253
- next: "/appweaver build → finalize-delta → analyze-slice → close-delta. COMPILE FIRST (build), then finalize-delta runs the downstream fence and merges the delta into spec.md + design.md — but leaves the change OPEN. analyze-slice then verifies the slice against that now-merged master (tests, domain conformance, referrer blast radius) while a red result is still recoverable. close-delta LAST archives the change and bumps the version."