Prompts are formed iteratively
A complex task rarely has a perfect formulation on the first attempt. A working prompt is refined through an observable problem, separation of facts and assumptions, explicit boundaries, exceptions, acceptance criteria, and a verification plan.
- Describe the problem through observable behavior.
- Separate facts from assumptions.
- Clarify the scope, exceptions, and constraints.
- Define the acceptance criteria and verification plan.
- Reread the task statement before moving to code.
A technical interview instead of premature code
If the business problem is clear but the technical boundaries are not, first ask Claude to ask questions and investigate the context without editing. Answer with facts, record the final specification, and only then move to implementation.
- The model can identify gaps, but it does not make final decisions.
- Claude’s unconfirmed assumptions do not automatically become requirements.
- It is better to separate the clarification phase from the implementation session.
Analyze the problem description without editing code.
Ask questions about scope, constraints, and verification.
Separate confirmed facts from hypotheses.
After the answers, suggest a structure for TASK_SPEC.md.Main antipatterns
| Antipattern | Better approach |
|---|---|
| “Fix everything” | One problem, scope, and non-goals |
| No criteria | Describe the expected behavior |
| Verification after code | Plan verification in advance |
| Feature together with refactoring | Separate the changes |
| Trusting a confident conclusion | Check the diff and evidence |
| A polluted long session | Record the spec and start a clean session |
Separate preparation and implementation sessions
| Preparation session | Implementation session |
|---|---|
| Problem analysis | Approved specification |
| Questions and answers | Confirmed evidence |
| TASK_SPEC.md and EVIDENCE_LOG.md | Planning, changes, and verification |
| Unconfirmed hypotheses | Reviewable diff and test results |
The final route for a quality task
- Before implementation, it is known what changes and what remains unchanged.
- Confirmed facts are separated from working hypotheses.
- There is a verification method for every criterion.
- The final result is accepted based on the diff, checks, and human review.
Explore → Plan → Implement → Verify → Review → Commit / PRCanonical lesson source · JavaRush
Open JavaRush material