supermind-claude 2.1.1 → 4.0.1

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 (42) hide show
  1. package/.claude-plugin/plugin.json +21 -0
  2. package/README.md +34 -46
  3. package/agents/code-reviewer.md +81 -0
  4. package/cli/commands/doctor.js +415 -79
  5. package/cli/commands/install.js +16 -17
  6. package/cli/commands/skill.js +164 -0
  7. package/cli/commands/uninstall.js +32 -3
  8. package/cli/commands/update.js +25 -4
  9. package/cli/index.js +16 -4
  10. package/cli/lib/agents.js +413 -0
  11. package/cli/lib/executor.js +365 -0
  12. package/cli/lib/hooks.js +8 -1
  13. package/cli/lib/logger.js +1 -1
  14. package/cli/lib/planning.js +502 -0
  15. package/cli/lib/platform.js +4 -0
  16. package/cli/lib/plugin.js +127 -0
  17. package/cli/lib/settings.js +2 -40
  18. package/cli/lib/skills.js +39 -2
  19. package/cli/lib/vendor-skills.js +594 -0
  20. package/hooks/bash-permissions.js +196 -176
  21. package/hooks/context-monitor.js +79 -0
  22. package/hooks/improvement-logger.js +94 -0
  23. package/hooks/pre-merge-checklist.js +102 -0
  24. package/hooks/session-start.js +109 -5
  25. package/hooks/statusline-command.js +123 -29
  26. package/package.json +4 -2
  27. package/skills/anti-rationalization/SKILL.md +38 -0
  28. package/skills/brainstorming/SKILL.md +165 -0
  29. package/skills/code-review/SKILL.md +144 -0
  30. package/skills/executing-plans/SKILL.md +138 -0
  31. package/skills/finishing-branches/SKILL.md +144 -0
  32. package/skills/project/SKILL.md +533 -0
  33. package/skills/quick/SKILL.md +178 -0
  34. package/skills/supermind/SKILL.md +58 -4
  35. package/skills/supermind-init/SKILL.md +48 -2
  36. package/skills/systematic-debugging/SKILL.md +129 -0
  37. package/skills/tdd/SKILL.md +179 -0
  38. package/skills/using-git-worktrees/SKILL.md +138 -0
  39. package/skills/verification-before-completion/SKILL.md +54 -0
  40. package/skills/writing-plans/SKILL.md +169 -0
  41. package/templates/CLAUDE.md +124 -62
  42. package/cli/lib/plugins.js +0 -23
@@ -0,0 +1,164 @@
1
+ 'use strict';
2
+
3
+ const logger = require('../lib/logger');
4
+ const vendorSkills = require('../lib/vendor-skills');
5
+
6
+ module.exports = async function skill(flags) {
7
+ const subcommand = (flags.args && flags.args[0]) || '';
8
+ const target = flags.args && flags.args[1];
9
+
10
+ switch (subcommand) {
11
+ case 'add':
12
+ return handleAdd(target, flags);
13
+ case 'update':
14
+ return handleUpdate(target, flags);
15
+ case 'list':
16
+ return handleList();
17
+ case 'remove':
18
+ return handleRemove(target);
19
+ default:
20
+ showHelp();
21
+ }
22
+ };
23
+
24
+ // ---------------------------------------------------------------------------
25
+ // handleAdd
26
+ // ---------------------------------------------------------------------------
27
+
28
+ function handleAdd(url, flags) {
29
+ if (!url) {
30
+ logger.error('Specify a GitHub URL: supermind-claude skill add <github-url> [--global]');
31
+ return;
32
+ }
33
+
34
+ try {
35
+ const result = vendorSkills.addSkill(url, { global: !!flags.global });
36
+ console.log('');
37
+ logger.success(`Installed ${result.installed.length} skill(s) from ${result.source}`);
38
+ for (const name of result.installed) {
39
+ logger.info(` - ${name}`);
40
+ }
41
+ logger.info(`Commit: ${result.commit}`);
42
+ console.log('');
43
+ } catch (err) {
44
+ logger.error(err.message);
45
+ }
46
+ }
47
+
48
+ // ---------------------------------------------------------------------------
49
+ // handleUpdate
50
+ // ---------------------------------------------------------------------------
51
+
52
+ function handleUpdate(name, flags) {
53
+ try {
54
+ if (flags.all) {
55
+ const result = vendorSkills.updateAll();
56
+ console.log('');
57
+ if (result.results.length === 0) {
58
+ logger.info('No vendor skills installed');
59
+ return;
60
+ }
61
+ logger.success(`Updated ${result.results.filter(r => r.updated).length} skill(s)`);
62
+ for (const r of result.results) {
63
+ if (r.error) {
64
+ logger.warn(`${r.name}: ${r.error}`);
65
+ } else if (r.updated) {
66
+ logger.success(` - ${r.name}: ${r.message || 'Updated'}`);
67
+ } else {
68
+ logger.info(` - ${r.name}: ${r.message || 'No changes'}`);
69
+ }
70
+ }
71
+ console.log('');
72
+ } else if (name) {
73
+ const result = vendorSkills.updateSkill(name);
74
+ console.log('');
75
+ if (result.updated) {
76
+ logger.success(`Updated: ${name}`);
77
+ } else {
78
+ logger.info(`${name}: ${result.message || 'No changes'}`);
79
+ }
80
+ console.log('');
81
+ } else {
82
+ logger.error('Specify a skill name or use --all: supermind-claude skill update <name> [--all]');
83
+ }
84
+ } catch (err) {
85
+ logger.error(err.message);
86
+ }
87
+ }
88
+
89
+ // ---------------------------------------------------------------------------
90
+ // handleList
91
+ // ---------------------------------------------------------------------------
92
+
93
+ function handleList() {
94
+ try {
95
+ const skills = vendorSkills.listSkills();
96
+ console.log('');
97
+ if (skills.length === 0) {
98
+ logger.info('No vendor skills installed');
99
+ console.log('');
100
+ return;
101
+ }
102
+
103
+ // Format as simple table
104
+ console.log(' Vendor Skills:\n');
105
+ const maxNameLen = Math.max(...skills.map(s => s.name.length));
106
+ const maxSourceLen = Math.max(...skills.map(s => s.source.length));
107
+ const maxScopeLen = Math.max(...skills.map(s => s.scope.length));
108
+
109
+ for (const skill of skills) {
110
+ const padName = skill.name.padEnd(maxNameLen);
111
+ const padSource = skill.source.padEnd(maxSourceLen);
112
+ const padScope = skill.scope.padEnd(maxScopeLen);
113
+ const commit = skill.commit.substring(0, 8);
114
+ console.log(` ${padName} ${padSource} ${padScope} ${commit}`);
115
+ }
116
+ console.log('');
117
+ } catch (err) {
118
+ logger.error(err.message);
119
+ }
120
+ }
121
+
122
+ // ---------------------------------------------------------------------------
123
+ // handleRemove
124
+ // ---------------------------------------------------------------------------
125
+
126
+ function handleRemove(name) {
127
+ if (!name) {
128
+ logger.error('Specify a skill name: supermind-claude skill remove <name>');
129
+ return;
130
+ }
131
+
132
+ try {
133
+ vendorSkills.removeSkill(name);
134
+ console.log('');
135
+ logger.success(`Removed: ${name}`);
136
+ console.log('');
137
+ } catch (err) {
138
+ logger.error(err.message);
139
+ }
140
+ }
141
+
142
+ // ---------------------------------------------------------------------------
143
+ // showHelp
144
+ // ---------------------------------------------------------------------------
145
+
146
+ function showHelp() {
147
+ console.log(`
148
+ Usage: supermind-claude skill <command> [args]
149
+
150
+ Commands:
151
+ add <github-url> [--global] Install skill from GitHub
152
+ update [name] [--all] Update skill(s) from source
153
+ list Show installed vendor skills
154
+ remove <name> Remove a vendor skill
155
+
156
+ Examples:
157
+ supermind-claude skill add https://github.com/owner/repo
158
+ supermind-claude skill add github.com/owner/repo --global
159
+ supermind-claude skill update my-skill
160
+ supermind-claude skill update --all
161
+ supermind-claude skill list
162
+ supermind-claude skill remove my-skill
163
+ `);
164
+ }
@@ -1,13 +1,15 @@
1
1
  'use strict';
2
2
 
3
3
  const fs = require('fs');
4
+ const path = require('path');
4
5
  const readline = require('readline');
5
6
  const { PATHS } = require('../lib/platform');
6
7
  const logger = require('../lib/logger');
7
8
  const { readSettings, writeSettings, removeSupermindEntries, backupSettings } = require('../lib/settings');
8
9
  const { removeHooks } = require('../lib/hooks');
9
- const { removeSkills } = require('../lib/skills');
10
+ const { removeSkills, removeAgents } = require('../lib/skills');
10
11
  const { removeTemplates } = require('../lib/templates');
12
+ const { removePlugin } = require('../lib/plugin');
11
13
 
12
14
  function prompt(question) {
13
15
  const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
@@ -31,14 +33,19 @@ module.exports = async function uninstall(flags) {
31
33
  console.log(' Removing hooks...');
32
34
  removeHooks();
33
35
 
34
- // Remove skills
35
- console.log(' Removing skills...');
36
+ // Remove skills and agents
37
+ console.log(' Removing skills and agents...');
36
38
  removeSkills();
39
+ removeAgents();
37
40
 
38
41
  // Remove templates
39
42
  console.log(' Removing templates...');
40
43
  removeTemplates();
41
44
 
45
+ // Remove plugin registration
46
+ console.log(' Removing plugin registration...');
47
+ removePlugin();
48
+
42
49
  // Clean settings
43
50
  console.log(' Cleaning settings...');
44
51
  backupSettings();
@@ -47,6 +54,13 @@ module.exports = async function uninstall(flags) {
47
54
  writeSettings(cleaned);
48
55
  logger.success('Settings cleaned');
49
56
 
57
+ // Remove vendor skills lock file
58
+ const skillsLockPath = path.join(PATHS.claudeHome, 'skills-lock.json');
59
+ if (fs.existsSync(skillsLockPath)) {
60
+ fs.unlinkSync(skillsLockPath);
61
+ logger.success('Removed vendor skills lock file');
62
+ }
63
+
50
64
  // Remove version marker
51
65
  if (fs.existsSync(PATHS.versionFile)) {
52
66
  fs.unlinkSync(PATHS.versionFile);
@@ -72,5 +86,20 @@ module.exports = async function uninstall(flags) {
72
86
  }
73
87
  }
74
88
 
89
+ // Optional: Improvement log
90
+ const improvementLog = path.join(PATHS.claudeHome, 'improvement-log.jsonl');
91
+ if (fs.existsSync(improvementLog)) {
92
+ if (flags.yes || flags.nonInteractive) {
93
+ fs.unlinkSync(improvementLog);
94
+ logger.success('Removed improvement log');
95
+ } else {
96
+ const answer = await prompt(' Also remove improvement log? [y/N]: ');
97
+ if (answer.toLowerCase() === 'y') {
98
+ fs.unlinkSync(improvementLog);
99
+ logger.success('Removed improvement log');
100
+ }
101
+ }
102
+ }
103
+
75
104
  console.log(`\n${'\x1b[32m'}\u2713 Supermind uninstalled${'\x1b[0m'}\n`);
76
105
  };
@@ -5,9 +5,10 @@ const { PATHS } = require('../lib/platform');
5
5
  const logger = require('../lib/logger');
6
6
  const { readSettings, writeSettings, mergeSettings, backupSettings } = require('../lib/settings');
7
7
  const { installHooks, getHookSettings } = require('../lib/hooks');
8
- const { installSkills, removeLegacySkills } = require('../lib/skills');
8
+ const { installSkills, removeLegacySkills, installAgents } = require('../lib/skills');
9
9
  const { installTemplates } = require('../lib/templates');
10
10
  const { detectMcpMode } = require('../lib/mcp');
11
+ const { installPlugin } = require('../lib/plugin');
11
12
  const { version } = require('../../package.json');
12
13
 
13
14
  module.exports = function update(flags) {
@@ -23,7 +24,7 @@ module.exports = function update(flags) {
23
24
  logger.info(`Updating from v${installedVersion} to v${version}...`);
24
25
  }
25
26
 
26
- const TOTAL = 4;
27
+ const TOTAL = 6;
27
28
 
28
29
  // Step 1: Hooks
29
30
  logger.step(1, TOTAL, 'Updating hooks...');
@@ -38,15 +39,35 @@ module.exports = function update(flags) {
38
39
  writeSettings(merged);
39
40
  logger.success('Hook settings refreshed');
40
41
 
41
- // Step 3: Skills
42
- logger.step(3, TOTAL, 'Updating skills...');
42
+ // Step 3: Skills & agents
43
+ logger.step(3, TOTAL, 'Updating skills and agents...');
43
44
  removeLegacySkills();
44
45
  installSkills();
46
+ installAgents();
45
47
 
46
48
  // Step 4: Templates
47
49
  logger.step(4, TOTAL, 'Updating templates...');
48
50
  installTemplates(detectMcpMode());
49
51
 
52
+ // Step 5: Plugin manifest
53
+ logger.step(5, TOTAL, 'Updating plugin manifest...');
54
+ installPlugin();
55
+
56
+ // Step 6: Vendor skills check
57
+ logger.step(6, TOTAL, 'Checking vendor skills...');
58
+ try {
59
+ const vendorSkills = require('../lib/vendor-skills');
60
+ const globalLock = vendorSkills.readLockFile('global');
61
+ const skillCount = Object.keys(globalLock.skills || {}).length;
62
+ if (skillCount > 0) {
63
+ logger.info(`${skillCount} vendor skill(s) tracked (run 'supermind skill update --all' to refresh)`);
64
+ } else {
65
+ logger.info('No vendor skills installed');
66
+ }
67
+ } catch {
68
+ logger.info('Vendor skill check skipped');
69
+ }
70
+
50
71
  // Write version marker
51
72
  fs.writeFileSync(PATHS.versionFile, version);
52
73
 
package/cli/index.js CHANGED
@@ -9,12 +9,15 @@ const COMMANDS = {
9
9
  doctor: () => require('./commands/doctor'),
10
10
  uninstall: () => require('./commands/uninstall'),
11
11
  approve: () => require('./commands/approve'),
12
+ skill: () => require('./commands/skill'),
12
13
  };
13
14
 
14
15
  function parseArgs(argv) {
15
16
  const args = argv.slice(2);
16
17
  const flags = {};
17
- let command = 'install'; // default
18
+ const positionalArgs = [];
19
+ let command = null; // no default — show help when no command given
20
+ let commandFound = false;
18
21
 
19
22
  for (let i = 0; i < args.length; i++) {
20
23
  const arg = args[i];
@@ -25,9 +28,15 @@ function parseArgs(argv) {
25
28
  if (arg === '--mcp' && args[i + 1]) { flags.mcp = args[++i]; continue; }
26
29
  if (arg === '--list' || arg === '-l') { flags.list = true; continue; }
27
30
  if (arg === '--remove' || arg === '-r') { flags.remove = true; continue; }
28
- if (!arg.startsWith('-') && COMMANDS[arg]) { command = arg; continue; }
31
+ if (arg === '--global') { flags.global = true; continue; }
32
+ if (arg === '--all') { flags.all = true; continue; }
33
+ if (!arg.startsWith('-')) {
34
+ if (!commandFound && COMMANDS[arg]) { command = arg; commandFound = true; continue; }
35
+ positionalArgs.push(arg);
36
+ }
29
37
  }
30
38
 
39
+ flags.args = positionalArgs;
31
40
  return { command, flags };
32
41
  }
33
42
 
@@ -38,16 +47,19 @@ function showHelp() {
38
47
  Usage: supermind-claude [command] [options]
39
48
 
40
49
  Commands:
41
- install Full global setup (default)
50
+ install Full global setup
42
51
  update Refresh hooks, skills, and templates
43
52
  doctor Verify installation health
44
53
  uninstall Remove all Supermind components
45
54
  approve Manage auto-approved commands
55
+ skill Manage vendor skills (add/update/list/remove)
46
56
 
47
57
  Options:
48
58
  --non-interactive Skip all prompts, use defaults
49
59
  --mcp <mode> MCP setup: docker, direct, or skip
50
60
  --yes, -y Auto-confirm destructive operations
61
+ --global Apply to global installation
62
+ --all Apply to all items
51
63
  --help, -h Show this help
52
64
  --version, -v Show version
53
65
  `);
@@ -57,7 +69,7 @@ async function main() {
57
69
  const { command, flags } = parseArgs(process.argv);
58
70
 
59
71
  if (flags.version) { console.log(version); process.exit(0); }
60
- if (flags.help) { showHelp(); process.exit(0); }
72
+ if (flags.help || !command) { showHelp(); process.exit(0); }
61
73
 
62
74
  const run = COMMANDS[command]();
63
75
  await run(flags);