@ckelsoe/prompt-architect 3.0.0 → 3.1.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 (76) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +264 -264
  4. package/LICENSE +21 -21
  5. package/README.md +1064 -1184
  6. package/adapters/README.md +75 -267
  7. package/adapters/for-windsurf.md +136 -136
  8. package/adapters/system-prompt.md +243 -243
  9. package/package.json +139 -135
  10. package/scripts/build-skill.js +64 -0
  11. package/scripts/install.js +35 -56
  12. package/scripts/test.js +205 -213
  13. package/scripts/validate-skill.js +350 -350
  14. package/skills/prompt-architect/SKILL.md +331 -331
  15. package/skills/prompt-architect/assets/templates/ape_template.txt +5 -5
  16. package/skills/prompt-architect/assets/templates/bab_template.txt +15 -15
  17. package/skills/prompt-architect/assets/templates/broke_template.txt +15 -15
  18. package/skills/prompt-architect/assets/templates/cai-critique-revise_template.txt +18 -18
  19. package/skills/prompt-architect/assets/templates/care_template.txt +16 -16
  20. package/skills/prompt-architect/assets/templates/chain-of-density_template.txt +46 -46
  21. package/skills/prompt-architect/assets/templates/chain-of-thought_template.txt +49 -49
  22. package/skills/prompt-architect/assets/templates/co-star_template.txt +17 -17
  23. package/skills/prompt-architect/assets/templates/crispe_template.txt +14 -14
  24. package/skills/prompt-architect/assets/templates/ctf_template.txt +15 -15
  25. package/skills/prompt-architect/assets/templates/devils-advocate_template.txt +25 -25
  26. package/skills/prompt-architect/assets/templates/hybrid_template.txt +101 -101
  27. package/skills/prompt-architect/assets/templates/least-to-most_template.txt +16 -16
  28. package/skills/prompt-architect/assets/templates/plan-and-solve_template.txt +7 -7
  29. package/skills/prompt-architect/assets/templates/pre-mortem_template.txt +27 -27
  30. package/skills/prompt-architect/assets/templates/race_template.txt +19 -19
  31. package/skills/prompt-architect/assets/templates/rcot_template.txt +31 -31
  32. package/skills/prompt-architect/assets/templates/react_template.txt +27 -27
  33. package/skills/prompt-architect/assets/templates/reverse-role_template.txt +11 -11
  34. package/skills/prompt-architect/assets/templates/rise-ie_template.txt +23 -23
  35. package/skills/prompt-architect/assets/templates/rise-ix_template.txt +28 -28
  36. package/skills/prompt-architect/assets/templates/risen_template.txt +21 -21
  37. package/skills/prompt-architect/assets/templates/rpef_template.txt +26 -26
  38. package/skills/prompt-architect/assets/templates/rtf_template.txt +13 -13
  39. package/skills/prompt-architect/assets/templates/self-refine_template.txt +16 -16
  40. package/skills/prompt-architect/assets/templates/skeleton-of-thought_template.txt +15 -15
  41. package/skills/prompt-architect/assets/templates/step-back_template.txt +10 -10
  42. package/skills/prompt-architect/assets/templates/tidd-ec_template.txt +45 -45
  43. package/skills/prompt-architect/assets/templates/tree-of-thought_template.txt +30 -30
  44. package/skills/prompt-architect/references/frameworks/ape.md +200 -200
  45. package/skills/prompt-architect/references/frameworks/bab.md +242 -242
  46. package/skills/prompt-architect/references/frameworks/broke.md +242 -242
  47. package/skills/prompt-architect/references/frameworks/cai-critique-revise.md +230 -230
  48. package/skills/prompt-architect/references/frameworks/care.md +235 -235
  49. package/skills/prompt-architect/references/frameworks/chain-of-density.md +479 -479
  50. package/skills/prompt-architect/references/frameworks/chain-of-thought.md +424 -424
  51. package/skills/prompt-architect/references/frameworks/co-star.md +256 -256
  52. package/skills/prompt-architect/references/frameworks/crispe.md +253 -253
  53. package/skills/prompt-architect/references/frameworks/ctf.md +207 -207
  54. package/skills/prompt-architect/references/frameworks/devils-advocate.md +206 -206
  55. package/skills/prompt-architect/references/frameworks/least-to-most.md +226 -226
  56. package/skills/prompt-architect/references/frameworks/plan-and-solve.md +210 -210
  57. package/skills/prompt-architect/references/frameworks/pre-mortem.md +197 -197
  58. package/skills/prompt-architect/references/frameworks/race.md +243 -243
  59. package/skills/prompt-architect/references/frameworks/rcot.md +203 -203
  60. package/skills/prompt-architect/references/frameworks/react.md +304 -304
  61. package/skills/prompt-architect/references/frameworks/reverse-role.md +189 -189
  62. package/skills/prompt-architect/references/frameworks/rise.md +555 -555
  63. package/skills/prompt-architect/references/frameworks/risen.md +297 -297
  64. package/skills/prompt-architect/references/frameworks/rpef.md +195 -195
  65. package/skills/prompt-architect/references/frameworks/rtf.md +358 -358
  66. package/skills/prompt-architect/references/frameworks/self-refine.md +205 -205
  67. package/skills/prompt-architect/references/frameworks/skeleton-of-thought.md +186 -186
  68. package/skills/prompt-architect/references/frameworks/step-back.md +206 -206
  69. package/skills/prompt-architect/references/frameworks/tidd-ec.md +470 -470
  70. package/skills/prompt-architect/references/frameworks/tree-of-thought.md +260 -260
  71. package/skills/prompt-architect/scripts/framework_analyzer.py +807 -807
  72. package/skills/prompt-architect/scripts/prompt_evaluator.py +336 -336
  73. package/adapters/for-cursor.mdc +0 -138
  74. package/adapters/for-gemini-cli.md +0 -70
  75. package/adapters/for-github-copilot.md +0 -141
  76. package/adapters/for-openai-codex-cli.md +0 -158
package/scripts/test.js CHANGED
@@ -1,213 +1,205 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Test Script
5
- *
6
- * Runs basic tests to verify the skill package is properly configured.
7
- */
8
-
9
- const fs = require('fs');
10
- const path = require('path');
11
-
12
- const colors = {
13
- reset: '\x1b[0m',
14
- red: '\x1b[31m',
15
- green: '\x1b[32m',
16
- yellow: '\x1b[33m',
17
- blue: '\x1b[34m',
18
- };
19
-
20
- function log(message, color = 'reset') {
21
- console.log(`${colors[color]}${message}${colors.reset}`);
22
- }
23
-
24
- log('\n🧪 Running tests for Prompt Architect skill...\n', 'blue');
25
-
26
- let passed = 0;
27
- let failed = 0;
28
-
29
- function test(description, fn) {
30
- try {
31
- fn();
32
- log(`✅ ${description}`, 'green');
33
- passed++;
34
- } catch (error) {
35
- log(`❌ ${description}`, 'red');
36
- log(` ${error.message}`, 'red');
37
- failed++;
38
- }
39
- }
40
-
41
- // Tests
42
- test('package.json exists', () => {
43
- if (!fs.existsSync('package.json')) throw new Error('Not found');
44
- });
45
-
46
- test('package.json is valid JSON', () => {
47
- JSON.parse(fs.readFileSync('package.json', 'utf8'));
48
- });
49
-
50
- test('SKILL.md exists', () => {
51
- if (!fs.existsSync('skills/prompt-architect/SKILL.md')) throw new Error('Not found');
52
- });
53
-
54
- test('LICENSE exists', () => {
55
- if (!fs.existsSync('LICENSE')) throw new Error('Not found');
56
- });
57
-
58
- test('README.md exists', () => {
59
- if (!fs.existsSync('README.md')) throw new Error('Not found');
60
- });
61
-
62
- test('CHANGELOG.md exists', () => {
63
- if (!fs.existsSync('CHANGELOG.md')) throw new Error('Not found');
64
- });
65
-
66
- test('All framework files exist', () => {
67
- const frameworks = [
68
- 'co-star.md',
69
- 'risen.md',
70
- 'rise.md',
71
- 'tidd-ec.md',
72
- 'rtf.md',
73
- 'chain-of-thought.md',
74
- 'chain-of-density.md',
75
- ];
76
- frameworks.forEach(f => {
77
- const fpath = path.join('skills', 'prompt-architect', 'references', 'frameworks', f);
78
- if (!fs.existsSync(fpath)) {
79
- throw new Error(`Framework ${f} not found`);
80
- }
81
- });
82
- });
83
-
84
- test('All templates exist', () => {
85
- const templates = [
86
- 'co-star_template.txt',
87
- 'risen_template.txt',
88
- 'rise-ie_template.txt',
89
- 'rise-ix_template.txt',
90
- 'tidd-ec_template.txt',
91
- 'rtf_template.txt',
92
- 'hybrid_template.txt',
93
- ];
94
- templates.forEach(t => {
95
- const tpath = path.join('skills', 'prompt-architect', 'assets', 'templates', t);
96
- if (!fs.existsSync(tpath)) {
97
- throw new Error(`Template ${t} not found`);
98
- }
99
- });
100
- });
101
-
102
- test('Python scripts exist', () => {
103
- const scripts = ['framework_analyzer.py', 'prompt_evaluator.py'];
104
- scripts.forEach(s => {
105
- const spath = path.join('skills', 'prompt-architect', 'scripts', s);
106
- if (!fs.existsSync(spath)) {
107
- throw new Error(`Script ${s} not found`);
108
- }
109
- });
110
- });
111
-
112
- test('package.json has required fields', () => {
113
- const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
114
- const required = ['name', 'version', 'description', 'main', 'keywords', 'license'];
115
- required.forEach(field => {
116
- if (!pkg[field]) throw new Error(`Missing field: ${field}`);
117
- });
118
- });
119
-
120
- test('package.json keywords include "claude-code"', () => {
121
- const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
122
- if (!pkg.keywords || !pkg.keywords.includes('claude-code')) {
123
- throw new Error('Missing "claude-code" keyword');
124
- }
125
- });
126
-
127
- // Plugin manifest tests
128
- test('.claude-plugin/plugin.json exists and is valid', () => {
129
- const pluginPath = '.claude-plugin/plugin.json';
130
- if (!fs.existsSync(pluginPath)) throw new Error('Not found');
131
- const plugin = JSON.parse(fs.readFileSync(pluginPath, 'utf8'));
132
- if (!plugin.name) throw new Error('Missing name');
133
- if (!plugin.description) throw new Error('Missing description');
134
- if (!plugin.version) throw new Error('Missing version');
135
- });
136
-
137
- test('.claude-plugin/marketplace.json exists and is valid', () => {
138
- const mktPath = '.claude-plugin/marketplace.json';
139
- if (!fs.existsSync(mktPath)) throw new Error('Not found');
140
- const mkt = JSON.parse(fs.readFileSync(mktPath, 'utf8'));
141
- if (!mkt.name) throw new Error('Missing name');
142
- if (!mkt.owner) throw new Error('Missing owner');
143
- if (!mkt.plugins || mkt.plugins.length === 0) throw new Error('No plugins defined');
144
- });
145
-
146
- test('plugin.json version matches package.json version', () => {
147
- const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
148
- const plugin = JSON.parse(fs.readFileSync('.claude-plugin/plugin.json', 'utf8'));
149
- if (pkg.version !== plugin.version) {
150
- throw new Error(`Version mismatch: package.json=${pkg.version}, plugin.json=${plugin.version}`);
151
- }
152
- });
153
-
154
- // Adapter tests
155
- test('Gemini CLI adapter exists', () => {
156
- if (!fs.existsSync('adapters/for-gemini-cli.md')) throw new Error('Not found');
157
- });
158
-
159
- test('All adapter files exist', () => {
160
- const adapters = [
161
- 'system-prompt.md',
162
- 'for-openai-codex-cli.md',
163
- 'for-cursor.mdc',
164
- 'for-github-copilot.md',
165
- 'for-windsurf.md',
166
- 'for-gemini-cli.md',
167
- 'README.md',
168
- ];
169
- adapters.forEach(a => {
170
- if (!fs.existsSync(path.join('adapters', a))) throw new Error(`Adapter ${a} not found`);
171
- });
172
- });
173
-
174
- // Agent Skills compliance tests
175
- test('SKILL.md has Agent Skills required fields', () => {
176
- const content = fs.readFileSync('skills/prompt-architect/SKILL.md', 'utf8');
177
- const fm = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
178
- if (!fm) throw new Error('No frontmatter');
179
- if (!fm[1].includes('name:')) throw new Error('Missing name');
180
- if (!fm[1].includes('description:')) throw new Error('Missing description');
181
- });
182
-
183
- test('SKILL.md has optional Agent Skills fields', () => {
184
- const content = fs.readFileSync('skills/prompt-architect/SKILL.md', 'utf8');
185
- const fm = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
186
- if (!fm) throw new Error('No frontmatter');
187
- if (!fm[1].includes('license:')) throw new Error('Missing license');
188
- if (!fm[1].includes('compatibility:')) throw new Error('Missing compatibility');
189
- if (!fm[1].includes('metadata:')) throw new Error('Missing metadata');
190
- });
191
-
192
- test('SKILL.md name matches directory name', () => {
193
- const content = fs.readFileSync('skills/prompt-architect/SKILL.md', 'utf8');
194
- const nameMatch = content.match(/name:\s*([^\n\r]+)/);
195
- if (!nameMatch) throw new Error('No name field');
196
- if (nameMatch[1].trim() !== 'prompt-architect') {
197
- throw new Error(`Name "${nameMatch[1].trim()}" does not match directory "prompt-architect"`);
198
- }
199
- });
200
-
201
- // Summary
202
- log('\n' + '='.repeat(50), 'blue');
203
- log(`Tests completed: ${passed + failed} total`, 'blue');
204
- log(`✅ Passed: ${passed}`, 'green');
205
- if (failed > 0) {
206
- log(`❌ Failed: ${failed}`, 'red');
207
- log('='.repeat(50) + '\n', 'blue');
208
- process.exit(1);
209
- } else {
210
- log('='.repeat(50), 'blue');
211
- log('\n✨ All tests passed!\n', 'green');
212
- process.exit(0);
213
- }
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Test Script
5
+ *
6
+ * Runs basic tests to verify the skill package is properly configured.
7
+ */
8
+
9
+ const fs = require('fs');
10
+ const path = require('path');
11
+
12
+ const colors = {
13
+ reset: '\x1b[0m',
14
+ red: '\x1b[31m',
15
+ green: '\x1b[32m',
16
+ yellow: '\x1b[33m',
17
+ blue: '\x1b[34m',
18
+ };
19
+
20
+ function log(message, color = 'reset') {
21
+ console.log(`${colors[color]}${message}${colors.reset}`);
22
+ }
23
+
24
+ log('\n🧪 Running tests for Prompt Architect skill...\n', 'blue');
25
+
26
+ let passed = 0;
27
+ let failed = 0;
28
+
29
+ function test(description, fn) {
30
+ try {
31
+ fn();
32
+ log(`✅ ${description}`, 'green');
33
+ passed++;
34
+ } catch (error) {
35
+ log(`❌ ${description}`, 'red');
36
+ log(` ${error.message}`, 'red');
37
+ failed++;
38
+ }
39
+ }
40
+
41
+ // Tests
42
+ test('package.json exists', () => {
43
+ if (!fs.existsSync('package.json')) throw new Error('Not found');
44
+ });
45
+
46
+ test('package.json is valid JSON', () => {
47
+ JSON.parse(fs.readFileSync('package.json', 'utf8'));
48
+ });
49
+
50
+ test('SKILL.md exists', () => {
51
+ if (!fs.existsSync('skills/prompt-architect/SKILL.md')) throw new Error('Not found');
52
+ });
53
+
54
+ test('LICENSE exists', () => {
55
+ if (!fs.existsSync('LICENSE')) throw new Error('Not found');
56
+ });
57
+
58
+ test('README.md exists', () => {
59
+ if (!fs.existsSync('README.md')) throw new Error('Not found');
60
+ });
61
+
62
+ test('CHANGELOG.md exists', () => {
63
+ if (!fs.existsSync('CHANGELOG.md')) throw new Error('Not found');
64
+ });
65
+
66
+ test('All framework files exist', () => {
67
+ const frameworks = [
68
+ 'co-star.md',
69
+ 'risen.md',
70
+ 'rise.md',
71
+ 'tidd-ec.md',
72
+ 'rtf.md',
73
+ 'chain-of-thought.md',
74
+ 'chain-of-density.md',
75
+ ];
76
+ frameworks.forEach(f => {
77
+ const fpath = path.join('skills', 'prompt-architect', 'references', 'frameworks', f);
78
+ if (!fs.existsSync(fpath)) {
79
+ throw new Error(`Framework ${f} not found`);
80
+ }
81
+ });
82
+ });
83
+
84
+ test('All templates exist', () => {
85
+ const templates = [
86
+ 'co-star_template.txt',
87
+ 'risen_template.txt',
88
+ 'rise-ie_template.txt',
89
+ 'rise-ix_template.txt',
90
+ 'tidd-ec_template.txt',
91
+ 'rtf_template.txt',
92
+ 'hybrid_template.txt',
93
+ ];
94
+ templates.forEach(t => {
95
+ const tpath = path.join('skills', 'prompt-architect', 'assets', 'templates', t);
96
+ if (!fs.existsSync(tpath)) {
97
+ throw new Error(`Template ${t} not found`);
98
+ }
99
+ });
100
+ });
101
+
102
+ test('Python scripts exist', () => {
103
+ const scripts = ['framework_analyzer.py', 'prompt_evaluator.py'];
104
+ scripts.forEach(s => {
105
+ const spath = path.join('skills', 'prompt-architect', 'scripts', s);
106
+ if (!fs.existsSync(spath)) {
107
+ throw new Error(`Script ${s} not found`);
108
+ }
109
+ });
110
+ });
111
+
112
+ test('package.json has required fields', () => {
113
+ const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
114
+ const required = ['name', 'version', 'description', 'main', 'keywords', 'license'];
115
+ required.forEach(field => {
116
+ if (!pkg[field]) throw new Error(`Missing field: ${field}`);
117
+ });
118
+ });
119
+
120
+ test('package.json keywords include "claude-code"', () => {
121
+ const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
122
+ if (!pkg.keywords || !pkg.keywords.includes('claude-code')) {
123
+ throw new Error('Missing "claude-code" keyword');
124
+ }
125
+ });
126
+
127
+ // Plugin manifest tests
128
+ test('.claude-plugin/plugin.json exists and is valid', () => {
129
+ const pluginPath = '.claude-plugin/plugin.json';
130
+ if (!fs.existsSync(pluginPath)) throw new Error('Not found');
131
+ const plugin = JSON.parse(fs.readFileSync(pluginPath, 'utf8'));
132
+ if (!plugin.name) throw new Error('Missing name');
133
+ if (!plugin.description) throw new Error('Missing description');
134
+ if (!plugin.version) throw new Error('Missing version');
135
+ });
136
+
137
+ test('.claude-plugin/marketplace.json exists and is valid', () => {
138
+ const mktPath = '.claude-plugin/marketplace.json';
139
+ if (!fs.existsSync(mktPath)) throw new Error('Not found');
140
+ const mkt = JSON.parse(fs.readFileSync(mktPath, 'utf8'));
141
+ if (!mkt.name) throw new Error('Missing name');
142
+ if (!mkt.owner) throw new Error('Missing owner');
143
+ if (!mkt.plugins || mkt.plugins.length === 0) throw new Error('No plugins defined');
144
+ });
145
+
146
+ test('plugin.json version matches package.json version', () => {
147
+ const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
148
+ const plugin = JSON.parse(fs.readFileSync('.claude-plugin/plugin.json', 'utf8'));
149
+ if (pkg.version !== plugin.version) {
150
+ throw new Error(`Version mismatch: package.json=${pkg.version}, plugin.json=${plugin.version}`);
151
+ }
152
+ });
153
+
154
+ // Adapter tests
155
+ test('All adapter files exist', () => {
156
+ const adapters = [
157
+ 'system-prompt.md',
158
+ 'for-windsurf.md',
159
+ 'README.md',
160
+ ];
161
+ adapters.forEach(a => {
162
+ if (!fs.existsSync(path.join('adapters', a))) throw new Error(`Adapter ${a} not found`);
163
+ });
164
+ });
165
+
166
+ // Agent Skills compliance tests
167
+ test('SKILL.md has Agent Skills required fields', () => {
168
+ const content = fs.readFileSync('skills/prompt-architect/SKILL.md', 'utf8');
169
+ const fm = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
170
+ if (!fm) throw new Error('No frontmatter');
171
+ if (!fm[1].includes('name:')) throw new Error('Missing name');
172
+ if (!fm[1].includes('description:')) throw new Error('Missing description');
173
+ });
174
+
175
+ test('SKILL.md has optional Agent Skills fields', () => {
176
+ const content = fs.readFileSync('skills/prompt-architect/SKILL.md', 'utf8');
177
+ const fm = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
178
+ if (!fm) throw new Error('No frontmatter');
179
+ if (!fm[1].includes('license:')) throw new Error('Missing license');
180
+ if (!fm[1].includes('compatibility:')) throw new Error('Missing compatibility');
181
+ if (!fm[1].includes('metadata:')) throw new Error('Missing metadata');
182
+ });
183
+
184
+ test('SKILL.md name matches directory name', () => {
185
+ const content = fs.readFileSync('skills/prompt-architect/SKILL.md', 'utf8');
186
+ const nameMatch = content.match(/name:\s*([^\n\r]+)/);
187
+ if (!nameMatch) throw new Error('No name field');
188
+ if (nameMatch[1].trim() !== 'prompt-architect') {
189
+ throw new Error(`Name "${nameMatch[1].trim()}" does not match directory "prompt-architect"`);
190
+ }
191
+ });
192
+
193
+ // Summary
194
+ log('\n' + '='.repeat(50), 'blue');
195
+ log(`Tests completed: ${passed + failed} total`, 'blue');
196
+ log(`✅ Passed: ${passed}`, 'green');
197
+ if (failed > 0) {
198
+ log(`❌ Failed: ${failed}`, 'red');
199
+ log('='.repeat(50) + '\n', 'blue');
200
+ process.exit(1);
201
+ } else {
202
+ log('='.repeat(50), 'blue');
203
+ log('\n✨ All tests passed!\n', 'green');
204
+ process.exit(0);
205
+ }