Repository navigation
feat(loop): handler skills for the event-driven loop (2/4) - #67
Merged
Merged
Conversation
Ardnived
force-pushed
the
claude/loop-scripts
branch
from
September 8, 2026 18:29
ad9178c to
6cec8bf
Compare
Each cloud routine now runs one skill for one item, fired by GitHub Actions with a pointer. Two bookends replace `preflight` and `journal`: `handler-preflight` (identity, validate the record with `payload.mjs`, check the lock, ground from the body, resume on attempt > 1) and `handler-journal` (one comment on the day's journal issue, then release the lock as the last write). Six handlers replace the rungs: - address-review: adopt with a commit or rebut with evidence, per thread; the allowlist re-applied per thread; stacked PR on a human's branch. - fix-ci: one pass on a red run; stale SHA and conflicts stop it. - resolve-conflicts: merge main in, resolve from both sides' intent. - revise-ticket: a deep codebase pass that rewrites the body with file:line approach, criteria and an executable checklist. - split-ticket: the same analysis ending in ordered children, linked by `Blocked by:` lines Actions turns into relationships. - answer-ticket: one reply from source, on a tool grant with no push. Every handler pushes and ends. None waits for CI, marks ready, merges, or writes a label other than its own lock; Actions owns all of that. The prose the rungs proved keeps its wording where it still applies, cited by line in the plan. No running skill reads these yet. `rule-delta`: additions only. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Anchors the new skills cite: actions-observes-classifies-locks-and-fires, the-lock-label-is-the-lease, push-and-end, the-bot-actor-exception, the-payload-is-a-pointer, thirteen-prompts-one-template, awaiting-has-one-writer, the-critic-skips-small-prs, approved-is-the-implement-queue. Each names the measured failure it answers, from the 2026-09-07 audit. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…m the record The handler is a field in the dispatch record and `handlers.<handler>.skill` names the skill, so a routine no longer needs to know which handler it runs. `payload.mjs --attached` refuses a record whose repo is not checked out, which is the per-repo analogue of `--expect-handler`. The why.md story explains what a routine still fixes — the repositories it clones — and what the per-repo shape costs: one model and one tool grant per repo. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…eports usage Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Ardnived
force-pushed
the
claude/loop-handlers
branch
from
September 8, 2026 18:29
b8fc233 to
da84dd3
Compare
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.
Second of four. Stacked on #66; retarget to
mainonce that merges. Adds the eight skills the event-driven routines will run. There is one routine per repo;handler-preflightlearns which skill to follow from the dispatch record (handlers.<handler>.skill), so the routine prompt names no skill. Nothing running reads them:work-routine,preflight,journalandsurvey-routineare untouched, so the hourly and nightly routines behave exactly as before.Design:
~/.claude/plans/let-s-consider-and-create-starry-church.md(rev. 3).What each skill is for
handler-preflightpreflightminus the censuspayload.mjs, then re-read every fact from GitHub. Check the lock before the first write and every push.handler-journaljournalsydevs-dispatch-donemarker and the session URL; release the lock last.address-reviewfix-ciresolve-conflictsrevise-ticketsplit-ticketBlocked by:lines (Actions makes them native).answer-ticketEvery handler pushes and ends. None waits for CI, marks ready, merges, or writes
awaiting/stuck/blocked/an assignee/the draft flag — Actions owns those.Prose that survives verbatim
The revision conditions and the human's-PR steps (work-routine rung 2), the rung-4 table, the worktree rules from #62,
reviews-are-comment-only,you-cannot-push-to-a-humans-pr,respondto-is-an-allowlist. Cited by(why: …)in each file.Verification
claude plugin validate ./workflow --strict— passed.rule-delta.mjs --base origin/main workflow/skills— additions only, none removed.ste-lint.pyon the eight new files — 0 hard violations.docs/why.md#…anchor cited by the new skills resolves (22 anchors, 9 added here).handler-preflight3.8 KB,handler-journal2.8 KB — the two files every fire pays for. Plan targets were 3.0/2.5 KB; the overage is the(why:)citations, kept on purpose.Next: 3/4 additive config (
handlers,dispatch,ci,review.skipWhen, budgets) · 4/4 the dispatcher, dark.2026-09-08 revision. One routine per repo instead of one per handler:
handler-preflightstep 2 reads the record'shandlerand followshandlers.<handler>.skill;docs/why.md#one-routine-per-repo-one-promptrecords why.2026-09-08, later.
docs/why.md#there-is-no-wip-capreplacesapproved-is-the-implement-queue: the human verb is the throttle; the weekly reflect reports usage from the journal tally.