@codihaus/claude-skills 1.6.28 → 1.6.30

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codihaus/claude-skills",
3
- "version": "1.6.28",
3
+ "version": "1.6.30",
4
4
  "description": "Claude Code skills for software development workflow",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: debrief
3
3
  description: Customer requirements → questionnaire (default) or BRD (with --answers flag)
4
- version: 5.3.1
4
+ version: 5.3.2
5
5
  ---
6
6
 
7
7
  # /debrief - Business Requirements Document
@@ -92,10 +92,14 @@ version: 5.3.1
92
92
  ### 4. Questionnaire = Decision Tool
93
93
 
94
94
  **How to generate**:
95
+ 1. Write JSON to temp file: `/tmp/debrief-questions-{timestamp}.json`
96
+ 2. Call Python script with file path:
95
97
  ```bash
96
- python .claude/skills/debrief/scripts/generate_questionnaire.py questionnaire-{YYYY-MM-DD}.xlsx -
98
+ python .claude/skills/debrief/scripts/generate_questionnaire.py \
99
+ plans/brd/use-cases/{feature-name}/questionnaire-{YYYY-MM-DD}.xlsx \
100
+ /tmp/debrief-questions-{timestamp}.json
97
101
  ```
98
- Pipe JSON to stdin with research data (see `references/workflow.md` for full JSON format).
102
+ (See `references/workflow.md` for full JSON format)
99
103
 
100
104
  **CRITICAL: Populate with real data**:
101
105
  - **questions array**: 2-5 questions per feature (validation + open questions)
@@ -168,6 +172,11 @@ AskUserQuestion, WebSearch, Glob, Read, Write, Bash
168
172
 
169
173
  ## Scripts
170
174
 
175
+ **Generate questionnaire from JSON file**:
171
176
  ```bash
172
- python .claude/skills/debrief/scripts/generate_questionnaire.py output.xlsx questions.json
177
+ python .claude/skills/debrief/scripts/generate_questionnaire.py \
178
+ plans/brd/use-cases/{feature}/questionnaire-{date}.xlsx \
179
+ /tmp/debrief-questions.json
173
180
  ```
181
+
182
+ **JSON file should be written to `/tmp/` first**, then passed to script.
@@ -82,8 +82,14 @@
82
82
 
83
83
  **How to generate**:
84
84
  1. Create JSON with research data (see format below)
85
- 2. Call Python script: `python .claude/skills/debrief/scripts/generate_questionnaire.py questionnaire-{YYYY-MM-DD}.xlsx -`
86
- 3. Pipe JSON to stdin or save as file
85
+ 2. **Write JSON to temp file**: `/tmp/debrief-questions-{timestamp}.json`
86
+ 3. **Call Python script with file path**:
87
+ ```bash
88
+ python .claude/skills/debrief/scripts/generate_questionnaire.py \
89
+ plans/brd/use-cases/{feature-name}/questionnaire-{YYYY-MM-DD}.xlsx \
90
+ /tmp/debrief-questions-{timestamp}.json
91
+ ```
92
+ 4. Python reads JSON from temp file and creates Excel in correct BRD location
87
93
 
88
94
  **CRITICAL: Populate questions array with TWO types:**
89
95
 
@@ -9,6 +9,7 @@ import ora from 'ora';
9
9
  import inquirer from 'inquirer';
10
10
  import path from 'path';
11
11
  import fs from 'fs-extra';
12
+ import { execSync } from 'child_process';
12
13
 
13
14
  import {
14
15
  checkGlobalDeps,
@@ -24,7 +25,9 @@ import {
24
25
  getInstalledSkills,
25
26
  copySkillsToProject,
26
27
  copyKnowledgeToProject,
27
- copyScriptsToProject
28
+ copyScriptsToProject,
29
+ checkForUpdates,
30
+ cleanupOldSkills
28
31
  } from '../utils/skills.js';
29
32
  import {
30
33
  setupSettings,
@@ -124,8 +127,88 @@ export async function init(options) {
124
127
  }
125
128
 
126
129
  if (action === 'update') {
127
- // TODO: Implement update logic
128
- console.log(chalk.cyan('Updating skills...'));
130
+ console.log('');
131
+
132
+ // Check for CLI package updates first
133
+ const packageSpinner = ora('Checking npm for latest CLI version...').start();
134
+ try {
135
+ const currentVersion = await getCurrentPackageVersion();
136
+ const latestVersion = await getLatestNpmVersion();
137
+
138
+ if (currentVersion !== latestVersion) {
139
+ packageSpinner.info(`CLI update available: ${currentVersion} → ${latestVersion}`);
140
+
141
+ // Auto-update the CLI package
142
+ const updateSpinner = ora('Updating CLI package...').start();
143
+ try {
144
+ execSync('npm install -g @codihaus/claude-skills@latest', {
145
+ encoding: 'utf8',
146
+ stdio: 'pipe'
147
+ });
148
+ updateSpinner.succeed(`CLI package updated to ${latestVersion}`);
149
+ console.log(chalk.green(`\n✅ Please re-run init to update skills with the new CLI version.\n`));
150
+ process.exit(0);
151
+ } catch (updateErr) {
152
+ updateSpinner.fail('Failed to update CLI package');
153
+ console.log(chalk.yellow(`\nTo update manually, run:\n npm install -g @codihaus/claude-skills@latest\n`));
154
+ }
155
+ } else {
156
+ packageSpinner.succeed(`CLI package is up to date (${currentVersion})`);
157
+ }
158
+ } catch (e) {
159
+ packageSpinner.warn('Could not check for CLI updates');
160
+ }
161
+
162
+ console.log('');
163
+
164
+ // Check for skill updates
165
+ const skillSpinner = ora('Checking for skill updates...').start();
166
+ const updates = await checkForUpdates(projectPath);
167
+ skillSpinner.stop();
168
+
169
+ if (updates.length === 0) {
170
+ console.log(chalk.green('✅ All skills are up to date!\n'));
171
+ process.exit(0);
172
+ }
173
+
174
+ console.log(chalk.cyan(`Found ${updates.length} skill update(s) available:\n`));
175
+
176
+ for (const update of updates) {
177
+ console.log(` ${update.name}`);
178
+ console.log(chalk.gray(` ${update.current} → ${update.available}`));
179
+ console.log('');
180
+ }
181
+
182
+ // Apply skill updates
183
+ const updateSkillsSpinner = ora('Updating skills...').start();
184
+
185
+ try {
186
+ const skillNames = updates.map(u => u.name);
187
+
188
+ // Clean up old files first
189
+ updateSkillsSpinner.text = 'Cleaning up old skill files...';
190
+ await cleanupOldSkills(projectPath, skillNames);
191
+
192
+ // Copy new versions
193
+ updateSkillsSpinner.text = 'Installing updated skills...';
194
+ const { copied, errors } = await copySkillsToProject(projectPath, skillNames);
195
+
196
+ if (errors.length > 0) {
197
+ updateSkillsSpinner.warn(`Updated ${copied.length} skills with ${errors.length} errors`);
198
+ for (const err of errors) {
199
+ console.log(chalk.red(` ✗ ${err.name}: ${err.error}`));
200
+ }
201
+ } else {
202
+ updateSkillsSpinner.succeed(`Updated ${copied.length} skills`);
203
+ }
204
+ } catch (e) {
205
+ updateSkillsSpinner.fail('Update failed');
206
+ console.error(chalk.red(e.message));
207
+ process.exit(1);
208
+ }
209
+
210
+ console.log(chalk.green('\n✅ Update complete!\n'));
211
+ process.exit(0);
129
212
  }
130
213
  }
131
214
 
@@ -409,3 +492,30 @@ export async function init(options) {
409
492
  console.log('');
410
493
  }
411
494
  }
495
+
496
+ /**
497
+ * Get current package version
498
+ */
499
+ async function getCurrentPackageVersion() {
500
+ try {
501
+ const packageJson = await fs.readJson(path.join(import.meta.dirname, '../../package.json'));
502
+ return packageJson.version;
503
+ } catch (e) {
504
+ return 'unknown';
505
+ }
506
+ }
507
+
508
+ /**
509
+ * Get latest version from npm
510
+ */
511
+ async function getLatestNpmVersion() {
512
+ try {
513
+ const result = execSync('npm view @codihaus/claude-skills version', {
514
+ encoding: 'utf8',
515
+ stdio: ['pipe', 'pipe', 'ignore']
516
+ });
517
+ return result.trim();
518
+ } catch (e) {
519
+ throw new Error('Could not fetch latest version from npm');
520
+ }
521
+ }
@@ -25,7 +25,21 @@ export async function update(options) {
25
25
 
26
26
  if (currentVersion !== latestVersion) {
27
27
  packageSpinner.info(`Package update available: ${currentVersion} → ${latestVersion}`);
28
- console.log(chalk.yellow(`\nTo update the CLI package, run:\n npm install -g @codihaus/claude-skills@latest\n`));
28
+
29
+ // Auto-update the CLI package
30
+ const updateSpinner = ora('Updating CLI package...').start();
31
+ try {
32
+ execSync('npm install -g @codihaus/claude-skills@latest', {
33
+ encoding: 'utf8',
34
+ stdio: 'pipe'
35
+ });
36
+ updateSpinner.succeed(`CLI package updated to ${latestVersion}`);
37
+ console.log(chalk.green(`\n✅ Please re-run this command to update skills with the new CLI version.\n`));
38
+ process.exit(0);
39
+ } catch (updateErr) {
40
+ updateSpinner.fail('Failed to update CLI package');
41
+ console.log(chalk.yellow(`\nTo update manually, run:\n npm install -g @codihaus/claude-skills@latest\n`));
42
+ }
29
43
  } else {
30
44
  packageSpinner.succeed(`CLI package is up to date (${currentVersion})`);
31
45
  }