mcpField
V
validator-issue

validator-issue

github.com/codagent-ai開発3063 回インストール1 日前に更新
リポジトリ

validator-issue について

validator-issue は、agent-validator の実行時証拠を集め、構造化された GitHub バグ報告を作成するスキルです。自動登録モードを除き、登録前に内容を提示して確認を求めます。

主な機能

  1. 01設定と実行ログの収集
  2. 02構造化 GitHub Issue の作成
  3. 03報告内容の全体プレビュー
  4. 04自動登録モードへの対応

活用シーン

  1. 01validator の不具合疑いを報告
  2. 02バグ報告に実行時情報を添付

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/codagent-ai/agent-validator --skill validator-issue

インストール後、Claude Code で/validator-issueを入力して読み込まれたか確認します。

詳細

/validator-issue

実行時の証拠を収集し、agent-validator のバグが疑われる場合に構造化された GitHub issue の下書きを作成し、完全なプレビューを提示して、確認後にのみ起票します — 自動起票モードで呼び出された場合を除きます。

ステップ 1: バグの説明とモードを取得する

自動起票モードを確認する: $ARGUMENTS が --auto-file で始まる場合、自動起票モードを オン に設定し、プレフィックスを除去して残りのテキストをバグの説明として取得します。自動起票モードがオンの場合は、確認ステップ(ステップ 4)をスキップします。

説明を取得する:

  • --auto-file プレフィックスを除去した後に空でない説明が残っている場合は、それをバグの説明として使用し、ステップ 2 に進みます。

  • $ARGUMENTS が空の場合(または除去後に空になる場合)、ユーザーに尋ねます:

    「agent-validator で発生したバグについて説明してください。何が起きたのか、何を期待していたのか、何をしようとしていたのかを教えてください。」

    続行する前にユーザーの回答を待ちます。

ステップ 2: 証拠を収集する

まず .validator/config.yml を読み込み、log_dir を解決します(フィールドが存在しない場合、またはファイルが存在しない場合のデフォルト: validator_logs)。

以下の証拠を収集します。各項目について、存在しない場合はその旨を記録します — ファイルが見つからなくても失敗しないでください:

  1. 設定ファイル: .validator/config.yml を全文読み込みます。
  2. デバッグログ(最後の 50 行): <log_dir>/.debug.log の最後の 50 行を読み込みます。
    tail -n 50 <log_dir>/.debug.log
    
  3. 実行状態: <log_dir>/.execution_state の全内容を読み込みます。

どのファイルが見つかり、どのファイルが存在しなかったかを記録します。

ステップ 3: issue の下書きを作成する

以下の構造で GitHub issue の下書きを作成します:

## Problem

<A clear, concise description of the bug. Based on the user's description.>

## Steps to Reproduce

<Step-by-step instructions to reproduce the issue. Infer from the description and evidence, or note "Not yet determined" if unclear.>

## Expected vs Actual

**Expected:** <What should have happened>

**Actual:** <What actually happened>

## Evidence

> **Before including evidence, redact sensitive values**: remove or replace tokens, API keys, email addresses, and absolute local paths that may appear in config, logs, or state. Replace them with `[REDACTED]` or a generic placeholder.

**Config (`.validator/config.yml`):**
<Paste only relevant, non-sensitive config values. Redact tokens, emails, and absolute paths. Note "File not found" if absent.>

**Debug log (last 50 lines of `<log_dir>/.debug.log`):**
<Paste minimal relevant excerpt with sensitive values redacted. Note "File not found" if absent.>

**Execution state (`<log_dir>/.execution_state`):**
<Paste only fields needed to diagnose the bug; redact sensitive values. Note "File not found" if absent.>

**Absent files:** <List any files that were not found, or "None">

簡潔で説明的なタイトルを選びます: Bug: <問題の短い要約>。

ステップ 4: プレビューを表示して確認する

完全な下書きをユーザーに提示します — タイトルと本文の両方です。

自動起票モードがオンの場合: issue が自動的に起票されることをユーザーに通知し(タイトルと本文を表示)、尋ねずに直接ステップ 5 に進みます。

それ以外の場合、尋ねます:

「これが下書きの issue です。起票してもよろしいですか?(yes/no)」

  • ユーザーが確認した場合: ステップ 5 に進みます。
  • ユーザーが拒否した場合: issue を作成せずに終了します。issue は起票されなかったことをユーザーに伝えます。

ステップ 5: issue を起票する

本文テキスト内の特殊文字によるシェル補間の問題を避けるため、issue の本文を一時ファイルに書き込み、--body-file を介して渡します:

ISSUE_TITLE=$(cat <<'TITLE_EOF'
Bug: <short summary>
TITLE_EOF
)
BODY_FILE=$(mktemp)
cat > "$BODY_FILE" << 'ISSUE_EOF'
<paste the full issue body here>
ISSUE_EOF
gh issue create --repo Codagent-AI/agent-validator --title "$ISSUE_TITLE" --body-file "$BODY_FILE"
rm -f "$BODY_FILE"

作成された issue の URL をユーザーに報告します。

コメント