compound-workflow 1.9.3 → 1.9.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.
package/package.json
CHANGED
package/src/AGENTS.md
CHANGED
|
@@ -44,6 +44,17 @@ Onboarding:
|
|
|
44
44
|
|
|
45
45
|
- `/install` — one action: copies agents/skills/commands, writes opencode.json, merges AGENTS.md, creates docs/todo dirs (run `npx compound-workflow install` in the project)
|
|
46
46
|
|
|
47
|
+
## Orchestration Model
|
|
48
|
+
|
|
49
|
+
The main agent stays lean. Context lives where it's needed, not at the top.
|
|
50
|
+
|
|
51
|
+
- **Plan** selects the minimal skill set for the work and names each selection explicitly. Unused skills never load.
|
|
52
|
+
- **Work** allocates tasks to subagents and passes only what each task needs: the problem statement, relevant file refs, success criteria. Not conversation history, not unrelated context.
|
|
53
|
+
- **Subagents** run in isolation, return evidence and results. The main agent orchestrates, records outcomes, and moves to the next task.
|
|
54
|
+
- **Skills load on demand.** Commands pull a skill into context only when a gate or step requires it — not as a precautionary baseline.
|
|
55
|
+
|
|
56
|
+
Context budget rule: if a task can be done with less context, pass less. If a subagent can handle it, delegate.
|
|
57
|
+
|
|
47
58
|
## Non-negotiables (Structure Integrity)
|
|
48
59
|
|
|
49
60
|
- **Commands are the public API.** Keep `/workflow:*` command docs stable; add capability via skills/agents, not new command variants.
|
|
@@ -95,73 +95,53 @@ Also consider any repo-level guidance files such as `AGENTS.md`.
|
|
|
95
95
|
|
|
96
96
|
#### 1.2 Structured Dialogue Exploration (Default)
|
|
97
97
|
|
|
98
|
-
Engage in collaborative
|
|
98
|
+
Engage in collaborative **dialog, one question at a time**. This is a discussion, not a survey — ask open-ended, conversational questions that invite the user to think out loud. Readability beats coverage.
|
|
99
99
|
|
|
100
|
-
**Critical (non-negotiable):** Default response shape is **synthesize +
|
|
100
|
+
**Critical (non-negotiable):** Default response shape is **synthesize + ONE open question + assumptions**. No "prompts to react to" menus. No multiple-choice questions during exploration. No multi-part questions. AskUserQuestion (which forces multiple-choice) is reserved strictly for handoffs (Phase 0, Phase 4) — never for exploration.
|
|
101
101
|
|
|
102
|
-
**Enforcement rule:** Do **not** use AskUserQuestion during exploration
|
|
102
|
+
**Enforcement rule:** Do **not** use AskUserQuestion during Phase 1 exploration. Ask open-ended questions in plain prose and let the user reply in plain prose. AskUserQuestion is only for the Phase 0 / Phase 4 handoff decisions.
|
|
103
103
|
|
|
104
104
|
**Default cadence (per iteration):**
|
|
105
105
|
|
|
106
|
-
1. **Synthesize Current Understanding** (
|
|
107
|
-
2. **Ask
|
|
108
|
-
3. **
|
|
109
|
-
4. **Capture Emerging Assumptions** (bullets)
|
|
106
|
+
1. **Synthesize Current Understanding** (≤ 3 short bullets)
|
|
107
|
+
2. **Ask ONE high-leverage question** (the single most useful thing to resolve now)
|
|
108
|
+
3. **State Working Assumptions** (≤ 3 bullets, phrased as "tell me if any of these are wrong")
|
|
110
109
|
|
|
111
110
|
**Hard rules:**
|
|
112
111
|
|
|
113
|
-
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
112
|
+
- Exactly **one** question per turn. No follow-ups, no "also…", no multi-part questions.
|
|
113
|
+
- No "prompts to react to" / "pick any" menus. If tempted to list options, pick the single best one and ask that.
|
|
114
|
+
- Keep the whole turn short — aim for ≤ 12 lines. A reader should grasp it in one glance.
|
|
115
|
+
- If blocked, ask one more clarifying question **next** turn, never stack them.
|
|
116
116
|
|
|
117
117
|
**First assistant message template (copy/paste shape):**
|
|
118
118
|
|
|
119
119
|
```markdown
|
|
120
|
-
**What I think you're aiming for
|
|
120
|
+
**What I think you're aiming for:**
|
|
121
121
|
- ...
|
|
122
122
|
- ...
|
|
123
123
|
|
|
124
|
-
**One question
|
|
124
|
+
**One question:**
|
|
125
125
|
<single sentence>
|
|
126
126
|
|
|
127
|
-
**
|
|
128
|
-
- Tradeoff: ...
|
|
129
|
-
- Edge area: ...
|
|
130
|
-
- UX vs architecture: ...
|
|
131
|
-
- Scale implication: ...
|
|
132
|
-
- Short-term vs long-term: ...
|
|
133
|
-
|
|
134
|
-
**Working assumptions (tell me what’s wrong):**
|
|
127
|
+
**I'm assuming (tell me if any of these are wrong):**
|
|
135
128
|
- ...
|
|
136
129
|
- ...
|
|
137
130
|
```
|
|
138
131
|
|
|
139
132
|
For each iteration:
|
|
140
133
|
|
|
141
|
-
1. **Synthesize Current Understanding**
|
|
134
|
+
1. **Synthesize Current Understanding** (≤ 3 bullets)
|
|
142
135
|
|
|
143
136
|
- What the feature appears to be
|
|
144
|
-
- Who it impacts
|
|
145
|
-
-
|
|
146
|
-
- Implied constraints
|
|
147
|
-
|
|
148
|
-
2. **Ask at most ONE high-leverage question** (only if needed to unblock discussion)
|
|
149
|
-
|
|
150
|
-
3. **Surface Tensions & Unknowns** via 3--5 prompts to react to (not interrogation), such as:
|
|
151
|
-
|
|
152
|
-
- Tradeoff
|
|
153
|
-
- Edge area
|
|
154
|
-
- Scale implication
|
|
155
|
-
- UX vs architecture tension
|
|
156
|
-
- Short-term vs long-term implication
|
|
137
|
+
- Who it impacts / what class of change (incremental, foundational, risky, trivial)
|
|
138
|
+
- Implied constraint worth surfacing
|
|
157
139
|
|
|
158
|
-
|
|
140
|
+
2. **Ask ONE high-leverage, open-ended question** anchored on purpose, users, success, or a hard constraint. Use "how/what/why" phrasing — not "which of these". Invite the user to think out loud.
|
|
159
141
|
|
|
160
|
-
|
|
161
|
-
- Tentative decisions
|
|
162
|
-
- Areas still unresolved
|
|
142
|
+
3. **State Working Assumptions** — the 1–3 most load-bearing beliefs you're operating on. Ask the user to flag anything wrong; do not turn these into extra questions.
|
|
163
143
|
|
|
164
|
-
|
|
144
|
+
4. Continue iteratively until:
|
|
165
145
|
|
|
166
146
|
- Direction is clear
|
|
167
147
|
- Or user says "proceed"
|
|
@@ -191,7 +171,7 @@ For each approach, provide:
|
|
|
191
171
|
Lead with your recommendation and explain why. Apply YAGNI --- prefer
|
|
192
172
|
simpler solutions.
|
|
193
173
|
|
|
194
|
-
|
|
174
|
+
Ask which direction resonates as an open question in the conversation ("Which of these fits best, or does something in between feel closer?"). Do **not** use AskUserQuestion here — keep it a discussion.
|
|
195
175
|
|
|
196
176
|
---
|
|
197
177
|
|
|
@@ -47,68 +47,53 @@ If requirements are clear, suggest: "Your requirements seem clear. Consider proc
|
|
|
47
47
|
|
|
48
48
|
### Phase 1: Understand the Idea
|
|
49
49
|
|
|
50
|
-
Default to **
|
|
50
|
+
Default to **one question at a time**. Readability beats coverage — the user pulls the next layer, you don't push all of it.
|
|
51
51
|
|
|
52
52
|
**Default cadence (per iteration):**
|
|
53
53
|
|
|
54
|
-
1. **Synthesize current understanding** (
|
|
55
|
-
2. **Ask
|
|
56
|
-
3. **
|
|
57
|
-
4. **Capture assumptions + tentative decisions** (bullets)
|
|
54
|
+
1. **Synthesize current understanding** (≤ 3 short bullets)
|
|
55
|
+
2. **Ask ONE high-leverage question** (the single most useful thing to resolve right now)
|
|
56
|
+
3. **State working assumptions** (≤ 3 bullets, phrased as "tell me if any of these are wrong")
|
|
58
57
|
|
|
59
58
|
**Hard rules:**
|
|
60
59
|
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
60
|
+
- Exactly **one** question per turn. No follow-ups, no "also…", no multi-part questions.
|
|
61
|
+
- No "prompts to react to" / "pick any" menus. If you're tempted to list options, pick the single best one and ask that.
|
|
62
|
+
- Keep the whole turn short — think ≤ 12 lines of output. A reader should grasp it in one glance.
|
|
63
|
+
- If ambiguity blocks progress, ask one more clarifying question next turn. Never stack them.
|
|
64
64
|
|
|
65
65
|
**First response template (copy/paste shape):**
|
|
66
66
|
|
|
67
67
|
```markdown
|
|
68
|
-
**What I think you're aiming for
|
|
68
|
+
**What I think you're aiming for:**
|
|
69
69
|
- ...
|
|
70
70
|
- ...
|
|
71
71
|
|
|
72
|
-
**One question
|
|
72
|
+
**One question:**
|
|
73
73
|
<single sentence>
|
|
74
74
|
|
|
75
|
-
**
|
|
76
|
-
- Tradeoff: ...
|
|
77
|
-
- Edge area: ...
|
|
78
|
-
- UX vs architecture: ...
|
|
79
|
-
- Scale implication: ...
|
|
80
|
-
- Short-term vs long-term: ...
|
|
81
|
-
|
|
82
|
-
**Working assumptions (tell me what’s wrong):**
|
|
75
|
+
**I'm assuming (tell me if any of these are wrong):**
|
|
83
76
|
- ...
|
|
84
77
|
- ...
|
|
85
78
|
```
|
|
86
79
|
|
|
87
|
-
**Choosing the ONE question
|
|
88
|
-
|
|
89
|
-
- **Do not open with multiple-choice.** Open with synthesis and discussion prompts. Multiple-choice applies only when you have already done a dialogue iteration and are asking that one allowed question.
|
|
90
|
-
|
|
91
|
-
1. **Prefer multiple choice when natural options exist** (only after a dialogue iteration)
|
|
92
|
-
|
|
93
|
-
- Good: "Should the notification be: (a) email only, (b) in-app only, or (c) both?"
|
|
94
|
-
- Avoid: "How should users be notified?"
|
|
95
|
-
|
|
96
|
-
2. **Make it high-leverage**
|
|
97
|
-
|
|
98
|
-
- Anchor on **purpose**, **users**, **success**, or a **hard constraint**
|
|
99
|
-
- Avoid implementation sequencing ("how will we build it?")
|
|
100
|
-
|
|
101
|
-
3. **Validate assumptions explicitly**
|
|
80
|
+
**Choosing the ONE question:**
|
|
102
81
|
|
|
103
|
-
|
|
82
|
+
This is a **dialog**, not a survey. Ask open, conversational questions that invite the user to think out loud — not multiple-choice prompts that force a pick.
|
|
104
83
|
|
|
105
|
-
|
|
84
|
+
1. **Anchor on purpose, users, success, or a hard constraint.** Avoid implementation sequencing ("how will we build it?").
|
|
85
|
+
2. **Keep it open-ended.** Prefer "how", "what", "why" over "which of these".
|
|
86
|
+
- Good: "How would you want users to be notified, and why that way?"
|
|
87
|
+
- Avoid: "Should the notification be: (a) email, (b) in-app, or (c) both?"
|
|
88
|
+
3. **Validate a specific assumption** when that's the biggest unknown — phrased so the user can elaborate, not just yes/no.
|
|
89
|
+
- "I'm assuming users will be logged in when this triggers — is that right, and what happens if they aren't?"
|
|
90
|
+
4. **Prefer success criteria early.**
|
|
106
91
|
- "What would make you say 'this worked'?"
|
|
107
92
|
|
|
108
|
-
**
|
|
93
|
+
**Question bank (pick one per turn — never list several):**
|
|
109
94
|
|
|
110
95
|
- Purpose: "What problem is painful enough to fix now?"
|
|
111
|
-
- Users
|
|
96
|
+
- Users: "Who is the primary user and what's their moment-of-need?"
|
|
112
97
|
- Constraints: "What constraint should we treat as immovable?"
|
|
113
98
|
- Success: "What does success look like (observable behavior)?"
|
|
114
99
|
- Edges: "What must not happen? What failure would be unacceptable?"
|
|
@@ -222,14 +207,16 @@ This prevents wasted effort on misaligned designs.
|
|
|
222
207
|
|
|
223
208
|
## Anti-Patterns to Avoid
|
|
224
209
|
|
|
225
|
-
| Anti-Pattern
|
|
226
|
-
|
|
|
227
|
-
| Asking many questions in a row
|
|
228
|
-
|
|
|
229
|
-
|
|
|
230
|
-
|
|
|
231
|
-
|
|
|
232
|
-
|
|
|
210
|
+
| Anti-Pattern | Better Approach |
|
|
211
|
+
| -------------------------------------- | ------------------------------------------- |
|
|
212
|
+
| Asking many questions in a row | Exactly one question per turn |
|
|
213
|
+
| Listing "prompts to react to" | Pick the single best question and ask it |
|
|
214
|
+
| Dense walls of bullets | ≤ 12 lines per turn; readable at a glance |
|
|
215
|
+
| Jumping to implementation details | Stay focused on WHAT, not HOW |
|
|
216
|
+
| Proposing overly complex solutions | Start simple, add complexity only if needed |
|
|
217
|
+
| Ignoring existing codebase patterns | Research what exists first |
|
|
218
|
+
| Making assumptions without validating | State assumptions explicitly and confirm |
|
|
219
|
+
| Creating lengthy design documents | Keep it concise—details go in the plan |
|
|
233
220
|
|
|
234
221
|
## Integration with Planning
|
|
235
222
|
|
|
@@ -24,11 +24,12 @@ This skill is a config generator, not a survey. The developer interaction budget
|
|
|
24
24
|
|
|
25
25
|
**Hard constraints — violating any of these is a skill failure:**
|
|
26
26
|
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **Never ask
|
|
30
|
-
- **Never
|
|
31
|
-
- **Never
|
|
27
|
+
- **At most two prompts per run.** (1) Phase 1b alignment prompt — only if harness skill sets differ. (2) Phase 2 config block — always. No other questions.
|
|
28
|
+
- **No numbered question lists.** Never emit `1. … 2. … 3. …` walls. Never split a single decision across multiple messages.
|
|
29
|
+
- **Never ask about skill inclusion.** Every skill in any discovered skills directory is included in the Skill Index automatically. Do not ask "keep all four guardrails?" or "which skills to include?".
|
|
30
|
+
- **Never ask meta questions.** No "project-specific skills appear elsewhere — flag as a gap?", no "strip extra sections?", no commentary on memory vs. code mismatches. If the template forbids something, silently conform.
|
|
31
|
+
- **Never present "ambiguous — need your call" sections.** Ambiguity is resolved by the deterministic rules below and surfaced in the Phase 2 block for the user to override. Pick a value.
|
|
32
|
+
- **Never re-confirm.** After the user replies to Phase 2, write the file. No second confirmation pass.
|
|
32
33
|
|
|
33
34
|
**Ambiguity resolution (apply without asking):**
|
|
34
35
|
|
|
@@ -56,19 +57,16 @@ Announce the mode before proceeding.
|
|
|
56
57
|
|
|
57
58
|
Check which directories exist at the project root. Do not assume any are present — record only what is actually found on disk.
|
|
58
59
|
|
|
59
|
-
Known harness patterns
|
|
60
|
+
Known harness patterns: `.agents`, `.claude`, `.cursor`. Check all three; others may exist.
|
|
60
61
|
|
|
61
|
-
For each found harness,
|
|
62
|
-
- `<harness>/skills/` — if that subdirectory exists
|
|
63
|
-
- `.claude/` has no skills directory (agents only, in `.claude/agents/`)
|
|
62
|
+
For each found harness, check `<harness>/skills/`. Record:
|
|
64
63
|
|
|
65
|
-
|
|
64
|
+
- `$harnesses` — ordered list of harness directories found
|
|
65
|
+
- `$skills_dirs` — map of `<harness>` → `<harness>/skills/` for every harness that has a skills subdirectory
|
|
66
66
|
|
|
67
|
-
If **no harness directories exist**, stop
|
|
67
|
+
If **no harness directories exist**, stop:
|
|
68
68
|
> No harness directories found. Run `npx compound-workflow install` first, then re-run this skill.
|
|
69
69
|
|
|
70
|
-
Use the **first found skills directory** across `$harnesses` as the canonical source for skill discovery in Phase 3. Record this as `$skills_dir`.
|
|
71
|
-
|
|
72
70
|
> **Note:** `harnesses` in AGENTS.md Repo Config may become stale if harness directories are added or removed. Re-run `/setup-agents` to refresh it.
|
|
73
71
|
|
|
74
72
|
### Project stack detection
|
|
@@ -102,6 +100,37 @@ For each value, state whether it was detected or defaulted.
|
|
|
102
100
|
|
|
103
101
|
---
|
|
104
102
|
|
|
103
|
+
## Phase 1b: Discover Skills Across Harnesses
|
|
104
|
+
|
|
105
|
+
For every entry in `$skills_dirs`, list subdirectories and read each `SKILL.md` frontmatter (`name`, `description`).
|
|
106
|
+
|
|
107
|
+
Build `$skill_matrix`: `<skill name>` → `{harnesses where present, source description}`. The **Skill Index** in AGENTS.md is the union of all skill names across all harnesses.
|
|
108
|
+
|
|
109
|
+
**If every harness with a skills directory has the same skill set:** proceed silently to Phase 2. No prompt, no table output.
|
|
110
|
+
|
|
111
|
+
**If harnesses diverge** (a skill is in one harness but missing from another), emit the comparison table and one prompt:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
Skill presence across harnesses:
|
|
115
|
+
|
|
116
|
+
| Skill | <harness 1> | <harness 2> | ... |
|
|
117
|
+
| --- | --- | --- |
|
|
118
|
+
| <name> | ✓ | ✗ | ... |
|
|
119
|
+
| <name> | ✓ | ✓ | ... |
|
|
120
|
+
|
|
121
|
+
Skills differ across harnesses. Align them? Aligning copies each skill's files into every harness so all locations have the same set.
|
|
122
|
+
|
|
123
|
+
Reply `align` to sync, `skip` to leave them as-is.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**If `align`:** for each skill, pick the harness where it lives as the source and copy its directory into every other harness's skills directory (create the directory if missing). Note what was copied in the final summary.
|
|
127
|
+
|
|
128
|
+
**If `skip`:** proceed with the union as the Skill Index; record in the summary that harnesses remain out of sync.
|
|
129
|
+
|
|
130
|
+
Either way, proceed to Phase 2 after this single prompt.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
105
134
|
## Phase 2: Confirm the Proposed Config
|
|
106
135
|
|
|
107
136
|
This is the **only** user prompt in the skill. Emit one block and one question. Nothing else.
|
|
@@ -143,9 +172,11 @@ On reply: apply overrides (if any), proceed to Phase 3 and Phase 4. Do not re-co
|
|
|
143
172
|
|
|
144
173
|
## Phase 3: Build the Skill Index
|
|
145
174
|
|
|
146
|
-
|
|
175
|
+
Use `$skill_matrix` from Phase 1b. The Skill Index is the union of skill names across all harnesses. For each skill, use the `description` from that skill's `SKILL.md` frontmatter.
|
|
147
176
|
|
|
148
|
-
|
|
177
|
+
Never reference a skill not present on disk. Never invent a description.
|
|
178
|
+
|
|
179
|
+
**Include every discovered skill automatically. No user prompt.** If the user wants to exclude a skill, they remove it from the skills directories — this skill does not curate.
|
|
149
180
|
|
|
150
181
|
**Update mode:** diff against the existing Skill Index silently and write the refreshed list. Do not surface the diff as a question.
|
|
151
182
|
|
|
@@ -198,6 +229,17 @@ Continuous improvement:
|
|
|
198
229
|
- `/metrics` — log + assess a session
|
|
199
230
|
- `/assess` — aggregate metrics and propose improvements
|
|
200
231
|
|
|
232
|
+
## Orchestration Model
|
|
233
|
+
|
|
234
|
+
The main agent stays lean. Context lives where it's needed, not at the top.
|
|
235
|
+
|
|
236
|
+
- **Plan** selects the minimal skill set for the work and names each selection explicitly. Unused skills never load.
|
|
237
|
+
- **Work** allocates tasks to subagents and passes only what each task needs: the problem statement, relevant file refs, success criteria. Not conversation history, not unrelated context.
|
|
238
|
+
- **Subagents** run in isolation, return evidence and results. The main agent orchestrates, records outcomes, and moves to the next task.
|
|
239
|
+
- **Skills load on demand.** Commands pull a skill into context only when a gate or step requires it — not as a precautionary baseline.
|
|
240
|
+
|
|
241
|
+
Context budget rule: if a task can be done with less context, pass less. If a subagent can handle it, delegate.
|
|
242
|
+
|
|
201
243
|
## Non-negotiables (Structure Integrity)
|
|
202
244
|
|
|
203
245
|
- **Commands are the public API.** Keep `/workflow:*` command docs stable; add capability via skills/agents, not new command variants.
|
|
@@ -268,7 +310,7 @@ After writing, verify:
|
|
|
268
310
|
- [ ] Every skill in the Skill Index was discovered from `$skills_dir` — no invented entries
|
|
269
311
|
- [ ] All skill descriptions come from `SKILL.md` frontmatter — none invented by the agent
|
|
270
312
|
- [ ] No hardcoded tool, platform, or directory names
|
|
271
|
-
- [ ] File is under
|
|
313
|
+
- [ ] File is under 160 lines
|
|
272
314
|
|
|
273
315
|
If any check fails, fix before confirming completion.
|
|
274
316
|
|