@wbern/claude-instructions 1.19.0 โ 1.21.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 +3 -23
- package/bin/cli.js +29 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -80,6 +80,8 @@ This ensures commands are regenerated whenever anyone runs `npm install`, `pnpm
|
|
|
80
80
|
| `--update-existing` | Only update already-installed commands |
|
|
81
81
|
| `--overwrite` | Overwrite conflicting files without prompting |
|
|
82
82
|
| `--skip-on-conflict` | Skip conflicting files without prompting |
|
|
83
|
+
| `--help, -h` | Show help message |
|
|
84
|
+
| `--version, -v` | Show version number |
|
|
83
85
|
|
|
84
86
|
## Customizing Commands
|
|
85
87
|
|
|
@@ -132,7 +134,7 @@ Only the first file found is used.
|
|
|
132
134
|
|
|
133
135
|
### Main Workflow
|
|
134
136
|
|
|
135
|
-
|
|
137
|
+
This is the core TDD workflow. Additional utility commands (worktrees, spikes, etc.) are listed in [Available Commands](#available-commands) below.
|
|
136
138
|
|
|
137
139
|
```mermaid
|
|
138
140
|
flowchart TB
|
|
@@ -177,28 +179,6 @@ flowchart TB
|
|
|
177
179
|
style Done fill:#c8e6c9
|
|
178
180
|
```
|
|
179
181
|
|
|
180
|
-
### Other Commands
|
|
181
|
-
|
|
182
|
-
Available anytime during your workflow:
|
|
183
|
-
|
|
184
|
-
```mermaid
|
|
185
|
-
flowchart TB
|
|
186
|
-
Utils[<b>UTILITIES</b>]
|
|
187
|
-
Utils --> Spike[๐ฌ /spike<br/>Exploratory coding before TDD]
|
|
188
|
-
Utils --> TDD[๐ /tdd<br/>Remind agent about TDD]
|
|
189
|
-
Utils --> AddCommand[โ /add-command<br/>Create custom commands]
|
|
190
|
-
Utils --> Summarize[๐ /summarize<br/>Summarize conversation<br/><i>Optional: Beads MCP</i>]
|
|
191
|
-
Utils --> Gap[๐ /gap<br/>Find unaddressed items<br/><i>Optional: Beads MCP</i>]
|
|
192
|
-
Utils --> Beepboop[๐ค /beepboop<br/>AI attribution]
|
|
193
|
-
|
|
194
|
-
Worktree[<b>WORKTREE MANAGEMENT</b>]
|
|
195
|
-
Worktree --> WorktreeAdd[โ /worktree-add<br/>Create new worktree<br/><i>Requires: GitHub MCP</i>]
|
|
196
|
-
Worktree --> WorktreeCleanup[๐งน /worktree-cleanup<br/>Clean up merged worktrees<br/><i>Requires: GitHub MCP</i>]
|
|
197
|
-
|
|
198
|
-
style Utils fill:#fff9c4
|
|
199
|
-
style Worktree fill:#f3e5f5
|
|
200
|
-
```
|
|
201
|
-
|
|
202
182
|
## Available Commands
|
|
203
183
|
|
|
204
184
|
### Planning
|
package/bin/cli.js
CHANGED
|
@@ -113,6 +113,7 @@ var require_picocolors = __commonJS({
|
|
|
113
113
|
|
|
114
114
|
// scripts/bin.ts
|
|
115
115
|
init_esm_shims();
|
|
116
|
+
import { createRequire } from "module";
|
|
116
117
|
|
|
117
118
|
// scripts/cli.ts
|
|
118
119
|
init_esm_shims();
|
|
@@ -741,8 +742,7 @@ var CLI_OPTIONS = [
|
|
|
741
742
|
key: "prefix",
|
|
742
743
|
type: "string",
|
|
743
744
|
description: "Add prefix to command names",
|
|
744
|
-
example: "--prefix=my-"
|
|
745
|
-
requiredForNonInteractive: true
|
|
745
|
+
example: "--prefix=my-"
|
|
746
746
|
},
|
|
747
747
|
{
|
|
748
748
|
flag: "--commands",
|
|
@@ -790,6 +790,7 @@ function generateHelpText() {
|
|
|
790
790
|
);
|
|
791
791
|
}
|
|
792
792
|
lines.push(" --help, -h Show this help message");
|
|
793
|
+
lines.push(" --version, -v Show version number");
|
|
793
794
|
return lines.join("\n");
|
|
794
795
|
}
|
|
795
796
|
|
|
@@ -924,10 +925,10 @@ async function main(args) {
|
|
|
924
925
|
let selectedCommands;
|
|
925
926
|
let selectedAllowedTools;
|
|
926
927
|
let cachedExistingFiles;
|
|
927
|
-
if (args?.variant && args?.scope
|
|
928
|
+
if (args?.variant && args?.scope) {
|
|
928
929
|
variant = args.variant;
|
|
929
930
|
scope = args.scope;
|
|
930
|
-
commandPrefix = args.prefix;
|
|
931
|
+
commandPrefix = args.prefix ?? "";
|
|
931
932
|
selectedCommands = args.commands;
|
|
932
933
|
if (args.updateExisting) {
|
|
933
934
|
cachedExistingFiles = await checkExistingFiles(
|
|
@@ -1032,7 +1033,14 @@ async function main(args) {
|
|
|
1032
1033
|
allowedTools: selectedAllowedTools
|
|
1033
1034
|
});
|
|
1034
1035
|
const skipFiles = [];
|
|
1035
|
-
|
|
1036
|
+
const shouldSkipConflicts = args?.skipOnConflict || !isInteractiveTTY();
|
|
1037
|
+
if (args?.overwrite) {
|
|
1038
|
+
for (const file of existingFiles) {
|
|
1039
|
+
if (!file.isIdentical) {
|
|
1040
|
+
log.info(`Overwriting ${file.filename}`);
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
} else if (!shouldSkipConflicts) {
|
|
1036
1044
|
const conflictingFiles = existingFiles.filter((f) => !f.isIdentical);
|
|
1037
1045
|
const hasMultipleConflicts = conflictingFiles.length > 1;
|
|
1038
1046
|
let overwriteAllSelected = false;
|
|
@@ -1087,12 +1095,18 @@ async function main(args) {
|
|
|
1087
1095
|
}
|
|
1088
1096
|
}
|
|
1089
1097
|
}
|
|
1090
|
-
} else if (
|
|
1098
|
+
} else if (shouldSkipConflicts) {
|
|
1091
1099
|
for (const file of existingFiles) {
|
|
1092
1100
|
if (!file.isIdentical) {
|
|
1093
1101
|
skipFiles.push(file.filename);
|
|
1102
|
+
log.warn(`Skipping ${file.filename} (conflict)`);
|
|
1094
1103
|
}
|
|
1095
1104
|
}
|
|
1105
|
+
if (skipFiles.length > 0 && !isInteractiveTTY()) {
|
|
1106
|
+
log.info(
|
|
1107
|
+
"To resolve conflicts, run interactively or use --overwrite to overwrite"
|
|
1108
|
+
);
|
|
1109
|
+
}
|
|
1096
1110
|
}
|
|
1097
1111
|
const result = await generateToDirectory(
|
|
1098
1112
|
void 0,
|
|
@@ -1119,6 +1133,11 @@ Happy TDD'ing!`
|
|
|
1119
1133
|
}
|
|
1120
1134
|
|
|
1121
1135
|
// scripts/bin.ts
|
|
1136
|
+
function getVersion() {
|
|
1137
|
+
const require2 = createRequire(import.meta.url);
|
|
1138
|
+
const packageJson = require2("../package.json");
|
|
1139
|
+
return packageJson.version;
|
|
1140
|
+
}
|
|
1122
1141
|
function parseArgs(argv) {
|
|
1123
1142
|
const args = {};
|
|
1124
1143
|
const booleanOpts = CLI_OPTIONS.filter((o) => o.type === "boolean");
|
|
@@ -1150,6 +1169,10 @@ async function run(argv) {
|
|
|
1150
1169
|
console.log(generateHelpText());
|
|
1151
1170
|
return;
|
|
1152
1171
|
}
|
|
1172
|
+
if (argv.includes("--version") || argv.includes("-v")) {
|
|
1173
|
+
console.log(getVersion());
|
|
1174
|
+
return;
|
|
1175
|
+
}
|
|
1153
1176
|
const args = parseArgs(argv);
|
|
1154
1177
|
await main(args);
|
|
1155
1178
|
}
|