Work by lots
SR lot lifecycle, statuses and prompts.
Work by lots
Lot-based development is the heart of the SR Method. It turns an open Codex conversation into named, bounded, verifiable and cleanly resumable work units.
Speak in lots
The user should learn to speak to Codex in lots:
frame this lot
give the lot plan
execute this lot
move this lot to user_testing
the E2E tests for this lot are validated
move it to done
propose the next lotWhy lots improve quality
- they limit scope;
- they provide a stable identifier;
- they allow session resume;
- they distinguish finished code from validated product;
- they make remaining tests visible.
Group several lots into SR passes
Since SR 3.2.0, a project can also use docs/codex/SR_PASSES.yaml.
An SR pass does not replace lots. The lot remains the atomic unit: scope, acceptance criteria, authorized paths, stop conditions, status, and task memory. The pass orchestrates several related lots when they share a foundation, a preflight, dependencies, or one coherent E2E validation.
A pass must make explicit:
- included lots and execution order;
- rationale for grouping;
- dependencies between lots;
- shared preflight;
- required human validations;
- secrets, access, external actions, or migrations;
- E2E strategy: per lot, grouped at pass end, or not required;
- stop conditions.
Before any significant multi-lot execution, Codex must apply the Pass Planning Gate. If SR_PASSES.yaml exists or has just been created, Codex must validate it with:
python3 scripts/codex/validate_pass_contract.py --file docs/codex/SR_PASSES.yaml --lots-file docs/codex/SR_LOTS.yamlAfter several lots have been created, use this prompt:
Use docs/codex/prompts/08_define_sr_passes_from_lots.md to propose SR passes from SR_LOTS.yaml. Do not modify application code.Standard lifecycle
proposed -> planned -> validated -> in_progress -> user_testing -> doneOn problem:
user_testing -> reopened -> in_progress -> user_testing -> done| Status | Meaning | Main responsibility |
|---|---|---|
| proposed | Idea or feedback still to frame. | User + Codex |
| planned | Structured but unvalidated lot. | Codex proposes, user validates |
| validated | Validated and executable lot. | User |
| in_progress | Lot being executed. | Codex |
| user_testing | Code delivered, real user validation expected. | User |
| done | Lot checked and validated according to planned criteria. | Codex updates after validation |
| reopened | Reopened after bug, omission or regression. | User or Codex |
| blocked | Blocked by decision, access, specification or source. | User |
| superseded | Replaced by another lot or decision. | Codex documents |
Important rule
A lot is not automatically done because Codex finished coding. If real validation is needed, Codex must move it to user_testing.
After a user-validated E2E test, the user explicitly asks Codex to move the lot to done.
Complete lot plan before code
Before changing anything, Codex must produce a validatable plan:
- Lot ID;
- verifiable objective;
- short context;
- included scope;
- out of scope;
- assumptions;
- sources to read;
- method and domain skills;
- candidate files;
- identified risks;
- implementation strategy;
- planned checks;
- user E2E tests;
- stop conditions;
- expected status after execution.
Useful prompts
Frame this need as an SR lot. Do not code. Give objective, scope, out of scope, acceptance criteria, sources to read, risks, checks and E2E tests.Give me the full plan for lot [LOT-ID] before coding. I want to validate scope, sources, candidate files, checks and E2E tests.Execute lot [LOT-ID] while respecting SR gates. Update SR memory, contracts and give user E2E tests.The E2E tests for lot [LOT-ID] are validated by the user. Move the lot to done, update SR_LOTS.yaml, task memory, contracts if needed, then propose the next priority lot.The E2E test for lot [LOT-ID] fails on [description]. Reopen the lot, apply Fact Gate, diagnose before fixing.