compound-workflow 0.1.2 → 0.1.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/.claude-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/README.md +17 -9
- package/package.json +1 -1
- package/scripts/install-cli.mjs +37 -0
- package/src/.agents/commands/workflow/compound.md +11 -9
- package/src/.agents/skills/compound-docs/SKILL.md +16 -17
- package/src/.agents/skills/compound-docs/assets/resolution-template.md +3 -1
- package/src/.agents/skills/compound-docs/references/yaml-schema.md +1 -1
- package/src/AGENTS.md +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"author": { "name": "Compound Workflow" },
|
|
6
6
|
"keywords": ["workflow", "planning", "agents", "skills", "commands"],
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"repository": "https://github.com/
|
|
8
|
+
"repository": "https://github.com/cjerochim/compound-workflow",
|
|
9
9
|
"commands": "./src/.agents/commands",
|
|
10
10
|
"agents": "./src/.agents/agents",
|
|
11
11
|
"skills": "./src/.agents/skills"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"compound-workflow","version":"0.1.0","description":"Clarify → plan → execute → verify → capture workflow: commands, skills, and agents for Cursor, Claude, and OpenCode","author":{"name":"Compound Workflow"},"keywords":["workflow","cursor","claude","opencode","agents","planning"],"license":"MIT","repository":{"type":"git","url":"https://github.com/
|
|
1
|
+
{"name":"compound-workflow","version":"0.1.0","description":"Clarify → plan → execute → verify → capture workflow: commands, skills, and agents for Cursor, Claude, and OpenCode","author":{"name":"Compound Workflow"},"keywords":["workflow","cursor","claude","opencode","agents","planning"],"license":"MIT","repository":{"type":"git","url":"https://github.com/cjerochim/compound-workflow"},"agents":"src/.agents/agents","commands":"src/.agents/commands"}
|
package/README.md
CHANGED
|
@@ -8,24 +8,28 @@ It reduces delivery failures from **unclear intent**, **weak verification**, and
|
|
|
8
8
|
|
|
9
9
|
Inspired by [Compound Engineering](https://every.to/guides/compound-engineering) (Every) — the AI-native philosophy that each unit of work should compound into the next.
|
|
10
10
|
|
|
11
|
-
Runtime assets live in `src/.agents/` and `src/AGENTS.md`. **Cursor
|
|
11
|
+
Runtime assets live in `src/.agents/` and `src/AGENTS.md`. Supports **Cursor**, **Claude**, and **OpenCode** via one Install action per project.
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
## Get started
|
|
16
16
|
|
|
17
|
-
**
|
|
17
|
+
**1. Add the package and run Install** (in the project where you want the workflow):
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
npm install compound-workflow
|
|
21
21
|
npx compound-workflow install
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
**2. Choose how you use it:**
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
- **Cursor:** If your project already has a `.cursor` directory, Install will create a symlink at `.cursor/skills/compound-workflow` so Cursor discovers the workflow skills. No plugin needed for skills. For full commands and agents, use the plugin from this repo (see repo docs for loading a local plugin).
|
|
27
|
+
- **OpenCode:** Install writes `opencode.json` and a symlink at `.agents/compound-workflow-skills`; OpenCode loads from the package. Run `/install` or `npx compound-workflow install` in the project.
|
|
28
|
+
- **Claude:** Add the compound-workflow plugin from this repo. In any repo, run `/install` or the CLI above.
|
|
27
29
|
|
|
28
|
-
**
|
|
30
|
+
**What Install does:** Merges `AGENTS.md` (preserves your Repo Config Block), creates standard dirs (`docs/`, `todos/`), writes `opencode.json` (for OpenCode), and—if the project has a `.cursor` directory—creates a symlink at `.cursor/skills/compound-workflow` so Cursor picks up skills. All paths reference `node_modules/compound-workflow`; no file copying.
|
|
31
|
+
|
|
32
|
+
**CLI options:** `--dry-run` (preview), `--root /path/to/project`, `--no-config` (skip Repo Config Block reminder).
|
|
29
33
|
|
|
30
34
|
**Legacy (clone inside repo):** If you cloned this repo inside a host repo and need to copy files without npm, use `./scripts/sync-into-repo.sh` (copy only; does not update opencode.json). Prefer the npm + Install flow above.
|
|
31
35
|
|
|
@@ -35,8 +39,10 @@ To update to a new release, see [Updating compound-workflow](#updating-compound-
|
|
|
35
39
|
|
|
36
40
|
## Updating compound-workflow
|
|
37
41
|
|
|
38
|
-
- **Cursor
|
|
39
|
-
- **
|
|
42
|
+
- **Cursor (plugin):** If you load the plugin from this repo, pull latest and reload the plugin in Cursor.
|
|
43
|
+
- **Cursor (npm + .cursor):** Run `npm update compound-workflow`, then run **Install** again (`npx compound-workflow install`) to refresh the `.cursor/skills/compound-workflow` symlink and AGENTS.md.
|
|
44
|
+
- **OpenCode / npm:** Run `npm update compound-workflow` (or bump the version in `package.json` and `npm install`), then run **Install** again. This refreshes `opencode.json`, merges the latest `AGENTS.md` template, and ensures dirs exist; Repo Config Block is preserved.
|
|
45
|
+
- **Claude (plugin):** Update via the editor’s plugin; if from repo, pull latest and reload.
|
|
40
46
|
|
|
41
47
|
---
|
|
42
48
|
|
|
@@ -97,7 +103,7 @@ flowchart LR
|
|
|
97
103
|
|
|
98
104
|
## Command reference
|
|
99
105
|
|
|
100
|
-
**Onboarding:** `/install` — one action:
|
|
106
|
+
**Onboarding:** `/install` — one action: merges AGENTS.md, creates dirs, preserves Repo Config Block; writes opencode.json (OpenCode) and, if present, symlinks into `.cursor/skills/` (Cursor). Run `npx compound-workflow install` in the project (requires `npm install compound-workflow`). Re-run after `npm update compound-workflow` to refresh config; see [Updating compound-workflow](#updating-compound-workflow).
|
|
101
107
|
|
|
102
108
|
**Core workflow:** See [Step-by-step](#step-by-step-intent-and-commands) above.
|
|
103
109
|
|
|
@@ -145,7 +151,9 @@ Full “when to use what” and reference standards: [src/AGENTS.md](src/AGENTS.
|
|
|
145
151
|
|
|
146
152
|
## Troubleshooting
|
|
147
153
|
|
|
148
|
-
**Skills not showing?** Cursor discovers skills from the
|
|
154
|
+
**Skills not showing in Cursor?** Cursor discovers skills from (1) the plugin’s `skills/` directory when you load the plugin from this repo, or (2) the project’s `.cursor/skills/` when you use npm: ensure the project has a `.cursor` directory and run `npx compound-workflow install`—Install creates a symlink at `.cursor/skills/compound-workflow`. If skills still don’t appear, check Cursor Settings → Rules and any `permission.skill` settings.
|
|
155
|
+
|
|
156
|
+
**Skills not showing in OpenCode?** OpenCode uses the `.agents/compound-workflow-skills` symlink and `opencode.json` `skills.paths`. Run Install from the project root (`npx compound-workflow install`).
|
|
149
157
|
|
|
150
158
|
---
|
|
151
159
|
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"compound-workflow","version":"0.1.
|
|
1
|
+
{"name":"compound-workflow","version":"0.1.4","description":"Clarify → plan → execute → verify → capture. One Install action for Cursor, Claude, and OpenCode.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/cjerochim/compound-workflow.git"},"bin":{"compound-workflow":"scripts/install-cli.mjs"},"files":["src","scripts",".cursor-plugin",".claude-plugin","skills"],"engines":{"node":">=18"}}
|
package/scripts/install-cli.mjs
CHANGED
|
@@ -208,6 +208,42 @@ function ensureSkillsSymlink(targetRoot, dryRun) {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
+
const CURSOR_SKILLS_LINK = ".cursor/skills/compound-workflow";
|
|
212
|
+
|
|
213
|
+
function ensureCursorSkills(targetRoot, dryRun) {
|
|
214
|
+
const cursorDir = path.join(targetRoot, ".cursor");
|
|
215
|
+
if (!fs.existsSync(cursorDir)) return;
|
|
216
|
+
|
|
217
|
+
const skillsDir = path.join(cursorDir, "skills");
|
|
218
|
+
const linkPath = path.join(skillsDir, "compound-workflow");
|
|
219
|
+
const targetRel = path.join("..", "..", "node_modules", "compound-workflow", "src", ".agents", "skills");
|
|
220
|
+
|
|
221
|
+
if (dryRun) {
|
|
222
|
+
console.log("[dry-run] Would create", CURSOR_SKILLS_LINK, "symlink (Cursor detected)");
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (!fs.existsSync(skillsDir)) fs.mkdirSync(skillsDir, { recursive: true });
|
|
227
|
+
|
|
228
|
+
let needCreate = true;
|
|
229
|
+
try {
|
|
230
|
+
const stat = fs.lstatSync(linkPath);
|
|
231
|
+
if (stat.isSymbolicLink()) {
|
|
232
|
+
fs.realpathSync(linkPath);
|
|
233
|
+
needCreate = false;
|
|
234
|
+
}
|
|
235
|
+
} catch (_) {}
|
|
236
|
+
|
|
237
|
+
if (needCreate) {
|
|
238
|
+
try {
|
|
239
|
+
fs.unlinkSync(linkPath);
|
|
240
|
+
} catch (_) {}
|
|
241
|
+
const type = process.platform === "win32" ? "dir" : "dir";
|
|
242
|
+
fs.symlinkSync(targetRel, linkPath, type);
|
|
243
|
+
console.log("Created", CURSOR_SKILLS_LINK, "-> package skills (Cursor)");
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
211
247
|
function writeOpenCodeJson(targetRoot, dryRun) {
|
|
212
248
|
const opencodeAbs = path.join(targetRoot, "opencode.json");
|
|
213
249
|
const existing = readJsonMaybe(opencodeAbs) ?? {};
|
|
@@ -333,6 +369,7 @@ function main() {
|
|
|
333
369
|
|
|
334
370
|
writeOpenCodeJson(targetRoot, args.dryRun);
|
|
335
371
|
ensureSkillsSymlink(targetRoot, args.dryRun);
|
|
372
|
+
ensureCursorSkills(targetRoot, args.dryRun);
|
|
336
373
|
writeAgentsMd(targetRoot, args.dryRun);
|
|
337
374
|
ensureDirs(targetRoot, args.dryRun);
|
|
338
375
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: compound
|
|
3
3
|
invocation: workflow:compound
|
|
4
|
-
description: Document a
|
|
5
|
-
argument-hint: "[optional: brief context about the fix]"
|
|
4
|
+
description: Document a durable learning (solved problem or implementation insight) into docs/solutions/ to compound institutional knowledge
|
|
5
|
+
argument-hint: "[optional: brief context about the fix or insight]"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# /workflow:compound
|
|
9
9
|
|
|
10
|
-
Capture a solved problem while context is fresh.
|
|
10
|
+
Capture a durable learning (solved problem or implementation insight) while context is fresh.
|
|
11
11
|
|
|
12
12
|
## Purpose
|
|
13
13
|
|
|
@@ -45,7 +45,8 @@ After the primary solution doc is written, optional post-capture actions (by exp
|
|
|
45
45
|
|
|
46
46
|
### 1. Preconditions (required)
|
|
47
47
|
|
|
48
|
-
- Confirm the problem is solved, verified working, and non-trivial.
|
|
48
|
+
- **Solved problem:** Confirm the problem is solved, verified working, and non-trivial.
|
|
49
|
+
- **Implementation insight:** For feature work, confirm implementation is complete and there is a reusable learning or pattern to capture (no "problem solved" requirement for this path).
|
|
49
50
|
- If critical context is missing, ask targeted questions and wait. Then **invoke the `compound-docs` skill** (it defines required fields, validation gates, and template).
|
|
50
51
|
|
|
51
52
|
### 2. Optional enrichment (before write)
|
|
@@ -68,23 +69,24 @@ User may optionally run `document-review` on the created doc. If the repo has do
|
|
|
68
69
|
## Preconditions
|
|
69
70
|
|
|
70
71
|
<preconditions enforcement="advisory">
|
|
71
|
-
<check condition="
|
|
72
|
-
|
|
72
|
+
<check condition="problem_solved_or_insight">
|
|
73
|
+
For solved problems: problem has been solved (not in-progress). For implementation insights: implementation complete and there is a reusable learning to capture.
|
|
73
74
|
</check>
|
|
74
75
|
<check condition="solution_verified">
|
|
75
|
-
Solution has been verified working
|
|
76
|
+
Solution or approach has been verified working (or for insights: pattern is clear and reusable)
|
|
76
77
|
</check>
|
|
77
78
|
<check condition="non_trivial">
|
|
78
|
-
Non-trivial
|
|
79
|
+
Non-trivial (not simple typo or obvious error; for insights: worth documenting for future reuse)
|
|
79
80
|
</check>
|
|
80
81
|
</preconditions>
|
|
81
82
|
|
|
82
83
|
## What It Captures
|
|
83
84
|
|
|
84
|
-
- **Problem symptom
|
|
85
|
+
- **Problem symptom** (solved problems): Exact error messages, observable behavior
|
|
85
86
|
- **Investigation steps tried**: What didn't work and why
|
|
86
87
|
- **Root cause analysis**: Technical explanation
|
|
87
88
|
- **Working solution**: Step-by-step fix with code examples
|
|
89
|
+
- **Implementation insights**: Patterns, gotchas, or reusable approaches from feature work (e.g. framework usage, redirect patterns)
|
|
88
90
|
- **Prevention strategies**: How to avoid in future
|
|
89
91
|
- **Cross-references**: Links to related issues and docs
|
|
90
92
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: compound-docs
|
|
3
|
-
description: Capture solved problems as categorized documentation with YAML frontmatter for fast lookup
|
|
3
|
+
description: Capture solved problems and implementation insights as categorized documentation with YAML frontmatter for fast lookup
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
allowed-tools:
|
|
6
6
|
- Read # Parse conversation context
|
|
@@ -8,17 +8,17 @@ allowed-tools:
|
|
|
8
8
|
- Bash # Create directories
|
|
9
9
|
- Grep # Search existing docs
|
|
10
10
|
preconditions:
|
|
11
|
-
-
|
|
12
|
-
- Solution has been verified working
|
|
11
|
+
- For solved problems: problem has been solved (not in-progress). For implementation insights: implementation complete and there is a reusable learning to capture.
|
|
12
|
+
- Solution or approach has been verified working (or for insights: pattern is clear and reusable)
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
# compound-docs Skill
|
|
16
16
|
|
|
17
|
-
**Purpose:**
|
|
17
|
+
**Purpose:** Document solved problems and implementation insights (learnings from feature work) to build searchable institutional knowledge with category-based organization (enum-validated problem types).
|
|
18
18
|
|
|
19
19
|
## Overview
|
|
20
20
|
|
|
21
|
-
This skill captures problem solutions
|
|
21
|
+
This skill captures durable learnings in two equally valid forms: (1) problem solutions (bugs, investigations, spike outcomes) and (2) implementation insights (patterns, gotchas, or reusable approaches from feature work). Both produce one structured solution doc per capture.
|
|
22
22
|
|
|
23
23
|
**Organization:** Primary capture writes one solution doc per problem in its symptom category directory (e.g., `docs/solutions/performance-issues/2026-02-19-email-processing-n-plus-one-in-brief-generation.md`). Files use YAML frontmatter for metadata and searchability.
|
|
24
24
|
|
|
@@ -41,20 +41,19 @@ Post-capture actions (by explicit user choice) may update other references (e.g.
|
|
|
41
41
|
- "problem solved"
|
|
42
42
|
- "that did it"
|
|
43
43
|
|
|
44
|
-
**OR manual:** `/workflow:compound` command
|
|
44
|
+
**OR manual:** `/workflow:compound` command (valid after feature work when there is a reusable pattern or learning to document)
|
|
45
45
|
|
|
46
|
-
**Non-trivial
|
|
46
|
+
**Non-trivial only:**
|
|
47
47
|
|
|
48
|
-
- Multiple investigation attempts needed
|
|
49
|
-
-
|
|
50
|
-
- Non-obvious solution
|
|
51
|
-
- Future sessions would benefit
|
|
48
|
+
- **Solved problems:** Multiple investigation attempts needed; tricky debugging; non-obvious solution; future sessions would benefit
|
|
49
|
+
- **Implementation insights:** Pattern or learning from feature work worth reusing (e.g. framework usage, redirect guards)
|
|
52
50
|
|
|
53
51
|
**Skip documentation for:**
|
|
54
52
|
|
|
55
53
|
- Simple typos
|
|
56
54
|
- Obvious syntax errors
|
|
57
55
|
- Trivial fixes immediately corrected
|
|
56
|
+
- Only when there is nothing non-trivial to document (do not skip solely because the work was a "planned feature" rather than a bug fix)
|
|
58
57
|
</step>
|
|
59
58
|
|
|
60
59
|
<step number="2" required="true" depends_on="1">
|
|
@@ -64,12 +63,12 @@ Extract from conversation history:
|
|
|
64
63
|
|
|
65
64
|
**Required information:**
|
|
66
65
|
|
|
67
|
-
- **Module name**: Which module or component
|
|
68
|
-
- **Symptom
|
|
69
|
-
- **Investigation attempts**: What didn't work and why
|
|
70
|
-
- **Root cause**: Technical explanation
|
|
71
|
-
- **Solution**: What fixed it (code/config changes)
|
|
72
|
-
- **Prevention**: How to avoid in future
|
|
66
|
+
- **Module name**: Which module or component (or feature area for insights)
|
|
67
|
+
- **Symptom** (solved problems): Observable error/behavior (exact error messages). **For implementation insights:** treat as "what we needed to achieve" or "what we learned" (context).
|
|
68
|
+
- **Investigation attempts**: What didn't work and why (optional for implementation insights)
|
|
69
|
+
- **Root cause**: Technical explanation (or for insights: why this approach/pattern applies)
|
|
70
|
+
- **Solution**: What fixed it (code/config changes); **for insights:** approach/pattern and when to reuse
|
|
71
|
+
- **Prevention**: How to avoid in future (or for insights: when to apply this pattern)
|
|
73
72
|
|
|
74
73
|
**Environment details (as applicable):**
|
|
75
74
|
|
|
@@ -16,6 +16,8 @@ severity: [critical|high|medium|low]
|
|
|
16
16
|
tags: [keyword1, keyword2, keyword3] # include "spike" when this doc originated from a spike
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
+
<!-- For implementation insights (feature learnings): treat "Symptoms" as "What we needed / context", "What Didn't Work" as optional (use "Direct solution" or omit), and "Solution" as the pattern/approach and when to reuse. -->
|
|
20
|
+
|
|
19
21
|
# Troubleshooting: [Clear Problem Title]
|
|
20
22
|
|
|
21
23
|
## Problem
|
|
@@ -33,7 +35,7 @@ tags: [keyword1, keyword2, keyword3] # include "spike" when this doc originated
|
|
|
33
35
|
- [Observable symptom 2 - error messages, visual issues, unexpected behavior]
|
|
34
36
|
- [Continue as needed - be specific]
|
|
35
37
|
|
|
36
|
-
## What Didn't Work
|
|
38
|
+
## What Didn't Work (optional for implementation insights)
|
|
37
39
|
|
|
38
40
|
**Attempted Solution 1:** [Description of what was tried]
|
|
39
41
|
- **Why it failed:** [Technical reason this didn't solve the problem]
|
|
@@ -8,7 +8,7 @@ If present, `.agents/skills/compound-docs/schema.project.yaml` acts as an option
|
|
|
8
8
|
|
|
9
9
|
- **module** (string): Module name (e.g., "EmailProcessing") or "System" for system-wide issues
|
|
10
10
|
- **date** (string): ISO 8601 date (YYYY-MM-DD)
|
|
11
|
-
- **problem_type** (enum): One of [build_error, test_failure, runtime_error, performance_issue, database_issue, security_issue, ui_bug, integration_issue, logic_error, developer_experience, workflow_issue, best_practice, documentation_gap]
|
|
11
|
+
- **problem_type** (enum): One of [build_error, test_failure, runtime_error, performance_issue, database_issue, security_issue, ui_bug, integration_issue, logic_error, developer_experience, workflow_issue, best_practice, documentation_gap]. Use `best_practice`, `developer_experience`, or `workflow_issue` for implementation insights (patterns from feature work).
|
|
12
12
|
- **component** (string): Free text. Prefer stable slugs like [backend, frontend, database, infra, ci, auth, api, docs, tooling]
|
|
13
13
|
- **symptoms** (array): 1-5 specific observable symptoms
|
|
14
14
|
- **root_cause** (string): Free text. Describe the actual cause (not a symptom). Prefer stable slugs when possible.
|
package/src/AGENTS.md
CHANGED
|
@@ -197,7 +197,7 @@ Maintenance:
|
|
|
197
197
|
| `brainstorming` | You need structured idea exploration and clarification without writing code. |
|
|
198
198
|
| `document-review` | You need to review a document/spec and extract issues, gaps, and concrete next actions. |
|
|
199
199
|
| `technical-review` | A plan or feature approach has passed document review and must be checked for technical correctness before build. |
|
|
200
|
-
| `compound-docs` | A
|
|
200
|
+
| `compound-docs` | A durable learning (solved problem or implementation insight) should be captured as institutional knowledge. |
|
|
201
201
|
| `file-todos` | You need a file-backed todo workflow for iterative multi-step changes. |
|
|
202
202
|
| `agent-browser` | You need to inspect available agents/skills and route deterministically. |
|
|
203
203
|
| `git-worktree` | You need isolated parallel work (review/feature) using git worktrees. |
|