aw-spec-cli 0.1.3 → 0.1.5

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 (230) hide show
  1. package/README.md +291 -0
  2. package/assets/.agents/agent.json +28 -0
  3. package/assets/.agents/skills/aw-spec-orch/SKILL.md +56 -0
  4. package/assets/.agents/skills/aw-spec-orch-demo/SKILL.md +59 -0
  5. package/assets/.aw-spec/DESIGN-FORMAT.md +151 -0
  6. package/assets/.aw-spec/ORCH-DIALECT.md +156 -0
  7. package/assets/.aw-spec/RULE-PARTITION.md +126 -0
  8. package/assets/.aw-spec/extensions/agent-context/extension.yml +12 -9
  9. package/assets/.aw-spec/extensions.yml +12 -19
  10. package/assets/.aw-spec/integrations/aw-spec.manifest.json +1 -9
  11. package/assets/.aw-spec/interpreter/run-skill.py +1158 -0
  12. package/assets/.aw-spec/orchestrator/AGENT-PROFILE.md +94 -0
  13. package/assets/.aw-spec/orchestrator/README.md +300 -0
  14. package/assets/.aw-spec/orchestrator/adapters/claude_agent_sdk.py +74 -0
  15. package/assets/.aw-spec/orchestrator/adapters/google_antigravity.py +74 -0
  16. package/assets/.aw-spec/orchestrator/modules/delta-design.orch.yaml +105 -0
  17. package/assets/.aw-spec/orchestrator/modules/delta-spec.orch.yaml +79 -0
  18. package/assets/.aw-spec/orchestrator/modules/domain-select.orch.yaml +81 -0
  19. package/assets/.aw-spec/orchestrator/modules/tech-select.orch.yaml +75 -0
  20. package/assets/.aw-spec/orchestrator/orchestrator.py +1721 -0
  21. package/assets/.aw-spec/orchestrator/rev-templates/ai-rules.reference.md +40 -0
  22. package/assets/.aw-spec/orchestrator/rev-templates/comandrulemap.skeleton.md +59 -0
  23. package/assets/.aw-spec/orchestrator/rev-templates/commandtechrulemap.skeleton.md +97 -0
  24. package/assets/.aw-spec/orchestrator/rev-templates/domain-constitution.skeleton.md +61 -0
  25. package/assets/.aw-spec/orchestrator/rev-templates/domain-requirements.skeleton.md +48 -0
  26. package/assets/.aw-spec/orchestrator/rev-templates/domain-rule-file.skeleton.md +39 -0
  27. package/assets/.aw-spec/orchestrator/rev-templates/technical-constitution.skeleton.md +106 -0
  28. package/assets/.aw-spec/orchestrator/rev-templates/technical-rule-file.skeleton.md +54 -0
  29. package/assets/.aw-spec/orchestrator/workflows/_smoke.orch.yaml +160 -0
  30. package/assets/.aw-spec/orchestrator/workflows/aw-spec-add-component.orch.yaml +244 -0
  31. package/assets/.aw-spec/orchestrator/workflows/aw-spec-adopt.orch.yaml +775 -0
  32. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +248 -0
  33. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +261 -0
  34. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +425 -0
  35. package/assets/.aw-spec/orchestrator/workflows/aw-spec-build.orch.yaml +188 -0
  36. package/assets/.aw-spec/orchestrator/workflows/aw-spec-characterize.orch.yaml +474 -0
  37. package/assets/.aw-spec/orchestrator/workflows/aw-spec-close-delta.orch.yaml +181 -0
  38. package/assets/.aw-spec/orchestrator/workflows/aw-spec-constitution.orch.yaml +284 -0
  39. package/assets/.aw-spec/orchestrator/workflows/aw-spec-demo.orch.yaml +103 -0
  40. package/assets/.aw-spec/orchestrator/workflows/aw-spec-dependency-tree.orch.yaml +69 -0
  41. package/assets/.aw-spec/orchestrator/workflows/aw-spec-deploy.orch.yaml +85 -0
  42. package/assets/.aw-spec/orchestrator/workflows/aw-spec-design.orch.yaml +382 -0
  43. package/assets/.aw-spec/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +382 -0
  44. package/assets/.aw-spec/orchestrator/workflows/aw-spec-foundation.orch.yaml +246 -0
  45. package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +231 -0
  46. package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement.orch.yaml +258 -0
  47. package/assets/.aw-spec/orchestrator/workflows/aw-spec-inventory.orch.yaml +236 -0
  48. package/assets/.aw-spec/orchestrator/workflows/aw-spec-onboard.orch.yaml +949 -0
  49. package/assets/.aw-spec/orchestrator/workflows/aw-spec-parity.orch.yaml +293 -0
  50. package/assets/.aw-spec/orchestrator/workflows/aw-spec-run.orch.yaml +177 -0
  51. package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-domain.orch.yaml +79 -0
  52. package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-feature.orch.yaml +128 -0
  53. package/assets/.aw-spec/orchestrator/workflows/aw-spec-specify.orch.yaml +412 -0
  54. package/assets/.aw-spec/scripts/bash/aw-inventory.sh +14 -0
  55. package/assets/.aw-spec/scripts/bash/aw-parity.sh +13 -0
  56. package/assets/.aw-spec/scripts/bash/aw-rev-constitution.sh +13 -0
  57. package/assets/.aw-spec/scripts/bash/aw-spec-actions.sh +1899 -0
  58. package/assets/.aw-spec/scripts/bash/aw-xref.sh +15 -0
  59. package/assets/.aw-spec/scripts/bash/common.sh +11 -60
  60. package/assets/.aw-spec/scripts/powershell/aw-inventory.ps1 +14 -0
  61. package/assets/.aw-spec/scripts/powershell/aw-parity.ps1 +13 -0
  62. package/assets/.aw-spec/scripts/powershell/aw-rev-constitution.ps1 +13 -0
  63. package/assets/.aw-spec/scripts/powershell/aw-spec-actions.ps1 +1563 -0
  64. package/assets/.aw-spec/scripts/powershell/aw-xref.ps1 +15 -0
  65. package/assets/.aw-spec/scripts/python/aw-inventory.py +683 -0
  66. package/assets/.aw-spec/scripts/python/aw-parity.py +380 -0
  67. package/assets/.aw-spec/scripts/python/aw-rev-constitution.py +312 -0
  68. package/assets/.aw-spec/scripts/python/aw-xref.py +1330 -0
  69. package/assets/.aw-spec/scripts/python/validate_okf.py +349 -0
  70. package/assets/.aw-spec/templates/constitution-domain-template.md +75 -0
  71. package/assets/.aw-spec/templates/constitution-technical-template.md +70 -0
  72. package/assets/.aw-spec/templates/delta-design-template.md +69 -0
  73. package/assets/.aw-spec/templates/delta-spec-template.md +60 -0
  74. package/assets/.aw-spec/templates/design-template.md +383 -0
  75. package/assets/.aw-spec/templates/okf-concept-template.md +103 -0
  76. package/assets/.aw-spec/templates/parity-manifest-template.json +49 -0
  77. package/assets/.aw-spec/templates/source-map-template.md +85 -0
  78. package/assets/.aw-spec/templates/spec-template.md +192 -71
  79. package/assets/.claude/agent.json +27 -0
  80. package/assets/.claude/skills/aw-spec-orch/SKILL.md +55 -0
  81. package/assets/.claude/skills/aw-spec-orch-demo/SKILL.md +59 -0
  82. package/assets/.kilocode/agent.json +28 -0
  83. package/assets/.kilocode/workflows/aw-spec-orch-demo.md +59 -0
  84. package/assets/.kilocode/workflows/aw-spec-orch.md +55 -0
  85. package/assets/docs/architecture/clean-architecture.md +1 -1
  86. package/assets/docs/architecture/cqrs.md +1 -1
  87. package/assets/docs/architecture/eventing.md +1 -1
  88. package/assets/docs/architecture/folder-structure.md +1 -1
  89. package/assets/docs/architecture/modular-monolith.md +1 -1
  90. package/assets/docs/architecture/persistence.md +1 -1
  91. package/assets/docs/architecture/testing.md +1 -1
  92. package/assets/docs/architecture/vertical-slices.md +1 -1
  93. package/assets/docs/components/Email/README.md +1 -1
  94. package/assets/docs/components/Jobs/README.md +1 -1
  95. package/assets/docs/components/QrGenerator/README.md +1 -1
  96. package/assets/docs/components/README.md +1 -1
  97. package/assets/docs/domain/domain-driven-design.md +1 -1
  98. package/assets/docs/domainspecs/healthcare/api-versioning.domain.md +1 -1
  99. package/assets/docs/domainspecs/healthcare/auditing.domain.md +86 -18
  100. package/assets/docs/domainspecs/healthcare/authorization.domain.md +1 -1
  101. package/assets/docs/domainspecs/healthcare/clinical-terms.md +1 -1
  102. package/assets/docs/domainspecs/healthcare/coding-standards.domain.md +1 -1
  103. package/assets/docs/domainspecs/healthcare/comandrulemap.md +58 -124
  104. package/assets/docs/domainspecs/healthcare/commandtechrulemap.md +119 -0
  105. package/assets/docs/domainspecs/healthcare/consent.md +1 -1
  106. package/assets/docs/domainspecs/healthcare/cqrs.domain.md +1 -1
  107. package/assets/docs/domainspecs/healthcare/data-classification.domain.md +1 -1
  108. package/assets/docs/domainspecs/healthcare/dependency-policy.domain.md +1 -1
  109. package/assets/docs/domainspecs/healthcare/dicom.md +1 -1
  110. package/assets/docs/domainspecs/healthcare/domain-driven-design.domain.md +1 -1
  111. package/assets/docs/domainspecs/healthcare/eventing.domain.md +1 -1
  112. package/assets/docs/domainspecs/healthcare/fhir.md +1 -1
  113. package/assets/docs/domainspecs/healthcare/folder-structure.domain.md +1 -1
  114. package/assets/docs/domainspecs/healthcare/hipaa.md +1 -1
  115. package/assets/docs/domainspecs/healthcare/hl7.md +1 -1
  116. package/assets/docs/domainspecs/healthcare/integration-terms.md +1 -1
  117. package/assets/docs/domainspecs/healthcare/persistence.domain.md +1 -1
  118. package/assets/docs/domainspecs/healthcare/terminology.md +1 -1
  119. package/assets/docs/domainspecs/healthcare/testing.domain.md +1 -1
  120. package/assets/docs/domainspecs/healthcare/vertical-slices.domain.md +1 -1
  121. package/assets/docs/domainspecs/healthcare/zero-trust.domain.md +1 -1
  122. package/assets/docs/domainspecs/pharma/api-versioning.domain.md +1 -1
  123. package/assets/docs/domainspecs/pharma/atc.md +1 -1
  124. package/assets/docs/domainspecs/pharma/auditing.domain.md +80 -16
  125. package/assets/docs/domainspecs/pharma/authorization.domain.md +1 -1
  126. package/assets/docs/domainspecs/pharma/coding-standards.domain.md +1 -1
  127. package/assets/docs/domainspecs/pharma/comandrulemap.md +64 -142
  128. package/assets/docs/domainspecs/pharma/commandtechrulemap.md +119 -0
  129. package/assets/docs/domainspecs/pharma/cqrs.domain.md +1 -1
  130. package/assets/docs/domainspecs/pharma/data-classification.domain.md +1 -1
  131. package/assets/docs/domainspecs/pharma/data-provenance.md +1 -1
  132. package/assets/docs/domainspecs/pharma/dependency-policy.domain.md +1 -1
  133. package/assets/docs/domainspecs/pharma/domain-driven-design.domain.md +1 -1
  134. package/assets/docs/domainspecs/pharma/eventing.domain.md +1 -1
  135. package/assets/docs/domainspecs/pharma/fhir.md +1 -1
  136. package/assets/docs/domainspecs/pharma/folder-structure.domain.md +1 -1
  137. package/assets/docs/domainspecs/pharma/hl7.md +1 -1
  138. package/assets/docs/domainspecs/pharma/idmp.md +1 -1
  139. package/assets/docs/domainspecs/pharma/integration-terms.md +1 -1
  140. package/assets/docs/domainspecs/pharma/ndc.md +1 -1
  141. package/assets/docs/domainspecs/pharma/persistence.domain.md +1 -1
  142. package/assets/docs/domainspecs/pharma/pharma-terms.md +1 -1
  143. package/assets/docs/domainspecs/pharma/product-lifecycle.domain.md +1 -1
  144. package/assets/docs/domainspecs/pharma/regulatory-compliance.md +1 -1
  145. package/assets/docs/domainspecs/pharma/terminology.md +1 -1
  146. package/assets/docs/domainspecs/pharma/testing.domain.md +1 -1
  147. package/assets/docs/domainspecs/pharma/vertical-slices.domain.md +1 -1
  148. package/assets/docs/domainspecs/pharma/zero-trust.domain.md +1 -1
  149. package/assets/docs/governance/api-versioning.md +1 -1
  150. package/assets/docs/governance/coding-standards.md +1 -1
  151. package/assets/docs/governance/dependency-policy.md +1 -1
  152. package/assets/docs/requirement-spec.txt +13 -1
  153. package/assets/docs/security/auditing.md +54 -11
  154. package/assets/docs/security/authorization.md +1 -1
  155. package/assets/docs/security/data-classification.md +1 -1
  156. package/assets/docs/security/zero-trust.md +1 -1
  157. package/dist/commands/update.d.ts +3 -0
  158. package/dist/commands/update.d.ts.map +1 -0
  159. package/dist/commands/update.js +142 -0
  160. package/dist/commands/update.js.map +1 -0
  161. package/dist/utils/manifest.d.ts +31 -0
  162. package/dist/utils/manifest.d.ts.map +1 -0
  163. package/dist/utils/manifest.js +91 -0
  164. package/dist/utils/manifest.js.map +1 -0
  165. package/dist/utils/paths.js +2 -2
  166. package/dist/utils/paths.js.map +1 -1
  167. package/dist/utils/update-engine.d.ts +52 -0
  168. package/dist/utils/update-engine.d.ts.map +1 -0
  169. package/dist/utils/update-engine.js +203 -0
  170. package/dist/utils/update-engine.js.map +1 -0
  171. package/package.json +1 -1
  172. package/assets/.agents/skills/aw-spec-addcomponent/SKILL.md +0 -129
  173. package/assets/.agents/skills/aw-spec-agent-context-update/SKILL.md +0 -31
  174. package/assets/.agents/skills/aw-spec-analyze/SKILL.md +0 -296
  175. package/assets/.agents/skills/aw-spec-checklist/SKILL.md +0 -374
  176. package/assets/.agents/skills/aw-spec-clarify/SKILL.md +0 -320
  177. package/assets/.agents/skills/aw-spec-constitution/SKILL.md +0 -194
  178. package/assets/.agents/skills/aw-spec-fast-implement/SKILL.md +0 -268
  179. package/assets/.agents/skills/aw-spec-foundation/SKILL.md +0 -358
  180. package/assets/.agents/skills/aw-spec-implement/SKILL.md +0 -279
  181. package/assets/.agents/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
  182. package/assets/.agents/skills/aw-spec-plan/SKILL.md +0 -221
  183. package/assets/.agents/skills/aw-spec-select-domain/SKILL.md +0 -73
  184. package/assets/.agents/skills/aw-spec-specify/SKILL.md +0 -382
  185. package/assets/.agents/skills/aw-spec-tasks/SKILL.md +0 -259
  186. package/assets/.agents/skills/aw-spec-taskstoissues/SKILL.md +0 -107
  187. package/assets/.aw-spec/integrations/claude.manifest.json +0 -17
  188. package/assets/.aw-spec/scripts/bash/check-prerequisites.sh +0 -189
  189. package/assets/.aw-spec/scripts/bash/create-new-feature.sh +0 -299
  190. package/assets/.aw-spec/scripts/bash/setup-plan.sh +0 -84
  191. package/assets/.aw-spec/scripts/bash/setup-tasks.sh +0 -91
  192. package/assets/.aw-spec/templates/checklist-template.md +0 -40
  193. package/assets/.aw-spec/templates/constitution-template.md +0 -57
  194. package/assets/.aw-spec/templates/plan-template.md +0 -113
  195. package/assets/.aw-spec/templates/tasks-template.md +0 -252
  196. package/assets/.aw-spec/workflows/aw-spec/workflow.yml +0 -77
  197. package/assets/.aw-spec/workflows/workflow-registry.json +0 -13
  198. package/assets/.claude/skills/aw-spec-addcomponent/SKILL.md +0 -129
  199. package/assets/.claude/skills/aw-spec-agent-context-update/SKILL.md +0 -31
  200. package/assets/.claude/skills/aw-spec-analyze/SKILL.md +0 -296
  201. package/assets/.claude/skills/aw-spec-checklist/SKILL.md +0 -374
  202. package/assets/.claude/skills/aw-spec-clarify/SKILL.md +0 -320
  203. package/assets/.claude/skills/aw-spec-constitution/SKILL.md +0 -194
  204. package/assets/.claude/skills/aw-spec-fast-implement/SKILL.md +0 -268
  205. package/assets/.claude/skills/aw-spec-foundation/SKILL.md +0 -358
  206. package/assets/.claude/skills/aw-spec-implement/SKILL.md +0 -279
  207. package/assets/.claude/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
  208. package/assets/.claude/skills/aw-spec-plan/SKILL.md +0 -221
  209. package/assets/.claude/skills/aw-spec-select-domain/SKILL.md +0 -73
  210. package/assets/.claude/skills/aw-spec-specify/SKILL.md +0 -382
  211. package/assets/.claude/skills/aw-spec-tasks/SKILL.md +0 -259
  212. package/assets/.claude/skills/aw-spec-taskstoissues/SKILL.md +0 -107
  213. package/assets/.kilocode/rules/specify-rules.md +0 -4
  214. package/assets/.kilocode/workflows/aw-spec-addcomponent.md +0 -129
  215. package/assets/.kilocode/workflows/aw-spec-agent-context.update.md +0 -31
  216. package/assets/.kilocode/workflows/aw-spec-analyze.md +0 -296
  217. package/assets/.kilocode/workflows/aw-spec-checklist.md +0 -374
  218. package/assets/.kilocode/workflows/aw-spec-clarify.md +0 -320
  219. package/assets/.kilocode/workflows/aw-spec-constitution.md +0 -194
  220. package/assets/.kilocode/workflows/aw-spec-fast-implement.md +0 -263
  221. package/assets/.kilocode/workflows/aw-spec-foundation.md +0 -358
  222. package/assets/.kilocode/workflows/aw-spec-implement.md +0 -279
  223. package/assets/.kilocode/workflows/aw-spec-minimal-implementation.md +0 -204
  224. package/assets/.kilocode/workflows/aw-spec-plan.md +0 -221
  225. package/assets/.kilocode/workflows/aw-spec-select-domain.md +0 -73
  226. package/assets/.kilocode/workflows/aw-spec-specify.md +0 -382
  227. package/assets/.kilocode/workflows/aw-spec-tasks.md +0 -259
  228. package/assets/.kilocode/workflows/aw-spec-taskstoissues.md +0 -107
  229. package/assets/docs/command.txt +0 -295
  230. package/assets/docs/pharma-constitution.my-ref.md +0 -86
@@ -0,0 +1,156 @@
1
+ # aw-spec.orchestrator/v1 — orchestrator workflow dialect
2
+
3
+ The workflow dialect executed by `.aw-spec/orchestrator/orchestrator.py`, and the
4
+ **only** workflow dialect that ships. It grew out of the earlier declarative
5
+ `skill.yaml` dialect (`aw-spec.declarative/v1`, the `aw-spec-decl-*` skills), which
6
+ was **retired 2026-08-03** along with its reference doc: same YAML subset, same
7
+ step/`outputs:`/`condition:` conventions, but built for
8
+ the **orchestrator model**: the interpreter assembles 100% of every model
9
+ payload (system = standards/rules, user = artifacts + task) and a **fresh
10
+ agent** executes it under one of the 4 strategies. Everything here is common
11
+ across agent roots — `.claude`, `.agents`, `.kilocode` differ only in their
12
+ transport profile (`agent.json`) and their thin `/aw-spec-orch` launcher.
13
+
14
+ ## Layout (the common folder)
15
+
16
+ ```
17
+ .aw-spec/orchestrator/
18
+ orchestrator.py the engine (stdlib-only; reuses run-skill's YAML loader)
19
+ ORCH-DIALECT.md → this doc lives at .aw-spec/ORCH-DIALECT.md
20
+ README.md strategies, transports, checkpoint machinery
21
+ AGENT-PROFILE.md profile (agent.json) reference
22
+ adapters/ shared per-SDK adapters (claude_agent_sdk, google_antigravity)
23
+ modules/ shared includable modules (*.orch.yaml): delta-design,
24
+ delta-spec, domain-select, tech-select
25
+ rev-templates/ neutral (shape-only) skeletons the brownfield govern-backward
26
+ authors follow — see aw-spec-onboard.orch.yaml
27
+ workflows/ one aw-spec-<skill>.orch.yaml per converted skill (+ _smoke)
28
+ .aw-spec/scripts/ 53 deterministic subcommands — 36 in aw-spec-actions (a true
29
+ bash+powershell pair) + 17 across aw-xref, aw-inventory,
30
+ aw-parity, aw-rev-constitution (thin sh/ps1 wrappers over one
31
+ python core each) — reused as-is
32
+ ```
33
+
34
+ ## Execution model (strictly held)
35
+
36
+ 1. **Context management is the orchestrator's** — as in `workflows/aw-spec-demo.orch.yaml`.
37
+ `build_context` REPLACES the per-request envelope; `load_standards`
38
+ maintains the sticky system prefix. No agent ever assembles its own context.
39
+ 2. **Execution follows any of the 4 strategies** (`--strategy`, per-step
40
+ `strategy:` override): `sdk`, `sdk-apply`, `spawn`, `agent` — they only
41
+ govern WHO fulfills a generation, never what goes into it.
42
+ 3. **The checkpoint channel is strategy-independent** (D1): `ask`,
43
+ `user_select` and `dispatch_hooks` suspend via `--checkpoint` under EVERY
44
+ strategy, so the launching agent can relay to the human. Converted-skill
45
+ launchers therefore always pass `--checkpoint`.
46
+
47
+ ## Workflow file anatomy
48
+
49
+ ```yaml
50
+ name: aw-spec-<skill>
51
+ dialect: aw-spec.orchestrator/v1 # checked by --validate
52
+
53
+ inputs: # F10 — bound from --input
54
+ user_input: { description: …, required: false, bind: USER_INPUT }
55
+
56
+ scripts: # F1 — ref map for execute_script
57
+ actions:
58
+ sh: .aw-spec/scripts/bash/aw-spec-actions.sh
59
+ ps1: .aw-spec/scripts/powershell/aw-spec-actions.ps1
60
+
61
+ standards: # F4 — optional seed of the sticky set
62
+ - { path: docs/architecture/clean-architecture.md, optional: true }
63
+
64
+ vars: { k: v } # seed variables (--var k=v overrides)
65
+ workflow: [ …steps… ]
66
+ outputs: { k: "{{v}}" } # resolved and printed at the end
67
+ ```
68
+
69
+ Every step: `id:` (required, unique), `action:`, optional `condition:`
70
+ (`==`/`!=`/truthy), optional `strategy:`/`model:` (generating actions),
71
+ optional `outputs: [{name, from: "$.field"}]` (JSONPath into the step's
72
+ structured result). `{{var}}` substitutes with dotted/index access
73
+ (`{{q.text}}`, `{{items.0}}`); a value that is EXACTLY one `{{ref}}` yields
74
+ the raw object, not its JSON string.
75
+
76
+ ## Actions
77
+
78
+ | action | who runs | what it does |
79
+ |---|---|---|
80
+ | `set` | engine | assign vars (`vars:` or decl-style `parameters:`); raw-object aware |
81
+ | `build_context` | engine | REPLACE the per-request envelope: `system:`/`context:` file lists (+ `context_from: <var>` holding paths a prior generation reported, + `vars:`) |
82
+ | `load_standards` | engine | F4 — append to the **sticky standards set** prepended to every system block (dedup, `optional:`, `files:`/`files_from_variable`). This is the byte-stable, prompt-cacheable prefix |
83
+ | `execute_script` | engine | F1 — run a `scripts:` ref (`subcommand:` + `args:`; sh/ps1 via `--os`); stdout's last line = JSON, bound via `outputs[]`; `on_error: continue` tolerated; cached across resumes; runs for real even in mock transport |
84
+ | `verify_context` | engine | F2 — gates: `required_files` (+`allow_missing`), `require_non_empty` (+`on_empty[_message]`), `require_true` (+`on_false[_message]`), `require_value`+`equals` (+`on_mismatch[_message]`). `stop` raises a terminal stop |
85
+ | `agent_generate` | fresh agent | demo contract (code work): agent DECIDES file paths per the loaded standards, writes with its tools, reports `files[]` in the trailing ```json fence. `sdk-apply` = read-only generation + invoking agent applies |
86
+ | `agent_review` | fresh agent | read-only review of `review_of_var`/`review_of` files → `{pass, issues}` |
87
+ | `agent_author` | fresh agent | F5 — **authored artifact** (decl `llm_generate`): the INTERPRETER owns `output_target: {type: file, path}`. Generation is READ-ONLY under every strategy; the ENGINE writes the returned content (sdk-apply degrades to sdk). Optional `context:` (per-request extras), `include_standards: false` (narrow payload) |
88
+ | `agent_query` | fresh agent | F6 — generic read-only structured JSON (decl `llm_query`): `schema:` shapes the required fence, `outputs[]` binds it, `mock:` supplies the mock-transport result; one malformed-JSON retry on fresh strategies |
89
+ | `ask` | human (via launcher) | F7 — question: `prompt`, `options`/`options_from`/`options_from_variable`, `multi`, `answer_key`, `answer_var` (default `answer`). Sources in order: cache → `--answer k=v` → `--non-interactive` (first option; all when multi) → checkpoint suspend `ask` → stdin |
90
+ | `user_select` | human (via launcher) | F7 — pick ONE from `options_from_variable`; `preselect_from` (direct-argument fast path), `single_option_confirm`; `--select stepid=v`; binds `selection` + `outputs[]` |
91
+ | `dispatch_hooks` | invoking agent | F8 — suspend kind `hook` with the `hooks_from_variable` list (slash commands of the LAUNCHING agent); logged-only without a checkpoint; never re-fires across resumes |
92
+ | `include` | engine | F9 — run a module `.orch.yaml` inline: shares vars/envelope/standards/scripts/replay-cache; `with:` seeds inputs; cache keys namespaced `inc:<id>/…`; module `Stop` stops the caller |
93
+ | `loop` | engine | `while: <cond>` + `max_iterations` (default 5), or F3 foreach `over: "{{list}}"` + `as: item` (binds `item`, `item_index`, `iteration`); `break` (+`condition:`) exits the innermost loop |
94
+
95
+ Decl steps may keep their `parameters:` wrapper — every ported action reads
96
+ `parameters:` or flat step keys interchangeably, so conversion is mechanical.
97
+
98
+ ## The suspend-kind protocol (checkpoint transport)
99
+
100
+ At each handoff the engine writes sidecars next to the state file, prints the
101
+ `pending` request (exit 2), and the launcher fulfills it, writes
102
+ `response_path`, and re-runs the same command. Kinds:
103
+
104
+ | kind | sidecars | launcher writes to response_path | resume ingests as |
105
+ |---|---|---|---|
106
+ | `agent_generate` | system/user | full reply ending in ```json fence | parsed fence → replay cache |
107
+ | `agent_review`, `agent_query` | system/user | read-only reply ending in ```json fence | parsed fence |
108
+ | `apply` | artifact | confirmation ```json fence after writing the named files | parsed fence |
109
+ | `author` | system/user (+`target`) | the COMPLETE file content — no fence, no commentary (the ENGINE writes `target`) | raw content |
110
+ | `ask` | none (`prompt`/`options`/`multi` inline) | the answer as plain text (comma-separated when multi) | string / list |
111
+ | `select` | none (`prompt`/`options` inline) | the chosen option's value | string |
112
+ | `hook` | none (`hooks` inline) | `done` after running the mandatory slash commands | `true` |
113
+
114
+ A rejected response re-suspends with a `note` explaining what to fix. The
115
+ state file persists vars, strategy, model, profile path, `--input`, answers,
116
+ selects, `--os` and the replay cache — a bare
117
+ `… <workflow> --checkpoint <state>` resumes with everything restored.
118
+ Completed steps (generations, scripts, answers, hooks) replay from the cache
119
+ and never re-fire; loop iterations get their own keys (`loopid#i`).
120
+
121
+ ## CLI
122
+
123
+ ```
124
+ orchestrator.py <workflow.orch.yaml>
125
+ --strategy sdk|sdk-apply|spawn|agent (per-step `strategy:` overrides)
126
+ --agent-profile <agent.json> spawn/sdk/sdk-apply
127
+ --checkpoint <statefile> the interaction channel (always, for converted skills)
128
+ --input "<text>" bound via inputs: (F10)
129
+ --answer k=v … / --select stepid=v … HITL prefills
130
+ --non-interactive CI: first option everywhere
131
+ --os posix|windows script variant (F1 / D7)
132
+ --model <name> / --budget / --isolation bare|fresh / --sdk-install
133
+ --var k=v … / --show-full / --json / --dry-run
134
+ --validate F11 — static lint, never executes
135
+ ```
136
+
137
+ ## decl → orch conversion map
138
+
139
+ | declarative (run-skill) | orchestrator |
140
+ |---|---|
141
+ | `load_context` (standards, domain rules, constitution) | `load_standards` (sticky system set — D3) |
142
+ | `load_context` (feature artifacts, templates) | `build_context` `context:` before the consuming step |
143
+ | `llm_generate` + `output_target` | `agent_author` (same `output_target`) |
144
+ | `llm_query` | `agent_query` (+ `schema:`, `mock:`) |
145
+ | `include_loaded_context: false` | narrow `build_context` + `include_standards: false` |
146
+ | `execute_script` / `verify_context` / `ask` / `user_select` / `dispatch_hooks` / `set` / `loop` / `break` / `include` | same action, `parameters:` wrapper optional |
147
+ | implement-style code tasks | `agent_generate` (+ `agent_review`), `context_from` chaining between iterations |
148
+
149
+ ## Validation & smoke
150
+
151
+ - `--validate` every workflow/module (unknown actions/strategies, duplicate
152
+ ids, script refs + files on disk, `output_target.path`, module paths,
153
+ unproduced `{{vars}}`, dialect header).
154
+ - `workflows/_smoke.orch.yaml` exercises every construct with no model and no
155
+ writes outside `.smoke-out`: run it `--non-interactive` (CI) and with
156
+ `--checkpoint` (protocol walk-through).
@@ -0,0 +1,126 @@
1
+ # Rule Partition — which command reads which rules
2
+
3
+ *AppWeaver · aw-spec · companion to [Spec-Anchored-Pipeline.md](Spec-Anchored-Pipeline.md) and
4
+ [DESIGN-FORMAT.md](DESIGN-FORMAT.md)*
5
+
6
+ The authority on how rule files are partitioned across the pipeline, so each phase gets a
7
+ focused, non-overlapping context. Domain-agnostic and technology-agnostic: it describes the
8
+ **contract**, never a particular project's files. The concrete file lists are configuration —
9
+ they live in the two rule maps, not here.
10
+
11
+ ---
12
+
13
+ ## The principle — the spec is the pivot
14
+
15
+ Domain knowledge enters the pipeline **once**, at `specify`, and is written into the spec as
16
+ identified requirements (`BR-` / `CN-` / `DC-` / `IC-` / `FR-`). From that point on the **spec is
17
+ the only domain input**. Later phases mediate against the spec, not against the domain files.
18
+
19
+ This is what makes a spec re-platformable: swap the technical rule set and the same spec still
20
+ governs. It also stops domain detail leaking straight into code authoring without ever being
21
+ pinned in a reviewable requirement.
22
+
23
+ > **Lift, then gate.** If a domain constraint is needed downstream, it must first be *lifted*
24
+ > into the spec as an id. A gate that finds a constraint in neither the spec nor the design
25
+ > reports `LIFT-FAILURE:` and routes back to `specify` — it must never invent the rule into a
26
+ > design or into code.
27
+
28
+ ---
29
+
30
+ ## The three classes of rule input
31
+
32
+ | Class | What it is | Carried by |
33
+ |---|---|---|
34
+ | **Domain rule files** | Business/domain rules of the active domain | `comandrulemap.md`, read by `resolve-domain` |
35
+ | **Technical rule files** | Architecture, conventions, code-generation rules | `commandtechrulemap.md`, read by `resolve-tech` |
36
+ | **Constitution halves** | Ratified standing principles | Referred to **directly, as-is** — never mapped |
37
+
38
+ Both maps are **configuration**: to change what a phase loads, edit the map, not the workflow.
39
+ A command with **no heading** in a map loads nothing mapped for that class and
40
+ **soft-continues** — an absent heading is a valid state, never a failure.
41
+
42
+ ### The constitution halves are not mapped
43
+
44
+ - `.aw-spec/memory/constitution.technical.md` — the technology base. Standing input to
45
+ **design + implement**. Domain-agnostic.
46
+ - `.aw-spec/memory/constitution.domain.md` — the active domain's addenda. Standing input to
47
+ **specify** (and the gate checklist). Deliberately **not** loaded by design or implement.
48
+ - `.aw-spec/memory/constitution.md` — the composed human/compatibility view. The pipeline loads
49
+ the halves, not this file.
50
+
51
+ ---
52
+
53
+ ## The map
54
+
55
+ ### `specify` — *domain modelling*
56
+ - **Domain rule files: yes** — the domain authority. Authored INTO the spec as ids.
57
+ - **Technical rule files: no**, with one exception: a **modelling methodology** (e.g. DDD
58
+ tactical patterns) may seed it. That is a domain-agnostic way of *modelling*, not a
59
+ technology choice. Like every other class, that exception is **configuration** — it is
60
+ wired under `## /aw-spec-specify` in `commandtechrulemap.md`, not hardcoded in the
61
+ workflow. Nothing else may go under that heading: an architecture, persistence, or
62
+ code-generation file there would break specify's domain purity. Greenfield wires
63
+ `docs/domain/domain-driven-design.md`; a code-derived (brownfield) pack wires
64
+ `tech/domain-modelling.md`, which `onboard` reverse-engineers from the code — the
65
+ as-built answer to *how does this codebase express a domain model*. Either way it is
66
+ **HOW to model**; **WHAT** the model is stays in the domain tier.
67
+ - Constitution: the **domain** half.
68
+
69
+ ### `design` — *architecture; domain input = the spec only*
70
+ - **Domain rule files: NEVER.** Domain reaches design solely as spec ids.
71
+ - **Technical rule files: yes** — architecture and cross-cutting rules the design mediates the
72
+ spec against.
73
+ - Constitution: the **technical** half.
74
+
75
+ ### `implement` / `implement-delta` — *code generation*
76
+ - **Domain rule files: NEVER.** The design is the only input describing what to build.
77
+ - **Technical rule files: yes** — the code-generation and convention set.
78
+ - Constitution: the **technical** half.
79
+
80
+ ### `build` — *compile + repair*
81
+ - **Technical rule files: yes** — the layering and convention rules the compile-fixer respects.
82
+ - No domain files: build repairs against design intent, which the domain never reaches.
83
+
84
+ ### `run` — *runtime*
85
+ - **Technical rule files:** only if the project evidences a runtime/hosting concern.
86
+
87
+ ### Gates — `analyze-design`, `analyze-delta-design`, `analyze-slice`, and the `/aw-spec-gate` overlay set
88
+ - Load the domain **gate overlays** as a **conformance checklist**.
89
+ - **Validation input ONLY — never authoring.** A gate may fail a document or a slice; it may
90
+ never write a rule into one.
91
+
92
+ ### `constitution`
93
+ - Loads both classes to author the two halves from their own sources.
94
+
95
+ ### `adopt` (brownfield)
96
+ - Same partition, reversed: the reversed **spec** is authored with domain rules in context; the
97
+ reversed **design** is authored with the technical set only, so design stays domain-free.
98
+ - Technical files here are **reference, not authority — the CODE wins.**
99
+
100
+ ---
101
+
102
+ ## Invariants
103
+
104
+ 1. **No domain rule file is ever loaded by `design`, `implement`, `implement-delta` or `build`.**
105
+ 2. **Domain reaches design and code only as spec ids.**
106
+ 3. **Gate overlays validate; they never author.**
107
+ 4. **A constraint not in the spec cannot be honoured downstream** — lift it first
108
+ (`LIFT-FAILURE:` → back to `specify`).
109
+ 5. **An absent map heading loads nothing and soft-continues** — it is never a blocking error.
110
+ 6. **The constitution halves are referred to directly** and never listed in either map.
111
+
112
+ ---
113
+
114
+ ## Where the concrete lists live
115
+
116
+ | Map | Reader | Class |
117
+ |---|---|---|
118
+ | `docs/domainspecs/<domain>/comandrulemap.md` | `resolve-domain` | domain rule files |
119
+ | `docs/domainspecs/<domain>/commandtechrulemap.md` | `resolve-tech` | technical rule files |
120
+
121
+ Each map keys on `## /aw-spec-<command>` headings whose `- ` bullets are workspace-relative
122
+ file paths. Shape references for authoring a new pack live in
123
+ `.aw-spec/orchestrator/rev-templates/`.
124
+
125
+ Rule files may carry a `Commands:` header naming their consumers. That header is **derived from
126
+ these maps** — the maps are authoritative; a header that disagrees is a bug in the header.
@@ -18,15 +18,18 @@ provides:
18
18
  file: commands/aw-spec.agent-context.update.md
19
19
  description: "Refresh the managed AW-Spec section in the coding agent context file"
20
20
 
21
- hooks:
22
- after_specify:
23
- command: aw-spec.agent-context.update
24
- optional: true
25
- description: "Refresh agent context after specification"
26
- after_plan:
27
- command: aw-spec.agent-context.update
28
- optional: true
29
- description: "Refresh agent context after planning"
21
+ # NO auto-wired hooks — this extension is ON-DEMAND only
22
+ # (/aw-spec.agent-context.update). It previously declared after_specify + after_plan,
23
+ # and installing it re-wrote both into .aw-spec/extensions.yml. Both were stale:
24
+ # • after_plan — no workflow dispatches that phase; the plan/tasks tier was
25
+ # retired by the spec-anchored redesign.
26
+ # • after_specify — the updater targets `specs/*/plan.md`, which nothing produces,
27
+ # so every specify (greenfield forward loop AND brownfield CR
28
+ # loop, which both enter at specify) offered a hook that could
29
+ # not do its job.
30
+ # Restore a hook here once the updater is retargeted at spec.md / design.md — that
31
+ # retarget is the open work, not the hook wiring.
32
+ hooks: {}
30
33
 
31
34
  tags:
32
35
  - "agent"
@@ -1,23 +1,16 @@
1
+ # Installed extensions + the hook wiring the pipeline dispatches.
2
+ #
3
+ # `installed:` keeps agent-context available as an ON-DEMAND extension
4
+ # (/aw-spec.agent-context.update); it is simply no longer wired into any pipeline
5
+ # phase. It was hooked on after_specify and after_plan, and BOTH were stale:
6
+ # • after_plan — no workflow dispatches that phase at all; the plan/tasks tier
7
+ # was retired by the spec-anchored redesign.
8
+ # • after_specify — the updater targets `specs/*/plan.md`, which nothing produces
9
+ # any more, so every specify in BOTH the greenfield loop and the
10
+ # brownfield CR loop offered a hook that could not do its job.
11
+ # Re-wire it here once the updater is retargeted at spec.md / design.md.
1
12
  installed:
2
13
  - agent-context
3
14
  settings:
4
15
  auto_execute_hooks: true
5
- hooks:
6
- after_specify:
7
- - extension: agent-context
8
- command: aw-spec.agent-context.update
9
- enabled: true
10
- optional: true
11
- priority: 10
12
- prompt: Execute aw-spec.agent-context.update?
13
- description: Refresh agent context after specification
14
- condition: null
15
- after_plan:
16
- - extension: agent-context
17
- command: aw-spec.agent-context.update
18
- enabled: true
19
- optional: true
20
- priority: 10
21
- prompt: Execute aw-spec.agent-context.update?
22
- description: Refresh agent context after planning
23
- condition: null
16
+ hooks: {}
@@ -4,14 +4,6 @@
4
4
  "installed_at": "2026-06-10T07:39:01.950069+00:00",
5
5
  "files": {
6
6
  ".aw-spec/scripts/bash/common.sh": "21cc21dd88c36e632fd052eca435c0e7ab262acaff632667dec87ff8b794ef43",
7
- ".aw-spec/scripts/bash/setup-plan.sh": "4eb12c5b00f5c66a7d01b56c90898d320dcef4425d9b96652d57156c84948eda",
8
- ".aw-spec/scripts/bash/setup-tasks.sh": "cf21ba2212b4dd5b435c5ea8527500cfd27768b86c0bbc7ebc3207759f118d27",
9
- ".aw-spec/scripts/bash/check-prerequisites.sh": "afce0aa8db177320d83aa0b8e3619c06b865fd810781894e4a7a3f81664941ce",
10
- ".aw-spec/scripts/bash/create-new-feature.sh": "324762a95ec2f534d0982931fdb11380558258791fe3bfe3ca7e11a768653134",
11
- ".aw-spec/templates/constitution-template.md": "ce7549540fa45543cca797a150201d868e64495fdff39dc38246fb17bd4024b3",
12
- ".aw-spec/templates/checklist-template.md": "c37695297e5d3153d64f82c21223509940b13932046c7961c42d1d669516130c",
13
- ".aw-spec/templates/tasks-template.md": "fc29a233f6f5a27ca31f1aa46b596af6500c627441c6e62b2bc4a1d721525842",
14
- ".aw-spec/templates/spec-template.md": "3945437fc35cd30a5b2bf7beea680337c3516826d3efa5a6b92c4a7eca1ba28e",
15
- ".aw-spec/templates/plan-template.md": "cc7f7979cf8d8836ec26492785affd80791d3422a2b745062ec695be8c985ef7"
7
+ ".aw-spec/templates/spec-template.md": "3945437fc35cd30a5b2bf7beea680337c3516826d3efa5a6b92c4a7eca1ba28e"
16
8
  }
17
9
  }