Task brief for Claude Code: frame a feature end to end
Brief template to delegate a complete feature to Claude Code: goal, starting point, constraints, definition of done, working rules and recap format.
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
You are Claude Code and you will implement a feature end to end in this repository. Here is the brief; read it fully, then start by presenting a 5-to-10-step plan and wait for my approval before writing code.
Goal (one sentence, from the user's point of view):
[GOAL]
Why now:
[BUSINESS CONTEXT IN 2-3 LINES]
Starting point:
- Files or modules involved: [PATHS]
- Current behaviour: [WHAT HAPPENS TODAY]
- Concrete example of input → expected output: [EXAMPLE]
Constraints:
- Technical: [e.g. no new dependency, strict TypeScript, compatible with migration X]
- Product: [e.g. FR + EN, keyboard accessible, no public API change]
- Do not touch: [FORBIDDEN FILES / FOLDERS]
Definition of done (all must be true):
- [VERIFIABLE CRITERION, e.g. test T passes]
- [CRITERION, e.g. build passes with no new warning]
- [CRITERION, e.g. a test covers edge case Y]
- [CRITERION, e.g. doc D is updated]
Working rules:
- Write or adapt tests before the implementation when possible.
- Small commits, one per plan step.
- If you find the brief incomplete or contradictory, stop and ask a one-line question; do not guess.
- If you see another problem in the code, note it at the end, do not fix it.
At the end, return a recap: files changed (exhaustive list), what changed per file (one line), what you deliberately left out, and what remains to do.
Personalize this prompt with Léa
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
Why this prompt works
<p>The quality of a task delivered by Claude Code depends less on the model than on the <strong>brief</strong>. An autonomous agent told "add CSV export" will guess the format, the localisation and the scope — and get at least one of the three wrong. This template forces the four pieces of information that remove back-and-forth: a concrete input → output example, the areas not to touch, a verifiable definition of done, and the instruction to stop when in doubt rather than improvise.</p> <p>Requiring a validated plan before code is deliberate: it is the cheapest moment to correct a misreading. The mandatory final recap (files, changes, left out, remaining) makes review fast and doubles as the pull-request description.</p> <p>This brief works as-is with Codex or any code agent that accepts a long instruction; only the first line changes.</p>
Use Cases
Expected Output
First a 5-to-10-step plan submitted for approval; then the implementation in small commits; finally a four-part recap (files, changes, left out, remaining).
Frequently Asked Questions
Is an input → output example really necessary?
It is the most profitable line of the brief. One example lifts more ambiguity than three paragraphs of description, and it naturally becomes the first test.
What if the task is too big for one brief?
Split by verifiable deliverable (a migration, then the API, then the UI) and chain three briefs. An agent ships three two-hour tasks better than one six-hour task.
Improve this prompt
Run this prompt through the Optimizer to strengthen its context, constraints and expected format.
Improve this prompt with the OptimizerComments
- LéaAI
Astuce : versionnez ce brief dans le repo (ex. `docs/briefs/feature-x.md`) et lancez Claude Code avec `claude -p "$(cat docs/briefs/feature-x.md)"` pour garder une trace des specs et relancer l’implémentation après un changement. Dans « Définition de terminé », précisez toujours la commande exacte à exécuter (ex. `pnpm test -- --run`) : un critère non vérifiable automatiquement reste interprétable.
📬 Get new prompts every week
Join our newsletter and never miss a prompt.
Go further
Similar Prompts
Complete GitHub Actions Pipeline
Create a complete CI/CD pipeline
Mistral Prompt for Creating a Prototype
Mistral, the leading French AI model, stands out as a powerful tool for accelerating prototype creation. Whether you're developing a web application, an API, or a digital product, Mistral can generate functional code, structure your architecture, and produce a testable prototype in minutes. Unlike a traditional approach where prototyping requires several days of development, using Mistral allows you to quickly validate an idea by obtaining a complete functional skeleton. The model particularly excels at generating structured code, proposing coherent architectures, and creating basic but functional user interfaces. By crafting a precise prompt that describes your product vision, key features, and technical constraints, you get a prototype that serves as a solid foundation for iteration. This approach is especially popular with startups, product managers, and independent developers looking to test a market hypothesis without investing weeks of development. Here's how to leverage Mistral to turn your idea into a concrete prototype.
Prompt to Automate Kubernetes Deployments Like a Pro
This prompt generates a complete, secure Kubernetes configuration, including YAML manifests, autoscaling and DevOps best practices tailored to your application.
Configure a CI/CD Pipeline with GitHub Actions
Configure a professional CI/CD pipeline with GitHub Actions covering tests, security, Docker build, and multi-environment deployment.