retry-failure-classifier
Skill0 starsChanged 4 months agoMITView on GitHub
対象リポジトリ のローカル tool ログ(.claude/logs/*-tools.jsonl)から tool の失敗/リトライ(exit_code 非空非0)を抽出し、多発している tool を分類する。トリガー語彙: リトライ分類, 失敗分類, retry classifier, tool 失敗集計, どの tool がよく失敗, exit_code 集計, 失敗多発 tool
In this repository46 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a11y-standardsSkill
- a11y-static-gateSkill
- adversarial-refute-voteSkill
- antigravity-buildSkill
- architecture-parity-gateSkill
- ci-required-check-installerSkill
- codex-buildSkill
- codex-imagegenSkill
- codex-spark-delegateSkill
- commit-convention-gateSkill
- commit-msg-quality-scoreSkill
- consumer-finding-ledgerSkill
- context-bloat-trackerSkill
- coverage-floor-lockSkill
- destructive-env-guardSkill
- dev-standardsSkill
- eval-dataset-buildSkill
- eval-regression-guardSkill
- fanout-verify-synthSkill
- gate-forgeSkill
- hallucination-rate-meterSkill
- harness-kpi-ledgerSkill
- judge-rubric-voteSkill
- knowledge-citation-coverageSkill
- knowledge-dedup-scanSkill
- knowledge-index-guardSkill
- live-state-verify-guardSkill
- maker-checker-relaySkill
- memory-distillSkill
- mistake-rule-distillSkill
- oneshotSkill
- prompt-ab-evalSkill
- report-shapeSkill
- review-finding-reproSkill
- rule-dedup-scanSkill
- rule-promote-auditSkill
- rule-promotion-extractSkill
- secret-scan-hardeningSkill
- self-heal-ciSkill
- session-length-compact-auditSkill
- startSkill
- subagent-usage-analyzerSkill
- task-success-rate-trackSkill
- token-codegen-gateSkill
- trigger-vocab-dedupSkill
The file
Files
Retry / Failure Classifier(A04)
tool 実行の失敗(非0 exit)を tools.jsonl から機械的に集計し、「どの tool がよく失敗しているか」を分類する観測 skill。月次 /harness-review・自走ループ監視の一次資料。 エンジンは
scripts/agentlog.pyのretryサブコマンド(実データ集計・ハードコード成功なし)。
目的
- 対象リポジトリ が日々吐く gitignore 済みローカルログ
.claude/logs/*-tools.jsonlを横断し、exit_codeが 非空かつ '0' 以外のイベントを失敗/リトライとして抽出する。 - 失敗を tool 名で分類(
by_tool)し降順に並べ、多発 toolを可視化する。 - 空
exit_code(=データ無)は失敗にカウントしない。取得失敗を「0 件」と断定しない(空≠ゼロ件・原則 P1 自己申告禁止)。
実行手順
- 人間可読サマリ:
出力:python3 scripts/agentlog.py retryevents(総イベント数)/exit_code 記録あり/失敗(非0)/failures by tool(降順)。 - 機械可読(standup 記録・パイプライン用):
キー:python3 scripts/agentlog.py retry --jsonsource_ok/total_events/with_exit_code/total_failures/by_tool。 - ログ源の差し替え(テスト・別ディレクトリ調査):
--log-dir DIR。
ログ源が無い時の扱い(観測継続)
.claude/logs/*-tools.jsonlは gitignore 済みでローカルのみ。fresh checkout には存在しない。- 源が無い時は
source_ok=falseとなり「観測継続(データ無)」を印字して exit 0(壊れ扱いにしない)。 - exit_code が記録されていない環境では
with_exit_code=0となり「失敗/リトライ検出なし」を表示する。これはログに exit_code フィールドが乗り始めるまでの想定挙動であり、観測を継続する。
決定論ゲート(--check 相当・自己申告禁止)
停止/完了判定は自己判断でなく機械的 self-test で行う(原則 P1/P2)。本 skill の決定論ゲートは:
python3 scripts/agentlog.py retry --self-test- temp fixture で hermetic に検証(実源には触れない)。
- 検証内容: 正常 fixture の期待集計(failures=2 / by_tool={Bash:1, Edit:1} / with_exit_code=3)と、源欠如時の
source_ok=false+ 「観測継続」レンダリング。 - 全 pass で
retry self-test: PASSを印字し exit 0 / 1 つでも fail で exit 1。
全サブコマンド一括検証は python3 scripts/agentlog.py --self-test。
参照
- エンジン:
scripts/agentlog.py(run_retry/render_retry/selftest_retry・単一ファイル観測 CLI) - 姉妹 skill:
harness-review(本バンドル外)(月次レビューで本ゲートを実走) - 設計原則: 空≠ゼロ件・原則 P1(自己申告禁止)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

