aw-spec-cli 0.1.4 → 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 (254) hide show
  1. package/assets/.agents/agent.json +28 -0
  2. package/assets/.agents/skills/aw-spec-orch/SKILL.md +56 -0
  3. package/assets/.agents/skills/aw-spec-orch-demo/SKILL.md +59 -0
  4. package/assets/.aw-spec/DESIGN-FORMAT.md +151 -0
  5. package/assets/.aw-spec/ORCH-DIALECT.md +156 -0
  6. package/assets/.aw-spec/RULE-PARTITION.md +126 -0
  7. package/assets/.aw-spec/extensions/agent-context/extension.yml +12 -9
  8. package/assets/.aw-spec/extensions.yml +12 -19
  9. package/assets/.aw-spec/integrations/aw-spec.manifest.json +1 -9
  10. package/assets/.aw-spec/interpreter/run-skill.py +1158 -0
  11. package/assets/.aw-spec/orchestrator/AGENT-PROFILE.md +94 -0
  12. package/assets/.aw-spec/orchestrator/README.md +300 -0
  13. package/assets/.aw-spec/orchestrator/adapters/claude_agent_sdk.py +74 -0
  14. package/assets/.aw-spec/orchestrator/adapters/google_antigravity.py +74 -0
  15. package/assets/.aw-spec/orchestrator/modules/delta-design.orch.yaml +105 -0
  16. package/assets/.aw-spec/orchestrator/modules/delta-spec.orch.yaml +79 -0
  17. package/assets/.aw-spec/orchestrator/modules/domain-select.orch.yaml +81 -0
  18. package/assets/.aw-spec/orchestrator/modules/tech-select.orch.yaml +75 -0
  19. package/assets/.aw-spec/orchestrator/orchestrator.py +1721 -0
  20. package/assets/.aw-spec/orchestrator/rev-templates/ai-rules.reference.md +40 -0
  21. package/assets/.aw-spec/orchestrator/rev-templates/comandrulemap.skeleton.md +59 -0
  22. package/assets/.aw-spec/orchestrator/rev-templates/commandtechrulemap.skeleton.md +97 -0
  23. package/assets/.aw-spec/orchestrator/rev-templates/domain-constitution.skeleton.md +61 -0
  24. package/assets/.aw-spec/orchestrator/rev-templates/domain-requirements.skeleton.md +48 -0
  25. package/assets/.aw-spec/orchestrator/rev-templates/domain-rule-file.skeleton.md +39 -0
  26. package/assets/.aw-spec/orchestrator/rev-templates/technical-constitution.skeleton.md +106 -0
  27. package/assets/.aw-spec/orchestrator/rev-templates/technical-rule-file.skeleton.md +54 -0
  28. package/assets/.aw-spec/orchestrator/workflows/_smoke.orch.yaml +160 -0
  29. package/assets/.aw-spec/orchestrator/workflows/aw-spec-add-component.orch.yaml +244 -0
  30. package/assets/.aw-spec/orchestrator/workflows/aw-spec-adopt.orch.yaml +775 -0
  31. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-delta-design.orch.yaml +248 -0
  32. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-design.orch.yaml +261 -0
  33. package/assets/.aw-spec/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +425 -0
  34. package/assets/.aw-spec/orchestrator/workflows/aw-spec-build.orch.yaml +188 -0
  35. package/assets/.aw-spec/orchestrator/workflows/aw-spec-characterize.orch.yaml +474 -0
  36. package/assets/.aw-spec/orchestrator/workflows/aw-spec-close-delta.orch.yaml +181 -0
  37. package/assets/.aw-spec/orchestrator/workflows/aw-spec-constitution.orch.yaml +284 -0
  38. package/assets/.aw-spec/orchestrator/workflows/aw-spec-demo.orch.yaml +103 -0
  39. package/assets/.aw-spec/orchestrator/workflows/aw-spec-dependency-tree.orch.yaml +69 -0
  40. package/assets/.aw-spec/orchestrator/workflows/aw-spec-deploy.orch.yaml +85 -0
  41. package/assets/.aw-spec/orchestrator/workflows/aw-spec-design.orch.yaml +382 -0
  42. package/assets/.aw-spec/orchestrator/workflows/aw-spec-finalize-delta.orch.yaml +382 -0
  43. package/assets/.aw-spec/orchestrator/workflows/aw-spec-foundation.orch.yaml +246 -0
  44. package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement-delta.orch.yaml +231 -0
  45. package/assets/.aw-spec/orchestrator/workflows/aw-spec-implement.orch.yaml +258 -0
  46. package/assets/.aw-spec/orchestrator/workflows/aw-spec-inventory.orch.yaml +236 -0
  47. package/assets/.aw-spec/orchestrator/workflows/aw-spec-onboard.orch.yaml +949 -0
  48. package/assets/.aw-spec/orchestrator/workflows/aw-spec-parity.orch.yaml +293 -0
  49. package/assets/.aw-spec/orchestrator/workflows/aw-spec-run.orch.yaml +177 -0
  50. package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-domain.orch.yaml +79 -0
  51. package/assets/.aw-spec/orchestrator/workflows/aw-spec-select-feature.orch.yaml +128 -0
  52. package/assets/.aw-spec/orchestrator/workflows/aw-spec-specify.orch.yaml +412 -0
  53. package/assets/.aw-spec/scripts/bash/aw-inventory.sh +14 -0
  54. package/assets/.aw-spec/scripts/bash/aw-parity.sh +13 -0
  55. package/assets/.aw-spec/scripts/bash/aw-rev-constitution.sh +13 -0
  56. package/assets/.aw-spec/scripts/bash/aw-spec-actions.sh +1899 -0
  57. package/assets/.aw-spec/scripts/bash/aw-xref.sh +15 -0
  58. package/assets/.aw-spec/scripts/bash/common.sh +11 -60
  59. package/assets/.aw-spec/scripts/powershell/aw-inventory.ps1 +14 -0
  60. package/assets/.aw-spec/scripts/powershell/aw-parity.ps1 +13 -0
  61. package/assets/.aw-spec/scripts/powershell/aw-rev-constitution.ps1 +13 -0
  62. package/assets/.aw-spec/scripts/powershell/aw-spec-actions.ps1 +1563 -0
  63. package/assets/.aw-spec/scripts/powershell/aw-xref.ps1 +15 -0
  64. package/assets/.aw-spec/scripts/python/aw-inventory.py +683 -0
  65. package/assets/.aw-spec/scripts/python/aw-parity.py +380 -0
  66. package/assets/.aw-spec/scripts/python/aw-rev-constitution.py +312 -0
  67. package/assets/.aw-spec/scripts/python/aw-xref.py +1330 -0
  68. package/assets/.aw-spec/scripts/python/validate_okf.py +349 -0
  69. package/assets/.aw-spec/templates/constitution-domain-template.md +75 -0
  70. package/assets/.aw-spec/templates/constitution-technical-template.md +70 -0
  71. package/assets/.aw-spec/templates/delta-design-template.md +69 -0
  72. package/assets/.aw-spec/templates/delta-spec-template.md +60 -0
  73. package/assets/.aw-spec/templates/design-template.md +383 -0
  74. package/assets/.aw-spec/templates/okf-concept-template.md +103 -0
  75. package/assets/.aw-spec/templates/parity-manifest-template.json +49 -0
  76. package/assets/.aw-spec/templates/source-map-template.md +85 -0
  77. package/assets/.aw-spec/templates/spec-template.md +192 -71
  78. package/assets/.claude/agent.json +27 -0
  79. package/assets/.claude/skills/aw-spec-orch/SKILL.md +55 -0
  80. package/assets/.claude/skills/aw-spec-orch-demo/SKILL.md +59 -0
  81. package/assets/.kilocode/agent.json +28 -0
  82. package/assets/.kilocode/workflows/aw-spec-orch-demo.md +59 -0
  83. package/assets/.kilocode/workflows/aw-spec-orch.md +55 -0
  84. package/assets/docs/architecture/clean-architecture.md +1 -1
  85. package/assets/docs/architecture/cqrs.md +1 -1
  86. package/assets/docs/architecture/eventing.md +1 -1
  87. package/assets/docs/architecture/folder-structure.md +1 -1
  88. package/assets/docs/architecture/modular-monolith.md +1 -1
  89. package/assets/docs/architecture/persistence.md +1 -1
  90. package/assets/docs/architecture/testing.md +1 -1
  91. package/assets/docs/architecture/vertical-slices.md +1 -1
  92. package/assets/docs/components/Email/README.md +1 -1
  93. package/assets/docs/components/Jobs/README.md +1 -1
  94. package/assets/docs/components/QrGenerator/README.md +1 -1
  95. package/assets/docs/components/README.md +1 -1
  96. package/assets/docs/domain/domain-driven-design.md +1 -1
  97. package/assets/docs/domainspecs/healthcare/api-versioning.domain.md +1 -1
  98. package/assets/docs/domainspecs/healthcare/auditing.domain.md +86 -18
  99. package/assets/docs/domainspecs/healthcare/authorization.domain.md +1 -1
  100. package/assets/docs/domainspecs/healthcare/clinical-terms.md +1 -1
  101. package/assets/docs/domainspecs/healthcare/coding-standards.domain.md +1 -1
  102. package/assets/docs/domainspecs/healthcare/comandrulemap.md +58 -124
  103. package/assets/docs/domainspecs/healthcare/commandtechrulemap.md +119 -0
  104. package/assets/docs/domainspecs/healthcare/consent.md +1 -1
  105. package/assets/docs/domainspecs/healthcare/cqrs.domain.md +1 -1
  106. package/assets/docs/domainspecs/healthcare/data-classification.domain.md +1 -1
  107. package/assets/docs/domainspecs/healthcare/dependency-policy.domain.md +1 -1
  108. package/assets/docs/domainspecs/healthcare/dicom.md +1 -1
  109. package/assets/docs/domainspecs/healthcare/domain-driven-design.domain.md +1 -1
  110. package/assets/docs/domainspecs/healthcare/eventing.domain.md +1 -1
  111. package/assets/docs/domainspecs/healthcare/fhir.md +1 -1
  112. package/assets/docs/domainspecs/healthcare/folder-structure.domain.md +1 -1
  113. package/assets/docs/domainspecs/healthcare/hipaa.md +1 -1
  114. package/assets/docs/domainspecs/healthcare/hl7.md +1 -1
  115. package/assets/docs/domainspecs/healthcare/integration-terms.md +1 -1
  116. package/assets/docs/domainspecs/healthcare/persistence.domain.md +1 -1
  117. package/assets/docs/domainspecs/healthcare/terminology.md +1 -1
  118. package/assets/docs/domainspecs/healthcare/testing.domain.md +1 -1
  119. package/assets/docs/domainspecs/healthcare/vertical-slices.domain.md +1 -1
  120. package/assets/docs/domainspecs/healthcare/zero-trust.domain.md +1 -1
  121. package/assets/docs/domainspecs/pharma/api-versioning.domain.md +1 -1
  122. package/assets/docs/domainspecs/pharma/atc.md +1 -1
  123. package/assets/docs/domainspecs/pharma/auditing.domain.md +80 -16
  124. package/assets/docs/domainspecs/pharma/authorization.domain.md +1 -1
  125. package/assets/docs/domainspecs/pharma/coding-standards.domain.md +1 -1
  126. package/assets/docs/domainspecs/pharma/comandrulemap.md +64 -142
  127. package/assets/docs/domainspecs/pharma/commandtechrulemap.md +119 -0
  128. package/assets/docs/domainspecs/pharma/cqrs.domain.md +1 -1
  129. package/assets/docs/domainspecs/pharma/data-classification.domain.md +1 -1
  130. package/assets/docs/domainspecs/pharma/data-provenance.md +1 -1
  131. package/assets/docs/domainspecs/pharma/dependency-policy.domain.md +1 -1
  132. package/assets/docs/domainspecs/pharma/domain-driven-design.domain.md +1 -1
  133. package/assets/docs/domainspecs/pharma/eventing.domain.md +1 -1
  134. package/assets/docs/domainspecs/pharma/fhir.md +1 -1
  135. package/assets/docs/domainspecs/pharma/folder-structure.domain.md +1 -1
  136. package/assets/docs/domainspecs/pharma/hl7.md +1 -1
  137. package/assets/docs/domainspecs/pharma/idmp.md +1 -1
  138. package/assets/docs/domainspecs/pharma/integration-terms.md +1 -1
  139. package/assets/docs/domainspecs/pharma/ndc.md +1 -1
  140. package/assets/docs/domainspecs/pharma/persistence.domain.md +1 -1
  141. package/assets/docs/domainspecs/pharma/pharma-terms.md +1 -1
  142. package/assets/docs/domainspecs/pharma/product-lifecycle.domain.md +1 -1
  143. package/assets/docs/domainspecs/pharma/regulatory-compliance.md +1 -1
  144. package/assets/docs/domainspecs/pharma/terminology.md +1 -1
  145. package/assets/docs/domainspecs/pharma/testing.domain.md +1 -1
  146. package/assets/docs/domainspecs/pharma/vertical-slices.domain.md +1 -1
  147. package/assets/docs/domainspecs/pharma/zero-trust.domain.md +1 -1
  148. package/assets/docs/governance/api-versioning.md +1 -1
  149. package/assets/docs/governance/coding-standards.md +1 -1
  150. package/assets/docs/governance/dependency-policy.md +1 -1
  151. package/assets/docs/requirement-spec.txt +27 -0
  152. package/assets/docs/security/auditing.md +54 -11
  153. package/assets/docs/security/authorization.md +1 -1
  154. package/assets/docs/security/data-classification.md +1 -1
  155. package/assets/docs/security/zero-trust.md +1 -1
  156. package/dist/commands/init.d.ts.map +1 -1
  157. package/dist/commands/init.js +7 -54
  158. package/dist/commands/init.js.map +1 -1
  159. package/dist/index.js +0 -2
  160. package/dist/index.js.map +1 -1
  161. package/dist/utils/paths.js +2 -2
  162. package/dist/utils/paths.js.map +1 -1
  163. package/package.json +1 -1
  164. package/assets/.agents/skills/aw-spec-addcomponent/SKILL.md +0 -129
  165. package/assets/.agents/skills/aw-spec-agent-context-update/SKILL.md +0 -31
  166. package/assets/.agents/skills/aw-spec-analyze/SKILL.md +0 -296
  167. package/assets/.agents/skills/aw-spec-checklist/SKILL.md +0 -374
  168. package/assets/.agents/skills/aw-spec-clarify/SKILL.md +0 -320
  169. package/assets/.agents/skills/aw-spec-constitution/SKILL.md +0 -194
  170. package/assets/.agents/skills/aw-spec-fast-implement/SKILL.md +0 -268
  171. package/assets/.agents/skills/aw-spec-foundation/SKILL.md +0 -358
  172. package/assets/.agents/skills/aw-spec-implement/SKILL.md +0 -279
  173. package/assets/.agents/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
  174. package/assets/.agents/skills/aw-spec-plan/SKILL.md +0 -221
  175. package/assets/.agents/skills/aw-spec-select-domain/SKILL.md +0 -73
  176. package/assets/.agents/skills/aw-spec-specify/SKILL.md +0 -382
  177. package/assets/.agents/skills/aw-spec-tasks/SKILL.md +0 -259
  178. package/assets/.agents/skills/aw-spec-taskstoissues/SKILL.md +0 -107
  179. package/assets/.aw-spec/integrations/claude.manifest.json +0 -17
  180. package/assets/.aw-spec/scripts/bash/check-prerequisites.sh +0 -189
  181. package/assets/.aw-spec/scripts/bash/create-new-feature.sh +0 -299
  182. package/assets/.aw-spec/scripts/bash/setup-plan.sh +0 -84
  183. package/assets/.aw-spec/scripts/bash/setup-tasks.sh +0 -91
  184. package/assets/.aw-spec/templates/checklist-template.md +0 -40
  185. package/assets/.aw-spec/templates/constitution-template.md +0 -57
  186. package/assets/.aw-spec/templates/plan-template.md +0 -113
  187. package/assets/.aw-spec/templates/tasks-template.md +0 -252
  188. package/assets/.aw-spec/workflows/aw-spec/workflow.yml +0 -77
  189. package/assets/.aw-spec/workflows/workflow-registry.json +0 -13
  190. package/assets/.claude/skills/aw-spec-addcomponent/SKILL.md +0 -129
  191. package/assets/.claude/skills/aw-spec-agent-context-update/SKILL.md +0 -31
  192. package/assets/.claude/skills/aw-spec-analyze/SKILL.md +0 -296
  193. package/assets/.claude/skills/aw-spec-checklist/SKILL.md +0 -374
  194. package/assets/.claude/skills/aw-spec-clarify/SKILL.md +0 -320
  195. package/assets/.claude/skills/aw-spec-constitution/SKILL.md +0 -194
  196. package/assets/.claude/skills/aw-spec-fast-implement/SKILL.md +0 -268
  197. package/assets/.claude/skills/aw-spec-foundation/SKILL.md +0 -358
  198. package/assets/.claude/skills/aw-spec-implement/SKILL.md +0 -279
  199. package/assets/.claude/skills/aw-spec-minimal-implementation/SKILL.md +0 -209
  200. package/assets/.claude/skills/aw-spec-plan/SKILL.md +0 -221
  201. package/assets/.claude/skills/aw-spec-select-domain/SKILL.md +0 -73
  202. package/assets/.claude/skills/aw-spec-specify/SKILL.md +0 -382
  203. package/assets/.claude/skills/aw-spec-tasks/SKILL.md +0 -259
  204. package/assets/.claude/skills/aw-spec-taskstoissues/SKILL.md +0 -107
  205. package/assets/.kilocode/rules/specify-rules.md +0 -4
  206. package/assets/.kilocode/workflows/aw-spec-addcomponent.md +0 -129
  207. package/assets/.kilocode/workflows/aw-spec-agent-context.update.md +0 -31
  208. package/assets/.kilocode/workflows/aw-spec-analyze.md +0 -296
  209. package/assets/.kilocode/workflows/aw-spec-checklist.md +0 -374
  210. package/assets/.kilocode/workflows/aw-spec-clarify.md +0 -320
  211. package/assets/.kilocode/workflows/aw-spec-constitution.md +0 -194
  212. package/assets/.kilocode/workflows/aw-spec-fast-implement.md +0 -263
  213. package/assets/.kilocode/workflows/aw-spec-foundation.md +0 -358
  214. package/assets/.kilocode/workflows/aw-spec-implement.md +0 -279
  215. package/assets/.kilocode/workflows/aw-spec-minimal-implementation.md +0 -204
  216. package/assets/.kilocode/workflows/aw-spec-plan.md +0 -221
  217. package/assets/.kilocode/workflows/aw-spec-select-domain.md +0 -73
  218. package/assets/.kilocode/workflows/aw-spec-specify.md +0 -382
  219. package/assets/.kilocode/workflows/aw-spec-tasks.md +0 -259
  220. package/assets/.kilocode/workflows/aw-spec-taskstoissues.md +0 -107
  221. package/assets/docs/UI.Visualization/PACKAGING.md +0 -191
  222. package/assets/docs/UI.Visualization/UI.Visualization.Reference.pack.txt +0 -11768
  223. package/assets/docs/UI.Visualization/UI.Visualization.pack.txt +0 -11214
  224. package/assets/docs/UI.Visualization/pack-foundation.ps1 +0 -165
  225. package/assets/docs/UI.Visualization/pack-foundation.sh +0 -206
  226. package/assets/docs/UI.Visualization/pack-reference-foundation.ps1 +0 -159
  227. package/assets/docs/UI.Visualization/pack-reference-foundation.sh +0 -205
  228. package/assets/docs/UI.Visualization/unpack-foundation.ps1 +0 -126
  229. package/assets/docs/UI.Visualization/unpack-foundation.sh +0 -217
  230. package/assets/docs/UI.Visualization/unpack-reference-foundation.ps1 +0 -129
  231. package/assets/docs/UI.Visualization/unpack-reference-foundation.sh +0 -218
  232. package/assets/docs/command.txt +0 -295
  233. package/assets/docs/domainspecs/UIVisualization/chart-bubble.md +0 -70
  234. package/assets/docs/domainspecs/UIVisualization/chart-dimred.md +0 -58
  235. package/assets/docs/domainspecs/UIVisualization/chart-heatmap.md +0 -62
  236. package/assets/docs/domainspecs/UIVisualization/chart-network.md +0 -69
  237. package/assets/docs/domainspecs/UIVisualization/chart-parallel.md +0 -75
  238. package/assets/docs/domainspecs/UIVisualization/chart-scurve.md +0 -66
  239. package/assets/docs/domainspecs/UIVisualization/chart-survival.md +0 -69
  240. package/assets/docs/domainspecs/UIVisualization/chart-trellis.md +0 -68
  241. package/assets/docs/domainspecs/UIVisualization/chart-violin.md +0 -61
  242. package/assets/docs/domainspecs/UIVisualization/chart-volcano.md +0 -63
  243. package/assets/docs/domainspecs/UIVisualization/charting-standards.domain.md +0 -80
  244. package/assets/docs/domainspecs/UIVisualization/clean-architecture.domain.md +0 -87
  245. package/assets/docs/domainspecs/UIVisualization/coding-standards.domain.md +0 -47
  246. package/assets/docs/domainspecs/UIVisualization/comandrulemap.md +0 -130
  247. package/assets/docs/domainspecs/UIVisualization/component-contracts.domain.md +0 -67
  248. package/assets/docs/domainspecs/UIVisualization/data-source.domain.md +0 -68
  249. package/assets/docs/domainspecs/UIVisualization/domain-requirements.md +0 -110
  250. package/assets/docs/domainspecs/UIVisualization/folder-structure.domain.md +0 -55
  251. package/assets/docs/domainspecs/UIVisualization/state-management.domain.md +0 -67
  252. package/assets/docs/domainspecs/UIVisualization/testing.domain.md +0 -52
  253. package/assets/docs/domainspecs/UIVisualization/ui-viz-terms.md +0 -39
  254. package/assets/docs/pharma-constitution.my-ref.md +0 -86
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "antigravity",
3
+ "sdk": {
4
+ "type": "google-antigravity",
5
+ "package": "google-antigravity",
6
+ "module": "google.antigravity",
7
+ "adapter": "../.aw-spec/orchestrator/adapters/google_antigravity.py"
8
+ },
9
+ "runtime": "Antigravity CLI (agy -p) — Antigravity is Gemini-based",
10
+ "note": "Antigravity (agy) has no --system-prompt flag, so 'system' is folded into the prompt (system: prepend).",
11
+ "bin": "agy",
12
+ "args": ["--dangerously-skip-permissions", "--add-dir", "."],
13
+ "model_flag": "--model",
14
+ "system": "prepend",
15
+ "user": { "mode": "arg", "flag": "-p" },
16
+ "tools_flag": null,
17
+ "approval": {
18
+ "acceptEdits": ["--mode", "accept-edits"],
19
+ "bypassPermissions": ["--dangerously-skip-permissions"],
20
+ "default": [],
21
+ "readonly": ["--mode", "plan"]
22
+ },
23
+ "isolation": {
24
+ "bare": [],
25
+ "fresh": []
26
+ },
27
+ "result_keys": ["response", "result"]
28
+ }
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: "aw-spec-orch"
3
+ description: "Parametric launcher (Antigravity): run ANY converted aw-spec skill on the aw-orchestrator under one of the 4 strategies (agent [default], spawn, sdk, sdk-apply)."
4
+ argument-hint: "<skill> [strategy] [input…] — e.g. 'select-domain', 'specify spawn Build an order API', 'analyze-slice'"
5
+ compatibility: "Requires .aw-spec/orchestrator/ and the agy CLI on PATH"
6
+ user-invocable: true
7
+ disable-model-invocation: false
8
+ ---
9
+
10
+ # Orchestrator Skill Launcher
11
+
12
+ Runs one converted `aw-spec-*` workflow on the shared, agent-agnostic engine. All orchestration and **all context management live in the workflow YAML + engine** (`.aw-spec/orchestrator/orchestrator.py`): the interpreter assembles the COMPLETE payload (system + user) for every request; you never author generation context yourself. Execution follows the chosen strategy; the checkpoint channel carries every human-facing interaction regardless of strategy.
13
+
14
+ - **Engine + workflows (common, shared by all agents):** `.aw-spec/orchestrator/orchestrator.py`, `.aw-spec/orchestrator/workflows/aw-spec-<skill>.orch.yaml`, shared modules in `.aw-spec/orchestrator/modules/`, shared scripts in `.aw-spec/scripts/`
15
+ - **This agent's transport profile:** `.agents/agent.json`
16
+
17
+ > Antigravity spawns via the `agy` CLI (Gemini-based; no `--system-prompt`,
18
+ > so `system` is folded into the prompt — isolation is best-effort). Its
19
+ > `sdk` block declares the SDK the `sdk`/`sdk-apply` strategies import
20
+ > (`google-antigravity`) and the adapter
21
+ > (`.aw-spec/orchestrator/adapters/google_antigravity.py`, shared per-SDK)
22
+ > that owns its calling convention.
23
+
24
+ ## Execution Steps
25
+
26
+ 1. **Parse Arguments** (`<skill> [strategy] [input…]`):
27
+ - `skill` (required): the aw-spec skill name, e.g. `demo`, `select-domain`, `foundation`, `specify`, `design`, `implement`, `build`. Resolve the workflow file `.aw-spec/orchestrator/workflows/aw-spec-<skill>.orch.yaml`. If it does not exist, list the available `aw-spec-*.orch.yaml` files in that folder and stop.
28
+ - `strategy` (optional, one of `agent`, `spawn`, `sdk`, `sdk-apply`; default `agent` — YOU fulfill each generation through the checkpoint channel, no profile needed): who executes each generation. Always pass `--strategy <strategy>`.
29
+ - Everything after the strategy is the user input: pass it as `--input "<text>"` (omit when empty).
30
+ - `--agent-profile .agents/agent.json` is required for `spawn`, `sdk`, and `sdk-apply` (`agent` needs no profile). If the SDK package isn't installed, add `--sdk-install`.
31
+ - **Always** pass `--checkpoint .aw-spec/orchestrator/.state/<skill>.state.json` — for EVERY strategy. Converted skills contain interactive steps (questions, selections, hooks); the checkpoint is how they reach you and the user. Strategies only govern who generates.
32
+ - `spawn` may also add `--isolation bare|fresh` and `--model <name>`; `sdk`/`sdk-apply` accept `--model <name>`.
33
+
34
+ 2. **Run the Interpreter**:
35
+ ```bash
36
+ python3 .aw-spec/orchestrator/orchestrator.py \
37
+ .aw-spec/orchestrator/workflows/aw-spec-<skill>.orch.yaml \
38
+ --strategy <strategy> \
39
+ --checkpoint .aw-spec/orchestrator/.state/<skill>.state.json \
40
+ [--agent-profile .agents/agent.json] # spawn, sdk, sdk-apply \
41
+ [--input "<user input>"] \
42
+ --json
43
+ ```
44
+
45
+ 3. **Handle the Suspend/Resume Loop** — whenever the command exits with code `2`, read the printed `pending` JSON and dispatch on `pending.kind`; fulfill it, write the response to `pending.response_path`, then re-run the SAME command. Repeat until exit `0` (done) or `1` (stopped by a gate).
46
+ - **`ask`** — ask the USER the `prompt` with the listed `options` (use your question tool). Write the chosen answer as PLAIN TEXT to `response_path` (comma-separated values when `multi` is true).
47
+ - **`select`** — ask the USER to pick ONE of `options`; write the chosen value as plain text to `response_path`.
48
+ - **`hook`** — run each MANDATORY hook in `hooks` (each is a slash command of THIS agent) in this conversation; optional hooks at your discretion. Then write `done` to `response_path`.
49
+ - **`author`** — read `system_path` + `user_path` and treat them as your ONLY standards and context. Author the COMPLETE content of the file named in `target` and write it — content ONLY, no commentary, no code fence — to `response_path`. Do NOT write the target file yourself; the interpreter does that.
50
+ - **`agent_generate`** — read `system_path` + `user_path`; perform the task YOURSELF with the listed `tools` within `permission_mode`; write your full final reply — ending with the required ```json fence — to `response_path`.
51
+ - **`agent_query` / `agent_review`** — same as above but READ-ONLY (do not modify files); the reply must end with the required ```json fence.
52
+ - **`apply`** — an isolated generation already decided the changes: read `artifact_path` and write its file contents EXACTLY to the paths it names, then write the confirmation ```json fence to `response_path`.
53
+ - If `pending.note` is present, your previous response was rejected — follow the note and rewrite `response_path`.
54
+
55
+ 4. **Report**:
56
+ Report the final JSON (`status`, `outputs`, and any `reason`) to the user. On `stopped`, relay the gate message verbatim — it tells the user what to fix or run first.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: "aw-spec-orch-demo"
3
+ description: "Prototype launcher (Antigravity): run the aw-orchestrator using the specified strategy (spawn, agent, sdk, sdk-apply)."
4
+ argument-hint: "Optional strategy ('agent', 'spawn', 'sdk', 'sdk-apply') and/or k=value vars (e.g. 'agent out_dir=...')"
5
+ compatibility: "Requires .aw-spec/orchestrator/ and the gemini CLI on PATH"
6
+ user-invocable: true
7
+ disable-model-invocation: false
8
+ ---
9
+
10
+ # Orchestrator Launcher
11
+
12
+ All orchestration lives in the workflow YAML and is executed by `.aw-spec/orchestrator/orchestrator.py` (the general, agent-agnostic engine). The interpreter assembles the COMPLETE payload (system + user) for every request; you never author generation context yourself.
13
+
14
+ - **Engine + workflow (general):** `.aw-spec/orchestrator/orchestrator.py`, `*.orch.yaml`
15
+ - **This agent's transport profile:** `.agents/agent.json`
16
+
17
+ > Antigravity spawns via the `agy` CLI (Gemini-based; no `--system-prompt`, so
18
+ > `system` is folded into the prompt). Its `sdk` block declares the SDK the
19
+ > `sdk`/`sdk-apply` strategies import (`google-antigravity`) and the adapter
20
+ > (`.aw-spec/orchestrator/adapters/google_antigravity.py`, shared per-SDK)
21
+ > that owns its calling convention.
22
+
23
+ ## Execution Steps
24
+
25
+ 1. **Parse Arguments**:
26
+ - Identify the requested strategy (one of: `agent`, `spawn`, `sdk`, `sdk-apply`). If the user specifies a strategy as the first argument, use it. Otherwise, default to `spawn`.
27
+ - Always pass the strategy explicitly: `--strategy <strategy>`.
28
+ - `--agent-profile .agents/agent.json` is required for `spawn`, `sdk`, and `sdk-apply`:
29
+ `spawn` reads the CLI to launch (`agy`) from it; `sdk`/`sdk-apply` read the SDK
30
+ package/module (and its `adapter` file) to import from its `sdk` block.
31
+ If the SDK package isn't installed, add `--sdk-install` so the engine
32
+ pip-installs the declared package first. (`agent` needs no profile.)
33
+ - `--checkpoint .aw-spec/orchestrator/.demo-out/demo.state.json` is required for
34
+ `sdk-apply` and `agent` (suspend/resume — follow the loop in step 3).
35
+ - `spawn` accepts `--model <name>` (e.g. `gemini-2.5-pro`); isolation is
36
+ best-effort for Antigravity (no `--bare` equivalent). `sdk`/`sdk-apply`
37
+ accept `--model <name>`; isolation is intrinsic (fresh SDK session).
38
+
39
+ 2. **Run the Interpreter**:
40
+ Run the command (include only the bracketed flags that apply to the chosen strategy):
41
+ ```bash
42
+ python3 .aw-spec/orchestrator/orchestrator.py \
43
+ .aw-spec/orchestrator/workflows/aw-spec-demo.orch.yaml \
44
+ --strategy <strategy> \
45
+ [--agent-profile .agents/agent.json] # spawn, sdk, sdk-apply \
46
+ [--checkpoint .aw-spec/orchestrator/.demo-out/demo.state.json] # sdk-apply, agent \
47
+ --json
48
+ ```
49
+
50
+ 3. **Handle Suspend/Resume Loop (for `agent` or `sdk-apply` strategies)**:
51
+ - If the command exits with code `2` (suspend):
52
+ - Read the prompt from the sidecar file `<checkpoint-path>.user.md` (and system instructions from `<checkpoint-path>.system.md`).
53
+ - Fulfill the request directly using your own tools (e.g., implementing the handler or reviewing files in the workspace).
54
+ - Write the final generation or review output to `<checkpoint-path>.response.md`.
55
+ - Re-run the exact same command.
56
+ - Repeat until the orchestrator exits with code `0`.
57
+
58
+ 4. **Report**:
59
+ Report the final JSON outputs (`status`, `outputs`, `review_pass`, generated file paths, etc.) to the user.
@@ -0,0 +1,151 @@
1
+ # aw-spec design-doc format — the single high-level design (HLD)
2
+
3
+ The format the spec-anchored pipeline uses for the **Design** phase. Sibling of
4
+ `ORCH-DIALECT.md` (the orchestrator dialect) and `RULE-PARTITION.md` (which rules each
5
+ command loads): this one governs the *artifact* those workflows read and write — the
6
+ design document — not the engine. The authoring template is
7
+ `.aw-spec/templates/design-template.md`.
8
+
9
+ ## The contract
10
+
11
+ A feature's design is **one document**, living beside its spec:
12
+
13
+ ```
14
+ specs/<Aggregate>/
15
+ spec.md # behaviour (tech-agnostic) — WHAT / WHY — the source of truth
16
+ design.md # structure & decisions (tech-agnostic HLD) — the MEDIATOR
17
+ changes/ # open + archived change records (delta-spec + delta-design)
18
+ ```
19
+
20
+ `design.md` is the **mediator** between the spec and the generated code:
21
+
22
+ ```
23
+ spec.md ──▶ design.md ──▶ code (+ tests)
24
+ behaviour structure & generated by `implement`
25
+ FR/BR/US/SC decisions (HLD) (stack bound at generation time)
26
+ ```
27
+
28
+ - **One design per aggregate.** The four clean-architecture layers (Domain,
29
+ Application, API, Infrastructure) are **sections** of this one document, each at
30
+ design level. Feature = aggregate; commands are user stories inside it. *(This is
31
+ the **greenfield** layout, authored from `design-template.md`. See the Brownfield
32
+ variant below for reverse-engineered / existing-codebase designs.)*
33
+ - **High-level, not code.** It carries entities/value-objects/events, behaviour as
34
+ **signatures + pre/post/invariant/raises**, use-cases, endpoint contracts, ports,
35
+ and the significant technical decisions with rationale — but **no complete method
36
+ bodies**. See `design-template.md` for the section structure (§0–§9). The domain
37
+ layer (§1) follows spec.md exactly — its entities/value-objects are the spec's Key
38
+ Entities and its invariants are the spec's Business Rules.
39
+ - **Technology-agnostic.** Behaviour and contracts use conceptual types, never a
40
+ language. The SAME design.md must be generatable on a different stack. The target
41
+ language/framework/persistence is bound only at `implement` time from the
42
+ constitution's technology base + the active stack profile.
43
+ - **Physical schema is out of scope.** PKs/FKs, columns, indexes, JSON shapes, and
44
+ migration SQL belong to a separate technical-data-model — design.md states WHAT is
45
+ stored and WHICH port persists it, not the schema.
46
+ - **Two deferral ledgers are first-class:** §7 Assumptions (`DA-n`, clarify later)
47
+ and §8 Workarounds (`WA-n`, clear later). They keep the HLD honest about what it
48
+ defers; `implement` tags generated code that leans on them.
49
+ - **Solution-wide rules live elsewhere, not per feature:** the layering/dependency
50
+ rule is the constitution's; the code-generation mechanics (folder mapping,
51
+ file-per-element, test pairing, stack binding) are a technology-specific rule
52
+ applied in the `implement` phase. `design.md` stays feature-specific and
53
+ technology-agnostic.
54
+
55
+ ## Brownfield variant (existing codebases)
56
+
57
+ A design reverse-engineered from — or added forward to — an **existing** codebase is
58
+ authored from the repo's **code-derived `design-template` override**, which
59
+ `/aw-spec-orch onboard` reverse-engineers from the repo's own structure and installs at
60
+ `.aw-spec/templates/overrides/design-template.md`. Both `adopt` (reverse design) and the
61
+ forward `design` phase scaffold from it via the default template name. It is the **same
62
+ contract** as above — one living HLD per aggregate, tech-agnostic, spec-anchored, with the
63
+ same traceability spine and the two deferral ledgers — with **one difference that matters**:
64
+
65
+ - **Structure follows the code, not a fixed layering.** The **code is the source of
66
+ truth**, so the design describes the system **as-built**. Its structural sections
67
+ are **derived from the code's own organisation** (its folders / projects / modules)
68
+ rather than the fixed Domain/Application/API/Infrastructure four. A component the
69
+ code has that fits no textbook layer (a UI tier, a worker, a host project) gets its
70
+ own section; a layer the code lacks does not appear. Two neutral anchors are kept
71
+ because every system has them and the tooling keys on them: **§1 is the domain/data
72
+ model** (the cross-reference tool reads it for `<Other>Id` reference edges) and one
73
+ **§2 subsection is the External Integrations table** (matched by heading keyword, so
74
+ `aw-xref` extracts contract edges from either layout). The `debt` ledger records
75
+ only debt the **code itself** evidences (stubs, dead code, torn seams) — being
76
+ organised unlike a reference architecture is **not** debt, it is the as-built shape;
77
+ migrating toward a target is a separate modernization decision.
78
+
79
+ This keeps a brownfield design free of greenfield architectural bias while remaining a
80
+ normal feature the CR delta loop and forward pipeline consume unchanged.
81
+
82
+ ## Generate forward, reconcile only the high-level back
83
+
84
+ The design document and the code are **not** a byte-for-byte copy of each other.
85
+
86
+ | Direction | Phase | What happens |
87
+ |---|---|---|
88
+ | **Generate** (forward) | Implement | The model reads spec + design.md and **generates** the code and tests — a reasoning step the design guides and constrains, not a transcription. |
89
+ | **Reconcile** (high-level back) | Build / Run fixes | Compile/typecheck/runtime fixes happen on the **code**. Only when a fix is a **high-level technical variation** — a changed pattern, a new component, an altered contract/dependency — is that decision written back into design.md. Low-level churn stays in the code. |
90
+
91
+ > **Invariant:** design.md remains a faithful **high-level** account of the built
92
+ > system — every significant technical decision is recorded — but it is a durable
93
+ > design reference, **not** a line-by-line mirror of the code. (This retires the old
94
+ > `docs == files` extract/reconcile invariant.)
95
+
96
+ ## The traceability spine
97
+
98
+ ```
99
+ FR/BR/US/SC ↔ design section (element / decision) ↔ code (+ tests) ↔ commit
100
+ ```
101
+
102
+ Every design element traces **up** to a spec id, and the whole spec traces **down**
103
+ into a design section (§6 Traceability). This is what makes the analyze gate and the
104
+ review able to check coverage, and what keeps CR impact analysis exact.
105
+
106
+ ## Feature granularity (why a command is a delta, not a new feature)
107
+
108
+ A **feature is the largest slice whose code no other feature owns.** Because
109
+ `implement` regenerates the whole feature's code coherently, a shared file
110
+ (`src/Domain/Order.cs`) must have exactly **one** owning design. So for an aggregate
111
+ with a shared entity, **feature = the aggregate** (`Order`), and individual commands
112
+ (`CreateOrder`, `UpdateOrder`, …) are **user stories / deltas** on the same design.md:
113
+
114
+ - `CreateOrder` = US-1; `UpdateOrder` = US-2.
115
+ - Adding `UpdateOrder` is an additive CR: a Delta Spec (`+US-2`) and a Delta Design
116
+ (`ADDED` new use-case/endpoint sections, `MODIFIED` the shared Order/root and
117
+ repository sections — see `delta-design-template.md`). The design phase amends
118
+ design.md doc-first, bumps the feature version (`v1.0 → v1.1`), and archives the CR;
119
+ `implement` regenerates the touched slice; regression re-tests the shared-file
120
+ dependents.
121
+
122
+ Two command-level features would both claim `src/Domain/Order.cs` and collide —
123
+ which is exactly why the aggregate is the boundary.
124
+
125
+ ## Migration status
126
+
127
+ **Complete.** Every phase now runs this HLD model, including the executable chain.
128
+
129
+ The legacy path-tagged helpers (`design-extract` / `design-reconcile` / `design-paths`)
130
+ are **retired and deleted** from both shells. They belonged to the four-document,
131
+ full-code model in which `design.{domain,application,api,infra}.md` carried the source
132
+ inside ` ```lang path=… ` fences. That convention is gone — no template emits `path=`,
133
+ and `design-scaffold` writes a single `design.md` — so all three had been finding
134
+ nothing and no-op'ing at exit 0. (Their glob, `design.*.md`, could not have matched a
135
+ single `design.md` even if the fences had survived: the second dot required a middle
136
+ segment. The one legitimate remaining user of that glob, `list-features`'s informational
137
+ `design_docs` count, is fixed to `design*.md`.)
138
+
139
+ The question those helpers answered — *which files is this slice made of* — is now an
140
+ **OKF query**, because the knowledge bundle is where that answer is actually maintained:
141
+
142
+ | Need | Now |
143
+ | --- | --- |
144
+ | read the slice's files | `aw-xref concept-paths --feature-dir <dir>` → the concept's `source_files` |
145
+ | record files a fix loop touched | `aw-xref concept-upsert --source-files … --merge` |
146
+
147
+ `build`, `run`, and `analyze-slice` all read through `concept-paths` (feeding their fix
148
+ loops and, in `analyze-slice`, the conformance pass) and write back through
149
+ `concept-upsert --merge`. Both directions are advisory: `concept-paths` is strictly
150
+ read-only and returns an empty list rather than an error when no concept exists yet, so
151
+ a greenfield slice before its first `implement` behaves exactly as it did before.
@@ -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: {}