Skip to content

lifecycle: let a draft declare its gate (Closes-when: / Blocked-by:) - #168

Merged
Jammy2211 merged 2 commits into
mainfrom
claude/draft-prompts-sweep-sopdvh
Aug 9, 2026
Merged

lifecycle: let a draft declare its gate (Closes-when: / Blocked-by:)#168
Jammy2211 merged 2 commits into
mainfrom
claude/draft-prompts-sweep-sopdvh

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Leg 1 of draft/feature/pyautomind/draft_staleness_detection_signals.md, filed from the draft/ sweep (#167). Pairs with PyAutoBrain#215 (leg 2, the reconcile re-rank) — independent, mergeable in either order.

The problem was ambiguity, not detection

Five prompts in the sweep had a stated gate that had since closed and nobody noticed — one had its exit condition met the same day the status line was written.

A draft citing an issue can mean two opposite things:

Prose can't be graded, so issues --drafts had to report both as one question — "shipped, or newly unblocked?" — and an advisory that can't say which isn't actionable.

Two optional header keys

Closes-when: autolens_profiling#70
Blocked-by:  PyAutoArray#431, PyAutoGalaxy#486

issues --drafts now reports GATE MET (verify, then retire) and UNBLOCKED (ready to start) as separate bands. Prompts that declare a gate drop out of the ambiguous list, so that list becomes the genuinely-undeclared remainder rather than everything.

Design decisions worth reviewing

Aggregated per prompt, not per reference. A prompt blocked on three PRs is unblocked when the last one lands; reporting each ref separately would have claimed "ready to start" three times while it was still blocked. Partly-closed gates get their own weaker band — the real state of ep_analytic_updates, whose WP1 gate merged while WP3/WP4 remain open.

Repo#123 shorthand, not just URLs. Measured on the real backlog: a URL-only extractor found 2 refs, the shorthand form found 8. Prompts don't write URLs.

Fenced blocks are documentation. The prompt that proposed these keys shows them in a ```markdown example — parsing that as a declaration would have invented a finding out of the proposal itself. Caught while backfilling; covered by a test that fails without the fence check.

Still advisory, never gates the exit code. Retiring a prompt writes to complete/ and stays human — the same contract intake reconcile keeps.

Backfilled, giving a live ready-to-start list

Five prompts whose gates this sweep confirmed. Against the states verified via the API: 4 fully unblocked, 1 partial, 0 falsely flagged.

prompt gate
sampler_cli_output_workspace_sweep PyAutoFit#1436
preloads_advanced_workspace_guide PyAutoLens#565
unpark_imaging_scaling_relation_slam PyAutoArray#431
oversampled_psf_dataset_adoption three k×s merges
ep_analytic_updates partial — WP1 merged, WP3/WP4 open

Tests

9 new, each proving the leg fails without the code: both opposite readings, per-prompt aggregation, the fenced-example case, and that a declared gate isn't also asked as an ambiguous advisory. 118 → 127 passing. lifecycle check / orphans / index --check all OK.

Also corrects an acceptance criterion in the source prompt that was wrong when I wrote it — see the second commit; the same note appears on PyAutoBrain#215.


Generated by Claude Code

claude added 2 commits August 9, 2026 15:03
…part

Leg 1 of draft/feature/pyautomind/draft_staleness_detection_signals.md, filed
from the draft/ sweep. Five prompts in that sweep had a stated gate that had
since closed, and nobody noticed -- one of them (the test-mode umbrella) had its
exit condition met the SAME DAY the status line was written.

The blocker was never detection, it was ambiguity. A draft citing an issue can
mean two opposite things: "epic closes when #70 ships its recipe leg" (closed =>
this prompt is DONE) or "BLOCKED until PyAutoArray#431 merges" (closed => this
prompt is READY). Prose cannot be graded, so `issues --drafts` had to report
both as one question, "shipped, or newly unblocked?", and an advisory that
cannot say which is not actionable.

Two optional header keys let the author say which they mean:

  Closes-when: autolens_profiling#70
  Blocked-by:  PyAutoArray#431, PyAutoGalaxy#486

`issues --drafts` now reports GATE MET (verify, then retire) and UNBLOCKED
(ready to start) as separate bands, and prompts that declare a gate drop out of
the ambiguous list -- so that list becomes the genuinely-undeclared remainder
rather than everything.

Design decisions worth recording:

Aggregated PER PROMPT, not per reference. A prompt blocked on three PRs is
unblocked when the LAST one lands; reporting each ref separately would have
claimed "ready to start" three times while it was still blocked. Partly-closed
gates get their own weaker band, which is the real state of ep_analytic_updates
-- its WP1 gate merged, its WP3/WP4 gates are open.

Repo#123 shorthand, not just URLs. Measured on the real backlog: a URL-only
extractor found 2 refs, the shorthand form found 8. Prompts do not write URLs.

Fenced blocks are documentation. The prompt that PROPOSED these keys shows them
in a ```markdown example; parsing that as a declaration would have invented a
finding out of the proposal itself. Caught while backfilling, and covered by a
test that fails without the fence check.

Still advisory, never a gate on the exit code -- retiring a prompt writes to
complete/ and stays human, the same contract intake reconcile keeps.

Backfilled the five prompts whose gates this sweep confirmed, giving a live
ready-to-start list: sampler_cli_output_workspace_sweep (PyAutoFit#1436),
preloads_advanced_workspace_guide (PyAutoLens#565),
unpark_imaging_scaling_relation_slam (PyAutoArray#431),
oversampled_psf_dataset_adoption (three k x s merges), and ep_analytic_updates
(partial). Verified against the states this session confirmed via the API: 4
fully unblocked, 1 partial, 0 falsely flagged.

9 new tests, each proving the leg fails without the code -- including the two
opposite readings, the per-prompt aggregation, the fenced-example case, and that
a declared gate is not also asked as an ambiguous advisory. 118 -> 127 passing.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01E3MuurHXi3xo9TLRpMLJA6
…I got wrong

Legs 1 and 2 of draft_staleness_detection_signals.md are built. Leg 3 (the
--repo upstream mode) is not, and is now better motivated.

The "all five confirmed findings in the top band" criterion was WRONG WHEN
WRITTEN, and contradicts this prompt's own Hard limit section three paragraphs
above it -- that section already says one finding left no Mind-side signal at
all, so a Mind-local ranker cannot rank it by construction.

Chasing the criterion anyway made the tool worse, which is the useful part. A
loose <work-type>/<target>/ series match pulled one more finding in, but also
FALSELY flagged test_mode_bypass_ordered_assertion_ties -- off references to
four unrelated sibling prompts in the same folder -- and that prompt is one the
sweep confirmed is NOT shipped. It is precisely the mis-grade the tool must
never make, and it was already the criterion immediately below. So the two
criteria were in direct conflict.

The real finding is that the five need three different tools, not one better
ranker: rare-token fan-out and shared identifiers (reconcile) catch two, the
Closes-when: header key catches one, and the last two are only reachable by
reading the target repo. Recorded as a table so the next session does not
re-derive it, along with the corrected criteria and the measured outcome.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01E3MuurHXi3xo9TLRpMLJA6
@Jammy2211
Jammy2211 merged commit 8d7939a into main Aug 9, 2026
3 checks passed
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