chiefwiggum 1.0.1 → 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 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
 
@@ -371,31 +373,40 @@ generate_from_plan() {
371
373
  echo -e "${GREEN} Generating specs from: ${plan_file}${NC}"
372
374
  echo -e "${GREEN}════════════════════════════════════════${NC}"
373
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
+
374
382
  mkdir -p specs
375
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
+
376
390
  # Step 1: Generate PRD
377
391
  echo ""
378
392
  echo -e "${YELLOW}[1/4] Generating specs/prd.md...${NC}"
379
393
 
380
- local prd_prompt="You are generating a PRD (Product Requirements Document) from a project plan.
394
+ local prd_prompt="You are filling in a PRD template based on a project plan.
381
395
 
382
396
  Here is the plan:
383
397
  <plan>
384
398
  ${plan_content}
385
399
  </plan>
386
400
 
387
- Generate a complete PRD with these sections:
388
- - Overview
389
- - Problem Statement
390
- - Goals & Success Metrics
391
- - User Stories
392
- - Functional Requirements
393
- - Non-Functional Requirements
394
- - Out of Scope
401
+ Here is the template to fill in:
402
+ <template>
403
+ ${prd_template}
404
+ </template>
395
405
 
396
- Write it directly to specs/prd.md.
397
- Do NOT ask questions infer everything from the plan.
398
- Be concise but comprehensive."
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."
399
410
 
400
411
  echo "$prd_prompt" | claude -p --dangerously-skip-permissions 2>/dev/null
401
412
  echo -e "${GREEN} ✓ specs/prd.md${NC}"
@@ -406,23 +417,21 @@ Be concise but comprehensive."
406
417
  local prd_generated
407
418
  prd_generated="$(cat specs/prd.md 2>/dev/null || echo "")"
408
419
 
409
- local tech_prompt="You are generating a Technical Specification from a PRD.
420
+ local tech_prompt="You are filling in a Technical Specification template based on a PRD.
410
421
 
411
422
  Here is the PRD:
412
423
  <prd>
413
424
  ${prd_generated}
414
425
  </prd>
415
426
 
416
- Generate a complete Technical Specification with:
417
- - Architecture Overview
418
- - Tech Stack
419
- - Data Model
420
- - API Design (if applicable)
421
- - Key Components
422
- - Security Considerations
423
- - Performance Considerations
427
+ Here is the template to fill in:
428
+ <template>
429
+ ${tech_template}
430
+ </template>
424
431
 
425
- Write it directly to specs/technical.md.
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.
426
435
  Do NOT ask questions — infer everything from the PRD."
427
436
 
428
437
  echo "$tech_prompt" | claude -p --dangerously-skip-permissions 2>/dev/null
@@ -435,7 +444,7 @@ Do NOT ask questions — infer everything from the PRD."
435
444
  else
436
445
  echo -e "${YELLOW}[3/4] Generating CLAUDE.md...${NC}"
437
446
 
438
- local claude_prompt="You are generating a CLAUDE.md file for a project.
447
+ local claude_prompt="You are filling in a CLAUDE.md template for a project.
439
448
 
440
449
  Here is the PRD:
441
450
  <prd>
@@ -447,15 +456,15 @@ Here is the Technical Spec:
447
456
  $(cat specs/technical.md 2>/dev/null || echo "")
448
457
  </technical>
449
458
 
450
- Generate a CLAUDE.md with:
451
- - Brief project overview
452
- - Key commands to run
453
- - Architecture summary
454
- - Important conventions
455
- - Empty '## Learnings' section at the bottom
459
+ Here is the template to fill in:
460
+ <template>
461
+ ${claude_template}
462
+ </template>
456
463
 
457
- Write it directly to CLAUDE.md.
458
- Keep it concise - this is a quick reference for AI agents."
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."
459
468
 
460
469
  echo "$claude_prompt" | claude -p --dangerously-skip-permissions 2>/dev/null
461
470
  echo -e "${GREEN} ✓ CLAUDE.md${NC}"
@@ -465,7 +474,7 @@ Keep it concise - this is a quick reference for AI agents."
465
474
  echo ""
466
475
  echo -e "${YELLOW}[4/4] Generating TODO.md...${NC}"
467
476
 
468
- local todo_prompt="You are generating a TODO task list from a PRD and Technical Specification.
477
+ local todo_prompt="You are filling in a TODO template based on specs.
469
478
 
470
479
  Here is the PRD:
471
480
  <prd>
@@ -477,14 +486,16 @@ Here is the Technical Specification:
477
486
  $(cat specs/technical.md 2>/dev/null || echo "")
478
487
  </technical>
479
488
 
480
- Generate a phased TODO.md with:
481
- - Logical phases (Setup, Core Features, Polish, etc.)
482
- - Granular tasks using checkbox format: - [ ] Task description
483
- - Each phase ends with: - [ ] Phase review
484
- - Tasks should be completable in 1-2 hours max
489
+ Here is the template to follow:
490
+ <template>
491
+ ${todo_template}
492
+ </template>
485
493
 
486
- Write it directly to TODO.md.
487
- Do NOT ask questions infer everything from the specs."
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."
488
499
 
489
500
  echo "$todo_prompt" | claude -p --dangerously-skip-permissions 2>/dev/null
490
501
  echo -e "${GREEN} ✓ TODO.md${NC}"
@@ -493,7 +504,9 @@ Do NOT ask questions — infer everything from the specs."
493
504
  echo -e "${GREEN}Specs generated:${NC}"
494
505
  echo " - specs/prd.md"
495
506
  echo " - specs/technical.md"
496
- echo " - CLAUDE.md"
507
+ if [ ! -f "CLAUDE.md" ]; then
508
+ echo " - CLAUDE.md"
509
+ fi
497
510
  echo " - TODO.md"
498
511
 
499
512
  # Commit specs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chiefwiggum",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Autonomous coding agent CLI. Point it at a plan, watch it build.",
5
5
  "bin": {
6
6
  "chiefwiggum": "./chiefwiggum"
@@ -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