clarify-before-build
Skill1 starsChanged 5 months agoMITView on GitHub
Question-led planning gate for implementation work. Use when the user wants a project plan, roadmap, feature plan, technical design, implementation plan, migration plan, product workflow, architecture change, or any substantial build before code changes begin. Forces the agent to repeatedly question assumptions, resolve ambiguity, identify risks and dependencies, and reach an explicit shared understanding before implementation starts. For small, low-ambiguity changes it runs a lightweight pass (assumptions stated, only blocking questions asked) instead of the full gate.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Khuirul-Huda/clean-principlestheir own version, first seen Oct 25, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Khuirul-Huda/clean-principles★ 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.
- client-requirements-to-planSkill
- codebase-prune-reviewSkill
- docker-disk-cleanupSkill
- error-logging-instrumentationSkill
- feature-design-preflightSkill
- frontend-design-qualitySkill
- full-app-reviewSkill
- laptop-currency-maintenanceSkill
- nextjs-vercel-analyticsSkill
- pr-production-gateSkill
- repo-technical-documentationSkill
- repo-testing-setupSkill
- security-threat-modelSkill
- test-readiness-preflightSkill
- user-action-coverage-reviewSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. About 0 are common, 17 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Do not start implementation while material planning ambiguity remains.
- Distinctive: line 18
Run the full gate (planning ledger, question rounds, Shared Understanding Contract) when any of these hold:
- Distinctive: line 26
Run a lightweight pass when the scope is one repo, a few files, and none of the full-gate triggers apply:
- Distinctive: line 32
If a lightweight pass uncovers a full-gate trigger, escalate to the full gate and say so.
- Distinctive: line 39
Ask the next most important questions in a focused batch.
- Distinctive: line 40
Wait for answers before finalizing the plan.
- Very specific: line 43
Only after confirmation, offer implementation sequencing — and for substantial user-facing work, name $user-action-coverage-review as the …
- Distinctive: line 45
Ask 3-7 questions per round when the problem is broad.
- Distinctive: line 56
Do not start implementation from a draft contract.
- Distinctive: line 60
Use related skills during planning when they apply:
- Very specific: line 62
Use $frontend-design-quality when the plan touches frontend UI, portals, dashboards, forms, content pages, responsive layout, visual …
- Very specific: line 63
Use $security-threat-model when the plan touches auth/authz, user data, tenant boundaries, payments, secrets, file upload/parsing, admin …
- Very specific: line 65
Use $user-action-coverage-review when the plan includes substantial user-facing work: routes, forms, mutations, saves/deletes, uploads, …
- Very specific: line 66
Use $repo-testing-setup when the plan targets a new repo or one without a canonical containerized gate.
- Distinctive: line 68
If any related skill applies, do not finish the Shared Understanding Contract until its relevant design requirements are represented in …
- Distinctive: line 85
If the user answers partially, keep the answered parts and ask only about the remaining gaps.
- Distinctive: line 97
Test and verification requirements
- Distinctive: line 99
Update the ledger after each answer round.
- Distinctive: line 105
Before the plan can be called complete, cover:
- Distinctive: line 116
Test strategy: unit, integration, browser/E2E, visual, security, and local container validation
- Very specific: line 122
Read references/question-bank.md when the topic is broad, ambiguous, high-risk, or multi-role.
- Very specific: line 124
Read references/shared-understanding-contract.md before producing the final plan.
- Distinctive: line 145
Do not mark planning complete until all are true:
- Distinctive: line 156
If the user asks to skip planning and implement immediately, summarize the remaining ambiguity and ask for explicit approval to proceed …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Clarify Before Build
Core Rule
Do not start implementation while material planning ambiguity remains. Keep questioning until the plan is specific enough that another capable engineer could execute it without guessing.
This skill is not for producing a quick plan and moving on. It is a planning gate: ask, refine, challenge, restate, and only then produce an implementation-ready plan.
Right-Sizing the Gate
Match the gate's weight to the scope's risk, not to the request's phrasing.
Run the full gate (planning ledger, question rounds, Shared Understanding Contract) when any of these hold:
- multiple repos, services, schemas, or delivery slices
- schema/migration, auth/permission, payment, upload/parsing, background-job, or deployment changes
- multiple roles, tenants, or substantial user-facing workflows
- provider, library, or architecture selection with meaningful tradeoffs
- the user asked for a plan, roadmap, design, or architecture document
Run a lightweight pass when the scope is one repo, a few files, and none of the full-gate triggers apply:
- Summarize the understanding in 2-3 bullets.
- State assumptions inline and ask only blocking questions (0-2).
- Proceed, and record the stated assumptions in the completion report instead of a contract.
If a lightweight pass uncovers a full-gate trigger, escalate to the full gate and say so. Never use the lightweight pass to dodge the contract on substantial work.
Operating Mode
- State that planning mode is active.
- Summarize the current understanding in 3-6 bullets.
- Identify unknowns, assumptions, contradictions, risks, and decisions.
- Ask the next most important questions in a focused batch.
- Wait for answers before finalizing the plan.
- Repeat until no material ambiguity remains.
- Produce a Shared Understanding Contract and ask for explicit confirmation.
- Only after confirmation, offer implementation sequencing — and for substantial user-facing work, name
$user-action-coverage-reviewas the first post-confirmation step.
Ask 3-7 questions per round when the problem is broad. Ask fewer questions when only one blocker remains. Do not bury the user in a giant questionnaire unless the scope is genuinely large.
There is no round limit. Keep questioning until the picture is clear — the gate ends when ambiguity is resolved or explicitly deferred, not when patience runs out. If one specific decision stalls (the user cannot answer, or answers keep circling), present that decision as a menu of options with a recommended default and the risk of each, get it decided or explicitly deferred, and continue questioning the rest.
No User Available
This gate assumes an interactive user. When invoked headless — from an automation, another skill, or any context where nobody can answer — do not fabricate answers:
- Build the ledger anyway, marking open questions and assumptions
unvalidated. - Apply lowest-risk defaults only where a wrong default is cheap to reverse.
- Emit the Shared Understanding Contract labeled
DRAFT - not confirmed. - Do not start implementation from a draft contract. Surface the draft and stop.
Related Skill Checks
Use related skills during planning when they apply:
- Use
$frontend-design-qualitywhen the plan touches frontend UI, portals, dashboards, forms, content pages, responsive layout, visual design, navigation, or user actions. Include its viewport, click-minimization, pattern reuse, visual verification, and Playwright expectations in the plan. - Use
$security-threat-modelwhen the plan touches auth/authz, user data, tenant boundaries, payments, secrets, file upload/parsing, admin tools, deployment, CI/CD, external integrations, webhooks, background jobs, logs, or any security-sensitive path. Include threat boundaries, abuse paths, mitigations, and blocking findings in the plan. - Use
$feature-design-preflightwhen the plan touches nontrivial features or integrations where a naive implementation could pass the surface request but fail in real use, including uploads, media/video, PDFs/documents, file parsing, third-party APIs, long-running jobs, background work, data migrations, auth/permissions, payments, AI calls, storage, or admin/user portal workflows. Include requirement trace, constraints, provider/library fit, failure modes, and proof requirements in the plan. - Use
$user-action-coverage-reviewwhen the plan includes substantial user-facing work: routes, forms, mutations, saves/deletes, uploads, role-gated actions, or portal workflows. The confirmed plan must name it as the first post-confirmation step, and its action-matrix rows become acceptance-criteria evidence. - Use
$repo-testing-setupwhen the plan targets a new repo or one without a canonical containerized gate. The confirmed plan must schedule it before feature implementation begins — features need a foundation to be proven against.
If any related skill applies, do not finish the Shared Understanding Contract until its relevant design requirements are represented in acceptance criteria, risks, and verification.
Questioning Standard
Be direct and persistent. Question vague terms such as "simple", "robust", "admin", "portal", "done", "beautiful", "secure", "fast", "full coverage", "latest", "integration", "critical", "production-ready", "MVP", "AI-powered", "agentic", "smart", "automated", "real-time", and "scalable".
For each vague term, translate it into an observable requirement:
- user or role
- trigger or entry point
- exact behavior
- data involved
- success state
- failure state
- test evidence
- owner or decision maker
If the user answers partially, keep the answered parts and ask only about the remaining gaps.
Planning Ledger
Maintain a visible planning ledger during the conversation:
- Confirmed decisions
- Open questions
- Assumptions
- Out of scope
- Risks and mitigations
- Acceptance criteria
- Test and verification requirements
Update the ledger after each answer round. Do not let stale assumptions survive silently.
For planning that runs long or spans sessions, write the ledger to a file (for example docs/plans/<topic>-plan.md) and update it in place after each round. The file, not chat history, is the source of truth, and the final contract is written to the same file. In plan modes that prohibit file writes, keep the ledger in-message and restate it in full after any context loss or summarization.
Required Coverage
Before the plan can be called complete, cover:
- Goal and non-goals
- Users, roles, and permissions
- Current state and constraints
- Desired end state
- User flows or system flows
- Data model, persistence, integrations, and side effects
- Edge cases and failure modes
- Security, privacy, abuse, and operational risks
- UX and frontend requirements when applicable
- Test strategy: unit, integration, browser/E2E, visual, security, and local container validation
- Rollout, migration, rollback, and observability
- Dependencies, sequencing, and risks
- Definition of done
- Parallel work: independent lanes with disjoint ownership and expected evidence, or an explicit statement that parallel work does not apply
Read references/question-bank.md when the topic is broad, ambiguous, high-risk, or multi-role.
Read references/shared-understanding-contract.md before producing the final plan.
Challenge Rules
Challenge the user when:
- a requested plan conflicts with repo constraints or AGENTS.md
- success criteria are not testable
- the plan skips security, data integrity, or rollback
- the plan touches UI but skips
$frontend-design-qualityconsiderations - the plan touches sensitive systems but skips
$security-threat-modelconsiderations - the plan touches a nontrivial feature but skips
$feature-design-preflightrequirement tracing - the plan relies on GitHub/Vercel/CI to discover preventable failures
- the plan would create avoidable user friction
- the scope is too large to verify safely in one delivery stream
- the implementation path is chosen before the problem is understood
Challenge by explaining the concrete risk and asking for a decision. Do not patronize or lecture.
Completion Blockers
Do not mark planning complete until all are true:
- Open questions are either answered or explicitly deferred.
- Assumptions are listed and accepted by the user.
- Acceptance criteria are observable and testable.
- Verification covers repo rules, local container gates, security review, secret scan, dependency audit, and frontend visual checks when applicable.
- Applicable feature, UI, security, and user-action coverage checks from
$feature-design-preflight,$frontend-design-quality,$security-threat-model, and$user-action-coverage-revieware included. - The contract records a Parallel Work decision: lanes with disjoint ownership, or why parallel work does not apply.
- The plan separates must-have from later work.
- The user explicitly confirms the Shared Understanding Contract — or, in headless contexts, the contract is labeled
DRAFT - not confirmedand implementation has not started.
If the user asks to skip planning and implement immediately, summarize the remaining ambiguity and ask for explicit approval to proceed with those risks. Do not silently skip the planning gate.
Example Prompts
- "Use
$clarify-before-buildto plan the billing migration." - "I want a roadmap for the new admin portal."
- "Help me design the upload pipeline before we build anything."
- "Plan this feature — do not write code yet."
- "Rename this config flag everywhere." (lightweight pass: state assumptions, ask at most the blocking question, proceed)
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.

