Skip to content

Refine agent-mode design guidelines for balanced implementation - #210

Merged
jwbron merged 2 commits into
mainfrom
egg/refine-agent-mode-design-doc
Feb 7, 2026
Merged

jwbron merged 2 commits into
mainfrom
egg/refine-agent-mode-design-doc

Conversation

@james-in-a-box

@james-in-a-box james-in-a-box Bot commented Feb 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Clarifies that the agent-mode design guidelines are guidelines, not absolute rules
  • Adds guidance on preserving valuable functionality while refactoring
  • Distinguishes between "constraining" (bad) and "informing" (good) patterns
  • Adds examples of good patterns like shared infrastructure and composition

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:

  1. Use judgment—these are guidelines, not rules
  2. Preserve valuable functionality when refactoring
  3. The key question: are you constraining or informing?
  4. 80% aligned and working > 100% aligned but broken

Issue: #209

Test plan

  • Review the document changes for clarity and balance
  • Verify the guidelines allow for functionality like re-review detection
  • Check that the document still discourages actual anti-patterns

Authored-by: egg

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

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. 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.

  2. The "Applying These Guidelines" section (lines 84-94) gives practical advice that was missing—especially "80% aligned and working > 100% aligned but fragile."

  3. Good pattern examples (lines 188-212) are valuable additions. Showing what to do, not just what to avoid, makes the document more useful.

  4. 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

@james-in-a-box

james-in-a-box Bot commented Feb 7, 2026

Copy link
Copy Markdown
Contributor Author

egg review completed. View run logs

Comment thread docs/guides/agent-mode-design.md Outdated

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.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note, we don't need to explicitly call out re-review detection here.

Comment thread docs/guides/agent-mode-design.md Outdated

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.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, no need for specific examples.

@jwbron

jwbron commented Feb 7, 2026

Copy link
Copy Markdown
Owner

@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

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@james-in-a-box

james-in-a-box Bot commented Feb 7, 2026

Copy link
Copy Markdown
Contributor Author

egg finished successfully. View run logs

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: Changes since f0f93f2

The new commit (ad01c17) addresses both feedback items from @jwbron:

  1. Line 88: Removed "(like re-review detection)" — now reads "If existing code provides useful context or handles edge cases well, keep it."

  2. 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

@james-in-a-box

james-in-a-box Bot commented Feb 7, 2026

Copy link
Copy Markdown
Contributor Author

egg review completed. View run logs

@jwbron
jwbron merged commit ebd1712 into main Feb 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant