ワンクリックで
agent-harness
AI agent の action space・tool 定義・observation format を設計し、completion rate を上げる。 agent harness を構築・最適化するときの語彙と判断軸を提供する。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
AI agent の action space・tool 定義・observation format を設計し、completion rate を上げる。 agent harness を構築・最適化するときの語彙と判断軸を提供する。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
作業の完了を宣言する前に使用。証拠なき完了宣言を防ぐ規律スキル。
AI agent 自身の failure (loop / drift / max tool call / 環境ズレ) に対する構造化 self-debug。 capture → diagnose → contained recovery → introspection report の 4 phase で、 retry blind を防ぎ human escalation の前に agent が自己修正する。
Chronistaとして活動するための包括的スキルセット。永続記憶、開発フロー、ドキュメント管理、インフラを統合。
Mac M-series で Rust binary を zigbuild で linux/amd64 に cross-compile → slim Dockerfile に COPY → docker buildx --push する開発ループ標準化。 sccache + zig cache + cargo target/ + buildx registry cache の多層 cache を仕込み、 2 回目以降は秒単位の image 更新を実現する。 GH Actions (cargo-chef + GHA cache 10 GiB 制限) からの脱却 path として使う。
コードレビューの実行手法と規律。スコープに応じて Quick / Standard / Deep モードを選択、team-bucciarati の Stand を観点別に dispatch。レビューする側 / 受ける側の両方をカバー。
多義的な意思決定・トレードオフ・go/no-go 判断のために、4 voice の合議を召集する。複数の妥当な path が存在し、選択前に構造化された反対意見が必要なときに使う。
SOC 職業分類に基づく
| name | agent-harness |
| description | AI agent の action space・tool 定義・observation format を設計し、completion rate を上げる。 agent harness を構築・最適化するときの語彙と判断軸を提供する。 |
| version | 1.0.0 |
| origin | ECC (Everything Claude Code) — chronista 適合 fork |
| tags | ["agent-design","harness","action-space","observation","tool-design"] |
「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