Skip to content

fix(loop): the journal stops repeating itself, and the unlock names the method that works - #95

Merged
Ardnived merged 6 commits into
mainfrom
claude/anomaly-says-itself-once
Sep 13, 2026
Merged

Ardnived merged 6 commits into
mainfrom
claude/anomaly-says-itself-once

Conversation

@sydevs-bot

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

Copy link
Copy Markdown
Contributor

Sunday's reflect, over 2026-09-06 18:00Z → 2026-09-13 08:00Z — the window since #55 merged. Eight journals: 22 hourly runs, then 138 dispatches. The architecture changed mid-window (#71 landed Tuesday 22:27Z), so Mon–Tue are the old loop's runs and Wed–Sat are the dispatcher's dispatches. Those are not the same unit, and nothing below adds them.

Grading last week

#55 made one change: writing.budgets.journalComment 2500 → 4000, so the journal's relief valve existed again on a twelve-run day.

Change Verdict
journalComment 2500 → 4000 Did not hold — then the failure was designed out. It bound again the next working day, at the new number: Tuesday's journal #64 reads "journalComment (4000) cannot hold the day — 13th. At 21:03 --fit emptied 📄 Did for the whole day: 5 lines dropped, and this run's 3 never fitted." Monday #60 is the same, 5th day. Two for two on the days it could still apply. #71 then made the journal one comment per session, budgeted by journalEntry, and the failure has not appeared since — 0 occurrences across Wed–Sat

The model behind #55 was wrong, and the lesson is not a bigger number. It treated a day's record as one document that had to fit one budget, and argued 4000 from the worst day so far. The worst day so far is not a bound — Saturday ran 56 dispatches. Per-session comments removed the ceiling instead of raising it.

writing.budgets.journalComment now has no reader but workflow/skills/journal/SKILL.md, the legacy skill, and docs/cleanup.md already lists it for removal. Deliberately not touched here. No budget change rides this PR.

📊 Usage

Wed–Sat carried tallies. Thursday's is empty because nothing ran.

Wed 09-09 Thu 09-10 Fri 09-11 Sat 09-12 total
dispatches 52 0 30 56 138
anomaly comments 28 37 41 24 130
sessions reporting a failure 1 — 0 0 1

Per handler (Wed+Fri+Sat): address-review 52 · implement 25 · adversarial-review 25 · fix-ci 15 · resolve-conflicts 12 · revise 4 · answer 3 · survey-nightly 2.

Per repo: SahajCloud 120 · SahajAtlasWordpress 6 · SahajAtlasWeb 5 · WeMeditateWeb 4 · claude-workflow 3. SahajCloud is 87% of the week.

138 dispatches → 24 merged bot PRs = 5.8 dispatches per merged PR. Last week's number is not comparable: #55 counted 56 hourly runs over seven days, each doing several items.

Items with three or more sessions, from the days' top-five lists — so this is a floor, not a census: SahajCloud#742 ×6, #744 ×6, #746 ×6, #769 ×5, #765 ×5, #774 ×5, #752 ×4, #763 ×4, #644 ×4, SahajAtlasWeb#205 ×4, #755 ×3, #768 ×3.

address-review is 38% of all dispatches, and review arrival is why. On SahajCloud#774 your eight comments arrived in three waves — 19:01–19:04, 19:28–19:32, then a CHANGES_REQUESTED body — and the PR drew five address-review sessions that evening. #761 drew three the same way. Each wave is a whole session: clone, install, read the diff, run the gate, push.

Two suggestions, each tied to a number. Neither is a rule, and neither is a cap:

  1. Send one review, not three. #774's three waves cost 5 sessions; the same eight comments in one review would have cost 1 or 2. At 5.8 dispatches per merged PR, batching review comments is the biggest single lever on the week's volume, and it is entirely yours.
  2. SahajCloud#754 has been red and orphaned since 2026-09-10. It has consumed 30+ ci-capped and 12+ orphan journal comments and cannot move without you — fix-ci is capped at 3 attempts. One decision closes it. The noise half is fixed below; the stuck PR is not.

Not a constraint this week: 1 open proposal against maxOpenProposals 10, and 24 bot PRs merged in four days. Review capacity was not the bottleneck.

The changes

Four behaviours in six commits — three shipping, three adopting the review below. Each reverts alone. No ceiling change rides this PR, so CLAUDE.md's hard split holds. The first two belong together because they are one story — the journal repeats itself — and the journal is what reflect reads. Commit 6 is the third chapter of that story, added at your request.

1. fix(loop): an anomaly says itself once a day

The failure. Thursday 2026-09-10 posted 44 comments and ran zero sessions. Forty-three were dispatcher anomalies, and they carried eleven distinct facts. On Saturday, 22 of 25 anomaly comments were two facts about one PR.

The cause is half a guard. Every emitter pairs commentOnce on the item — keyed, skips a repeat — with postAnomaly on the journal, which posted unconditionally (apply.mjs:191, :204; decide.mjs:161, :351). So SahajCloud#754 carries one ci-capped comment on the PR and 30+ across the journals. sweep-orphan re-runs evaluatePr, so a stuck PR spends three comments a pass rather than one — the ci-capped, ci-capped, orphan triple visible at 08:04, 12:17, 15:43, 18:05, 20:46 and 22:50 on Saturday.

Thu Fri Sat
ci-capped · SahajCloud#754 12 12 16
orphan · SahajCloud#754 6 6 6
attempts-exhausted 25, over 9 items 14, over 9 items —
distinct facts 11 ~11 3

Why it earns a change. Not the API calls. The journal is reflect's only input, and a title reading 37 anomalies when eleven things are wrong has destroyed the number a reader decides on. tallyFrom inherits the same inflation. #55 already recorded a recurrence count it could not compute because the journal had eaten it — this is the same wound from the other side.

postAnomaly now skips a line today's journal already carries. The key is the visible line, not the marker: same kind, same item, one fact — however many dispatch ids produced it. A changed reason (different failing checks, a later attempt) is a new line and still posts. A listing it cannot read falls through to posting, because a duplicate beats a silence. refreshTally and the new read now share one page loop.

Gate. node --test dispatcher/test/*.test.mjs → 66 pass. The regression spec was watched failing against the unguarded post, at the next sweep says nothing (expected false, actual true), while its three sibling assertions stayed green.

2. fix(loop): the unlock reads a PR's labels with method:get

get_labels cannot resolve a PR number; method:get returns the same labels. handler-journal's unlock step said only "Read the item's labels", so sessions reached for the obviously-named tool and recovered by hand — 36 times on Saturday, 21 on Friday, and again on Wednesday. It is the most repeated friction line of the week by a wide margin, on roughly 65% of all PR-handler sessions.

Every one recovered, so this costs no unlocks. What it costs is the friction line each session then spends, inside a budgeted entry, on a fact the skill could state once. get_labels appears nowhere in workflow/ — naming the method that works is the whole fix. Nine words, in the sentence that already names the read.

version → 1.2.1: a skill change, and the installed plugin's cache is keyed on it.

3. docs(review): the critic's own suggestions pay the same rent

Profile edit, gated on three distinct PRs in the window, all drawing one answer — and on #761 this review caused the problem it should have caught:

  • #761 — this review asked for an in-process dedupe window to bound Sentry volume. The author built it. You deleted it: "Drop the dedupe window… no other fancy features like deduping."
  • #765 — the review argued how to build a cross-locale read redaction (blunt shape vs reusing the field walk) and never asked whether it should exist. You removed it whole: "not sensitive… an unnecessary complication which could create more issues for us going forward."
  • #774 — the review passed a defaulting wrapper clean. You: "This whole function is a completely useless and unnecessary indirection."

Written at the level of the value, not the incidents: this is profile value 1 applied to guards rather than layers. A defence against a harm nobody has measured is permanent code, and you would rather carry the risk. Two actionable rules follow — weigh whether a protection should exist before arguing its shape, and never propose machinery against a harm you have not counted.

rule-delta.mjs --base main workflow/skills: 84 → 85 directives, one added (never propose machinery against a harm you have not counted), none dropped. claude plugin validate ./workflow --strict passes.

4 and 5. Adopted from the adversarial review

Two commits, each answering one thread. Neither adds behaviour.

  • fix(review): the rule carries its own qualifier (7f74e4f). The imperative above read never propose adding machinery this review would flag in the author's diff, and the bound that makes it true — a harm nobody has measured — sat only in the sentence before it. Read alone, the imperative banned proposing any bound, commit 1's included. The qualifier now sits inside it. rule-delta: still 84 → 85, one added, none dropped. thread
  • docs(loop): the guard's story lives next door, not twice (b79836d). postAnomaly's doc comment retold docs/why.md#an-anomaly-says-itself-once-a-day in six lines while citing it on the last one. Three lines now: the rule, the one contract a caller needs, and the citation. 66 tests pass. thread

6. fix(loop): a quiet awaiting item is swept in silence

The third thread asked whether skipping an awaiting item with no new activity would remove the repetition at its source, instead of guarding the last emitter. It was left open as a decision. You answered: go ahead, and define "new activity" yourself. 27409f4.

What commit 1 did not fix. SahajCloud#754 is capped and already labelled awaiting, yet every sweep pass still re-derived it and still wrote — a label call, a commentOnce call, an anomaly call — 48 passes a day, for a condition no pass can clear. Commit 1 deduplicated three of those downstream. The label was not deduplicated at all.

New activity needs no definition of its own, because awaiting already carries one. The label is the dispatcher's record that it has said everything it has to say, and every way to clear it — a comment, a review, a push, a verb — is an event the dispatcher already wakes on. So a sweep pass that finds awaiting still on and derives no move has, by construction, found the state the last pass left. It runs the derivation and drops the plan.

The gate is on the plan, not on the fetch. sweep-pr still gathers, because gathering is the only thing that sees a resolved review thread or a write the dispatcher was refused, and neither fires a workflow. Both surface as a move — fire, merge, markReady, recheck — so they pass the gate and act. What stops is the writing. The gate is scoped to sweep-pr and sweep-orphan alone: an event is new activity, and every event path clears awaiting before it derives.

Gate. node --test dispatcher/test/*.test.mjs → 70 pass. Four new specs; the three that assert the gate were watched failing against the unguarded decide.mjs, while the fourth — a sweep on an item without awaiting is never silenced — stayed green as the control. claude plugin validate ./workflow --strict passes. rule-delta: unchanged at 84 → 85, none dropped — this commit touches no skill.

Observed, named with its count, and deliberately not acted on

Each of these is real. None ships here — four behaviours is already past the limit, and several want a decision rather than a patch.

  • /pr-review-toolkit:review-pr is absent in every routine session — 4 days (Tue, Wed, Fri, Sat; ≥6 sessions). finalize-pr step 2 has never run in the cloud. Either the step is wrong or the plugin is missing, and that is a decision, not a typo.
  • CLAUDE_PLUGIN_ROOT is unset in a routine, so handler-preflight step 2's literal command cannot run — 3 days, ≥7 sessions. It resolves to /lib/payload.mjs or /home/user/claude-workflow/SahajCloud; the checkouts sit at /home/user. Every session worked it out by hand. This is next week's strongest candidate — preflight is read on every dispatch, and its step 2 is wrong as written.
  • A fresh checkout ships no node_modules — 3 days, ≥8 sessions, 20s–2min each before any gate can run. worktreeSetup names the command; nothing runs it.
  • Two sessions held one lease and did the same work — 2 days. SahajCloud#763 (Fri 05:38 and 05:39; one push, one rejected non-fast-forward) and #755 (Sat 16:22, same shape). Both recovered, neither lost work. A lock defect deserves more evidence than two before anyone touches the lease.
  • /security-review aborts on git log origin/HEAD... in a fresh clone — 3 days. git remote set-head origin main fixes it.
  • Railway preview discovery cannot run in a routine — 2 days: get-railway-preview-url.ts needs GITHUB_TOKEN. Four PR bodies say "preview pending".
  • Opening a PR auto-subscribes the session to PR activity — 2+ days. Correctly refused and unsubscribed each time. handler-preflight forbids subscribing and says nothing about a subscription it did not ask for.
  • adversarial-review/SKILL.md names three review tools that do not exist — Sat, 1 session, recovered. One occurrence.
  • journal.titleFormat has zero readers. journal.mjs:23 hardcodes the format, and the config value still reads <n> runs · <n> failed · <n> ceiling stops while every title says dispatches · failed · anomalies. Saturday's survey flagged the contradiction. Dead config, one occurrence — and deleting it is a loop-config.json edit that should not ride a skill change.
  • migrate:create exits 0, not 124, on drizzle's rename prompt — Sat, 2 sessions. src/migrations/AGENTS.md's outcome table reads a blocked run as "no changes". Belongs to SahajCloud.
  • You wrote three naming comments on #774 (failedAttempts, routingProbe, routing). The profile says naming is "near-absent — do not manufacture findings here". One PR is weather, so the profile is unchanged. If a second PR draws naming comments next week, that entry needs rewriting.

Closing the week's journals

Closed after this PR opened: #77, #91, #92, #93. Today's #94 stays open — tonight's entry goes on it.

🤖 Generated with Claude Code

https://claude.ai/code/session_0192kzsLSe59mBUrHM1hqrVD

Every anomaly emitter pairs `commentOnce` on the item — keyed, skips a
repeat — with `postAnomaly` on the journal, which posted unconditionally.
So a condition no sweep pass can clear left one comment on the PR and one
journal comment per pass, forever.

Thursday 2026-09-10: 44 journal comments, 0 sessions, 11 distinct facts.
SahajCloud#754 alone spent 12 `ci-capped` and 6 `orphan` lines that day,
22 of Saturday's 25, and was still being re-reported four days on.

The journal is reflect's only input, so the inflation lands on the survey
that has to count. A title reading "37 anomalies" for eleven problems has
lost the number that mattered.

`postAnomaly` now skips a line today's journal already carries. The key is
the visible line, so the same kind about the same item is one fact however
many dispatch ids produced it, while a changed reason still posts. A
listing it cannot read falls through to posting: a duplicate beats a
silence. `refreshTally` and the new read share one page loop.

Regression spec watched failing against the unguarded post.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0192kzsLSe59mBUrHM1hqrVD
`get_labels` cannot resolve a PR number — "Could not resolve to an Issue
with the number of N" — while `method:get` returns the same labels. The
unlock step said only "read the item's labels", so sessions reached for
the obviously-named tool and recovered by hand, every time.

Counted in the journals: 36 sessions on Saturday, 21 on Friday, and again
on Wednesday. Every one recovered, so the cost is not a failed unlock —
it is the friction line each of them then spent, in a budgeted entry, on
a fact the skill could have stated once.

Nine words, in the sentence that already names the read. `get_labels`
appears nowhere in `workflow/`, which is why naming the working method is
the whole fix.

`version` → 1.2.1: a skill change the installed plugin's cache is keyed on.
rule-delta: 84 → 84 directives, none dropped.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0192kzsLSe59mBUrHM1hqrVD
Recurrence gate opened on three PRs in the window, all one answer from the
reviewer, and one of them is the review's own doing:

- #761 — this review asked for an in-process dedupe window; the author
  built it; the reviewer deleted it: "no other fancy features like
  deduping."
- #765 — the review argued blunt shape versus reusing the field walk for
  a cross-locale redaction, and never asked whether it should exist. The
  reviewer removed it whole as "an unnecessary complication."
- #774 — the review passed a defaulting wrapper clean. The reviewer: "a
  completely useless and unnecessary indirection."

Written at the level of the value, not the incidents: value 1 applied to
guards rather than layers. A defence against an unmeasured harm is
permanent code, and they would rather carry the risk. The two rules that
follow are the actionable half — ask whether a protection should exist
before arguing its shape, and never propose machinery this review would
flag in the author's diff.

Not edited for naming, though the reviewer wrote three naming comments on
#774. One PR is weather, and the profile's "rarely flag" entry stands
until a second.

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

sydevs-bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 16:40Z address-review · attempt 1 · session · done
  • 16:40Z address-review · attempt 1 · session
  • 08:28Z address-review · attempt 1 · session · done
  • 08:28Z address-review · attempt 1 · session
  • 08:19Z adversarial-review · attempt 1 · session · done

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 counted failures, 144 lines. Nothing here is bigger than its evidence. Each commit reverts alone, and no ceiling change rides along.

I re-ran the gates on 30a63a8: 66 tests pass, rule-delta reads 84 → 85 with nothing dropped, plugin validate --strict passes. Journal #93's two 08:04 ci-capped comments are byte-identical, so the new guard collapses them.

Weigh one thing: the new profile rule is broader than the paragraph justifying it, and commit 1 is the machinery it forbids proposing.

Findings

  • should-fix — reviewer-profile.md:145: the imperative drops its own "harm nobody has measured" qualifier.
  • consider — journal.mjs:151: the doc comment retells the why.md section it cites.
  • consider — journal.mjs:164: the last emitter is guarded, the re-derivation feeding it is not.

What was checked. Full diff against main. journal.mjs and markers.mjs whole. Every postAnomaly call site. dispatcher.yml's concurrency group — per item, so same-item posts stay serialised.

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


Generated by Claude Code

Comment thread dispatcher/journal.mjs Resolved
Comment thread dispatcher/journal.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 Sep 13, 2026
sydevs-bot and others added 2 commits September 13, 2026 08:31
The new profile imperative read "never propose adding machinery this
review would flag in the author's diff". The qualifier that bounds it —
a harm *nobody has measured* — sat only in the sentence above, so the
imperative alone banned proposing any bound at all. Commit 1 of this
same PR is a dedupe against a harm counted three ways (44 comments, 11
facts, 30+ repeats on one PR); under the rule as written this review
could not have asked for it.

The qualifier now sits inside the imperative: never propose machinery
against a harm you have not counted. CLAUDE.md requires an instruction
to survive inline as an imperative, and this one did not.

rule-delta --base main: 84 → 85, one added, none dropped.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Nm9Uprx7GDQ2AVxEXs4QuG
postAnomaly's doc comment retold docs/why.md#an-anomaly-says-itself-once-a-day
in six lines while citing it on the last one. CLAUDE.md puts the rule in
the code and the story in why.md, once each.

Three lines now: the rule (the key is the visible line, so one fact is
one comment a day), the one contract a caller needs (a changed reason is
a new line), and the citation. The catch below already documents the
fall-through in place.

node --test dispatcher/test/*.test.mjs → 66 pass.

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

Copy link
Copy Markdown
Contributor Author

Adopted two, left one open. Pushed b79836d.

  • Adopted — the profile imperative now carries its own bound: never propose machinery against a harm you have not counted (7f74e4f). Read alone, the old wording banned proposing any bound, commit 1's included. thread
  • Adopted — postAnomaly's doc comment stopped retelling the why.md section it cites (b79836d). thread
  • Open — whether the sweep should skip an awaiting item with no new activity, instead of guarding the last emitter. A second behaviour, and it must define "new activity". Yours to settle. thread

Gates on b79836d: 66 tests pass · rule-delta 84 → 85, none dropped · plugin validate --strict passes. Docs checked, nothing stale. Body refreshed.

🤖 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 Sep 13, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review September 13, 2026 08:36
@sydevs-bot
sydevs-bot requested a review from Ardnived September 13, 2026 08:36
@sydevs-bot sydevs-bot added awaiting bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed awaiting labels Sep 13, 2026
Guarding postAnomaly stopped the journal repeating itself, not the
repetition. SahajCloud#754 is capped and already labelled awaiting, yet
every sweep pass still re-derived it and still wrote — a label call, a
commentOnce call, an anomaly call — 48 passes a day for a condition no
pass can clear. Three of those were deduplicated downstream. The label
was not deduplicated at all.

New activity needs no definition of its own, because awaiting already
carries one: awaiting is the dispatcher's record that it has said
everything it has to say, and every way to clear it — a comment, a
review, a push, a verb — is an event the dispatcher already wakes on. So
a sweep pass that finds awaiting still on and derives no move has found
the state the last pass left, and drops the plan.

The gate is on the plan, not the fetch. sweep-pr still gathers, because
gathering is the only thing that sees a resolved review thread or a
refused write, neither of which fires a workflow. Both surface as a move
— merge, markReady, fire — so they pass the gate and act. What stops is
the writing.

Adopted from the review on #95, which asked the question and left the
definition of new activity to me.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01S6Jtm76L9jwJaKtBKuwsp1
@sydevs-bot sydevs-bot changed the title fix(loop): an anomaly says itself once a day, and the unlock names the method that works fix(loop): the journal stops repeating itself, and the unlock names the method that works Sep 13, 2026
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Built the behaviour you approved. Pushed 27409f4.

  • Adopted — a sweep pass over an item already labelled awaiting drops its plan unless the derivation moves it. Label, commentOnce and anomaly all stop. thread

New activity, as you asked me to define it. awaiting already carries the definition. It is our record that we have said everything we have to say. Every way to clear it — a comment, a review, a push, a verb — is an event we already wake on. A pass that finds it still on and derives no move has found last pass's state.

The gate is on the plan, not the fetch. sweep-pr still gathers, so a resolved thread still surfaces as a move and passes. Only the two sweep rows are gated. An event is new activity.

Gates: 70 tests pass, was 66. Three of four new specs were watched failing unguarded, the fourth green as a control. plugin validate --strict passes. Title and body refreshed.

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


Generated by Claude Code

@sydevs-bot sydevs-bot added awaiting and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Sep 13, 2026
@Ardnived
Ardnived merged commit 433d19e into main Sep 13, 2026
16 checks passed
@Ardnived
Ardnived deleted the claude/anomaly-says-itself-once branch September 13, 2026 16:55
@sydevs-bot sydevs-bot moved this from Revising to Done in SYDevelopers Technical Roadmap Sep 13, 2026
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]>
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