Skip to content

Commit 6c4bd29

Browse files
committed
docs(agents): add task category diversity tracking for varied improvements
Signed-off-by: leocavalcante <leo@cavalcante.dev>
1 parent c80d979 commit 6c4bd29

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed

agents/opencoder-planner.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,33 @@ Prefer Small and Medium tasks. Break Large tasks into smaller ones when possible
151151
- Are too vague ("improve performance")
152152
- Have unclear completion criteria
153153

154+
## Task Category Diversity
155+
156+
Every task falls into one of these improvement categories:
157+
158+
| Category | Code | Focus |
159+
|----------|------|-------|
160+
| Bug fixes | `bugfix` | Runtime errors, incorrect behavior |
161+
| Testing | `test` | Coverage, test quality, edge cases |
162+
| Documentation | `docs` | Comments, READMEs, API docs |
163+
| Refactoring | `refactor` | Code structure, readability, DRY |
164+
| Performance | `perf` | Speed, memory, efficiency |
165+
| Security | `security` | Validation, sanitization, auth |
166+
| Developer Experience | `dx` | Logging, errors, debugging aids |
167+
168+
### Diversity Rules
169+
170+
Mentally tag each task with its category. A healthy codebase receives diverse improvements.
171+
172+
**Rotation suggestion:** bugfix → test → refactor → docs → perf → security → dx → (repeat)
173+
174+
**If the orchestrator hints that recent cycles focused on a specific category:**
175+
- Prioritize OTHER categories in your plan
176+
- Example: If recent focus was `docs, docs, test`, look for `bugfix`, `refactor`, or `perf` opportunities
177+
- Guidance: If you've done 3+ tasks of the same category recently, actively seek different improvement types
178+
179+
**Balance principle:** Avoid plans where >50% of tasks are the same category, unless critical issues demand it.
180+
154181
## Examples
155182

156183
### Example 1: Goal-Directed Mode

agents/opencoder.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,46 @@ Create a smaller, more focused plan that unblocks forward progress.
350350

351351
**On Critical status:** Immediately switch to recovery mode with explicit blocker context to planner.
352352

353+
## Category Diversity Hints
354+
355+
Track which improvement categories were completed in recent cycles to encourage diverse improvements.
356+
357+
### Categories
358+
359+
`bugfix` | `test` | `docs` | `refactor` | `perf` | `security` | `dx`
360+
361+
### Tracking
362+
363+
After each task completes, mentally note its category based on the work done:
364+
- Fixed a bug → `bugfix`
365+
- Added/improved tests → `test`
366+
- Updated documentation → `docs`
367+
- Restructured code → `refactor`
368+
- Improved speed/efficiency → `perf`
369+
- Added validation/auth → `security`
370+
- Improved errors/logging → `dx`
371+
372+
### When to Hint
373+
374+
**Add a diversity hint to the planner invocation when:**
375+
- 2+ consecutive cycles focused on the same category
376+
377+
**Hint format:**
378+
```
379+
@opencoder-planner Analyze the codebase. Recent focus: [category], [category], [category]. Consider other areas.
380+
```
381+
382+
**Example:**
383+
```
384+
@opencoder-planner Analyze the codebase and create a development plan. Recent focus: docs, docs, test. Consider other areas.
385+
```
386+
387+
### Rules
388+
389+
- Only add the hint if 2+ consecutive cycles had the same dominant category
390+
- Don't add hints if categories have been diverse
391+
- The planner will adjust priorities based on the hint
392+
353393
## Git Operations
354394

355395
### After Each Task Completes

0 commit comments

Comments
 (0)