docs(claude): add scope discipline and architectural priority rules#1081
Conversation
Adds two callouts to CLAUDE.md alongside existing guidance: - Scope discipline: when an unrelated bug, pre-existing defect, or larger refactor is found mid-task, open a GitHub issue and keep going. Only fix inline when it directly affects the current task's result. Reinforces the existing one-PR-one-concern rule. - Architectural priority: do not default to the simplest or most localized fix. Choose the approach that fits the codebase's architecture best, even when it requires larger changes.
|
Claude finished @carlos-alm's task —— View job Reviewing PR: docs(claude): add scope discipline and architectural priority rulesTodo List
Changes AnalysisThe PR adds two new guidance callouts to lines 13-15 in CLAUDE.md:
Root Cause AnalysisProblem Being Solved: The PR addresses two common anti-patterns in AI-driven development: (1) scope creep where agents try to fix unrelated issues they encounter, leading to unfocused PRs, and (2) agents defaulting to minimal changes that may entrench poor architectural decisions rather than making proper architectural improvements. Why This Approach: These are documentation-only changes that provide explicit guidance to Claude Code agents. The approach is justified because it creates clear decision criteria for when to fix vs. defer issues, and explicitly encourages architectural thinking over diff minimization. Risk Assessment: Very low risk. Documentation changes only, no code modifications. The guidance aligns with established software engineering best practices around separation of concerns and architectural health. Backlog Compliance
Critical ConcernsNone identified. This is well-crafted documentation that addresses real problems with clear, actionable guidance. Quality AssessmentThe documentation additions are:
Final Recommendation
Minor note: The guidance could potentially benefit from concrete examples of when to apply each rule, but the current wording is sufficiently clear for practical use. |
Greptile SummaryThis PR adds two new top-level guidance callouts to
Confidence Score: 5/5Documentation-only change with no code modifications; safe to merge. Both new callouts are well-scoped, clearly worded, and consistent with the existing rule set in CLAUDE.md. The two rules are intentionally complementary — architecture priority encourages the right fix, scope discipline prevents it from expanding into unrelated work. No contradictions with existing conventions (e.g., 'One PR = one concern' in the Git Conventions section) were found. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Agent encounters a problem] --> B{Related to current task?}
B -- Yes --> C{Smallest diff or best architecture?}
B -- No --> D[Open GitHub issue via gh issue create]
D --> E[Keep going on current task]
C -- Smallest diff --> F[❌ Reject: entrenches poor structure]
C -- Best architecture --> G[✅ Proceed: even if larger diff]
G --> H{Unrelated side effects found?}
H -- Yes --> D
H -- No --> I[Commit focused PR]
Reviews (1): Last reviewed commit: "docs(claude): add scope discipline and a..." | Re-trigger Greptile |
Summary
Adds two new top-level guidance callouts to
CLAUDE.mdalongside the existing rule blocks:gh issue createand keep going. Only fix inline when it directly affects the result of the current task. Reinforces the existing one-PR-one-concern rule by giving agents an explicit place to put findings instead of bundling them in.These two rules are paired intentionally: the architecture rule pushes for the right fix, and the scope rule keeps that fix from ballooning into an unrelated refactor inside the current PR.
Test plan
## Codegraph Workflow, no other changes