chiefwiggum 1.0.1 → 1.2.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 +88 -40
- 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,10 @@ NC='\033[0m'
|
|
|
25
25
|
# =========================================
|
|
26
26
|
# CONFIGURATION
|
|
27
27
|
# =========================================
|
|
28
|
+
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
|
|
29
|
+
CHIEFWIGGUM_HOME="${CHIEFWIGGUM_HOME:-$HOME/.chiefwiggum}"
|
|
30
|
+
TEMPLATES_DIR="${CHIEFWIGGUM_HOME}/templates"
|
|
31
|
+
BUNDLED_TEMPLATES="${SCRIPT_DIR}/templates"
|
|
28
32
|
TODO_FILE="${TODO_FILE:-TODO.md}"
|
|
29
33
|
COOLDOWN_SECONDS="${COOLDOWN_SECONDS:-5}"
|
|
30
34
|
|
|
@@ -69,6 +73,10 @@ show_help() {
|
|
|
69
73
|
echo " chiefwiggum loop # Start build loop"
|
|
70
74
|
echo " chiefwiggum # Same as 'loop'"
|
|
71
75
|
echo ""
|
|
76
|
+
echo "Templates:"
|
|
77
|
+
echo -e " ${CYAN}${TEMPLATES_DIR}${NC}"
|
|
78
|
+
echo " Edit these to customize how specs are generated."
|
|
79
|
+
echo ""
|
|
72
80
|
}
|
|
73
81
|
|
|
74
82
|
# =========================================
|
|
@@ -371,31 +379,43 @@ generate_from_plan() {
|
|
|
371
379
|
echo -e "${GREEN} Generating specs from: ${plan_file}${NC}"
|
|
372
380
|
echo -e "${GREEN}════════════════════════════════════════${NC}"
|
|
373
381
|
|
|
382
|
+
# Check templates exist
|
|
383
|
+
if [ ! -d "$TEMPLATES_DIR" ]; then
|
|
384
|
+
echo -e "${RED}Templates not found at: ${TEMPLATES_DIR}${NC}"
|
|
385
|
+
echo ""
|
|
386
|
+
echo "Run this to set up templates:"
|
|
387
|
+
echo -e " ${CYAN}npx chiefwiggum@latest${NC}"
|
|
388
|
+
exit 1
|
|
389
|
+
fi
|
|
390
|
+
|
|
374
391
|
mkdir -p specs
|
|
375
392
|
|
|
393
|
+
# Load templates
|
|
394
|
+
local prd_template=$(cat "$TEMPLATES_DIR/specs/prd.md")
|
|
395
|
+
local tech_template=$(cat "$TEMPLATES_DIR/specs/technical.md")
|
|
396
|
+
local todo_template=$(cat "$TEMPLATES_DIR/TODO.md")
|
|
397
|
+
local claude_template=$(cat "$TEMPLATES_DIR/CLAUDE.md")
|
|
398
|
+
|
|
376
399
|
# Step 1: Generate PRD
|
|
377
400
|
echo ""
|
|
378
401
|
echo -e "${YELLOW}[1/4] Generating specs/prd.md...${NC}"
|
|
379
402
|
|
|
380
|
-
local prd_prompt="You are
|
|
403
|
+
local prd_prompt="You are filling in a PRD template based on a project plan.
|
|
381
404
|
|
|
382
405
|
Here is the plan:
|
|
383
406
|
<plan>
|
|
384
407
|
${plan_content}
|
|
385
408
|
</plan>
|
|
386
409
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
- User Stories
|
|
392
|
-
- Functional Requirements
|
|
393
|
-
- Non-Functional Requirements
|
|
394
|
-
- Out of Scope
|
|
410
|
+
Here is the template to fill in:
|
|
411
|
+
<template>
|
|
412
|
+
${prd_template}
|
|
413
|
+
</template>
|
|
395
414
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
415
|
+
Fill in the template with specific details from the plan.
|
|
416
|
+
Replace all placeholder text in [brackets] with real content.
|
|
417
|
+
Write the completed PRD directly to specs/prd.md.
|
|
418
|
+
Do NOT ask questions — infer everything from the plan."
|
|
399
419
|
|
|
400
420
|
echo "$prd_prompt" | claude -p --dangerously-skip-permissions 2>/dev/null
|
|
401
421
|
echo -e "${GREEN} ✓ specs/prd.md${NC}"
|
|
@@ -406,23 +426,21 @@ Be concise but comprehensive."
|
|
|
406
426
|
local prd_generated
|
|
407
427
|
prd_generated="$(cat specs/prd.md 2>/dev/null || echo "")"
|
|
408
428
|
|
|
409
|
-
local tech_prompt="You are
|
|
429
|
+
local tech_prompt="You are filling in a Technical Specification template based on a PRD.
|
|
410
430
|
|
|
411
431
|
Here is the PRD:
|
|
412
432
|
<prd>
|
|
413
433
|
${prd_generated}
|
|
414
434
|
</prd>
|
|
415
435
|
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
- API Design (if applicable)
|
|
421
|
-
- Key Components
|
|
422
|
-
- Security Considerations
|
|
423
|
-
- Performance Considerations
|
|
436
|
+
Here is the template to fill in:
|
|
437
|
+
<template>
|
|
438
|
+
${tech_template}
|
|
439
|
+
</template>
|
|
424
440
|
|
|
425
|
-
|
|
441
|
+
Fill in the template with specific technical details.
|
|
442
|
+
Replace all placeholder text in [brackets] with real content.
|
|
443
|
+
Write the completed spec directly to specs/technical.md.
|
|
426
444
|
Do NOT ask questions — infer everything from the PRD."
|
|
427
445
|
|
|
428
446
|
echo "$tech_prompt" | claude -p --dangerously-skip-permissions 2>/dev/null
|
|
@@ -435,7 +453,7 @@ Do NOT ask questions — infer everything from the PRD."
|
|
|
435
453
|
else
|
|
436
454
|
echo -e "${YELLOW}[3/4] Generating CLAUDE.md...${NC}"
|
|
437
455
|
|
|
438
|
-
local claude_prompt="You are
|
|
456
|
+
local claude_prompt="You are filling in a CLAUDE.md template for a project.
|
|
439
457
|
|
|
440
458
|
Here is the PRD:
|
|
441
459
|
<prd>
|
|
@@ -447,15 +465,15 @@ Here is the Technical Spec:
|
|
|
447
465
|
$(cat specs/technical.md 2>/dev/null || echo "")
|
|
448
466
|
</technical>
|
|
449
467
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
- Important conventions
|
|
455
|
-
- Empty '## Learnings' section at the bottom
|
|
468
|
+
Here is the template to fill in:
|
|
469
|
+
<template>
|
|
470
|
+
${claude_template}
|
|
471
|
+
</template>
|
|
456
472
|
|
|
457
|
-
|
|
458
|
-
|
|
473
|
+
Fill in the template with project-specific details.
|
|
474
|
+
Replace all placeholder text in [brackets] with real content.
|
|
475
|
+
Keep it concise - this is a quick reference for AI agents.
|
|
476
|
+
Write directly to CLAUDE.md."
|
|
459
477
|
|
|
460
478
|
echo "$claude_prompt" | claude -p --dangerously-skip-permissions 2>/dev/null
|
|
461
479
|
echo -e "${GREEN} ✓ CLAUDE.md${NC}"
|
|
@@ -465,7 +483,7 @@ Keep it concise - this is a quick reference for AI agents."
|
|
|
465
483
|
echo ""
|
|
466
484
|
echo -e "${YELLOW}[4/4] Generating TODO.md...${NC}"
|
|
467
485
|
|
|
468
|
-
local todo_prompt="You are
|
|
486
|
+
local todo_prompt="You are filling in a TODO template based on specs.
|
|
469
487
|
|
|
470
488
|
Here is the PRD:
|
|
471
489
|
<prd>
|
|
@@ -477,14 +495,16 @@ Here is the Technical Specification:
|
|
|
477
495
|
$(cat specs/technical.md 2>/dev/null || echo "")
|
|
478
496
|
</technical>
|
|
479
497
|
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
- Tasks should be completable in 1-2 hours max
|
|
498
|
+
Here is the template to follow:
|
|
499
|
+
<template>
|
|
500
|
+
${todo_template}
|
|
501
|
+
</template>
|
|
485
502
|
|
|
486
|
-
|
|
487
|
-
|
|
503
|
+
Create a phased TODO.md following the template structure.
|
|
504
|
+
Use checkbox format: - [ ] Task description
|
|
505
|
+
Keep tasks granular (1-2 hours max each).
|
|
506
|
+
End each phase with: - [ ] Phase N review
|
|
507
|
+
Write directly to TODO.md."
|
|
488
508
|
|
|
489
509
|
echo "$todo_prompt" | claude -p --dangerously-skip-permissions 2>/dev/null
|
|
490
510
|
echo -e "${GREEN} ✓ TODO.md${NC}"
|
|
@@ -493,7 +513,9 @@ Do NOT ask questions — infer everything from the specs."
|
|
|
493
513
|
echo -e "${GREEN}Specs generated:${NC}"
|
|
494
514
|
echo " - specs/prd.md"
|
|
495
515
|
echo " - specs/technical.md"
|
|
496
|
-
|
|
516
|
+
if [ ! -f "CLAUDE.md" ]; then
|
|
517
|
+
echo " - CLAUDE.md"
|
|
518
|
+
fi
|
|
497
519
|
echo " - TODO.md"
|
|
498
520
|
|
|
499
521
|
# Commit specs
|
|
@@ -690,6 +712,18 @@ cleanup_stale_processes() {
|
|
|
690
712
|
sleep 1
|
|
691
713
|
}
|
|
692
714
|
|
|
715
|
+
# =========================================
|
|
716
|
+
# SETUP TEMPLATES
|
|
717
|
+
# =========================================
|
|
718
|
+
setup_templates() {
|
|
719
|
+
# Copy bundled templates to ~/.chiefwiggum/templates
|
|
720
|
+
if [ -d "$BUNDLED_TEMPLATES" ]; then
|
|
721
|
+
mkdir -p "$CHIEFWIGGUM_HOME"
|
|
722
|
+
cp -r "$BUNDLED_TEMPLATES" "$CHIEFWIGGUM_HOME/"
|
|
723
|
+
echo -e "${GREEN}✓ Templates installed to: ${TEMPLATES_DIR}${NC}"
|
|
724
|
+
fi
|
|
725
|
+
}
|
|
726
|
+
|
|
693
727
|
# =========================================
|
|
694
728
|
# INSTALL COMMAND
|
|
695
729
|
# =========================================
|
|
@@ -704,6 +738,8 @@ cmd_install() {
|
|
|
704
738
|
local installed_path=$(which chiefwiggum)
|
|
705
739
|
if [[ "$installed_path" != *"npx"* ]] && [[ "$installed_path" != *".npm/_npx"* ]]; then
|
|
706
740
|
echo -e "${GREEN}✓ Already installed at: ${installed_path}${NC}"
|
|
741
|
+
# Still set up templates in case they're missing
|
|
742
|
+
setup_templates
|
|
707
743
|
echo ""
|
|
708
744
|
echo "Run 'chiefwiggum new' to get started."
|
|
709
745
|
return 0
|
|
@@ -715,11 +751,23 @@ cmd_install() {
|
|
|
715
751
|
echo ""
|
|
716
752
|
|
|
717
753
|
if npm install -g chiefwiggum; then
|
|
754
|
+
echo ""
|
|
755
|
+
# Set up templates after install
|
|
756
|
+
# Need to get the installed location
|
|
757
|
+
local installed_dir=$(dirname "$(realpath "$(which chiefwiggum)")")
|
|
758
|
+
if [ -d "${installed_dir}/templates" ]; then
|
|
759
|
+
mkdir -p "$CHIEFWIGGUM_HOME"
|
|
760
|
+
cp -r "${installed_dir}/templates" "$CHIEFWIGGUM_HOME/"
|
|
761
|
+
echo -e "${GREEN}✓ Templates installed to: ${TEMPLATES_DIR}${NC}"
|
|
762
|
+
fi
|
|
763
|
+
|
|
718
764
|
echo ""
|
|
719
765
|
echo -e "${GREEN}════════════════════════════════════════${NC}"
|
|
720
766
|
echo -e "${GREEN} ✓ Installation complete!${NC}"
|
|
721
767
|
echo -e "${GREEN}════════════════════════════════════════${NC}"
|
|
722
768
|
echo ""
|
|
769
|
+
echo -e "Templates: ${CYAN}${TEMPLATES_DIR}${NC}"
|
|
770
|
+
echo ""
|
|
723
771
|
echo "Get started:"
|
|
724
772
|
echo -e " ${CYAN}chiefwiggum new${NC} # Set up a new project"
|
|
725
773
|
echo -e " ${CYAN}chiefwiggum loop${NC} # Run the build loop"
|
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
|