ai-eng-system 0.1.0 → 0.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.
Files changed (104) hide show
  1. package/dist/.claude-plugin/agents/agent-creator.md +41 -5
  2. package/dist/.claude-plugin/agents/ai_engineer.md +2 -0
  3. package/dist/.claude-plugin/agents/architect-advisor.md +13 -0
  4. package/dist/.claude-plugin/agents/backend_architect.md +12 -0
  5. package/dist/.claude-plugin/agents/code_reviewer.md +7 -1
  6. package/dist/.claude-plugin/agents/command-creator.md +9 -1
  7. package/dist/.claude-plugin/agents/cost_optimizer.md +4 -0
  8. package/dist/.claude-plugin/agents/docs-writer.md +11 -1
  9. package/dist/.claude-plugin/agents/documentation_specialist.md +9 -2
  10. package/dist/.claude-plugin/agents/frontend-reviewer.md +6 -0
  11. package/dist/.claude-plugin/agents/full_stack_developer.md +26 -2
  12. package/dist/.claude-plugin/agents/infrastructure_builder.md +13 -1
  13. package/dist/.claude-plugin/agents/java-pro.md +2 -0
  14. package/dist/.claude-plugin/agents/performance_engineer.md +4 -0
  15. package/dist/.claude-plugin/agents/plugin-validator.md +9 -1
  16. package/dist/.claude-plugin/agents/security_scanner.md +4 -0
  17. package/dist/.claude-plugin/agents/seo-specialist.md +4 -0
  18. package/dist/.claude-plugin/agents/skill-creator.md +9 -1
  19. package/dist/.claude-plugin/agents/subagent-orchestration.md +13 -0
  20. package/dist/.claude-plugin/agents/text-cleaner.md +24 -1
  21. package/dist/.claude-plugin/agents/tool-creator.md +9 -1
  22. package/dist/.claude-plugin/commands/clean.md +12 -0
  23. package/dist/.claude-plugin/commands/compound.md +12 -0
  24. package/dist/.claude-plugin/commands/context.md +12 -0
  25. package/dist/.claude-plugin/commands/create-agent.md +13 -1
  26. package/dist/.claude-plugin/commands/create-command.md +13 -1
  27. package/dist/.claude-plugin/commands/create-plugin.md +13 -1
  28. package/dist/.claude-plugin/commands/create-skill.md +13 -1
  29. package/dist/.claude-plugin/commands/create-tool.md +13 -1
  30. package/dist/.claude-plugin/commands/deploy.md +12 -0
  31. package/dist/.claude-plugin/commands/optimize.md +19 -200
  32. package/dist/.claude-plugin/commands/plan.md +13 -34
  33. package/dist/.claude-plugin/commands/ralph-wiggum.md +760 -0
  34. package/dist/.claude-plugin/commands/recursive-init.md +8 -6
  35. package/dist/.claude-plugin/commands/research.md +21 -22
  36. package/dist/.claude-plugin/commands/review.md +13 -21
  37. package/dist/.claude-plugin/commands/seo.md +12 -0
  38. package/dist/.claude-plugin/commands/specify.md +26 -206
  39. package/dist/.claude-plugin/commands/work.md +15 -21
  40. package/dist/.claude-plugin/plugin.json +4 -3
  41. package/dist/.claude-plugin/skills/comprehensive-research/SKILL.md +32 -0
  42. package/dist/.claude-plugin/skills/coolify-deploy/SKILL.md +32 -0
  43. package/dist/.claude-plugin/skills/git-worktree/SKILL.md +32 -0
  44. package/dist/.claude-plugin/skills/incentive-prompting/SKILL.md +83 -0
  45. package/dist/.claude-plugin/skills/plugin-dev/SKILL.md +30 -0
  46. package/dist/.claude-plugin/skills/prompt-refinement/SKILL.md +30 -2
  47. package/dist/.claude-plugin/skills/text-cleanup/SKILL.md +32 -0
  48. package/dist/.claude-plugin/skills/workflow/ralph-wiggum/SKILL.md +39 -164
  49. package/dist/.opencode/agent/ai-eng/ai-innovation/ai_engineer.md +2 -0
  50. package/dist/.opencode/agent/ai-eng/business-analytics/seo-specialist.md +4 -0
  51. package/dist/.opencode/agent/ai-eng/development/architect-advisor.md +13 -0
  52. package/dist/.opencode/agent/ai-eng/development/backend_architect.md +12 -0
  53. package/dist/.opencode/agent/ai-eng/development/docs-writer.md +11 -1
  54. package/dist/.opencode/agent/ai-eng/development/documentation_specialist.md +9 -2
  55. package/dist/.opencode/agent/ai-eng/development/frontend-reviewer.md +6 -0
  56. package/dist/.opencode/agent/ai-eng/development/full_stack_developer.md +26 -2
  57. package/dist/.opencode/agent/ai-eng/development/java-pro.md +2 -0
  58. package/dist/.opencode/agent/ai-eng/general/subagent-orchestration.md +13 -0
  59. package/dist/.opencode/agent/ai-eng/meta/agent-creator.md +41 -5
  60. package/dist/.opencode/agent/ai-eng/meta/command-creator.md +9 -1
  61. package/dist/.opencode/agent/ai-eng/meta/skill-creator.md +9 -1
  62. package/dist/.opencode/agent/ai-eng/meta/tool-creator.md +9 -1
  63. package/dist/.opencode/agent/ai-eng/operations/cost_optimizer.md +4 -0
  64. package/dist/.opencode/agent/ai-eng/operations/infrastructure_builder.md +13 -1
  65. package/dist/.opencode/agent/ai-eng/quality-testing/code_reviewer.md +7 -1
  66. package/dist/.opencode/agent/ai-eng/quality-testing/performance_engineer.md +4 -0
  67. package/dist/.opencode/agent/ai-eng/quality-testing/plugin-validator.md +9 -1
  68. package/dist/.opencode/agent/ai-eng/quality-testing/security_scanner.md +4 -0
  69. package/dist/.opencode/agent/ai-eng/quality-testing/text-cleaner.md +24 -1
  70. package/dist/.opencode/command/ai-eng/clean.md +12 -0
  71. package/dist/.opencode/command/ai-eng/compound.md +12 -0
  72. package/dist/.opencode/command/ai-eng/context.md +12 -0
  73. package/dist/.opencode/command/ai-eng/create-agent.md +13 -1
  74. package/dist/.opencode/command/ai-eng/create-command.md +13 -1
  75. package/dist/.opencode/command/ai-eng/create-plugin.md +13 -1
  76. package/dist/.opencode/command/ai-eng/create-skill.md +13 -1
  77. package/dist/.opencode/command/ai-eng/create-tool.md +13 -1
  78. package/dist/.opencode/command/ai-eng/deploy.md +12 -0
  79. package/dist/.opencode/command/ai-eng/optimize.md +19 -200
  80. package/dist/.opencode/command/ai-eng/plan.md +13 -34
  81. package/dist/.opencode/command/ai-eng/ralph-wiggum.md +760 -0
  82. package/dist/.opencode/command/ai-eng/recursive-init.md +8 -6
  83. package/dist/.opencode/command/ai-eng/research.md +21 -22
  84. package/dist/.opencode/command/ai-eng/review.md +13 -21
  85. package/dist/.opencode/command/ai-eng/seo.md +12 -0
  86. package/dist/.opencode/command/ai-eng/specify.md +26 -206
  87. package/dist/.opencode/command/ai-eng/work.md +15 -21
  88. package/dist/.opencode/skill/comprehensive-research/SKILL.md +32 -0
  89. package/dist/.opencode/skill/coolify-deploy/SKILL.md +32 -0
  90. package/dist/.opencode/skill/git-worktree/SKILL.md +32 -0
  91. package/dist/.opencode/skill/incentive-prompting/SKILL.md +83 -0
  92. package/dist/.opencode/skill/plugin-dev/SKILL.md +30 -0
  93. package/dist/.opencode/skill/prompt-refinement/SKILL.md +30 -2
  94. package/dist/.opencode/skill/ralph-wiggum/SKILL.md +39 -164
  95. package/dist/.opencode/skill/text-cleanup/SKILL.md +32 -0
  96. package/dist/skills/comprehensive-research/SKILL.md +32 -0
  97. package/dist/skills/coolify-deploy/SKILL.md +32 -0
  98. package/dist/skills/git-worktree/SKILL.md +32 -0
  99. package/dist/skills/incentive-prompting/SKILL.md +83 -0
  100. package/dist/skills/plugin-dev/SKILL.md +30 -0
  101. package/dist/skills/prompt-refinement/SKILL.md +30 -2
  102. package/dist/skills/text-cleanup/SKILL.md +32 -0
  103. package/dist/skills/workflow/ralph-wiggum/SKILL.md +39 -164
  104. package/package.json +1 -1
@@ -9,6 +9,16 @@ subtask: true
9
9
 
10
10
  Create a new OpenCode agent using AI assistance.
11
11
 
12
+ Take a deep breath and design agent systematically, ensuring clear triggering logic, proper expertise definition, and smooth integration with existing system.
13
+
14
+ ## Why This Matters
15
+
16
+ Agents are used repeatedly across thousands of interactions. Poorly designed agents with unclear triggering or weak expertise waste tokens, produce inconsistent results, and frustrate users. This agent design task is critical for creating tools that will reliably serve the system for months.
17
+
18
+ ## The Challenge
19
+
20
+ I bet you can't balance specificity with flexibility in agent design. The challenge is defining triggering conditions specific enough to invoke at right times, while making expertise broad enough to handle variations. Success means agent activates when relevant, provides expert guidance, and doesn't interfere with other workflows.
21
+
12
22
  ## Process
13
23
  1. **Understand Requirements**: What should the agent do?
14
24
  2. **Generate Agent**: Use @agent-creator to create properly formatted agent
@@ -45,4 +55,6 @@ Agent will be saved to:
45
55
  /ai-eng/create-agent "data analyst for database queries"
46
56
  ```
47
57
 
48
- The agent-creator will handle platform-specific formatting and ensure the agent follows best practices for triggering, expertise, and integration.
58
+ The agent-creator will handle platform-specific formatting and ensure the agent follows best practices for triggering, expertise, and integration.
59
+
60
+ After creating the agent, rate your confidence in its design quality (0.0-1.0). Identify any assumptions about triggering scenarios, potential overlap with existing agents, or areas where expertise may be insufficient. Note any integration challenges or platform-specific concerns.
@@ -9,6 +9,16 @@ subtask: true
9
9
 
10
10
  Create a new OpenCode command using AI assistance.
11
11
 
12
+ Take a deep breath and design command systematically, ensuring clear argument structure, proper shell integration, and comprehensive documentation.
13
+
14
+ ## Why This Matters
15
+
16
+ Commands become part of user's daily workflow. Poorly designed commands with confusing arguments, inadequate validation, or missing documentation waste time and cause errors. This command design task is critical for building reliable, user-friendly tools.
17
+
18
+ ## The Challenge
19
+
20
+ I bet you can't design command interface that balances simplicity with power. The challenge is creating argument structure that's intuitive for common use cases while supporting advanced scenarios. Success means command is easy to discover, simple to use, and powerful enough to handle complex workflows.
21
+
12
22
  ## Process
13
23
  1. **Understand Requirements**: What should the command do?
14
24
  2. **Generate Command**: Use @command-creator to create properly formatted command
@@ -45,4 +55,6 @@ Command will be saved to:
45
55
  /ai-eng/create-command "generate API docs from code"
46
56
  ```
47
57
 
48
- The command-creator will handle platform-specific formatting and ensure the command follows best practices for arguments, shell integration, and tool usage.
58
+ The command-creator will handle platform-specific formatting and ensure the command follows best practices for arguments, shell integration, and tool usage.
59
+
60
+ After creating the command, rate your confidence in its usability and completeness (0.0-1.0). Identify any uncertainties about argument design, validation edge cases, or areas where documentation may be insufficient. Note any platform-specific challenges or integration concerns.
@@ -9,6 +9,16 @@ subtask: false
9
9
 
10
10
  Create a complete, high-quality OpenCode extension from initial concept to tested implementation. Follow a systematic approach: understand requirements, design components, clarify details, implement following best practices, validate, and test.
11
11
 
12
+ Take a deep breath and approach plugin creation systematically. This is a complex multi-phase task that requires careful planning, component design, implementation, and thorough validation.
13
+
14
+ ## Why This Matters
15
+
16
+ Plugins are integrated into development workflows and used repeatedly. Poorly designed plugins break builds, waste time, and frustrate users. Plugin architecture flaws compound over time as more components depend on them. This plugin creation task is critical for building reliable, maintainable extensions.
17
+
18
+ ## The Challenge
19
+
20
+ I bet you can't design a plugin architecture that is both comprehensive and maintainable. The challenge is creating components that work together seamlessly while remaining modular enough for future enhancements. Success means plugin is thoroughly validated, well-documented, and ready for production use.
21
+
12
22
  ## Core Principles
13
23
 
14
24
  - **Ask clarifying questions**: Identify all ambiguities about plugin purpose, triggering, scope, and components. Ask specific, concrete questions rather than making assumptions. Wait for user answers before proceeding with implementation.
@@ -397,4 +407,6 @@ Every component must meet these standards:
397
407
 
398
408
  ---
399
409
 
400
- **Begin with Phase 1: Discovery**
410
+ **Begin with Phase 1: Discovery**
411
+
412
+ After completing plugin creation, rate your confidence in its quality and readiness for production (0.0-1.0). Identify any uncertainties about component integration, validation coverage, or areas where testing may be insufficient. Note any architectural concerns or missing documentation that could impact adoption.
@@ -9,6 +9,16 @@ subtask: true
9
9
 
10
10
  Create a new OpenCode skill using AI assistance.
11
11
 
12
+ Take a deep breath and design skill systematically, ensuring clear triggering conditions, proper knowledge structure, and effective progressive disclosure.
13
+
14
+ ## Why This Matters
15
+
16
+ Skills provide specialized knowledge to agents across many interactions. Poorly designed skills with weak triggering or bloated content waste tokens, provide inconsistent guidance, and overwhelm context. This skill design task is critical for building reusable knowledge resources.
17
+
18
+ ## The Challenge
19
+
20
+ I bet you can't balance depth with conciseness in skill design. The challenge is providing comprehensive knowledge while using progressive disclosure to keep token usage efficient. Success means skill loads at right moment, provides accurate guidance, and remains focused on specific domain.
21
+
12
22
  ## Process
13
23
  1. **Understand Requirements**: What domain knowledge should the skill provide?
14
24
  2. **Generate Skill**: Use @skill-creator to create properly formatted skill
@@ -45,4 +55,6 @@ Skill will be saved to:
45
55
  /ai-eng/create-skill "security vulnerability scanning"
46
56
  ```
47
57
 
48
- The skill-creator will handle progressive disclosure, proper frontmatter, and ensure compatibility with opencode-skills plugin.
58
+ The skill-creator will handle progressive disclosure, proper frontmatter, and ensure compatibility with opencode-skills plugin.
59
+
60
+ After creating the skill, rate your confidence in its triggering accuracy and knowledge quality (0.0-1.0). Identify any uncertainties about triggering conditions, knowledge gaps, or areas where progressive disclosure may be insufficient. Note any token efficiency concerns or integration challenges.
@@ -9,6 +9,16 @@ subtask: true
9
9
 
10
10
  Create a new OpenCode custom tool using AI assistance.
11
11
 
12
+ Take a deep breath and implement tool systematically, ensuring proper TypeScript types, robust validation, and comprehensive error handling.
13
+
14
+ ## Why This Matters
15
+
16
+ Custom tools extend system capabilities and are called from agents and commands. Poorly implemented tools with type errors, weak validation, or insufficient error handling break workflows and cause confusing failures. This tool implementation task is critical for reliable system extensions.
17
+
18
+ ## The Challenge
19
+
20
+ I bet you can't implement a tool that balances flexibility with safety. The challenge is creating tool interface that handles various input scenarios while validating rigorously and failing gracefully. Success means tool works reliably, provides clear error messages, and integrates smoothly with existing patterns.
21
+
12
22
  ## Process
13
23
  1. **Understand Requirements**: What functionality should the tool provide?
14
24
  2. **Generate Tool**: Use @tool-creator to create properly formatted TypeScript tool
@@ -50,4 +60,6 @@ Tool will be saved to:
50
60
  /ai-eng/create-tool "Docker container management with status monitoring"
51
61
  ```
52
62
 
53
- The tool-creator will handle TypeScript compilation, Zod validation, error handling, and OpenCode tool integration patterns.
63
+ The tool-creator will handle TypeScript compilation, Zod validation, error handling, and OpenCode tool integration patterns.
64
+
65
+ After creating the tool, rate your confidence in its implementation quality and reliability (0.0-1.0). Identify any uncertainties about type safety, validation edge cases, or error handling gaps. Note any TypeScript compilation concerns or integration challenges that could affect reliability.
@@ -9,6 +9,16 @@ subtask: true
9
9
 
10
10
  Run pre-deployment verification and prepare for Coolify deployment.
11
11
 
12
+ Take a deep breath and approach deployment systematically. Verify all checks, prepare configuration, and ensure proper monitoring before going live.
13
+
14
+ ## Why This Matters
15
+
16
+ Deployment failures wake people at 3AM. Missing pre-deployment checks lead to production outages. Poor monitoring configuration hides problems until users report them. This deployment task is critical for maintaining stable, reliable production systems.
17
+
18
+ ## The Challenge
19
+
20
+ I bet you can't deploy with confidence without skipping important checks. The challenge is balancing deployment speed with thorough verification, ensuring all risks are identified and mitigated. Success means deployment succeeds cleanly, application performs as expected, and monitoring catches any issues before users are impacted.
21
+
12
22
  ## Pre-flight Checks
13
23
 
14
24
  - [ ] All tests pass
@@ -33,3 +43,5 @@ Provide deployment instructions for Coolify including:
33
43
  - [ ] Health checks passing
34
44
  - [ ] Logs showing normal operation
35
45
  - [ ] Key user flows working
46
+
47
+ After completing deployment, rate your confidence in production readiness (0.0-1.0). Identify any uncertainties about deployment configuration, potential monitoring gaps, or areas where rollback plans may be insufficient. Note any deployment risks that remain or post-deploy issues observed.
@@ -8,6 +8,16 @@ agent: build
8
8
 
9
9
  Interactive optimization tool that enhances content using research-backed techniques, web-researched best practices, and iterative refinement based on user feedback.
10
10
 
11
+ Take a deep breath and approach this optimization systematically. Analyze content, apply appropriate techniques, and iteratively refine based on feedback.
12
+
13
+ ## Why This Matters
14
+
15
+ Optimization quality directly impacts user satisfaction and content effectiveness. Poor optimization can make content worse, introduce errors, or waste user's time. This optimization task is critical for enhancing user productivity and improving content quality across all types.
16
+
17
+ ## The Challenge
18
+
19
+ I bet you can't balance aggressiveness with preservation when optimizing content. The challenge is enhancing effectiveness while maintaining accuracy, clarity, and user intent. Success means optimization provides measurable improvement without introducing errors or losing essential meaning.
20
+
11
21
  ## Automatic Prompt Optimization
12
22
 
13
23
  This command works alongside the **automatic prompt optimization system**:
@@ -23,205 +33,12 @@ The automatic system runs via:
23
33
 
24
34
  ## Step-by-Step Approval UX
25
35
 
26
- When optimizing prompts, the system provides an interactive approval workflow:
27
-
28
- ### 1. Call the Prompt-Optimize Tool
29
-
30
- First, call the `prompt-optimize` tool with the user's prompt:
31
-
32
- ```bash
33
- Use the prompt-optimize tool with: "<user-input>"
34
- ```
35
-
36
- The tool returns structured JSON:
37
- ```json
38
- {
39
- "version": 1,
40
- "originalPrompt": "help me design authentication",
41
- "optimizedPrompt": "You are a senior security engineer...\n\nTask: help me design authentication",
42
- "domain": "security",
43
- "complexity": "medium",
44
- "steps": [
45
- {
46
- "id": "persona",
47
- "title": "Expert Persona",
48
- "before": "",
49
- "after": "You are a senior security engineer with 15+ years..."
50
- },
51
- {
52
- "id": "reasoning",
53
- "title": "Step-by-Step Reasoning",
54
- "before": "",
55
- "after": "Take a deep breath and analyze this step by step."
56
- },
57
- {
58
- "id": "stakes",
59
- "title": "Stakes Language",
60
- "before": "",
61
- "after": "This is important for the project's success..."
62
- },
63
- {
64
- "id": "selfEval",
65
- "title": "Self-Evaluation",
66
- "before": "",
67
- "after": "After providing your solution, rate your confidence 0-1..."
68
- }
69
- ],
70
- "skipped": false
71
- }
72
- ```
73
-
74
- ### 2. Display Optimization Plan
75
-
76
- Parse and present the optimization plan clearly:
77
-
78
- ```markdown
79
- 📋 Optimization Plan (medium, security)
80
-
81
- Step 1: Expert Persona
82
- ```
83
- You are a senior security engineer with 15+ years of authentication experience.
84
- ```
85
-
86
- Step 2: Step-by-Step Reasoning
87
- ```
88
- Take a deep breath and analyze this step by step.
89
- ```
90
-
91
- Step 3: Stakes Language
92
- ```
93
- This is important for the project's success. A thorough, complete solution is essential.
94
- ```
95
-
96
- Step 4: Self-Evaluation
97
- ```
98
- After providing your solution, rate your confidence 0-1 and identify any assumptions you made.
99
- ```
100
-
101
- Expected improvement: +60-115% quality (based on research-backed techniques)
102
-
103
- [Show confidence improvement calculation based on steps]
104
- - Expert Persona: +60% (Kong et al., 2023)
105
- - Step-by-Step Reasoning: +46% (Yang et al., 2023)
106
- - Stakes Language: +45% (Bsharat et al., 2023)
107
- - Self-Evaluation: +10% calibration
108
- ```
109
-
110
- ### 3. Guide User Through Approval
111
-
112
- Present interactive options menu:
113
-
114
- ```markdown
115
- Options:
116
- 1. Approve all steps - Apply all optimization techniques
117
- 2. Approve specific step - Choose which steps to include
118
- 3. Modify step - Customize individual step content
119
- 4. Edit final prompt - Directly edit the optimized result
120
- 5. Cancel and use original - Skip optimization entirely
121
-
122
- Your choice (1-5):
123
- ```
124
-
125
- ### 4. Handle User Choice
126
-
127
- Based on user selection:
128
-
129
- #### Option 1: Approve All Steps
130
- ```markdown
131
- ✓ Using optimized prompt with 4 steps applied
132
-
133
- [Proceed to execute the optimized prompt]
134
- ```
135
-
136
- #### Option 2: Approve Specific Step
137
- ```markdown
138
- Which step(s) would you like to approve? (Enter step IDs, e.g., "1,3,4")
139
-
140
- [Rebuild prompt from approved steps only]
141
- ✓ Using optimized prompt with 3 steps applied (skipped: Step 2)
142
- ```
143
-
144
- #### Option 3: Modify Step
145
- ```markdown
146
- Which step would you like to modify? (Enter step ID: 1-4)
147
-
148
- Step 3: Stakes Language
149
- Current content:
150
- This is important for the project's success. A thorough, complete solution is essential.
151
-
152
- New content:
153
- [User inputs modified content]
154
-
155
- ✓ Step 3 modified
156
- ✓ Using optimized prompt with updated steps
157
- ```
158
-
159
- #### Option 4: Edit Final Prompt
160
- ```markdown
161
- Current optimized prompt:
162
- ```
163
- You are a senior security engineer with 15+ years of authentication experience.
164
-
165
- Take a deep breath and analyze this step by step.
166
-
167
- This is important for the project's success. A thorough, complete solution is essential.
168
-
169
- After providing your solution, rate your confidence 0-1 and identify any assumptions you made.
170
-
171
- Task: help me design authentication
172
- ```
173
-
174
- Edit this prompt:
175
- [User provides edited version]
176
-
177
- ✓ Using your edited prompt
178
- ```
179
-
180
- #### Option 5: Cancel
181
- ```markdown
182
- ✓ Using original prompt without optimization
183
-
184
- [Proceed with original input]
185
- ```
186
-
187
- ### 5. Handle Edge Cases
188
-
189
- #### Skipped Optimization
190
- If tool returns `"skipped": true`:
191
- ```markdown
192
- ℹ️ Optimization skipped: [skipReason]
193
-
194
- [Proceed with original prompt]
195
- ```
196
-
197
- #### Simple Prompts
198
- For simple prompts (complexity: simple):
199
- ```markdown
200
- ℹ️ Simple prompt - optimization not beneficial
201
-
202
- [Proceed with original prompt]
203
- ```
204
-
205
- #### Empty Steps
206
- If no steps are provided:
207
- ```markdown
208
- ℹ️ No optimization steps available
209
-
210
- [Proceed with original prompt]
211
- ```
212
-
213
- ### 6. Return Final Prompt
214
-
215
- After approval flow, return the final prompt for execution:
216
-
217
- ```markdown
218
- Final prompt ready for execution:
219
- ```
220
- [approved/edited prompt content]
221
- ```
222
-
223
- [Execute the final prompt]
224
- ```
36
+ When optimizing prompts, the system provides an interactive approval workflow. See `docs/optimize-approval-flow.md` for complete details on:
37
+ - Calling the prompt-optimize tool
38
+ - Displaying optimization plans
39
+ - Interactive approval options (approve all, approve specific, modify, edit, cancel)
40
+ - Handling edge cases (skipped, simple prompts, empty steps)
41
+ - Configuration and session commands
225
42
 
226
43
  ## Usage
227
44
 
@@ -1477,4 +1294,6 @@ function reconstructPrompt(
1477
1294
  parts.push(`\n\nTask: ${originalTask}`);
1478
1295
  return parts.join("\n\n");
1479
1296
  }
1480
- ```
1297
+ ```
1298
+
1299
+ After completing optimization, rate your confidence in improvement quality (0.0-1.0). Identify any uncertainties about applied techniques, areas where optimization may have been too aggressive or conservative, or aspects of original content that may have been degraded. Note any feedback patterns or technique effectiveness observations.
@@ -29,6 +29,16 @@ Create a detailed implementation plan for: $ARGUMENTS
29
29
 
30
30
  > **Phase 3 of Spec-Driven Workflow**: Research → Specify → Plan → Work → Review
31
31
 
32
+ Take a deep breath and approach this planning task systematically. Analyze requirements, decompose into atomic tasks, identify dependencies, and create comprehensive implementation strategy.
33
+
34
+ ## Why This Matters
35
+
36
+ Poor planning leads to wrong solutions, wasted time, and implementation rework. Incomplete task decomposition causes blocking issues during implementation. Missing dependencies prevent parallel work. This planning task is critical for ensuring smooth, efficient implementation.
37
+
38
+ ## The Challenge
39
+
40
+ I bet you can't decompose requirements into truly atomic tasks that can be executed independently. The challenge is breaking complex features into small, completable units while maintaining correct dependency relationships. Success means every task can be completed independently, dependencies are minimal, and implementation follows predictable path.
41
+
32
42
  ## Quick Start
33
43
 
34
44
  ```bash
@@ -71,40 +81,7 @@ Create a detailed implementation plan for: $ARGUMENTS
71
81
 
72
82
  ## Phase 0: Prompt Refinement (CRITICAL - Do First)
73
83
 
74
- **You MUST invoke the `prompt-refinement` skill before proceeding.**
75
-
76
- **How to invoke:**
77
- 1. Load the skill from: `skills/prompt-refinement/SKILL.md`
78
- 2. Use phase: `plan`
79
- 3. Follow the TCRO framework: Task, Context, Requirements, Output
80
-
81
- If `--from-spec` flag is provided:
82
- 1. **Read specification** from `specs/[feature]/spec.md`
83
- 2. **Extract user stories** and their acceptance criteria
84
- 3. **Extract non-functional requirements** (security, performance, etc.)
85
- 4. **Identify open questions** marked with `[NEEDS CLARIFICATION]`
86
- 5. **Use as foundation** for technical planning
87
-
88
- If no spec is found:
89
- - Warn user: "No specification found. Consider running `/ai-eng/specify` first to create a detailed specification."
90
- - Offer: "Proceed with inline requirements gathering? (y/n)"
91
- - If yes, gather requirements through clarifying questions
92
- - If no, exit and prompt user to run `/ai-eng/specify`
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"
84
+ Load `skills/prompt-refinement/SKILL.md` and use phase: `plan` to transform your prompt into structured TCRO format (Task, Context, Requirements, Output). If using `--from-spec`, extract user stories and non-functional requirements from the specification. See `templates/plan.md` for output structure.
108
85
 
109
86
  ### Phase 2: Discovery (Research Mode)
110
87
 
@@ -532,6 +509,8 @@ For example:
532
509
  - `bun run scripts/run-command.ts plan "implement auth" --from-spec=specs/auth/spec.md --output=plans/auth.yaml`
533
510
  - `bun run scripts/run-command.ts plan --from-research=docs/research/auth.md --scope=implementation`
534
511
 
512
+ After creating the plan, rate your confidence in its completeness and accuracy (0.0-1.0). Identify any uncertainties about task decomposition, missing dependencies, or areas where acceptance criteria may be ambiguous. Note any implementation risks that weren't adequately addressed in the plan.
513
+
535
514
  ## Ralph Wiggum Iteration Mode
536
515
 
537
516
  When `--ralph` flag is enabled, the planning process follows a persistent refinement cycle: