All courses

Sizing and splitting tasks

Judge whether a task is small enough to review in one sitting. Split a large request into steps that each end in a checkable, committable state.

Builds on: Describing a task: goal, context, constraints, check, Git commits as snapshots you can return to

Read it card by card Start the whole course

One big request, twenty changed files

You type: ▸ You: Add user accounts to my recipe app: sign-up, login, password reset, and favourites saved per user. The agent works for twenty minutes and touches twenty files. Its summary says it's all done. You open the first file, then the second, and realise you can't tell whether any of it is right. Where did this go wrong, before the agent even started?

Your checking is the limit, not the agent

The agent will take on a big task without hesitating. The real limit is how much **you** can check in one sitting. A change too big to review leaves two bad options: accept it unchecked, or throw it all away. Mistakes also pile up. If step two misreads how users are stored, steps three and four build on that error. Small steps catch it early, and a commit after each one makes undoing cheap.

Size test and how to split

A task is the right size if: 1. Its goal fits in one sentence. 2. You can say how you'll check it in a few minutes. 3. You expect it to touch only a few files you could read. 4. Afterwards the project still runs. If it fails the test, split it. Order the steps so **each one leaves the project working** and has its own check. Run the check, commit, then send the next step.

Splitting the accounts request

Same goal, four steps: 1. **Sign-up saves a user.** Check: sign up, restart the app, try the same email again and get an error. 2. **Login and logout.** Check: log in and see your email at the top; log out and it's gone; a wrong password is refused. 3. **Favourites per user.** Check: two users see different favourites. 4. **Password reset**, later. Check: the reset link sets a new password, and the old one stops working. Each step is a small set of changes you can read. You commit after each check passes.

Step 1 as a prompt, then a commit

The prompt keeps goal, context, constraints and check, and says plainly what is out of scope for now. You commit only after you've run the check yourself.
▸ You: Step 1 of 4 for user accounts.
Goal: a sign-up page at /signup that saves
a user (email + hashed password).
Context: app is `app.py`, data `recipes.db`.
Not yet: no login, no favourites.
Don't change the recipe pages.
Check: after a restart my user still
exists; signing up twice with one email
shows an error.

$ git add .
$ git commit -m "Accounts step 1: sign-up"

Remember

If you can't check it in one sitting, it's too big. Split it into steps that each leave the project working, each with its own check, and commit after every step that passes.

On Bytewise this lesson comes in small steps with a check at the end, and the app brings it back right before you would forget it.