Skip to content

feat(stokowski): make glean own the follow-up contract - #288

Merged
ruby-automation merged 4 commits into
mainfrom
feat/glean-follow-up-contract
Sep 27, 2026
Merged

ruby-automation merged 4 commits into
mainfrom
feat/glean-follow-up-contract

Conversation

@ruby-automation

@ruby-automation ruby-automation commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Problem

EXT-68 finished its pipeline with two failures:

Changes

  • glean.md: glean does all the thinking.
    • Every proposed follow-up goes in the report's follow_ups list. Each item has id (G1, G2, … with no gaps), title, the complete Markdown issue body, priority, and optional existing labels.
    • Stokowski renders the list for review and saves it to .stokowski/follow-ups.json.
    • Glean's first next step tells the reviewer to approve with a comment containing Approve and the ids, for example Approve G1, G2. The comment holds only ids; all issue data comes from follow_ups.
  • improvement.md: a mechanical stage.
    • One approval rule: the latest comment in the prompt's Recent Activity that contains Approve approves every G<number> after that word.
    • It copies each approved item from .stokowski/follow-ups.json with lc issue create --yes --no-take --team EXT --project "Linear CLI", and records what it created in .stokowski/follow-ups-created.json so a rerun can't duplicate issues.
    • With no approval, its headline is "No approved follow ups found". Every proposed follow-up it did not create is listed as Not created, with a note on filing it by hand with lc i create.
    • It then checks the PR and reports blocked unless mergeStateStatus is CLEAN. Spike and exploration workflows, which have no blocked transition, skip the PR check.
  • merge.md: report blocked whenever the PR was not merged, instead of posting to Linear. The blank {{ issue.* }} variables are fixed here and in glean.md.
  • feature and bug-fix workflows: improvement and merge declare blocked: merge-review. This new gate's approve runs merge, and its rework reruns improvement.

Deploy order

This depends on bougyman/stokowski#14. On the current pin, blocked is ignored and .stokowski/follow-ups.json is never written. Merge #14 first, then bump vendor/stokowski on this branch.

Verification

  • The workflow loads, and validate_config reports no errors on the Support Ruby's short subcommand aliases (lc i dev CRY-37, etc.) #14 branch.
  • The improvement prompt rendered from the EXT-68 comment history shows Approve follow-ups: G1, G3 under Recent Activity, and lists both complete and blocked transitions.
  • The pre-commit gate passed: 24 root tests, 577 app tests, Credo clean.

🤖 Generated with Claude Code

ruby-automation and others added 3 commits September 27, 2026 09:29
EXT-68's approved follow-ups were never created, and the issue was marked
Done with its PR unmerged.

- glean.md: glean writes every proposed follow-up to the report's
  follow_ups list (G1..Gn, title, the complete issue body, priority,
  labels). Stokowski renders it for review and saves it for improvement.
  Its next step names the one approval format: "Approve follow-ups: G1".
- improvement.md: a mechanical stage. It reads only that approval
  format, copies the approved items from .stokowski/follow-ups.json into
  Linear with `lc issue create --yes`, and skips ids it already created.
  With no approval it reports "No approved follow ups found". It then
  checks the PR and reports "blocked" unless mergeStateStatus is CLEAN.
- merge.md: report "blocked" whenever the PR was not merged, instead of
  posting to Linear.
- feature and bug-fix workflows: improvement and merge declare
  `blocked: merge-review`, a new gate whose approve runs merge and whose
  rework reruns improvement.

Needs bougyman/stokowski#14 for blocked transitions, report follow-ups,
and gate comments in the improvement prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The approval comment only carries ids. Any comment containing "Approve"
approves every G<number> after that word, e.g. "Approve G1, G3"; the
latest such comment wins. All issue data still comes from the glean
report's follow_ups.

When a proposed follow-up is not created, improvement now says so
plainly ("Not created: G2 - <title>") and ends with a note on filing it
by hand with `lc i create`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When merge-review sends the issue back to improvement, the rerun's prompt
shows only comments since that gate, so the approval written at the glean
gate is gone. Improvement now records the approved ids in
.stokowski/follow-ups-approved.json and reuses them when no newer
approval is visible, so a follow-up that failed to create is retried
instead of dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ruby-automation
ruby-automation merged commit 9fedf65 into main Sep 27, 2026
3 checks passed
@ruby-automation
ruby-automation deleted the feat/glean-follow-up-contract branch September 27, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants