Skip to content

Commit d113738

Browse files
committed
feat(plan): require linting/testing as final task in generated plans
Add requirement for plans to always end with a linting and testing task to ensure code quality before completing a cycle. Signed-off-by: leocavalcante <[email protected]>
1 parent a7a3048 commit d113738

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/plan.zig

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ pub fn generatePlanningPrompt(cycle: u32, user_hint: ?[]const u8, allocator: All
186186
\\- NEVER provide options or ask "would you like me to..."
187187
\\- If main features are implemented, focus on: code quality, tests, documentation, refactoring, performance, security, error handling, edge cases, optimization, CI/CD, deployment, monitoring
188188
\\- There is ALWAYS something to improve in any project
189+
\\- CRITICAL: The FINAL task in your plan MUST be "Run project linting and tests to ensure everything passes"
189190
\\
190191
);
191192

@@ -218,8 +219,8 @@ pub fn generatePlanningPrompt(cycle: u32, user_hint: ?[]const u8, allocator: All
218219
\\- [ ] Task 2: Specific, actionable description
219220
\\- [ ] Task 3: Specific, actionable description
220221
\\- [ ] Task 4: Specific, actionable description
221-
\\- [ ] Task 5: Specific, actionable description
222-
\\[Add more tasks as needed, minimum 5]
222+
\\- [ ] Run project linting and tests to ensure everything passes
223+
\\[Add more tasks as needed, minimum 5, last task must be linting/testing]
223224
\\
224225
\\## Notes
225226
\\[Any additional context or dependencies]
@@ -365,6 +366,7 @@ pub fn generateIdeaPlanningPrompt(cycle: u32, idea_content: []const u8, idea_fil
365366
\\- NEVER ask questions or wait for user input
366367
\\- Focus entirely on implementing the idea described below
367368
\\- Break down the idea into concrete, actionable steps
369+
\\- CRITICAL: The FINAL task in your plan MUST be "Run project linting and tests to ensure everything passes"
368370
\\
369371
\\IDEA TO IMPLEMENT (from
370372
);
@@ -393,8 +395,8 @@ pub fn generateIdeaPlanningPrompt(cycle: u32, idea_content: []const u8, idea_fil
393395
\\## Tasks
394396
\\- [ ] Task 1: Specific, actionable description
395397
\\- [ ] Task 2: Specific, actionable description
396-
\\- [ ] Task 3: Specific, actionable description
397-
\\[Add more tasks as needed]
398+
\\- [ ] Run project linting and tests to ensure everything passes
399+
\\[Add more tasks as needed, last task must be linting/testing]
398400
\\
399401
\\## Notes
400402
\\[Any additional context or dependencies]

0 commit comments

Comments
 (0)