continuous-improvement 3.11.0 → 3.15.0

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 (76) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/CHANGELOG.md +65 -1
  3. package/QUICKSTART.md +1 -1
  4. package/README.md +39 -18
  5. package/SKILL.md +1 -1
  6. package/bin/check-skill-count.mjs +32 -1
  7. package/bin/check-test-imports-only.mjs +1 -1
  8. package/bin/check-tool-count.mjs +129 -0
  9. package/bin/generate-plugin-manifests.mjs +3 -1
  10. package/bin/harvest-friction.mjs +1 -1
  11. package/bin/install.mjs +77 -3
  12. package/bin/mcp-server.mjs +66 -9
  13. package/bin/plan-pack.mjs +77 -0
  14. package/bin/unified-cli.mjs +55 -410
  15. package/commands/harvest.md +1 -1
  16. package/commands/model-forward.md +13 -0
  17. package/commands/production-readiness-review.md +53 -0
  18. package/commands/ship.md +57 -0
  19. package/commands/superpowers.md +1 -1
  20. package/hooks/companion-preference.mjs +31 -19
  21. package/hooks/gateguard.mjs +59 -25
  22. package/hooks/hook-pack.mjs +110 -0
  23. package/hooks/recall-briefing.mjs +167 -0
  24. package/lib/gateguard-state.mjs +62 -13
  25. package/lib/goal-state.mjs +13 -9
  26. package/lib/hook-pack-gate.mjs +65 -0
  27. package/lib/install-targets.mjs +121 -0
  28. package/lib/plan-review-packet.mjs +96 -0
  29. package/lib/plugin-metadata.mjs +33 -7
  30. package/lib/recall-briefing.mjs +57 -0
  31. package/lib/recall-index.mjs +2 -2
  32. package/lib/skill-distill.mjs +141 -0
  33. package/llms.txt +2 -2
  34. package/package.json +6 -4
  35. package/plugins/beginner.json +3 -3
  36. package/plugins/continuous-improvement/.claude-plugin/marketplace.json +2 -2
  37. package/plugins/continuous-improvement/.claude-plugin/plugin.json +2 -2
  38. package/plugins/continuous-improvement/README.md +1 -1
  39. package/plugins/continuous-improvement/agents/README.md +3 -3
  40. package/plugins/continuous-improvement/bin/mcp-server.mjs +66 -9
  41. package/plugins/continuous-improvement/commands/harvest.md +1 -1
  42. package/plugins/continuous-improvement/commands/model-forward.md +13 -0
  43. package/plugins/continuous-improvement/commands/production-readiness-review.md +53 -0
  44. package/plugins/continuous-improvement/commands/ship.md +57 -0
  45. package/plugins/continuous-improvement/commands/superpowers.md +1 -1
  46. package/plugins/continuous-improvement/hooks/companion-preference.mjs +31 -19
  47. package/plugins/continuous-improvement/hooks/gateguard.mjs +59 -25
  48. package/plugins/continuous-improvement/hooks/hook-pack.mjs +110 -0
  49. package/plugins/continuous-improvement/hooks/hooks.json +16 -1
  50. package/plugins/continuous-improvement/hooks/recall-briefing.mjs +167 -0
  51. package/plugins/continuous-improvement/lib/gateguard-state.mjs +62 -13
  52. package/plugins/continuous-improvement/lib/goal-state.mjs +13 -9
  53. package/plugins/continuous-improvement/lib/hook-pack-gate.mjs +65 -0
  54. package/plugins/continuous-improvement/lib/plugin-metadata.mjs +33 -7
  55. package/plugins/continuous-improvement/lib/recall-briefing.mjs +57 -0
  56. package/plugins/continuous-improvement/lib/recall-index.mjs +2 -2
  57. package/plugins/continuous-improvement/lib/skill-distill.mjs +141 -0
  58. package/plugins/continuous-improvement/skills/README.md +1 -1
  59. package/plugins/continuous-improvement/skills/continuous-improvement/SKILL.md +1 -1
  60. package/plugins/continuous-improvement/skills/gateguard/SKILL.md +4 -4
  61. package/plugins/continuous-improvement/skills/goal-monitor/SKILL.md +1 -1
  62. package/plugins/continuous-improvement/skills/handoff/SKILL.md +0 -1
  63. package/plugins/continuous-improvement/skills/model-forward/SKILL.md +44 -0
  64. package/plugins/continuous-improvement/skills/superpowers/SKILL.md +1 -1
  65. package/plugins/expert.json +6 -2
  66. package/skills/README.md +4 -2
  67. package/skills/gateguard.md +4 -4
  68. package/skills/goal-monitor.md +1 -1
  69. package/skills/handoff.md +0 -1
  70. package/skills/model-forward.md +44 -0
  71. package/skills/superpowers.md +1 -1
  72. package/lib/compound-engineering.mjs +0 -831
  73. package/lib/pm-skills.mjs +0 -1274
  74. package/lib/unified-plugin.mjs +0 -924
  75. package/plugins/continuous-improvement/skills/para-memory-files/SKILL.md +0 -108
  76. package/skills/para-memory-files.md +0 -108
@@ -1,33 +1,26 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * Unified Continuous Improvement CLI.
3
+ * CLI-Anything command (`ci`).
4
4
  *
5
- * Comprehensive command-line interface for the unified plugin that combines
6
- * CLI-Anything, Compound Engineering, and PM-Skills.
5
+ * Thin front-end over the CLIAnything library: turns a repository into an
6
+ * agent-native CLI wrapper that a language model can drive.
7
+ *
8
+ * The former Compound Engineering and PM-Skills tools (and the unified-plugin
9
+ * orchestrator that combined all three) were removed in 3.13.0 - Compound
10
+ * Engineering overlapped the Mulahazah instinct engine and PM-Skills overlapped
11
+ * the out-of-band phuryn/pm-skills marketplace install. See CHANGELOG [3.13.0].
7
12
  */
8
13
  import { existsSync, readFileSync } from "node:fs";
9
14
  import { join } from "node:path";
10
- import UnifiedContinuousImprovement from "../lib/unified-plugin.mjs";
15
+ import CLIAnything from "../lib/cli-anything.mjs";
11
16
  const DEFAULT_CONFIG = {
12
17
  workspace: "./ci-workspace",
13
18
  verbose: false,
14
- defaultMode: "expert",
15
19
  };
16
20
  function getErrorMessage(error) {
17
21
  return error instanceof Error ? error.message : String(error);
18
22
  }
19
- function parseJsonOption(raw) {
20
- if (!raw)
21
- return undefined;
22
- try {
23
- return JSON.parse(raw);
24
- }
25
- catch (error) {
26
- throw new Error(`Invalid JSON option: ${getErrorMessage(error)}`);
27
- }
28
- }
29
23
  class UnifiedCLI {
30
- plugin = null;
31
24
  config;
32
25
  constructor() {
33
26
  this.config = this.loadConfig();
@@ -40,350 +33,48 @@ class UnifiedCLI {
40
33
  return { ...DEFAULT_CONFIG, ...parsed };
41
34
  }
42
35
  catch {
43
- console.warn("Warning: Invalid config file, using defaults");
36
+ console.warn("Warning: invalid config file, using defaults");
44
37
  }
45
38
  }
46
39
  return { ...DEFAULT_CONFIG };
47
40
  }
48
- initializePlugin(options) {
49
- this.plugin = new UnifiedContinuousImprovement({
50
- workspace: options.workspace ?? this.config.workspace,
51
- verbose: options.verbose ?? this.config.verbose,
52
- });
53
- return this.plugin;
54
- }
55
- requirePlugin() {
56
- if (!this.plugin) {
57
- throw new Error("CLI plugin not initialized");
58
- }
59
- return this.plugin;
60
- }
61
41
  async runCommand(command, args, options = {}) {
62
- this.initializePlugin(options);
63
42
  switch (command) {
64
- case "init":
65
- return this.handleInit(args, options);
66
- case "workflow":
67
- return this.handleWorkflow(args, options);
68
- case "research":
69
- return this.handleResearch(options);
70
- case "planning":
71
- return this.handlePlanning(options);
72
- case "execution":
73
- return this.handleExecution();
74
- case "review":
75
- return this.handleReview(options);
76
- case "status":
77
- return this.handleStatus();
78
- case "cli":
79
- return this.handleCLI(args);
80
- case "pm":
81
- return this.handlePM(args, options);
82
- case "compound":
83
- return this.handleCompound(args);
84
- case "learnings":
85
- return this.handleLearnings(args);
43
+ case "generate":
44
+ return this.handleGenerate(args, options);
45
+ case "list":
46
+ return this.handleList();
86
47
  case "config":
87
48
  return this.handleConfig(args);
88
49
  default:
89
50
  throw new Error(`Unknown command: ${command}`);
90
51
  }
91
52
  }
92
- async handleInit(args, options) {
93
- if (args.length < 2) {
94
- throw new Error("Usage: ci init <project-name> <objective> [options]");
95
- }
96
- const [name, ...objectiveParts] = args;
97
- const objective = objectiveParts.join(" ");
98
- console.log(`šŸš€ Initializing project: ${name}`);
99
- console.log(`šŸ“‹ Objective: ${objective}`);
100
- const plugin = this.requirePlugin();
101
- const result = await plugin.initializeProject({
102
- name: name,
103
- objective,
104
- product: parseJsonOption(options.product) ?? {},
105
- industry: options.industry ?? "",
106
- targetMarket: parseJsonOption(options.targetMarket) ?? {},
107
- });
108
- console.log(`āœ… Project initialized successfully!`);
109
- console.log(`šŸ†” Project ID: ${result.projectId}`);
110
- console.log(`šŸ”— Session ID: ${result.sessionId}`);
111
- console.log(`šŸ“Š PM Analysis: ${result.pmAnalysis.totalSkills} skills completed`);
112
- console.log(`\nšŸŽÆ Next steps:`);
113
- result.nextSteps.forEach((step, i) => {
114
- console.log(` ${i + 1}. ${step}`);
115
- });
116
- return result;
117
- }
118
- async handleWorkflow(args, options) {
119
- if (args.length < 2) {
120
- throw new Error("Usage: ci workflow <project-name> <objective> [options]");
53
+ async handleGenerate(args, options) {
54
+ const repoPath = args[0];
55
+ if (!repoPath) {
56
+ throw new Error("Usage: ci generate <repository-path>");
121
57
  }
122
- const [name, ...objectiveParts] = args;
123
- const objective = objectiveParts.join(" ");
124
- console.log(`šŸš€ Starting complete workflow for: ${name}`);
125
- console.log(`šŸ“‹ Objective: ${objective}`);
126
- const progressCallback = (message) => {
127
- console.log(` ā³ ${message}`);
128
- };
129
- const plugin = this.requirePlugin();
130
- const result = await plugin.executeCompleteWorkflow({
131
- name: name,
132
- objective,
133
- product: parseJsonOption(options.product) ?? {},
134
- industry: options.industry ?? "",
135
- targetMarket: parseJsonOption(options.targetMarket) ?? {},
136
- }, {
137
- researchContext: options.repo ? { repositoryPath: options.repo } : {},
138
- progressCallback,
58
+ const cliAnything = new CLIAnything({
59
+ outputDir: options.workspace ?? this.config.workspace,
60
+ verbose: options.verbose ?? this.config.verbose,
139
61
  });
140
- console.log(`šŸŽ‰ Complete workflow finished!`);
141
- console.log(`šŸ†” Project: ${result.project}`);
142
- console.log(`šŸ”— Session: ${result.sessionId}`);
143
- for (const [phase] of Object.entries(result.phases)) {
144
- console.log(`\nšŸ“Š ${phase.charAt(0).toUpperCase() + phase.slice(1)} Phase:`);
145
- }
146
- return result;
147
- }
148
- async handleResearch(options) {
149
- console.log(`šŸ” Starting research phase...`);
150
- const context = {};
151
- if (options.repo)
152
- context.repositoryPath = options.repo;
153
- if (options.context)
154
- context.additionalContext = parseJsonOption(options.context);
155
- const plugin = this.requirePlugin();
156
- const result = await plugin.executeResearchPhase(context);
157
- console.log(`āœ… Research phase completed!`);
158
- console.log(`šŸ’” Generated ${result.brainstorm.ideas.length} ideas`);
159
- console.log(`šŸ” Identified ${result.brainstorm.risks.length} risks`);
160
- if (result.cliTools) {
161
- console.log(`šŸ› ļø Generated CLI with ${result.cliTools.commands.length} commands`);
162
- }
163
- return result;
164
- }
165
- async handlePlanning(options) {
166
- console.log(`šŸ“‹ Starting planning phase...`);
167
- const preferences = parseJsonOption(options.preferences) ?? {};
168
- const plugin = this.requirePlugin();
169
- const result = await plugin.executePlanningPhase(preferences);
170
- console.log(`āœ… Planning phase completed!`);
171
- console.log(`šŸ“ˆ Created plan with ${result.corePlan.steps.length} steps`);
172
- const estimated = result.corePlan.timeline?.estimated;
173
- if (estimated)
174
- console.log(`ā±ļø Timeline: ${estimated}`);
175
- console.log(`āš ļø Identified ${result.risks.length} risks`);
176
- return result;
177
- }
178
- async handleExecution() {
179
- console.log(`šŸ”§ Starting execution phase...`);
180
- const progressCallback = (message) => {
181
- console.log(` ⚔ ${message}`);
182
- };
183
- const plugin = this.requirePlugin();
184
- const result = await plugin.executeWorkingPhase(progressCallback);
185
- console.log(`āœ… Execution phase completed!`);
186
- console.log(`šŸ“‹ Completed ${result.coreWork.steps.length} steps`);
187
- console.log(`šŸ”§ Resolved ${result.issues.length} issues`);
188
- console.log(`šŸ’” Applied ${result.solutions.length} solutions`);
189
- return result;
190
- }
191
- async handleReview(options) {
192
- console.log(`šŸ” Starting review phase...`);
193
- const criteria = parseJsonOption(options.criteria);
194
- const plugin = this.requirePlugin();
195
- const result = await plugin.executeReviewPhase(criteria);
196
- console.log(`āœ… Review phase completed!`);
197
- console.log(`šŸ“Š Overall score: ${result.coreReview.review.overallScore}/100`);
198
- console.log(`šŸ’” Generated ${result.learnings.length} learnings`);
199
- console.log(`šŸ“‹ Created ${result.recommendations.length} recommendations`);
200
- return result;
201
- }
202
- async handleStatus() {
203
- const plugin = this.requirePlugin();
204
- const status = await plugin.getProjectStatus();
205
- console.log(`šŸ“Š Project Status:`);
206
- console.log(` Project: ${status.project ?? "No active project"}`);
207
- console.log(` Session: ${status.sessionId ?? "N/A"}`);
208
- console.log(` Current Phase: ${status.currentPhase ?? "N/A"}`);
209
- if (status.progress) {
210
- console.log(` Progress: ${status.progress.completed}/${status.progress.total} (${status.progress.percentage}%)`);
211
- }
212
- if (status.nextSteps && status.nextSteps.length > 0) {
213
- console.log(`\nšŸŽÆ Next Steps:`);
214
- status.nextSteps.forEach((step, i) => {
215
- console.log(` ${i + 1}. ${step}`);
216
- });
217
- }
218
- return status;
219
- }
220
- async handleCLI(args) {
221
- const [subcommand, ...subArgs] = args;
222
- switch (subcommand) {
223
- case "generate":
224
- if (subArgs.length === 0) {
225
- throw new Error("Usage: ci cli generate <repository-path>");
226
- }
227
- return this.handleCLIGenerate(subArgs[0]);
228
- case "list":
229
- return this.handleCLIList();
230
- default:
231
- throw new Error("Usage: ci cli <generate|list> [args]");
232
- }
233
- }
234
- async handleCLIGenerate(repoPath) {
235
- console.log(`šŸ› ļø Generating CLI for: ${repoPath}`);
236
- const plugin = this.requirePlugin();
237
- const result = await plugin.cliAnything.generateCLI(repoPath);
238
- console.log(`āœ… CLI generated successfully!`);
239
- console.log(`šŸ“ Output: ${result.outputPath}`);
240
- console.log(`šŸ”§ Commands: ${result.commands.length}`);
241
- console.log(`\nšŸ“‹ Available Commands:`);
62
+ const result = await cliAnything.generateCLI(repoPath);
63
+ console.log(`Generated CLI for: ${repoPath}`);
64
+ console.log(` Output: ${result.outputPath}`);
65
+ console.log(` Commands: ${result.commands.length}`);
242
66
  for (const cmd of result.commands) {
243
- console.log(` ${cmd.name.padEnd(15)} - ${cmd.description}`);
67
+ console.log(` ${cmd.name.padEnd(15)} ${cmd.description}`);
244
68
  }
245
69
  return result;
246
70
  }
247
- handleCLIList() {
248
- console.log(`šŸ› ļø CLI Generation Tool Status: Ready`);
249
- console.log(` Repository Analysis: Supported`);
250
- console.log(` Project Types: Node.js, React, Python, Docker, and more`);
251
- console.log(` Output Format: Executable JavaScript`);
71
+ handleList() {
72
+ console.log("CLI-Anything status: ready");
73
+ console.log(" Repository analysis: supported");
74
+ console.log(" Project types: Node.js, React, Python, Docker, and more");
75
+ console.log(" Output format: executable JavaScript");
252
76
  }
253
- async handlePM(args, options) {
254
- const [subcommand, ...subArgs] = args;
255
- switch (subcommand) {
256
- case "analyze":
257
- return this.handlePMAnalyze(options);
258
- case "skill":
259
- return this.handlePMSkill(subArgs);
260
- case "list":
261
- return this.handlePMList();
262
- default:
263
- throw new Error("Usage: ci pm <analyze|skill|list> [args]");
264
- }
265
- }
266
- async handlePMAnalyze(options) {
267
- console.log(`šŸ“Š Running comprehensive PM analysis...`);
268
- const productInfo = {
269
- product: parseJsonOption(options.product) ?? {},
270
- industry: options.industry ?? "Technology",
271
- targetMarket: parseJsonOption(options.targetMarket) ?? {},
272
- };
273
- const plugin = this.requirePlugin();
274
- const result = await plugin.pmSkills.runProductAnalysis(productInfo);
275
- console.log(`āœ… PM analysis completed!`);
276
- console.log(`šŸ“Š Summary: ${result.summary.completedSkills}/${result.summary.totalSkills} skills completed`);
277
- console.log(`šŸ’” Key insights: ${result.summary.keyInsights.length}`);
278
- console.log(`šŸ“‹ Recommendations: ${result.summary.recommendations.length}`);
279
- console.log(`šŸ“ Results saved to: ${result.savedTo}`);
280
- return result;
281
- }
282
- async handlePMSkill(args) {
283
- if (args.length === 0) {
284
- throw new Error("Usage: ci pm skill <skill-name>");
285
- }
286
- const [skillName] = args;
287
- console.log(`šŸ“Š Executing PM skill: ${skillName}`);
288
- const input = {
289
- product: { name: "Sample Product" },
290
- market: { size: "Medium" },
291
- };
292
- const plugin = this.requirePlugin();
293
- const result = await plugin.pmSkills.executeSkill(skillName, input);
294
- console.log(`āœ… PM skill ${skillName} completed!`);
295
- console.log(`šŸ“ Results saved to: ${result.savedTo}`);
296
- return result;
297
- }
298
- handlePMList() {
299
- const plugin = this.requirePlugin();
300
- const skills = plugin.pmSkills.getAvailableSkills();
301
- console.log(`šŸ“Š Available PM Skills:`);
302
- for (const skill of skills) {
303
- console.log(` ${skill.name.padEnd(20)} - ${skill.description} [${skill.category}]`);
304
- }
305
- }
306
- async handleCompound(args) {
307
- const [subcommand, ...subArgs] = args;
308
- switch (subcommand) {
309
- case "session":
310
- return this.handleCompoundSession(subArgs);
311
- case "learnings":
312
- return this.handleCompoundLearnings();
313
- default:
314
- throw new Error("Usage: ci compound <session|learnings> [args]");
315
- }
316
- }
317
- async handleCompoundSession(args) {
318
- if (args.length < 2) {
319
- throw new Error("Usage: ci compound session <project-name> <objective>");
320
- }
321
- const [name, ...objectiveParts] = args;
322
- const objective = objectiveParts.join(" ");
323
- console.log(`šŸ”§ Starting compound engineering session...`);
324
- const plugin = this.requirePlugin();
325
- const session = await plugin.compoundEngineering.startSession(name, objective);
326
- console.log(`āœ… Session started!`);
327
- console.log(`šŸ†” Session ID: ${session.id}`);
328
- console.log(`šŸ“‹ Objective: ${session.objective}`);
329
- console.log(`šŸ”„ Current Phase: ${session.phase}`);
330
- return session;
331
- }
332
- async handleCompoundLearnings() {
333
- console.log(`šŸ“š Loading compound engineering learnings...`);
334
- const plugin = this.requirePlugin();
335
- await plugin.compoundEngineering.loadLearnings();
336
- const learnings = plugin.compoundEngineering.getAllLearnings();
337
- console.log(`šŸ“š Found ${learnings.length} learnings:`);
338
- for (const learning of learnings) {
339
- console.log(` [${learning.confidence.toFixed(2)}] ${learning.summary}`);
340
- }
341
- return learnings;
342
- }
343
- async handleLearnings(args) {
344
- const [subcommand, ...subArgs] = args;
345
- switch (subcommand) {
346
- case "search":
347
- return this.handleLearningsSearch(subArgs.join(" "));
348
- case "all":
349
- return this.handleLearningsAll();
350
- default:
351
- throw new Error("Usage: ci learnings <search|all> [query]");
352
- }
353
- }
354
- async handleLearningsSearch(query) {
355
- console.log(`šŸ” Searching learnings for: "${query}"`);
356
- const plugin = this.requirePlugin();
357
- await plugin.compoundEngineering.loadLearnings();
358
- const results = plugin.compoundEngineering.searchLearnings(query);
359
- console.log(`šŸ” Found ${results.length} matching learnings:`);
360
- for (const learning of results) {
361
- console.log(` [${learning.confidence.toFixed(2)}] ${learning.summary}`);
362
- }
363
- return results;
364
- }
365
- async handleLearningsAll() {
366
- console.log(`šŸ“š Loading all learnings...`);
367
- const plugin = this.requirePlugin();
368
- await plugin.compoundEngineering.loadLearnings();
369
- const learnings = plugin.compoundEngineering.getAllLearnings();
370
- console.log(`šŸ“š Total learnings: ${learnings.length}`);
371
- const grouped = learnings.reduce((groups, learning) => {
372
- const type = learning.type || "general";
373
- if (!groups[type])
374
- groups[type] = [];
375
- groups[type].push(learning);
376
- return groups;
377
- }, {});
378
- for (const [type, items] of Object.entries(grouped)) {
379
- console.log(`\n ${type.charAt(0).toUpperCase() + type.slice(1)} (${items.length}):`);
380
- for (const learning of items) {
381
- console.log(` [${learning.confidence.toFixed(2)}] ${learning.summary}`);
382
- }
383
- }
384
- return learnings;
385
- }
386
- async handleConfig(args) {
77
+ handleConfig(args) {
387
78
  const [subcommand, ...subArgs] = args;
388
79
  switch (subcommand) {
389
80
  case "show":
@@ -395,15 +86,11 @@ class UnifiedCLI {
395
86
  }
396
87
  }
397
88
  handleConfigShow() {
398
- console.log(`āš™ļø Current Configuration:`);
399
- console.log(` Workspace: ${this.config.workspace}`);
400
- console.log(` Verbose: ${this.config.verbose}`);
401
- console.log(` Default Mode: ${this.config.defaultMode}`);
89
+ console.log("Current configuration:");
90
+ console.log(` Workspace: ${this.config.workspace}`);
91
+ console.log(` Verbose: ${this.config.verbose}`);
402
92
  }
403
93
  handleConfigSet(args) {
404
- if (args.length < 2) {
405
- throw new Error("Usage: ci config set <key> <value>");
406
- }
407
94
  const [key, value] = args;
408
95
  if (!key || value === undefined) {
409
96
  throw new Error("Usage: ci config set <key> <value>");
@@ -414,13 +101,10 @@ class UnifiedCLI {
414
101
  else if (key === "verbose") {
415
102
  this.config.verbose = value === "true";
416
103
  }
417
- else if (key === "defaultMode") {
418
- this.config.defaultMode = value;
419
- }
420
104
  else {
421
105
  throw new Error(`Unknown config key: ${key}`);
422
106
  }
423
- console.log(`āœ… Configuration updated: ${key} = ${value}`);
107
+ console.log(`Configuration updated: ${key} = ${value}`);
424
108
  }
425
109
  }
426
110
  function parseGlobalOptions(args) {
@@ -428,34 +112,19 @@ function parseGlobalOptions(args) {
428
112
  for (let i = 0; i < args.length; i++) {
429
113
  const flag = args[i];
430
114
  const next = args[i + 1];
431
- const consumeValue = (key) => {
432
- if (next === undefined)
433
- return;
434
- options[key] = next;
435
- args.splice(i, 2);
436
- i--;
437
- };
438
115
  switch (flag) {
439
116
  case "--workspace":
440
- consumeValue("workspace");
117
+ if (next !== undefined) {
118
+ options.workspace = next;
119
+ args.splice(i, 2);
120
+ i--;
121
+ }
441
122
  break;
442
123
  case "--verbose":
443
124
  options.verbose = true;
444
125
  args.splice(i, 1);
445
126
  i--;
446
127
  break;
447
- case "--repo":
448
- consumeValue("repo");
449
- break;
450
- case "--product":
451
- consumeValue("product");
452
- break;
453
- case "--industry":
454
- consumeValue("industry");
455
- break;
456
- case "--target-market":
457
- consumeValue("targetMarket");
458
- break;
459
128
  default:
460
129
  break;
461
130
  }
@@ -464,49 +133,25 @@ function parseGlobalOptions(args) {
464
133
  }
465
134
  async function main() {
466
135
  const [, , command, ...args] = process.argv;
467
- if (!command || command === "--help" || command === "-h") {
136
+ if (!command || command === "--help" || command === "-h" || command === "help") {
468
137
  console.log(`
469
- Unified Continuous Improvement CLI
138
+ CLI-Anything (ci) - turn a repository into an agent-native CLI
470
139
 
471
140
  Usage: ci <command> [args] [options]
472
141
 
473
- Main Commands:
474
- init <name> <objective> Initialize new project with comprehensive analysis
475
- workflow <name> <objective> Run complete end-to-end workflow
476
- research Execute research phase
477
- planning Execute planning phase
478
- execution Execute execution phase
479
- review Execute review phase
480
- status Show project status
481
-
482
- Tool Commands:
483
- cli generate <repo-path> Generate CLI for repository
484
- pm analyze Run comprehensive PM analysis
485
- pm skill <name> Execute specific PM skill
486
- pm list List available PM skills
487
- compound session <name> <obj> Start compound engineering session
488
- compound learnings Show compound engineering learnings
489
- learnings search <query> Search through all learnings
490
- learnings all Show all learnings
491
-
492
- Configuration:
493
- config show Show current configuration
494
- config set <key> <value> Set configuration value
142
+ Commands:
143
+ generate <repo-path> Analyze a repository and generate an agent-native CLI wrapper
144
+ list Show CLI-Anything capabilities
145
+ config show Show current configuration
146
+ config set <key> <value> Set a configuration value (workspace | verbose)
495
147
 
496
148
  Global Options:
497
- --workspace <dir> Workspace directory
498
- --verbose Enable verbose logging
499
- --repo <path> Repository path for CLI generation
500
- --product <json> Product information as JSON
501
- --industry <name> Industry name
502
- --target-market <json> Target market as JSON
149
+ --workspace <dir> Workspace directory (default: ./ci-workspace)
150
+ --verbose Enable verbose logging
503
151
 
504
152
  Examples:
505
- ci init "MyApp" "Build a task management app"
506
- ci workflow "MyApp" "Build task management" --repo ./my-app
507
- ci cli generate ./my-repo
508
- ci pm analyze --industry "SaaS" --target-market '{"segment":"SMB"}'
509
- ci learnings search "performance"
153
+ ci generate ./my-repo
154
+ ci config set workspace ./out
510
155
  `);
511
156
  process.exit(0);
512
157
  }
@@ -515,18 +160,18 @@ Examples:
515
160
  try {
516
161
  const result = await cli.runCommand(command, args, options);
517
162
  if (options.verbose && result) {
518
- console.log(`\nšŸ” Detailed result:`);
163
+ console.log("\nDetailed result:");
519
164
  console.log(JSON.stringify(result, null, 2));
520
165
  }
521
166
  }
522
167
  catch (error) {
523
- console.error(`āŒ Error: ${getErrorMessage(error)}`);
168
+ console.error(`Error: ${getErrorMessage(error)}`);
524
169
  process.exit(1);
525
170
  }
526
171
  }
527
172
  if (import.meta.url === `file://${process.argv[1]}`) {
528
173
  main().catch((error) => {
529
- console.error(`āŒ Fatal error: ${getErrorMessage(error)}`);
174
+ console.error(`Fatal error: ${getErrorMessage(error)}`);
530
175
  process.exit(1);
531
176
  });
532
177
  }
@@ -65,7 +65,7 @@ Appended 12 instinct(s) to /Users/.../instincts/0af156594b39/instincts.jsonl
65
65
  If `tool_complete rows: 0`, the bash-fallback hook is active (no jq AND the Node observer is not on PATH) and only emits `tool_start` events. Two remediation paths:
66
66
 
67
67
  - **Install jq** — `winget install jqlang.jq` (Windows), `brew install jq` (macOS), `apt install jq` (Linux).
68
- - **Wire the Node observer** — ensure `hooks/bin/observe.mjs` is reachable from the active hook script.
68
+ - **Wire the Node observer** — ensure the installed observer shim `instincts/bin/observe.mjs` (copied from `bin/observe.mjs`) sits beside the active hook script.
69
69
 
70
70
  Both are documented in the WARNING the classifier prints on a thin-schema host.
71
71
 
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: model-forward
3
+ description: Restate the model-forward stance — go with Claude, not against it; skills are scaffolding; the durable core is goal-driven execution plus guardrails.
4
+ ---
5
+
6
+ # /model-forward
7
+
8
+ Load the `model-forward` skill and apply its stance to the current session.
9
+
10
+ 1. Restate the two invariants: goal-driven execution (anchor on the highest stated goal) and self-discipline guardrails (the 7 Laws).
11
+ 2. Audit the current task for places where custom scaffolding fights a native Claude Code capability; list each with the native alternative.
12
+ 3. Apply the decision rules from the skill before adding any new skill, hook, or wrapper to the workflow.
13
+ 4. Close with one line naming which native capability was preferred, which scaffold (if any) was proposed for retirement, and that the operator decides.
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: production-readiness-review
3
+ description: "Parallel multi-agent readiness gate — fan blind reviewers across performance, security, UI/UX, and test coverage, each grounding findings in real code/logs/live data, then reconcile into one deduplicated, severity-ranked punch-list. Reports only; never fixes, merges, or deploys."
4
+ ---
5
+
6
+ # /production-readiness-review
7
+
8
+ The review-side sibling of `/ship`. Fans a set of blind, specialized reviewers across distinct dimensions, then reconciles their findings into a single prioritized punch-list. It reports — it does not fix. Fixing a finding is a separate `/ship` run.
9
+
10
+ Pure routing over existing skills and agents. Adds no new code.
11
+
12
+ ## Usage
13
+
14
+ ```
15
+ /production-readiness-review [scope]
16
+ ```
17
+
18
+ `scope` defaults to the current branch diff against `origin/main`. Pass a path or PR number to narrow it.
19
+
20
+ ## Behavior
21
+
22
+ 1. **Scope** — establish ground truth: the diff under review and which changes are recent (`git diff`; `reconcile` fallback for branch/base state). Recent changes get extra scrutiny because they are the likeliest source of self-inflicted defects.
23
+ 2. **Fan out** — `superpowers:dispatching-parallel-agents` launches four reviewers, each blind to the others. Every reviewer is instructed to ground each finding in real code, logs, or live queries, and never to assume or fabricate state:
24
+ - **Performance & bundle-size** — hot paths, N+1 queries, unbounded work, regressions.
25
+ - **Security & data-access** (`security-auditor`) — authn/authz, input handling, injection, secret exposure, unsafe data access.
26
+ - **UI/UX correctness** — verified live with Playwright when the MCP is available, else static review of the changed surface.
27
+ - **Test coverage & flaky/stale mocks** (`test-engineer`) — uncovered branches, stale mocks, timing-flaky tests.
28
+ 3. **Reconcile** — a final pass dedupes findings across reviewers, ranks each CRITICAL / HIGH / MEDIUM / LOW by severity and confidence, and explicitly flags any defect introduced by the changes under review.
29
+ 4. **Present** — emit the consolidated punch-list, severity-ranked, with file references. **Stop.**
30
+
31
+ ## Hard stops (report, never act)
32
+
33
+ - Does not fix, edit, commit, merge, or deploy anything — output is a punch-list only.
34
+ - A reviewer that cannot ground a finding marks it `unverified` rather than asserting it.
35
+ - If a dimension's tooling is unavailable (e.g. no Playwright MCP), it says so rather than silently skipping coverage.
36
+
37
+ ## Anti-patterns this command refuses
38
+
39
+ - **Fabricated state.** No finding may rest on an assumed SHA, row, or log line — ground it or mark it `unverified`.
40
+ - **Silent skip.** A dimension that cannot run is reported as not-run, never dropped from the summary.
41
+ - **Drive-by fix.** Findings become `/ship` tasks; this command does not touch code.
42
+
43
+ ## Composition
44
+
45
+ Routes through: `reconcile` (scope/ground truth) → `superpowers:dispatching-parallel-agents` (fan-out) → the `security-auditor` and `test-engineer` agents (two of the four dimensions) → a reconciliation pass that ranks and dedupes. Each step falls back to its inline behavior when the preferred skill or agent is not installed.
46
+
47
+ ## Example
48
+
49
+ ```
50
+ /production-readiness-review #246
51
+ ```
52
+
53
+ Scopes PR #246's diff, fans four blind reviewers across performance, security, UI/UX, and test coverage, then returns one deduplicated severity-ranked punch-list — flagging anything the PR's own changes introduced — and stops for you to prioritize.