pre-flight-discipline — Claude Code rule: install
The pre-flight-discipline rule makes Claude Code surface assumptions, limit edits to the request, and verify multi-step work. It fits projects where drive-by changes are a concern.
MIT ★ 2,966 updated 2026-09-29
.cursor/rules/pre-flight-discipline.mdcWhat pre-flight-discipline does
The rule tells Claude Code to stop guessing when a request is unclear. It should state assumptions, show different interpretations, and mention a simpler route when one exists. The implementation stays minimal: no extra features, one-off abstractions, or configuration that the request did not call for.
Changed lines must connect to the user’s task. Existing style stays in place, unrelated dead code is left alone, and only imports or symbols made unused by the edit are removed. For multi-step work, the rule turns each action into an action-and-check loop, such as writing a failing test before fixing the bug. Its frontmatter sets alwaysApply: true. The tradeoff is deliberate: it favors caution over speed, while leaving trivial fixes to judgment.
What it helps with
- surface ambiguous requirements before coding
- keep a diff within the requested scope
- remove unnecessary abstractions from small changes
- turn each implementation step into a check
- avoid modifying unrelated existing code
Example prompts for the agent
- Before coding, list every ambiguity, choose a verification check for each step, and ask before making assumptions.
- Fix the bug by writing a failing test first, then make the smallest change that passes it.
- Review this plan for extra features, unused abstractions, and edits outside my request.
How to install pre-flight-discipline
Manually: put the files in place
.cursor/rules/pre-flight-discipline.mdcFrontmatter: description, globs, alwaysApply
1Plugin marketplace
/plugin marketplace add rohitg00/pro-workflow/plugin install pro-workflow@pro-workflow2Manually: put the files in place
.claude/rules/pre-flight-discipline.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/pre-flight-discipline.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/pre-flight-discipline.mdManually: put the files in place
.clinerules/pre-flight-discipline.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about pre-flight-discipline
How do I install pre-flight-discipline in Claude Code?
Run /plugin marketplace add rohitg00/pro-workflow, then /plugin install pro-workflow@pro-workflow, and add the rule at .claude/rules/pre-flight-discipline.md.
What does pre-flight-discipline do?
It makes the agent expose assumptions, pause on unclear requirements, and keep every edit tied to the request. Multi-step work is organized as an action followed by a verification check.
Does the rule apply automatically?
Yes. Its configuration contains alwaysApply: true, so it is intended to run continuously.
Source text
pre-flight-discipline.mdc · MIT
--- description: Pre-flight discipline - prevent silent assumptions, scope creep, and drive-by edits before they happen alwaysApply: true --- Quality gates and self-correction catch mistakes after the fact. These rules prevent the upstream failures. ## 1. Surface, don't assume - State assumptions explicitly. If uncertain, ask before coding. - If the request has multiple interpretations, present them - never pick silently. - If a simpler approach exists than what was asked, say so. - If something is unclear, stop. Name what's confusing. Ask. ## 2. Minimum viable code - No features beyond what was asked. - No abstractions for single-use code. - No "flexibility" or configurability that wasn't requested. - No error handling for scenarios that cannot happen. - If the diff is 200 lines and 50 would do, rewrite it. Senior-engineer test: would they call this overcomplicated? If yes, simplify before showing. ## 3. Stay in your lane Every changed line must trace to the user's request. - Don't "improve" adjacent code, comments, or formatting. - Don't refactor things that aren't broken. - Match existing style even if you'd write it differently. - Notice unrelated dead code? Mention it. Don't delete it. When your changes orphan something: - Remove imports/symbols that *your* edit made unused. - Leave pre-existing dead code alone unless asked. ## 4. Verifiable goals over imperatives Convert tasks into verification loops: | Imperative | Verifiable goal | |------------|-----------------| | "Add validation" | "Write tests for invalid inputs, then make them pass" | | "Fix the bug" | "Write a failing test that reproduces it, then make it pass" | | "Refactor X" | "Tests pass before and after; behavior unchanged" | For multi-step work, plan as `step → verify`: ``` 1. [step] → verify: [check] 2. [step] → verify: [check] 3. [step] → verify: [check] ``` Strong success criteria let the loop run independently. "Make it work" requires constant re-clarification. --- **Tradeoff:** These rules bias toward caution over speed. For trivial fixes (typos, one-liners, obvious renames), use judgment - not every change needs the full rigor. **Source:** Adapted from [Andrej Karpathy's observations](https://x.com/karpathy/status/2015883857489522876) on LLM coding pitfalls, via [forrestchang/andrej-karpathy-skills](https://github.com/forrestchang/andrej-karpathy-skills) (MIT).
© Rohit Ghumare · MIT · rohitg00/pro-workflow