@wbern/claude-instructions 2.2.1 → 2.4.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.
- package/README.md +4 -9
- package/bin/cli.js +40 -2
- package/package.json +14 -3
- package/src/README.md +2 -8
- package/src/sources/{plan.md → create-issues.md} +7 -7
- /package/src/fragments/{plan-beads-context-hint.md → create-issues-beads-context-hint.md} +0 -0
- /package/src/fragments/{plan-beads-details.md → create-issues-beads-details.md} +0 -0
- /package/src/fragments/{plan-beads-integration.md → create-issues-beads-integration.md} +0 -0
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
|
|
|
@@ -145,10 +146,10 @@ flowchart TB
|
|
|
145
146
|
Start --> Step1[<b>1. PLAN</b>]
|
|
146
147
|
|
|
147
148
|
Step1 --> Issue[📋 /issue<br/>Have GitHub issue<br/><i>Requires: GitHub MCP</i>]
|
|
148
|
-
Step1 -->
|
|
149
|
+
Step1 --> CreateIssues[📝 /create-issues<br/>No issue yet<br/><i>Optional: Beads MCP</i>]
|
|
149
150
|
|
|
150
151
|
Issue --> Step2[<b>2. CODE with TDD</b>]
|
|
151
|
-
|
|
152
|
+
CreateIssues --> Step2
|
|
152
153
|
|
|
153
154
|
Step2 -->|Manual| Red[🔴 /red<br/>Write failing test]
|
|
154
155
|
Red --> Green[🟢 /green<br/>Make it pass]
|
|
@@ -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
|
|
@@ -186,7 +181,7 @@ flowchart TB
|
|
|
186
181
|
### Planning
|
|
187
182
|
|
|
188
183
|
- `/issue` - Analyze GitHub issue and create TDD implementation plan
|
|
189
|
-
- `/
|
|
184
|
+
- `/create-issues` - Create implementation plan from feature/requirement with PRD-style discovery and TDD acceptance criteria
|
|
190
185
|
|
|
191
186
|
### Test-Driven Development
|
|
192
187
|
|
package/bin/cli.js
CHANGED
|
@@ -523,6 +523,13 @@ var CLI_OPTIONS = [
|
|
|
523
523
|
description: "Enable feature flags (beads, github, gitlab, etc.)",
|
|
524
524
|
example: "--flags=beads,github"
|
|
525
525
|
},
|
|
526
|
+
{
|
|
527
|
+
flag: "--allowed-tools",
|
|
528
|
+
key: "allowedTools",
|
|
529
|
+
type: "array",
|
|
530
|
+
description: "Pre-approve tools for commands (non-interactive mode)",
|
|
531
|
+
example: "--allowed-tools=Bash(git diff:*),Bash(git status:*)"
|
|
532
|
+
},
|
|
526
533
|
{
|
|
527
534
|
flag: "--include-contrib-commands",
|
|
528
535
|
key: "includeContribCommands",
|
|
@@ -1140,6 +1147,7 @@ async function main(args) {
|
|
|
1140
1147
|
commandPrefix = args.prefix ?? "";
|
|
1141
1148
|
selectedCommands = args.commands;
|
|
1142
1149
|
selectedFlags = args.flags ? v2.parse(FlagsSchema, args.flags) : void 0;
|
|
1150
|
+
selectedAllowedTools = args.allowedTools;
|
|
1143
1151
|
if (args.updateExisting) {
|
|
1144
1152
|
cachedExistingFiles = await checkExistingFiles(void 0, scope, {
|
|
1145
1153
|
commandPrefix: commandPrefix || "",
|
|
@@ -1331,14 +1339,44 @@ async function main(args) {
|
|
|
1331
1339
|
includeContribCommands: args?.includeContribCommands
|
|
1332
1340
|
});
|
|
1333
1341
|
const fullPath = scope === "project" ? `${process.cwd()}/.claude/commands` : `${os2.homedir()}/.claude/commands`;
|
|
1342
|
+
const isInteractiveMode = !args?.scope;
|
|
1343
|
+
let automationNote = "";
|
|
1344
|
+
if (isInteractiveMode) {
|
|
1345
|
+
const parts = ["npx @wbern/claude-instructions"];
|
|
1346
|
+
parts.push(`--scope=${scope}`);
|
|
1347
|
+
if (commandPrefix) {
|
|
1348
|
+
parts.push(`--prefix=${commandPrefix}`);
|
|
1349
|
+
}
|
|
1350
|
+
if (selectedFlags && selectedFlags.length > 0) {
|
|
1351
|
+
parts.push(`--flags=${selectedFlags.join(",")}`);
|
|
1352
|
+
}
|
|
1353
|
+
if (selectedCommands && selectedCommands.length > 0) {
|
|
1354
|
+
parts.push(`--commands=${selectedCommands.join(",")}`);
|
|
1355
|
+
}
|
|
1356
|
+
if (selectedAllowedTools && selectedAllowedTools.length > 0) {
|
|
1357
|
+
parts.push(
|
|
1358
|
+
`--allowed-tools=${selectedAllowedTools.join(",")}`
|
|
1359
|
+
);
|
|
1360
|
+
}
|
|
1361
|
+
automationNote = `
|
|
1362
|
+
|
|
1363
|
+
To automate this setup:
|
|
1364
|
+
${parts.join(" ")}`;
|
|
1365
|
+
}
|
|
1334
1366
|
outro(
|
|
1335
1367
|
`Installed ${result.filesGenerated} commands to ${fullPath}
|
|
1336
1368
|
|
|
1337
1369
|
If Claude Code is already running, restart it to pick up the new commands.
|
|
1338
1370
|
|
|
1339
|
-
Try it out:
|
|
1371
|
+
Try it out:
|
|
1372
|
+
|
|
1373
|
+
/kata \u2192 Pick a practice challenge
|
|
1374
|
+
/red 1 returns "1" \u2192 Write first failing test for your kata
|
|
1375
|
+
/green \u2192 Make it pass
|
|
1376
|
+
|
|
1377
|
+
See a full example: https://github.com/wbern/claude-instructions#example-conversations${automationNote}
|
|
1340
1378
|
|
|
1341
|
-
Happy
|
|
1379
|
+
Happy coding!`
|
|
1342
1380
|
);
|
|
1343
1381
|
}
|
|
1344
1382
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wbern/claude-instructions",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "TDD workflow commands for Claude Code CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./bin/cli.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "pnpm build:readme && pnpm build:commands && pnpm exec markdownlint --fix .claude/commands/*.md",
|
|
31
31
|
"build:readme": "tsx scripts/build.ts",
|
|
32
|
-
"build:commands": "pnpm build:cli && node bin/cli.js --scope=project --flags=beads,no-plan-files --include-contrib-commands --overwrite",
|
|
32
|
+
"build:commands": "pnpm build:cli && rm -f .claude/commands/*.md && node bin/cli.js --scope=project --flags=beads,no-plan-files --include-contrib-commands --overwrite",
|
|
33
33
|
"build:cli": "tsup",
|
|
34
34
|
"test:manual": "pnpm build:cli && TMPDIR=$(mktemp -d) && pnpm pack --pack-destination $TMPDIR && cd $TMPDIR && tar -xzf *.tgz && cd package && pnpm i && node bin/cli.js",
|
|
35
35
|
"test:quick-manual": "pnpm build:cli && node bin/cli.js",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@eslint/js": "^9.39.1",
|
|
48
|
+
"@semantic-release/git": "^10.0.1",
|
|
48
49
|
"@types/fs-extra": "^11.0.4",
|
|
49
50
|
"@types/node": "^24.10.1",
|
|
50
51
|
"@vitest/coverage-v8": "^4.0.15",
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
"markdownlint-cli": "^0.46.0",
|
|
58
59
|
"picocolors": "^1.1.1",
|
|
59
60
|
"prettier": "^3.7.2",
|
|
61
|
+
"semantic-release": "^25.0.2",
|
|
60
62
|
"tsup": "^8.5.1",
|
|
61
63
|
"tsx": "^4.20.6",
|
|
62
64
|
"typescript": "^5.9.3",
|
|
@@ -77,7 +79,16 @@
|
|
|
77
79
|
"@semantic-release/commit-analyzer",
|
|
78
80
|
"@semantic-release/release-notes-generator",
|
|
79
81
|
"@semantic-release/npm",
|
|
80
|
-
"@semantic-release/github"
|
|
82
|
+
"@semantic-release/github",
|
|
83
|
+
[
|
|
84
|
+
"@semantic-release/git",
|
|
85
|
+
{
|
|
86
|
+
"assets": [
|
|
87
|
+
"package.json"
|
|
88
|
+
],
|
|
89
|
+
"message": "chore(release): ${nextRelease.version}"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
81
92
|
]
|
|
82
93
|
}
|
|
83
94
|
}
|
package/src/README.md
CHANGED
|
@@ -135,10 +135,10 @@ flowchart TB
|
|
|
135
135
|
Start --> Step1[<b>1. PLAN</b>]
|
|
136
136
|
|
|
137
137
|
Step1 --> Issue[📋 /issue<br/>Have GitHub issue<br/><i>Requires: GitHub MCP</i>]
|
|
138
|
-
Step1 -->
|
|
138
|
+
Step1 --> CreateIssues[📝 /create-issues<br/>No issue yet<br/><i>Optional: Beads MCP</i>]
|
|
139
139
|
|
|
140
140
|
Issue --> Step2[<b>2. CODE with TDD</b>]
|
|
141
|
-
|
|
141
|
+
CreateIssues --> Step2
|
|
142
142
|
|
|
143
143
|
Step2 -->|Manual| Red[🔴 /red<br/>Write failing test]
|
|
144
144
|
Red --> Green[🟢 /green<br/>Make it pass]
|
|
@@ -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
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Create implementation plan from feature/requirement with PRD-style discovery and TDD acceptance criteria
|
|
3
3
|
argument-hint: <feature/requirement description or GitHub issue URL/number>
|
|
4
|
-
_hint:
|
|
4
|
+
_hint: Create issues
|
|
5
5
|
_category: Planning
|
|
6
6
|
_order: 2
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
#
|
|
9
|
+
# Create Issues: PRD-Informed Task Planning for TDD
|
|
10
10
|
|
|
11
11
|
Create structured implementation plan that bridges product thinking (PRD) with test-driven development.
|
|
12
12
|
|
|
@@ -23,7 +23,7 @@ Create structured implementation plan that bridges product thinking (PRD) with t
|
|
|
23
23
|
|
|
24
24
|
$ARGUMENTS
|
|
25
25
|
|
|
26
|
-
(If no input provided, check conversation context<!-- docs INCLUDE path='src/fragments/
|
|
26
|
+
(If no input provided, check conversation context<!-- docs INCLUDE path='src/fragments/create-issues-beads-context-hint.md' featureFlag='beads' -->
|
|
27
27
|
<!-- /docs -->)
|
|
28
28
|
|
|
29
29
|
## Input Processing
|
|
@@ -72,7 +72,7 @@ Extract from GitHub issue:
|
|
|
72
72
|
<!-- docs INCLUDE path='src/fragments/discovery-phase.md' -->
|
|
73
73
|
<!-- /docs -->
|
|
74
74
|
|
|
75
|
-
<!-- docs INCLUDE path='src/fragments/
|
|
75
|
+
<!-- docs INCLUDE path='src/fragments/create-issues-beads-details.md' featureFlag='beads' -->
|
|
76
76
|
<!-- /docs -->
|
|
77
77
|
|
|
78
78
|
## Key Principles
|
|
@@ -92,7 +92,7 @@ Extract from GitHub issue:
|
|
|
92
92
|
|
|
93
93
|
## Integration with Other Commands
|
|
94
94
|
|
|
95
|
-
- **Before /
|
|
96
|
-
- **After /
|
|
97
|
-
<!-- docs INCLUDE path='src/fragments/
|
|
95
|
+
- **Before /create-issues**: Use `/spike` if you need technical exploration first
|
|
96
|
+
- **After /create-issues**: Use `/red` to start TDD on first task
|
|
97
|
+
<!-- docs INCLUDE path='src/fragments/create-issues-beads-integration.md' featureFlag='beads' -->
|
|
98
98
|
<!-- /docs -->
|
|
File without changes
|
|
File without changes
|
|
File without changes
|