plan-before-code
Skill4 starsChanged 15 days agoMITView on GitHub
Turn a fuzzy or multi-part request into a precise, verifiable plan before writing code. Use for new features, changes that span several files or modules, anything touching data models, public APIs, migrations, or infrastructure, and requests with ambiguous requirements, such as "build X", "add support for Y", "let's implement", or "how should we approach". Reads the codebase first, asks only the questions that change the outcome, compares 2 to 3 approaches, and produces small, independently verifiable steps.
4 other projects use a version of this.
Adopted by
Most recently taken up by
- TTNAN/agent-craft-cntheir own version, first seen Nov 29, 2026
- youcisla/Agent-Foundrytheir own version, first seen Nov 16, 2026
- Diligence-AI/org-skillstheir own version, first seen Oct 13, 2026
- aprameyak/coding-skillstheir own version, first seen Oct 2, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- aprameyak/coding-skills★ 2same name
- TTNAN/agent-craft-cn★ 2same name
- youcisla/Agent-Foundry★ 1same name
- Diligence-AI/org-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-ready-repoSkill
- bug-triageSkill
- ci-auditorSkill
- deep-modulesSkill
- evidence-before-claimsSkill
- finish-the-jobSkill
- parallel-agentsSkill
- prior-art-scoutSkill
- security-auditSkill
- senior-engineerSkill
- staff-reviewSkill
- state-machine-hunterSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Read the code the change will touch: entry points, data models, similar existing features.
- Distinctive: line 32
If nothing remains that would change the outcome, don't ask.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Plan Before Code
An hour of planning saves a day of rework, but only if the plan is grounded in the actual code and turns into steps that can each be verified. The aim is not a document; it is to discover the hard parts and the user's real decisions before they are buried in a half-built implementation.
Skip the formal plan for small, obvious changes (one file, clear request, easy to reverse). Do it whenever being wrong would be expensive.
Phase 1: Understand
- Restate the goal in one or two sentences, including who benefits and how you'll know it works.
- Read the code the change will touch: entry points, data models, similar existing features. The best plan usually follows a pattern the codebase already uses.
- Note constraints: compatibility promises, performance budgets, migrations, feature flags, deploy process, and conventions in
AGENTS.md,CLAUDE.md, or ADRs. - For unfamiliar territory, scout prior art first (see
prior-art-scout).
Phase 2: Ask only what matters
List the open questions, then remove every one you can answer by reading the code, docs, or conventions. Ask the rest in one batch, each with your recommended default so the user can just say "yes":
1. Should archived projects appear in search? I recommend no (matches how the dashboard filters them).
2. Is a DB migration acceptable for this release? I recommend yes, additive only, so rollback stays safe.If nothing remains that would change the outcome, don't ask; state your assumptions and proceed.
Phase 3: Design it twice
Sketch 2 or 3 genuinely different approaches, such as different data models, different layers, or build versus adopt. Compare them on what matters here:
| Approach A | Approach B | |
| Complexity added | ||
| Risk and reversibility | ||
| Fit with existing patterns | ||
| UX, DX, and AX impact | ||
| Effort |
Recommend one and say why in a sentence. The first idea is rarely the best one, and the comparison is what exposes hidden costs.
Phase 4: Write the plan
Break the work into steps that are each small, independently verifiable, and leave the system working:
## Plan: <feature>
**Goal:** ...
**Approach:** ... (alternatives considered: ..., rejected because ...)
**Out of scope:** ...
### Steps
1. **Add `archived_at` column (additive migration).**
Files: `db/migrations/...`, `models/project.ts`
Verify: migration runs up and down locally; model tests pass.
2. **Filter archived projects from search.**
Files: `search/query.ts`, `search/query.test.ts`
Verify: new test "excludes archived projects" fails first, then passes.
3. ...
### Risks
- ... and how each is mitigated or detected.Order the steps so the riskiest unknown is tackled first, while it's still cheap to change course. Prefer vertical slices that deliver a thin end-to-end path early over finishing one layer at a time.
Phase 5: Execute the plan
Work through the steps with test-driven-development, verify each before starting the next, and keep going to the end (finish-the-job). When reality contradicts the plan, update the plan, say what changed and why, and continue. A plan is a tool, not a contract.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

