A long task is a sequence of states
A large AI task needs not a longer prompt, but an organized engineering process. Bloated context, mixed problems, outdated assumptions, and an unclear scope gradually deprive the team of control.
The task should be divided into milestones. After each stage, a clear state should remain: what was done, what was checked, which risks remain, and where to continue.
| Artifact | What it records |
|---|---|
| Task spec | The goal, scope, non-goals, constraints, and completion conditions |
| Milestone summary | What was done, what remains, risks, and the next step |
| Decision log | Decisions that do not need to be revisited without new grounds |
| Small commit | A recoverable point in Git history |
| Verification result | Evidence that a specific stage passed |
Break the work into milestones
- Record the current behavior with tests or other checks.
- Complete one main change stage.
- Check the diff and relevant tests.
- Clean up the outer layer or documentation if that is a separate stage.
- Create a summary, update the decision log, and make a small commit.
- Start the next milestone only from the recorded state.
claude --resume refund-refactor
./gradlew test
./gradlew build
git diff --statStep-by-step and goal-driven modes
| Mode | When it is appropriate |
|---|---|
| Step-by-step | Financial logic, public contracts, uncertain architecture, or weak tests |
| Goal-driven | A well-bounded task with reliable automated tests and a formal completion condition |
Signs of losing control
- Claude returns to rejected ideas;
- several approaches or independent tasks become mixed;
- cyclical suggestions start appearing;
- changes spread into unrelated modules;
- the diff grows without a change in the goal.
Stage summary
## Done
- ...
## Verified
- ...
## Remaining
- ...
## Risks
- ...
## Next step
- ...Canonical lesson source · JavaRush
Open JavaRush material