compound-workflow 1.9.4 → 1.9.6
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/scripts/install-cli.mjs
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* compound-workflow install
|
|
4
4
|
*
|
|
5
|
-
* Copies agents, skills, and commands from the package into
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* .
|
|
11
|
-
* .agents
|
|
12
|
-
* .agents/commands
|
|
5
|
+
* Copies agents, skills, and commands from the package into every harness dir.
|
|
6
|
+
* Harnesses are declared in HARNESSES below; every harness receives all three
|
|
7
|
+
* asset kinds so skills and commands stay in parity across .claude/, .cursor/,
|
|
8
|
+
* and .agents/. Only agent layout varies per harness (flat vs. recursive).
|
|
9
|
+
*
|
|
10
|
+
* .claude/{agents,skills,commands} — Claude Code (flat agents)
|
|
11
|
+
* .cursor/{agents,skills,commands} — Cursor (recursive agents)
|
|
12
|
+
* .agents/{agents,skills,commands} — OpenCode / generic (recursive agents)
|
|
13
13
|
*
|
|
14
14
|
* Also writes opencode.json, AGENTS.md, and standard docs directories.
|
|
15
15
|
*
|
|
@@ -365,6 +365,18 @@ function parseArgs(argv) {
|
|
|
365
365
|
return out;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
+
// ---------------------------------------------------------------------------
|
|
369
|
+
// Harness registry — every harness receives agents + skills + commands.
|
|
370
|
+
// Agent layout varies because Claude Code requires flat .md files while
|
|
371
|
+
// Cursor and OpenCode preserve subdirectories.
|
|
372
|
+
// ---------------------------------------------------------------------------
|
|
373
|
+
|
|
374
|
+
const HARNESSES = [
|
|
375
|
+
{ name: ".claude", agentsMode: "flat" },
|
|
376
|
+
{ name: ".cursor", agentsMode: "recursive" },
|
|
377
|
+
{ name: ".agents", agentsMode: "recursive" },
|
|
378
|
+
];
|
|
379
|
+
|
|
368
380
|
// ---------------------------------------------------------------------------
|
|
369
381
|
// Main
|
|
370
382
|
// ---------------------------------------------------------------------------
|
|
@@ -391,18 +403,16 @@ function main() {
|
|
|
391
403
|
console.log("Package:", PACKAGE_ROOT);
|
|
392
404
|
console.log("OpenCode CLI:", hasCommand("opencode") ? "yes" : "no");
|
|
393
405
|
|
|
394
|
-
|
|
395
|
-
|
|
406
|
+
for (const h of HARNESSES) {
|
|
407
|
+
const agentsDest = path.join(targetRoot, h.name, "agents");
|
|
408
|
+
const skillsDest = path.join(targetRoot, h.name, "skills");
|
|
409
|
+
const commandsDest = path.join(targetRoot, h.name, "commands");
|
|
396
410
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
// .agents/agents/, .agents/skills/, .agents/commands/ (OpenCode / general)
|
|
403
|
-
copyAgentsRecursive(srcAgents, path.join(targetRoot, ".agents", "agents"), args.dryRun, ".agents/agents/");
|
|
404
|
-
copySkills(srcSkills, path.join(targetRoot, ".agents", "skills"), args.dryRun, ".agents/skills/");
|
|
405
|
-
copyCommands(srcCommands, path.join(targetRoot, ".agents", "commands"), args.dryRun, ".agents/commands/");
|
|
411
|
+
const copyAgents = h.agentsMode === "flat" ? copyAgentsFlat : copyAgentsRecursive;
|
|
412
|
+
copyAgents(srcAgents, agentsDest, args.dryRun, `${h.name}/agents/`);
|
|
413
|
+
copySkills(srcSkills, skillsDest, args.dryRun, `${h.name}/skills/`);
|
|
414
|
+
copyCommands(srcCommands, commandsDest, args.dryRun, `${h.name}/commands/`);
|
|
415
|
+
}
|
|
406
416
|
|
|
407
417
|
writeOpenCodeJson(targetRoot, packageSrc, args.dryRun);
|
|
408
418
|
writeAgentsMd(targetRoot, PACKAGE_ROOT, args.dryRun);
|
|
@@ -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
|
|