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.

ArtifactWhat it records
Task specThe goal, scope, non-goals, constraints, and completion conditions
Milestone summaryWhat was done, what remains, risks, and the next step
Decision logDecisions that do not need to be revisited without new grounds
Small commitA recoverable point in Git history
Verification resultEvidence that a specific stage passed

Break the work into milestones

  1. Record the current behavior with tests or other checks.
  2. Complete one main change stage.
  3. Check the diff and relevant tests.
  4. Clean up the outer layer or documentation if that is a separate stage.
  5. Create a summary, update the decision log, and make a small commit.
  6. Start the next milestone only from the recorded state.
Named session and milestone check
claude --resume refund-refactor
./gradlew test
./gradlew build
git diff --stat

Step-by-step and goal-driven modes

ModeWhen it is appropriate
Step-by-stepFinancial logic, public contracts, uncertain architecture, or weak tests
Goal-drivenA 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

Milestone summary
## Done
- ...

## Verified
- ...

## Remaining
- ...

## Risks
- ...

## Next step
- ...

Canonical lesson source · JavaRush

Open JavaRush material