feat: Change requests against a Baseline (ADR-0006)
A caller restates a request to say how requirements have changed, naming a completed Execution of the same Customer case as the Baseline. - app/baseline.py reads a Baseline from its files and refuses one that does not exist, did not complete or belongs to another case, before anything runs or is recorded. A Baseline is never modified. - Requirements carry a change (unchanged, added, changed, removed) and a reason. Submission is refused when a Baseline requirement disappears, an id is reused, or an unchanged requirement's text differs. A removed requirement stays on record and asks nothing downstream. - Each Specialist starts from its delivered version; the graph and the code are its working copy, and the description is carried over when the design's shape is the same. - app/workflows/changes.py compares versions by id and traces what each changed requirement reaches; anything else that changed is listed as unrequested. Approvals show the change for their Phase, and changes.json is written with the full Deliverables. - Intake no longer starts a message read as a change: it names the Execution to give as the Baseline. - A fifth evaluation case runs a request and then a change to it, with four checks that the change is recorded, reaches Checks, stays contained and costs less than its Baseline. Tested with scripted agents only; no Change request has run with real models. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
17
.agents/plans/iter-07-change-requests/steps/step-3.md
Normal file
17
.agents/plans/iter-07-change-requests/steps/step-3.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Step 3 — Implementation Detail
|
||||
|
||||
Built on 2026-10-09.
|
||||
|
||||
1. In a Change request every requirement in `requirements.json` carries a `change`: `unchanged`, `added`, `changed` or `removed`. Everything but `unchanged` carries a `reason`.
|
||||
2. `check_requirement_changes` in `app/workflows/changes.py`, run by `check_submission` when the Deliverable has a Baseline, refuses:
|
||||
- a requirement with no `change`, or a change with no reason;
|
||||
- a Baseline requirement missing from the list (it must stay, marked `removed`);
|
||||
- a requirement marked `added` whose id the Baseline already has, or marked anything else whose id it does not;
|
||||
- a requirement marked `unchanged` whose text differs from the Baseline's;
|
||||
- a list in which nothing is added, changed or removed.
|
||||
3. A removed requirement stays in the file as the record of what was dropped. `read_list` leaves it out, so nothing downstream is asked to serve or check it.
|
||||
4. `agents/requirements-analyst.md` says how to mark each requirement and to add a `Changes` heading. With a user present the draft is confirmed before submission by the rule of iteration 4 step 27.
|
||||
|
||||
Differs from the plan: the check that an `unchanged` requirement keeps its text was added. Without it a requirement could change quietly.
|
||||
|
||||
Tests: `tests/execution/test_change_requests.py` "step 3" (6).
|
||||
Reference in New Issue
Block a user