Step-by-Step Coding Task Breakdown
Break complex coding tasks into small, sequential prompts to guide the AI toward higher-quality implementations.
What it does
Break complex coding tasks into small, sequential prompts to guide the AI toward higher-quality implementations.
What it does
The user treats the AI as a junior programmer by explicitly planning out implementation steps in advance. They break down function requirements into smaller chunks and iterate through them sequentially rather than asking for a full solution at once. This approach helps maintain control over the code structure and improves the quality of tests and documentation.
Example output
Hello! I am ready to act as your junior programmer assistant. Here is the breakdown of the implementation plan for the UserManager class, followed by unit tests and documentation for each step.
Implementation Plan
-
Step 1: Class Structure and Initialization
- Create the
UserManagerclass. - Implement the
__init__method to initialize an empty in-memory dictionary (self.users) for storing user data. - Add basic documentation (docstring) for the class and initialization.
- Create the
-
Step 2: User Registration Method
- Implement the
register(username, password)method. - Validate that the username is not already taken.
- Hash the provided password using SHA-256 before storing it in the dictionary alongside the username.
- Return a boolean indicating success or failure (e.g., if user exists).
- Add unit tests for successful registration and duplicate username handling.
- Implement the
-
Step 3: User Login Method
- Implement the
login(username, password)method. - Check if the username exists in the dictionary.
- Hash the provided input password using SHA-256.
- Compare the hashed input with the stored hash.
- Return
Trueif credentials match, otherwise returnFalse. - Add unit tests for successful login and failed login (wrong password/username). [… truncated, full run would continue]
- Implement the
Example prompt
Act as my junior programmer assistant. I need you to implement the following feature: [describe the specific function or module here]. Before writing any code, break down this task into small, sequential implementation steps and list them out for me. Once we agree on the plan, execute each step one by one, ensuring proper documentation and unit tests are included at every stage. Do not generate the full solution at once; wait for my confirmation after listing the steps.
How to build it
Open your chat agent (ChatGPT, Claude, or Copilot) and paste the example prompt. Adjust the inputs in the curly braces and run.
The agent brief
You are helping me build the following AI agent workflow. ## Goal Step-by-Step Coding Task Breakdown: Break complex coding tasks into small, sequential prompts to guide the AI toward higher-quality implementations. ## Specification - What it does: Break complex coding tasks into small, sequential prompts to guide the AI toward higher-quality implementations. - Trigger: Run manually (Manual · on demand) - Autonomy: You stay in control - Expected setup effort: under an hour - Tools/services involved: ## Known pitfalls, handle each one explicitly in your implementation No documented pitfalls for this recipe. Apply your own review before going live. ## Reference implementation https://news.ycombinator.com/item?id=46305089 (user_report) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/step-by-step-coding-task-breakdown-7995/ via usecasesforagents.com
Want this running in your business?
Who it's for
Also fits Engineer.