R007 HedgedInstructions
- Applies to
- Rules files (CLAUDE.md, AGENTS.md, .mdc, .cursorrules, Copilot instructions, GEMINI.md, .windsurfrules)
- Severity
- Warning (−4 per finding, max −30)
- Summary
- A hedge makes the instruction optional.
- Flags
- "try to", "if possible", "ideally", "where / when / whenever possible", "consider", "prefer to", "where / when / if / as appropriate". Instruction lines only (instruction sentence as in R001). Skipped: table rows; inline code, links, paths, quoted text; "try to" after not / never / don't / can / could / may / might / would / will; "prefer to" with a named alternative (not, instead of, over, rather than); "consider" unless it opens a clause or follows you can / could / may / should; "consider whether / if / how"; "consider" followed by =, : or / (a label); clauses opening with a third-person or plural subject.
- Measured false-positive rate
- 13% (4 of 30) and 20% (6 of 30), two judges, ruleset v4. Methodology
Before
- Try to keep functions short.
After
- Keep functions under 40 lines.
Fix
- State the instruction without the hedge, or state the condition that makes it apply.