Skip to content

導入: agent-ops-auditor SubAgent を追加し、監査を main context から隔離する #1025

Open

Description

@squne121

Machine-Readable Contract

```yaml
contract_schema_version: v1
issue_kind: implementation
goal_ref: "agent-ops-auditor SubAgent が read-only で監査を行い、AGENT_OPS_AUDIT_RESULT_V1 compact result と artifact path のみ返す"
change_kind: new_feature
risk_class: agent_ops_guard
affected_runtimes:

  • claude_code
  • codex_cli
    non_goals:
  • "nested SubAgent delegation"
  • "write-capable auditor"
  • "raw log の stdout 出力"
  • "product runtime code 変更"
    ```

Parent Issue

なし(standalone 実装 Issue)

Parent Goal Ref

agent ops 監査の main context 隔離(#1014 refinement loop での調査過程 main context 流入の再発防止)

Current Validated Scope

  • .claude/agents/agent-ops-auditor.md
  • .codex/agents/agent-ops-auditor.toml
  • scripts/check-codex-agents.mjs
  • tests/fixtures/codex-agent-config/expected-runtime-contract.json

Remaining Parent Gaps

なし

Outcome

agent-ops-auditor SubAgent が read-only で監査を行い、AGENT_OPS_AUDIT_RESULT_V1 compact result と artifact path のみ返す。

In Scope

  • .claude/agents/agent-ops-auditor.md の新規追加
  • .codex/agents/agent-ops-auditor.toml の新規追加
  • scripts/check-codex-agents.mjs への required agent 追加
  • tests/fixtures/codex-agent-config/expected-runtime-contract.json の更新
  • bridge skill surface が必要な場合の .agents/skills/... 薄い wrapper

Out of Scope

  • nested SubAgent delegation
  • write-capable auditor
  • raw log の stdout 出力
  • product runtime code 変更

背景

agent ops 監査は、作業ログ、Issue/PR、hook/skill/subagent/rules/scripts を横断するため、main thread で実行すると token 消費と context 汚染が大きい。

Acceptance Criteria

  • AC1: Claude Code 側 agent は Read/Grep/Glob/Bash のみ許可し、Write/Edit/MultiEdit/Agent を禁止する。
  • AC2: Codex 側 agent は readonly profile を使う。
  • AC3: 出力は AGENT_OPS_AUDIT_RESULT_V1 compact result のみ。
  • AC4: raw logs / raw issue body / raw comments は artifact path 参照に限定する。
  • AC5: scripts/check-codex-agents.mjs が agent definition と bridge surface を検証する。
  • AC6: skill body は thin wrapper にし、手順本文を重複させない。

Verification Commands

# AC1
uv run pytest tests/agent_ops/test_agent_ops_auditor_agent.py -q
# AC2
uv run pytest tests/agent_ops/test_agent_ops_auditor_agent.py -q
# AC3
uv run pytest tests/agent_ops/test_agent_ops_auditor_agent.py -q
# AC4
uv run pytest tests/agent_ops/test_agent_ops_auditor_agent.py -q
# AC5
uv run pytest tests/agent_ops/test_agent_ops_auditor_agent.py -q
# AC6
uv run pytest tests/agent_ops/test_agent_ops_auditor_agent.py -q

Allowed Paths

  • .claude/agents/agent-ops-auditor.md
  • .codex/agents/agent-ops-auditor.toml
  • .agents/skills/
  • scripts/check-codex-agents.mjs
  • tests/fixtures/codex-agent-config/expected-runtime-contract.json
  • tests/agent_ops/test_agent_ops_auditor_agent.py

Runtime Verification Applicability

decision: not_applicable
reason: "新規 agent 定義追加の範囲で完結し、interactive runtime 証跡を成功条件に含まない"

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • .claude/agents/ の既存 agent 定義形式と非互換な場合
  • scripts/check-codex-agents.mjs の既存検証ロジックを破壊する場合

Required Skills

  • agent definition authoring(Claude Code / Codex CLI)
  • scripts/check-codex-agents.mjs 理解

Delivery Rule

  • 1 Issue = 1 PR で完了する。
  • Draft PR を既定とする。

Activity

  1. added
    enhancement
    workflow
    area/ai-ops
    on Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ai-opsenhancementworkflow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions