Loading...
Loading...
PRの変更内容をトリアージし、変更カテゴリ分類・表層チェック・必要リファレンス判定を行います。結果を`.pr-triage.json`に出力し、後続のコードレビューフェーズで活用します。CI環境でのコスト最適化に使用してください。
npx skill4agent add xtone/ai_development_tools pr-triagegh pr view <PR番号> --json title,body,headRefName,baseRefName,changedFilesgh pr diff <PR番号> --name-onlygh pr diff <PR番号>gh pr diff <PR番号> -- <file>.pr-review-state.json.pr-triage.json.pr-review-state.jsonlast_reviewed_commitgit diff <last_reviewed_commit>..HEAD --name-onlysurface_issues"carried_over": truesurface_issuesreview_commentsresolved_issues.pr-triage.json"incremental": true"base_commit""changed_since_last_review""unchanged_since_last_review""resolved_issues"resolved_issues{
"comment_id": 12345678,
"file": "<ファイルパス>",
"line": 42,
"issue": "<元の問題の説明>",
"resolution": "fixed"
}が存在しない場合は、通常のフルトリアージを実行する。.pr-review-state.jsonが不正な形式(JSONパースエラー等)の場合は、警告を出力してフルトリアージを実行する。破損した状態ファイルに基づいてインクリメンタルモードを実行してはならない。.pr-review-state.json
required_referencestypescript-best-practices.mdauthorization-review-general.mdauthorization-review-postgres-rls.mdskill-review.mdgithub-pr-review-actions.mdanyvar.pr-triage.json{
"pr_number": 123,
"incremental": false,
"base_commit": "<前回レビュー時のコミットSHA(インクリメンタル時のみ)>",
"summary": "<変更の概要(1-2文)>",
"files": {
"added": ["<追加ファイルパス>"],
"modified": ["<変更ファイルパス>"],
"deleted": ["<削除ファイルパス>"]
},
"changed_since_last_review": ["<前回から変更があったファイル(インクリメンタル時のみ)>"],
"unchanged_since_last_review": ["<前回から変更がないファイル(インクリメンタル時のみ)>"],
"languages": ["<検出された言語>"],
"frameworks": ["<検出されたフレームワーク>"],
"change_categories": {
"has_auth_changes": false,
"has_db_changes": false,
"has_rls_changes": false,
"has_api_changes": false,
"has_test_changes": false,
"has_config_changes": true,
"has_skill_changes": true
},
"required_references": ["<必要なリファレンスファイル名>"],
"surface_issues": [
{
"severity": "Minor|Suggestion",
"file": "<ファイルパス>",
"line": 15,
"issue": "<問題の説明>",
"suggestion": "<改善案>",
"carried_over": true
}
],
"resolved_issues": [
{
"comment_id": 12345678,
"file": "<ファイルパス>",
"line": 42,
"issue": "<元の問題の説明>",
"resolution": "fixed"
}
],
"diff_summary": "<差分の要約(200文字以内)>",
"estimated_complexity": "low|medium|high",
"focus_areas": ["<レビュー時の注目ポイント>"]
}.pr-triage.json