ai-eng-system 0.0.15 โ†’ 0.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/README.md CHANGED
@@ -6,7 +6,7 @@ Advanced development tools with context engineering, research orchestration, and
6
6
 
7
7
  ### Spec-Driven Development (Recommended)
8
8
 
9
- This toolkit follows the **spec-driven development methodology** from GitHub's official blog post: [Spec-driven development with AI: Get started with a new open source toolkit](https://github.blog/ai-and-ml/generative-ai/spec-driven-development-with-ai-get-started-with-a-new-open-source-toolkit/).
9
+ This toolkit follows **spec-driven development methodology** from GitHub's official blog post: [Spec-driven development with AI: Get started with a new open source toolkit](https://github.blog/ai-and-ml/generative-ai/spec-driven-development-with-ai-get-started-with-a-new-open-source-toolkit/).
10
10
 
11
11
  **The 5-Phase Workflow** (always in this order):
12
12
 
@@ -17,16 +17,18 @@ flowchart LR
17
17
  E -.->|Repeat| D
18
18
  ```
19
19
 
20
- | Phase | Command | Output |
21
- |-------|---------|--------|
22
- | 1. Research | `/ai-eng/research` | Context and findings |
23
- | 2. Specify | `/ai-eng/specify` | Feature specification |
24
- | 3. Plan | `/ai-eng/plan` | Implementation plan |
25
- | 4. Work | `/ai-eng/work` | Quality-gated code |
26
- | 5. Review | `/ai-eng/review` | Multi-agent approval |
20
+ | Phase | Command | Output | Ralph Wiggum ๐Ÿ”„ |
21
+ |-------|---------|--------|-----------------|
22
+ | 1. Research | `/ai-eng/research` | Context and findings | `--ralph` for iterative deepening |
23
+ | 2. Specify | `/ai-eng/specify` | Feature specification | `--ralph` for requirement refinement |
24
+ | 3. Plan | `/ai-eng/plan` | Implementation plan | `--ralph` for task completeness |
25
+ | 4. Work | `/ai-eng/work` | Quality-gated code | `--ralph` for TDD cycles |
26
+ | 5. Review | `/ai-eng/review` | Multi-agent approval | `--ralph` for thorough analysis |
27
27
 
28
28
  This approach ensures specifications are your "source of truth" for what gets built, reducing guesswork and enabling more reliable AI-assisted development.
29
29
 
30
+ ๐Ÿ”„ **New: Ralph Wiggum Iteration** - Add `--ralph` flag to any phase command for persistent refinement until quality standards are met. See [Ralph Wiggum Integration Guide](./docs/ralph-wiggum-integration-complete.md).
31
+
30
32
  See [docs/spec-driven-workflow.md](./docs/spec-driven-workflow.md) for complete workflow guide with examples.
31
33
 
32
34
  ### Claude Code (Recommended)
@@ -51,16 +53,18 @@ See [docs/spec-driven-workflow.md](./docs/spec-driven-workflow.md) for complete
51
53
 
52
54
  **Core workflow for systematic development** (always research โ†’ specify โ†’ plan โ†’ work โ†’ review):
53
55
 
54
- | Phase | Command | Purpose |
55
- |-------|---------|---------|
56
- | 1. Research | `/ai-eng/research` | Multi-phase research with codebase and external context |
57
- | 2. Specify | `/ai-eng/specify` | Create feature specifications with TCRO framework |
58
- | 3. Plan | `/ai-eng/plan` | Create detailed implementation plans from specs |
59
- | 4. Work | `/ai-eng/work` | Execute plans with quality gates and validation |
60
- | 5. Review | `/ai-eng/review` | Multi-perspective code review (28 agents) |
56
+ | Phase | Command | Purpose | Ralph Wiggum ๐Ÿ”„ |
57
+ |-------|---------|---------|-----------------|
58
+ | 1. Research | `/ai-eng/research` | Multi-phase research with codebase and external context | Iterative deepening, gap analysis |
59
+ | 2. Specify | `/ai-eng/specify` | Create feature specifications with TCRO framework | Requirement refinement, completeness |
60
+ | 3. Plan | `/ai-eng/plan` | Create detailed implementation plans from specs | Task atomicity, dependency mapping |
61
+ | 4. Work | `/ai-eng/work` | Execute plans with quality gates and validation | TDD cycles, implementation refinement |
62
+ | 5. Review | `/ai-eng/review` | Multi-perspective code review (28 agents) | Escalating focus, thorough analysis |
61
63
 
62
64
  > **Methodology**: Based on [GitHub's spec-driven development approach](https://github.blog/ai-and-ml/generative-ai/spec-driven-development-with-ai-get-started-with-a-new-open-source-toolkit/)
63
65
 
66
+ > **๐Ÿ”„ Ralph Wiggum**: Add `--ralph` flag to any phase command for persistent iteration. Perfect for complex tasks requiring multiple refinement cycles. [Learn more โ†’](./docs/ralph-wiggum-integration-complete.md)
67
+
64
68
  ### Additional Commands (13 total)
65
69
  - `/ai-eng/optimize` - Prompt enhancement (+45% quality)
66
70
  - `/ai-eng/deploy` - Pre-deployment checklists
@@ -86,12 +90,15 @@ See [docs/spec-driven-workflow.md](./docs/spec-driven-workflow.md) for complete
86
90
  - **Content & SEO**: `seo-specialist`, `prompt-optimizer`
87
91
  - **Plugin Development**: `agent-creator`, `command-creator`, `skill-creator`, `tool-creator`, `plugin-validator`
88
92
 
89
- ### Skills (7 files)
93
+ ### Skills (8 files)
90
94
  - `devops` - Coolify deployment, Git worktree workflows
91
95
  - `prompting` - Research-backed incentive prompting techniques
92
96
  - `research` - Comprehensive multi-phase research orchestration
93
97
  - `plugin-dev` - Plugin development knowledge base and references
94
98
  - `text-cleanup` - Pattern-based text cleanup (slop, comments)
99
+ - **`workflow/ralph-wiggum`** - Persistent iteration patterns for quality refinement (NEW!)
100
+
101
+ > **๐Ÿ”„ Ralph Wiggum Philosophy**: "Iteration > Perfection, Failures Are Data, Persistence Wins" - Now available across all phase commands with `--ralph` flag
95
102
 
96
103
  ## ๐Ÿ”„ Subagent Orchestrator Configuration
97
104
 
@@ -168,10 +175,39 @@ bun test # Run test suite
168
175
  - Tests: โœ… Passing (21/21)
169
176
 
170
177
  ## ๐Ÿ“š Documentation
178
+
179
+ ### Online Documentation
180
+ **Deploy with Coolify** (recommended):
181
+ - ๐Ÿ“– [Coolify Deployment Guide](docs-site/COOLIFY-DEPLOYMENT.md) - Complete deployment instructions
182
+ - ๐Ÿš€ Deploy to Coolify in 5 minutes
183
+
184
+ **Built Site**: `docs-site/` directory
185
+
186
+ ### Developer Documentation
171
187
  - [Installation Guide](INSTALLATION.md) - Detailed setup instructions
172
188
  - [Agent Coordination](AGENTS.md) - Agent usage patterns and coordination
173
189
  - [Plugin Documentation](PLUGIN.md) - Technical plugin details
174
190
  - [Research Guide](docs/research-command-guide.md) - Research orchestration usage
191
+ - [Ralph Wiggum Integration](docs/ralph-wiggum-integration-complete.md) - Iterative refinement patterns (NEW!)
192
+
193
+ ### Documentation Site
194
+
195
+ The documentation site is built with **Astro + Starlight** and ready for deployment:
196
+
197
+ ```bash
198
+ # Local development
199
+ cd docs-site
200
+ bun install
201
+ bun run dev # http://localhost:4321
202
+
203
+ # Build for production
204
+ bun run build
205
+
206
+ # Deploy to Coolify
207
+ # Repository path: docs-site/
208
+ # Build command: bun install && bun run build
209
+ # Output directory: dist
210
+ ```
175
211
 
176
212
  ---
177
213
  ## ๐Ÿ’ป Usage Example
@@ -202,12 +238,21 @@ npm install ai-eng-system
202
238
  ### Using Commands
203
239
 
204
240
  ```bash
241
+ # Basic workflow
205
242
  /ai-eng/plan # Create implementation plan
206
243
  /ai-eng/review # Multi-agent code review
207
244
  /ai-eng/work # Execute implementation plan
208
245
  /ai-eng/seo # SEO audit
209
246
  /ai-eng/create-agent # Generate new agent
210
- # ... and 11 more
247
+
248
+ # Ralph Wiggum iteration (NEW!)
249
+ /ai-eng/work "feature" --ralph # TDD cycles until complete
250
+ /ai-eng/research "topic" --ralph --ralph-max-iterations 15 # Deep research
251
+ /ai-eng/specify "feature" --ralph --ralph-quality-gate="rg '\[NEEDS CLARIFICATION\]'"
252
+ /ai-eng/plan --from-spec=specs/feature.md --ralph # Enhanced planning
253
+ /ai-eng/review src/ --ralph --ralph-focus=security # Thorough review
254
+
255
+ # ... and 11 more commands
211
256
  ```
212
257
 
213
258
  ### Using Agents
@@ -40,6 +40,12 @@ Create a detailed implementation plan for: $ARGUMENTS
40
40
 
41
41
  # From research
42
42
  /ai-eng/plan --from-research=docs/research/2026-01-01-auth-patterns.md
43
+
44
+ # Ralph Wiggum iteration for complex plans
45
+ /ai-eng/plan "microservices migration" --ralph --ralph-show-progress
46
+
47
+ # Ralph Wiggum with custom iterations and quality gate
48
+ /ai-eng/plan --from-spec=specs/auth/spec.md --ralph --ralph-max-iterations 8 --ralph-quality-gate="rg 'Depends On:' specs/*/plan.md"
43
49
  ```
44
50
 
45
51
  ## Options
@@ -54,6 +60,14 @@ Create a detailed implementation plan for: $ARGUMENTS
54
60
  | `--from-spec <file>` | Create plan from specification file |
55
61
  | `--from-research <file>` | Create plan from research document |
56
62
  | `-v, --verbose` | Enable verbose output |
63
+ | `--ralph` | Enable Ralph Wiggum iteration mode for persistent plan refinement |
64
+ | `--ralph-max-iterations <n>` | Maximum iterations for Ralph Wiggum mode [default: 10] |
65
+ | `--ralph-completion-promise <text>` | Custom completion promise text [default: "Plan is comprehensive and ready for execution"] |
66
+ | `--ralph-quality-gate <command>` | Command to run after each iteration for quality validation |
67
+ | `--ralph-stop-on-gate-fail` | Stop iterations when quality gate fails [default: continue] |
68
+ | `--ralph-show-progress` | Show detailed iteration progress |
69
+ | `--ralph-log-history <file>` | Log iteration history to JSON file |
70
+ | `--ralph-verbose` | Enable verbose Ralph Wiggum iteration output |
57
71
 
58
72
  ## Phase 0: Prompt Refinement (CRITICAL - Do First)
59
73
 
@@ -77,6 +91,21 @@ If no spec is found:
77
91
  - If yes, gather requirements through clarifying questions
78
92
  - If no, exit and prompt user to run `/ai-eng/specify`
79
93
 
94
+ ### Ralph Wiggum Integration
95
+
96
+ If `--ralph` flag is used, also invoke the `ralph-wiggum` skill:
97
+
98
+ **Load Ralph Wiggum skill from:** `skills/workflow/ralph-wiggum/SKILL.md`
99
+
100
+ **Ralph Wiggum Planning Cycle:**
101
+ 1. **Initial Plan** - Create comprehensive implementation plan
102
+ 2. **Gap Analysis** - Identify missing tasks, incomplete dependencies
103
+ 3. **Iterative Enhancement** - Add missing details, strengthen task definitions
104
+ 4. **Quality Validation** - Run quality gate if specified
105
+ 5. **Completion Check** - Continue until completion promise met or max iterations reached
106
+
107
+ **Default Planning Completion Promise:** "Plan is comprehensive and ready for execution"
108
+
80
109
  ### Phase 2: Discovery (Research Mode)
81
110
 
82
111
  #### Subagent Communication Protocol (Minimal)
@@ -503,4 +532,86 @@ For example:
503
532
  - `bun run scripts/run-command.ts plan "implement auth" --from-spec=specs/auth/spec.md --output=plans/auth.yaml`
504
533
  - `bun run scripts/run-command.ts plan --from-research=docs/research/auth.md --scope=implementation`
505
534
 
535
+ ## Ralph Wiggum Iteration Mode
536
+
537
+ When `--ralph` flag is enabled, the planning process follows a persistent refinement cycle:
538
+
539
+ ### Ralph Wiggum Planning Cycle
540
+
541
+ **Iteration Process:**
542
+ 1. **Execute Planning Phases 1-7** - Run complete planning process
543
+ 2. **Gap Analysis** - Review plan for:
544
+ - Missing tasks or incomplete task definitions
545
+ - Unclear dependencies or integration points
546
+ - Insufficient testing coverage
547
+ - Incomplete risk assessment
548
+ 3. **Targeted Enhancement** - Focus next iteration on identified gaps:
549
+ - Add missing tasks or subtasks
550
+ - Strengthen dependency mapping
551
+ - Enhance testing strategy
552
+ - Improve risk mitigation strategies
553
+ 4. **Quality Gate** - Run quality gate command if specified
554
+ 5. **Progress Update** - Log iteration improvements and continue
555
+ 6. **Completion Check** - Stop when:
556
+ - Plan comprehensiveness promise is met
557
+ - Quality gates consistently pass
558
+ - Maximum iterations reached
559
+
560
+ ### Ralph Wiggum Quality Gates
561
+
562
+ **Planning Quality Gate Examples:**
563
+ ```bash
564
+ # Check task completeness
565
+ rg "Acceptance Criteria:" specs/*/plan.md | wc -l
566
+
567
+ # Validate dependencies mapping
568
+ rg "Depends On:" specs/*/plan.md
569
+
570
+ # Check risk assessment completeness
571
+ rg "Impact.*Likelihood.*Mitigation" specs/*/plan.md
572
+ ```
573
+
574
+ ### Progress Tracking
575
+
576
+ **Iteration Metrics:**
577
+ - Iteration number and completion status
578
+ - Tasks added or refined
579
+ - Dependencies mapped or clarified
580
+ - Risk mitigations added
581
+ - Quality gate pass/fail status
582
+ - Plan completeness score
583
+
584
+ **Example Progress Output:**
585
+ ```
586
+ ๐Ÿ”„ Ralph Wiggum Planning Iteration 3/10
587
+ ๐Ÿ“ Tasks: 12 total (+2 this iteration)
588
+ ๐Ÿ”— Dependencies: 8 mapped (+1 clarified this iteration)
589
+ ๐Ÿ›ก๏ธ Risk mitigations: 5 complete (+2 this iteration)
590
+ ๐Ÿงช Test coverage: 85% (+5% this iteration)
591
+ โœ… Quality gate: PASSED
592
+ ๐ŸŽฏ Plan completeness: 90% (improving)
593
+ ```
594
+
595
+ ### Ralph Wiggum Implementation Notes
596
+
597
+ **Planning-Specific Considerations:**
598
+
599
+ - **Task Atomicity**: Each iteration should ensure tasks are truly atomic
600
+ - **Dependency Clarity**: Focus on making dependencies explicit and minimal
601
+ - **Testing Integration**: Ensure comprehensive test coverage for all tasks
602
+ - **Risk Coverage**: Each iteration should strengthen risk mitigation strategies
603
+
604
+ **Default Settings:**
605
+ - **Max Iterations**: 10 (sufficient for comprehensive planning refinement)
606
+ - **Completion Promise**: "Plan is comprehensive and ready for execution"
607
+ - **Quality Gate**: Check task completeness and dependency mapping
608
+ - **Progress Tracking**: Always enabled in Ralph mode
609
+
610
+ **Best Practices:**
611
+ - Focus on making tasks more atomic each iteration
612
+ - Strengthen dependency mapping to enable parallel execution
613
+ - Enhance risk assessment with specific mitigations
614
+ - Validate spec coverage (if spec exists) each iteration
615
+ - Ensure all supporting artifacts are generated
616
+
506
617
  $ARGUMENTS
@@ -36,6 +36,12 @@ Conduct comprehensive research for: $ARGUMENTS
36
36
 
37
37
  # Feed results into planning
38
38
  /ai-eng/research "caching strategies" --feed-into plan
39
+
40
+ # Ralph Wiggum iteration for complex topics
41
+ /ai-eng/research "microservices architecture patterns" --ralph --ralph-show-progress
42
+
43
+ # Ralph Wiggum with custom iterations
44
+ /ai-eng/research "database optimization techniques" --ralph --ralph-max-iterations 15 --ralph-verbose
39
45
  ```
40
46
 
41
47
  ## Options
@@ -50,6 +56,14 @@ Conduct comprehensive research for: $ARGUMENTS
50
56
  | `--no-cache` | Disable research caching |
51
57
  | `--feed-into <command>` | After research, invoke specified command (specify\|plan) |
52
58
  | `-v, --verbose` | Enable verbose output |
59
+ | `--ralph` | Enable Ralph Wiggum iteration mode for persistent research refinement |
60
+ | `--ralph-max-iterations <n>` | Maximum iterations for Ralph Wiggum mode [default: 10] |
61
+ | `--ralph-completion-promise <text>` | Custom completion promise text [default: "Research is complete and comprehensive"] |
62
+ | `--ralph-quality-gate <command>` | Command to run after each iteration for quality validation |
63
+ | `--ralph-stop-on-gate-fail` | Stop iterations when quality gate fails [default: continue] |
64
+ | `--ralph-show-progress` | Show detailed iteration progress |
65
+ | `--ralph-log-history <file>` | Log iteration history to JSON file |
66
+ | `--ralph-verbose` | Enable verbose Ralph Wiggum iteration output |
53
67
 
54
68
  ## Phase 0: Prompt Refinement (CRITICAL - Do First)
55
69
 
@@ -27,6 +27,12 @@ Review code changes: $ARGUMENTS
27
27
  /ai-eng/review src/
28
28
  /ai-eng/review src/ --type=security --severity=high
29
29
  /ai-eng/review . --focus=performance --verbose
30
+
31
+ # Ralph Wiggum iteration for thorough reviews
32
+ /ai-eng/review src/ --ralph --ralph-show-progress
33
+
34
+ # Ralph Wiggum with security focus and custom iterations
35
+ /ai-eng/review . --focus=security --ralph --ralph-max-iterations 15 --ralph-verbose
30
36
  ```
31
37
 
32
38
  ## Options
@@ -39,6 +45,14 @@ Review code changes: $ARGUMENTS
39
45
  | `-f, --focus <focus>` | Focused review (security\|performance\|frontend\|general) |
40
46
  | `-o, --output <file>` | Output report file [default: code-review-report.json] |
41
47
  | `-v, --verbose` | Enable verbose output |
48
+ | `--ralph` | Enable Ralph Wiggum iteration mode for persistent review refinement |
49
+ | `--ralph-max-iterations <n>` | Maximum iterations for Ralph Wiggum mode [default: 10] |
50
+ | `--ralph-completion-promise <text>` | Custom completion promise text [default: "Review is comprehensive and all findings addressed"] |
51
+ | `--ralph-quality-gate <command>` | Command to run after each iteration for quality validation |
52
+ | `--ralph-stop-on-gate-fail` | Stop iterations when quality gate fails [default: continue] |
53
+ | `--ralph-show-progress` | Show detailed iteration progress |
54
+ | `--ralph-log-history <file>` | Log iteration history to JSON file |
55
+ | `--ralph-verbose` | Enable verbose Ralph Wiggum iteration output |
42
56
 
43
57
  ## Phase 0: Prompt Refinement (CRITICAL - Do First)
44
58
 
@@ -49,6 +63,21 @@ Review code changes: $ARGUMENTS
49
63
  2. Use phase: `review`
50
64
  3. Follow the TCRO framework: Task, Context, Requirements, Output
51
65
 
66
+ ### Ralph Wiggum Integration
67
+
68
+ If `--ralph` flag is used, also invoke the `ralph-wiggum` skill:
69
+
70
+ **Load Ralph Wiggum skill from:** `skills/workflow/ralph-wiggum/SKILL.md`
71
+
72
+ **Ralph Wiggum Review Cycle:**
73
+ 1. **Initial Review** - Run comprehensive review with all perspectives
74
+ 2. **Gap Analysis** - Identify missed issues, insufficient coverage
75
+ 3. **Iterative Deepening** - Focus review on problematic areas or different perspectives
76
+ 4. **Quality Validation** - Run quality gate if specified
77
+ 5. **Completion Check** - Continue until completion promise met or max iterations reached
78
+
79
+ **Default Review Completion Promise:** "Review is comprehensive and all findings addressed"
80
+
52
81
  ## Perspectives
53
82
 
54
83
  #### Subagent Communication Protocol (Minimal)
@@ -110,6 +139,88 @@ For example:
110
139
  - `bun run scripts/run-command.ts review "src/" --type=security --severity=high --output=security-review.json`
111
140
  - `bun run scripts/run-command.ts review "." --focus=performance --verbose`
112
141
 
142
+ ## Ralph Wiggum Iteration Mode
143
+
144
+ When `--ralph` flag is enabled, the review process follows a persistent refinement cycle:
145
+
146
+ ### Ralph Wiggum Review Cycle
147
+
148
+ **Iteration Process:**
149
+ 1. **Execute Standard Review** - Run complete review with all perspectives
150
+ 2. **Gap Analysis** - Review findings for:
151
+ - Critical issues that may have been missed
152
+ - Insufficient coverage of complex areas
153
+ - Areas needing deeper security or performance analysis
154
+ - Findings that lack clear recommendations
155
+ 3. **Targeted Deepening** - Focus next iteration on identified gaps:
156
+ - Add new perspectives (e.g., focus on accessibility, compliance)
157
+ - Deep-dive into complex components
158
+ - Re-review with different expert lenses
159
+ - Strengthen recommendations and remediation steps
160
+ 4. **Quality Gate** - Run quality gate command if specified
161
+ 5. **Progress Update** - Log iteration improvements and continue
162
+ 6. **Completion Check** - Stop when:
163
+ - Review comprehensiveness promise is met
164
+ - Quality gates consistently pass
165
+ - Maximum iterations reached
166
+
167
+ ### Ralph Wiggum Quality Gates
168
+
169
+ **Review Quality Gate Examples:**
170
+ ```bash
171
+ # Check for critical findings
172
+ rg '"severity": "critical"' code-review-report.json
173
+
174
+ # Validate recommendations completeness
175
+ rg '"recommendation"' code-review-report.json | wc -l
176
+
177
+ # Check file coverage
178
+ rg '"location"' code-review-report.json | sort | uniq | wc -l
179
+ ```
180
+
181
+ ### Progress Tracking
182
+
183
+ **Iteration Metrics:**
184
+ - Iteration number and completion status
185
+ - New findings discovered per iteration
186
+ - Severity distribution (critical/major/minor)
187
+ - Perspectives covered (security, performance, etc.)
188
+ - Quality gate pass/fail status
189
+ - Review comprehensiveness score
190
+
191
+ **Example Progress Output:**
192
+ ```
193
+ ๐Ÿ”„ Ralph Wiggum Review Iteration 4/10
194
+ ๐Ÿ” Findings: 23 total (+4 this iteration)
195
+ ๐Ÿšจ Critical issues: 2 (new this iteration)
196
+ โš ๏ธ Major issues: 8 (+1 this iteration)
197
+ ๐Ÿ“ Files reviewed: 15 (+2 deep-dived this iteration)
198
+ โœ… Quality gate: PASSED
199
+ ๐ŸŽฏ Review coverage: 95% (improving)
200
+ ```
201
+
202
+ ### Ralph Wiggum Implementation Notes
203
+
204
+ **Review-Specific Considerations:**
205
+
206
+ - **Escalating Focus**: Each iteration should examine different aspects or deepen analysis
207
+ - **Severity Validation**: Critical findings should trigger immediate attention
208
+ - **Recommendation Quality**: Each finding should have actionable, specific recommendations
209
+ - **Cross-Perspective Coverage**: Ensure multiple expert lenses are applied
210
+
211
+ **Default Settings:**
212
+ - **Max Iterations**: 10 (sufficient for thorough review refinement)
213
+ - **Completion Promise**: "Review is comprehensive and all findings addressed"
214
+ - **Quality Gate**: Check for critical findings and recommendations completeness
215
+ - **Progress Tracking**: Always enabled in Ralph mode
216
+
217
+ **Best Practices:**
218
+ - Start with broad review, then focus on high-risk areas
219
+ - Add new perspectives each iteration (security โ†’ performance โ†’ accessibility)
220
+ - Deep-dive into complex components that may hide issues
221
+ - Strengthen recommendations with specific remediation steps
222
+ - Validate that all critical findings have clear, actionable fixes
223
+
113
224
  ## Perspectives
114
225
 
115
226
  Review code from multiple expert perspectives:
@@ -31,6 +31,12 @@ Create a comprehensive feature specification: $ARGUMENTS
31
31
  /ai-eng/specify "user authentication system"
32
32
  /ai-eng/specify "payment integration" --from-research=docs/research/payment.md
33
33
  /ai-eng/specify "api design" --template=api
34
+
35
+ # Ralph Wiggum iteration for complex features
36
+ /ai-eng/specify "multi-tenant architecture" --ralph --ralph-show-progress
37
+
38
+ # Ralph Wiggum with custom quality gate
39
+ /ai-eng/specify "real-time collaboration" --ralph --ralph-quality-gate="rg '\[NEEDS CLARIFICATION\]' specs/*/spec.md" --ralph-stop-on-gate-fail
34
40
  ```
35
41
 
36
42
  ## Options
@@ -42,6 +48,14 @@ Create a comprehensive feature specification: $ARGUMENTS
42
48
  | `--output <path>` | Custom output path [default: `specs/[feature]/spec.md`] |
43
49
  | `--no-confirmation` | Skip confirmation prompts |
44
50
  | `--verbose` | Show detailed process |
51
+ | `--ralph` | Enable Ralph Wiggum iteration mode for persistent specification refinement |
52
+ | `--ralph-max-iterations <n>` | Maximum iterations for Ralph Wiggum mode [default: 10] |
53
+ | `--ralph-completion-promise <text>` | Custom completion promise text [default: "Specification is complete and ready for implementation"] |
54
+ | `--ralph-quality-gate <command>` | Command to run after each iteration for quality validation |
55
+ | `--ralph-stop-on-gate-fail` | Stop iterations when quality gate fails [default: continue] |
56
+ | `--ralph-show-progress` | Show detailed iteration progress |
57
+ | `--ralph-log-history <file>` | Log iteration history to JSON file |
58
+ | `--ralph-verbose` | Enable verbose Ralph Wiggum iteration output |
45
59
 
46
60
  ## Phase 0: Prompt Refinement (CRITICAL - Do First)
47
61
 
@@ -31,6 +31,12 @@ Execute a plan or task: $ARGUMENTS
31
31
  /ai-eng/work "specs/auth/plan.yaml"
32
32
  /ai-eng/work --from-plan=plans/auth.yaml --continue
33
33
  /ai-eng/work "FEAT-001" --dry-run
34
+
35
+ # Ralph Wiggum iteration for complex implementation
36
+ /ai-eng/work "implement feature" --ralph --ralph-show-progress
37
+
38
+ # Ralph Wiggum with custom quality gates
39
+ /ai-eng/work "auth system" --ralph --ralph-max-iterations 20 --ralph-quality-gate="npm test && npm run security-scan"
34
40
  ```
35
41
 
36
42
  ## Options
@@ -42,6 +48,14 @@ Execute a plan or task: $ARGUMENTS
42
48
  | `--validate-only` | Run validation without implementation |
43
49
  | `--dry-run` | Show what would be done without executing |
44
50
  | `-v, --verbose` | Enable verbose output |
51
+ | `--ralph` | Enable Ralph Wiggum iteration mode for TDD-driven implementation |
52
+ | `--ralph-max-iterations <n>` | Maximum iterations for Ralph Wiggum mode [default: 10] |
53
+ | `--ralph-completion-promise <text>` | Custom completion promise text [default: "Implementation meets all acceptance criteria and passes quality gates"] |
54
+ | `--ralph-quality-gate <command>` | Command to run after each iteration for quality validation |
55
+ | `--ralph-stop-on-gate-fail` | Stop iterations when quality gate fails [default: continue] |
56
+ | `--ralph-show-progress` | Show detailed iteration progress |
57
+ | `--ralph-log-history <file>` | Log iteration history to JSON file |
58
+ | `--ralph-verbose` | Enable verbose Ralph Wiggum iteration output |
45
59
 
46
60
  ## Phase 0: Prompt Refinement (CRITICAL - Do First)
47
61
 
@@ -52,6 +66,21 @@ Execute a plan or task: $ARGUMENTS
52
66
  2. Use phase: `work`
53
67
  3. Follow the TCRO framework: Task, Context, Requirements, Output
54
68
 
69
+ ### Ralph Wiggum Integration
70
+
71
+ If `--ralph` flag is used, also invoke the `ralph-wiggum` skill:
72
+
73
+ **Load Ralph Wiggum skill from:** `skills/workflow/ralph-wiggum/SKILL.md`
74
+
75
+ **Ralph Wiggum Work Cycle:**
76
+ 1. **Initial Implementation** - Apply TDD cycle to first task
77
+ 2. **Gap Analysis** - Identify failing tests, incomplete features
78
+ 3. **Iterative Development** - Focus on fixing failures and completing implementation
79
+ 4. **Quality Validation** - Run quality gate after each iteration
80
+ 5. **Completion Check** - Continue until completion promise met or max iterations reached
81
+
82
+ **Default Work Completion Promise:** "Implementation meets all acceptance criteria and passes quality gates"
83
+
55
84
  ## Phase 1: Setup & Planning
56
85
 
57
86
  ### 1.1 Load Plan and Spec
@@ -578,4 +607,88 @@ For example:
578
607
  - Validates against `/ai-eng/specify` output (spec.md)
579
608
  - Feeds into `/ai-eng/review` for code review
580
609
 
610
+ ## Ralph Wiggum Iteration Mode
611
+
612
+ When `--ralph` flag is enabled, the work execution follows a TDD-driven cycle:
613
+
614
+ ### Ralph Wiggum Work Cycle
615
+
616
+ **Iteration Process:**
617
+ 1. **Execute Work Phase 1-6** - Run complete work process
618
+ 2. **Gap Analysis** - Review implementation for:
619
+ - Failing tests or incomplete test coverage
620
+ - Missing features or acceptance criteria
621
+ - Quality gate failures
622
+ - Insufficient implementation details
623
+ 3. **Targeted Development** - Focus next iteration on identified gaps:
624
+ - Fix failing tests
625
+ - Complete missing features
626
+ - Address quality gate failures
627
+ - Strengthen implementation
628
+ 4. **Quality Gate** - Run quality gate command if specified
629
+ 5. **Progress Update** - Log iteration improvements and continue
630
+ 6. **Completion Check** - Stop when:
631
+ - Implementation meets acceptance criteria
632
+ - Quality gates consistently pass
633
+ - Maximum iterations reached
634
+
635
+ ### Ralph Wiggum Quality Gates
636
+
637
+ **Work Quality Gate Examples:**
638
+ ```bash
639
+ # Check test execution
640
+ npm test
641
+
642
+ # Check linting
643
+ npm run lint
644
+
645
+ # Run security scans
646
+ npm run security-scan
647
+
648
+ # Check type checking
649
+ bun tsc --noEmit
650
+ ```
651
+
652
+ ### Progress Tracking
653
+
654
+ **Iteration Metrics:**
655
+ - Iteration number and completion status
656
+ - Tasks completed per iteration
657
+ - Tests passing/total
658
+ - Quality gate pass/fail status
659
+ - Implementation progress
660
+ - Confidence score
661
+
662
+ **Example Progress Output:**
663
+ ```
664
+ ๐Ÿ”„ Ralph Wiggum Work Iteration 3/10
665
+ โœ… Tasks completed: 5 total (+2 this iteration)
666
+ ๐Ÿงช Tests passing: 18/20 (+3 this iteration)
667
+ โœ… Quality gate: PASSED (npm test && npm run lint)
668
+ ๐ŸŽฏ Implementation: 75% complete (+10% this iteration)
669
+ ๐Ÿ“Š Confidence: 0.8 (improving)
670
+ ```
671
+
672
+ ### Ralph Wiggum Implementation Notes
673
+
674
+ **Work-Specific Considerations:**
675
+
676
+ - **TDD Cycle**: Each iteration follows Write Test โ†’ Implement โ†’ Test โ†’ Fix pattern
677
+ - **Test Coverage**: Ensure all acceptance criteria have corresponding tests
678
+ - **Quality Standards**: Run full quality suite after each iteration
679
+ - **Progressive Development**: Each iteration should make measurable progress
680
+
681
+ **Default Settings:**
682
+ - **Max Iterations**: 10 (sufficient for most implementations)
683
+ - **Completion Promise**: "Implementation meets all acceptance criteria and passes quality gates"
684
+ - **Quality Gate**: Test execution + linting (recommended)
685
+ - **Progress Tracking**: Always enabled in Ralph mode
686
+
687
+ **Best Practices:**
688
+ - Write failing tests before implementing features
689
+ - Fix the immediate failing test, not hypothetical issues
690
+ - Run quality gates after each iteration, not just at end
691
+ - Track test coverage and improve it each iteration
692
+ - Document any workarounds or temporary solutions for later cleanup
693
+
581
694
  $ARGUMENTS
@@ -0,0 +1,17 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "description": "Initialize ai-eng-system on session start",
6
+ "config": {},
7
+ "hooks": [
8
+ {
9
+ "type": "notification",
10
+ "config": {},
11
+ "message": "๐Ÿ”ง Ferg Engineering System loaded. Commands: /ai-eng/plan, /ai-eng/review, /ai-eng/seo, /ai-eng/work, /ai-eng/compound, /ai-eng/deploy, /ai-eng/optimize, /ai-eng/recursive-init, /ai-eng/create-plugin, /ai-eng/create-agent, /ai-eng/create-command, /ai-eng/create-skill, /ai-eng/create-tool, /ai-eng/research, /ai-eng/context"
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
17
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-eng-system",
3
- "version": "0.0.15",
3
+ "version": "0.1.0",
4
4
  "description": "AI Engineering System with context engineering and research orchestration for Claude Code",
5
5
  "author": "v1truv1us",
6
6
  "license": "MIT",