compound-workflow 0.1.6 → 0.1.7
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/README.md +4 -4
- package/package.json +1 -1
- package/scripts/install-cli.mjs +66 -11
package/README.md
CHANGED
|
@@ -23,11 +23,11 @@ npx compound-workflow install
|
|
|
23
23
|
|
|
24
24
|
**2. Choose how you use it:**
|
|
25
25
|
|
|
26
|
-
- **Cursor:** If your project already has a `.cursor` directory, Install will create
|
|
26
|
+
- **Cursor:** If your project already has a `.cursor` directory, Install will create the correct structure: one symlink per skill under `.cursor/skills/`, plus `.cursor/agents`, `.cursor/commands`, and `.cursor/references` (each symlinked to the package). No plugin needed. Use the plugin from this repo if you need a different loading method.
|
|
27
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
28
|
- **Claude:** Add the compound-workflow plugin from this repo. In any repo, run `/install` or the CLI above.
|
|
29
29
|
|
|
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
|
|
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 `.cursor/skills/<skill>`, `.cursor/agents`, `.cursor/commands`, and `.cursor/references` (symlinks into the package). All paths reference `node_modules/compound-workflow`; no file copying.
|
|
31
31
|
|
|
32
32
|
**CLI options:** `--dry-run` (preview), `--root /path/to/project`, `--no-config` (skip Repo Config Block reminder).
|
|
33
33
|
|
|
@@ -40,7 +40,7 @@ To update to a new release, see [Updating compound-workflow](#updating-compound-
|
|
|
40
40
|
## Updating compound-workflow
|
|
41
41
|
|
|
42
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/
|
|
43
|
+
- **Cursor (npm + .cursor):** Run `npm update compound-workflow`, then run **Install** again (`npx compound-workflow install`) to refresh the `.cursor/skills`, `.cursor/agents`, `.cursor/commands`, and `.cursor/references` symlinks and AGENTS.md.
|
|
44
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
45
|
- **Claude (plugin):** Update via the editor’s plugin; if from repo, pull latest and reload.
|
|
46
46
|
|
|
@@ -151,7 +151,7 @@ Full “when to use what” and reference standards: [src/AGENTS.md](src/AGENTS.
|
|
|
151
151
|
|
|
152
152
|
## Troubleshooting
|
|
153
153
|
|
|
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
|
|
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 the full structure (`.cursor/skills/<skill>`, `.cursor/agents`, `.cursor/commands`, `.cursor/references`). If skills still don’t appear, check Cursor Settings → Rules and any `permission.skill` settings.
|
|
155
155
|
|
|
156
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`).
|
|
157
157
|
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"compound-workflow","version":"0.1.
|
|
1
|
+
{"name":"compound-workflow","version":"0.1.7","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,23 +208,20 @@ function ensureSkillsSymlink(targetRoot, dryRun) {
|
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
function ensureCursorSkills(targetRoot, dryRun) {
|
|
211
|
+
function ensureCursorDirSymlink(targetRoot, cursorSubdir, pkgSubdir, dryRun, label) {
|
|
214
212
|
const cursorDir = path.join(targetRoot, ".cursor");
|
|
215
213
|
if (!fs.existsSync(cursorDir)) return;
|
|
214
|
+
const pkgPath = path.join(packageRoot, "src", ".agents", pkgSubdir);
|
|
215
|
+
if (!fs.existsSync(pkgPath)) return;
|
|
216
216
|
|
|
217
|
-
const
|
|
218
|
-
const
|
|
219
|
-
const targetRel = path.join("..", "..", "node_modules", "compound-workflow", "src", ".agents", "skills");
|
|
217
|
+
const linkPath = path.join(cursorDir, cursorSubdir);
|
|
218
|
+
const targetRel = path.join("..", "node_modules", "compound-workflow", "src", ".agents", pkgSubdir);
|
|
220
219
|
|
|
221
220
|
if (dryRun) {
|
|
222
|
-
console.log("[dry-run] Would create"
|
|
221
|
+
console.log("[dry-run] Would create .cursor/" + cursorSubdir, "symlink (Cursor)");
|
|
223
222
|
return;
|
|
224
223
|
}
|
|
225
224
|
|
|
226
|
-
if (!fs.existsSync(skillsDir)) fs.mkdirSync(skillsDir, { recursive: true });
|
|
227
|
-
|
|
228
225
|
let needCreate = true;
|
|
229
226
|
try {
|
|
230
227
|
const stat = fs.lstatSync(linkPath);
|
|
@@ -240,8 +237,66 @@ function ensureCursorSkills(targetRoot, dryRun) {
|
|
|
240
237
|
} catch (_) {}
|
|
241
238
|
const type = process.platform === "win32" ? "dir" : "dir";
|
|
242
239
|
fs.symlinkSync(targetRel, linkPath, type);
|
|
243
|
-
console.log("Created",
|
|
240
|
+
console.log("Created", ".cursor/" + cursorSubdir, "->", label || pkgSubdir, "(Cursor)");
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function ensureCursorSkills(targetRoot, dryRun) {
|
|
245
|
+
const cursorDir = path.join(targetRoot, ".cursor");
|
|
246
|
+
if (!fs.existsSync(cursorDir)) return;
|
|
247
|
+
|
|
248
|
+
const packageSkillsDir = path.join(packageRoot, "src", ".agents", "skills");
|
|
249
|
+
if (!fs.existsSync(packageSkillsDir)) return;
|
|
250
|
+
|
|
251
|
+
const skillNames = [];
|
|
252
|
+
try {
|
|
253
|
+
for (const name of fs.readdirSync(packageSkillsDir)) {
|
|
254
|
+
const skillPath = path.join(packageSkillsDir, name);
|
|
255
|
+
if (fs.statSync(skillPath).isDirectory() && fs.existsSync(path.join(skillPath, "SKILL.md"))) {
|
|
256
|
+
skillNames.push(name);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
} catch (_) {
|
|
260
|
+
return;
|
|
244
261
|
}
|
|
262
|
+
|
|
263
|
+
const skillsDir = path.join(cursorDir, "skills");
|
|
264
|
+
const type = process.platform === "win32" ? "dir" : "dir";
|
|
265
|
+
|
|
266
|
+
if (dryRun) {
|
|
267
|
+
console.log("[dry-run] Would create .cursor/skills/<skill> symlinks for:", skillNames.join(", "));
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
if (!fs.existsSync(skillsDir)) fs.mkdirSync(skillsDir, { recursive: true });
|
|
272
|
+
|
|
273
|
+
for (const name of skillNames) {
|
|
274
|
+
const linkPath = path.join(skillsDir, name);
|
|
275
|
+
const targetRel = path.join("..", "..", "..", "node_modules", "compound-workflow", "src", ".agents", "skills", name);
|
|
276
|
+
let needCreate = true;
|
|
277
|
+
try {
|
|
278
|
+
const stat = fs.lstatSync(linkPath);
|
|
279
|
+
if (stat.isSymbolicLink()) {
|
|
280
|
+
fs.realpathSync(linkPath);
|
|
281
|
+
needCreate = false;
|
|
282
|
+
}
|
|
283
|
+
} catch (_) {}
|
|
284
|
+
|
|
285
|
+
if (needCreate) {
|
|
286
|
+
try {
|
|
287
|
+
fs.unlinkSync(linkPath);
|
|
288
|
+
} catch (_) {}
|
|
289
|
+
fs.symlinkSync(targetRel, linkPath, type);
|
|
290
|
+
console.log("Created", ".cursor/skills/" + name, "-> package skill (Cursor)");
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
function ensureCursorIntegration(targetRoot, dryRun) {
|
|
296
|
+
ensureCursorSkills(targetRoot, dryRun);
|
|
297
|
+
ensureCursorDirSymlink(targetRoot, "agents", "agents", dryRun, "package agents");
|
|
298
|
+
ensureCursorDirSymlink(targetRoot, "commands", "commands", dryRun, "package commands");
|
|
299
|
+
ensureCursorDirSymlink(targetRoot, "references", "references", dryRun, "package references");
|
|
245
300
|
}
|
|
246
301
|
|
|
247
302
|
function writeOpenCodeJson(targetRoot, dryRun) {
|
|
@@ -369,7 +424,7 @@ function main() {
|
|
|
369
424
|
|
|
370
425
|
writeOpenCodeJson(targetRoot, args.dryRun);
|
|
371
426
|
ensureSkillsSymlink(targetRoot, args.dryRun);
|
|
372
|
-
|
|
427
|
+
ensureCursorIntegration(targetRoot, args.dryRun);
|
|
373
428
|
writeAgentsMd(targetRoot, args.dryRun);
|
|
374
429
|
ensureDirs(targetRoot, args.dryRun);
|
|
375
430
|
|