compound-workflow 1.9.3 → 1.9.4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compound-workflow",
3
- "version": "1.9.3",
3
+ "version": "1.9.4",
4
4
  "description": "Clarify → plan → execute → verify → capture. One Install action for Cursor, Claude, and OpenCode.",
5
5
  "license": "MIT",
6
6
  "repository": {
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.
@@ -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
- - **One prompt total.** Do not emit numbered question lists (`1. 2. 3. …`). Do not split prompts across multiple messages. Phase 2 is the only user interaction.
28
- - **Never ask about skills.** Skill inclusion is not a decision — every skill in `$skills_dir` is included automatically. Do not ask "keep all four guardrails?", "which skills to include?", or anything equivalent.
29
- - **Never ask meta questions.** Do not surface observations like "project-specific skills appear elsewhere flag as a gap?" or "strip extra sections?". If the template forbids something, silently conform; if it's out of scope, ignore it.
30
- - **Never present "ambiguous need your call" sections.** Ambiguity is resolved by the deterministic rules below, then surfaced in the proposed config block for the user to override if they disagree. Pick a value. Do not ask.
31
- - **Never re-confirm.** After the user replies to the Phase 2 prompt (accept or overrides), write the file. No second confirmation pass.
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 to check: directories named `.agents`, `.claude`, `.cursor`. Check all three; others may exist.
60
+ Known harness patterns: `.agents`, `.claude`, `.cursor`. Check all three; others may exist.
60
61
 
61
- For each found harness, note where its skills live:
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
- Record detected harnesses as `$harnesses` (ordered list of directories found). This will be written to AGENTS.md.
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 and tell the user:
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
- List all directories under `$skills_dir` (resolved in Phase 1). For each one, read `SKILL.md` frontmatter to get `name` and `description`. These are the only skills that may appear in the Skill Index never reference a skill not present on disk.
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
- **Include every discovered skill automatically. No user prompt.** The installed skill set is the source of truth. If the user wants to exclude a skill, they remove it from `$skills_dir` — this skill does not curate.
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 130 lines
313
+ - [ ] File is under 160 lines
272
314
 
273
315
  If any check fails, fix before confirming completion.
274
316