Repository navigation
fix(loop): let rung 4 write awaiting, and narrow its prohibition to Stage - #54
Conversation
…tage Rung 4 carried two rules that contradicted each other. `work-routine:213` said never touch `Stage` or `labels.awaiting` in the rung. `:234`, twelve lines below, said add `awaiting` after a question or a finding. A run reading them in order has no defined answer, and the 2026-09-05 journal recorded the clash twice. The prohibition's stated reason covers clearing the label, not setting it: the human's comment already fired `issue_comment: created`, so the state machine cleared `awaiting` seconds earlier, and a run clearing it again is a second writer on a field an event owns. Setting it is the case no event can see. A rung-4 reply that asks a question back fires the same event, so the state machine clears `awaiting` on the loop's own comment — leaving a ticket that needs a human and says nothing. That is the shape of the other four writes. So the prohibition narrows to `Stage`, and `preflight`'s list of `awaiting` writes goes from four to five. Deleting the label write was the alternative; it makes the loop ask a question into silence. `rule-delta.mjs --base origin/main` reports one removal, "Never touch `Stage` or `labels.awaiting` here", replaced in place by "Never write `Stage` here". Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01BjaSLP2jrYDcRtbqxnsVf8
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Right verdict, right size: one contradiction, +29/-7. Keeping the label write beats deleting it.
The stated reason is wrong. Both new texts say the loop's own reply clears awaiting. state-machine.yml:194 returns early for any author outside respondTo, which excludes sydevs-bot. The rule still holds, inverted: nothing re-raises what the human's comment cleared. The 4 → 5 renumber reached one place of four.
Findings
blocker— false justification in a run-loaded skill —work-routine:235should-fix— "four" survives in three files —preflight:103consider— "never clear it here" now lives only indocs/why.md—work-routine:213
Checked: all four changed files, state-machine.yml plus caller, preflight's table, docs/why.md:524-537. Grepping awaiting in workflow/skills found three loop writes outside the five (work-routine:203, implement-issue:84, cross-repo-issue:50). Profile read. Ticketless repo: the body is the spec.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
…count The review found the new clause states a false mechanism. It said the loop's own reply clears `awaiting` again. `state-machine.yml:194` returns early when the commenting login sits outside `RESPOND_TO`, and `sydevs-bot` does, so the loop's reply fires no transition at all. The rule survives inverted. The human's comment cleared the label before the run started, and nothing re-raises it, so the loop must. Corrected in `work-routine` rung 4 and in the `docs/why.md` anchor, which carried the same wrong claim. Drop the `awaiting` write count rather than raise it. The numeral was stale in three more places the renumber missed — `preflight`'s table row, `why.md:534`, and `state-machine.yml`'s header comment — and the list is short by three writes besides (`work-routine:203`, `implement-issue:84`, `cross-repo-issue:50`). A count that keeps going stale earns no place. Restore the inline prohibition on clearing the label. The narrowed bullet forbade `Stage` only, leaving "never clear `awaiting`" stated in `docs/why.md` alone. CLAUDE.md requires the imperative survive inline. `rule-delta.mjs` now reports 57 -> 57 with no removal, where the previous commit removed one directive. The `state-machine.yml` edit changes a header comment only. No behaviour. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01N9x11UPSBBtLd73BiK17Ex
The failure this prevents
Rung 4 states two rules that contradict each other, so the rung has no defined behaviour.
work-routine:213Stageorlabels.awaitingherework-routine:234labels.awaitingonly when you asked a question or reported a findingTwelve lines apart, in one rung. A run reading them in order cannot obey both. The 2026-09-05 journal recorded the clash twice (
19:55, and again at23:31).Which rule survives, and why
The prohibition's own stated reason covers clearing the label, not setting it: the human's comment already fired
issue_comment: created, so the state machine clearedawaitingseconds earlier. A run clearing it again is a second writer on a field an event owns — the shapedocs/why.md#the-state-machine-is-not-the-loops-jobexists to forbid.Setting it is the case no event can see.
state-machine.yml:194returns early when the commenting login sits outsideRESPOND_TO(Ardnived,antontcymbal,Copilot), andsydevs-botdoes. So the loop's own reply fires no transition at all, and nothing re-raises the label the human's comment cleared. Without a write here the ticket ends the run needing a human and carrying no signal that it does — the same shape as the loop's otherawaitingwrites.So the prohibition narrows to
Stage, and the label write stays.The alternative was deleting the label write — one file, one line, and
preflightwould have needed no edit. Rejected: it makes the loop ask a question into silence, which is the failureawaitingexists to prevent.Changes
work-routine/SKILL.mdrung 4 — "Never touchStageorlabels.awaitinghere" becomes "Never writeStagehere, and never clearlabels.awaiting", with a pointer to the oneawaitingwrite at the end of the rung. Both halves of the old prohibition survive inline.work-routine/SKILL.mdrung 4 — the label rule cites the new anchor and states the mechanism: the human's comment cleared the label, and the loop's own reply fires none back.preflight/SKILL.md— "Your fourawaitingwrites" loses the numeral rather than gaining one, and the table row above it does the same.docs/why.md— new anchor#rung-4-writes-awaiting-when-it-asks-a-question, plus the same de-numbering at:534..github/workflows/state-machine.yml— header comment only, same numeral. No behaviour changes, so this carries none of that file's usual blast radius.workflow/.claude-plugin/plugin.json—version0.2.3 → 0.2.4, since a skill body changed.Why the count went away instead of up. The renumber to five would have left three more places saying four, and the list is short by three writes besides —
work-routine:203,implement-issue:84,cross-repo-issue:50. A count nobody can keep current earns no place in a run-loaded skill. "among them" replaces it, so the list no longer claims to be closed.Net cost on the run-loaded skills: +3 lines across the two of them.
Rule delta
The first commit removed one directive and replaced it with a narrower one. Restoring the "never clear it" half makes that a reword instead, which is the honest delta.
(Run it with
--base origin/main. Against a stale localmainit reports six unrelated removals from commits #50–#53.)Gate
claude plugin validate ./workflow --strict— passed.ste-lint.pyon both edited skills — 17 violations, all on lines this PR does not touch. No new one.Review round
An adversarial review raised three threads, all adopted.
blocker,work-routine:235— the first commit's new clause said the loop's own reply clearsawaitingagain. It does not:state-machine.yml:194returns early outsideRESPOND_TO. Verified against the workflow source, not the claim. The rule survives inverted, and both the skill and thewhy.mdanchor now state the real mechanism.should-fix,preflight:103— the renumber stopped short in three places. Took the reviewer's suggestion to drop the numeral rather than raise it.consider,work-routine:213— the narrowed bullet had dropped "never clear it" todocs/why.mdalone. Restored inline, as CLAUDE.md requires.Not in this PR
work-routine:149says "Two live in this rung" and then the rung's own table names a third (a rebutted thread), whichpreflightalso counts. That is a second, separate miscount. One behaviour per PR — it is journaled, not folded in.🤖 Written by the sydevs autonomous loop — see what this is
🤖 Generated with Claude Code
https://claude.ai/code/session_01N9x11UPSBBtLd73BiK17Ex