fix(retro): persist recommendations so the next retro detects follow-through (#1834)#1853
Open
jbetala7 wants to merge 2 commits into
Open
fix(retro): persist recommendations so the next retro detects follow-through (#1834)#1853jbetala7 wants to merge 2 commits into
jbetala7 wants to merge 2 commits into
Conversation
…follow-through
/retro generated its "3 Things to Improve" as throwaway prose and never wrote
them to the .context/retros/ snapshot. The next run loaded the prior snapshot
for trend comparison but had no structured record of what it recommended, so a
week spent acting on retro feedback (security hardening, dependency bumps) got
mischaracterized as a generic "fix ratio is high" instead of "2 of 3 prior
recommendations addressed."
- Step 13 snapshot schema gains a mandatory `recommendations` array
({category, text}), populated from the "3 Things to Improve" items.
- Step 12 reads a prior snapshot's `recommendations` back, classifies each as
addressed / partial / open against this window's commits, changed files, and
metrics, and surfaces a "Recommendation follow-through" section. Snapshots
that predate the field are skipped (backward compatible).
- The "3 Things to Improve" narrative is wired to the persisted array so the
loop closes.
Repo-scoped retro only; global mode (~/.gstack/retros/) left as a follow-up to
keep this contained to one issue.
Fixes garrytan#1834
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ollow-through loop Mirrors the garrytan#1624 static-invariant convention: asserts the persist → read-back loop in retro/SKILL.md.tmpl (and the regenerated SKILL.md) stays intact — Step 13 always writes recommendations, Step 12 reads them back and scores addressed/partial/open with a backward-compat skip, and the "3 Things to Improve" narrative records them. Fails the build if any leg regresses. Verified 8/8 fail without the template fix and pass with it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
/retrogenerates its "3 Things to Improve" recommendations as prose output but never saves them to the JSON snapshot in.context/retros/. On the next run, Step 12 loads the prior snapshot for trend comparison but has no structured record of what it recommended.The result: a week spent acting on retro feedback (security hardening, dependency bumps, the exact things the last retro asked for) gets mischaracterized as a generic "fix ratio is high" instead of "2 of 3 prior recommendations addressed." The improvement loop never closes.
Fixes #1834.
Root cause
The Step 13 snapshot schema (
retro/SKILL.md.tmpl) persists metrics, authors, streak, greptile/backlog/test_health, and a tweetable — but not the recommendations. Step 12 reads the prior snapshot back for trend deltas, yet there is nothing in it to compare current-week work against.Fix (repo-scoped
/retro)Three template edits in
retro/SKILL.md.tmpl, then regeneratedretro/SKILL.md:recommendationsarray of{category, text}objects, populated from the "3 Things to Improve" items. Unlikegreptile/backlog/test_health(omitted when empty), this is always written, because it is the input the next run reads back.addressed/partial/open, surfaced in a Recommendation follow-through section ("2 of 3 prior recommendations addressed"). Snapshots written before this field existed have norecommendationskey and are skipped silently, so old.context/retros/history doesn't break.Matches the schema the issue proposed. Scoped to the repo-scoped retro that writes
.context/retros/; global mode (~/.gstack/retros/) is left as a follow-up to keep this to one issue.Testing
New
test/regression-1834-retro-recommendations.test.ts, following the#1624static-invariant convention — it asserts the full persist → read-back loop in both the template and the regeneratedSKILL.md, so the capability can't silently regress:Verified the guard bites: 8/8 fail without the template fix, 8/8 pass with it.
test/skill-validation.test.tsand the existingtest/regression-1624-retro-stale-base.test.tsstill pass.Note:
gen-skill-docs.test.tshas 8 pre-existing--host all/--host gbraindry-run freshness failures on a cleanmain(c43c850c) on my machine, unrelated to this change — this PR adds zero new failures. The external-fork eval/report CI jobs may also fail on empty-env auth as usual; not actionable from a fork.🤖 Generated with Claude Code