SR Method
SR Method EN

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 lot

Why 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.yaml

After 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 -> done

On problem:

user_testing -> reopened -> in_progress -> user_testing -> done
StatusMeaningMain responsibility
proposedIdea or feedback still to frame.User + Codex
plannedStructured but unvalidated lot.Codex proposes, user validates
validatedValidated and executable lot.User
in_progressLot being executed.Codex
user_testingCode delivered, real user validation expected.User
doneLot checked and validated according to planned criteria.Codex updates after validation
reopenedReopened after bug, omission or regression.User or Codex
blockedBlocked by decision, access, specification or source.User
supersededReplaced 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.

On this page