Skip to content

fix(loop): let rung 4 write awaiting, and narrow its prohibition to Stage - #54

Merged
Ardnived merged 2 commits into
mainfrom
claude/fix-rung4-awaiting-contradiction
Sep 6, 2026
Merged

Ardnived merged 2 commits into
mainfrom
claude/fix-rung4-awaiting-contradiction

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

The failure this prevents

Rung 4 states two rules that contradict each other, so the rung has no defined behaviour.

Line Says
work-routine:213 Never touch Stage or labels.awaiting here
work-routine:234 Add labels.awaiting only when you asked a question or reported a finding

Twelve 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 at 23: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 cleared awaiting seconds earlier. A run clearing it again is a second writer on a field an event owns — the shape docs/why.md#the-state-machine-is-not-the-loops-job exists to forbid.

Setting it is the case no event can see. state-machine.yml:194 returns early when the commenting login sits outside RESPOND_TO (Ardnived, antontcymbal, Copilot), and sydevs-bot does. 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 other awaiting writes.

So the prohibition narrows to Stage, and the label write stays.

The alternative was deleting the label write — one file, one line, and preflight would have needed no edit. Rejected: it makes the loop ask a question into silence, which is the failure awaiting exists to prevent.

Changes

  • work-routine/SKILL.md rung 4 — "Never touch Stage or labels.awaiting here" becomes "Never write Stage here, and never clear labels.awaiting", with a pointer to the one awaiting write at the end of the rung. Both halves of the old prohibition survive inline.
  • work-routine/SKILL.md rung 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 four awaiting writes" 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 — version 0.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

node workflow/lib/rule-delta.mjs --base origin/main workflow/skills
directives: 57 → 57
reworded:   1 (filtered — not shown)

No directive disappeared.

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 local main it reports six unrelated removals from commits #50–#53.)

Gate

  • claude plugin validate ./workflow --strict — passed.
  • ste-lint.py on both edited skills — 17 violations, all on lines this PR does not touch. No new one.
  • No supervised loop run: a skill edit takes effect on the next session, never this 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 clears awaiting again. It does not: state-machine.yml:194 returns early outside RESPOND_TO. Verified against the workflow source, not the claim. The rule survives inverted, and both the skill and the why.md anchor 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" to docs/why.md alone. Restored inline, as CLAUDE.md requires.

Not in this PR

work-routine:149 says "Two live in this rung" and then the rung's own table names a third (a rebutted thread), which preflight also 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

…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 sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 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:235
  • should-fix — "four" survives in three files — preflight:103
  • consider — "never clear it here" now lives only in docs/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

Comment thread workflow/skills/work-routine/SKILL.md Resolved
Comment thread workflow/skills/preflight/SKILL.md Resolved
Comment thread workflow/skills/work-routine/SKILL.md Resolved
…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
@Ardnived
Ardnived merged commit b4bc979 into main Sep 6, 2026
4 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in SYDevelopers Technical Roadmap Sep 6, 2026
@Ardnived
Ardnived deleted the claude/fix-rung4-awaiting-contradiction branch September 6, 2026 18:00
@Ardnived Ardnived removed the awaiting label Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants