How Do You Build a SaaS With Claude, One Slice at a Time?
Build one user action at a time, end to end, from database to screen, and test it before starting the next. Have Claude keep a short progress file and commit each finished slice. That way you always have something running, and a new session can pick up exactly where the last one stopped.
Read SPEC.md and progress.txt. Build only the next unfinished slice: [the user action, or "pick the next one from the spec"]. It must work end to end, from database to screen. Done means: 1. There's a test for this action, and it passes. 2. The existing tests still pass. Don't remove or weaken any test. 3. You've run the feature yourself and shown me the output. 4. progress.txt lists what's done, what's next and anything I should know. Then commit with a clear message and stop. Don't start the next slice.
- all the tables
- all the endpoints
- all the screens
- one user action
- database to screen
- tested, then committed
Try it now
- 1Write the first slice as a single sentence starting with "A user can". For example, "A user can create an invoice and see it in a list."
- 2In Claude Code, paste the prompt with that sentence, and give it the exact test command for your project.
- 3When it stops, run the feature yourself and read the diff before moving on.
- 4Run
/clear, then ask for the next slice. You'll know it worked if a fresh session can readprogress.txtand continue without you explaining anything.
Use it when
Use it for any product build longer than a sitting, once your spec lists the features. It's especially useful for solo builders, who can't afford a week of code that doesn't yet run.
Skip it when
Don't slice work that's purely technical, like a dependency upgrade or a migration, where a staged plan fits better. The first session is also different. Anthropic suggests using it for setup, such as test scaffolding and start scripts, before any feature work.
Why it works
Anthropic's memory tool docs state the key principle: work on one feature at a time, and mark it complete only after end-to-end verification shows it works, not when the code is written. Its prompting guide recommends structured state such as a tests.json, freeform notes in progress.txt, and git as a log with restore points, because each session starts fresh. Claude Code's docs add why the check matters: Claude stops when work looks done, and without something that returns pass or fail, you become the test suite.
Example
For an invoicing tool, the first slice is "A user can create an invoice and see it in a list", which covers a table, an API route, a form and a test. You stop there, using a hard-coded single user. Slice two is sending the invoice by email. Sign-in comes later, because you've learned from slice one what actually needs protecting.
Going further
Anthropic's guide suggests a direct line to stop tests being edited to pass, such as: "It is unacceptable to remove or edit tests because this could lead to missing or buggy functionality." For more than one slice at once, give each its own checkout: claude -w feature-auth starts a session in a new worktree. A worktree is a fresh checkout, so gitignored files like .env aren't there, and you can list what to copy in .worktreeinclude. The docs also note that lines like "don't be lazy" or "loop until done" are more likely to cause over-work than help. Give Claude a check to pass instead.
Common mistakes
- Building all the tables first, then finding the third screen needs a different shape.
- Marking a slice done because the code exists, without ever running it as a user would.
- Letting Claude edit a failing test so it passes. Check test changes in the diff.
- Keeping one session going for days. Run
/clearbetween slices so the next one doesn't keep paying for old history.
Sources
- Memory tool, Claude Platform Docs
- Prompting best practices, Claude Platform Docs
- Best practices, Claude Code Docs
Checked 6 November 2026. Products change often, so confirm details with the vendor.