Repository navigation
chore(loop): settle whether a routine files the defect it trips over - #152
Conversation
Refs #146. A new value, read by the incidental-finding rule the next commit adds to handler-preflight. Nothing read it before this PR, so it cannot have moved a run's output on its own — it is not a tuning of `ceilings`, and the one hard split in AGENTS.md does not apply. Two files is the bound Ardnived named on #146 ("less than ~3 files"). It lives here, not in a SKILL.md, because a threshold is a data edit. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01He4xaTae1P7ecgGPccgwBn
Closes #146's first criterion. Nine sessions in the week to 2026-10-03 found real defects in SahajCloud, read `SahajCloud/AGENTS.md:21` as forbidding an unattended ticket, and wrote each finding into a PR body instead. Four of the nine were access-control gaps. A PR body is a one-time read, and none of those PRs was the finding's owner. Nothing stated precedence between a product repo's guide and these skills, so the sessions were not misreading anything — the rule set had a hole. This bullet closes it where a handler reads it, on the dispatch-time path, in one bullet: an ask-first instruction cannot bind a run with nobody to ask, and the finding is routed rather than dropped. The routing is Ardnived's decision on #146: fold it into the PR you hold when it belongs there, open a ticketless PR when it is small enough, file a ticket otherwise. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01He4xaTae1P7ecgGPccgwBn
Closes #146's second and third criteria. Before this commit the four handlers disagreed, independently of any repo guide: implement-issue capped nothing, answer-ticket and revise-ticket capped at one, and adversarial-review was silent — so a critic's finding that was not its PR's had no home at all. Each now cross-references the one statement in handler-preflight and adds only what is true of itself: implement-issue may fold a fix into the PR it holds, the two prose handlers can only file, and the critic can only file because it never touches the branch. Removals, all of them rules that moved rather than rules that went away: - implement-issue: "every time, with no ceiling" — now preflight's "No handler caps this". - answer-ticket, revise-ticket: "Never file more than one incidental ticket" — the cap Ardnived's decision on #146 removes. - revise-ticket: "Name the rest in the comment" — with no cap there is no rest to name. - survey-routine: "never ask permission to file one" — now preflight's first sentence. Its ceiling table stays, because it scopes the proposal ceiling rather than restating the routing. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01He4xaTae1P7ecgGPccgwBn
Closes #146's fourth criterion. One anchor, named after the new rule and cited by it, carrying the failure: the nine lost findings, the SahajCloud line that already half-carved this out, the four-way disagreement between the handlers, and the cost each rejected alternative carried. The imperative survives without it — handler-preflight states the whole rule inline, and this entry adds no instruction of its own. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01He4xaTae1P7ecgGPccgwBn
Closes #146's fifth criterion. An installed plugin caches skills under a directory named after `version` and never revisits the commit it pinned, so a skill change that leaves `version` alone reaches the two cloud routines and nothing else. (why: docs/why.md#an-installed-plugin-does-not-track-main) The docs sync is one cell: AGENTS.md's layout table enumerates loop-config.json's keys, and this PR adds `findings`. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01He4xaTae1P7ecgGPccgwBn
No rule changes. The paragraph added two commits ago broke mid-sentence at a line end, which reads as two instructions rather than one. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01He4xaTae1P7ecgGPccgwBn
The rule sits in preflight's every-handler section, so four of its edges reached handlers the first draft had not thought about. - The fold-it-in clause gave `fix-ci`, `resolve-conflicts` and `address-review` a licence to widen a PR already heading for human review. The never-widen guard moves from implement-issue into the bullet, where it binds every handler. implement-issue keeps only the fold permission that is its own. - The ticketless-PR route read as mandatory once the size fit, which the survey handlers cannot do — they hold no Edit or Write grant, and would have hit "never improvise around a missing tool" and dropped the finding. The route is now conditional on the handler opening PRs. - `docs/why.md` claimed SahajCloud's line "was extended", a repo this branch does not touch. It now names the companion PR as separate. - Dropping "Name the rest in the comment" removed the only instruction that surfaced a filed finding in the thread the human watches. Both prose handlers now name every ticket they filed. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01He4xaTae1P7ecgGPccgwBn
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The rule is in the right file, and four handlers now cite it instead of disagreeing.
Both defects share one root: the branch predates a45fc7d (#147), merged to main after the cut. main is already 2.5.0, so the bump is a no-op and no installed plugin sees these skills. main's hooks.json is already quoted, so the gate exits 0 there and 1 only here — "fails identically on main" is false, and #154 duplicates a merged fix. Merge main in.
Findings
- blocker — version collides with
main→plugin.json:4 - should-fix — "Nobody is here to ask" binds attended runs →
preflight:59 - should-fix — the SahajCloud PR is claimed filed →
why.md:227 - consider — a new config section for one number →
loop-config.json:20
What was checked
#146 and its comments, the diff, six SKILL.md whole, both preflight modes. plugin validate --strict: 0 on main, 1 here. merge-tree is clean at 2.5.0. rule-delta 62 → 62 matches. No SahajCloud API here; the claim is judged on the run's #146 comment.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`main` moved to 2.5.0 in #147 after this branch was cut, so the branch's own bump to 2.5.0 was a no-op: the plugin cache key is `version`, and an unchanged key keeps the old cache. #147 also quoted ${CLAUDE_PLUGIN_ROOT} in workflow/hooks/hooks.json, which is what made the lean gate exit 1 here and 0 on `main`. Both are fixed by taking main. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JvPB9UVQLfrFNx77Jtw64t
main reached 2.5.0 in #147 after this branch was cut, so this branch's bump collided with it and resolved to a no-op. The plugin cache lives in ~/.claude/plugins/cache/sydevs/workflow/<version>/ and is never revisited, so an unchanged version string means the four skill changes here reach no installed plugin at all. 2.6.0 is the first value above main's. (why: docs/why.md#an-installed-plugin-does-not-track-main) Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JvPB9UVQLfrFNx77Jtw64t
"Nobody is here to ask" was asserted, not conditioned, in a section headed "Rules that hold in every handler" — and Local mode waives only steps 2, 3 and 5. An attended /workflow:implement-issue therefore read the bullet as licence to ignore a product repo's ask-first line, which docs/why.md says still binds an attended session. Conditioned with "Locally, ask the person", the idiom implement-issue already uses for three rules. No line added to the every-dispatch path. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JvPB9UVQLfrFNx77Jtw64t
docs/why.md said the SahajCloud carve-out was extended by "a separate PR to that repo, filed beside the one that added this entry", and the PR body said the same. The run's own comment on #146 says the opposite: git push to that repo was refused, so the line needs an attended run. A story file keeps its claim permanently, so it now says the edit is owed rather than filed. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01JvPB9UVQLfrFNx77Jtw64t
|
Three findings adopted, one rebutted. Pushed
The gate claim fell with the version. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
GitHub reported this PR conflicting after #151 and #153 merged. One hunk conflicted: plugin.json's version. Both sides bump it for the same reason, so neither side wins — main took 2.6.0 in #151 and 2.7.0 in #153, and the plugin cache key is the version string, so this branch's 2.6.0 would have resolved to a no-op and reached no installed plugin. 2.8.0 is the first value above main's. Everything else merged clean and additive: the incidental-finding bullet sits beside #153's reviewBody rules in handler-preflight, findings beside writing.budgets in loop-config.json, and main's budget.mjs, finalize-pr and reflect changes come through untouched. rule-delta still reports 62 → 62 directives with the same one removal the body adjudicates, so the merge dropped no rule. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_013NdyinyrMRWyxZowgEtQ5D
|
Merged Both sides bump it for the same reason, so neither side won. Everything else merged additively: the incidental-finding bullet now sits beside #153's Gate green. The body's change outline still reads "2.4.0 → 2.6.0, clear of main's 2.5.0". The branch carries 2.8.0 now. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
Change outline
Contract — what each handler now says
The loop's rule set is prose, so this is the contract. One rule per line, in the section that holds it.
workflow/skills/handler-preflight/SKILL.md, in Rules that hold in every handler — the one statement:The four handlers, each keeping only what is true of itself:
Files — the responsibility that moved
Routing a finding was decided in four places, each differently, and nowhere for the critic. It is decided in one place now, and the handlers hold only their own constraint.
mainmoved to 2.5.0 in #147 after this branch was cut, soc41fe55mergesmainin andaf7e543takes the version to 2.6.0. An unchangedversionis an unchanged plugin cache key, and these four skill changes would have reached no installed plugin.Test results
claude plugin validate ./workflow --strictexits 0. It failed beforec41fe55, on four unquoted${CLAUDE_PLUGIN_ROOT}hook commands that fix(loop): a routine clone's refs lie, and three skills named a path the dispatcher takes #147 had already fixed onmain. The earlier claim here — "fails identically onmain" — was true only of the pre-fix(loop): a routine clone's refs lie, and three skills named a path the dispatcher takes #147mainthis branch was cut from. fix(hooks): quote CLAUDE_PLUGIN_ROOT in the four hook commands #154 duplicates a merged fix and should close.node workflow/lib/rule-delta.mjs --base origin/main workflow/skills: 62 → 62 directives, 1 added, 1 removed, 1 reworded. Every removal adjudicated below./code-review high: 5 findings, 4 fixed ine1c87f0, 1 left open and named below./security-review: triggered bysecurityReview.triggerPattern(skill.md+loop-config.json), no findings. No frontmatter orallowed-toolsline changes in any skill.node workflow/lib/comment-lint.mjs --base origin/main: no banned comment added.claude-workflowis inci.noCi.Manual verification
rule-deltareports one, and three more are sub-directive. All four are rules that moved rather than rules that went away:implement-issue: "every time, with no ceiling" → preflight's "No handler caps this".answer-ticket,revise-ticket: "Never file more than one incidental ticket" → the cap the decision on chore(loop): settle whether a routine files the defect it trips over #146 removes.revise-ticket: "Name the rest in the comment" → restored as "Name each ticket you filed", since with no cap there is no rest.survey-routine: "never ask permission to file one" → preflight's first sentence. Its ceiling table stays, because it scopes the proposal ceiling rather than restating the routing.findings.directFixMaxFiles; no changedSKILL.mdline carries a literal number.grep -rn "incidental" workflow/skills/returns the statement inhandler-preflightplus one cross-reference per handler.git merge-treeagainstmainis clean, and the merge inc41fe55conflicted nowhere.Notes for reviewer
The decision this implements is Ardnived's, on #146: file whenever a significant issue is hit, fold the fix into the PR being worked on when it belongs there, open a direct PR instead of a ticket when the change is small (~3 files), raise a ticket otherwise. The ticket's own recommendation ("file it, every time") is the same answer.
One judgement call to check.
AGENTS.md's one hard split forbids shipping a skill change and a ceiling change together, and this PR carries both a skill change and a new number. I shipped them together becausefindings.directFixMaxFilesis a new key no code read before this PR, not a tuning ofceilings— it cannot have moved a run's output on its own, so the attribution problem the split exists to prevent does not arise. Splitting it would have meant one PR with an orphan key and one with a rule citing a missing key. It is commite212a9balone, so it reverts without touching the rule. If you read the split as binding anyway, that revert is the whole fix.One
/code-reviewfinding left open, deliberately. The new ticketless-PR route has no branch-naming convention and no dedupe step of its own, while the ticket route is protected bytriage-issue's duplicate search.implement-issuestep 2's resume search is keyed on the ticket number (claude/*-<number>-*), so a dead attempt's incidental PR is invisible to attempt 2 — which could re-trip the defect and open a second PR. Preflight's next bullet ("Every unit of work is idempotent. Check for an existing branch, PR, reply, or child issue before you create one") carries the duty generically, but not the mechanism. Naming a convention for incidental branches is new machinery and more than #146 asked for, so it wants its own decision rather than a guess here.The SahajCloud edit is still owed. #146's second open question asked for the downstream change in the same run.
git pushto that repo was refused by the implementing session's permission classifier, so one line onSahajCloud/AGENTS.md:21needs an attended run.docs/why.mdsays owed, not filed, since1fa22fb.Detail
Why not the two rejected shapes. Both are in
docs/why.mdunder the new anchor. PR body only is honest forimplement-issue, impossible for the two prose handlers and the critic, which open no PR — and it loses every finding whose PR merges, which is all of them. One standing ticket per repo needs a new label plus a new-label:exclusion in every worklist query the loop ever adds, the exact hazardops-journalalready makes every author re-check, and the standing ticket would sitawaitingforever.The four
/code-reviewfindings fixed ine1c87f0. The rule sits in the every-handler section, so its edges reached handlers the first draft had not considered:fix-ci,resolve-conflictsandaddress-reviewlicence to widen a PR already heading for human review. The never-widen guard moved out ofimplement-issueinto the bullet, where it binds everyone.docs/why.mdclaimed SahajCloud's line "was extended", in a repo this branch does not touch. That attempt was incomplete — it still read "filed beside the one that added this entry" — and1fa22fbmakes it say owed.The adversarial review's four findings, addressed in this push. Adopted three, rebutted one:
plugin.json:4— the version collided withmain.c41fe55mergesmain,af7e543takes 2.6.0. Resolved.preflight:59— "Nobody is here to ask" was asserted, not conditioned, in a section that holds in every mode, whiledocs/why.mdsays an attended session is still bound.fcc9ed4conditions it with "Locally, ask the person", the idiomimplement-issuealready uses. Resolved.why.md:227— the SahajCloud PR was claimed filed.1fa22fbsays owed. Resolved.loop-config.json:20—findingsversusceilings.directFixMaxFiles. Rebutted and left open:ceilings's own$commentscopes it to caps the dispatcher enforces, and this bound is applied by a handler run. Moving it would also turn this into the skill-plus-ceiling pairingAGENTS.mdforbids.Length cost, paid knowingly.
handler-preflightis read on every dispatch, 25–40 times a day, so the bullet is five lines and the story is one hop away indocs/why.md. The conditioning sentence added no line. It replaces statements in four other files, two of which are also run-loaded.Two anomalies from the implementing run, reported not explained.
git worktree add .claude/worktrees/<slug>was refused by that session's permission classifier, despite.claude/worktreesbeing exempt from Protected Paths; the run tookimplement-issuestep 6's documented--no-worktreefallback and worked on a plain branch. Separately, a script-driven edit to aSKILL.mdwas refused as instruction poisoning; the edits were made with the Edit tool instead, which shows each replacement.One anomaly from this run.
address-review/SKILL.md:69citesdocs/why.md#the-queue-owns-staleness-you-own-conflicts, and no such heading exists indocs/why.md. Not this PR's scope, so not fixed here./simplifywas not fanned out. Its four angles are code-shaped — reuse, repeated I/O, closures holding scope alive. The two that transfer to prose were applied directly: theanswer-ticket/revise-ticketnear-duplication is inherent, since each skill is read standalone and the rule itself is stated once; and the bullet is at the right altitude, in the one file every dispatch reads, which is the gap #146 named as "the defect, not either rule".Closes #146
🤖 Generated with Claude Code
https://claude.ai/code/session_01JvPB9UVQLfrFNx77Jtw64t