compound-workflow 0.1.3 → 0.1.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.
@@ -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/your-org/compound-workflow",
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/your-org/compound-workflow"},"agents":"src/.agents/agents","commands":"src/.agents/commands"}
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/Claude:** load via plugin. **OpenCode:** install the npm package and run Install once.
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
- **One action:** In your project (with compound-workflow as a dependency), run **Install**—either the `/install` command in Cursor/Claude or:
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
- Optional: `--dry-run` (preview), `--root /path/to/project`, `--no-config` (skip Repo Config Block reminder).
24
+ **2. Choose how you use it:**
25
25
 
26
- Install writes `opencode.json` (OpenCode loads from the package), merges `AGENTS.md` (preserves your Repo Config Block), creates standard dirs, and reminds you to set the Repo Config Block in `AGENTS.md` if needed. No copy; Cursor/Claude use the plugin; OpenCode reads from `node_modules/compound-workflow`.
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
- **Cursor / Claude:** Add the compound-workflow plugin (from this repo or marketplace). Then in any repo you can run `/install` or use the CLI above.
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 / Claude (plugin):** Update via the editor’s plugin/marketplace (check for updates or reinstall). If installed from repo, pull latest and reload the plugin. No per-project step; the plugin loads commands/skills from its installed source.
39
- - **OpenCode / npm:** Run `npm update compound-workflow` (or bump the version in `package.json` and `npm install`), then run **Install** again: `/install` or `npx compound-workflow install`. This refreshes `opencode.json`, merges the latest `AGENTS.md` template, and ensures dirs exist; Repo Config Block is preserved.
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
 
@@ -46,7 +52,7 @@ Clarify what to build → plan how (fidelity + confidence) → execute via todos
46
52
 
47
53
  ```mermaid
48
54
  flowchart LR
49
- A[brainstorm] --> B[plan] --> C[work] --> D[triage] --> E[review] --> F[compound] --> G[metrics]
55
+ A["brainstorm"] --> B["plan"] --> C["work"] --> D["triage"] --> E["review"] --> F["capture"] --> G["metrics"]
50
56
  ```
51
57
 
52
58
  ---
@@ -97,7 +103,7 @@ flowchart LR
97
103
 
98
104
  ## Command reference
99
105
 
100
- **Onboarding:** `/install` — one action: writes opencode.json, merges AGENTS.md, creates dirs, preserves Repo Config Block. 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).
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 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.
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.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"}}
1
+ {"name":"compound-workflow","version":"0.1.5","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"}}
@@ -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