Skip to content

docs: split shipped guidance from tend's own, and settle on consumer - #1265

Merged
max-sixty merged 7 commits into
mainfrom
guidance-placement-rules
Sep 17, 2026
Merged

max-sixty merged 7 commits into
mainfrom
guidance-placement-rules

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A survey of the bundled skills found tend's own maintainer stance — its order of value, a single-maintainer PR budget, what this repo will and won't spend complexity on — written into files that ship to every repo installing tend. Those are one maintainer's calls, and shipped they make every consumer's repo answer to this one's. Nothing in the repo named the boundary they crossed, so this names it and applies it.

The split

CLAUDE.md gains Shipped guidance and tend's own, split on which repo the text governs. Shipped guidance is any text that reaches another repo — more than plugins/**: shared/system-prompt.md and the two directives compose_system_prompt.py prepends, codex/agents-tail.md, the header comment workflows.py stamps into every generated workflow, and docs/tend.example.yaml, which a pre-commit hook mirrors into install-tend. Tend's own guidance is read only here.

The test for a line of shipped text: does it hold in a repo whose maintainer disagrees with us? Mechanics ship freely — how GitHub behaves, what the harness does, what a session must never do. A default a consumer might want differently ships as a default their overlay can change, stated without our reasoning for it.

Not tend-internal: a skill's metadata: internal: true already means it isn't user-invocable, and every shipped skill carries it, so the word would mean roughly its opposite here.

Under that, a ### Which file subsection keeps the narrower placement question — a rule is loaded by one set of sessions and acted on by a subset, so it goes at the narrowest level every actor still reads — with a table of the levels, who reads each, and whether it ships. The one-home rule is new; duplication had no rule to violate before.

skill-pr-workflow.md gets the universal half, since it is what a session in any repo reads before writing guidance. "Where it lands" asked one question, would every tend consumer want this rule?; it now asks a second, is it ours to state? That also resolves against the later line telling generic-reading rules to go upstream, which now says a rule of mechanics does.

nightly's review checklist gains one bullet: its convention-compliance bullets are code-shaped, so a surveyed Markdown guidance file got no placement question.

One word for a consumer repo

The repo used adopter and consumer interchangeably — 187 and 277 occurrences, in the same files, for the same thing, plus five "consuming repo". All consumer now, because the identifiers already say it (data/consumers.json, refresh_consumers.py, the Worker's data streams) and those can't move cheaply. Mechanical apart from the a/an articles the swap broke and one adopting the stem missed. CHANGELOG.md keeps adopter: released entries are a record, not vocabulary. That commit is separable from the rest.

What this doesn't do

It changes the rules, not the text they judge. The survey's individual findings — the compute stance still reaching a consumer's own CI config in review/SKILL.md, the single-maintainer PR budget in references/pr-creation.md — are unfixed here. TODO.md records the one workflow that breaks the new invariant that every agent-invoking workflow names a skill: tend-mention's prompt is inline in mention.yaml.j2, which is why running-in-ci doubles as mention's skill.

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

max-sixty and others added 6 commits September 16, 2026 20:52
Three separate rules — bundled vs. overlay, `references/` for rare actions,
and an unwritten one-home rule — were all answers to one question that nothing
stated: which sessions load this text, and which act on it. A reviewer who
applied one didn't reach for the others, and duplication had no rule to
violate at all.

CLAUDE.md now states the question once, with a table of the levels and who
loads each, and the four calls that follow from it: one home per rule, bundled
means universal, tend's own tradeoffs are tend's policy rather than every
adopter's, and every agent-invoking workflow names a skill. The closing line
extends it to sections a change leaves in place, which is how three
restructures kept text their reviews never looked at.

`nightly`'s review checklist gets the same question for a surveyed guidance
file, since its existing convention bullets are code-shaped and a file left
untouched reaches no diff-based review.

TODO.md records the one workflow that breaks the skill invariant.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The leak this fixes: tend's own maintainer stance — its order of value, its PR
budget, what it will spend complexity on — written into skills under plugins/,
which reach every repo that installs tend. Those are one maintainer's calls,
and shipped they make every consumer's repo answer to this one's.

CLAUDE.md names the two kinds by which repo the text governs, with the test for
a line of shipped text (does it hold in a repo whose maintainer disagrees with
us) and the mechanics/judgment line that answers it. Not `internal`: a skill's
`metadata: internal: true` already means it isn't user-invocable, and every
shipped skill carries it.

skill-pr-workflow.md gets the universal half — a judgment about what is worth
doing in a repo belongs to whoever maintains it — which also resolves against
the later line telling generic-reading rules to go upstream.

Tend's overlay gets the check itself, since only this repo holds shipped files.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The repo used adopter and consumer interchangeably: 187 and 277 occurrences,
both in the same files, for the same thing. consumer wins because it is already
in identifiers that can't move cheaply — data/consumers.json,
refresh_consumers.py, the Worker's data streams — so prose now matches them.
consuming repo folds in too.

Mechanical apart from the a/an articles the swap broke. CHANGELOG.md keeps
adopter: released entries are a record, not vocabulary.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The first pass listed shipped guidance as plugins/** plus system-prompt.md,
which is wrong in both directions: codex/agents-tail.md, the two directives in
compose_system_prompt.py, the header comment workflows.py stamps into every
generated workflow, and docs/tend.example.yaml all reach a consumer, and
docs/ otherwise doesn't. Getting the boundary wrong in the section that
defines it is the failure the section exists to prevent.

Also the last adopt* remnant, which the earlier rename missed on stem.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
CLAUDE.md is restored and read at startup in every tend CI session, so the
overlay section restated a rule its readers already had — the one-home rule
the same change introduces. Its boundary sentence was the superseded one too,
naming docs/ as tend's own and plugins/ as the whole of what ships.

The trigger it carried lives in CLAUDE.md, now naming both questions rather
than counting them.

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

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The an adopter → a consumer article substitution matched inside a word in one place and skipped the wrapped ones, so three things came through the rename broken.

sandbox_setup.py's success log now reads ra consumer sandbox_setup commands inside SRT — ran lost its n to the article pattern. test_sandbox_setup.py pins that exact string, so the suite is green on it and every consumer's run log prints the mangled line from the next release onward.

Where the article and the noun landed on different lines the substitution didn't see them, leaving four sites reading an consumer. Two are bot_name's input description in both shipped actions, which is the text a consumer reads on the action's own page.

Separately, the new TODO.md section names the invariant's home as "Where guidance text goes", and no heading by that name exists anywhere in the tree — the invariant is under ### Which file in CLAUDE.md. It's the shape nightly's checklist calls a stale instruction referencing a renamed file, so the next sweep will re-find it.

Suggestions are inline; happy to push them as a single commit instead if you'd rather not click through seven.

Comment thread shared/steps/sandbox_setup.py Resolved
Comment thread shared/steps/test_sandbox_setup.py Resolved
Comment thread TODO.md Resolved
Comment thread claude/action.yaml Resolved
Comment thread codex/action.yaml Resolved
Comment thread shared/steps/report_failure.py Resolved
Comment thread shared/steps/test_sandbox.py Resolved
`an consumer` -> `a consumer` ran as a plain substring replace, so it matched
inside `ran consumer` and turned sandbox_setup's success log into `ra
consumer`; the test pins that string, so the suite stayed green on it and
every consumer's run log would have printed it from the next release. And
where the article and the noun sat on different lines it matched neither,
leaving four `an consumer`, two of them in the `bot_name` input description
a consumer reads on each action's page.

Found by word boundary and by line-pair search rather than by the list, and
those two searches now come back empty.

TODO.md pointed at a heading that never existed; the invariant is under
"Which file".

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 7c7866c into main Sep 17, 2026
12 checks passed
@max-sixty
max-sixty deleted the guidance-placement-rules branch September 17, 2026 04:26
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
…1267)

Follow-on to #1265, which named the split between shipped guidance and
tend's own but didn't move the text it judges. These are the three
bundled sites that applied tend's judgement to the repo the bot is
running in — mechanics ship, but what work is worth doing in a repo
belongs to whoever maintains it.

**`review/SKILL.md`** weighed changes "in the bot's own automation … and
the repo's CI config", so a consumer contributor's own CI change was
judged by tend's ranking of complexity against compute. The criterion
now stops at the bot's *bundled* skills and the scheduled workflows that
invoke them — "its skills" would still have covered the
consumer-authored `running-tend` overlay.

**`references/pr-creation.md`** opened "Open PRs compete for one
maintainer's attention" and held self-initiated improvements at five
open bot PRs. The five was written whole in #960 and never derived — set
below an eleven observed at the time — and it isn't right for tend
either, so no repo would set it and the mechanism goes with it,
exemption list included. The branch-basing rule in that paragraph is
mechanics and is kept.

That cap was the only bound on **`nightly`**'s rolling survey, whose
Step 8 read "For each finding: 1. Create a PR" with no limit — unlike
`review-runs` and `review-reviewers` it references no gates and caps
nothing, so an eight-finding survey would have opened eight PRs. Step 8
now groups findings by theme and keeps a run to a couple of PRs, with
the rest in the run summary: the same restraint its siblings carry, in
the skill that does the sweeping rather than as a global number.

**`ci-fix/SKILL.md`** required "a knob-sized mitigation, one setting in
one place" for an escalated infrastructure fault, limiting a consumer's
own reliability work to tend's bar. Now the smallest mitigation that
holds, with the 3b fallthrough turning on that instead of on
"knob-sized", which the edit had left undefined in the file.

Separately, the per-run caps in `review-runs` and `review-reviewers`
read "a couple of PRs per run" rather than "at most 2". That number was
never derived either, and the words carry the same instruction without
the false precision.

> _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]>
@max-sixty max-sixty mentioned this pull request Sep 17, 2026
max-sixty added a commit that referenced this pull request Sep 17, 2026
Ships #1277. bubblewrap's CVE-2026-87766 fix reached the Ubuntu archive
this afternoon, and every consumer's sessions have died at sandbox
launch since — consumers pin an immutable tag, so the fix reaches them
only through a release.

Also carried: the `tend-notifications` conflict-gate and subject-owner
fixes (#1276, #1264), the outage-enrichment skip (#1248), the sandbox
Git identity seed (#1252), and the split of tend's own maintainer calls
out of the shipped skills (#1265, #1267, #1268, #1269, #1272).

`review` will fail on this PR for the same reason the release exists:
the reviewer runs `max-sixty/tend/[email protected]`, which is the broken
pin.

> _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
…ttle two names (#1284)

A survey of every shipped file after #1265–#1272 — the bundled skills,
`shared/system-prompt.md`, `codex/agents-tail.md`, the
generated-workflow header, and `docs/tend.example.yaml` — for text that
is tend's own call, tend-only, or a citation of a past case. Plus the
two naming decisions the survey turned up.

## Tend's own calls still shipping

- **`review/SKILL.md`** judged a consumer's PRs by tend's stance: "avoid
unnecessary complexity, **feature flags, or compatibility layers**" and
"a rule every run loads". A published library among the consumers needs
compatibility layers, so the reviewer was objecting to the code its
maintainer wants. The weight question stays, without tend's answer.
- **`nightly`**'s review checklist applied CLAUDE.md's placement rules
("belongs in the file its actors read") to a consumer's own instruction
files, so the survey would open PRs rearranging their `CLAUDE.md` to
tend's layout. It keeps the mechanical half — an overlay rule that
forked a bundled default and drifts — and tend's overlay asks the
placement questions here.
- **`grounded-analysis.md`**'s transient-incident rule wrote findings to
"the run's evidence log" and explained itself with sibling matrix legs;
both exist only in `review-reviewers`, which is tend's. It now says to
report the incident wherever the workflow reports findings, which covers
the triage, mention and ci-fix sessions that also load the file. Its
escalation ladder told the bot to *add* a Windows CI job to its repo;
[#788](#788), which the ladder
came from, said to *offer* to, which is what it says now.
- **`proposing-tend-instructions.md`** (was `skill-pr-workflow.md`)
carried three tend-only passages — "Running on tend itself, it means a
PR here", the `plugins/` scripts directory, and which paths need the
read-only-mount workaround. They move to `.claude/skills/running-tend/`,
which the repo-wins rule makes authoritative here.
- **`review-runs`** named `review-reviewers` as a workflow consumers
run; past-case citations left `review-gates.md` (a fabricated run ID
from an old session) and `ci-fix` (one consumer's
`create-issue-on-nightly-failure` job); `triage` lost the "AD FONTES"
label, which appears nowhere else in shipped text.

## One way to cite a reference file

Four spellings were in use: a path from the skill's own directory, the
owner before it, the owner after it, and a bare filename between
siblings inside a `references/` directory. A citation now reads
`references/<file>.md` from the skill's own directory, with the owning
skill in front where the file belongs to another skill — so a sentence
reads the same wherever it ends up, and survives being moved. A rule
inside a skill's own `SKILL.md` is cited by section and skill
(`**Reader-facing prose** in /tend-ci-runner:running-in-ci`).
`test_skill_reference_citations_resolve` rejects the bare filename
rather than resolving it, and the owner-after branch is out of the
regex; converting the stragglers turned up one citation that no longer
resolved at all, in `resolve-conflicts`.

## Two names

`skill-pr-workflow.md` becomes **`proposing-tend-instructions.md`**: the
file is about turning a maintainer's correction into durable
instructions — the bar, where the rule lands, what the text carries — of
which the PR mechanics are the last section. Its opening now names both
destinations, and the upstream sentence names `max-sixty/tend` outright.

And the prose agents read is **instructions** throughout, not
"guidance". The repo used "guidance" for the whole body while
"instruction files" already named the `CLAUDE.md`/`AGENTS.md` half; one
word now covers both, and it is the ecosystem's (AGENTS.md, Copilot's
custom instructions, this repo's own `pin-instruction-files.sh`).

## Also

The generated-workflow header told a consumer to edit a skill for any
change, leaving the file that owns triggers, timeouts and setup steps
unnamed; it now names `.config/tend.yaml` (39 regtest snapshots reset).
`workflows.py`'s comment pointed at nightly's Step 6, where the rolling
survey lives, rather than Step 7's regen.

## Testing

`uv run pytest` (1175) and all 13 pre-commit hooks pass. The instruction
changes are unexercised by CI, as instructions always are; an
independent pass over the whole diff checked each removal for a rule
left with no home and each cross-reference against the files and
headings it names.

> _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