Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion docs/PLUGIN-PHILOSOPHY.md
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,39 @@ name is not the same underlying value across models):
pin is a design-time choice rather than a per-task one: pick the level once and keep it, steer
per message when one turn needs more or less, and move the configuration only at natural breaks
between tasks ([steering thinking: prompt caching](https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost#prompt-caching),
verified 2026-08-03).
verified 2026-08-03). The harness page states the same convention in its own words — "Pick your
model and effort level at the top of a session, then save `/compact` for natural breaks between
tasks" — and adds the interactive consequence a plugin author cannot see from the platform page
alone: once a conversation has started, Claude Code "shows a confirmation dialog before applying
an effort change that would invalidate the cache", so a mid-session change is a prompt the
consumer must clear rather than a silent cost. The same section independently corroborates the
no-op corollary above — a change resolving to the level already in effect "skips the dialog and
keeps the cache" ([prompt caching: changing effort level](https://code.claude.com/docs/en/prompt-caching#changing-effort-level),
verified 2026-08-03; recheck trigger: a Claude Code release changes the effort-change
confirmation flow, or that section is reworded).

**Effort is one dial of two, and the other is not an effort value.** The `thinking` parameter decides
whether Claude reasons in thinking blocks; `effort` decides how hard the whole response works,
"which in adaptive mode includes how often and how deeply it thinks". Upstream states the resulting
trap outright — "Don't pass `adaptive` as an `effort` value: `adaptive` is a thinking mode, not an
effort level" — and a frontmatter `effort` field is exactly where that trap is reachable, because the
two dials share vocabulary. The second consequence bounds what any pin can promise, in upstream's own
words: "**You need a hard ceiling on spend:** use `max_tokens`. Effort is soft guidance; `max_tokens`
is a strict limit." Read what that limit bounds before reaching for it. `max_tokens` is a request
parameter capping one response's output — it "includes all thinking Claude generates in the current
turn" — so it binds per response and constrains neither input and cache reads nor the further
requests an agentic lane makes. **And no documented frontmatter field reaches it.** Those fields set
the model and the effort level, and a subagent adds `maxTurns`, which bounds agentic turns rather
than tokens and has no skill-frontmatter counterpart; neither field list carries a token cap, because
the parameter belongs to the API request that the lane-pin surface does not assemble. So the rule
this section can actually state is narrower than the quote: a lane wanting to spend less lowers
`effort` knowing it is guidance, and a hard cap has to be imposed by whoever builds the request
([thinking and effort](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-effort),
[subagent frontmatter](https://code.claude.com/docs/en/sub-agents#supported-frontmatter-fields), and
[skill frontmatter](https://code.claude.com/docs/en/skills#frontmatter-reference), all verified
2026-08-03; recheck trigger: the accepted `effort` value set changes on the model-config or effort
page, or either documented frontmatter field list gains a token cap). Checking the value set mechanically stays deferred: a lint rule's source of truth is
the harness's own accepted-value list, which this section deliberately does not restate.

Session-level effort is the consumer's own knob, out of plugin scope: `low` through `xhigh`
persist via the `effortLevel` setting, while `max` and `ultracode` are session-only — `max` is
Expand Down
2 changes: 1 addition & 1 deletion plugins/playbooks/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
"name": "playbooks",
"version": "0.6.3",
"version": "0.6.4",
"description": "Doctrine and knowledge playbooks as on-demand skills, plus a maintainer-facing update skill. boris — Boris Cherny's Claude Code workflow tips (howborisusesclaudecode.com); skill-authoring — Anthropic's internal skill-authoring playbook; fable-5 — Claude Fable 5's operating doctrine (self-authored, no upstream). The boris and skill-authoring packs vendor a verbatim upstream baseline; /playbooks:update drift-checks and syncs those baselines centrally (maintainers).",
"author": {
"name": "Melodic Software",
Expand Down
50 changes: 50 additions & 0 deletions plugins/playbooks/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,56 @@ All notable changes to the `playbooks` plugin are recorded here. The `version` i
`.claude-plugin/plugin.json` is the delivery vehicle — a consumer receives a change
only after that version increases.

## [0.6.4]

### Added

- **`fable-5` context economy gains the thinking-cost section.**
`skills/fable-5/context/context-economy.md` adds "Your own thinking is context you pay for
twice": thinking is billed as output when generated and again as input on every later request,
and neither half is visible in what the session displays. Billing is invariant across the
`display` setting — summarized and omitted bill identically and summary generation is free — so
hiding thinking is never a cost lever ([Steering thinking:
Pricing](https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost#pricing),
verified 2026-08-03). The retention half is stated as a **harness override with its boundary
conditions**, not as a flat truth: the per-model preservation split upstream documents (all turns
on keep-all models, only the last turn elsewhere) is what a raw API caller gets, while Claude
Code overrides it in the keep-all direction on every thinking-enabled request, so retained blocks
accumulate and bill as input on every model. The section carries the four-part verification
record that override requires — claim, basis (request bodies emitted by `claude.exe`,
265,720,480 bytes, read for both a documented keep-all and a documented last-turn-only model,
with `context-management-2025-06-27` present in each request's `betas`), as-of date, and a
recheck trigger on any Claude Code upgrade, since `keep:"all"` is a build-time constant rather
than a documented contract. The three gating conditions and the two escapes that resume the
per-model default (`CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1`, or a gateway dropping the field)
are stated with it. The input-billing half is explicitly upstream's own rule for retained blocks
([Thinking and the context
window](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-the-context-window))
applied to that forced retention, not a second observation — the wire evidence proves retention,
not billing. `skills/fable-5/SKILL.md` carries the distilled line under core doctrine, "Managing
your window — context-economy". Both surfaces **bound the accumulation to the current uncompacted
window**: `keep:"all"` preserves only blocks a request still carries, and compaction "replaces
your message history with a summary" ([Compacting the
conversation](https://code.claude.com/docs/en/prompt-caching#compacting-the-conversation),
verified 2026-08-03), so thinking summarized away — or dropped by `/clear` or a rewind — is
neither re-sent nor re-billed, and the count restarts at the last history reset rather than at the
first turn. The four-part record is unaffected: `keep:"all"` is still what the harness sends, and
only the billing scope downstream of it narrows.

### Changed

- **`fable-5` Opus 5 adaptation no longer defers effort claims to an unreachable target.**
`skills/fable-5/context/model-adaptation/opus-5.md` routed every effort claim beyond its three
quoted bullets to "the verified effort-doc slice (see this workstream's Phase 6 cross-check)" —
both referents campaign-internal and resolvable by no consumer of this plugin, the same defect
class refused in 0.6.3 for a routing note between `.work/` slice directories. The deferral now
points at the live [Effort](https://platform.claude.com/docs/en/build-with-claude/effort) and
[model config: adjust effort
level](https://code.claude.com/docs/en/model-config#adjust-effort-level) pages (both fetched raw
2026-08-03, HTTP 200), and names per-model starting level alongside the ladder items already
listed as upstream-owned. The file's TRUNCATED finding about the guide's own ladder statement is
preserved as the reason those three bullets are its whole effort content.

## [0.6.3]

### Added
Expand Down
1 change: 1 addition & 0 deletions plugins/playbooks/skills/fable-5/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ The distillation of every chapter, grouped in operating-loop order. Each line is
- Write every expensive conclusion (eliminated hypothesis, verified invariant, mapped dead end) to a durable note with its evidence pointer the moment it stabilizes — never at session end.
- Read fully only what you will edit or reason deeply about; skim for structure; never load what a targeted search can answer.
- At every turn end, each open obligation is progressed, parked visibly, or closed — never silently dropped.
- Your own thinking is billed twice — as output when generated, then as input on every later request in the same uncompacted window, because this harness retains prior-turn thinking on every model regardless of the per-model split upstream documents for raw API callers. Count accumulated reasoning as conversation history when judging a long session's cost, and count it from the last history reset: compaction replaces that history with a summary, so the total does not carry across one. That override is pinned to a harness build, not a documented contract: its boundary conditions and recheck trigger live in the context-economy chapter, and nothing here is a substitute for reading them before acting on the cost claim.

### Boundaries — trust-and-authority

Expand Down
15 changes: 15 additions & 0 deletions plugins/playbooks/skills/fable-5/context/context-economy.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ Every token you load competes with every token of reasoning you have left, and t
- **One question, one probe:** prefer the narrowest tool call that answers the live question over the broad one that answers it plus five you did not ask — breadth you did not need costs the same tokens as breadth you did.
- **Precedence:** when a task needs context-flooding exploration whose bulk you will not reuse, the answer is delegation (the orchestration chapter), not heroic inline reading.

## Your own thinking is context you pay for twice

Thinking is not free deliberation happening beside the conversation. It is generated output you are billed for, and here it then stays in the window and is billed again as input on every later request. Both halves are invisible in what you see, which is why the cost of a long session outruns the transcript that displays it.

- **You pay for thinking you never see.** The bill is for the full internal process, not the visible text, and it is identical whether thinking is summarized or omitted — only visibility changes, and generating the summary is itself free. Hiding thinking saves nothing, so display is never a cost lever ([Steering thinking: Pricing](https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost#pricing), verified 2026-08-03).
- **Here, prior-turn thinking is retained and re-billed as input on every request, on every model.** The per-model preservation split upstream documents — all turns on keep-all models, only the last turn elsewhere — is what a raw API caller gets. Claude Code overrides it in the keep-all direction on every thinking-enabled request, so retained blocks accumulate and bill as input like the rest of the history ([Thinking and the context window](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-the-context-window), verified 2026-08-03). See the verification record below; the override is build-pinned, not a documented contract.
- **Never infer your retention behavior from your own model's name.** The upstream table is keyed to models and answers a different question than the one you are asking inside this harness — a last-turn-only model running here still accumulates.
- **TRIGGER:** a long tool-heavy session, weighing whether to keep working inline or externalize and hand off. **RULE:** count accumulated thinking as conversation history, because here it is. Every turn's reasoning is re-sent and re-billed on every subsequent request that still carries it, so context hygiene is a thinking-cost lever and not only a window lever — the handoff trigger in "Externalize conclusions when they stabilize" fires earlier than the visible transcript suggests.
- **Count from the last history reset, not from the first turn.** `keep:"all"` preserves only blocks a request still carries, and compaction "replaces your message history with a summary" ([Compacting the conversation](https://code.claude.com/docs/en/prompt-caching#compacting-the-conversation), verified 2026-08-03) — so thinking summarized away stops being re-sent and stops being billed, as does thinking dropped by `/clear` or by a rewind that truncates back to an earlier prefix. The accumulation above is bounded to the current uncompacted window; carrying it across a reset overcounts reasoning nobody is paying for anymore.

**Verification record** — the harness override restates a build-pinned specific instead of pointing at a live source, so it carries the four-part record. **Claim:** Claude Code sends `context_management` with `{"edits":[{"type":"clear_thinking_20251015","keep":"all"}]}` — maximum preservation — on every thinking-enabled request, on documented keep-all and last-turn-only models alike. **Basis:** request bodies emitted by `claude.exe`, 265,720,480 bytes, read for both model classes, with `context-management-2025-06-27` present in each request's `betas`; the input-billing half is not a second observation but upstream's own rule for retained blocks (cited above) applied to that forced retention. **As of:** 2026-08-03. **Recheck trigger:** any Claude Code upgrade, since `keep:"all"` is a build-time constant rather than a documented contract; or the upstream preservation section changing. Three conditions gate the field — thinking enabled, a non-empty resolved beta list, and that beta present in the request — and `CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1` or a gateway dropping the field resumes the per-model default, which makes the answer configuration-dependent rather than false.

> Weak: "thinking is cheap — it does not come back." Half true upstream, false here.
> Strong: treat a long session's accumulated thinking as billed history, and externalize before the window forces it.

## Read fully, skim, or do not load

Depth of load is a decision made per file, before the read — after the read the cost is sunk. This rule sets depth; how wide to read around an edit is the execution chapter's read-radius rule, fed by the planning chapter's "Blast radius census".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ are verbatim quotes, the second quotes its core clause and paraphrases the step-
wherever quality holds"; step up only for demanding coding and agentic work (paraphrase).
- "If you carried effort defaults over from a prior model, re-run an effort sweep on your own evals."

The effort ladder, level names, and per-model support are upstream-owned — resolve them through
the `claude-api` skill (local routing policy) or live model-config docs, never from this file. The
guide's own ladder statement is TRUNCATED (verified against the live `whats-new-opus-5`
enumeration); any effort claim beyond the three above defers to the verified effort-doc slice
(see this workstream's Phase 6 cross-check). `[CC: direct]`
The effort ladder, level names, per-model support, and per-model starting level are upstream-owned —
resolve them at read time through the `claude-api` skill (local routing policy) or the live
[Effort](https://platform.claude.com/docs/en/build-with-claude/effort) and
[model config: adjust effort level](https://code.claude.com/docs/en/model-config#adjust-effort-level)
pages, never from this file. The guide's own ladder statement is TRUNCATED (verified against the
live `whats-new-opus-5` enumeration), which is why the three bullets above are this file's whole
effort content and every other effort claim resolves at those pages. `[CC: direct]`

## Thinking controls (harness facts, live-verified 2026-07-26)

Expand Down