Skip to content

feat(claude): tune skills, agents, and harness for Opus 5.5 / Sonnet 5.5 / Fable 5.1 - #252

Merged
paveg merged 15 commits into
mainfrom
feat/opus-5-5-harness-tuning
Oct 8, 2026
Merged

paveg merged 15 commits into
mainfrom
feat/opus-5-5-harness-tuning

Conversation

@paveg

@paveg paveg commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

概要

Opus 5.5 と Sonnet 5.5 の公式プロンプトガイドに合わせて、Claude 系のスキル、ルール、agents、設定を見直します。Fable 5.1 については 2026-09 に作ったプロファイルを参照しています。既存のハーネスは Opus 5 / Fable 5.1 世代向けに整っていたので、全面的な書き直しはしていません。ガイドが具体的に指摘している差分と、読み合わせで見つかった不整合だけを直しました。

差分は +184 / −182 行で、すべてプロンプト・設定・ドキュメントです。中心となる変更は「主な変更」の前半 3 項目です。残りの各スキルの直しは小さな修正の積み重ねです。

主な変更

  • モデルプロファイルを追加した(references/model-profiles/)

    • opus-5-5.md: Opus 5 からの差分。effort の既定値が medium に下がったこと、thinking を無効化できないこと、無人実行中にツール呼び出しなしでターンを終える早期停止パターン、advisor の測定範囲などを書いた
    • sonnet-5-5.md: implementer と spec-reviewer が sonnet で動くため追加した。agent を調整するときは、その agent が使うモデルのプロファイルを読むよう README に書き足した
  • agents

    • skeptic を model: fable に変えた。判断が重い一方で出力量が少なく、Fable の単価が効いてくる箇所が限られる。業務 proxy 経由でも fable のサブエージェントが動くことを確認した
    • implementer: 依頼外の追加をしない。変更を実際に動かすチェックを必須にする。依存しない部分を終えてから NEEDS_CONTEXT を返す。過剰な仕組みは作らずに報告する
    • spec-reviewer: 指摘を全件 severity 付きで報告する(選別はメインセッションが行う)。過剰な作り込みを指摘として拾う
  • rules / settings / CLAUDE.md

    • development-principles.md: 「複雑さは停止の合図」を追加した。依頼が名指ししていない仕組みを 2 つ目に足す前に止まり、手段が過剰なのか、目的を問い直すべきなのかを判断する
    • workflow.md: ファイルを編集しない設計判断でも advisor を呼ぶ。spawn の固定費が実測で約 10K を大きく超えていたので、ツールを絞った agent を選ぶよう書き換えた
    • loop-engineering.md: ターンの終了は報告であって完了ではない。自動継続は 1 iteration あたり 3 回までとし、バックグラウンドの処理が終わるのを待つ
    • settings.json.tmpl
      • language フィールドを削除した。値がシステムプロンプト内で 3 回展開され、プロンプトの代わりに使われていたため
      • 英語に揺れる問題は、CLAUDE.md の 1 行で補正する
    • settings.json.tmpl に agent 型の Stop hook を追加した
      • 中身: ユーザーの依頼(作業中に送ったメッセージを含む)と最終応答を突き合わせ、漏れがあれば 1 回だけ差し戻す。短い Q&A は即座に通す
  • スキル

    • 存在しないツール名を呼ばせていた箇所を直した。trend-arbitrage の ask_user_input / web_search、browser-e2e-test の TodoWrite、interrupt の wt
    • interrupt: 確認なしで push と PR 作成をしていたのを、agent はコミットまでにし、push と PR はユーザーの確認後に行う形にした
    • ui-design-standards: 汎用論を削った(4,883 → 3,318 字)。リポジトリのトークン、避けるべき既定スタイルの名指し、描画による検証、全件報告を中心にした。社内用語は含まない
    • pentest-parallel-prs: モデル名入りの古い注記を置き換え、監査用のサブエージェントを Explore から general-purpose に変えた
    • issue-ship: adversarial-review の修正ループに 5 回の上限を付けた
    • ios-submission-review / zero-cost-scaling: 古い統計を削り、価格や規約は報告前に最新情報を確認する形にした
    • description を短くした: pr-description、codex-subagent、loop-design
  • generator-evaluator 分離を見直した(harness-engineering.md)。Opus 5 ガイドの「検証用のサブエージェントは不要」には 2 つの側面がある

    • コストの側面は採用した: 決定的なチェック(テスト・ビルドなど)で判定できるものはそれを評価者にし、別エージェントは根拠に関わる出力(事実の主張、件数、プロンプトとルール、診断)だけに使う。使うときは最も狭い agent にし、自発的なレビューの周回はしない
    • 「never」の側面は採用しなかった: このセッションでは、Opus 5.5 自身のチェックに加えて、別エージェントが毎回本物の欠陥を見つけた。比較対照のない 1 セッションの観察なので、プロファイルには仮説として記録した

意図して変えなかったもの

  • writing-proofread、empirical-prompt-tuning、context-diet の本文: 毎回上から順にすべて読まれる手順なので、分割しても節約にならない
  • chezmoi で管理していないスキル(daily-kickoff など)

検証

  • just test → ✓ All checks passed!(最終コミット時点)
  • プロファイル 2 枚: skeptic に一次情報との全項目照合をさせた。約 36 項目は正しく、誤り 8 件を修正した(fce8f8f)
  • 変更したプロンプト: 生成者ではない新しいエージェントに読み合わせを 4 回させた。持ち込んだ矛盾は修正済み。最後の回では全シナリオで意図どおりの行動が選ばれた
  • Stop hook: このセッションの実 transcript を使い、haiku で模擬テストした。漏れのある応答は指摘し、漏れのない応答は通した
  • 未確認
    • Stop hook の実際の発火とトークン消費(apply 後に確認する)
    • デプロイ後の skeptic が実際に Fable で動くか

🤖 Generated with Claude Code

paveg and others added 14 commits October 8, 2026 19:21
Opus 5.5 is the session model but consumers fell back to opus-5.md.
Sonnet 5.5 backs the implementer/spec-reviewer/skeptic agents, so the
README now routes agent-prompt tuning to the pinned model's profile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The +7-10pt advisor gain was measured on the paragraph plus the hard
rule, not the paragraph alone; the harness-supplied list is an
observation, not documented; several quotes restored verbatim.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
implementer: stop at the briefed scope, require a check that exercises
the change, and do not end the run on a plan or offer.
spec-reviewer: report every finding with severity; the main session
is the filter stage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- workflow: consult the advisor before file-free design/risk answers
- loop-engineering: a turn end is a report, not completion; cap
  automatic continuations at 2-3; wait for background work
- settings: drop 'Think step-by-step.' from language (effort controls
  thinking; the field renders three times per prompt)
- pentest: model-neutral safeguard note; audit with general-purpose,
  not Explore
- issue-ship: cap the adversarial-review fix loop at 5 rounds

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- implementer: ambiguity no longer means stop at the start; finish the
  independent parts, then NEEDS_CONTEXT
- workflow: advisor trigger is 'no file edits', not 'no tool calls';
  drop the restated harness timing
- loop-engineering: cap is 3 continuations per iteration, distinct
  from the review-fix cap; a hung background wait counts as stuck

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The language field rendered three times per prompt and was used as a
prompt slot. Default behavior already follows the user's language; the
CLAUDE.md line names the actual failure: drifting into English after
English tool output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r-e2e-test

ask_user_input / web_search are claude.ai tool names and TodoWrite is
not in this harness; the skills told the model to call tools that do
not exist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ui-design-standards: defer to the repo's token source, name default
  looks to avoid, render each state, report all findings with severity;
  drop generic OOP/theme boilerplate
- interrupt: agent commits only; push/PR wait for user confirmation;
  replace the unavailable wt tool with git worktree
- ios-submission-review / zero-cost-scaling: drop stale statistics,
  verify drifting prices and rules before reporting
- pentest-parallel-prs: drop duplicated recovery notes; stop condition
  finishes independent work first
- descriptions: shorten pr-description and codex-subagent; drop a
  redundant loop-design flag; dedupe empirical-prompt-tuning

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- interrupt: dispatch implementer, branch from current HEAD, verify
  worktree placement, drop a nonexistent Agent parameter
- trend-arbitrage: ask only for what is still unknown

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
skeptic is the highest judgment-per-token role with low output volume,
so it gets the strongest evaluator; implementer and spec-reviewer stay
on Sonnet. A fable subagent was confirmed to run through the business
proxy. workflow.md's ~10K spawn estimate was far off: a one-line
general-purpose probe used ~176K tokens, so narrow tools: lists matter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a change is about to add a second unnamed layer, file, mechanism,
or workaround, stop and decide: means out of proportion to the goal, or
the goal itself needs questioning (the user's call). implementer
reports instead of building disproportionate machinery; spec-reviewer
flags over-engineering as a finding.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An agent-type Stop hook lists the user's typed and mid-turn requests
from the transcript, checks the final reply against them, and sends
one reminder naming anything neither done nor reported. It passes
when stop_hook_active is set, judges coverage only, and defaults to
allow when unsure. Simulated on this session's transcript with haiku:
flagged the missing request in the positive case, allowed the
complete reply in the negative case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: a5c4d69

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

…cisive evaluator

Re-evaluated against the Opus 5 'no verification subagents' guidance:
the cost half is adopted (narrowest agent, no self-started review
rounds), the 'never' half is not, since separate agents found real
defects on top of Opus 5.5's own checks in this session. Recorded as
a hypothesis in the Opus 5.5 profile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paveg
paveg merged commit e61eeb2 into main Oct 8, 2026
12 checks passed
@paveg
paveg deleted the feat/opus-5-5-harness-tuning branch October 8, 2026 11:09
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.

1 participant