Skip to content
Back to skills

Incident Fix

ASecurity

第2層。査読 RETRY の指摘に対し、追加調査・再実験・artifact 修正、または技術的根拠を示した反論で対応する。調査セッションを継続(resume)し、指摘ごとの処置表をコメント投稿する。scope 拡大はしない。

  • 18 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added October 1, 2026
ai-agentsbash

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add apokamo/kaji --skill incident-fix --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Incident Fix?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Incident Fix
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/apokamo-incident-fix/badge)](https://www.skillsdirectory.com/skills/apokamo-incident-fix)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: 第2層。査読 RETRY の指摘に対し、追加調査・再実験・artifact 修正、または技術的根拠を示した反論で対応する。調査セッションを継続(resume)し、指摘ごとの処置表をコメント投稿する。scope 拡大はしない。
name: incident-fix
---

# Incident Fix(修正)

直近の査読 RETRY コメントの指摘に対応し、調査 artifact を更新する。`incident.yaml` では
`resume: investigate`(調査セッションを継続)で起動される。

**収束保証**: 指摘対応以外の scope 拡大(新しい調査論点の追加)は行わない。

**ワークフロー内の位置**: review/verify(RETRY)→ **fix** → verify

## 入力

| 変数 | 型 | 説明 |
|------|-----|------|
| `issue_id` | str | 対象インシデントイシュー ID |
| `issue_ref` | str | 人間可読の Issue 参照 |
| `step_id` | str | 現在のステップ ID |
| `cycle_count` / `max_iterations` | int | サイクル内ステップのため注入される |

`resume: investigate` により直近査読 verdict の要約が prompt に注入される。手動実行時は
`$ARGUMENTS` 第 1 トークンを `issue_id` とする。

## 共通ルール

`.claude/skills/incident-investigate/SKILL.md` § 全 incident-* skill 共通ルールに従う。

反論の条件・処置表・残件表の受け渡しは [_shared/rebuttal.md](../_shared/rebuttal.md) を正本とする。

## 実行手順

### Step 1: 指摘の抽出

artifact root を解決する(共通ルール参照。以降のパスはこの絶対 root 基準):

```bash
ART="$(kaji config artifacts-dir)"
```

[_shared/rebuttal.md](../_shared/rebuttal.md) § 1.2 に従い、body 1 行目が `step=review` または `step=verify` の
marker 付き `RETRY` コメントのうち **最新の 1 件** の残件表だけを入力にする。抽出対象は `指摘 N` だけでなく
残件表の全 ID(`退行 N`、子 ID `指摘 N.1` を含む)とする。それより前の報告は読まない:

```bash
kaji issue view [issue_id] --comments
```

修正開始時の artifact の `sha256sum`(修正前の版)を控え、修正前の本文を sha256 名で写しておく
(`incident-verify` が修正前と修正後の本文を比べるため。ハッシュだけでは比べられない):

```bash
REPORT="$ART/[issue_id]/investigation/report.md"
PRE_SHA=$(sha256sum "$REPORT" | cut -d' ' -f1)
mkdir -p "$ART/[issue_id]/investigation/versions"
cp "$REPORT" "$ART/[issue_id]/investigation/versions/report.$PRE_SHA.md"
```

控えた写しは上書き・削除しない(sha256 名のため同じ本文なら同じ path になる)。

### Step 2: 指摘への対応

残件表の行ごとに `同意` か `反論` を決め、[_shared/rebuttal.md](../_shared/rebuttal.md) に従い処置表を作る
(書式・版・子 ID は § 1.1 / § 1.2、反論してよい条件は § 2、`反論` の行に書くことは § 3)。

- **`同意`**: 追加調査・再実験・artifact 修正で対応する。不足していた citation の追加、再現実験の再試行、
  棄却仮説・不足証拠の補強、conclusion の見直し。使い捨て検証環境を使う場合は調査後に破棄する。
- **`反論`**: 証跡(citation / 再現結果)を添える。
- **1 件の一部に同意し一部に反論する場合**: その行を子 ID(`指摘 N.1` = `同意`、`指摘 N.2` = `反論`)に分け、
  子ごとに 1 行を書く。閉じていない子 ID は次の残件表に子 ID のまま戻る(§ 1.2)。
- 人の判断が要る指摘は反論にせず `ABORT` で返す。

`同意` の行だけ調査 artifact(`$ART/[issue_id]/investigation/report.md`)を更新する。すべての行が `反論` の場合は
artifact を変更しない(修正前と修正後に同じ sha256 を書く)。**新しい調査論点の追加(scope 拡大)はしない**。

### Step 3: 処置表のコメント投稿

処置表をコメント投稿する。指摘参照は `指摘 N` 形式(auto-close hazard 回避)。verdict マーカーを無条件付与する。
報告には次の見出しと表を含める。

```markdown
### 処置表

- 入力: <入力にした残件表のコメント URL>
- 版: artifact `$ART/[issue_id]/investigation/report.md` の修正前 sha256 <hex> → 修正後 sha256 <hex>
- 修正前本文の写し: `$ART/[issue_id]/investigation/versions/report.<修正前 sha256>.md`

| 指摘 | 処置 | 理由 | 証跡 |
|------|------|------|------|
| 指摘 1: (要旨) | 同意 | (なぜ直すか) | (artifact の変えた節) |
| 指摘 2.1: (要旨の一部) | 同意 | (なぜ直すか) | (artifact の変えた節) |
| 指摘 2.2: (要旨の残り) | 反論 | 条件 N | 証跡: … 代わりの案: … 残るリスク: … |
```

```bash
kaji issue comment [issue_id] --commit \
  --verdict-step fix --verdict-status <STATUS> \
  --body-file <対応報告 markdown>
```

## Verdict 出力

---VERDICT---
status: PASS
reason: |
  査読指摘に対応し、調査 artifact を更新した
evidence: |
  処置表の各行に同意 / 反論を記録。追加 citation・再現結果を artifact に反映
suggestion: |
---END_VERDICT---

### status の選択基準

| status | 条件 |
|--------|------|
| PASS | 残件表の全行を処置表に載せた(verify で確認へ) |
| ABORT | 前提崩壊(対象が非インシデント等) |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.