feat(#2632): executor actuals and the closed estimate-calibration loop (#2672)

* feat(#2632): record executor actuals and close the estimate calibration loop

* fix(#2632): calibrate against the raw projection so the loop converges

* test(#2632): add closed-loop convergence guard and codify the feedback-loop rule

* fix(#2632): pair calibration samples per plan; atomic write; amend adr

* chore(#2632): backfill changeset pr to 2672

* fix(#2632): retry renameSync on transient windows errnos and clean up the temp
This commit is contained in:
Tom Boucher
2026-07-26 16:28:56 -04:00
committed by GitHub
parent 920a5f3f06
commit bd570618d4
37 changed files with 943 additions and 147 deletions

View File

@@ -186,6 +186,27 @@ The body follows this structure:
```
</step>
<step name="calibrate_estimates">
Rebuild the estimate-vs-actual calibration from every completed phase (#2632, ADR-2629).
```bash
gsd_run query estimate-calibrate
```
This pairs each phase's PLAN `estimate` with its SUMMARY `actuals`, writes
`.planning/estimation-calibration.json`, and reports the resulting correction factor.
The planner reads it on the next `/gsd:plan-phase`, so estimates improve for THIS project
over time.
Report the returned `factor`, `sample_count`, and `confidence` in the summary output.
`applied: false` means fewer than 3 phases carry both an estimate and actuals — that is
expected early and is not an error. The verb rebuilds from scratch each run, so it is safe
to re-run and never accumulates duplicates.
Phases missing either side are skipped rather than guessed: a fabricated sample would
steer every future estimate.
</step>
<step name="update_state">
Update STATE.md to reflect the learning extraction: