Skip to content

fix(loop): a body is read to disk before it is edited, and the fitter checks the marker - #255

Merged
Ardnived merged 7 commits into
mainfrom
claude/improve-loop-2026-11-15
Nov 15, 2026
Merged

Ardnived merged 7 commits into
mainfrom
claude/improve-loop-2026-11-15

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • A body is read to disk before it is edited. start-run allowed gh for a search only, so
    the only source for a one-line body edit was the issue_read JSON in context. 17 sessions
    across 6 days declined that retype, and 5 bodies shipped stale.
  • budget.mjs --fit answers the marker rule it used to skip — it printed OK on an unmarked
    comment, and two runs posted on that answer.
  • One profile refinement: three PRs asked for a pass over the whole file and the critic raised
    none of them.
  • No ceiling moves, so CLAUDE.md's hard split holds. The reply-budget decision is still
    yours, now with two replies that posted over — see ## 📊 Usage.

Change outline

The read the rule did not have

 start-run  ## Rules that hold in every handler
-- GitHub through mcp__github__*. One exception: a search.
+- GitHub through mcp__github__*. Two reads excepted: a search, and a body.
   …search fallback unchanged…
+- Editing a body starts by reading it to disk: gh api
+  repos/<org>/<repo>/<pulls|issues>/<n> --jq .body > body.md. Edit the file, write the whole
+  file back through update_pull_request or issue_write, then diff a fresh read against it.
+  Neither tool takes a patch, so a body retyped from the thread ships stale or corrupted.

Four lines on a skill read on every dispatch. The story is behind
docs/why.md#a-body-is-read-to-disk-before-it-is-edited, with the measurements.

Four runs had already written this fix and run it against the rule. SahajCloud#1135:
"Read it with gh api repos/sydevs/SahajCloud/pulls/1135 --jq .body, then diffed the readback to
prove it landed. start-run allows gh for a search only, so that read is outside the rule."

Also #1134, #1105 and #1104. The rule was wrong, not the runs: a read is the one thing gh adds
that MCP cannot here, the write still goes through mcp__github__* where the repository scope
lives, and the readback diff is what makes the round trip checkable instead of hopeful.

The fitter that could not say MISSING_MARKER

check() answers MISSING_MARKER before an overage, on purpose — the marker is 124 characters
and they count. fit() applied no marker rule at all, and the CLI did not pass it one. Both now
do, before any cut.

Profile: the reviewer's unit is the file

One dated bullet. Value 1's three readings all count what a diff adds; three PRs this week
asked for a pass over the file as it stands.

Grading last week

The previous reflection is #246, merged
2026-11-08T23:36Z. It shipped one behaviour across four sites.

#246's change Verdict
start-run's GitHub rule gains a projected gh api -X GET search/… fallback for a search Held. The condition arose and the mechanism fired silently. mcp__github__search_* was absent again this week — it is absent in this session — and zero sessions journalled search friction, against it being named on the 5th and 6th distinct day in #246's own week. Two audit nights counted the proposal ceiling with the fallback and named the call without comment: 11-10 "14 open proposals, over maxOpenProposals 10 — search/issues … label:proposal". This run read 7 journal issues, 5 repo PR counts, 55 reviewed PRs and the roadmap set through it
Three sites restating the retired 403 measurement now state it as history Held, same evidence. No run re-tested the proxy or reasoned from the old table
finalize-pr stops naming mcp__github__pull_request_write, which does not exist Held. The condition arose 17 times — every body refresh in the week — and every run reached for update_pull_request, the real name. No session reported an unknown tool. ⚠ What they reported instead is that the real tool takes no patch, which is this PR
What #246 recorded without proposing, re-measured

The body retype, which #246 did not see as a theme, is this PR. Its own week carried it twice
(claude-workflow#246 at 33 KB, SahajCloud#1075 at 20 KB) and it read as tool friction. This week
it appeared 17 times on 6 distinct days and the costs were visible in merged work, so it is
built rather than named. Full counts in ## 📊 Usage.

The proposal ceiling moved for the first time in three weeks — and it is still over. 14 → 11
against maxOpenProposals 10, over it on all 7 days. All five tickets #233 named three weeks
ago are still open and still untouched
: SahajCloud#789 (2026-09-15, now 9 weeks),
SahajCloud#924, SahajAtlasWeb#281, WeMeditateWeb#183, claude-workflow#181. What cleared were
newer ones, and two arrivals this week are incidental findings (SahajCloud#1158, #1148), not
audit proposals. 5 of the 6 audit nights that could file filed no ticket, each naming the
ceiling.

The reply budget did not hold, and this week it broke rather than chafed. #246 measured 6
sessions on 2 days spending 4–5 re-measure passes. This week: 11 sessions on 4 distinct days,
one spending seven drafts ("budget.mjs --kind reviewReply returned OVER six times running",
SahajCloud#1122), and two replies posted over the budget — SahajAtlasWeb#395 at "732 chars
against the 600 budget, and no MCP tool edits a review comment"
, SahajCloud#1128 at "179 chars
over … It stands: ToolSearch for a review-comment update tool returned none."
budgets.notes
(8,000) is the same shape, newly worse: 6 revise-roadmap sessions on 3 days, one taking seven
prune passes to reach 8000/8000, and SahajCloud#1141 posted 1,440 over deliberately, "cutting
further would have dropped ⚠ lines with evidence."
Both designs are #246's, both are ceiling
changes, and this PR carries a skill change — so both stay yours. It is in ## 📊 Usage as a
decision.

The PR merging under a running handler — #246's strongest unaddressed signal — did not recur.
Zero occurrences this week across 101 address-review and 56 review-pr dispatches. One
adjacent case: SahajAtlasWeb#400 merged at 16:30Z four minutes into a fix-ci pass, and that run
read the merge and stopped cleanly. Too early is the honest verdict on the handler gap itself;
the week's volume means the condition had every chance to arise, so this is the second week it
licenses nothing.

git checkout <paths> with no ref: a fourth occurrence, on a fourth distinct day, and still
unshipped.
#246 called it the strongest candidate for this week and offered to ship it on the
word. 11-10 SahajCloud#1102: "git checkout <file> to undo a defect-proving mutation also
reverted that file's real uncommitted change, surfacing two steps later as an unrelated import
error. Copy the file aside instead."
Also 11-12 SahajCloud#1135, where git checkout --theirs
on a merge "silently dropped this branch's own additions to two conflicted docs". The rule is
still written and still not merged — it belongs in implement-ticket, and this PR already
carries two behaviours and a profile edit.

audit-deps re-firing on a declined advisory: resolved, by a merge. SahajCloud#1101 took
happy-dom to ^21.0.4 on 11-10 and pnpm audit --audit-level=high went 2 high → 0. The stale
claude/fix-deps-happy-dom branch was still named as a trap on 11-09 and 11-10; audit-deps ran
once this week and the advisory is gone. No longer a live signal.

securityReview.triggerPattern was wrong again, in the same direction, and is now ticketed
twice.
11-11 SahajCloud#1113: src/plugins/login/ unmatched, so an auth change pushed with no
security review → SahajCloud#1114. 11-13 SahajCloud#1140 and 11-14 #1143: seven admin modules
read with overrideAccess: true and the pattern matches none, so #1147's manager-email read
merged unreviewed → SahajCloud#1153. Both tickets were handed back unstarted, because every
acceptance criterion edits .claude/workflow.json, a protected path. The loop found it, filed it,
and cannot fix it. Three occurrences, three distinct days, and the remedy is two attended
one-line edits.

The Railway token: still too early, second week. railway.tokenEnvVar authenticates nothing,
and no session touched Railway across 21 fix-ci dispatches. This licenses no follow-up and the
token is still unusable.

📊 Usage

315 dispatches, 6 reported failures, 5 anomaly markers, 76 merged PRs of which 56
bot-authored.
Volume 180 → 315, the heaviest week on record, while anomalies fell 16 → 5
and sessions per merged bot PR fell 5.0 → 4.4 (246 PR-item dispatches over 56 merged bot PRs).
address-review per merged bot PR held at 1.9 → 1.8. The machinery scaled; what did not is
the queue in front of a person.

⚠ Four of the six failures are two dead Cloudflare credentials, and 7 fix-ci passes went to
them.
SahajCloud#1082 took six passes across 11-09, 11-10 and 11-11 on
CLOUDFLARE_API_KEY, every one of them concluding "a person's, in Cloudflare". SahajAtlasWeb#383
and #384 took four more on 11-10 on an invalid CLOUDFLARE_API_TOKEN that reddened every CI
run in that repo, human branches included, until SahajAtlasWeb#386 was filed and the token
rotated. The uncomfortable part: the seventh pass fixed #1082 in the repository. The failing
step sent secrets.CLOUDFLARE_API_KEY, the environment variable's name rather than the org
secret's. That run's own friction line reads "The PR body named this check unfixable in the
repository, and it was fixable. Grounding from the body nearly stopped the run before it read the
failing step's secret mapping."
Six passes trusted a diagnosis the body carried; one read the
mapping. No rule proposed — the grounding rule is right, and what this says is that "a person's"
is a conclusion a later pass should still test.

The annotation that would have stopped all seven is half fixed, by the loop. Four runs across
11-10 and 11-11 found that infraFailures in dispatcher/gather.mjs matches ci.infraLabel and
a credential check writes no such annotation, so the dispatcher cannot tell a dead secret from a
code failure. SahajCloud#1129's fix-ci retitled its own repo's annotation so the match
would fire. SahajAtlasWeb's Smoke lane still writes none, and WeMeditateWeb#233 — the
wemeditate-design build reddening Smoke (ladle), two fix-ci passes spent, the log
unreadable without a Cloudflare credential — is open and waiting on a person.

The week's arithmetic, per day, per handler, per repo

Counted from the 7 journal titles and <!-- tally --> blocks, which are the count. All 5
anomaly markers and all 320 session comments were read in full, so the handler, repo and
failure figures are counts; only the per-item session tallies are floors.

Sun 11-08 Mon 11-09 Tue 11-10 Wed 11-11 Thu 11-12 Fri 11-13 Sat 11-14 week
dispatches 10 16 56 110 61 47 15 315
failures in the title 0 1 3 1 0 1 0 6
anomaly markers 0 2 0 0 2 1 0 5
open proposals that night 14 12 14 12 11 — 12 11 now

Per handler, against #246's numbers. address-review 53 → 101, resolve-conflicts
29 → 68, review-pr 44 → 56, implement 17 → 33, fix-ci 13 → 21,
revise-roadmap 9 → 17, revise 6 → 9, audit-nightly 6 → 7, implement-roadmap
1 → 2, audit-deps 2 → 1.

Per repo. SahajCloud 108 → 245, SahajAtlasWeb 42 → 58, WeMeditateWeb 9 → 5,
claude-workflow 7 → 4, SahajAtlasWordpress 14 → 2. The repo figures sum to 314 of 315;
the missing one is Saturday's cron audit, whose marker names no repo.

Anomalies by kind, all 5 read: timed-out 1 (SahajCloud#1093 implement attempt 1, which
finished on attempt 2), ci-capped 1 (SahajCloud#1082), orphan 1 (SahajAtlasWeb#392 orphaned
draft), pending-overdue 1 (SahajCloud#1123, BLOCKED), board-drag 1 (SahajCloud#1145 moved to
Working by hand, derived Pending, reverted). One timed-out in 315 dispatches, against 10 in
180 — no timeout is the binding constraint, and dispatch.timeoutsMinutes is untouched for the
third week.

Merged in the window, by merged_at 2026-11-08..11-15, bot-authored in brackets: SahajCloud
39 (25), SahajAtlasWeb 27 (22), WeMeditateWeb 5 (4), SahajAtlasWordpress 4 (4), claude-workflow
1 (1). 76 (56).

Items with three or more sessions — a floor, from the day lines' top fives:

Planning quality. implement-roadmap ran 2 times (SahajAtlasWeb#388 → #389 and
SahajCloud#1110; SahajAtlasWeb#368 → SahajCloud#1131 and SahajAtlasWeb#393), against 1 last week.
revise-roadmap ran 17 times across 11 goals, against 9. Escalations: 0 —
<!-- sydevs-request {"escalated":true} --> appears nowhere in the window, by search.
Post-plan revisions: 0 — no member sent a child back with revise.

⚠ But the roadmap machinery assumes the loop planned the children, and four times this week it
had not.
Four occurrences, four distinct days, each a different gate:

  • 11-10 SahajCloud#1067 — "An accepted goal cannot be closed by the loop." A verify run had
    promised the reviewer that @sydevs-bot revise would accept two lines and close the goal;
    revise-roadmap allows closing only in verify mode, and the dispatcher fires verify on the
    last child closing alone (dispatcher/decide.mjs:1033, :1144), so it never fires again. The
    run ticked all 15 lines and asked for a manual close.
  • 11-11 SahajAtlasWeb#388 — "The replan route cannot serve a goal whose children a human filed
    by hand."
    decide.mjs:1142 gates replan on planned(s), true only after an
    implement-roadmap run, so the marker would have been discarded.
  • 11-13 SahajCloud#1143 — "Intake reviewed a goal whose children were already building." Three
    @sydevs-bot implement verbs at 15:38, 15:41 and 15:46; the goal was typed Roadmap at 15:48.
    "A review that cannot shape what it reviews can only warn the reviewer."
  • 11-14 SahajAtlasWeb#258 — "verify fired on a bar that lied." Both children were closed, but
    one closed as a duplicate and its PR was abandoned; the actual delivery, SahajCloud#907, had
    no parent. "verify never asks whether the closed children are the delivery."

This clears the recurrence gate and I propose nothing: the shape — whether replan and verify
should serve a hand-planned goal, and whether verify should weigh state_reason — is a design
decision across decide.mjs and two run-loaded skills, not a threshold.

A second theme the loop logged and a human fixed. tests/PERF.md's unit-lane counts and their
three consumer docs conflicted on every SahajCloud PR that added a spec: ~30 resolve-conflicts
runs re-measured them, one calling it "the seventh across the repo" and one "Eighth merge, same
three conflicts."
Every run judged it not a defect and said so; none filed it. Ardnived opened
SahajCloud#1136, "test: cut change amplification in the unit lane", on 11-12 and un-pinned them.
No rule proposed — each run's judgement was defensible, and one of them had written the fix in
its friction line ("a branch could carry the figures in one file and have the other three read
it"
). It is worth knowing that the loop can log a thing 30 times and route it nowhere.

The platform subscribes a handler's own new PR, and tells it to babysit CI. Three occurrences
on two distinct days, each handled correctly and journalled as start-run requires. 11-10
SahajAtlasWeb#349: "No subscribe_pr_activity call was made — the subscription arrived
from="system" on PR open."
11-13 WeMeditateWeb#178, and 11-13 SahajAtlasWeb#404, which was
woken after its unlock for a PR it had opened: "Its body instructs the session to check CI and
stay subscribed until merge, which contradicts finish-run and start-run. Followed the skills,
re-called unsubscribe_pr_activity, wrote nothing, stopped. Worth a dispatcher-side look — every
PR a handler opens will fire this."
The skills won all three times, which is the system working.
Nothing to change here; finish-run already ends with the unsubscribe.

/security-review ignores its scope argument: 6 occurrences, 4 distinct days. It resolves its
own diff as the whole branch — 3.3 MB on SahajCloud#1075, 318 KB and 848 KB on #1082 and #1108,
855 KB on #1125, 5.1 MB on #1104, 238 KB on #1135 — and twice it aborted on
ambiguous argument 'origin/HEAD...' because it runs git in the session's cwd, not the target
repo's. Every run re-scoped by hand through a subagent. It is a Claude Code skill, not ours, so
the candidate is a line in finalize-pr step 3 naming the subagent route. Not shipped: that step
is run-loaded, the workaround is already universal, and this PR carries enough.

finalize-pr step 3's own snippet is refused by the harness. git diff --name-only origin/main...HEAD | grep -E "$PATTERN" — a compound command naming git — was refused in a
worktree session on 11-11 (SahajCloud#1117, #1116, #1124) and 11-12 (SahajAtlasWeb#387), each run
splitting it across two calls. Two distinct days, a one-line fix, and the smallest candidate on
this list.

The routine clone's node_modules, and what it costs a critic. 11 occurrences on 5 distinct
days, all but one in review-pr, and the cost is review quality rather than time: "filed as a
consider instead of an assertion"
(SahajCloud#1127), "the finding rests on the repo's own two
call sites instead"
(#1108), "That finding is stated as a mechanism, not a measured seed"
(SahajAtlasWeb#392), "Named it unverified in the body instead" (SahajAtlasWeb#401). Against
that, the two reviews that did install read Payload's own source and dropped two candidate
findings as wrong
(#1128) and confirmed two load-bearing claims (#1135). start-run step 6
already permits leaving worktreeSetup until a node command needs one, and says such a run "may
assert nothing only node_modules could settle"
— which is exactly what these runs did. So the
rule held; what it bought was weaker reviews. The candidate is review-pr running the install up
front when the diff turns on a dependency's behaviour, and it is a judgement rule on the
second-most-dispatched skill. Named, not shipped.

What the proposal ceiling refused — carried forward, not closed

11 open proposal tickets against maxOpenProposals 10, over it every day of the week, so
5 of the 6 audit nights that could file filed nothing and each named the ceiling. Counted by
search: WeMeditateWeb 5 (#233, #206, #205, #204, #183), SahajCloud 4 (#1158, #1148, #924, #789),
SahajAtlasWeb 1 (#281), claude-workflow 1 (#181). Closing the journals drops the held findings, so
they are here.

  • 11-09, audit-contracts — WeMeditateWeb's atlas fallback is inside a shadow host.
    pages/map/+Page.tsx nests its SSR fallback inside <sahaj-atlas>, which has been a shadow
    host since SahajAtlasWeb#236, so a failed boot shows a blank box and two comments there misstate
    why. A decision, not a patch.
  • 11-10, audit-code · risk / security — nothing security-shaped was filable. SahajCloud's
    public write surface and all three rendered-CMS-HTML sinks hold. Journal-only:
    tests/domains.php:12's group name contradicts its own case at line 28, and SahajCloud .env:23
    names the deleted POST /api/contact-admin.
  • 11-11, audit-sentry — one live warning and a preview leak. Sentry 160176941,
    NotFound: GET /api/meditations/7, production, 2 users, first seen that day — worth a ticket
    only if it persists. And four of the six live SahajCloud issues are Railway PR previews
    reporting into the production project
    (environment: SahajCloud-pr-1108, pr-1105), so
    preview noise is spending the production quota fix(loop): a search falls back to gh, and the PR-body tool gets its real name #246 already flagged.
  • 11-12, audit-code · experience / performance — two measured eager-payload defects in
    WeMeditateWeb
    , both from a real pnpm build. assets/chart.svg?raw (318 KiB) inlines into the
    chunk /pages/[slug], meditations and lectures import statically; stubbing it drops eager JS
    328.3 → 225.0 KiB gzip and the Worker bundle by 329 kB. assets/ornate.svg is a 1397²
    base64 PNG in an SVG shell — 114.0 KiB gzip whenever an OrnateTextBox renders, outside the
    Image srcset pipeline by construction; the same image as WebP is 38.3 KiB at 800px. Both sit
    outside docs(loop): seven dangling why.md anchors, and the base-merge rule's reason #161, which excludes shipped artwork.
  • 11-14, audit-code · hygiene / best-practice research — nothing cleared the bar. Next 16's
    breaking changes are all handled in SahajCloud; both web repos use Tailwind v4 as it asks. Below
    the bar: SahajAtlasWeb is one React major behind its peers (18.3.1 against 19.3.1), and 7
    forwardRef plus 5 react-helmet-async files exist only for that — but the
    @radix-ui/[email protected] patch pin makes the move expensive and no concrete cost
    could be named.
  • Still unfiled from fix(loop): a search falls back to gh, and the PR-body tool gets its real name #246, fix(review-pr): name how to read a file as the branch has it #233 and fix(loop): a PR the reviewer wrote asks nobody for a review, and a refused finding waits in the usage report #212. SahajCloud's monthDay validator gap, the Sentry
    quota, WeMeditateWeb's crawlable /embed duplicates, the 1542-line hand-written OpenAPI shim,
    SahajAtlasWeb's unpinned refusal vocabulary, and fix(loop): a PR the reviewer wrote asks nobody for a review, and a refused finding waits in the usage report #212's seven. They live in those merged bodies.

Two suggestions, each tied to a number

  1. Judge those five proposals, or move the ceiling — third week of asking, and the five have not
    been touched.
    11 open against 10, over it on all 7 days, and 5 of 6 audit nights filed
    nothing
    . SahajCloud#789 is now 9 weeks old; SahajCloud#924, SahajAtlasWeb#281,
    WeMeditateWeb#183 and claude-workflow#181 are five weeks. Three of the five are one
    decision twice over — ci(dispatch): grant the dispatcher pull-requests: write #281 and WeMeditateWeb#183 are both "move the component library to
    Storybook", and feat(loop): the Storybook connector, and the three skills that use it #181 is the connector that serves both. Judging the five puts the queue at
    6, under the ceiling, and five nights of held findings start filing again. The alternative
    is as good: raise maxOpenProposals, and the audits stop idling.
  2. Settle the reply budget. Two replies posted over it this week, and nothing can edit them.
    writing.budgets.reviewReply is 600, of which identity.commentMarker (124) plus the harness's
    mandated _Generated by [Claude Code]_ footer (~58) are ~182 the run cannot cut — 30%.
    11 sessions on 4 distinct days spent 4–7 re-measure passes; SahajAtlasWeb#395 posted
    732/600 and SahajCloud#1128 179 over, both reporting that no MCP tool edits a review
    comment. budgets.notes (8,000) is the same decision: 6 revise-roadmap sessions on 3 days,
    one taking seven prune passes to hit 8000/8000, and SahajCloud#1141 posting 1,440 over
    rather than cut ⚠ lines carrying file:line evidence. Two designs, both yours and both
    unchanged since fix(loop): a search falls back to gh, and the PR-body tool gets its real name #246: stop counting mandated boilerplate in check(), or raise
    reviewReply, comment and notes
    . I built neither — each is a ceiling change, and this PR
    carries a skill change.

Test results

  • Lean gate: ✓ claude plugin validate ./workflow --strict (passed) and node --test workflow/lib/*.test.mjs — 122 tests, 122 pass, up from 119.
  • Also green from a .claude/worktrees/ worktree, as implement-ticket runs it: 122/122.
  • rule-delta.mjs --base origin/main workflow/skills: directives 93 → 93, none disappeared.
    The new rule is not a Never/Always imperative, so the tripwire does not count it — flat is
    the correct reading here, not a no-op.
  • .claude-plugin/marketplace.json parses alongside the bumped plugin.json.
  • Security review: run on the review pass. The diff matches
    securityReview.triggerPattern (workflow/skills/**.md, workflow/lib/), so the step
    applies. The first pass reasoned by hand over the 6 files and ~115 lines, rather than firing
    /security-review, which 6 sessions on 4 distinct days this week found hands back the whole
    branch diff. The address-review pass ran it against the 16 KB branch diff through a scoped
    subagent, which returned no finding at or above its bar. It cleared the two it probed
    hardest: every slot in the new rule's command path is validated by payload.mjs — owner must
    equal org, repo must be in repos, number must be an integer — and no skill anywhere
    stages files broadly, so nothing commits body.md. It confirmed the cutting loop in fit() is
    unreachable with a required marker absent. Its own residual notes are in ## Notes for reviewer.
  • The lean gate re-ran after the four review fixes: validate ✓, 122/122, and 122/122 from a
    .claude/worktrees/ worktree. rule-delta still 93 → 93.

Manual verification

  1. The defect-proving case was watched failing. With origin/main's budget.mjs restored and
    the new tests in place: not ok 9 - fit answers MISSING_MARKER on a kind that requires one, and cuts nothing, 25/26. Restored, 26/26. The other two new cases pass either way — they guard the
    marker surviving a cut and journalEntry staying out of the rule.
  2. The body round trip was run for real. This PR's own body was written to a file, and the
    gh api … --jq .body read the new rule names is the read this run used on #246's 33 KB body
    for ## Grading last week above.

Notes for reviewer

  • Three behaviours, one commit each, because this is the weekly reflection PR and
    improve-loop allows it at most one PR a week and requires a profile edit to ride it. Each
    reverts alone: bd08bc2 the rule, with its docs/why.md section and the sentence it
    falsifies; ecb7e47 the script; 29520bd the profile. No ceiling moves, so CLAUDE.md's hard
    split holds.
  • Four more commits answer the critic's four threads, each still one behaviour: 03dcba1
    takes the stale --fit clause out of docs/why.md and moves the script's eight lines of
    measurement there; 84e431a makes format-ticket's gh count three; 036fcbb has fit()
    ask check() for both pre-cut verdicts instead of copying the guard; 418b39d cuts the
    profile bullet back to its delta. All four adopted — nothing was rebutted.
  • The review body's number was right and mine was wrong. The marker is 124 characters, not
    127, so suggestion 2's unspendable share is 30%, not 31%. Corrected at both sites above.
  • One security note on the new rule. The path it builds takes only the item's own
    coordinates from the dispatch record, never text from a body or a comment, so it adds no
    injection surface the search fallback did not already have — and the body it reads was already
    in the run's context through issue_read. The address-review pass measured the body.md
    footgun and found no trigger: no skill in workflow/skills/** contains git add -A or
    git add ., and finalize-pr pre-flight aborts non-interactively on an unrelated untracked
    file. This run wrote its own body.md to the scratchpad rather than the checkout anyway.
  • Two residual sharp edges in the new rule, both one clause, neither shipped. > body.md
    truncates before gh api runs, so a failed read leaves an empty file and the next step writes
    it back — the rule's own readback diff catches that after the damage, not before. And the search
    bullet directly above carries "never from a title, a body or a comment" where the new bullet
    carries nothing, so nothing on the page stops a future rule feeding a body-derived ref into that
    template. Both are prose on the skill read 25–40 times a day, and neither is a thread's ask, so
    they are journalled under 🧭 Friction instead of widening this PR. Say the word for either.
  • The four lines added to start-run are read on every dispatch, 25–40 times a day. I checked
    the rule is stated nowhere else: pr-template.md's ## Refresh says "Start from the body you
    read"
    and never says how to read it, which is the gap. The story went to docs/why.md.
  • Why no review-pr change, though the profile gate opened on it: the gap is that the critic
    does not run value 1's readings, not that the profile lacks them. More prose describing a
    value already ranked first is what the profile's own rule forbids, and a trigger step belongs on
    review-pr, the second-most-dispatched skill. The bullet states the one thing that genuinely
    was not there — that the file, not the diff, is the unit. If piece-level findings recur against
    a whole-file ask next week, that step is the single change I would bring.
  • Dismissed, with reasons: dispatch.timeoutsMinutes (one timed-out in 315 dispatches);
    ceilings.maxProposalsPerSurvey (the binding constraint is maxOpenProposals, and lowering the
    per-survey cap would slow filing further); a rule about credential failures (the dispatcher-side
    infrastructure-failure annotation is the real fix and the loop has already shipped half of it
    in SahajCloud).
  • The half of the body gap this does not reach: issue_read method:get takes no field
    projection, so start-run's lock re-check pays the whole body each time — "about 15k tokens per
    check, and the rule asks for one before the first write and one before every push"

    (SahajCloud#1088, 30 KB body, 2026-11-10). That is the MCP server's to fix, not a rule's, and it
    is recorded in docs/why.md.
Detail

How this week was read. All 7 open journal issues, their titles and <!-- tally --> blocks,
and all 320 session comments across 16 pages at perPage: 20 — so unlike the last three weeks
the handler, repo, failure and friction figures are counts rather than floors. 55 bot PRs carry an
Ardnived review in the window; the reviewer's own text was read in full on SahajCloud#1123, #1147
and #1149, the three that decided the profile bullet, and through the address-review journal
entries elsewhere.

One rule this run broke, and journalled. The seven journal bodies and #246's body were read
with gh api repos/… --jq .body before this PR's rule existed, which start-run permitted for a
search only. It is the same read the rule now names, which is how the gap was found, and it is
under 🧭 Friction in tonight's entry.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Mg9rjVYq85mEWKCuZu72hw

`update_pull_request` and `issue_write` both replace a body whole, and no MCP
read puts one in a file. `start-run` allowed `gh` for a search only, so the
only source for a one-line edit was the `issue_read` output already in context
— a 20 KB body re-emitted by hand, with no gate to catch a dropped character.

17 sessions across 6 days reported that retype in the week to 2026-11-14, and
mostly declined it. SahajCloud#1082's stale `⚠` survived a third flagging,
#1075 kept naming two snapshot migrations where there were three, #1155's
ToggleGroup block still described pre-merge code, and three joined changes
shipped with no `## Summary` bullet the join rule requires. One run moved code
rather than correct a ticket criterion reading 302 against a 307, because the
ticket body was 30 KB.

Four runs had already found the fix and run it against the rule: read with
`gh api … --jq .body`, edit the file, write the whole file back through MCP,
diff the readback. SahajCloud#1135 said so outright — "that read is outside
the rule". The rule was wrong, not the runs. A read is the one thing `gh` adds
that MCP cannot here; the write still goes through `mcp__github__*`, where the
repository scope lives, and the readback diff makes the round trip checkable.

`docs/why.md` carries the story and the measurements, and loses the sentence this
falsifies: the GitHub-API section closed by calling the `gh` fallback a search
"and nothing else".

Bumps `version` to 5.6.0, the cache key a `workflow/**` change must move.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVYq85mEWKCuZu72hw
`check()` answers `MISSING_MARKER` before it answers an overage, because the
marker is 127 characters and they count. `fit()` never applied the rule at
all, and the CLI did not even pass it the config's `markerRequired`. So
`budget.mjs --fit --kind comment` printed `OK` on a comment carrying no
`identity.commentMarker` — the one answer start-run says it cannot give.

Two runs read that `OK` on 2026-11-12 and said so: SahajCloud#1127 ("a run
that only fits can post unmarked") and #1135 ("start-run says it answers
MISSING_MARKER until the marker is there").

`fit()` now takes the same marker options as `check()` and answers
`MISSING_MARKER` before cutting anything, so a body is never cut to a length
that is 127 characters short of what will be posted. `journalEntry` is outside
`markerRequired`, so `finish-run`'s own call — the one documented caller — is
unchanged, and a test pins that.

The first of the three new cases fails against the unfixed script; the other
two guard the marker surviving a cut and the journal path staying put.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVYq85mEWKCuZu72hw
Value 1's three readings all count what a diff introduces. Three PRs in one
week asked instead for a pass over the whole file, including code the diff
never touched, and the adversarial review raised none of them.

SahajCloud#1123: "Look at this file as a whole and find opportunities to
streamline and simplify this code" — the review had posted three findings,
each on a piece. SahajCloud#1149: "Review this file and ensure it is as
resilient as possible against future PayloadCMS updates." SahajCloud#1147:
"Review this entire file, can we reduce the custom CSS at all by relying on
Payload built-ins", beside a second ask to generalise its styles for tables
elsewhere — where the review had raised one finding, a correctness one.

Stated as the value behind them rather than the three remarks: a diff that
grows a file materially makes that file the unit, so value 1's questions are
asked of all of it, and a pass that finds nothing still reports.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVYq85mEWKCuZu72hw
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 15, 2026
@sydevs-bot

sydevs-bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 08:34Z address-review · attempt 1 · session · done
  • 08:34Z address-review · attempt 1 · session
  • 08:24Z review-pr · attempt 1 · session · done
  • 08:24Z review-pr · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@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

Three commits, three behaviours, each separately revertable and named in the body — CLAUDE.md allows that, and no ceiling moves, so the hard split holds. Every test-results claim re-ran clean here: validate ✓, 122/122, rule-delta 93 → 93, and not ok 9 at 25/26 against origin/main's budget.mjs, so the defect is proven rather than asserted. Nothing in the diff is bigger than the gap it closes.

What it does not do is follow its own rules outward. Both should-fixes are one shape: a sentence elsewhere that this change falsifies, in a file a later run reads instead of this one. Separately, "the marker is 127 characters" is 124 in check() and in docs/why.md: suggestion 2's unspendable share is 30%, not 31%.

Findings

  • should-fix — docs/why.md:657 still says --fit never checks the marker · budget.mjs:120
  • should-fix — format-ticket still enumerates two gh exceptions, now three · start-run/SKILL.md:75
  • consider — the marker guard is check()'s, written twice · budget.mjs:165
  • consider — half the new profile bullet is review-pr's gather step 4 · reviewer-profile.md:198

What was checked

Read whole: budget.mjs, budget.test.mjs, start-run/SKILL.md, reviewer-profile.md, format-ticket's tooling section, pr-template.md's ## Refresh, docs/why.md 481–660. Ran the lean gate from a detached worktree, then again with origin/main's budget.mjs to watch test 9 fail. Ladder: the new options parameter mirrors check()'s exactly, so no new shape. Every --fit caller is finish-run's journalEntry, so the fix is a no-op for shipped callers and its test is its only exercise. Not checkable here: access is scoped to claude-workflow, so the SahajCloud citations are taken as written.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread workflow/lib/budget.mjs Resolved
Comment thread workflow/skills/start-run/SKILL.md Resolved
Comment thread workflow/lib/budget.mjs Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 15, 2026
`docs/why.md#the-marker-check-belongs-in-the-script` still read "which is
also why `--fit` never checks". That is the design record for the rule
ecb7e47 changed, so it stated the opposite of the code — the exact
failure the sibling commit fixed at its other site.

The story moves with it. The eight lines of measurement in `fit()`'s doc
comment now live in the why.md bullet, behind the anchor the script
already cites, and the script keeps the one-sentence statement. Three
homes, no overlap: the value in loop-config.json, the rule in the
script, the story in docs/why.md.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVRYagyMWsBhMMkbmp
`format-ticket` is titled "`gh` for two things" and enumerates exactly
two under "Every GitHub operation in a handler uses `mcp__github__*`".
bd08bc2 added a third to `start-run` and left this count at two. Every
skill that edits a ticket body loads this file, so this is where a run
reads how many exceptions there are.

Names the body read as the third, and drops "a raw body read" from the
attended-local sentence below it — that read is no longer attended-only,
and leaving it there says the opposite of the new rule.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVRYagyMWsBhMMkbmp
ecb7e47 gave `fit()` its own copy of `check()`'s marker guard, condition
for condition, and `fit()` already carried a second copy of the
unbudgeted-kind guard. `docs/why.md` calls the `markerRequired` polarity
"worth revisiting", so that edit would have landed in two places.

`fit()` now calls `check()` and returns its verdict for both refusals,
rewriting only the verb it tells a caller to repeat. Behaviour is
unchanged: 26/26, including the case that proved the defect, and the CLI
prints the same three verdicts with the same reasons.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVRYagyMWsBhMMkbmp
"read the file whole" is `review-pr/SKILL.md` gather step 4 already, so
29520bd told a file read on every review dispatch — 56 last week — a
rule it had just been told. The reviewer's own objection to that is
quoted two sections above: "this re-explanation is adding extra load to
our documentation" (#247).

Points at the gather step and keeps the clause that is new: ask value 1's
questions of the parts the diff did not add. No rule leaves the plugin —
`rule-delta` holds at 93.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVRYagyMWsBhMMkbmp
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Four critic threads, four commits, all adopted.

  • why.md:657 — 03dcba1. The stale --fit clause goes.
  • format-ticket:9 — 84e431a. Counts three, names the body read as the third.
  • budget.mjs:165 — 036fcbb. fit() asks check() for both pre-cut verdicts, so the polarity is written once.
  • profile:198 — 418b39d. Points at gather step 4, keeps only the delta.

The review body's number was right, the PR body's wrong: the marker is 124 characters, not 127, so suggestion 2's unspendable share is 30%. Corrected.

Gate: validate ✓, 122/122 (worktree too), rule-delta 93 → 93. /security-review found nothing at its bar; its two residual notes on the new rule are in the body.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 15, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review November 15, 2026 08:50
@sydevs-bot
sydevs-bot requested a review from Ardnived November 15, 2026 08:50
@sydevs-bot sydevs-bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 15, 2026
@Ardnived
Ardnived merged commit 0dac97c into main Nov 15, 2026
61 of 66 checks passed
@Ardnived
Ardnived deleted the claude/improve-loop-2026-11-15 branch November 15, 2026 17:58
@sydevs-bot sydevs-bot moved this from Awaiting to Done in SYDevelopers Technical Roadmap Nov 15, 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.

3 participants