claude-ketchup 0.1.1 → 0.1.2
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/LICENSE +1 -1
- package/README.md +69 -465
- package/dist/src/npm-install.test.d.ts +2 -0
- package/dist/src/npm-install.test.d.ts.map +1 -0
- package/dist/src/npm-install.test.js +70 -0
- package/dist/src/npm-install.test.js.map +1 -0
- package/package.json +12 -13
- package/scripts/tail-logs.sh +0 -0
- package/scripts/test-hooks.sh +0 -0
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,544 +1,148 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Claude Ketchup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**From AI Janitor to System Architect**
|
|
4
4
|
|
|
5
5
|
[](LICENSE) []()
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## The
|
|
9
|
+
## The Problem: You're the AI Janitor
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Ask Claude for "Hello World" and you get a nav bar, login system, and comment section.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
AI doesn't get tired. It over-executes. And you're left cleaning up the mess.
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
- **TCR Discipline**: Test && Commit || Revert—never patch failing code
|
|
17
|
-
- **Emergent Design**: Let architecture emerge from passing tests
|
|
18
|
-
- **100% Coverage**: True TDD yields complete coverage naturally
|
|
19
|
-
- **Fresh Nomenclature**: "Bottles" and "Bursts" avoid LLM training pollution
|
|
15
|
+
Without discipline:
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
The technique grew from frustration with AI over-execution—asking for "Hello World" and getting a nav bar, login system, and comment section. By enforcing small, reversible increments, the Ketchup Technique channels AI energy productively.
|
|
26
|
-
|
|
27
|
-
**[Read the full origin story →](KETCHUP-STORY.md)**
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Purpose
|
|
32
|
-
|
|
33
|
-
Without claude-ketchup, you would have to manually create and maintain `.claude/` directories, copy hook scripts between projects, configure `settings.json` by hand, and track which skills are active across different codebases.
|
|
17
|
+
- Features nobody asked for
|
|
18
|
+
- Defensive code paths that never run
|
|
19
|
+
- Enterprise architecture for throwaway scripts
|
|
20
|
+
- Hours spent reviewing, reverting, and redoing
|
|
34
21
|
|
|
35
|
-
|
|
22
|
+
**You wanted an AI partner. You got a mess-making machine.**
|
|
36
23
|
|
|
37
24
|
---
|
|
38
25
|
|
|
39
|
-
##
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
npm install claude-ketchup
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Or with pnpm:
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
pnpm add claude-ketchup
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Quick Start
|
|
26
|
+
## The Solution: The Quality Stack
|
|
52
27
|
|
|
53
|
-
|
|
54
|
-
# 1. Install the package
|
|
55
|
-
pnpm add claude-ketchup
|
|
28
|
+
Claude Ketchup transforms your role. Stop cleaning up. Start directing.
|
|
56
29
|
|
|
57
|
-
|
|
58
|
-
|
|
30
|
+
| Component | What It Does |
|
|
31
|
+
| ------------------------- | ------------------------------------------------------- |
|
|
32
|
+
| **Auto-Planning** | AI plans in `ketchup-plan.md` before writing code |
|
|
33
|
+
| **Parallel Execution** | Sub-agents work on independent bursts simultaneously |
|
|
34
|
+
| **Supervisor Validation** | Every commit is ACK'd or NACK'd by the validator |
|
|
35
|
+
| **Auto-Continue** | AI keeps working until the plan is complete |
|
|
36
|
+
| **TCR Discipline** | Test && Commit \|\| Revert. Tests pass or code reverts. |
|
|
59
37
|
|
|
60
|
-
|
|
61
|
-
claude-ketchup doctor
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
After installation, claude-ketchup automatically:
|
|
65
|
-
|
|
66
|
-
- Creates a `.claude/` directory in your project root
|
|
67
|
-
- Symlinks hook scripts, skills, and commands from the package
|
|
68
|
-
- Generates a `.gitignore` for symlinked and runtime files
|
|
69
|
-
- Merges default settings into your Claude configuration
|
|
38
|
+
**Speed. Quality. Control. All three.**
|
|
70
39
|
|
|
71
40
|
---
|
|
72
41
|
|
|
73
|
-
##
|
|
42
|
+
## The Plan: Feed, Approve, Watch
|
|
74
43
|
|
|
75
|
-
###
|
|
44
|
+
### 1. Feed
|
|
76
45
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
# Create a skill that runs at session start
|
|
81
|
-
cat > .claude/skills/my-project.md << 'EOF'
|
|
82
|
-
---
|
|
83
|
-
hook: SessionStart
|
|
84
|
-
priority: 50
|
|
85
|
-
---
|
|
46
|
+
Define requirements in `ketchup-plan.md`. Bottles (features) contain Bursts (atomic changes).
|
|
86
47
|
|
|
87
|
-
|
|
48
|
+
### 2. Approve
|
|
88
49
|
|
|
89
|
-
|
|
90
|
-
- Use TypeScript strict mode
|
|
91
|
-
- Write tests before implementation
|
|
92
|
-
EOF
|
|
93
|
-
```
|
|
50
|
+
The supervisor validates every commit against your rules. ACK proceeds. NACK reverts.
|
|
94
51
|
|
|
95
|
-
###
|
|
52
|
+
### 3. Watch
|
|
96
53
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
# Create a project deny-list
|
|
101
|
-
cat > .claude/deny-list.project.txt << 'EOF'
|
|
102
|
-
# Secrets
|
|
103
|
-
.env
|
|
104
|
-
*.secret
|
|
105
|
-
credentials.json
|
|
106
|
-
|
|
107
|
-
# Generated files
|
|
108
|
-
dist/**
|
|
109
|
-
node_modules/**
|
|
110
|
-
EOF
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### Override Package Settings
|
|
114
|
-
|
|
115
|
-
Create project-specific settings:
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
# .claude/settings.project.json
|
|
119
|
-
{
|
|
120
|
-
"hooks": {
|
|
121
|
-
"PreToolUse": {
|
|
122
|
-
"_disabled": ["some-command-to-disable"]
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Or local-only settings (gitignored):
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
# .claude/settings.local.json
|
|
132
|
-
{
|
|
133
|
-
"hooks": {
|
|
134
|
-
"SessionStart": {
|
|
135
|
-
"_mode": "replace",
|
|
136
|
-
"_value": []
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
```
|
|
54
|
+
Architecture emerges from passing tests. You review results, not repairs.
|
|
141
55
|
|
|
142
56
|
---
|
|
143
57
|
|
|
144
|
-
##
|
|
145
|
-
|
|
146
|
-
### Commands
|
|
147
|
-
|
|
148
|
-
#### `claude-ketchup status`
|
|
149
|
-
|
|
150
|
-
Show symlink status for all expected hook scripts and skills.
|
|
58
|
+
## Quick Start
|
|
151
59
|
|
|
152
60
|
```bash
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
#### `claude-ketchup doctor`
|
|
61
|
+
# Install
|
|
62
|
+
pnpm add -D claude-ketchup
|
|
157
63
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
```bash
|
|
64
|
+
# Verify
|
|
161
65
|
claude-ketchup doctor
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
#### `claude-ketchup repair`
|
|
165
|
-
|
|
166
|
-
Recreate broken or missing symlinks in the `.claude/` directory.
|
|
167
66
|
|
|
168
|
-
|
|
169
|
-
claude-ketchup repair
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
#### `claude-ketchup skills`
|
|
173
|
-
|
|
174
|
-
List all skills with their metadata.
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
claude-ketchup skills
|
|
67
|
+
# You're now the architect
|
|
178
68
|
```
|
|
179
69
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
## Hooks System
|
|
183
|
-
|
|
184
|
-
claude-ketchup provides four hook types that integrate with Claude Code:
|
|
185
|
-
|
|
186
|
-
### SessionStart
|
|
187
|
-
|
|
188
|
-
Fires when a Claude Code session begins. Use it to inject project context, guidelines, or documentation.
|
|
189
|
-
|
|
190
|
-
**Input:** Claude directory path
|
|
191
|
-
**Output:** Concatenated content of matching skills
|
|
192
|
-
|
|
193
|
-
### PreToolUse
|
|
194
|
-
|
|
195
|
-
Fires before Claude uses a tool. Has two matchers:
|
|
196
|
-
|
|
197
|
-
1. **Edit/Write/NotebookEdit** - Checks deny-list to protect sensitive files
|
|
198
|
-
2. **Bash** - Validates git commits against CLAUDE.md rules
|
|
199
|
-
|
|
200
|
-
**Input:** Tool name and input parameters
|
|
201
|
-
**Output:** `{ decision: "allow" | "block", reason?: string }`
|
|
202
|
-
|
|
203
|
-
### UserPromptSubmit
|
|
204
|
-
|
|
205
|
-
Fires when user submits a prompt. Use it to inject reminders or context.
|
|
206
|
-
|
|
207
|
-
**Input:** User prompt text
|
|
208
|
-
**Output:** Original prompt with `<system-reminder>` tags appended
|
|
209
|
-
|
|
210
|
-
### Stop
|
|
211
|
-
|
|
212
|
-
Fires when Claude stops execution. Use it for auto-continue logic.
|
|
213
|
-
|
|
214
|
-
**Input:** Transcript context
|
|
215
|
-
**Output:** `{ decision: "CONTINUE" | "STOP", reason: string }`
|
|
216
|
-
|
|
217
|
-
---
|
|
218
|
-
|
|
219
|
-
## Skills System
|
|
220
|
-
|
|
221
|
-
Skills are markdown files in `.claude/skills/` with YAML frontmatter:
|
|
222
|
-
|
|
223
|
-
```markdown
|
|
224
|
-
---
|
|
225
|
-
hook: SessionStart
|
|
226
|
-
priority: 100
|
|
227
|
-
mode: code
|
|
228
|
-
when:
|
|
229
|
-
projectType: typescript
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
# Skill Content
|
|
233
|
-
|
|
234
|
-
Instructions for Claude...
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### Frontmatter Schema
|
|
238
|
-
|
|
239
|
-
| Field | Type | Required | Default | Description |
|
|
240
|
-
| ---------- | ------ | -------- | ------- | ------------------------------------- |
|
|
241
|
-
| `hook` | string | Yes | - | Which hook triggers this skill |
|
|
242
|
-
| `priority` | number | No | 0 | Execution order (higher runs first) |
|
|
243
|
-
| `mode` | string | No | - | Filter by mode (plan/code) |
|
|
244
|
-
| `when` | object | No | - | Conditional activation based on state |
|
|
245
|
-
|
|
246
|
-
---
|
|
247
|
-
|
|
248
|
-
## Settings Merger
|
|
249
|
-
|
|
250
|
-
Settings are merged in priority order:
|
|
251
|
-
|
|
252
|
-
1. `templates/settings.json` (package defaults)
|
|
253
|
-
2. `.claude/settings.project.json` (project overrides, checked in)
|
|
254
|
-
3. `.claude/settings.local.json` (local overrides, gitignored)
|
|
255
|
-
|
|
256
|
-
### Override Modes
|
|
257
|
-
|
|
258
|
-
**Replace entire hook:**
|
|
259
|
-
|
|
260
|
-
```json
|
|
261
|
-
{
|
|
262
|
-
"hooks": {
|
|
263
|
-
"SessionStart": {
|
|
264
|
-
"_mode": "replace",
|
|
265
|
-
"_value": [{ "hooks": [{ "type": "command", "command": "my-cmd" }] }]
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
**Disable specific commands:**
|
|
70
|
+
After installation, claude-ketchup automatically:
|
|
272
71
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
"_disabled": ["command-to-remove"]
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
```
|
|
72
|
+
- Injects hooks that validate every commit
|
|
73
|
+
- Creates skills that inject your guidelines
|
|
74
|
+
- Sets up file protection via deny-lists
|
|
75
|
+
- Merges settings with smart project/local overrides
|
|
282
76
|
|
|
283
77
|
---
|
|
284
78
|
|
|
285
|
-
##
|
|
286
|
-
|
|
287
|
-
### Symlinks Not Created
|
|
288
|
-
|
|
289
|
-
**Symptom:** `.claude/` directory is empty after install
|
|
290
|
-
|
|
291
|
-
**Cause:** Project root detection failed or permission issues
|
|
292
|
-
|
|
293
|
-
**Solution:**
|
|
294
|
-
|
|
295
|
-
```bash
|
|
296
|
-
# Set explicit project root
|
|
297
|
-
KETCHUP_ROOT=/path/to/project pnpm add claude-ketchup
|
|
298
|
-
|
|
299
|
-
# Or repair manually
|
|
300
|
-
claude-ketchup repair
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
### Hooks Not Firing
|
|
304
|
-
|
|
305
|
-
**Symptom:** Skills don't load at session start
|
|
306
|
-
|
|
307
|
-
**Cause:** settings.json not merged correctly
|
|
308
|
-
|
|
309
|
-
**Solution:**
|
|
310
|
-
|
|
311
|
-
```bash
|
|
312
|
-
# Check symlink health
|
|
313
|
-
claude-ketchup doctor
|
|
314
|
-
|
|
315
|
-
# Repair if needed
|
|
316
|
-
claude-ketchup repair
|
|
317
|
-
|
|
318
|
-
# Verify settings
|
|
319
|
-
cat .claude/settings.json
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
### Enable Debug Logging
|
|
323
|
-
|
|
324
|
-
```bash
|
|
325
|
-
DEBUG=ketchup* claude-ketchup status
|
|
326
|
-
```
|
|
79
|
+
## The Stakes
|
|
327
80
|
|
|
328
|
-
|
|
81
|
+
### Without Claude Ketchup
|
|
329
82
|
|
|
330
|
-
|
|
83
|
+
- Endless code review cycles
|
|
84
|
+
- "Let me just fix this one thing" spirals
|
|
85
|
+
- Coverage gaps and untested paths
|
|
86
|
+
- AI that fights your architecture
|
|
331
87
|
|
|
332
|
-
|
|
333
|
-
your-project/
|
|
334
|
-
├── .claude/
|
|
335
|
-
│ ├── scripts/
|
|
336
|
-
│ │ ├── pre-tool-use.ts # → symlink to package
|
|
337
|
-
│ │ ├── user-prompt-submit.ts # → symlink to package
|
|
338
|
-
│ │ ├── session-start.ts # Local (customizable)
|
|
339
|
-
│ │ ├── auto-continue.ts # Local (customizable)
|
|
340
|
-
│ │ ├── validate-commit.ts # Local (customizable)
|
|
341
|
-
│ │ ├── deny-list.ts # Local (customizable)
|
|
342
|
-
│ │ ├── prompt-reminder.ts # Local (customizable)
|
|
343
|
-
│ │ └── clean-logs.ts # Local (customizable)
|
|
344
|
-
│ ├── skills/
|
|
345
|
-
│ │ ├── ketchup.enforced.md # → symlink to package
|
|
346
|
-
│ │ └── my-project.md # Your custom skills
|
|
347
|
-
│ ├── commands/
|
|
348
|
-
│ │ ├── ketchup.md # → symlink to package
|
|
349
|
-
│ │ └── my-command.md # Your custom commands
|
|
350
|
-
│ ├── settings.json # Merged settings (generated)
|
|
351
|
-
│ ├── settings.project.json # Project overrides (optional)
|
|
352
|
-
│ ├── settings.local.json # Local overrides (optional)
|
|
353
|
-
│ ├── deny-list.project.txt # Project deny patterns
|
|
354
|
-
│ ├── deny-list.local.txt # Local deny patterns
|
|
355
|
-
│ ├── logs/ # Runtime logs
|
|
356
|
-
│ └── .gitignore # Generated
|
|
357
|
-
├── .claude.hooks.json # Hook state (runtime)
|
|
358
|
-
└── node_modules/
|
|
359
|
-
└── claude-ketchup/
|
|
360
|
-
├── scripts/ # Source scripts (symlink targets)
|
|
361
|
-
├── skills/ # Source skills (symlink targets)
|
|
362
|
-
├── commands/ # Source commands (symlink targets)
|
|
363
|
-
└── templates/ # Default settings
|
|
364
|
-
```
|
|
88
|
+
### With Claude Ketchup
|
|
365
89
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
| commander | CLI argument parsing |
|
|
371
|
-
| micromatch | Glob pattern matching for deny-list |
|
|
372
|
-
| yaml | YAML parsing for skill frontmatter |
|
|
90
|
+
- Predictable, reviewable increments
|
|
91
|
+
- 100% coverage by construction
|
|
92
|
+
- Clean git history (one behavior per commit)
|
|
93
|
+
- AI that follows your system
|
|
373
94
|
|
|
374
95
|
---
|
|
375
96
|
|
|
376
|
-
##
|
|
377
|
-
|
|
378
|
-
claude-ketchup maintains a `.claude.hooks.json` file that controls hook behavior:
|
|
379
|
-
|
|
380
|
-
```json
|
|
381
|
-
{
|
|
382
|
-
"autoContinue": {
|
|
383
|
-
"mode": "smart",
|
|
384
|
-
"maxIterations": 0,
|
|
385
|
-
"iteration": 0,
|
|
386
|
-
"skipModes": ["plan"]
|
|
387
|
-
},
|
|
388
|
-
"validateCommit": {
|
|
389
|
-
"mode": "strict"
|
|
390
|
-
},
|
|
391
|
-
"denyList": {
|
|
392
|
-
"enabled": true,
|
|
393
|
-
"extraPatterns": []
|
|
394
|
-
},
|
|
395
|
-
"promptReminder": {
|
|
396
|
-
"enabled": true
|
|
397
|
-
},
|
|
398
|
-
"subagentHooks": {
|
|
399
|
-
"validateCommitOnExplore": false,
|
|
400
|
-
"validateCommitOnWork": true,
|
|
401
|
-
"validateCommitOnUnknown": true
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
```
|
|
97
|
+
## Authority: Battle-Tested
|
|
405
98
|
|
|
406
|
-
|
|
99
|
+
Built on foundations from Kent Beck's TCR and Extreme Programming principles. Refined through production features at Auto. Used daily by the creator on real codebases.
|
|
407
100
|
|
|
408
|
-
|
|
101
|
+
The technique evolved from constant refinement: notice where Claude misbehaves, automate a fix, repeat. Each problem became a feature.
|
|
409
102
|
|
|
410
|
-
|
|
411
|
-
| --------- | ----------------------------------------------- | ------------------------------ |
|
|
412
|
-
| `explore` | search, find, understand, investigate, analyze | Skip commit validation |
|
|
413
|
-
| `work` | implement, create, write, fix, refactor, update | Full validation |
|
|
414
|
-
| `unknown` | Ambiguous or no patterns | Full validation (safe default) |
|
|
103
|
+
**[Read the origin story →](./docs/origin-story.md)**
|
|
415
104
|
|
|
416
105
|
---
|
|
417
106
|
|
|
418
|
-
##
|
|
419
|
-
|
|
420
|
-
### Debug Logging
|
|
421
|
-
|
|
422
|
-
Enable debug logs during development:
|
|
423
|
-
|
|
424
|
-
```bash
|
|
425
|
-
DEBUG=ketchup* claude-ketchup status
|
|
426
|
-
```
|
|
427
|
-
|
|
428
|
-
Debug logs are written to `.claude/logs/ketchup/debug.log`.
|
|
429
|
-
|
|
430
|
-
### Hook Logs
|
|
431
|
-
|
|
432
|
-
Session-specific hook logs are written to `.claude/logs/hooks/{session-id}.log` with colored output for different log levels:
|
|
433
|
-
|
|
434
|
-
- `ACK` - Action acknowledged
|
|
435
|
-
- `NACK` - Action rejected
|
|
436
|
-
- `ERROR` - Error occurred
|
|
437
|
-
- `WARN` - Warning
|
|
438
|
-
- `SKIP` - Action skipped
|
|
439
|
-
- `INFO` - Informational
|
|
440
|
-
- `DENIED` - Access denied
|
|
441
|
-
- `CONTINUE` - Auto-continue triggered
|
|
107
|
+
## CLI Reference
|
|
442
108
|
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
```typescript
|
|
450
|
-
import {
|
|
451
|
-
// Core utilities
|
|
452
|
-
findProjectRoot,
|
|
453
|
-
createSymlink,
|
|
454
|
-
removeSymlink,
|
|
455
|
-
verifySymlink,
|
|
456
|
-
generateGitignore,
|
|
457
|
-
mergeSettings,
|
|
458
|
-
readState,
|
|
459
|
-
writeState,
|
|
460
|
-
|
|
461
|
-
// Skills
|
|
462
|
-
scanSkills,
|
|
463
|
-
parseSkill,
|
|
464
|
-
filterByHook,
|
|
465
|
-
filterByMode,
|
|
466
|
-
filterByState,
|
|
467
|
-
sortByPriority,
|
|
468
|
-
|
|
469
|
-
// Deny-list
|
|
470
|
-
loadDenyPatterns,
|
|
471
|
-
isDenied,
|
|
472
|
-
|
|
473
|
-
// CLI
|
|
474
|
-
getStatus,
|
|
475
|
-
repair,
|
|
476
|
-
getExpectedSymlinks,
|
|
477
|
-
doctor,
|
|
478
|
-
listSkills,
|
|
479
|
-
createCli,
|
|
480
|
-
} from "claude-ketchup";
|
|
481
|
-
```
|
|
109
|
+
| Command | Description |
|
|
110
|
+
| ----------------------- | ----------------------------------------------- |
|
|
111
|
+
| `claude-ketchup status` | Show symlink status for hook scripts and skills |
|
|
112
|
+
| `claude-ketchup doctor` | Diagnose symlink health |
|
|
113
|
+
| `claude-ketchup repair` | Recreate broken or missing symlinks |
|
|
114
|
+
| `claude-ketchup skills` | List all skills with metadata |
|
|
482
115
|
|
|
483
116
|
---
|
|
484
117
|
|
|
485
118
|
## Documentation
|
|
486
119
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
|
490
|
-
|
|
|
491
|
-
| [
|
|
492
|
-
| [
|
|
493
|
-
| [
|
|
494
|
-
| [Architecture](./docs/architecture.md) | System design and internals |
|
|
120
|
+
| Guide | Description |
|
|
121
|
+
| ------------------------------------------------ | -------------------------- |
|
|
122
|
+
| [Getting Started](./docs/getting-started.md) | 5-minute setup tutorial |
|
|
123
|
+
| [The Quality Stack](./docs/ketchup-technique.md) | The methodology explained |
|
|
124
|
+
| [Hooks Guide](./docs/hooks-guide.md) | Practical how-to guides |
|
|
125
|
+
| [API Reference](./docs/api-reference.md) | Complete API documentation |
|
|
126
|
+
| [Architecture](./docs/architecture.md) | System design internals |
|
|
495
127
|
|
|
496
128
|
---
|
|
497
129
|
|
|
498
130
|
## Development
|
|
499
131
|
|
|
500
132
|
```bash
|
|
501
|
-
|
|
502
|
-
git clone https://github.com/samhatoum/claude-ketchup.git
|
|
133
|
+
git clone https://github.com/BeOnAuto/claude-ketchup.git
|
|
503
134
|
cd claude-ketchup
|
|
504
|
-
|
|
505
|
-
# Install dependencies
|
|
506
135
|
pnpm install
|
|
507
|
-
|
|
508
|
-
# Run tests
|
|
509
136
|
pnpm test
|
|
510
|
-
|
|
511
|
-
# Run tests with coverage
|
|
512
|
-
pnpm test --coverage
|
|
513
|
-
|
|
514
|
-
# Build
|
|
515
137
|
pnpm build
|
|
516
138
|
```
|
|
517
139
|
|
|
518
|
-
### Testing Locally
|
|
519
|
-
|
|
520
|
-
```bash
|
|
521
|
-
# In claude-ketchup directory
|
|
522
|
-
pnpm link --global
|
|
523
|
-
|
|
524
|
-
# In your test project
|
|
525
|
-
pnpm link --global claude-ketchup
|
|
526
|
-
```
|
|
527
|
-
|
|
528
|
-
Or test postinstall directly:
|
|
529
|
-
|
|
530
|
-
```bash
|
|
531
|
-
KETCHUP_ROOT=/path/to/test-project npx tsx bin/postinstall.ts
|
|
532
|
-
```
|
|
533
|
-
|
|
534
140
|
---
|
|
535
141
|
|
|
536
142
|
## License
|
|
537
143
|
|
|
538
|
-
MIT © 2025
|
|
144
|
+
MIT © 2025 BeOnAuto, Inc.
|
|
539
145
|
|
|
540
146
|
See [LICENSE](LICENSE) for details.
|
|
541
147
|
|
|
542
148
|
---
|
|
543
|
-
|
|
544
|
-
<sub>\*The Ketchup Technique is an independent methodology for AI-native development. While it acknowledges the foundation of time-boxed intervals found in the Pomodoro® Technique (a registered trademark of Francesco Cirillo), it is a separate method. Learn more at [pomodorotechnique.com](http://pomodorotechnique.com/).</sub>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-install.test.d.ts","sourceRoot":"","sources":["../../src/npm-install.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const node_child_process_1 = require("node:child_process");
|
|
37
|
+
const fs = __importStar(require("node:fs"));
|
|
38
|
+
const path = __importStar(require("node:path"));
|
|
39
|
+
const vitest_1 = require("vitest");
|
|
40
|
+
(0, vitest_1.describe)('npm installation', () => {
|
|
41
|
+
const baseDir = path.join(process.env.HOME || '/tmp', 'temp-ketchup');
|
|
42
|
+
const testDir = path.join(baseDir, 'test-project');
|
|
43
|
+
const packageRoot = path.resolve(__dirname, '..');
|
|
44
|
+
let tarballPath;
|
|
45
|
+
(0, vitest_1.beforeEach)(() => {
|
|
46
|
+
fs.rmSync(baseDir, { recursive: true, force: true });
|
|
47
|
+
fs.mkdirSync(testDir, { recursive: true });
|
|
48
|
+
(0, node_child_process_1.execSync)('pnpm store prune', { stdio: 'pipe' });
|
|
49
|
+
(0, node_child_process_1.execSync)('pnpm build', { cwd: packageRoot, stdio: 'pipe' });
|
|
50
|
+
const packOutput = (0, node_child_process_1.execSync)(`pnpm pack --pack-destination ${baseDir}`, {
|
|
51
|
+
cwd: packageRoot,
|
|
52
|
+
encoding: 'utf-8',
|
|
53
|
+
});
|
|
54
|
+
const lines = packOutput.trim().split('\n');
|
|
55
|
+
tarballPath = lines[lines.length - 1];
|
|
56
|
+
});
|
|
57
|
+
(0, vitest_1.afterEach)(() => {
|
|
58
|
+
fs.rmSync(baseDir, { recursive: true, force: true });
|
|
59
|
+
});
|
|
60
|
+
(0, vitest_1.it)('creates .claude directory when installed via pnpm add', () => {
|
|
61
|
+
(0, node_child_process_1.execSync)('pnpm init', { cwd: testDir, stdio: 'pipe' });
|
|
62
|
+
(0, node_child_process_1.execSync)(`pnpm add -D ${tarballPath} --allow-build=claude-ketchup`, {
|
|
63
|
+
cwd: testDir,
|
|
64
|
+
stdio: 'pipe',
|
|
65
|
+
});
|
|
66
|
+
const claudeDir = path.join(testDir, '.claude');
|
|
67
|
+
(0, vitest_1.expect)(fs.existsSync(claudeDir)).toBe(true);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=npm-install.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-install.test.js","sourceRoot":"","sources":["../../src/npm-install.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA8C;AAC9C,4CAA8B;AAC9B,gDAAkC;AAElC,mCAAqE;AAErE,IAAA,iBAAQ,EAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,MAAM,EAAE,cAAc,CAAC,CAAC;IACtE,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IACnD,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAClD,IAAI,WAAmB,CAAC;IAExB,IAAA,mBAAU,EAAC,GAAG,EAAE;QACd,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACrD,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAE3C,IAAA,6BAAQ,EAAC,kBAAkB,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QAChD,IAAA,6BAAQ,EAAC,YAAY,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5D,MAAM,UAAU,GAAG,IAAA,6BAAQ,EAAC,gCAAgC,OAAO,EAAE,EAAE;YACrE,GAAG,EAAE,WAAW;YAChB,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC;QACH,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC5C,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;IAEH,IAAA,kBAAS,EAAC,GAAG,EAAE;QACb,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,IAAA,WAAE,EAAC,uDAAuD,EAAE,GAAG,EAAE;QAC/D,IAAA,6BAAQ,EAAC,WAAW,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QACvD,IAAA,6BAAQ,EAAC,eAAe,WAAW,+BAA+B,EAAE;YAClE,GAAG,EAAE,OAAO;YACZ,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAChD,IAAA,eAAM,EAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-ketchup",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"authors": [
|
|
5
5
|
{
|
|
6
6
|
"name": "Sam Hatoum"
|
|
@@ -12,16 +12,6 @@
|
|
|
12
12
|
"bin": {
|
|
13
13
|
"claude-ketchup": "dist/bin/cli.js"
|
|
14
14
|
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "tsc",
|
|
17
|
-
"test": "vitest run",
|
|
18
|
-
"test:watch": "vitest",
|
|
19
|
-
"postinstall": "npx tsx bin/postinstall.ts",
|
|
20
|
-
"preuninstall": "npx tsx bin/preuninstall.ts",
|
|
21
|
-
"docs:dev": "vitepress dev docs",
|
|
22
|
-
"docs:build": "vitepress build docs",
|
|
23
|
-
"docs:preview": "vitepress preview docs"
|
|
24
|
-
},
|
|
25
15
|
"keywords": [
|
|
26
16
|
"claude",
|
|
27
17
|
"claude-code",
|
|
@@ -55,5 +45,14 @@
|
|
|
55
45
|
"engines": {
|
|
56
46
|
"node": ">=18.0.0"
|
|
57
47
|
},
|
|
58
|
-
"
|
|
59
|
-
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsc",
|
|
50
|
+
"test": "vitest run",
|
|
51
|
+
"test:watch": "vitest",
|
|
52
|
+
"postinstall": "node dist/bin/postinstall.js",
|
|
53
|
+
"preuninstall": "node dist/bin/preuninstall.js",
|
|
54
|
+
"docs:dev": "vitepress dev docs",
|
|
55
|
+
"docs:build": "vitepress build docs",
|
|
56
|
+
"docs:preview": "vitepress preview docs"
|
|
57
|
+
}
|
|
58
|
+
}
|
package/scripts/tail-logs.sh
CHANGED
|
File without changes
|
package/scripts/test-hooks.sh
CHANGED
|
File without changes
|