Repository navigation
feat(generator): make the Claude prompt prose, so /code-review is reachable - #902
Conversation
…chable The built-in `/code-review` carries `disable-model-invocation`. The `Skill` tool waives that only for a turn whose own user message names the command, and the scan skips messages wrapped in `<command-message>` — which is how Claude Code stores a prompt beginning with `/`. Every tend prompt was `/tend-ci-runner:<skill>`, so no eligible message ever existed and the waiver could never fire. The Claude prompt now names its skill in prose and declares `/code-review` alongside the skills the Skill tool lists. Codex prompts are unchanged. A prompt of this shape is stored as a plain string user message — not isMeta, no `<command-message>`, no tool_result — so it clears all four of the scan's skip rules, verified against a real session log. The end-to-end unlock at a version that hardcodes the flag is not verified: local builds now gate it open, and CI pins 2.1.220. The token must clear `(?<!\S)/code-review(?=$|\s)`, where a trailing period or a backtick silently costs the run its second pass, so test_default_prompt_unlocks_code_review pins it. Committed workflows are left alone per CLAUDE.md — the in-tree generator would stamp an unreleased action tag. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`/tend-ci-runner:review` is the invocable form, and it now matches the `/code-review` beside it in the same sentence, which read as two different kinds of thing when only one carried a slash. Only a prompt that *starts* with `/` routes to the slash-command path, so a mid-string slash leaves the message an ordinary user message. Verified against a session log: with both tokens mid-string the prompt is stored as a plain string, not isMeta, no `<command-message>`, no tool_result, and each token clears its own scan regex. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
tend-agent
left a comment
There was a problem hiding this comment.
Confirmed the blocked half of the A/B from inside this run. This workflow's prompt is still the old /tend-ci-runner:review 902 form (committed workflows track the released generator), and invoking the built-in here returns Skill code-review cannot be used with Skill tool due to disable-model-invocation. So the premise holds under a slash-command prompt. The unlock half stays unverified, as the PR says.
tend-mention doesn't get the token. Its prompt is built in mention.yaml.j2, not by default_prompt, so it's the one Claude workflow the change misses. Running the generator over a minimal config, /code-review clears (?<!\S)/code-review(?=$|\s) in every generated workflow except tend-mention.yaml, which has no match at all. That prompt is already prose — it opens with the ${{ steps.delay.outputs.seconds && format(...) || '' }}Before acting, expression — so it's eligible for the waiver and just carries no token. Mention is the path where a maintainer asks for changes and the bot commits and pushes, so it's plausibly the workflow that wants the second pass most.
Nothing re-establishes skill loading. The PR names the trade — the harness used to route the prompt, prose relies on the model electing to call Skill — but ships no compensating instruction, and shared/system-prompt.md says nothing about running the skill the prompt names. A line there would cover the loss without touching the prompt shape. Worth weighing because the failure is silent: a run that never loads its skill still exits 0 and reads as a successful run.
Two inline suggestions below.
Addresses tend-agent's review on #902. `mention` built its prompt in `mention.yaml.j2` rather than through `default_prompt`, so it was the one Claude workflow the change missed — and it's the path where a maintainer asks for changes and the bot commits and pushes. The declaring sentence moves to `Config.code_review_notice` so both producers share one definition; it is empty off the Claude harness, which has no such skill. Prose relies on the model electing to call `Skill`, where the slash command was routed by the harness. `CLAUDE_DIRECTIVE` now says to invoke the skill the prompt names, which covers the loss without touching the prompt shape. The failure it guards is silent: a run that never loads its skill still exits 0. The rendered-layer assertion was a bare substring, so it passed even if rendering left the token adjacent to a non-whitespace character — the exact failure the docstring warns about. It now runs the real regex, over `mention` as well as `review`, and asserts no Codex workflow declares the skill. Verified on the folded YAML values the action actually receives, not the serialized file: all seven Claude workflows carry a whitespace-clean token and none leads with a slash. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Both body findings taken, in
Nothing re-establishes skill loading. Taken. I put it in Your first finding also sent me a layer deeper than either of us checked: the test asserted against Left alone deliberately, both stated in the description: step 4 still mandates
|
tend-agent
left a comment
There was a problem hiding this comment.
Both prior findings look addressed. One new thing, from the interaction between the two fixes.
CLAUDE_DIRECTIVE resolves to /code-review on a tend-mention run. The directive is unconditional across every Claude workflow, but tend-mention's prompt is a task description that names no tend skill — so after this PR the only slash-command-shaped skill name in it is the notice's /code-review. "Invoke the skill the prompt names — it drives the whole run" then points a mention run at a code review. The shape of the failure is a maintainer commenting "@bot rename this to X" and getting a code-review pass as the run's main act.
How I checked
Rendered the workflows with the in-tree generator over a minimal config, parsed each file, and dumped the folded with.prompt value the action actually receives — not the serialized text. Six of the seven start Run the /tend-ci-runner:<skill> skill …. tend-mention.yaml's value opens ${{ steps.delay… }}Before acting, check recent comments: … and closes …}} Beyond the skills the Skill tool lists, /code-review is available too., so /code-review is its only /-prefixed skill token.
The inline suggestion narrows the antecedent to a tend-ci-runner skill, which makes the clause a no-op on mention — it already gets its drive-the-run instruction from the prompt body, so nothing is lost there.
Second inline is narrower: the docstring's coverage claim, and the silent gap behind it for an adopter who sets workflows.<name>.prompt.
… claim Addresses tend-agent's second review on #902. The directive was unconditional, but `tend-mention`'s prompt is a task description naming no tend skill — so once the notice was added, the only slash-prefixed skill token in that prompt was `/code-review`, and "invoke the skill the prompt names" pointed a mention run at a code review. It now binds to a tend-ci-runner skill, which leaves it inert on mention, where the prompt body already drives the run. `code_review_notice`'s docstring claimed every Claude prompt carries the token. An adopter's `workflows.<name>.prompt` replaces the whole prompt, notice included, so it doesn't — and that docstring is where someone looks to find out. Scoped to generated prompts, with the exception named, and `test_custom_prompt` now pins it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…904) Reverts #902. Making the Claude prompt prose existed only so the `Skill` tool's waiver could fire and the built-in `/code-review` become reachable during a run. Reading the built-in out of the 2.1.226 binary says it isn't worth reaching. **The two share their method almost verbatim.** Same ten angles (A line-by-line, B removed-behavior, C cross-file, D language-pitfall, E wrapper/proxy, plus Reuse, Simplification, Efficiency, Altitude, Conventions), the same three-verdict verify with the same "PLAUSIBLE by default" rule, and the same Phase 3 sweep down to the same focus list. **But the built-in isn't one prompt — it's a model × effort matrix, and Opus 5 gets a deliberately minimal cell.** For `claude-opus-5`, both `medium` and `high` resolve to a cell whose entire prompt is `minimal prompt → single careful diff pass → ≤15 findings`: no angles, no verify, no sweep, no fan-out. It carries `measuredExternal: true`, so that is a measured choice rather than an oversight. The angle-based versions are what `xhigh`/`max` and the `default` model row get. tend CI runs `model: opus` and sets no effort, so it lands on whichever row model-id normalization yields — and both candidates point the same way. The `default` row at medium is 3+5 angles → verify → ≤8; the `claude-opus-5` row is the minimal single pass. The port's core-logic band is 5+5 angles → verify → sweep → ≤10, broader than either. Two further costs: the built-in reports through `ReportFindings`, which `claude/action.yaml` does not allowlist, and the Codex harness has no built-in at all. So the port stays, and the prompt goes back to the slash command the harness routes — which also retires the compensating `CLAUDE_DIRECTIVE` clause the prose form needed. ## What stays behind `TODO.md` gains an entry holding those measurements, so the question can be reopened without re-reading a binary. It lives there rather than in the skill because it argues about whether the port should exist, which is maintainer work — a skill body is loaded into every session that runs the skill, so a note there is carried by every review run and acted on by none. Its preamble changes too. It used to say the built-in "cannot be reached with the `Skill` tool", which #902 made false — and which was over-strong even before, since the gate is `disableModelInvocation && !userTypedThisTurn` and a prompt naming `/code-review` is exactly what lifts it. It now names the two durable reasons the port exists: Codex has no equivalent, and no tend prompt lifts the Claude gate. <details><summary>How the built-in was read, and what is not verified</summary> 2.1.220 — the version `claude/action.yaml` pins, and the one the port was taken from — has been pruned from local disk, so the comparison is against 2.1.226. The angle, verify and sweep texts still match the port near-verbatim, so the method itself has not drifted; what moved is the parameterization around it. Not verified: which matrix row `model: opus` resolves to at runtime, since that depends on model-id normalization inside the binary. The conclusion holds under both candidate rows, which is why it did not need pinning down. </details> > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Release 0.1.15: version bump, lockfile, and the CHANGELOG section the release workflow publishes verbatim as the GitHub Release notes. 84 commits since 0.1.14. The adopter-facing headlines: a maintainer can now release the spike rate limit by closing the `tend-rate-limit` issue it files ([#874](#874)); `tend-review` folds a mid-review push into the running session behind an examined-HEAD gate instead of cancelling it ([#903](#903)); `credential-environments` reads five repo shapes it previously misread; and the four `secrets.*` name overrides are gone, with a leftover key failing on the rename to make ([#861](#861)). Six PRs in the range are deliberately uncited in the notes: the 0.1.14 workflow regeneration, a `TODO.md` narrowing, a `consumers.json` refresh, a skill-preamble version drop, and [#902](#902) with its revert [#904](#904), which cancel out. Every other PR in `0.1.14..main` has a bullet, and every cited number resolves to a merged PR. The tag comes after this merges, so `max-sixty/tend/<harness>@0.1.15` resolves before any workflow pins it. > _This was written by Claude Code on behalf of max-sixty_
The built-in
/code-reviewcarriesdisable-model-invocation, and theSkilltool waives that only for a turn whose own user message names the command. The scan behind that waiver skips messages wrapped in<command-message>— which is exactly how Claude Code stores a prompt beginning with/. Sincedefault_promptbuilt every Claude prompt as/tend-ci-runner:<skill>, no eligible message ever existed, so the waiver could never fire in any tend workflow.The Claude prompt now names its skill in prose and declares
/code-reviewalongside the skills theSkilltool lists:Codex prompts are unchanged, and a test asserts no Codex workflow declares a skill that harness hasn't got.
Only the leading position routes a prompt down the slash-command path, so the skill mention keeps its own
/: it's the invocable form, and it matches the/code-reviewbeside it rather than reading as a bare identifier.The declaring sentence lives in
Config.code_review_notice, becausementionbuilds its prompt inmention.yaml.j2rather than throughdefault_prompt— one definition, so the two producers can't drift on a token whose whitespace is load-bearing.Prose relies on the model electing to call
Skill, where the slash command was routed by the harness.CLAUDE_DIRECTIVEincompose-system-prompt.shnow covers that without touching the prompt shape: if the prompt names a tend-ci-runner skill, invoke it. The failure it guards is silent, since a run that never loads its skill still exits 0. The clause binds to a tend-ci-runner skill rather than to any skill becausemention's prompt names none — it's a task description — so an unconditional version would have pointed a mention run at the/code-reviewthe notice had just added.What this does and doesn't buy
Nothing consumes the new availability yet. Step 4 of the
reviewskill still mandates/tend-ci-runner:code-review, so as it stands the declaration is inert — and the prompt now advertises one code-review skill while the skill body mandates another. Resolving that is a separate call, because pointing step 4 at the built-in would cost the Codex harness the second pass it gained when the port landed.This also changes nothing in CI until the next release: the committed workflows are regenerated by the published generator, not the in-tree one.
Verification, and what is not verified
Checked on the folded scalar the action actually receives, rather than the serialized file: all seven Claude workflows carry a
/code-reviewtoken with whitespace on both sides, and none leads with a slash.Verified against a real session log: a prompt of this shape is stored as a plain string user message — not
isMeta, no<command-message>wrapper, no tool result — so it clears all four of the scan's skip rules, and both tokens clear their own regexes with the slash mid-string.Not verified: the end-to-end unlock at a version that hardcodes the flag. That A/B needed a local 2.1.222 binary, which Claude Code pruned mid-session; the remaining local builds gate the flag open, where the test can't distinguish. The blocked half is confirmed — this PR's own review run reports the built-in returning
disable-model-invocationunder the old slash-command prompt.The token must clear
(?<!\S)/code-review(?=$|\s), where a trailing period or a backtick silently costs the run its second pass.test_default_prompt_unlocks_code_reviewpins that at the rendered layer, along with the no-leading-slash invariant and the unchanged Codex form.