Repository navigation
Refine agent-mode design guidelines for balanced implementation - #210
Conversation
Addresses feedback from PR #208 where the agent overcorrected when aligning a workflow with the design doc, removing useful functionality like re-review detection. The document was too prescriptive, leading to rigid interpretation rather than balanced implementation. Key changes: - Add upfront disclaimer that these are guidelines, not absolute rules - Clarify that providing useful context (re-review info, metadata) is fine - the anti-pattern is constraining, not informing - Add "Applying These Guidelines" section emphasizing preservation of valuable functionality and incremental refactoring - Rename "Anti-Patterns to Avoid" to "Anti-Patterns vs. Good Patterns" - Add examples of good patterns: shared infrastructure, composition - Soften implementation checklist language from "reconsider" to "use judgment" Authored-by: egg
There was a problem hiding this comment.
This is a good refinement that addresses the overcorrection issue from PR #208.
The changes effectively shift the document from prescriptive rules to practical guidelines while preserving its core message. Specific improvements I like:
-
The "constraining vs. informing" framing (lines 41, 169, 202) provides a clear mental model for deciding what context to include. This is more actionable than the previous "pre-fetching is wrong" stance.
-
The "Applying These Guidelines" section (lines 84-94) gives practical advice that was missing—especially "80% aligned and working > 100% aligned but fragile."
-
Good pattern examples (lines 188-212) are valuable additions. Showing what to do, not just what to avoid, makes the document more useful.
-
Updated checklist (lines 264-273) now includes "Am I preserving useful existing functionality" which directly addresses the overcorrection problem.
The softened language throughout ("usually" → "prefer", "should" → "consider") appropriately signals that judgment is required without abandoning the principles.
LGTM - ready for human approval.
— Authored by egg
|
egg review completed. View run logs |
|
|
||
| These guidelines describe a direction, not a destination. When refactoring a workflow to align with these principles: | ||
|
|
||
| 1. **Preserve valuable functionality.** If existing code provides useful context (like re-review detection) or handles edge cases well, keep it. The goal is to remove unnecessary complexity, not strip out everything. |
There was a problem hiding this comment.
note, we don't need to explicitly call out re-review detection here.
|
|
||
| 2. **Refactor incrementally.** Don't rewrite from scratch. Identify specific anti-patterns and address them while preserving what works. | ||
|
|
||
| 3. **Share common infrastructure.** If multiple bots need the same functionality (fetching PR metadata, detecting re-reviews, posting reviews), factor it into shared modules. This isn't pre-fetching—it's good software engineering. |
There was a problem hiding this comment.
again, no need for specific examples.
|
@james-in-a-box address the above feedback |
Generalizes the guidance in the "Applying These Guidelines" section by removing explicit references to re-review detection. The principles are clearer without tying them to specific implementation examples. Authored-by: egg
There was a problem hiding this comment.
Addressed both comments:
Line 88: Removed the specific "(like re-review detection)" example—the guideline is clearer without it.
Line 92: Generalized to "If multiple bots need the same functionality" without listing specific examples.
— Authored by egg
|
egg finished successfully. View run logs |
There was a problem hiding this comment.
Re-review: Changes since f0f93f2
The new commit (ad01c17) addresses both feedback items from @jwbron:
-
Line 88: Removed "(like re-review detection)" — now reads "If existing code provides useful context or handles edge cases well, keep it."
-
Line 92: Removed the specific examples "(fetching PR metadata, detecting re-reviews, posting reviews)" — now reads "If multiple bots need the same functionality, factor it into shared modules."
Both changes make the guidelines more general and less tied to specific features, which is cleaner for a principles document.
No other changes in this commit. LGTM.
— Authored by egg
|
egg review completed. View run logs |
Summary
This addresses feedback from PR #208 where the agent overcorrected when aligning a workflow with the design doc. The re-review logic was removed because the document was too prescriptive about avoiding "pre-fetching." In reality, providing useful context like "you last reviewed at commit X" is not pre-fetching—it's informing the agent about the task's history.
The refined document emphasizes:
Issue: #209
Test plan
Authored-by: egg