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
@@ -8,27 +8,9 @@ const logger = require('./logger');
8
8
  const SUPERMIND_HOOKS = [
9
9
  'bash-permissions.js', 'session-start.js', 'session-end.js',
10
10
  'cost-tracker.js', 'statusline-command.js',
11
+ 'pre-merge-checklist.js', 'improvement-logger.js',
11
12
  ];
12
13
 
13
- // Derived from plugins.js — single source of truth for plugin and marketplace IDs.
14
- // Wrapped in try-catch so a plugins.js error doesn't crash doctor/uninstall.
15
- function loadPluginIds() {
16
- try {
17
- const { getPluginDefaults } = require('./plugins');
18
- const defaults = getPluginDefaults();
19
- return {
20
- plugins: Object.keys(defaults.enabledPlugins),
21
- marketplaces: Object.keys(defaults.extraKnownMarketplaces),
22
- };
23
- } catch (err) {
24
- logger.warn(`Could not load plugins.js — plugin checks/cleanup will be skipped (${err.message})`);
25
- return { plugins: [], marketplaces: [] };
26
- }
27
- }
28
-
29
- const { plugins: SUPERMIND_PLUGINS, marketplaces: SUPERMIND_MARKETPLACES } = loadPluginIds();
30
- // SUPERMIND_MARKETPLACES is used only within this module (for uninstall cleanup) — intentionally not exported
31
-
32
14
  function readSettings() {
33
15
  try {
34
16
  return JSON.parse(fs.readFileSync(PATHS.settings, 'utf-8'));
@@ -120,9 +102,6 @@ function mergeSettings(existing, defaults) {
120
102
 
121
103
  // Objects: recursive merge
122
104
  if (defaults.permissions) result.permissions = mergeObjects(result.permissions || {}, defaults.permissions);
123
- if (defaults.enabledPlugins) result.enabledPlugins = mergeObjects(result.enabledPlugins || {}, defaults.enabledPlugins);
124
- if (defaults.extraKnownMarketplaces) result.extraKnownMarketplaces = mergeObjects(result.extraKnownMarketplaces || {}, defaults.extraKnownMarketplaces);
125
-
126
105
  // Hooks: special merge
127
106
  if (defaults.hooks) result.hooks = mergeHookEvents(result.hooks || {}, defaults.hooks);
128
107
 
@@ -136,23 +115,6 @@ function removeSupermindEntries(settings) {
136
115
  // Remove statusLine
137
116
  delete result.statusLine;
138
117
 
139
- // Remove Supermind plugins and marketplace entries
140
- if (SUPERMIND_PLUGINS.length === 0) {
141
- logger.warn('Plugin/marketplace list unavailable — these entries were NOT removed from settings. ' +
142
- 'You may need to manually edit ~/.claude/settings.json');
143
- } else {
144
- if (result.enabledPlugins) {
145
- for (const id of SUPERMIND_PLUGINS) {
146
- delete result.enabledPlugins[id];
147
- }
148
- }
149
- if (result.extraKnownMarketplaces) {
150
- for (const id of SUPERMIND_MARKETPLACES) {
151
- delete result.extraKnownMarketplaces[id];
152
- }
153
- }
154
- }
155
-
156
118
  // Remove Supermind hooks from each event
157
119
  if (result.hooks) {
158
120
  for (const [event, configs] of Object.entries(result.hooks)) {
@@ -178,5 +140,5 @@ function removeSupermindEntries(settings) {
178
140
  module.exports = {
179
141
  readSettings, writeSettings, backupSettings,
180
142
  mergeSettings, removeSupermindEntries,
181
- SUPERMIND_HOOKS, SUPERMIND_PLUGINS,
143
+ SUPERMIND_HOOKS,
182
144
  };
package/cli/lib/skills.js CHANGED
@@ -38,7 +38,7 @@ function installSkills() {
38
38
  }
39
39
 
40
40
  // Fallback list if package source is unavailable
41
- const KNOWN_SKILLS = ['supermind', 'supermind-init', 'supermind-living-docs'];
41
+ const KNOWN_SKILLS = ['supermind', 'supermind-init', 'supermind-living-docs', 'anti-rationalization', 'verification-before-completion', 'tdd', 'systematic-debugging', 'brainstorming', 'code-review', 'using-git-worktrees', 'writing-plans', 'executing-plans', 'finishing-branches', 'quick', 'project'];
42
42
 
43
43
  function removeSkills() {
44
44
  let dirs;
@@ -67,4 +67,41 @@ function removeLegacySkills() {
67
67
  }
68
68
  }
69
69
 
70
- module.exports = { installSkills, removeSkills, removeLegacySkills, getSkillDirs };
70
+ // ---------------------------------------------------------------------------
71
+ // Agent definitions — copied to ~/.claude/agents/ on install
72
+ // ---------------------------------------------------------------------------
73
+
74
+ const KNOWN_AGENTS = ['code-reviewer'];
75
+
76
+ function getAgentFiles() {
77
+ const agentsSource = path.join(getPackageRoot(), 'agents');
78
+ return fs.readdirSync(agentsSource).filter(f =>
79
+ f.endsWith('.md') && fs.statSync(path.join(agentsSource, f)).isFile()
80
+ );
81
+ }
82
+
83
+ function installAgents() {
84
+ ensureDir(PATHS.agentsDir);
85
+ const agentsSource = path.join(getPackageRoot(), 'agents');
86
+ const files = getAgentFiles();
87
+
88
+ for (const file of files) {
89
+ fs.copyFileSync(path.join(agentsSource, file), path.join(PATHS.agentsDir, file));
90
+ logger.success(file);
91
+ }
92
+ return files;
93
+ }
94
+
95
+ function removeAgents() {
96
+ let files;
97
+ try { files = getAgentFiles(); } catch { files = KNOWN_AGENTS.map(n => `${n}.md`); }
98
+ for (const file of files) {
99
+ const target = path.join(PATHS.agentsDir, file);
100
+ if (fs.existsSync(target)) {
101
+ fs.unlinkSync(target);
102
+ logger.success(`Removed ${file}`);
103
+ }
104
+ }
105
+ }
106
+
107
+ module.exports = { installSkills, removeSkills, removeLegacySkills, getSkillDirs, installAgents, removeAgents, getAgentFiles };