chiefwiggum 1.0.0 → 1.1.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/chiefwiggum +66 -46
- package/package.json +1 -1
- package/templates/CLAUDE.md +31 -0
- package/templates/TODO.md +29 -0
- package/templates/specs/prd.md +46 -0
- package/templates/specs/technical.md +74 -0
package/chiefwiggum
CHANGED
|
@@ -25,6 +25,8 @@ NC='\033[0m'
|
|
|
25
25
|
# =========================================
|
|
26
26
|
# CONFIGURATION
|
|
27
27
|
# =========================================
|
|
28
|
+
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
|
|
29
|
+
TEMPLATES_DIR="${SCRIPT_DIR}/templates"
|
|
28
30
|
TODO_FILE="${TODO_FILE:-TODO.md}"
|
|
29
31
|
COOLDOWN_SECONDS="${COOLDOWN_SECONDS:-5}"
|
|
30
32
|
|
|
@@ -192,11 +194,10 @@ cmd_new() {
|
|
|
192
194
|
exit 0
|
|
193
195
|
fi
|
|
194
196
|
|
|
195
|
-
# Check for existing files
|
|
197
|
+
# Check for existing chiefwiggum files (not CLAUDE.md - that's project-specific)
|
|
196
198
|
local existing_files=()
|
|
197
199
|
[ -f "$TODO_FILE" ] && existing_files+=("TODO.md")
|
|
198
200
|
[ -d "specs" ] && existing_files+=("specs/")
|
|
199
|
-
[ -f "CLAUDE.md" ] && existing_files+=("CLAUDE.md")
|
|
200
201
|
|
|
201
202
|
if [ ${#existing_files[@]} -gt 0 ]; then
|
|
202
203
|
echo ""
|
|
@@ -211,6 +212,10 @@ cmd_new() {
|
|
|
211
212
|
fi
|
|
212
213
|
fi
|
|
213
214
|
|
|
215
|
+
# Note if CLAUDE.md exists (we'll preserve it)
|
|
216
|
+
local has_claude_md=false
|
|
217
|
+
[ -f "CLAUDE.md" ] && has_claude_md=true
|
|
218
|
+
|
|
214
219
|
# If plan file provided, use it directly
|
|
215
220
|
if [ -n "$plan_file" ]; then
|
|
216
221
|
if [ ! -f "$plan_file" ]; then
|
|
@@ -368,31 +373,40 @@ generate_from_plan() {
|
|
|
368
373
|
echo -e "${GREEN} Generating specs from: ${plan_file}${NC}"
|
|
369
374
|
echo -e "${GREEN}════════════════════════════════════════${NC}"
|
|
370
375
|
|
|
376
|
+
# Check templates exist
|
|
377
|
+
if [ ! -d "$TEMPLATES_DIR" ]; then
|
|
378
|
+
echo -e "${RED}Templates directory not found: ${TEMPLATES_DIR}${NC}"
|
|
379
|
+
exit 1
|
|
380
|
+
fi
|
|
381
|
+
|
|
371
382
|
mkdir -p specs
|
|
372
383
|
|
|
384
|
+
# Load templates
|
|
385
|
+
local prd_template=$(cat "$TEMPLATES_DIR/specs/prd.md")
|
|
386
|
+
local tech_template=$(cat "$TEMPLATES_DIR/specs/technical.md")
|
|
387
|
+
local todo_template=$(cat "$TEMPLATES_DIR/TODO.md")
|
|
388
|
+
local claude_template=$(cat "$TEMPLATES_DIR/CLAUDE.md")
|
|
389
|
+
|
|
373
390
|
# Step 1: Generate PRD
|
|
374
391
|
echo ""
|
|
375
392
|
echo -e "${YELLOW}[1/4] Generating specs/prd.md...${NC}"
|
|
376
393
|
|
|
377
|
-
local prd_prompt="You are
|
|
394
|
+
local prd_prompt="You are filling in a PRD template based on a project plan.
|
|
378
395
|
|
|
379
396
|
Here is the plan:
|
|
380
397
|
<plan>
|
|
381
398
|
${plan_content}
|
|
382
399
|
</plan>
|
|
383
400
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
- User Stories
|
|
389
|
-
- Functional Requirements
|
|
390
|
-
- Non-Functional Requirements
|
|
391
|
-
- Out of Scope
|
|
401
|
+
Here is the template to fill in:
|
|
402
|
+
<template>
|
|
403
|
+
${prd_template}
|
|
404
|
+
</template>
|
|
392
405
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
406
|
+
Fill in the template with specific details from the plan.
|
|
407
|
+
Replace all placeholder text in [brackets] with real content.
|
|
408
|
+
Write the completed PRD directly to specs/prd.md.
|
|
409
|
+
Do NOT ask questions — infer everything from the plan."
|
|
396
410
|
|
|
397
411
|
echo "$prd_prompt" | claude -p --dangerously-skip-permissions 2>/dev/null
|
|
398
412
|
echo -e "${GREEN} ✓ specs/prd.md${NC}"
|
|
@@ -403,33 +417,34 @@ Be concise but comprehensive."
|
|
|
403
417
|
local prd_generated
|
|
404
418
|
prd_generated="$(cat specs/prd.md 2>/dev/null || echo "")"
|
|
405
419
|
|
|
406
|
-
local tech_prompt="You are
|
|
420
|
+
local tech_prompt="You are filling in a Technical Specification template based on a PRD.
|
|
407
421
|
|
|
408
422
|
Here is the PRD:
|
|
409
423
|
<prd>
|
|
410
424
|
${prd_generated}
|
|
411
425
|
</prd>
|
|
412
426
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
- API Design (if applicable)
|
|
418
|
-
- Key Components
|
|
419
|
-
- Security Considerations
|
|
420
|
-
- Performance Considerations
|
|
427
|
+
Here is the template to fill in:
|
|
428
|
+
<template>
|
|
429
|
+
${tech_template}
|
|
430
|
+
</template>
|
|
421
431
|
|
|
422
|
-
|
|
432
|
+
Fill in the template with specific technical details.
|
|
433
|
+
Replace all placeholder text in [brackets] with real content.
|
|
434
|
+
Write the completed spec directly to specs/technical.md.
|
|
423
435
|
Do NOT ask questions — infer everything from the PRD."
|
|
424
436
|
|
|
425
437
|
echo "$tech_prompt" | claude -p --dangerously-skip-permissions 2>/dev/null
|
|
426
438
|
echo -e "${GREEN} ✓ specs/technical.md${NC}"
|
|
427
439
|
|
|
428
|
-
# Step 3: Generate CLAUDE.md
|
|
440
|
+
# Step 3: Generate CLAUDE.md (skip if exists)
|
|
429
441
|
echo ""
|
|
430
|
-
|
|
442
|
+
if [ -f "CLAUDE.md" ]; then
|
|
443
|
+
echo -e "${YELLOW}[3/4] Skipping CLAUDE.md (already exists)${NC}"
|
|
444
|
+
else
|
|
445
|
+
echo -e "${YELLOW}[3/4] Generating CLAUDE.md...${NC}"
|
|
431
446
|
|
|
432
|
-
|
|
447
|
+
local claude_prompt="You are filling in a CLAUDE.md template for a project.
|
|
433
448
|
|
|
434
449
|
Here is the PRD:
|
|
435
450
|
<prd>
|
|
@@ -441,24 +456,25 @@ Here is the Technical Spec:
|
|
|
441
456
|
$(cat specs/technical.md 2>/dev/null || echo "")
|
|
442
457
|
</technical>
|
|
443
458
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
- Important conventions
|
|
449
|
-
- Empty '## Learnings' section at the bottom
|
|
459
|
+
Here is the template to fill in:
|
|
460
|
+
<template>
|
|
461
|
+
${claude_template}
|
|
462
|
+
</template>
|
|
450
463
|
|
|
451
|
-
|
|
452
|
-
|
|
464
|
+
Fill in the template with project-specific details.
|
|
465
|
+
Replace all placeholder text in [brackets] with real content.
|
|
466
|
+
Keep it concise - this is a quick reference for AI agents.
|
|
467
|
+
Write directly to CLAUDE.md."
|
|
453
468
|
|
|
454
|
-
|
|
455
|
-
|
|
469
|
+
echo "$claude_prompt" | claude -p --dangerously-skip-permissions 2>/dev/null
|
|
470
|
+
echo -e "${GREEN} ✓ CLAUDE.md${NC}"
|
|
471
|
+
fi
|
|
456
472
|
|
|
457
473
|
# Step 4: Generate TODO
|
|
458
474
|
echo ""
|
|
459
475
|
echo -e "${YELLOW}[4/4] Generating TODO.md...${NC}"
|
|
460
476
|
|
|
461
|
-
local todo_prompt="You are
|
|
477
|
+
local todo_prompt="You are filling in a TODO template based on specs.
|
|
462
478
|
|
|
463
479
|
Here is the PRD:
|
|
464
480
|
<prd>
|
|
@@ -470,14 +486,16 @@ Here is the Technical Specification:
|
|
|
470
486
|
$(cat specs/technical.md 2>/dev/null || echo "")
|
|
471
487
|
</technical>
|
|
472
488
|
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
- Tasks should be completable in 1-2 hours max
|
|
489
|
+
Here is the template to follow:
|
|
490
|
+
<template>
|
|
491
|
+
${todo_template}
|
|
492
|
+
</template>
|
|
478
493
|
|
|
479
|
-
|
|
480
|
-
|
|
494
|
+
Create a phased TODO.md following the template structure.
|
|
495
|
+
Use checkbox format: - [ ] Task description
|
|
496
|
+
Keep tasks granular (1-2 hours max each).
|
|
497
|
+
End each phase with: - [ ] Phase N review
|
|
498
|
+
Write directly to TODO.md."
|
|
481
499
|
|
|
482
500
|
echo "$todo_prompt" | claude -p --dangerously-skip-permissions 2>/dev/null
|
|
483
501
|
echo -e "${GREEN} ✓ TODO.md${NC}"
|
|
@@ -486,7 +504,9 @@ Do NOT ask questions — infer everything from the specs."
|
|
|
486
504
|
echo -e "${GREEN}Specs generated:${NC}"
|
|
487
505
|
echo " - specs/prd.md"
|
|
488
506
|
echo " - specs/technical.md"
|
|
489
|
-
|
|
507
|
+
if [ ! -f "CLAUDE.md" ]; then
|
|
508
|
+
echo " - CLAUDE.md"
|
|
509
|
+
fi
|
|
490
510
|
echo " - TODO.md"
|
|
491
511
|
|
|
492
512
|
# Commit specs
|
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
[Brief project description]
|
|
6
|
+
|
|
7
|
+
## Commands
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Development
|
|
11
|
+
[dev command]
|
|
12
|
+
|
|
13
|
+
# Build
|
|
14
|
+
[build command]
|
|
15
|
+
|
|
16
|
+
# Test
|
|
17
|
+
[test command]
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Architecture
|
|
21
|
+
|
|
22
|
+
[Key architectural decisions and patterns]
|
|
23
|
+
|
|
24
|
+
## Conventions
|
|
25
|
+
|
|
26
|
+
- [Convention 1]
|
|
27
|
+
- [Convention 2]
|
|
28
|
+
|
|
29
|
+
## Learnings
|
|
30
|
+
|
|
31
|
+
<!-- Add learnings here as you discover them -->
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# TODO
|
|
2
|
+
|
|
3
|
+
## Phase 1: Setup
|
|
4
|
+
|
|
5
|
+
- [ ] Initialize project structure
|
|
6
|
+
- [ ] Set up development environment
|
|
7
|
+
- [ ] Configure dependencies
|
|
8
|
+
- [ ] Phase 1 review
|
|
9
|
+
|
|
10
|
+
## Phase 2: Core Features
|
|
11
|
+
|
|
12
|
+
- [ ] Implement feature 1
|
|
13
|
+
- [ ] Implement feature 2
|
|
14
|
+
- [ ] Add tests for core features
|
|
15
|
+
- [ ] Phase 2 review
|
|
16
|
+
|
|
17
|
+
## Phase 3: Polish
|
|
18
|
+
|
|
19
|
+
- [ ] Add error handling
|
|
20
|
+
- [ ] Improve UX
|
|
21
|
+
- [ ] Performance optimization
|
|
22
|
+
- [ ] Phase 3 review
|
|
23
|
+
|
|
24
|
+
## Phase 4: Launch
|
|
25
|
+
|
|
26
|
+
- [ ] Final testing
|
|
27
|
+
- [ ] Documentation
|
|
28
|
+
- [ ] Deployment
|
|
29
|
+
- [ ] Phase 4 review
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Product Requirements Document
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
[Brief description of the product/feature]
|
|
6
|
+
|
|
7
|
+
## Problem Statement
|
|
8
|
+
|
|
9
|
+
[What problem does this solve? Why does it matter?]
|
|
10
|
+
|
|
11
|
+
## Goals & Success Metrics
|
|
12
|
+
|
|
13
|
+
- [ ] Goal 1
|
|
14
|
+
- [ ] Goal 2
|
|
15
|
+
|
|
16
|
+
## User Stories
|
|
17
|
+
|
|
18
|
+
### As a [user type]
|
|
19
|
+
- I want to [action]
|
|
20
|
+
- So that [benefit]
|
|
21
|
+
|
|
22
|
+
## Functional Requirements
|
|
23
|
+
|
|
24
|
+
### Core Features
|
|
25
|
+
|
|
26
|
+
1. **Feature 1**
|
|
27
|
+
- Description
|
|
28
|
+
- Acceptance criteria
|
|
29
|
+
|
|
30
|
+
2. **Feature 2**
|
|
31
|
+
- Description
|
|
32
|
+
- Acceptance criteria
|
|
33
|
+
|
|
34
|
+
## Non-Functional Requirements
|
|
35
|
+
|
|
36
|
+
- **Performance**: [targets]
|
|
37
|
+
- **Security**: [requirements]
|
|
38
|
+
- **Scalability**: [considerations]
|
|
39
|
+
|
|
40
|
+
## Out of Scope
|
|
41
|
+
|
|
42
|
+
- [What we're NOT building]
|
|
43
|
+
|
|
44
|
+
## Open Questions
|
|
45
|
+
|
|
46
|
+
- [Unresolved questions]
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Technical Specification
|
|
2
|
+
|
|
3
|
+
## Architecture Overview
|
|
4
|
+
|
|
5
|
+
[High-level architecture diagram or description]
|
|
6
|
+
|
|
7
|
+
## Tech Stack
|
|
8
|
+
|
|
9
|
+
- **Frontend**:
|
|
10
|
+
- **Backend**:
|
|
11
|
+
- **Database**:
|
|
12
|
+
- **Infrastructure**:
|
|
13
|
+
|
|
14
|
+
## Data Model
|
|
15
|
+
|
|
16
|
+
### Entities
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
Entity1
|
|
20
|
+
├── id
|
|
21
|
+
├── field1
|
|
22
|
+
└── field2
|
|
23
|
+
|
|
24
|
+
Entity2
|
|
25
|
+
├── id
|
|
26
|
+
├── field1
|
|
27
|
+
└── entity1_id (FK)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## API Design
|
|
31
|
+
|
|
32
|
+
### Endpoints
|
|
33
|
+
|
|
34
|
+
| Method | Path | Description |
|
|
35
|
+
|--------|------|-------------|
|
|
36
|
+
| GET | /api/resource | List resources |
|
|
37
|
+
| POST | /api/resource | Create resource |
|
|
38
|
+
|
|
39
|
+
## Key Components
|
|
40
|
+
|
|
41
|
+
### Component 1
|
|
42
|
+
|
|
43
|
+
- **Purpose**:
|
|
44
|
+
- **Responsibilities**:
|
|
45
|
+
- **Dependencies**:
|
|
46
|
+
|
|
47
|
+
### Component 2
|
|
48
|
+
|
|
49
|
+
- **Purpose**:
|
|
50
|
+
- **Responsibilities**:
|
|
51
|
+
- **Dependencies**:
|
|
52
|
+
|
|
53
|
+
## Security Considerations
|
|
54
|
+
|
|
55
|
+
- Authentication:
|
|
56
|
+
- Authorization:
|
|
57
|
+
- Data protection:
|
|
58
|
+
|
|
59
|
+
## Performance Considerations
|
|
60
|
+
|
|
61
|
+
- Caching strategy:
|
|
62
|
+
- Database optimization:
|
|
63
|
+
- Load handling:
|
|
64
|
+
|
|
65
|
+
## Dependencies
|
|
66
|
+
|
|
67
|
+
- [External services/APIs]
|
|
68
|
+
- [Third-party libraries]
|
|
69
|
+
|
|
70
|
+
## Deployment
|
|
71
|
+
|
|
72
|
+
- Environment setup
|
|
73
|
+
- CI/CD pipeline
|
|
74
|
+
- Monitoring
|