compound-workflow 0.1.1 → 0.1.3
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/.cursor-plugin/plugin.json +1 -12
- package/README.md +6 -0
- package/package.json +1 -22
- package/scripts/install-cli.mjs +35 -2
- 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
|
@@ -1,12 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "compound-workflow",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"description": "Clarify → plan → execute → verify → capture workflow: commands, skills, and agents for Cursor, Claude, and OpenCode",
|
|
5
|
-
"author": { "name": "Compound Workflow" },
|
|
6
|
-
"keywords": ["workflow", "cursor", "claude", "opencode", "agents", "planning"],
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"repository": { "type": "git", "url": "https://github.com/your-org/compound-workflow" },
|
|
9
|
-
"skills": "src/.agents/skills",
|
|
10
|
-
"agents": "src/.agents/agents",
|
|
11
|
-
"commands": "src/.agents/commands"
|
|
12
|
-
}
|
|
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/your-org/compound-workflow"},"agents":"src/.agents/agents","commands":"src/.agents/commands"}
|
package/README.md
CHANGED
|
@@ -143,6 +143,12 @@ Full “when to use what” and reference standards: [src/AGENTS.md](src/AGENTS.
|
|
|
143
143
|
|
|
144
144
|
---
|
|
145
145
|
|
|
146
|
+
## Troubleshooting
|
|
147
|
+
|
|
148
|
+
**Skills not showing?** Cursor discovers skills from the default `skills/` directory at the plugin root. OpenCode discovers them via the `.agents/compound-workflow-skills` symlink that Install creates (and `opencode.json` `skills.paths`). Run Install from the project root (`npx compound-workflow install`). If skills still don’t appear, check your Cursor/OpenCode version and any `permission.skill` settings that might hide or deny them.
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
146
152
|
## Configuration and optional bits
|
|
147
153
|
|
|
148
154
|
**Repo configuration:** Commands read a **Repo Config Block** (YAML) in `AGENTS.md` for `default_branch`, `dev_server_url`, `test_command`, etc. Run **`/install`** once; then edit `AGENTS.md` to set the Repo Config Block.
|
package/package.json
CHANGED
|
@@ -1,22 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "compound-workflow",
|
|
3
|
-
"version": "0.1.1",
|
|
4
|
-
"description": "Clarify → plan → execute → verify → capture. One Install action for Cursor, Claude, and OpenCode.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"repository": {
|
|
7
|
-
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/your-org/compound-workflow.git"
|
|
9
|
-
},
|
|
10
|
-
"bin": {
|
|
11
|
-
"compound-workflow": "scripts/install-cli.mjs"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"src",
|
|
15
|
-
"scripts",
|
|
16
|
-
".cursor-plugin",
|
|
17
|
-
".claude-plugin"
|
|
18
|
-
],
|
|
19
|
-
"engines": {
|
|
20
|
-
"node": ">=18"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
1
|
+
{"name":"compound-workflow","version":"0.1.3","description":"Clarify → plan → execute → verify → capture. One Install action for Cursor, Claude, and OpenCode.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/your-org/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
|
@@ -175,6 +175,39 @@ function readJsonMaybe(fileAbs) {
|
|
|
175
175
|
return JSON.parse(stripJsonc(raw));
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
+
const SKILLS_SYMLINK_PATH = ".agents/compound-workflow-skills";
|
|
179
|
+
|
|
180
|
+
function ensureSkillsSymlink(targetRoot, dryRun) {
|
|
181
|
+
const agentsDir = path.join(targetRoot, ".agents");
|
|
182
|
+
const linkPath = path.join(agentsDir, "compound-workflow-skills");
|
|
183
|
+
const targetRel = path.join("..", "node_modules", "compound-workflow", "src", ".agents", "skills");
|
|
184
|
+
|
|
185
|
+
if (dryRun) {
|
|
186
|
+
console.log("[dry-run] Would create", SKILLS_SYMLINK_PATH, "symlink");
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
if (!fs.existsSync(agentsDir)) fs.mkdirSync(agentsDir, { recursive: true });
|
|
191
|
+
|
|
192
|
+
let needCreate = true;
|
|
193
|
+
try {
|
|
194
|
+
const stat = fs.lstatSync(linkPath);
|
|
195
|
+
if (stat.isSymbolicLink()) {
|
|
196
|
+
fs.realpathSync(linkPath);
|
|
197
|
+
needCreate = false;
|
|
198
|
+
}
|
|
199
|
+
} catch (_) {}
|
|
200
|
+
|
|
201
|
+
if (needCreate) {
|
|
202
|
+
try {
|
|
203
|
+
fs.unlinkSync(linkPath);
|
|
204
|
+
} catch (_) {}
|
|
205
|
+
const type = process.platform === "win32" ? "dir" : "dir";
|
|
206
|
+
fs.symlinkSync(targetRel, linkPath, type);
|
|
207
|
+
console.log("Created", SKILLS_SYMLINK_PATH, "-> package skills");
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
178
211
|
function writeOpenCodeJson(targetRoot, dryRun) {
|
|
179
212
|
const opencodeAbs = path.join(targetRoot, "opencode.json");
|
|
180
213
|
const existing = readJsonMaybe(opencodeAbs) ?? {};
|
|
@@ -182,9 +215,8 @@ function writeOpenCodeJson(targetRoot, dryRun) {
|
|
|
182
215
|
|
|
183
216
|
next.$schema = next.$schema || "https://opencode.ai/config.json";
|
|
184
217
|
next.skills = ensureObject(next.skills);
|
|
185
|
-
const skillsPath = `${PKG_PREFIX}/src/.agents/skills`;
|
|
186
218
|
if (!Array.isArray(next.skills.paths)) next.skills.paths = [];
|
|
187
|
-
if (!next.skills.paths.includes(
|
|
219
|
+
if (!next.skills.paths.includes(SKILLS_SYMLINK_PATH)) next.skills.paths.unshift(SKILLS_SYMLINK_PATH);
|
|
188
220
|
next.command = ensureObject(next.command);
|
|
189
221
|
next.agent = ensureObject(next.agent);
|
|
190
222
|
|
|
@@ -300,6 +332,7 @@ function main() {
|
|
|
300
332
|
console.log("Package root:", packageRoot);
|
|
301
333
|
|
|
302
334
|
writeOpenCodeJson(targetRoot, args.dryRun);
|
|
335
|
+
ensureSkillsSymlink(targetRoot, args.dryRun);
|
|
303
336
|
writeAgentsMd(targetRoot, args.dryRun);
|
|
304
337
|
ensureDirs(targetRoot, args.dryRun);
|
|
305
338
|
|
|
@@ -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. |
|