compound-workflow 1.4.5 → 1.4.6

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.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "Clarify → plan → execute → verify → capture. One Install action for Cursor, Claude, and OpenCode.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -341,15 +341,27 @@ function ensureCursorSkills(targetRoot, dryRun, cursorReady) {
341
341
  return { blocked: [] };
342
342
  }
343
343
 
344
- function verifyCursorIntegration(targetRoot) {
344
+ function hasCursorPluginCommands(targetRoot) {
345
+ const pluginPath = path.join(targetRoot, ".cursor-plugin", "plugin.json");
346
+ if (!fs.existsSync(pluginPath)) return false;
347
+ try {
348
+ const parsed = JSON.parse(fs.readFileSync(pluginPath, "utf8"));
349
+ return typeof parsed?.commands === "string" && parsed.commands.trim().length > 0;
350
+ } catch {
351
+ return false;
352
+ }
353
+ }
354
+
355
+ function verifyCursorIntegration(targetRoot, options = {}) {
345
356
  const cursorDir = path.join(targetRoot, ".cursor");
346
357
  if (!fs.existsSync(cursorDir)) return [];
358
+ const skipCommands = options.skipCommands === true;
347
359
 
348
360
  const checks = [
349
361
  { name: ".cursor/agents", rel: path.join("agents") },
350
- { name: ".cursor/commands", rel: path.join("commands") },
351
362
  { name: ".cursor/references", rel: path.join("references") },
352
363
  ];
364
+ if (!skipCommands) checks.splice(1, 0, { name: ".cursor/commands", rel: path.join("commands") });
353
365
  const issues = [];
354
366
 
355
367
  for (const check of checks) {
@@ -381,10 +393,16 @@ function verifyCursorIntegration(targetRoot) {
381
393
  }
382
394
 
383
395
  const packageRoots = [
384
- { label: "commands", pkgDir: path.join(packageRoot, "src", ".agents", "commands"), cursorSubdir: "commands" },
385
396
  { label: "agents", pkgDir: path.join(packageRoot, "src", ".agents", "agents"), cursorSubdir: "agents" },
386
397
  { label: "references", pkgDir: path.join(packageRoot, "src", ".agents", "references"), cursorSubdir: "references" },
387
398
  ];
399
+ if (!skipCommands) {
400
+ packageRoots.unshift({
401
+ label: "commands",
402
+ pkgDir: path.join(packageRoot, "src", ".agents", "commands"),
403
+ cursorSubdir: "commands",
404
+ });
405
+ }
388
406
  for (const item of packageRoots) {
389
407
  if (!fs.existsSync(item.pkgDir)) continue;
390
408
  const pkgFiles = walkFiles(item.pkgDir, () => true);
@@ -408,6 +426,7 @@ function verifyCursorIntegration(targetRoot) {
408
426
  function ensureCursorIntegration(targetRoot, dryRun, forceCursor) {
409
427
  const cursorDir = path.join(targetRoot, ".cursor");
410
428
  let cursorReady = fs.existsSync(cursorDir);
429
+ const skipCommands = hasCursorPluginCommands(targetRoot);
411
430
  if (!fs.existsSync(cursorDir)) {
412
431
  if (!forceCursor) return { issues: [], status: "skipped-no-cursor" };
413
432
  if (dryRun) console.log("[dry-run] Would create .cursor directory (Cursor)");
@@ -421,9 +440,11 @@ function ensureCursorIntegration(targetRoot, dryRun, forceCursor) {
421
440
  const skillReport = ensureCursorSkills(targetRoot, dryRun, cursorReady);
422
441
  const dirReports = [
423
442
  ensureCursorDirSync(targetRoot, "agents", "agents", dryRun, "package agents", cursorReady),
424
- ensureCursorDirSync(targetRoot, "commands", "commands", dryRun, "package commands", cursorReady),
425
443
  ensureCursorDirSync(targetRoot, "references", "references", dryRun, "package references", cursorReady),
426
444
  ];
445
+ if (!skipCommands) {
446
+ dirReports.splice(1, 0, ensureCursorDirSync(targetRoot, "commands", "commands", dryRun, "package commands", cursorReady));
447
+ }
427
448
 
428
449
  const issues = [];
429
450
  if (skillReport?.blocked?.length) {
@@ -436,9 +457,9 @@ function ensureCursorIntegration(targetRoot, dryRun, forceCursor) {
436
457
  }
437
458
 
438
459
  if (!dryRun) {
439
- for (const issue of verifyCursorIntegration(targetRoot)) issues.push(issue);
460
+ for (const issue of verifyCursorIntegration(targetRoot, { skipCommands })) issues.push(issue);
440
461
  }
441
- return { issues, status: "configured" };
462
+ return { issues, status: "configured", skipCommands };
442
463
  }
443
464
 
444
465
  function writeOpenCodeJson(targetRoot, dryRun) {
@@ -595,7 +616,11 @@ function main() {
595
616
  if (cursorReport.status === "skipped-no-cursor") {
596
617
  console.log("Cursor integration: skipped (.cursor not found).");
597
618
  } else {
598
- console.log("Cursor integration: verified skills, agents, commands, and references.");
619
+ if (cursorReport.skipCommands) {
620
+ console.log("Cursor integration: verified skills, agents, references (commands supplied by .cursor-plugin).");
621
+ } else {
622
+ console.log("Cursor integration: verified skills, agents, commands, and references.");
623
+ }
599
624
  }
600
625
  writeAgentsMd(targetRoot, args.dryRun);
601
626
  ensureDirs(targetRoot, args.dryRun);