@wbern/claude-instructions 2.3.0 → 2.4.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.
- package/README.md +1 -6
- package/bin/cli.js +49 -15
- package/package.json +9 -12
- package/src/README.md +0 -6
package/README.md
CHANGED
|
@@ -82,6 +82,7 @@ This ensures commands are regenerated whenever anyone runs `npm install`, `pnpm
|
|
|
82
82
|
| `--overwrite` | Overwrite conflicting files without prompting |
|
|
83
83
|
| `--skip-on-conflict` | Skip conflicting files without prompting |
|
|
84
84
|
| `--flags=beads,github` | Enable feature flags (beads, github, gitlab, etc.) |
|
|
85
|
+
| `--allowed-tools=Bash(git diff:*),Bash(git status:*)` | Pre-approve tools for commands (non-interactive mode) |
|
|
85
86
|
| `--help, -h` | Show help message |
|
|
86
87
|
| `--version, -v` | Show version number |
|
|
87
88
|
|
|
@@ -173,12 +174,6 @@ flowchart TB
|
|
|
173
174
|
Ship --> Done([✅ Done])
|
|
174
175
|
Show --> Done
|
|
175
176
|
Ask --> Done
|
|
176
|
-
|
|
177
|
-
style Start fill:#e1f5ff
|
|
178
|
-
style Step1 fill:#fff4e6
|
|
179
|
-
style Step2 fill:#e8f5e9
|
|
180
|
-
style Step3 fill:#fce4ec
|
|
181
|
-
style Done fill:#c8e6c9
|
|
182
177
|
```
|
|
183
178
|
|
|
184
179
|
## Available Commands
|
package/bin/cli.js
CHANGED
|
@@ -117,18 +117,18 @@ import { createRequire } from "module";
|
|
|
117
117
|
|
|
118
118
|
// scripts/cli.ts
|
|
119
119
|
init_esm_shims();
|
|
120
|
+
import os2 from "os";
|
|
120
121
|
import {
|
|
121
|
-
|
|
122
|
-
text,
|
|
122
|
+
confirm,
|
|
123
123
|
groupMultiselect,
|
|
124
|
-
isCancel,
|
|
125
124
|
intro,
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
isCancel,
|
|
126
|
+
log,
|
|
128
127
|
note,
|
|
129
|
-
|
|
128
|
+
outro,
|
|
129
|
+
select,
|
|
130
|
+
text
|
|
130
131
|
} from "@clack/prompts";
|
|
131
|
-
import os2 from "os";
|
|
132
132
|
|
|
133
133
|
// node_modules/.pnpm/diff@8.0.2/node_modules/diff/libesm/index.js
|
|
134
134
|
init_esm_shims();
|
|
@@ -391,15 +391,17 @@ import * as v2 from "valibot";
|
|
|
391
391
|
|
|
392
392
|
// scripts/cli-generator.ts
|
|
393
393
|
init_esm_shims();
|
|
394
|
-
import
|
|
394
|
+
import os from "os";
|
|
395
395
|
import path4 from "path";
|
|
396
396
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
397
|
-
import
|
|
397
|
+
import fs4 from "fs-extra";
|
|
398
|
+
import { applyFixes } from "markdownlint";
|
|
399
|
+
import { lint } from "markdownlint/sync";
|
|
398
400
|
|
|
399
401
|
// scripts/fragment-expander.ts
|
|
400
402
|
init_esm_shims();
|
|
401
|
-
import fs2 from "fs-extra";
|
|
402
403
|
import path2 from "path";
|
|
404
|
+
import fs2 from "fs-extra";
|
|
403
405
|
|
|
404
406
|
// scripts/utils.ts
|
|
405
407
|
init_esm_shims();
|
|
@@ -523,6 +525,13 @@ var CLI_OPTIONS = [
|
|
|
523
525
|
description: "Enable feature flags (beads, github, gitlab, etc.)",
|
|
524
526
|
example: "--flags=beads,github"
|
|
525
527
|
},
|
|
528
|
+
{
|
|
529
|
+
flag: "--allowed-tools",
|
|
530
|
+
key: "allowedTools",
|
|
531
|
+
type: "array",
|
|
532
|
+
description: "Pre-approve tools for commands (non-interactive mode)",
|
|
533
|
+
example: "--allowed-tools=Bash(git diff:*),Bash(git status:*)"
|
|
534
|
+
},
|
|
526
535
|
{
|
|
527
536
|
flag: "--include-contrib-commands",
|
|
528
537
|
key: "includeContribCommands",
|
|
@@ -599,7 +608,7 @@ function parseFrontmatter(content) {
|
|
|
599
608
|
currentArray = [];
|
|
600
609
|
continue;
|
|
601
610
|
}
|
|
602
|
-
if (key === "_order" && !isNaN(Number(value))) {
|
|
611
|
+
if (key === "_order" && !Number.isNaN(Number(value))) {
|
|
603
612
|
value = parseInt(value, 10);
|
|
604
613
|
}
|
|
605
614
|
if (key === "_selectedByDefault") {
|
|
@@ -639,8 +648,6 @@ function generateCommandsMetadata() {
|
|
|
639
648
|
}
|
|
640
649
|
|
|
641
650
|
// scripts/cli-generator.ts
|
|
642
|
-
import { lint } from "markdownlint/sync";
|
|
643
|
-
import { applyFixes } from "markdownlint";
|
|
644
651
|
var __filename3 = fileURLToPath3(import.meta.url);
|
|
645
652
|
var __dirname3 = path4.dirname(__filename3);
|
|
646
653
|
var SCOPES = {
|
|
@@ -980,7 +987,9 @@ ${allowedToolsYaml}
|
|
|
980
987
|
if (template.commands && !template.commands.includes(commandName)) {
|
|
981
988
|
continue;
|
|
982
989
|
}
|
|
983
|
-
content = content
|
|
990
|
+
content = `${content}
|
|
991
|
+
|
|
992
|
+
${template.content}`;
|
|
984
993
|
modified = true;
|
|
985
994
|
}
|
|
986
995
|
if (modified) {
|
|
@@ -1140,6 +1149,7 @@ async function main(args) {
|
|
|
1140
1149
|
commandPrefix = args.prefix ?? "";
|
|
1141
1150
|
selectedCommands = args.commands;
|
|
1142
1151
|
selectedFlags = args.flags ? v2.parse(FlagsSchema, args.flags) : void 0;
|
|
1152
|
+
selectedAllowedTools = args.allowedTools;
|
|
1143
1153
|
if (args.updateExisting) {
|
|
1144
1154
|
cachedExistingFiles = await checkExistingFiles(void 0, scope, {
|
|
1145
1155
|
commandPrefix: commandPrefix || "",
|
|
@@ -1331,6 +1341,30 @@ async function main(args) {
|
|
|
1331
1341
|
includeContribCommands: args?.includeContribCommands
|
|
1332
1342
|
});
|
|
1333
1343
|
const fullPath = scope === "project" ? `${process.cwd()}/.claude/commands` : `${os2.homedir()}/.claude/commands`;
|
|
1344
|
+
const isInteractiveMode = !args?.scope;
|
|
1345
|
+
let automationNote = "";
|
|
1346
|
+
if (isInteractiveMode) {
|
|
1347
|
+
const parts = ["npx @wbern/claude-instructions"];
|
|
1348
|
+
parts.push(`--scope=${scope}`);
|
|
1349
|
+
if (commandPrefix) {
|
|
1350
|
+
parts.push(`--prefix=${commandPrefix}`);
|
|
1351
|
+
}
|
|
1352
|
+
if (selectedFlags && selectedFlags.length > 0) {
|
|
1353
|
+
parts.push(`--flags=${selectedFlags.join(",")}`);
|
|
1354
|
+
}
|
|
1355
|
+
if (selectedCommands && selectedCommands.length > 0) {
|
|
1356
|
+
parts.push(`--commands=${selectedCommands.join(",")}`);
|
|
1357
|
+
}
|
|
1358
|
+
if (selectedAllowedTools && selectedAllowedTools.length > 0) {
|
|
1359
|
+
parts.push(
|
|
1360
|
+
`--allowed-tools="${selectedAllowedTools.join(",")}"`
|
|
1361
|
+
);
|
|
1362
|
+
}
|
|
1363
|
+
automationNote = `
|
|
1364
|
+
|
|
1365
|
+
To automate this setup:
|
|
1366
|
+
${parts.join(" ")}`;
|
|
1367
|
+
}
|
|
1334
1368
|
outro(
|
|
1335
1369
|
`Installed ${result.filesGenerated} commands to ${fullPath}
|
|
1336
1370
|
|
|
@@ -1342,7 +1376,7 @@ Try it out:
|
|
|
1342
1376
|
/red 1 returns "1" \u2192 Write first failing test for your kata
|
|
1343
1377
|
/green \u2192 Make it pass
|
|
1344
1378
|
|
|
1345
|
-
See a full example: https://github.com/wbern/claude-instructions#example-conversations
|
|
1379
|
+
See a full example: https://github.com/wbern/claude-instructions#example-conversations${automationNote}
|
|
1346
1380
|
|
|
1347
1381
|
Happy coding!`
|
|
1348
1382
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wbern/claude-instructions",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "TDD workflow commands for Claude Code CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./bin/cli.js",
|
|
@@ -44,30 +44,27 @@
|
|
|
44
44
|
"prepare": "husky"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@
|
|
47
|
+
"@biomejs/biome": "^2.3.10",
|
|
48
48
|
"@semantic-release/git": "^10.0.1",
|
|
49
49
|
"@types/fs-extra": "^11.0.4",
|
|
50
|
-
"@types/node": "^
|
|
51
|
-
"@vitest/coverage-v8": "^4.0.
|
|
50
|
+
"@types/node": "^25.0.3",
|
|
51
|
+
"@vitest/coverage-v8": "^4.0.16",
|
|
52
52
|
"diff": "^8.0.2",
|
|
53
|
-
"eslint": "^9.39.1",
|
|
54
53
|
"husky": "^9.1.7",
|
|
55
54
|
"jscpd": "^4.0.5",
|
|
56
|
-
"knip": "^5.
|
|
55
|
+
"knip": "^5.77.0",
|
|
57
56
|
"lint-staged": "^16.2.7",
|
|
58
|
-
"markdownlint-cli": "^0.
|
|
57
|
+
"markdownlint-cli": "^0.47.0",
|
|
59
58
|
"picocolors": "^1.1.1",
|
|
60
|
-
"prettier": "^3.7.2",
|
|
61
59
|
"semantic-release": "^25.0.2",
|
|
62
60
|
"tsup": "^8.5.1",
|
|
63
|
-
"tsx": "^4.
|
|
61
|
+
"tsx": "^4.21.0",
|
|
64
62
|
"typescript": "^5.9.3",
|
|
65
|
-
"
|
|
66
|
-
"vitest": "^4.0.15"
|
|
63
|
+
"vitest": "^4.0.16"
|
|
67
64
|
},
|
|
68
65
|
"dependencies": {
|
|
69
66
|
"@clack/prompts": "^0.11.0",
|
|
70
|
-
"fs-extra": "^11.3.
|
|
67
|
+
"fs-extra": "^11.3.3",
|
|
71
68
|
"markdownlint": "^0.40.0",
|
|
72
69
|
"valibot": "^1.2.0"
|
|
73
70
|
},
|
package/src/README.md
CHANGED
|
@@ -163,12 +163,6 @@ flowchart TB
|
|
|
163
163
|
Ship --> Done([✅ Done])
|
|
164
164
|
Show --> Done
|
|
165
165
|
Ask --> Done
|
|
166
|
-
|
|
167
|
-
style Start fill:#e1f5ff
|
|
168
|
-
style Step1 fill:#fff4e6
|
|
169
|
-
style Step2 fill:#e8f5e9
|
|
170
|
-
style Step3 fill:#fce4ec
|
|
171
|
-
style Done fill:#c8e6c9
|
|
172
166
|
```
|
|
173
167
|
|
|
174
168
|
## Available Commands
|