Help us improve
Share bugs, ideas, or general feedback.
From chronista-style
AI agent の action space・tool 定義・observation format を設計し、completion rate を上げる。 agent harness を構築・最適化するときの語彙と判断軸を提供する。
npx claudepluginhub chronista-club/claude-plugin-chronista-style --plugin chronista-styleHow this skill is triggered — by the user, by Claude, or both
Slash command
/chronista-style:agent-harnessThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **「agent の output 品質は、agent そのものより harness で決まる。」**
Guides technical evaluation of code review feedback: read fully, restate for understanding, verify against codebase, respond with reasoning or pushback before implementing.
Share bugs, ideas, or general feedback.
「agent の output 品質は、agent そのものより harness で決まる。」
Core principle: agent が何を達成するかは、与えた action space / observation / recovery / context budget の 4 軸で 8 割決まる。 agent を改善するなら、まず harness を改善せよ。
VP-D11 の StandActor trait 階層 (Renderable / Headless / Pty) や、VP worker lane の autonomous mode を設計するときの判断軸として使う。
| ❌ agent-harness を使うな | ✅ 代わりに |
|---|---|
| agent failure を debug したい | agent-introspection |
| 設計判断の合議 | council |
| agent output の検証 | santa-method |
| 単に prompt を書きたい | prompt を直接書く |
agent output の上限は次の 4 軸の 積 で決まる:
output_quality = action_space × observation × recovery × context_budget
どれか 1 軸でも壊れていると、他軸を上げても掛け算で頭打ちになる。
agent が呼べる tool / cmd の集合 の質。
create_pane, send_message)、 sema 揺れないdo_anything は agent を迷わせる| 粒度 | 用途 | 例 |
|---|---|---|
| micro-tool | 高 risk operation | deploy, migration, permission_change |
| medium tool | 一般的 edit/read/search | read_file, search_code, edit_block |
| macro tool | round-trip cost が支配的なとき | batch_process, pipeline_run |
VP の Stand actor で言うと:
Pty capability = micro (PTY 起動は high-risk)Renderable.render() = medium (普通の event handle)dispatch_event() macro は避ける (個別 tool で十分)tool response が agent に何を伝えるか。
すべての tool response に含めるべき field:
| field | 役割 |
|---|---|
status | success / warning / error |
summary | 1 行 result (人間も読みやすい) |
next_actions | 次に取れる行動 (agent の planning input) |
artifacts | file path / ID リスト (副作用の可視化) |
❌ 悪い: "OK"
❌ 悪い: "Error"
❌ 悪い: 1000 行の raw log dump
✅ 良い:
{
"status": "warning",
"summary": "Lane created but TopicRouter binding pending",
"next_actions": ["call lane.bind_topic()", "verify with /api/lanes"],
"artifacts": ["lane-abc123"]
}
error path で agent が自力で立ち直れるかどうか。
すべての error response に必須:
❌ 悪い: { "error": "failed" }
❌ 悪い: { "error": "Internal Server Error" }
✅ 良い:
{
"status": "error",
"error_kind": "transient_network",
"summary": "TheWorld /api/lanes timed out",
"root_cause": "SP at port 33002 likely starting up",
"retry": {
"safe": true,
"backoff_ms": 2000,
"max_attempts": 3
},
"stop_if": "After 3 retries, call vp world status"
}
agent の context window をどう使うか。
Read("path") で必要時だけSkill tool で必要時起動、常時 system prompt に積まないVP の context budget 設計例:
| pattern | 強み | best for |
|---|---|---|
| ReAct | 探索的、 plan → act → observe | uncertain path、 探索的 task |
| Function-calling | structured deterministic | 決まった flow の実行 |
| Hybrid (推奨) | ReAct planning + typed tool exec | 大半の現実 task |
VP の Stand Ensemble は Hybrid 型: HD (Claude CLI) は ReAct、 PP/GE/HP は Event-driven (function-call 寄り)。
agent harness を変えたら、必ず metric を track:
| metric | 解釈 |
|---|---|
| completion rate | task を最後まで完了した % |
| retries per task | tool 呼び出しの retry 回数 (低いほど observation が good) |
| pass@1, pass@3 | 1 回目 / 3 回 試行で pass する % |
| cost per successful task | 成功 task 当たりの token cost |
agent harness の改善は 再利用可能な学びになりやすい。memory に積極的に pin:
| 状況 | 記録方法 |
|---|---|
| harness 設計判断 (action space 粒度等) | category: design-decision, tag: [agent-harness, harness-design] |
| benchmark 結果の比較 | category: learning, tag: [harness-eval, before-after] |
| anti-pattern 発見 | category: learning, tag: [harness-trap] |
VP の Stand Actor Framework のような 長期育成する harness では、memory に history 残すと進化が tractable になる。
D11-A で StandActor 基底 + Renderable / Headless / Pty trait を設計するとき:
→ agent-harness の 4 軸を design 議論の checklist として使う。
Worker が autonomous で走るとき:
wire_send (Q&A) / wire_receive / 直接 tool 群wire_send で lead に聞く ("safety valve")→ relay モード vs autonomous モードの harness 差 をこの 4 軸で記述すると整理しやすい。
Agent tool で subagent を起動するとき (例: council の Skeptic / Pragmatist / Critic):
| ❌ 悪い | ✅ 良い |
|---|---|
| 同 sema を持つ tool が多数並ぶ | 統合 or rename |
| tool response が prose だけ | 構造化 (status / summary / next_actions / artifacts) |
error が {error: "failed"} | root_cause + retry + stop_if |
| system prompt に 5000 行の guideline | skill に分離して on-demand |
| 全 conversation を subagent に渡す | compact context のみ (anti-anchoring) |
| スキル | 役割 | agent-harness との関係 |
|---|---|---|
agent-introspection | failure の self-debug | 補完: harness で予防、 introspection で検出 |
council | 設計判断 | harness 設計の judgement に council を nest 可 |
santa-method | output 検証 | output 品質 check、 harness 改善の input |
spec-design-guide | 設計記録 | harness 設計を ADR / docs/design に永続化 |
code-review | コード品質 | harness 実装後の品質確認 |
"OK" "failed" のような不透明 string を返す| 軸 | 確認 question |
|---|---|
| Action Space | tool 名は安定? schema は narrow? output は deterministic? |
| Observation | status / summary / next_actions / artifacts 揃ってる? |
| Recovery | root_cause / retry / stop_if 揃ってる? |
| Context Budget | system prompt 不変? skill on-demand? phase で compact? |
agent-harness-construction (Everything Claude Code)D11 Pane Revival)agent-introspection, council, santa-method