Skip to content

Commit 813810c

Browse files
committed
feat: incorporate lint rule recommendations and update agent routing for ESLint rule handling
1 parent 072959d commit 813810c

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

agents/gem-debugger.agent.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ Note: These skills complement workflow. Constitutional: NEVER implement — only
131131
- Estimate fix complexity: small | medium | large.
132132
- Prove-It Pattern: Recommend writing failing reproduction test FIRST, confirm it fails, THEN apply fix.
133133

134+
### 5.2.1 ESLint Rule Recommendations
135+
IF root cause is recurrence-prone (common mistake, easy to repeat, no existing rule): recommend ESLint rule in `lint_rule_recommendations`.
136+
- Recommend custom only if no built-in covers pattern.
137+
- Skip: one-off errors, business logic bugs, environment-specific issues.
138+
134139
### 5.3 Prevention Recommendations
135140
- Suggest tests that would have caught this.
136141
- Identify patterns to avoid.
@@ -186,6 +191,7 @@ Note: These skills complement workflow. Constitutional: NEVER implement — only
186191
"root_cause": {"description": "string", "location": "string", "error_type": "runtime|logic|integration|configuration|dependency", "causal_chain": ["string"]},
187192
"reproduction": {"confirmed": "boolean", "steps": ["string"], "environment": "string"},
188193
"fix_recommendations": [{"approach": "string", "location": "string", "complexity": "small|medium|large", "trade_offs": "string"}],
194+
"lint_rule_recommendations": [{"rule_name": "string", "rule_type": "built-in|custom", "eslint_config": "object", "rationale": "string", "affected_files": ["string"]}],
189195
"prevention": {"suggested_tests": ["string"], "patterns_to_avoid": ["string"]},
190196
"confidence": "number (0-1)"
191197
}

agents/gem-orchestrator.agent.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ After each agent completes, the orchestrator routes based on status AND extra fi
382382
| completed | gem-critic | verdict=pass | Aggregate findings, present to user |
383383
| completed | gem-critic | verdict=needs_changes | Include findings in status summary, proceed |
384384
| completed | gem-critic | verdict=blocking | Route findings to gem-planner for fixes (check extra.verdict, NOT status) |
385-
| completed | gem-debugger | - | IF code fix: delegate to gem-implementer. IF config/test/infra: delegate to original agent. |
385+
| completed | gem-debugger | - | IF code fix: delegate to gem-implementer. IF config/test/infra: delegate to original agent. IF lint_rule_recommendations: delegate to gem-implementer to update ESLint config. |
386386
| needs_revision | gem-browser-tester | - | gem-debugger → gem-implementer (if code bug) → gem-browser-tester re-verify. |
387387
| needs_revision | gem-devops | - | gem-debugger → gem-implementer (if code) or gem-devops retry (if infra) → re-verify. |
388388
| needs_revision | gem-implementer | - | gem-debugger → gem-implementer (with diagnosis) → re-verify. |
@@ -536,6 +536,7 @@ Blocked tasks (if any): task_id, why blocked (missing dep), how long waiting.
536536
- Handle Failure: If agent returns status=failed, evaluate failure_type field:
537537
- Transient: Retry task (up to 3 times).
538538
- Fixable: Delegate to `gem-debugger` for root-cause analysis. Validate confidence (≥0.7). Inject diagnosis. IF code fix → `gem-implementer`. IF infra/config → original agent. After fix → original agent re-verifies. Same wave, max 3 retries.
539+
- IF debugger returns `lint_rule_recommendations`: Delegate to `gem-implementer` to add/update ESLint config with recommended rules. This prevents recurrence across the codebase.
539540
- Needs_replan: Delegate to gem-planner for replanning (include diagnosis if available).
540541
- Escalate: Mark task as blocked. Escalate to user (include diagnosis if available).
541542
- Flaky: (from gem-browser-tester) Test passed on retry. Log for investigation. Mark task as completed with flaky flag in plan.yaml. Do NOT count against retry budget.

plugins/gem-team/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ All agents share: Execution rules, Constitutional rules, Anti-Patterns, and Dire
285285
| 🔄 **Codebase Patterns** | Avoids reinventing the wheel |
286286
| 🪞 **Self-Critique** | Reflection step before output (0.85 confidence threshold) |
287287
| 🔬 **Root-Cause Diagnosis** | Stack trace analysis, regression bisection |
288+
| 🛡️ **Auto-Generated Lint Rules** | Debugger recommends ESLint rules for recurring error patterns to prevent recurrence |
288289
| 💬 **Constructive Critique** | Challenges assumptions, finds edge cases |
289290
|**Magic Keywords** | Fast-track routing: agent names in input trigger direct delegation (e.g., "simplify this" → gem-code-simplifier, "critique" → gem-critic, "debug" → gem-debugger) |
290291
| 📚 **Docs-Code Parity** | Documentation auto-included for new features |
@@ -381,7 +382,7 @@ Agents consult only the sources relevant to their role. Trust levels apply:
381382
| Agent | Verification |
382383
|:------|:-------------|
383384
| Implementer | get_errors → typecheck → unit tests → contract tests (if applicable) |
384-
| Debugger | reproduce → stack trace → root cause → fix recommendations |
385+
| Debugger | reproduce → stack trace → root cause → fix recommendations → lint rules (if recurring pattern) |
385386
| Critic | assumption audit → edge case discovery → over-engineering detection → logic gap analysis |
386387
| Browser Tester | validation matrix → console → network → accessibility |
387388
| Reviewer (task) | OWASP scan → code quality → logic → task_completion_check → coverage_status |

0 commit comments

Comments
 (0)