Skip to content

skills: review drafts before posting, and keep running-in-ci to what every session needs - #1263

Merged
max-sixty merged 10 commits into
mainfrom
review-before-post
Sep 17, 2026
Merged

max-sixty merged 10 commits into
mainfrom
review-before-post

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 17, 2026 •

Copy link
Copy Markdown
Owner

Tend composes a comment, runs the link checker and a duplicate re-fetch, and posts it. Nothing reads the draft as its reader would. On max-sixty/worktrunk#4149 the bot posted six unstructured paragraphs, with its disposition last, even though its session had loaded Reader-facing prose. It had loaded that guidance dozens of turns before composing, and nothing brought it back at the moment of posting. #1157 also removed every length and shape cue from the comment guidance. This PR adds a draft review, restates the prose goal, and moves running-in-ci/SKILL.md text that most sessions never act on to where it is used.

What changes

  • Draft review before posting (references/posting.md). A short reply gets a read-through. A body that carries an analysis gets a read without the working context that wrote it. The harness picks how that read happens.
  • Reader-facing prose (running-in-ci/SKILL.md) now states the goal: concise, helpful, easy to digest, with <details> as the way deeper. Lists, headings and <details> are offered as tools, not a required shape.
  • Token cost vs. runner time. Tend's CLAUDE.md no longer files agent sessions under compute that "costs cents": runner time still needs a simple knob, and token spend is a cost skill and workflow design keeps to what the work needs. This stance lives in CLAUDE.md only, not in bundled guidance. review-reviewers' Cost discipline keeps its goal without the five-step subagent pattern, and resolve-conflicts says to consider one subagent per PR.
  • running-in-ci/SKILL.md keeps only what every session needs (205 → 174 lines):
    • Weighing a Fix is removed. ci-fix, review, and review-gates.md Gate 3 each now carry its evidence test (waste recurring across days) and knob test (one setting in one place) where they apply them.
    • Scripts over prose recipes moves to references/skill-pr-workflow.md.
    • Other Repos and Learning from Feedback duplicated their References rows and are gone. Their citations point at the reference files.
    • Multi-way Conversations, Self-conversation Guard, and PR Review Comments move into Read Context, next to the other decisions a session makes before starting work.
  • The re-evaluation skills: make public prose reader-focused #1157 left as a TODO is done, and the TODO is closed. Across the eight consumer repos, 0.2.x PR descriptions nearly doubled against the 0.1.24 baseline while comments came down about an eighth, and the longest descriptions replay the investigation under the triage example's headings. pr-creation.md now gives the opening paragraph the merge decision, and the triage example keeps its contrast without handing over an outline.
  • posting.md follows the order a post is made in: composing the body, where the reply goes, then the steps before posting (review the draft, check links, recheck the thread last). Moved text is verbatim apart from linking sentences.
Evidence behind the prose changes

Worktrunk bot comments over 2,000 characters, excluding the review-runs tracking issue:

Tend version No list or heading Has <details>
≤0.1.12 18% 40%
0.1.13–0.1.24 39% 80%
0.2.x 61% 25%

The 0.2.x row covers 10 days and 36 comments.

Reproducing the TODO's own baselines across the eight consumer repos, 0.1.24 windows vs 2026-09-07..09-16 on 0.2.x:

Measure 0.1.24 0.2.x
PR descriptions, median visible words 192 360
PR descriptions with 300+ visible words 27% 64%
PR descriptions with a 100+ word paragraph 43% 53%
Review bodies, median characters 1,936 1,684
General PR comments, median characters 1,692 1,449
Issue, triage and mention comments, median 2,249 1,993

#1157 left no script, so these come from a fresh one over both windows. Its recomputed comment medians land within about 3% of what TODO.md recorded. Its PR-description baseline is lower than the record (median 192 visible words against 243, and 27% at 300+ words against 40%), most likely because the record covered six consumers rather than eight and counted visible words differently. Both windows here run through the same script, so the movement is like-for-like even where the absolute baseline differs. The PR window is 6 days against 10.

A replay of the posting moment ran 5 cases × 2 arms × 3 runs on Opus, with the guidance pasted next to the draft. It could not isolate the draft review, because both arms revised the draft once the guidance sat beside it, cutting it by 15–30% even without the new step. That supports distance as the cause. The replay tested earlier wording (a prescriptive shape sentence and a subagent reader), not the text merged here.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 7 commits September 16, 2026 17:30
Nothing reads a comment, review, or PR/issue body against **Reader-facing
prose** before it posts. The pre-post pass is the link checker and the
duplicate re-fetch, both mechanical, so a body goes out as first drafted.
posting.md now opens with a draft review: a short reply gets a read-through,
and a body that carries an analysis gets a subagent reader where the session
permits one.

Reader-facing prose also gains the shape the visible text should take: the
outcome in a short opening paragraph, parallel items as a list, and a single
line of reasoning as prose. Since 0.2.0 dropped "keep comments concise" and
the <details> default, long bot comments on worktrunk with no list or heading
went from 39% (0.1.13-0.1.24) to 61% (0.2.x), and those with <details> from
80% to 25%. posting.md's "preserve evidence another run would need" line
moves into that paragraph, next to the <details> rule it motivates.

A replay of the posting moment (5 cases, 2 arms, 3 runs) couldn't isolate
the review step: with the guidance pasted beside the draft, both arms
revised it. With the new shape sentence, long drafts came out with a list
in more runs, and evidence moved into <details>. A long reply that was
already structured kept its structure in both arms. One of three runs on
a short reply turned it into bullets.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…a tool

Replace the prescribed shape with the goal: concise, helpful, easy to
digest, standing on its own, with a way deeper for the reader who needs
more. Lists, headings, and <details> are offered as tools that often help,
with <details> as the deeper layer a later run relies on.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… subagent mechanics

Tend's CLAUDE.md filed the bot's agent sessions under "compute" that
"costs cents", beside slow CI jobs, while the same file gates agent boots
because they cost tokens. It now separates the two: wasted runner time
still needs a simple knob to be worth fixing, and model tokens are a cost
that skill and workflow design keeps to what the work needs.

**Weighing a Fix** in `running-in-ci`, which every consuming repo loads,
now scopes its bar to CI runner time and drops the bot's own sessions as
an example of cheap compute; tend's stance on its sessions' token cost
lives in CLAUDE.md. `review` and `ci-fix` refer to the runner-time bar by
that name.

review-reviewers' **Cost discipline** keeps its token goal (bulk log
reading stays out of the context that judges, on a cheaper model where
the harness allows) and drops the five-step subagent pattern. Steps 2
and 3 no longer prescribe spawning a subagent on a named model tier.
resolve-conflicts says to consider one subagent per conflicted PR; the
isolated worktree per PR stays a requirement.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…ting.md as a post is made

`running-in-ci/SKILL.md` loads in every session of every consuming repo,
but several of its sections apply only to a few:

- **Weighing a Fix** is for proposing or reviewing efficiency changes.
  Its only users already state the rule where they apply it: `ci-fix`
  (knob-sized mitigation), `review` (challenge machinery that only saves
  runner time), and `review-gates.md` Gate 3, which now carries the
  whole-change remedy test inline. Tend's own value order is in its
  CLAUDE.md. The section is removed.
- **Scripts over prose recipes** applies when writing skill text, so it
  moves to `references/skill-pr-workflow.md`.
- **Other Repos** and **Learning from Feedback** only repeated their
  index rows. `references/other-repos.md` and skill-pr-workflow's
  open-and-exit step carry the content, and citations now point there.
- **Multi-way Conversations**, **Self-conversation Guard**, and **PR
  Review Comments** decide whether and where to reply, so they move to
  `references/posting.md`.

`posting.md` now follows the order a post is made in: whether to respond,
composing the body, then the steps before posting (review the draft,
check links, recheck the thread last), and where the reply goes. The
link rules and their examples now sit together. The inline-reply dedup
check joins the recheck as its third duplication path. Moved text is
verbatim apart from linking sentences. SKILL.md goes from 205 lines to
154.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… Weighing a Fix's evidence and knob tests where they apply

Whether to respond (self-conversation, other participants) and the rule
for finding the line an inline review comment targets decide work
before it starts, so they sit in running-in-ci's Read Context rather
than in posting.md, which is read only before writing. posting.md now
runs composing, where the reply goes, then the steps before posting.

review asks for waste that recurred across days and names a knob as one
setting in one place; ci-fix and review-gates Gate 3 carry the same
tests. Reader-facing prose again tells a session to keep the <details>
record a later run would otherwise re-derive, and the skill-PR row
fires on a maintainer's correction.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
max-sixty and others added 3 commits September 16, 2026 18:43
…g it governs

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
TODO.md asked for this check once a release had accumulated a sample
comparable to its baselines. Reproducing them across the eight consumer
repos, comparing the 0.1.24 windows with 2026-09-07..09-16 on 0.2.x:

- PR descriptions: median visible words 192 → 360; at least 300 visible
  words in 27% → 64%; a visible paragraph of 100+ words in 43% → 53%.
- Review bodies: median 1936 → 1684 characters.
- General PR comments: 1692 → 1449. Issue, triage and mention comments:
  2249 → 1993.

So comments came down about an eighth while PR descriptions nearly
doubled, and the longest recent ones replay the investigation under the
`## Problem` / `## Solution` / `## Testing` headings the triage example
offers — the de facto template the TODO named as its own failure signal.
Per the TODO's remedy (sharpen the goal or drop an example, never a hard
length limit): `pr-creation.md` gives the opening paragraph the merge
decision, and triage's example keeps its contrast without handing over
an outline.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit e623d1a into main Sep 17, 2026
12 checks passed
@max-sixty
max-sixty deleted the review-before-post branch September 17, 2026 04:02
max-sixty added a commit that referenced this pull request Sep 17, 2026
…view by coverage (#1266)

Two guidance changes, both from the session that landed #1263.

`CLAUDE.md`'s **What waste is worth fixing** said only that model tokens
are the larger cost. It now says what makes a token saving worth a
mechanism: the share of total spend it removes, estimated before the
change is proposed, with a small or rare saving justifying no
complication however well it reads line by line.

`code-review`'s `SKILL.md` wrote its depth scaling as subagent fan-out —
"fan out one subagent per angle", "one subagent verifier per candidate",
and a report of "which mode ran". The rule underneath is coverage: every
angle covered, every candidate verified. It now says that, and asks the
caller to be told how much was covered rather than which mechanism ran.
`review`'s **Second pass** described the core branch the same way, so
its one stale clause follows the same change.

The token-cost test was also drafted into `review/SKILL.md` and
`review-reviewers/SKILL.md` and is not in this PR. #1265 landed while it
was being written, and its rule — what this repo will spend complexity
on is one maintainer's call and doesn't ship — covers exactly that text.
Those two files and Gate 3 in `shared/review-gates.md` still carry
tend's cost stance in shipped guidance; taking it out is a separate
change.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Sep 17, 2026
A survey of the bundled skills for text that governs tend rather than
the repo the bot is running in, plus the repairs it turned up. It
follows #1263 and #1265, and applies the ontology #1265 landed: shipped
guidance has to hold in a repo whose maintainer disagrees with us, so
tend's own calls belong in tend's own files.

## Tend's compute economics leave the bundled skills

Gate 3 of `shared/review-gates.md` priced a failure's cost and sized the
fix it justified — waste costs cents, machinery is maintained forever,
one knob in one place. That is tend's CLAUDE.md, shipped into every
consumer's daily `review-runs` and applied to their repo. It's gone, and
the framework is two gates: Gate 1's Critical row already carried the
part that isn't taste, so it gains the rule that a wrong outward action
has to have occurred rather than been imagined. `review-reviewers` loses
its "Cost discipline" section — running log parsing in a subagent is
about what the judging context holds, not what tokens cost — and
`review`'s code-quality bullet asks whether a change carries its weight
without supplying tend's answer. The rule itself stays in `CLAUDE.md`,
where a bot session in this repo reads it and a session elsewhere reads
that repo's.

The `Non-issues` block, which this branch moved up from
`review-reviewers` into the shared file, keeps only what a consumer's
session meets: `tend-mention`'s gate skipping a job,
`/tend-ci-runner:review` posting nothing on a draft, `tend-review`
re-reviewing after a fix commit. Four citations from tend's own incident
log are out, and so is a paragraph addressed to a session filing
upstream, now stated in each skill in its own scope.

## review-reviewers moves to tend's overlay

No generator list carries it: only the hand-maintained
`review-reviewers.yaml` dispatches it, over a matrix of consumer repos,
to file findings back onto tend. Inside the bundled plugin it installed
into all eight consumers, was invoked by none, and collected tend's
internal text beside `review-gates.md` — which every consumer's
`review-runs` does load. That is how the compute stance got into the
gates. It now lives at `.claude/skills/review-reviewers/`, invoked as
`/review-reviewers` and reaching the plugin's scripts through `$SCRIPTS`
the way the `running-tend` overlay already does.

## running-in-ci sheds what most sessions never use

171 lines to 107. Reading a thread, fetching a review's inline comments,
the closed-target check, and whether to respond at all are acted on by
the sessions that answer an issue or PR thread; they sat in the file
every session loads because `tend-mention` has no skill of its own. They
move to `references/trigger-context.md`, indexed on the action rather
than on the trigger, so `triage` (`issues.opened`), `notifications` (a
cron tick) and `review` (`pull_request_target`) all reach them.
Reproduction and fix conditions move to `/tend-ci-runner:triage`'s
`references/fixing.md`, and the system prompt keeps the self-loop guard
and a pointer instead of restating what `running-in-ci` owns.

## Lints for what moving guidance breaks

In `generator/tests/test_repo_pins.py`, where the repo keeps invariants
no single suite owns:

- **`test_skill_reference_citations_resolve` now resolves each citation
to its owner.** It already walked every skill's citations but only
checked that the filename existed in *some* skill. It now resolves the
owner named before the path, after it, or implied by the citing skill;
reports an owner that isn't on disk; checks bare siblings inside
`references/` directories; and walks symlinks, so
`shared/review-gates.md` is covered. Moving `trigger-context.md` broke a
pointer in `posting.md` that the old check would have passed.
- **The References table indexes exactly the bundled `references/`
files** — one no row names loads in no session.
- **Every workflow prompt's first token resolves to a skill on disk:**
`/<plugin>:<name>` under `plugins/`, `/<name>` under `.claude/skills/`,
or Codex's `$<name>`. `tend-mention` is the one agent-invoking workflow
whose prompt opens with an expression instead, because it names no skill
at all — the gap TODO.md tracks.

## Testing

`uv run pytest` (1159) and all 13 pre-commit hooks pass. Each new check
was probed by breaking what it guards. The guidance changes themselves
are unexercised by CI, as guidance always is; they were reviewed against
the pre-change text for lost instructions and broken cross-references.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants