continuous-improvement 3.8.0 → 3.9.2

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.
Files changed (96) hide show
  1. package/.claude-plugin/marketplace.json +2 -14
  2. package/CHANGELOG.md +25 -0
  3. package/LICENSE +21 -21
  4. package/QUICKSTART.md +148 -101
  5. package/README.md +50 -18
  6. package/action.yml +33 -33
  7. package/bin/analyze.sh +161 -161
  8. package/bin/backfill.mjs +19 -19
  9. package/bin/check-doc-runtime-claims.mjs +120 -0
  10. package/bin/generate-plugin-manifests.mjs +2 -0
  11. package/bin/hook-stats.mjs +21 -21
  12. package/bin/install.mjs +51 -44
  13. package/bin/mcp-server.mjs +43 -40
  14. package/bin/refresh-third-party.mjs +416 -416
  15. package/commands/continuous-improvement.md +115 -115
  16. package/commands/dashboard.md +56 -56
  17. package/commands/discipline.md +51 -51
  18. package/commands/proceed-with-the-recommendation.md +62 -62
  19. package/commands/seven-laws.md +16 -16
  20. package/commands/superpowers.md +119 -92
  21. package/commands/workspace-surface-audit.md +77 -77
  22. package/hooks/gateguard.mjs +172 -0
  23. package/hooks/observe.sh +172 -172
  24. package/hooks/session.sh +106 -106
  25. package/hooks/three-section-close.mjs +181 -181
  26. package/instinct-packs/go.json +58 -58
  27. package/instinct-packs/meta.json +16 -16
  28. package/instinct-packs/python.json +58 -58
  29. package/instinct-packs/react.json +58 -58
  30. package/lib/gateguard-state.mjs +85 -0
  31. package/lib/plugin-metadata.mjs +25 -18
  32. package/llms.txt +68 -68
  33. package/package.json +3 -2
  34. package/plugins/beginner.json +1 -1
  35. package/plugins/continuous-improvement/.claude-plugin/marketplace.json +1 -1
  36. package/plugins/continuous-improvement/.claude-plugin/plugin.json +1 -1
  37. package/plugins/continuous-improvement/LICENSE +21 -21
  38. package/plugins/continuous-improvement/README.md +1 -0
  39. package/plugins/continuous-improvement/agents/README.md +120 -0
  40. package/plugins/continuous-improvement/agents/code-reviewer.md +97 -0
  41. package/plugins/continuous-improvement/agents/security-auditor.md +101 -0
  42. package/plugins/continuous-improvement/agents/test-engineer.md +95 -0
  43. package/plugins/continuous-improvement/bin/backfill.mjs +19 -19
  44. package/plugins/continuous-improvement/bin/mcp-server.mjs +43 -40
  45. package/plugins/continuous-improvement/commands/continuous-improvement.md +115 -115
  46. package/plugins/continuous-improvement/commands/dashboard.md +56 -56
  47. package/plugins/continuous-improvement/commands/discipline.md +51 -51
  48. package/plugins/continuous-improvement/commands/proceed-with-the-recommendation.md +62 -62
  49. package/plugins/continuous-improvement/commands/seven-laws.md +16 -16
  50. package/plugins/continuous-improvement/commands/superpowers.md +119 -92
  51. package/plugins/continuous-improvement/commands/workspace-surface-audit.md +77 -77
  52. package/plugins/continuous-improvement/hooks/gateguard.mjs +172 -0
  53. package/plugins/continuous-improvement/hooks/hooks.json +6 -1
  54. package/plugins/continuous-improvement/hooks/observe.sh +172 -172
  55. package/plugins/continuous-improvement/hooks/session.sh +106 -106
  56. package/plugins/continuous-improvement/hooks/three-section-close.mjs +181 -181
  57. package/plugins/continuous-improvement/instinct-packs/go.json +58 -58
  58. package/plugins/continuous-improvement/instinct-packs/meta.json +16 -16
  59. package/plugins/continuous-improvement/instinct-packs/python.json +58 -58
  60. package/plugins/continuous-improvement/instinct-packs/react.json +58 -58
  61. package/plugins/continuous-improvement/lib/plugin-metadata.mjs +25 -18
  62. package/plugins/continuous-improvement/skills/README.md +4 -1
  63. package/plugins/continuous-improvement/skills/deploy-receipt/SKILL.md +47 -0
  64. package/plugins/continuous-improvement/skills/gateguard/SKILL.md +17 -9
  65. package/plugins/continuous-improvement/skills/para-memory-files/SKILL.md +108 -108
  66. package/plugins/continuous-improvement/skills/proceed-with-the-recommendation/SKILL.md +1 -8
  67. package/plugins/continuous-improvement/skills/ralph/SKILL.md +221 -221
  68. package/plugins/continuous-improvement/skills/recovery-classification/SKILL.md +73 -0
  69. package/plugins/continuous-improvement/skills/safety-guard/SKILL.md +76 -76
  70. package/plugins/continuous-improvement/skills/state-reconciliation/SKILL.md +63 -0
  71. package/plugins/continuous-improvement/skills/strategic-compact/SKILL.md +104 -104
  72. package/plugins/continuous-improvement/skills/superpowers/SKILL.md +22 -15
  73. package/plugins/continuous-improvement/skills/tdd-workflow/SKILL.md +411 -411
  74. package/plugins/continuous-improvement/skills/token-budget-advisor/SKILL.md +136 -136
  75. package/plugins/continuous-improvement/skills/verification-loop/SKILL.md +32 -0
  76. package/plugins/continuous-improvement/skills/wild-risa-balance/SKILL.md +191 -191
  77. package/plugins/continuous-improvement/skills/worktree-safety/SKILL.md +66 -0
  78. package/plugins/expert.json +1 -1
  79. package/skills/README.md +79 -79
  80. package/skills/deploy-receipt.md +47 -0
  81. package/skills/gateguard.md +17 -9
  82. package/skills/para-memory-files.md +108 -108
  83. package/skills/proceed-with-the-recommendation.md +1 -8
  84. package/skills/ralph.md +221 -221
  85. package/skills/recovery-classification.md +73 -0
  86. package/skills/safety-guard.md +76 -76
  87. package/skills/state-reconciliation.md +63 -0
  88. package/skills/strategic-compact.md +104 -104
  89. package/skills/superpowers.md +22 -15
  90. package/skills/tdd-workflow.md +411 -411
  91. package/skills/token-budget-advisor.md +136 -136
  92. package/skills/verification-loop.md +32 -0
  93. package/skills/wild-risa-balance.md +191 -191
  94. package/skills/worktree-safety.md +66 -0
  95. package/templates/insights-claude-md.md +91 -0
  96. package/templates/verify-ladder.example.json +37 -24
package/bin/install.mjs CHANGED
@@ -21,11 +21,18 @@ const SKILL_NAME = "continuous-improvement";
21
21
  const REPO_ROOT = join(__dirname, "..");
22
22
  const COMMAND_FILES = [
23
23
  "continuous-improvement.md",
24
- "planning-with-files.md",
25
- "proceed-with-the-recommendation.md",
26
- "discipline.md",
27
24
  "dashboard.md",
25
+ "discipline.md",
26
+ "harvest.md",
28
27
  "learn-eval.md",
28
+ "planning-with-files.md",
29
+ "proceed-with-the-recommendation.md",
30
+ "ralph.md",
31
+ "release-train.md",
32
+ "seven-laws.md",
33
+ "superpowers.md",
34
+ "swarm.md",
35
+ "workspace-surface-audit.md",
29
36
  ];
30
37
  const HOOK_TYPES = ["PreToolUse", "PostToolUse"];
31
38
  const SESSION_HOOK_TYPES = ["SessionStart", "SessionEnd"];
@@ -325,32 +332,32 @@ function uninstallAll() {
325
332
  " To remove learned data too: rm -rf ~/.claude/instincts/\n");
326
333
  }
327
334
  function printUsage() {
328
- console.log(`
329
- Usage: npx continuous-improvement <subcommand> [options]
330
-
331
- Subcommands:
332
- install Install the plugin (default subcommand)
333
- backfill Tag legacy thin-schema rows in observations.jsonl files
334
- --uninstall Remove all installed files
335
-
336
- Options for 'install':
337
- --mode <mode> Installation mode:
338
- beginner — hooks + skill + commands (default)
339
- expert — beginner + MCP server + session hooks
340
- --pack <name> Load a starter instinct pack (react, python, go, meta)
341
- --help Show this help
342
-
343
- Options for 'backfill':
344
- --dry-run Report counts only, no file writes
345
- --help Show backfill-specific help
346
-
347
- Examples:
348
- npx continuous-improvement install # beginner (default)
349
- npx continuous-improvement install --mode expert # full power
350
- npx continuous-improvement install --pack react # load React instincts
351
- npx continuous-improvement backfill --dry-run # report thin/rich row counts
352
- npx continuous-improvement backfill # tag rows in place
353
- npx continuous-improvement install --uninstall # remove everything
335
+ console.log(`
336
+ Usage: npx continuous-improvement <subcommand> [options]
337
+
338
+ Subcommands:
339
+ install Install the plugin (default subcommand)
340
+ backfill Tag legacy thin-schema rows in observations.jsonl files
341
+ --uninstall Remove all installed files
342
+
343
+ Options for 'install':
344
+ --mode <mode> Installation mode:
345
+ beginner — hooks + skill + commands (default)
346
+ expert — beginner + MCP server + session hooks
347
+ --pack <name> Load a starter instinct pack (react, python, go, meta)
348
+ --help Show this help
349
+
350
+ Options for 'backfill':
351
+ --dry-run Report counts only, no file writes
352
+ --help Show backfill-specific help
353
+
354
+ Examples:
355
+ npx continuous-improvement install # beginner (default)
356
+ npx continuous-improvement install --mode expert # full power
357
+ npx continuous-improvement install --pack react # load React instincts
358
+ npx continuous-improvement backfill --dry-run # report thin/rich row counts
359
+ npx continuous-improvement backfill # tag rows in place
360
+ npx continuous-improvement install --uninstall # remove everything
354
361
  `);
355
362
  }
356
363
  function getProjectHashSync() {
@@ -392,9 +399,9 @@ if (args.includes("--uninstall")) {
392
399
  uninstallAll();
393
400
  process.exit(0);
394
401
  }
395
- console.log(`
396
- continuous-improvement (mode: ${INSTALL_MODE})
397
- Research → Plan → Execute → Verify → Reflect → Learn → Iterate
402
+ console.log(`
403
+ continuous-improvement (mode: ${INSTALL_MODE})
404
+ Research → Plan → Execute → Verify → Reflect → Learn → Iterate
398
405
  `);
399
406
  console.log("Installing to Claude Code...\n");
400
407
  const installed = installSkill() ? 1 : 0;
@@ -444,16 +451,16 @@ if (packIndex !== -1 && rawArgs[packIndex + 1]) {
444
451
  console.error(` ✗ Unknown pack: ${packName}. Available: ${available.join(", ")}`);
445
452
  }
446
453
  }
447
- console.log(`
448
- ${installed === 1 ? "Done." : "Failed."}
449
- ${modeInfo[INSTALL_MODE]}
450
-
451
- Next steps:
452
- 1. Start a new Claude Code session
453
- 2. Say: "Use the continuous-improvement framework to [your task]"
454
- 3. If a task needs persistent planning, run: /planning-with-files
455
- 4. After your first task, run: /continuous-improvement
456
- 5. Try: /discipline for quick reference, /dashboard for instinct health
457
- ${INSTALL_MODE === "expert" ? "\nMCP tools available: ci_status, ci_instincts, ci_reflect, ci_reinforce,\n ci_create_instinct, ci_observations, ci_export, ci_import, ci_plan_init,\n ci_plan_status, ci_dashboard, ci_load_pack" : ""}
458
- Available instinct packs: npx continuous-improvement install --pack react|python|go|meta
454
+ console.log(`
455
+ ${installed === 1 ? "Done." : "Failed."}
456
+ ${modeInfo[INSTALL_MODE]}
457
+
458
+ Next steps:
459
+ 1. Start a new Claude Code session
460
+ 2. Say: "Use the continuous-improvement framework to [your task]"
461
+ 3. If a task needs persistent planning, run: /planning-with-files
462
+ 4. After your first task, run: /continuous-improvement
463
+ 5. Try: /discipline for quick reference, /dashboard for instinct health
464
+ ${INSTALL_MODE === "expert" ? "\nMCP tools available: ci_status, ci_instincts, ci_reflect, ci_reinforce,\n ci_create_instinct, ci_observations, ci_export, ci_import, ci_plan_init,\n ci_plan_status, ci_dashboard, ci_load_pack" : ""}
465
+ Available instinct packs: npx continuous-improvement install --pack react|python|go|meta
459
466
  `);
@@ -284,29 +284,29 @@ function formatPhaseChecklist(phases) {
284
284
  return phases.map((phase) => `- [ ] ${phase}`).join("\n");
285
285
  }
286
286
  function renderTaskPlan(goal, phases) {
287
- const fallback = `# Task Plan
288
-
289
- ## Goal
290
- {{goal}}
291
-
292
- ## Status
293
- {{status}}
294
-
295
- ## Phases
296
- {{phases}}
297
-
298
- ## Key Questions
299
- - [ ] What existing implementation or context should be reviewed first?
300
- - [ ] What constraints or risks need validation before execution?
301
- - [ ] What verification proves the task is complete?
302
-
303
- ## Decisions Made
304
- - None yet.
305
-
306
- ## Errors Encountered
307
- | Error | Attempt | Resolution |
308
- | --- | --- | --- |
309
- | None yet | - | - |
287
+ const fallback = `# Task Plan
288
+
289
+ ## Goal
290
+ {{goal}}
291
+
292
+ ## Status
293
+ {{status}}
294
+
295
+ ## Phases
296
+ {{phases}}
297
+
298
+ ## Key Questions
299
+ - [ ] What existing implementation or context should be reviewed first?
300
+ - [ ] What constraints or risks need validation before execution?
301
+ - [ ] What verification proves the task is complete?
302
+
303
+ ## Decisions Made
304
+ - None yet.
305
+
306
+ ## Errors Encountered
307
+ | Error | Attempt | Resolution |
308
+ | --- | --- | --- |
309
+ | None yet | - | - |
310
310
  `;
311
311
  let template = readPlanningTemplate(PLANNING_FILES.taskPlan, fallback);
312
312
  template = replaceTemplateToken(template, "goal", goal);
@@ -316,27 +316,27 @@ function renderTaskPlan(goal, phases) {
316
316
  return template.endsWith("\n") ? template : `${template}\n`;
317
317
  }
318
318
  function renderFindings() {
319
- const fallback = `# Findings
320
-
321
- ## Research Notes
322
- - Created on {{date}}.
323
- - Record source links, code references, and synthesized findings here.
324
-
325
- ## Sources
326
- - Add links and short summaries here.
319
+ const fallback = `# Findings
320
+
321
+ ## Research Notes
322
+ - Created on {{date}}.
323
+ - Record source links, code references, and synthesized findings here.
324
+
325
+ ## Sources
326
+ - Add links and short summaries here.
327
327
  `;
328
328
  let template = readPlanningTemplate(PLANNING_FILES.findings, fallback);
329
329
  template = replaceTemplateToken(template, "date", getToday());
330
330
  return template.endsWith("\n") ? template : `${template}\n`;
331
331
  }
332
332
  function renderProgress() {
333
- const fallback = `# Progress
334
-
335
- ## Session Log
336
- - {{date}}: Initialized planning files.
337
-
338
- ## Verification Notes
339
- - Record commands, tests, outputs, and checkpoints here.
333
+ const fallback = `# Progress
334
+
335
+ ## Session Log
336
+ - {{date}}: Initialized planning files.
337
+
338
+ ## Verification Notes
339
+ - Record commands, tests, outputs, and checkpoints here.
340
340
  `;
341
341
  let template = readPlanningTemplate(PLANNING_FILES.progress, fallback);
342
342
  template = replaceTemplateToken(template, "date", getToday());
@@ -787,8 +787,11 @@ rl.on("line", (line) => {
787
787
  }
788
788
  });
789
789
  function send(response) {
790
- const json = JSON.stringify(response);
791
- process.stdout.write(`Content-Length: ${Buffer.byteLength(json)}\r\n\r\n${json}`);
790
+ // MCP stdio transport spec: newline-delimited JSON-RPC over stdout, no
791
+ // Content-Length headers. Claude Code and every @modelcontextprotocol/sdk
792
+ // host parse stdout line-by-line; LSP-style framing produces a silent
793
+ // "Connecting…" hang because no line ever resolves to JSON.
794
+ process.stdout.write(`${JSON.stringify(response)}\n`);
792
795
  }
793
796
  function handleMessage(message) {
794
797
  const id = message.id;