Repository navigation
feat(loop)!: the flip — every skill speaks the event model (v1.0.0) - #71
Merged
Merged
Conversation
Ardnived
force-pushed
the
claude/loop-dispatcher
branch
from
September 8, 2026 18:35
996eca9 to
6cec14b
Compare
implement-issue, finalize-pr, triage-issue, survey-routine, reflect, draft-ticket, cross-repo-issue, adversarial-review and the four survey skills drop Stage, Hold Until, the baton, the CI watch, mark-ready and the reviewer request at open. The dispatcher owns every label and Status; sessions push and end. reflect gains a weekly usage report read from the journal tallies (why: docs/why.md#there-is-no-wip-cap). work-routine, preflight and journal stay until the cutover cleanup. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Ardnived
force-pushed
the
claude/loop-flip
branch
from
September 8, 2026 22:26
603450b to
4629d1b
Compare
This was referenced Sep 13, 2026
Merged
sydevs-bot
added a commit
that referenced
this pull request
Sep 20, 2026
The early return spared text that already fits, but every cut below it still ran to `limit - reserve`. The same argument kills both: the 200-character headroom is for a body that gets re-edited, and since #71 a journal entry is a per-session comment written once. Left in, it over-cut. A 1,599-character entry that one cut brought to 1,433 — inside a 1,500 budget — lost a second `Did` line to reach 1,276. `FIT_RESERVE`, `--reserve` and the `target` field go with it. Nothing outside this script read any of them. The early return goes too: with the loop bound by `limit`, text that fits never enters it, and the reason string now says "nothing cut" from the count. Gate: `node --test workflow/lib/*.test.mjs` → 21 pass. The new spec was watched failing on the head before this commit — it dropped 2 lines, not 1. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_011aKzLHT3FS4ac2Q58TkY6N
Ardnived
pushed a commit
that referenced
this pull request
Sep 21, 2026
…rity a run assigns (#118) * fix(loop): preflight's record check runs without CLAUDE_PLUGIN_ROOT `handler-preflight` step 2 spelled its command with `${CLAUDE_PLUGIN_ROOT}`, which Claude Code sets only for an installed plugin. A routine reads the skills from the checkout instead, so the variable is empty and the literal command expands to `/lib/payload.mjs --attached /../..`. Every dispatch hit it. 52 sessions across the six days to 2026-09-20 spent a refused call, a guess and a friction line on it, and the guess was wrong twice over: the path, and then the root, since `--attached` wants the directory holding the five checkouts rather than the claude-workflow checkout inside it. The skill now names the checkout, and `payload.mjs` derives the root from its own path, so the documented command carries no `--attached` at all. Both new assertions were watched failing against the root runs guessed first. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019Z56SXwwDj6RTXxXYzXUw1 * fix(loop): --fit stops eating the journal line that carries the PR `budget.mjs --fit` broke the record `reflect` reads, twice over. It cut text that already fitted. `FIT_RESERVE` targets 200 characters below the budget, and that headroom exists for a body that gets re-edited — but since #71 a journal entry is a per-session comment, written once. So a 1,355-character entry against a 1,500 budget lost its whole `Did` section and was told "532 to spare". Mon, Tue, Wed, Thu and Fri each carry that line. And it cut top-down. `handler-journal`'s template leads `Did` with the PR the run pushed, so the first line is the one that matters. Three entries in the week to 2026-09-20 lost exactly that link, and Tuesday's survey worked around it by ordering its Did section least-important-first — against the register rule that leads with the outcome. `fit` now returns text that is inside its budget untouched, and cuts from the end of `Did` when it must cut. Both assertions were watched failing against the behaviour they pin, and the first was resized until it could fail — at 1,229 characters it passed either way. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019Z56SXwwDj6RTXxXYzXUw1 * fix(loop): one owner for Priority, so the two skills stop disagreeing `triage-issue` said both things at once. Line 57: the reviewer sets Priority, because consequence to the product is their judgement. The hard rule at the bottom: never leave a ticket without a Priority field value. `revise-ticket` agrees with the first and contradicts the second. Nine sessions spent a friction line on it in the week to 2026-09-20, on five distinct days, and they split three ways — SahajCloud#814 set Medium, SahajCloud#819 set High, claude-workflow#106, #109, #110 and SahajAtlasWeb#217 left it unset. So bot-filed tickets carry a Priority nobody chose, on a field the reviewer is meant to own. The hard rule goes. The checklist and the ownership paragraph now say the one thing: never choose a Priority, carry an existing value through a raw PUT so the write does not clear it, and leave an empty one empty. `rule-delta.mjs --base main workflow/skills` reads 63 → 63, none dropped: the removed hard rule is replaced by its inverse two sections above, which it matches. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019Z56SXwwDj6RTXxXYzXUw1 * docs(review): naming is not taste here, and the profile said it was The profile listed naming under "what they rarely flag — do not manufacture findings here", on two comments in the seed corpus. Last week's reflection saw three naming comments on SahajCloud#774, called one PR weather, and pre-registered the check: if a second PR draws them, the entry needs rewriting. Three did, in the window since #95 merged, and the adversarial review passed all three clean on naming. WeMeditateWeb#107 came back CHANGES_REQUESTED on nothing else. SahajAtlasWeb#213 drew four comments, two with the replacement supplied. WeMeditateWeb#112 drew two. Written at the level of the value rather than the incidents: this is value 4, the source of truth, applied to vocabulary. Every name they corrected made a false claim — `readCms` did a retry beside an existing `withRetry`, and the atlas said `Registration` for a guard covering every submission kind while the CMS collection was already `user-submissions`. Spelling, casing and house-style stay out of scope, so the entry narrows rather than opening a whole class. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019Z56SXwwDj6RTXxXYzXUw1 * chore(plugin): 2.2.2 `version` is the installed plugin's cache key, so a skill change that leaves it alone never reaches `/plugin install workflow@sydevs`. Three skills moved in this PR: handler-preflight, triage-issue and the reviewer profile. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019Z56SXwwDj6RTXxXYzXUw1 * fix(loop): the attached-root test needs only this checkout `record()` defaults to `repo: 'sydevs/SahajCloud'`, so the new assertion demanded a SahajCloud checkout beside this one. A claude-workflow dispatch clones one repo, so the gate was 19/20 on this head — watched failing before the fix, 20/20 after. `defaultAttachedDir()` can promise exactly one checkout: the one this file lives in. The test now names it, as the assertion above it already did. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_011aKzLHT3FS4ac2Q58TkY6N * fix(loop): --fit cuts to the budget, not below it The early return spared text that already fits, but every cut below it still ran to `limit - reserve`. The same argument kills both: the 200-character headroom is for a body that gets re-edited, and since #71 a journal entry is a per-session comment written once. Left in, it over-cut. A 1,599-character entry that one cut brought to 1,433 — inside a 1,500 budget — lost a second `Did` line to reach 1,276. `FIT_RESERVE`, `--reserve` and the `target` field go with it. Nothing outside this script read any of them. The early return goes too: with the loop bound by `limit`, text that fits never enters it, and the reason string now says "nothing cut" from the count. Gate: `node --test workflow/lib/*.test.mjs` → 21 pass. The new spec was watched failing on the head before this commit — it dropped 2 lines, not 1. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_011aKzLHT3FS4ac2Q58TkY6N * fix(loop): the write examples stop choosing a Priority The prose said the reviewer owns Priority while three examples picked one: `triage-issue`'s update call set `High`, `draft-ticket` hard-coded `Medium` on every create, and `cross-repo-issue` carried a Priority slot. Those are the two values the week's runs supplied — sydevs/SahajCloud#814 Medium, sydevs/SahajCloud#819 High. Each example now names Effort alone, and the table's `Medium` row no longer calls itself the default. It also named the wrong mechanism. `issue_write` merges — `delete: true` exists because omitting a field does not clear it — so a run leaves Priority alone by not naming it. Only the raw PUT in the `<details>` replaces every field, and only there is carrying the value back the way to keep it. `rule-delta.mjs --base origin/main workflow/skills`: 63 → 63, none dropped. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_011aKzLHT3FS4ac2Q58TkY6N * fix(loop): the two run-loaded budget calls drop CLAUDE_PLUGIN_ROOT Commit 1 fixed the record check and left the budget check beside it. Both `handler-preflight`'s `--kind` line and `handler-journal`'s `--fit` line are read on every dispatch, so the failure that commit diagnoses was still live two commits later. Both skills allow `Bash(node:*)` only, so the old spelling was refused twice over: the variable is empty in a routine, and a bare script path is not a node call. The other six spellings stay. None is run-loaded, `hooks.json` is correct as written — a hook does run as an installed plugin — and `AGENTS.md` documents `${CLAUDE_PLUGIN_ROOT}/skills/<name>/<script>` as the convention, so changing those is its own edit. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_011aKzLHT3FS4ac2Q58TkY6N * fix(loop): the run assigns a Priority, and every skill says so The reviewer reversed commit 3's direction on #118 (comment): the loop assigns a Priority automatically, so a bot-filed ticket never lands without one. Commit 3 resolved the contradiction between `triage-issue` line 57 and its own hard rule by deleting the rule. The reviewer wants it kept and line 57 changed instead. The failure that reversal prevents is the one already counted: nine sessions across five days split three ways over a field nobody could tell them to set, and four tickets landed with no Priority at all — a value the reviewer must now supply by hand on every one. So the ownership paragraph, the two write examples, the checklist and the hard rule now say the single thing: you set both fields, `Medium` when the consequence is not clear. A Priority the reviewer already set still stands — `issue_write` merges, so omitting it keeps their value, and only the raw PUT carries it back. `revise-ticket` sets a Priority where the ticket has none. `answer-ticket` still writes no field, and its reason names the skill that does, not an owner that no longer exists. `cross-repo-issue` returns to its `main` spelling. Gate: `claude plugin validate ./workflow --strict` passed, 21 lib tests pass, `rule-delta.mjs --base origin/main workflow/skills` 63 → 63. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Nwe5te9kXvEt7kqhyew1yK --------- Co-authored-by: sydevs-bot <[email protected]> Co-authored-by: sydevs-bot <[email protected]>
This was referenced Oct 9, 2026
Ardnived
pushed a commit
that referenced
this pull request
Oct 9, 2026
The version string is the installed plugin's cache directory name, so an unchanged one keeps serving the old skills however far main has moved. It has stood at 2.8.1 since #161 while #165 and #167 rewrote 47 files under workflow/skills, workflow/hooks and workflow/lib — every installed copy still runs the pre-#165 skill names. Major, not minor: #165 is `feat(loop)!`, and it renamed or deleted nearly every skill, so an installed copy's command names are gone. The two prior `feat(loop)!` commits each took a major bump — #71 to 1.0.0 and #101 to 2.0.0. Found by Friday's cut-release audit. Claude-Session: https://claude.ai/code/session_0134LSrTLenQog7g9n7TShtV Co-authored-by: Claude <[email protected]>
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.
Fifth of the stack, on #69. This is the flip. Merging it changes what every cloud session does on its next dispatch, so it merges last, in the cutover sequence below — never on its own.
What changes
implement-issuehandler-preflight/handler-journal, resumes an existing branch or PR, refuses only what the dispatcher could not see (Blocked by:/Re-check:in the body), splits aHardticket it cannot finish, cleans up right after the push. No gate table, no revocation, no Stage.finalize-prtriage-issueBlocked by:stays as the cloud-writable input (no(was:)suffix).Re-check: <date>parks a ticket on a date.survey-routineawaitingdrift sweep and the unheard-replies sweep are the dispatcher's. Proposal ceiling is onelabel:proposalsearch. Bookends in cron mode.reflect<!-- tally -->bodies + one comment per session (perPage≤ 20, flagged days only). Signals table rewritten for the event model. New## 📊 Usagesection every week — dispatches per repo/handler, sessions per merged PR, items with ≥3 sessions — with one or two suggestions to the humans. Feedback, never a gate.draft-ticket,cross-repo-issue@sydevs-bot implementcomment, asked explicitly.adversarial-reviewcontext: fork. Bookended. Own-login re-check honoursflags.onDemand. Says why COMMENT-only.survey-deps/-sentry/-analysis/-contractsproposal,awaiting.Re-check:instead of Blocked + Hold Until.handler-preflight,handler-journalREADME.md,AGENTS.mdplugin.jsonUntouched on purpose:
work-routine,preflight,journal,state-machine.yml,loop-config.json(the config-only cleanup PR removeswipCapPerRepo,stateMachine,issueFields.stage/holdUntil,ciPollAttempts,maxWorkItemsPerRun,assignment.bot,journalComment).Rule delta (
node workflow/lib/rule-delta.mjs --base claude/loop-dispatcher workflow/skills)Added 7, removed 5. Each removal, adjudicated:
assignment.reviewerat mark-ready, after CI and the critic (M3). A request at open put unfinished work in the reviewer's queue.implement-issuestep 13 "Touch no state".awaitingsweep and the unblock mention replace it.Triage-issue also loses Never write
Stage: Implement, Never addassignment.bot, Never leave a ticket atBlockedwithout aHold Until, and Never record a blocker only as a Relationship — each folded into "Never write awaiting, blocked, proposal, bot:working, stuck, a Status, or an assignee", "Never authorise work by editing a ticket", and "Never park a ticket without aRe-check:line or aBlocked by:line". rule-delta matched them as rewordings.ste-lint: hard violations equal or lower than the base in every touched file.Cutover sequence (one sitting)
BOT_DISPATCH=off, nothing changes).sydevs-work-hourlyandsydevs-survey-nightly, wait for any in-flight run. The oldwork-routinerunning this PR'sfinalize-prwould leave every PR in draft forever.BOT_DISPATCH=migrating. Run the backfill (migrate-to-status.mjs, dry then--apply). Close the two old-format journal issues.loop-*routines and re-enablesydevs-survey-nightly.BOT_DISPATCH=onon claude-workflow only.@sydevs-bot answer …on a scratch issue, watched end to end. Then orgon.Rollback before step 4:
BOT_DISPATCH=off, re-enable the hourly routine,--restorethe snapshot. After: revert this PR (tagv0.3.1marks the last polling-era plugin).