@tgoodington/intuition 2.2.0 → 3.0.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.
@@ -1,140 +1,153 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Installation script for Intuition skills
5
- *
6
- * This script is run after `npm install -g intuition`
7
- * It copies the /plan and /execute skills to ~/.claude/skills/ for global access
8
- */
9
-
10
- const fs = require('fs');
11
- const path = require('path');
12
- const os = require('os');
13
-
14
- // Utilities
15
- function copyDirRecursive(src, dest) {
16
- if (!fs.existsSync(dest)) {
17
- fs.mkdirSync(dest, { recursive: true });
18
- }
19
-
20
- const files = fs.readdirSync(src);
21
- files.forEach(file => {
22
- const srcFile = path.join(src, file);
23
- const destFile = path.join(dest, file);
24
- const stat = fs.statSync(srcFile);
25
-
26
- if (stat.isDirectory()) {
27
- copyDirRecursive(srcFile, destFile);
28
- } else {
29
- fs.copyFileSync(srcFile, destFile);
30
- }
31
- });
32
- }
33
-
34
- function log(msg) {
35
- console.log(`[intuition-install] ${msg}`);
36
- }
37
-
38
- function error(msg) {
39
- console.error(`[intuition-install] ERROR: ${msg}`);
40
- }
41
-
42
- // Main installation logic
43
- try {
44
- const homeDir = os.homedir();
45
- const claudeSkillsDir = path.join(homeDir, '.claude', 'skills');
46
-
47
- // Get the location of the installed package (where this script is running from)
48
- // In npm global installation, this is typically in node_modules/intuition/
49
- const packageRoot = path.dirname(path.dirname(path.resolve(__filename)));
50
-
51
- log(`Installing Intuition skills...`);
52
- log(`Package root: ${packageRoot}`);
53
- log(`Target directory: ${claudeSkillsDir}`);
54
-
55
- // Create ~/.claude/skills if it doesn't exist
56
- if (!fs.existsSync(claudeSkillsDir)) {
57
- fs.mkdirSync(claudeSkillsDir, { recursive: true });
58
- log(`Created ${claudeSkillsDir}`);
59
- }
60
-
61
- // Copy /intuition-start skill
62
- const startSrc = path.join(packageRoot, 'skills', 'intuition-start');
63
- const startDest = path.join(claudeSkillsDir, 'intuition-start');
64
-
65
- if (fs.existsSync(startSrc)) {
66
- copyDirRecursive(startSrc, startDest);
67
- log(`✓ Installed /intuition-start skill to ${startDest}`);
68
- } else {
69
- error(`intuition-start skill not found at ${startSrc}`);
70
- process.exit(1);
71
- }
72
-
73
- // Copy /intuition-plan skill
74
- const planSrc = path.join(packageRoot, 'skills', 'intuition-plan');
75
- const planDest = path.join(claudeSkillsDir, 'intuition-plan');
76
-
77
- if (fs.existsSync(planSrc)) {
78
- copyDirRecursive(planSrc, planDest);
79
- log(`✓ Installed /intuition-plan skill to ${planDest}`);
80
- } else {
81
- error(`intuition-plan skill not found at ${planSrc}`);
82
- process.exit(1);
83
- }
84
-
85
- // Copy /intuition-execute skill
86
- const executeSrc = path.join(packageRoot, 'skills', 'intuition-execute');
87
- const executeDest = path.join(claudeSkillsDir, 'intuition-execute');
88
-
89
- if (fs.existsSync(executeSrc)) {
90
- copyDirRecursive(executeSrc, executeDest);
91
- log(`✓ Installed /intuition-execute skill to ${executeDest}`);
92
- } else {
93
- error(`intuition-execute skill not found at ${executeSrc}`);
94
- process.exit(1);
95
- }
96
-
97
- // Copy /intuition-initialize skill
98
- const initializeSrc = path.join(packageRoot, 'skills', 'intuition-initialize');
99
- const initializeDest = path.join(claudeSkillsDir, 'intuition-initialize');
100
-
101
- if (fs.existsSync(initializeSrc)) {
102
- copyDirRecursive(initializeSrc, initializeDest);
103
- log(`✓ Installed /intuition-initialize skill to ${initializeDest}`);
104
- } else {
105
- error(`intuition-initialize skill not found at ${initializeSrc}`);
106
- process.exit(1);
107
- }
108
-
109
- // Copy /intuition-discovery skill
110
- const discoverySrc = path.join(packageRoot, 'skills', 'intuition-discovery');
111
- const discoveryDest = path.join(claudeSkillsDir, 'intuition-discovery');
112
-
113
- if (fs.existsSync(discoverySrc)) {
114
- copyDirRecursive(discoverySrc, discoveryDest);
115
- log(`✓ Installed /intuition-discovery skill to ${discoveryDest}`);
116
- } else {
117
- error(`intuition-discovery skill not found at ${discoverySrc}`);
118
- process.exit(1);
119
- }
120
-
121
- // Verify installation
122
- if (fs.existsSync(startDest) && fs.existsSync(planDest) && fs.existsSync(executeDest) && fs.existsSync(initializeDest) && fs.existsSync(discoveryDest)) {
123
- log(`✓ Installation complete!`);
124
- log(`Skills are now available globally:`);
125
- log(` /intuition-start - Load project context and enforce compliance`);
126
- log(` /intuition-discovery - Discovery with Waldo (GAPP dialogue)`);
127
- log(` /intuition-plan - Planning with Magellan (strategic planning)`);
128
- log(` /intuition-execute - Execution with Faraday (methodical implementation)`);
129
- log(` /intuition-initialize - Project initialization (set up project memory)`);
130
- log(`\nYou can now use these skills in any project with Claude Code.`);
131
- } else {
132
- error(`Verification failed - skills not properly installed`);
133
- process.exit(1);
134
- }
135
-
136
- } catch (err) {
137
- error(`Installation failed: ${err.message}`);
138
- console.error(err);
139
- process.exit(1);
140
- }
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Installation script for Intuition skills
5
+ *
6
+ * This script is run after `npm install -g intuition`
7
+ * It copies the /plan and /execute skills to ~/.claude/skills/ for global access
8
+ */
9
+
10
+ const fs = require('fs');
11
+ const path = require('path');
12
+ const os = require('os');
13
+
14
+ // Utilities
15
+ function copyDirRecursive(src, dest) {
16
+ if (!fs.existsSync(dest)) {
17
+ fs.mkdirSync(dest, { recursive: true });
18
+ }
19
+
20
+ const files = fs.readdirSync(src);
21
+ files.forEach(file => {
22
+ const srcFile = path.join(src, file);
23
+ const destFile = path.join(dest, file);
24
+ const stat = fs.statSync(srcFile);
25
+
26
+ if (stat.isDirectory()) {
27
+ copyDirRecursive(srcFile, destFile);
28
+ } else {
29
+ fs.copyFileSync(srcFile, destFile);
30
+ }
31
+ });
32
+ }
33
+
34
+ function log(msg) {
35
+ console.log(`[intuition-install] ${msg}`);
36
+ }
37
+
38
+ function error(msg) {
39
+ console.error(`[intuition-install] ERROR: ${msg}`);
40
+ }
41
+
42
+ // Main installation logic
43
+ try {
44
+ const homeDir = os.homedir();
45
+ const claudeSkillsDir = path.join(homeDir, '.claude', 'skills');
46
+
47
+ // Get the location of the installed package (where this script is running from)
48
+ // In npm global installation, this is typically in node_modules/intuition/
49
+ const packageRoot = path.dirname(path.dirname(path.resolve(__filename)));
50
+
51
+ log(`Installing Intuition skills...`);
52
+ log(`Package root: ${packageRoot}`);
53
+ log(`Target directory: ${claudeSkillsDir}`);
54
+
55
+ // Create ~/.claude/skills if it doesn't exist
56
+ if (!fs.existsSync(claudeSkillsDir)) {
57
+ fs.mkdirSync(claudeSkillsDir, { recursive: true });
58
+ log(`Created ${claudeSkillsDir}`);
59
+ }
60
+
61
+ // Copy /intuition-start skill
62
+ const startSrc = path.join(packageRoot, 'skills', 'intuition-start');
63
+ const startDest = path.join(claudeSkillsDir, 'intuition-start');
64
+
65
+ if (fs.existsSync(startSrc)) {
66
+ copyDirRecursive(startSrc, startDest);
67
+ log(`✓ Installed /intuition-start skill to ${startDest}`);
68
+ } else {
69
+ error(`intuition-start skill not found at ${startSrc}`);
70
+ process.exit(1);
71
+ }
72
+
73
+ // Copy /intuition-plan skill
74
+ const planSrc = path.join(packageRoot, 'skills', 'intuition-plan');
75
+ const planDest = path.join(claudeSkillsDir, 'intuition-plan');
76
+
77
+ if (fs.existsSync(planSrc)) {
78
+ copyDirRecursive(planSrc, planDest);
79
+ log(`✓ Installed /intuition-plan skill to ${planDest}`);
80
+ } else {
81
+ error(`intuition-plan skill not found at ${planSrc}`);
82
+ process.exit(1);
83
+ }
84
+
85
+ // Copy /intuition-execute skill
86
+ const executeSrc = path.join(packageRoot, 'skills', 'intuition-execute');
87
+ const executeDest = path.join(claudeSkillsDir, 'intuition-execute');
88
+
89
+ if (fs.existsSync(executeSrc)) {
90
+ copyDirRecursive(executeSrc, executeDest);
91
+ log(`✓ Installed /intuition-execute skill to ${executeDest}`);
92
+ } else {
93
+ error(`intuition-execute skill not found at ${executeSrc}`);
94
+ process.exit(1);
95
+ }
96
+
97
+ // Copy /intuition-initialize skill
98
+ const initializeSrc = path.join(packageRoot, 'skills', 'intuition-initialize');
99
+ const initializeDest = path.join(claudeSkillsDir, 'intuition-initialize');
100
+
101
+ if (fs.existsSync(initializeSrc)) {
102
+ copyDirRecursive(initializeSrc, initializeDest);
103
+ log(`✓ Installed /intuition-initialize skill to ${initializeDest}`);
104
+ } else {
105
+ error(`intuition-initialize skill not found at ${initializeSrc}`);
106
+ process.exit(1);
107
+ }
108
+
109
+ // Copy /intuition-discovery skill
110
+ const discoverySrc = path.join(packageRoot, 'skills', 'intuition-discovery');
111
+ const discoveryDest = path.join(claudeSkillsDir, 'intuition-discovery');
112
+
113
+ if (fs.existsSync(discoverySrc)) {
114
+ copyDirRecursive(discoverySrc, discoveryDest);
115
+ log(`✓ Installed /intuition-discovery skill to ${discoveryDest}`);
116
+ } else {
117
+ error(`intuition-discovery skill not found at ${discoverySrc}`);
118
+ process.exit(1);
119
+ }
120
+
121
+ // Copy /intuition-handoff skill
122
+ const handoffSrc = path.join(packageRoot, 'skills', 'intuition-handoff');
123
+ const handoffDest = path.join(claudeSkillsDir, 'intuition-handoff');
124
+
125
+ if (fs.existsSync(handoffSrc)) {
126
+ copyDirRecursive(handoffSrc, handoffDest);
127
+ log(`✓ Installed /intuition-handoff skill to ${handoffDest}`);
128
+ } else {
129
+ error(`intuition-handoff skill not found at ${handoffSrc}`);
130
+ process.exit(1);
131
+ }
132
+
133
+ // Verify installation
134
+ if (fs.existsSync(startDest) && fs.existsSync(planDest) && fs.existsSync(executeDest) && fs.existsSync(initializeDest) && fs.existsSync(discoveryDest) && fs.existsSync(handoffDest)) {
135
+ log(`✓ Installation complete!`);
136
+ log(`Skills are now available globally:`);
137
+ log(` /intuition-start - Load project context and enforce compliance`);
138
+ log(` /intuition-discovery - Discovery with Waldo (GAPP dialogue)`);
139
+ log(` /intuition-handoff - Handoff orchestrator (discovery→planning→execution)`);
140
+ log(` /intuition-plan - Planning with Magellan (strategic planning)`);
141
+ log(` /intuition-execute - Execution with Faraday (methodical implementation)`);
142
+ log(` /intuition-initialize - Project initialization (set up project memory)`);
143
+ log(`\nYou can now use these skills in any project with Claude Code.`);
144
+ } else {
145
+ error(`Verification failed - skills not properly installed`);
146
+ process.exit(1);
147
+ }
148
+
149
+ } catch (err) {
150
+ error(`Installation failed: ${err.message}`);
151
+ console.error(err);
152
+ process.exit(1);
153
+ }
@@ -1,82 +1,83 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Uninstallation script for Intuition skills
5
- *
6
- * This script is run before `npm uninstall -g intuition`
7
- * It removes the /plan and /execute skills from ~/.claude/skills/
8
- */
9
-
10
- const fs = require('fs');
11
- const path = require('path');
12
- const os = require('os');
13
-
14
- function removeDir(dirPath) {
15
- if (fs.existsSync(dirPath)) {
16
- fs.rmSync(dirPath, { recursive: true, force: true });
17
- return true;
18
- }
19
- return false;
20
- }
21
-
22
- function log(msg) {
23
- console.log(`[intuition-uninstall] ${msg}`);
24
- }
25
-
26
- function error(msg) {
27
- console.error(`[intuition-uninstall] ERROR: ${msg}`);
28
- }
29
-
30
- // Main uninstallation logic
31
- try {
32
- const homeDir = os.homedir();
33
- const claudeSkillsDir = path.join(homeDir, '.claude', 'skills');
34
-
35
- log(`Uninstalling Intuition skills...`);
36
- log(`Target directory: ${claudeSkillsDir}`);
37
-
38
- if (!fs.existsSync(claudeSkillsDir)) {
39
- log(`Skills directory not found - nothing to clean up`);
40
- process.exit(0);
41
- }
42
-
43
- // Remove all Intuition skills
44
- const skillsToRemove = [
45
- 'intuition-start',
46
- 'intuition-initialize',
47
- 'intuition-discovery',
48
- 'intuition-plan',
49
- 'intuition-execute'
50
- ];
51
-
52
- skillsToRemove.forEach(skillName => {
53
- const skillDest = path.join(claudeSkillsDir, skillName);
54
- if (removeDir(skillDest)) {
55
- log(`✓ Removed /${skillName} skill from ${skillDest}`);
56
- }
57
- });
58
-
59
- // Clean up empty .claude/skills directory if it's empty
60
- if (fs.existsSync(claudeSkillsDir)) {
61
- const remaining = fs.readdirSync(claudeSkillsDir);
62
- if (remaining.length === 0) {
63
- fs.rmSync(claudeSkillsDir, { force: true });
64
- log(`✓ Removed empty skills directory`);
65
-
66
- // Also clean up .claude if it's empty
67
- const claudeDir = path.join(homeDir, '.claude');
68
- const claudeRemaining = fs.readdirSync(claudeDir);
69
- if (claudeRemaining.length === 0) {
70
- fs.rmSync(claudeDir, { force: true });
71
- log(`✓ Removed empty .claude directory`);
72
- }
73
- }
74
- }
75
-
76
- log(`✓ Uninstallation complete!`);
77
-
78
- } catch (err) {
79
- error(`Uninstallation failed: ${err.message}`);
80
- console.error(err);
81
- process.exit(1);
82
- }
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Uninstallation script for Intuition skills
5
+ *
6
+ * This script is run before `npm uninstall -g intuition`
7
+ * It removes the /plan and /execute skills from ~/.claude/skills/
8
+ */
9
+
10
+ const fs = require('fs');
11
+ const path = require('path');
12
+ const os = require('os');
13
+
14
+ function removeDir(dirPath) {
15
+ if (fs.existsSync(dirPath)) {
16
+ fs.rmSync(dirPath, { recursive: true, force: true });
17
+ return true;
18
+ }
19
+ return false;
20
+ }
21
+
22
+ function log(msg) {
23
+ console.log(`[intuition-uninstall] ${msg}`);
24
+ }
25
+
26
+ function error(msg) {
27
+ console.error(`[intuition-uninstall] ERROR: ${msg}`);
28
+ }
29
+
30
+ // Main uninstallation logic
31
+ try {
32
+ const homeDir = os.homedir();
33
+ const claudeSkillsDir = path.join(homeDir, '.claude', 'skills');
34
+
35
+ log(`Uninstalling Intuition skills...`);
36
+ log(`Target directory: ${claudeSkillsDir}`);
37
+
38
+ if (!fs.existsSync(claudeSkillsDir)) {
39
+ log(`Skills directory not found - nothing to clean up`);
40
+ process.exit(0);
41
+ }
42
+
43
+ // Remove all Intuition skills
44
+ const skillsToRemove = [
45
+ 'intuition-start',
46
+ 'intuition-initialize',
47
+ 'intuition-discovery',
48
+ 'intuition-handoff',
49
+ 'intuition-plan',
50
+ 'intuition-execute'
51
+ ];
52
+
53
+ skillsToRemove.forEach(skillName => {
54
+ const skillDest = path.join(claudeSkillsDir, skillName);
55
+ if (removeDir(skillDest)) {
56
+ log(`✓ Removed /${skillName} skill from ${skillDest}`);
57
+ }
58
+ });
59
+
60
+ // Clean up empty .claude/skills directory if it's empty
61
+ if (fs.existsSync(claudeSkillsDir)) {
62
+ const remaining = fs.readdirSync(claudeSkillsDir);
63
+ if (remaining.length === 0) {
64
+ fs.rmSync(claudeSkillsDir, { force: true });
65
+ log(`✓ Removed empty skills directory`);
66
+
67
+ // Also clean up .claude if it's empty
68
+ const claudeDir = path.join(homeDir, '.claude');
69
+ const claudeRemaining = fs.readdirSync(claudeDir);
70
+ if (claudeRemaining.length === 0) {
71
+ fs.rmSync(claudeDir, { force: true });
72
+ log(`✓ Removed empty .claude directory`);
73
+ }
74
+ }
75
+ }
76
+
77
+ log(`✓ Uninstallation complete!`);
78
+
79
+ } catch (err) {
80
+ error(`Uninstallation failed: ${err.message}`);
81
+ console.error(err);
82
+ process.exit(1);
83
+ }