aw-spec-cli 0.1.25 → 0.1.27

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 (98) hide show
  1. package/assets/.agents/skills/appweaver/SKILL.md +7 -47
  2. package/assets/.appweaver/ORCH-DIALECT.md +13 -9
  3. package/assets/.appweaver/RULE-PARTITION.md +3 -3
  4. package/assets/.appweaver/STACK-PROFILES.md +188 -101
  5. package/assets/.appweaver/domain.json +1 -1
  6. package/assets/.appweaver/orchestrator/AGENT-PROFILE.md +38 -10
  7. package/assets/.appweaver/orchestrator/LAUNCHER.md +88 -0
  8. package/assets/.appweaver/orchestrator/README.md +120 -53
  9. package/assets/.appweaver/orchestrator/adapters/claude_agent_sdk.py +1 -1
  10. package/assets/.appweaver/orchestrator/modules/domain-select.orch.yaml +6 -4
  11. package/assets/.appweaver/orchestrator/modules/foundation-lane.orch.yaml +237 -0
  12. package/assets/.appweaver/orchestrator/modules/foundation-pack.orch.yaml +349 -0
  13. package/assets/.appweaver/orchestrator/modules/foundation-spec.orch.yaml +381 -0
  14. package/assets/.appweaver/orchestrator/modules/lane-gate.orch.yaml +4 -4
  15. package/assets/.appweaver/orchestrator/modules/tech-select.orch.yaml +3 -3
  16. package/assets/.appweaver/orchestrator/orchestrator.py +162 -63
  17. package/assets/.appweaver/orchestrator/rev-templates/domain-constitution.skeleton.md +2 -2
  18. package/assets/.appweaver/orchestrator/rev-templates/domain-requirements.skeleton.md +2 -2
  19. package/assets/.appweaver/orchestrator/rev-templates/domain-rule-bindings.skeleton.md +5 -5
  20. package/assets/.appweaver/orchestrator/rev-templates/frontend-rule-file.skeleton.md +1 -1
  21. package/assets/.appweaver/orchestrator/rev-templates/tech-rule-bindings.skeleton.md +14 -14
  22. package/assets/.appweaver/orchestrator/rev-templates/technical-constitution.skeleton.md +2 -2
  23. package/assets/.appweaver/orchestrator/rev-templates/technical-rule-file.skeleton.md +1 -1
  24. package/assets/.appweaver/orchestrator/rev-templates/ui-constitution.skeleton.md +3 -3
  25. package/assets/.appweaver/orchestrator/workflows/_smoke.orch.yaml +41 -3
  26. package/assets/.appweaver/orchestrator/workflows/aw-spec-add-component.orch.yaml +1 -1
  27. package/assets/.appweaver/orchestrator/workflows/aw-spec-adopt.orch.yaml +13 -13
  28. package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-slice-delta.orch.yaml +3 -3
  29. package/assets/.appweaver/orchestrator/workflows/aw-spec-analyze-slice.orch.yaml +3 -3
  30. package/assets/.appweaver/orchestrator/workflows/aw-spec-build.orch.yaml +4 -4
  31. package/assets/.appweaver/orchestrator/workflows/aw-spec-characterize.orch.yaml +2 -2
  32. package/assets/.appweaver/orchestrator/workflows/aw-spec-constitution.orch.yaml +61 -12
  33. package/assets/.appweaver/orchestrator/workflows/aw-spec-foundation.orch.yaml +172 -293
  34. package/assets/.appweaver/orchestrator/workflows/aw-spec-implement.orch.yaml +29 -28
  35. package/assets/.appweaver/orchestrator/workflows/aw-spec-onboard.orch.yaml +53 -53
  36. package/assets/.appweaver/orchestrator/workflows/aw-spec-parity.orch.yaml +2 -2
  37. package/assets/.appweaver/orchestrator/workflows/aw-spec-plan.orch.yaml +3 -3
  38. package/assets/.appweaver/orchestrator/workflows/aw-spec-run.orch.yaml +4 -4
  39. package/assets/.appweaver/orchestrator/workflows/aw-spec-select-bounded-context.orch.yaml +26 -2
  40. package/assets/.appweaver/orchestrator/workflows/aw-spec-select-domain.orch.yaml +21 -15
  41. package/assets/.appweaver/orchestrator/workflows/aw-spec-select-stack.orch.yaml +14 -14
  42. package/assets/.appweaver/orchestrator/workflows/aw-spec-specify.orch.yaml +2 -2
  43. package/assets/.appweaver/orchestrator/workflows/aw-spec-ui-model.orch.yaml +3 -3
  44. package/assets/.appweaver/orchestrator/workflows/aw-spec-ui-prototype.orch.yaml +6 -6
  45. package/assets/.appweaver/scripts/bash/aw-spec-actions.sh +284 -128
  46. package/assets/.appweaver/scripts/powershell/aw-spec-actions.ps1 +224 -70
  47. package/assets/.appweaver/scripts/python/aw-foundation.py +809 -20
  48. package/assets/.appweaver/scripts/python/aw-inventory.py +28 -21
  49. package/assets/.appweaver/scripts/python/aw-plan-coverage.py +2 -2
  50. package/assets/.appweaver/scripts/python/aw-rev-constitution.py +6 -6
  51. package/assets/.appweaver/scripts/python/aw-stack.py +195 -89
  52. package/assets/.appweaver/stack-profiles/angular.json +2 -1
  53. package/assets/.appweaver/stack-profiles/blazor-wasm.json +2 -1
  54. package/assets/.appweaver/stack-profiles/dotnet-webapi.json +16 -3
  55. package/assets/.appweaver/stack-profiles/go-chi.json +6 -1
  56. package/assets/.appweaver/stack-profiles/java-spring.json +12 -5
  57. package/assets/.appweaver/stack-profiles/nextjs.json +2 -1
  58. package/assets/.appweaver/stack-profiles/node-express.json +8 -2
  59. package/assets/.appweaver/stack-profiles/python-fastapi.json +9 -2
  60. package/assets/.appweaver/stack-profiles/react-vite.json +2 -1
  61. package/assets/.appweaver/stack-profiles/sveltekit.json +2 -1
  62. package/assets/.appweaver/stack-profiles/vue-vite.json +2 -1
  63. package/assets/.appweaver/stacks.json +37 -1
  64. package/assets/.appweaver/templates/constitution-ui-template.md +2 -2
  65. package/assets/.claude/skills/appweaver/SKILL.md +7 -46
  66. package/assets/foundations/dotnet/ModularMonolith/ModularMonolith.Reference.rules.json +31 -0
  67. package/assets/foundations/dotnet/VerticalSlice/VerticalSlice.Reference.rules.json +16 -0
  68. package/assets/foundations/foundation.spec.template.txt +73 -0
  69. package/assets/foundations/java/Hexagonal/Hexagonal.pack.txt +1 -1
  70. package/assets/foundations/java/Hexagonal/unpack-foundation.sh +4 -5
  71. package/assets/foundations/node/NextAppRouter/NextAppRouter.spec.txt +68 -0
  72. package/assets/guardrails/README.md +31 -17
  73. package/assets/guardrails/{projects/dotnet-default-project → project-specific}/domain-rule-bindings.md +5 -5
  74. package/assets/guardrails/{projects/dotnet-default-project → project-specific}/tech-rule-bindings.md +151 -114
  75. package/assets/guardrails/technology/dotnet-webapi/PACKAGING.md +58 -4
  76. package/assets/guardrails/technology/dotnet-webapi/coding-standards.md +1 -1
  77. package/assets/guardrails/technology/dotnet-webapi/dependency-policy.md +1 -1
  78. package/assets/guardrails/technology/dotnet-webapi/folder-structure.md +1 -1
  79. package/assets/guardrails/technology/dotnet-webapi/framework-api-map.md +1 -1
  80. package/assets/guardrails/technology/dotnet-webapi/testing.md +1 -1
  81. package/assets/guardrails/technology/nextjs/api-client.md +1 -1
  82. package/assets/guardrails/technology/nextjs/component-architecture.md +1 -1
  83. package/assets/guardrails/technology/nextjs/component-conventions.md +2 -2
  84. package/assets/guardrails/technology/nextjs/design-system.md +1 -1
  85. package/assets/guardrails/technology/nextjs/frontend-testing.md +1 -1
  86. package/assets/guardrails/technology/nextjs/routing-navigation.md +1 -1
  87. package/assets/guardrails/technology/nextjs/ui-constitution.md +3 -3
  88. package/package.json +1 -1
  89. package/assets/.agents/skills/appweaver-demo/SKILL.md +0 -59
  90. package/assets/.appweaver/orchestrator/.smoke-out/smoke.md +0 -6
  91. package/assets/.appweaver/orchestrator/workflows/aw-spec-demo.orch.yaml +0 -100
  92. package/assets/.claude/skills/appweaver-demo/SKILL.md +0 -59
  93. package/assets/.kilocode/agent.json +0 -28
  94. package/assets/.kilocode/workflows/appweaver-demo.md +0 -59
  95. package/assets/.kilocode/workflows/appweaver.md +0 -55
  96. /package/assets/guardrails/{projects/dotnet-default-project → project-specific}/domain/domain-requirements.md +0 -0
  97. /package/assets/guardrails/{projects/dotnet-default-project → project-specific}/frontend/ui-requirements.md +0 -0
  98. /package/assets/guardrails/{projects/dotnet-default-project → project-specific}/service/technical-requirements.md +0 -0
@@ -1,59 +0,0 @@
1
- ---
2
- name: "appweaver-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 .appweaver/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 `.appweaver/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):** `.appweaver/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
- > (`.appweaver/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 .appweaver/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 .appweaver/orchestrator/orchestrator.py \
43
- .appweaver/orchestrator/workflows/aw-spec-demo.orch.yaml \
44
- --strategy <strategy> \
45
- [--agent-profile .agents/agent.json] # spawn, sdk, sdk-apply \
46
- [--checkpoint .appweaver/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.
@@ -1,6 +0,0 @@
1
- <!-- authored by aw-orchestrator MOCK transport -->
2
- <!-- target: .appweaver/orchestrator/.smoke-out/smoke.md -->
3
- <!-- envelope: system=[] context=['.appweaver/orchestrator/.smoke-out/smoke.md'] -->
4
- <!-- task chars: 48 -->
5
-
6
- # (mock content)
@@ -1,100 +0,0 @@
1
- # =============================================================================
2
- # aw-spec-demo.orch.yaml — a runnable demo workflow for the aw-orchestrator.
3
- # Launch via the parametric skill: /appweaver demo [strategy]
4
- #
5
- # It walks the exact loop from the diagram:
6
- # build_context → agent_generate (fresh) → agent_review (fresh) → repeat
7
- #
8
- # Run it (safe, no model calls — prints the assembled payloads):
9
- # python3 .appweaver/orchestrator/orchestrator.py .appweaver/orchestrator/workflows/aw-spec-demo.orch.yaml
10
- #
11
- # Run it for real (spawns fresh `claude -p --bare` per generation):
12
- # python3 .appweaver/orchestrator/orchestrator.py .appweaver/orchestrator/workflows/aw-spec-demo.orch.yaml \
13
- # --transport claude --model opus --budget 0.50
14
- # =============================================================================
15
-
16
- dialect: aw-spec.orchestrator/v1
17
- name: demo-fresh-generation
18
-
19
- vars:
20
- out_dir: .appweaver/orchestrator/.demo-out
21
- review_pass: "false" # loop guard, flipped by agent_review
22
-
23
- workflow:
24
-
25
- # 1. Builds Complete Context — the interpreter reads standards (→ system) and
26
- # any prior artifacts (→ user context). Every standard it loads is kit-resident,
27
- # so the demo runs in a bare checkout with no guardrails/ tree at all.
28
- - id: ctx_generate
29
- action: build_context
30
- system:
31
- - { path: .appweaver/ai-rules.md } # kit-resident, so the demo needs no project tree
32
- context:
33
- - { path: "{{out_dir}}/spec.md", optional: true }
34
-
35
- # 2. Invoke Claude Code (FRESH generation) — it decides the file path(s) itself
36
- # (per the loaded folder-structure/architecture standards), writes them with
37
- # its tools, and REPORTS the paths back. The interpreter binds that list.
38
- - id: gen_handler
39
- action: agent_generate
40
- tools: "Read,Write,Edit,Bash"
41
- permission_mode: acceptEdits
42
- task: |
43
- Implement a CQRS command handler `CreateOrderHandler` for a "Create Order"
44
- feature, following the loaded Clean Architecture + CQRS standards. Keep it
45
- compilable C#; no TODOs.
46
- outputs:
47
- - { name: gen_status, from: "$.status" }
48
- - { name: gen_summary, from: "$.summary" }
49
- - { name: gen_files, from: "$.files" } # the paths the agent chose
50
-
51
- # 3. Review the current output — a SECOND fresh generation, read-only, that
52
- # judges the files the generation reported and returns pass/issues.
53
- - id: review_handler
54
- action: agent_review
55
- review_of_var: gen_files
56
- task: |
57
- Review the handler for compliance with the loaded standards (naming, layer
58
- boundaries, CQRS separation). Decide pass/fail.
59
- outputs:
60
- - { name: review_pass, from: "$.pass" }
61
- - { name: review_issues, from: "$.issues" }
62
-
63
- # 4. If review failed, rebuild context (now including the issues) and
64
- # regenerate — up to 3 times. This is the "…continues" cycle.
65
- - id: revise
66
- action: loop
67
- while: "{{review_pass}} != true"
68
- max_iterations: 3
69
- steps:
70
- - id: ctx_revise
71
- action: build_context
72
- vars:
73
- issues: "{{review_issues}}"
74
- system:
75
- - { path: .appweaver/ai-rules.md }
76
- context_from: gen_files # the files the agent chose last round
77
- - id: regen
78
- action: agent_generate
79
- tools: "Read,Write,Edit"
80
- task: |
81
- Fix these review issues in the file(s) provided in context, preserving
82
- everything already correct: {{issues}}
83
- outputs:
84
- - { name: gen_files, from: "$.files" }
85
- - id: rereview
86
- action: agent_review
87
- review_of_var: gen_files
88
- task: Re-review after the fix. Decide pass/fail.
89
- outputs:
90
- - { name: review_pass, from: "$.pass" }
91
- - { name: review_issues, from: "$.issues" }
92
- - id: stop_when_pass
93
- action: break
94
- condition: "{{review_pass}} == true"
95
-
96
- outputs:
97
- generated: "{{gen_summary}}"
98
- review_pass: "{{review_pass}}"
99
- files: "{{gen_files}}" # decided by the fresh agent, not the interpreter
100
- next: "interpreter continues to the next workflow step"
@@ -1,59 +0,0 @@
1
- ---
2
- name: "appweaver-demo"
3
- description: "Prototype launcher (Claude Code): 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 .appweaver/orchestrator/ and the claude 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 `.appweaver/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):** `.appweaver/orchestrator/orchestrator.py`, `*.orch.yaml`
15
- - **This agent's transport profile:** `.claude/agent.json`
16
-
17
- > Claude Code spawns via the `claude -p` CLI (native `--system-prompt`,
18
- > `--tools`, and `--bare` isolation). Its `sdk` block declares the SDK the
19
- > `sdk`/`sdk-apply` strategies import (`claude-agent-sdk`) and the adapter
20
- > (`.appweaver/orchestrator/adapters/claude_agent_sdk.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 .claude/agent.json` is required for `spawn`, `sdk`, and `sdk-apply`:
29
- `spawn` reads the CLI to launch 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 .appweaver/orchestrator/.demo-out/demo.state.json` is required for
34
- `sdk-apply` and `agent` (suspend/resume — follow the loop in step 3).
35
- - `spawn` may also add `--isolation bare|fresh` and `--model <name>` (bare is
36
- strongest; use it when `ANTHROPIC_API_KEY` is set). `sdk`/`sdk-apply` accept
37
- `--model <name>`; isolation is intrinsic (fresh SDK session, no settings).
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 .appweaver/orchestrator/orchestrator.py \
43
- .appweaver/orchestrator/workflows/aw-spec-demo.orch.yaml \
44
- --strategy <strategy> \
45
- [--agent-profile .claude/agent.json] # spawn, sdk, sdk-apply \
46
- [--checkpoint .appweaver/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.
@@ -1,28 +0,0 @@
1
- {
2
- "name": "kilocode",
3
- "sdk": {
4
- "type": "claude-agent-sdk",
5
- "package": "claude-agent-sdk",
6
- "module": "claude_agent_sdk",
7
- "adapter": "../.appweaver/orchestrator/adapters/claude_agent_sdk.py"
8
- },
9
- "runtime": "Kilo Code launches the interpreter; generation delegates to the Claude Code CLI",
10
- "note": "Kilo Code is a VS Code extension with no standalone headless generation CLI, so this profile reuses `claude -p` for the fresh generation. To generate via Gemini instead, replace bin/args/system/user/tools_flag/approval with the .agents (antigravity) profile's values.",
11
- "bin": "claude",
12
- "args": ["-p", "--output-format", "json", "--no-session-persistence"],
13
- "model_flag": "--model",
14
- "system": { "flag": "--system-prompt" },
15
- "user": { "mode": "stdin" },
16
- "tools_flag": "--tools",
17
- "approval": {
18
- "acceptEdits": ["--permission-mode", "acceptEdits"],
19
- "bypassPermissions": ["--permission-mode", "bypassPermissions"],
20
- "default": ["--permission-mode", "default"]
21
- },
22
- "isolation": {
23
- "bare": ["--bare"],
24
- "fresh": ["--setting-sources", ""]
25
- },
26
- "budget_flag": "--max-budget-usd",
27
- "result_keys": ["result"]
28
- }
@@ -1,59 +0,0 @@
1
- ---
2
- name: "appweaver-demo"
3
- description: "Prototype launcher (Kilo Code): 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 .appweaver/orchestrator/ and the claude 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 `.appweaver/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):** `.appweaver/orchestrator/orchestrator.py`, `*.orch.yaml`
15
- - **This agent's transport profile:** `.kilocode/agent.json`
16
-
17
- > Kilo Code has no native headless CLI, so it reuses `claude -p` for `spawn`
18
- > (native `--system-prompt`, `--tools`, `--bare` isolation). Its `sdk` block
19
- > declares the SDK the `sdk`/`sdk-apply` strategies import (`claude-agent-sdk`)
20
- > and the adapter (`.appweaver/orchestrator/adapters/claude_agent_sdk.py`,
21
- > shared per-SDK) 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 .kilocode/agent.json` is required for `spawn`, `sdk`, and `sdk-apply`:
29
- `spawn` reads the CLI to launch 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 .appweaver/orchestrator/.demo-out/demo.state.json` is required for
34
- `sdk-apply` and `agent` (suspend/resume — follow the loop in step 3).
35
- - `spawn` may also add `--isolation bare|fresh` and `--model <name>` (bare is
36
- strongest; use it when `ANTHROPIC_API_KEY` is set). `sdk`/`sdk-apply` accept
37
- `--model <name>`; isolation is intrinsic (fresh SDK session, no settings).
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 .appweaver/orchestrator/orchestrator.py \
43
- .appweaver/orchestrator/workflows/aw-spec-demo.orch.yaml \
44
- --strategy <strategy> \
45
- [--agent-profile .kilocode/agent.json] # spawn, sdk, sdk-apply \
46
- [--checkpoint .appweaver/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.
@@ -1,55 +0,0 @@
1
- ---
2
- name: "appweaver"
3
- description: "Parametric launcher (Kilo Code): 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 .appweaver/orchestrator/ and the claude 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** (`.appweaver/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):** `.appweaver/orchestrator/orchestrator.py`, `.appweaver/orchestrator/workflows/aw-spec-<skill>.orch.yaml`, shared modules in `.appweaver/orchestrator/modules/`, shared scripts in `.appweaver/scripts/`
15
- - **This agent's transport profile:** `.kilocode/agent.json`
16
-
17
- > Kilo Code has no native headless CLI, so it reuses `claude -p` for `spawn`
18
- > (native `--system-prompt`, `--tools`, `--bare` isolation). Its `sdk` block
19
- > declares the SDK the `sdk`/`sdk-apply` strategies import (`claude-agent-sdk`)
20
- > and the adapter (`.appweaver/orchestrator/adapters/claude_agent_sdk.py`,
21
- > shared per-SDK) that owns its calling convention.
22
-
23
- ## Execution Steps
24
-
25
- 1. **Parse Arguments** (`<skill> [strategy] [input…]`):
26
- - `skill` (required): the aw-spec skill name, e.g. `demo`, `select-domain`, `foundation`, `specify`, `design`, `implement`, `build`. Resolve the workflow file `.appweaver/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.
27
- - `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>`.
28
- - Everything after the strategy is the user input: pass it as `--input "<text>"` (omit when empty).
29
- - `--agent-profile .kilocode/agent.json` is required for `spawn`, `sdk`, and `sdk-apply` (`agent` needs no profile). If the SDK package isn't installed, add `--sdk-install`.
30
- - **Always** pass `--checkpoint .appweaver/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.
31
- - `spawn` may also add `--isolation bare|fresh` and `--model <name>`; `sdk`/`sdk-apply` accept `--model <name>`.
32
-
33
- 2. **Run the Interpreter**:
34
- ```bash
35
- python3 .appweaver/orchestrator/orchestrator.py \
36
- .appweaver/orchestrator/workflows/aw-spec-<skill>.orch.yaml \
37
- --strategy <strategy> \
38
- --checkpoint .appweaver/orchestrator/.state/<skill>.state.json \
39
- [--agent-profile .kilocode/agent.json] # spawn, sdk, sdk-apply \
40
- [--input "<user input>"] \
41
- --json
42
- ```
43
-
44
- 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).
45
- - **`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).
46
- - **`select`** — ask the USER to pick ONE of `options`; write the chosen value as plain text to `response_path`.
47
- - **`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`.
48
- - **`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.
49
- - **`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`.
50
- - **`agent_query` / `agent_review`** — same as above but READ-ONLY (do not modify files); the reply must end with the required ```json fence.
51
- - **`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`.
52
- - If `pending.note` is present, your previous response was rejected — follow the note and rewrite `response_path`.
53
-
54
- 4. **Report**:
55
- 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.