Repository navigation
feat(fields): ticket state is a Stage field; a PR's state is its draft flag - #36
Merged
Merged
Conversation
…t flag
Assignment stops moving. `assignee:sydevs-bot` still IS the worklist, but only
the user writes it, and it stays put until they take it back — so assignment
answers exactly one question, *is this the loop's to touch*, and never drifts.
The hand-back it replaces cost a round trip on every unit of work: the loop
reassigned to say "done", and the user reassigned back to say "continue".
What kind of turn it is moves to two new org-level issue fields alongside
Priority and Effort:
Stage Proposed · Revising · Blocked · Implement · Implemented
Hold Until a date; while it is in the future the item is invisible
That retires five labels whose meanings overlapped and, in one case,
contradicted each other outright — triage-issue said `blocked-upstream` had no
bot meaning while the ladder made it a hard implementation gate. It also
retires `claude:working`, which existed in one repo, carried zero issues, and
was never applied by anything: only swept.
Four findings shaped this, all measured rather than assumed:
1. Date fields exist and MCP can write them — `issue_write` takes `value` for
text/number/date and `delete:true` to clear one field, so Hold Until can be
cleared without the PUT-replaces-everything trap.
2. Fields are NOT searchable. `field.priority:high` returns 0 through the REST
search a routine has, against a control of 24, with the negation also 0.
So no worklist query filters on a field; candidates come from indexed
qualifiers and field values are attached from list_issues, five calls.
3. No MCP tool reads an issue timeline, and the REST field-change event
carries no field name and no old value — so a blocked ticket's previous
Stage is written into the `Blocked by:` marker as `(was: X)`. Unblocking
restores it, except `Implement`, which becomes `Revising`: a blocker
usually changes the shape of the work.
4. Every PR qualifier IS indexed. draft:, review:, -reviewed-by: all work.
So a PR's baton is its `draft` flag. Every loop PR opens as a draft and is
marked ready exactly once, at green CI; the assignee never changes. `draft:false`
therefore means "has been ready at least once", which is what keeps the
adversarial review firing once and only once.
The safety property is unchanged and restated on the new mechanism: the loop may
never write `Stage: Implement`. It may move a ticket off it — revoking only ever
reduces its own autonomy — and the danger of the field version is that four
other Stage writes are routine, so the prohibition is a bare imperative in
preflight, triage-issue and implement-issue rather than inferred.
Feedback is now an allowlist, `assignment.respondTo`, replacing "the author is
not me". That test was a blocklist with one entry: of the 200 most recent
comments across two repos, 93 were cloudflare-workers-and-pages[bot], which
under the old rule would have been the largest single source of work. An
allowlist fails closed and is how Copilot gets adopted later — one config entry.
Also: journal title terms are now filed/opened/merged/closed, because `revised`
was defined as hand-backs and was never measurable anyway (finding 3); the
dropped-baton sweep becomes an unheard-replies sweep, since "replied but forgot
to reassign" means nothing once nothing is handed back; and the legacy-identity
exception is deleted rather than carried, per the maintainer.
Org fields are already created (Stage=46423931, Hold Until=46423871) and 17 open
issues backfilled from their labels, so this merge is the only remaining step
before the labels can be deleted. `Status` and `State` are both reserved names
on GitHub, which is why the field is `Stage`.
Drive-by: repairs the AGENTS.md sentence #35's search-and-replace clobbered.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Ardnived
added a commit
that referenced
this pull request
Sep 3, 2026
…#37) Two corrections to #36, both from watching the first real runs. **A PR is ours because we wrote it.** #36 made `assignee:<bot>` the gate for PRs as well as tickets, which forced a migration — every PR open at cutover had to have the bot added — and left all three carrying two assignees, the reviewer's and ours, with the field meaning two things at once. `author:<bot>` was the answer already sitting there: exact, indexed, no write, no migration. So the loop now writes no PR assignee at all, on creation or after. That frees the field for the one thing it could not express before, pointing the other way: **assigning the bot to a PR it did not write is how a human hands one over**, and unassigning withdraws it. Preflight gains a second, disjoint PR query (`assignee:<bot> -author:<bot>`) for exactly that case. Tickets are unchanged — assignment is still their queue. **hasWorkflows is a filesystem check.** `mcp__github__list_workflows` is not in the routine's MCP build; four consecutive runs journalled its absence under⚠️ Failed, every time for a fact sitting on disk. Every repo in `repos` is cloned into the run before Claude starts, so `.github/workflows/*.yml` answers it exactly, for free, and cannot 403. The general rule, now in why.md: when the run already holds the checkout, read the checkout. The failure was harmless — an absent hasWorkflows reads as "this repo has CI", so the gate stayed closed — but a recurring⚠️ Failed line trains a reader to skim the section that exists to be read. Not changed: the survey-vs-journal weekday mismatch reported last night. At the real cron time (`0 8 * * *`) UTC and Vancouver agree year-round — 08:00Z is 01:00 PDT and 00:00 PST, the same weekday either way. It diverged only because the run was fired by hand at 04:19Z. Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This was referenced Sep 3, 2026
Ardnived
added a commit
that referenced
this pull request
Sep 7, 2026
…, and relax the one-behaviour rule (#61) * fix(loop): pass draft:true when creating the PR `finalize-pr/SKILL.md:232` is the only place the pipeline creates a PR, and its `create_pull_request` template omitted `draft`. The tool defaults to `false`, so every PR the loop opened was born ready for review — while the prose 13 lines below states the opposite as an invariant: "Every PR opens as a draft, without exception." Draft is the PR's baton (docs/why.md#draft-is-the-prs-baton). A PR born ready puts unfinished work in the reviewer's queue before CI has run, and makes the once-ever rung 5 review a moving target, because `draft:false` is what marks a PR as having been ready at least once. #57's table is the evidence: 4 of 5 loop PRs opened on 2026-09-06 were non-draft, three days after #36 landed the rule. #59 made those PRs visible on the board. This stops them being born ready in the first place. `version` bumped because a skill body changed and the cache key is the version (why: docs/why.md#an-installed-plugin-does-not-track-main). Follow-up 1 of 2 from #59. * fix(state): restore `awaiting` when a non-draft PR is reopened The `closed` arm removes `awaiting` and nothing put it back, so a reopened non-draft PR was ready for review and invisible on the board — the same hole #59 closed one line up for `opened`. `ready_for_review` cannot cover it: GitHub emits that event only on a draft -> ready transition, and a reopened PR never transitions. It compounded. The `opened`/`reopened` arm below also clears the linked ticket's `awaiting` on reopen, on the grounds that the PR carries the signal now. It did not. After a reopen neither item carried it, and only the nightly drift sweep would have noticed. Widen the label gate to `reopened`, keeping the `!pr.draft` test. `assignBot` stays on `opened` alone — it is split out above rather than widened, because unassigning a PR is the kill switch for a delegated one, and re-adding on reopen would undo a deliberate removal. Follow-up 2 of 2 from #59. * docs: make one-behaviour-per-PR a default, not a prohibition The rule read as absolute in three places, and #61 hit it immediately: two follow-ups from #59, disjoint files, one commit each, and no reviewer benefit from splitting them into two rounds. What the rule is actually protecting is attribution — you cannot test a change here by running it, so when the next run behaves oddly you need to know which change caused it. One commit per behaviour gives that. A separate PR is a stronger form of the same guarantee, and it is not free: it costs a review round, and `wipCapPerRepo` bounds how many may be open at once. So the default stands and the prohibition goes, with one exception kept hard: a skill change and a ceiling change together. Those two move the next run's output in the same direction, so a combined PR is genuinely unattributable. reflect/SKILL.md:161 states that exception too, unchanged and still correct.
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.
Summary
Assignment stops moving.
assignee:sydevs-botstill is the worklist, but only you write it and it stays put until you take it back — so assignment answers exactly one question, is this the loop's to touch. The hand-back it replaces cost a round trip on every unit of work.What kind of turn it is moves to two new org-level issue fields:
StageProposedRevisingBlockedHold Untildate saying when it comes backImplementImplementedHold Untilis a date. While it is in the future the item is invisible, including in the journal — the loop has already promised to look again on that day.A PR's baton is its
draftflag. Every loop PR opens as a draft and is marked ready exactly once, at green CI. The assignee never changes.Retires six labels:
ready-to-implement,proposal,needs-info,blocked-upstream,hold, andclaude:working.ops-journalis the only one left.Findings that shaped it — all measured, not assumed
issue_writetakesvaluefor text/number/date anddelete:trueto clear one field, soHold Untilclears without the PUT-replaces-everything trap.field.priority:highreturns 0 through the REST search a routine has, against a control of 24, with the negation also 0. So no worklist query filters on a field: candidates come from indexed qualifiers, field values are attached fromlist_issues— five calls, cheaper than the census this replaces.Blocked by:marker as(was: X). Unblocking restores it — exceptImplement, which becomesRevising, because a blocker usually changes the shape of the work.draft:,review:,-reviewed-by:all work through REST search.The safety property is unchanged
The loop may never write
Stage: Implement. It may move a ticket off it — revoking only ever reduces its own autonomy. The danger of the field version is that four otherStagewrites are routine, so this is a bare imperative inpreflight,triage-issueandimplement-issue, not something inferred from an ownership table.assignment.respondTo— an allowlistReplaces "the author is not me", which was a blocklist with one entry. Of the 200 most recent comments across SahajCloud and SahajAtlasWeb:
Ardnived×100,cloudflare-workers-and-pages[bot]×93,antontcymbal×7. Under the old rule the preview-URL bot would have been the largest single source of work. An allowlist fails closed, and it is how Copilot gets adopted later — one config entry, no skill change.⚠
Copilot's literalauthor.loginis unverified — no Copilot review exists in the org yet. An unmatched entry fails closed and is silently inert; confirm it against a real review before relying on it.Also
filed / opened / merged / closed.revisedwas defined as hand-backs and was never measurable anyway (finding 3) — a number nothing can measure does not belong in a title read as measured fact.AGENTS.mdsentence refactor(loop): split the routines into work-routine and survey-routine over shared bookends #35's search-and-replace clobbered.Already done, outside this PR
Stage=46423931,Hold Until=46423871. (StatusandStateare both reserved names on GitHub — henceStage.)Blocked+Hold Until 2026-10-02, 3 →Implemented(PR in flight), 2 →Implement, 2 →Revising, 1 →Proposed. Priority and Effort verified preserved on every one.Test results
claude plugin validate ./workflow --strictjq -e . loop-config.json(why: docs/why.md#…)citation resolves to a real anchor; no orphaned anchors beyond the one that was already orphanedready-to-implement,blocked-upstream,needs-info,label:proposal,label:hold,claude:working,claimLabelor legacy-identity reference survives outside deliberate historical mentionsDELETEclearsHold Untilleaving Priority and Effort intactManual verification
/workflow:work-routine --dry-runlocally: the 2Implementtickets appear in rung 3; the 9Blockedones appear nowhere; no PR is listed for a hand-back.📋 Awaiting youcontains no held ticket.One PR, deliberately, against the usual one-behaviour rule: a state model cannot be half-migrated, and splitting it would leave the loop reading a half-old, half-new contract between merges.
🤖 Generated with Claude Code