Skip to content

perf(#296): OUTPUT_BUDGET_V1 効果測定 — SubAgent 代表実行での output_chars/lines 測定 #312

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: research
parent_issue: "#293"
goal_ref: "claude/AI 運用の usage コスト削減"
change_kind: research-only

Parent Issue

#293

Source

Background

PR #310(Issue #296)で OUTPUT_BUDGET_V1 をプロンプトレベルの規約として全 SubAgent に配布した。しかし Effectiveness Applicability: soft_constraint_only と明示した通り、token/コスト削減の実証は含まれていない。#293 の親目的(claude/AI 運用コスト削減)を達成するために、OUTPUT_BUDGET_V1 が実際に出力量を抑制しているかを SubAgent 代表実行で測定する。

Outcome

代表 SubAgent 5 種(issue-reviewer / pr-reviewer / test-runner / implementation-worker / issue-refinement-loop)の output_chars・output_lines を各 1 回以上実行して記録し、OUTPUT_BUDGET_V1 準拠状況(schema_fields_present / full_body_reprint_detected / NEEDS_EXPANSION 発動率)を集計したレポートコメントが本 Issue に投稿され、効果判断または後続 implementation Issue の起票判断が可能な状態になること。

In Scope

  • 測定対象 SubAgent(最低 5 種)の代表実行 1 回ずつ:
    • issue-reviewer
    • pr-reviewer
    • test-runner
    • implementation-worker
    • issue-refinement-loop
  • 以下の指標を各実行分記録:
    • output_chars(文字数)
    • output_lines(行数)
    • schema_fields_present(機械可読フィールドの存在率)
    • full_body_reprint_detected(全文再掲の有無: true/false)
    • NEEDS_EXPANSION count(escape_hatch 発動回数)
  • 集計結果・考察・後続アクション推奨を本 Issue コメントとして投稿
  • OUTPUT_BUDGET_V1 の効果が不十分と判断された場合の implementation Issue 起票候補案の記載

Out of Scope

  • SubAgent プロンプトの変更・実装修正
  • OUTPUT_BUDGET_V1 の仕様変更
  • 本番ワークロードへの自動計装(CI 組み込み等)
  • n=1 以上の統計的有意性の検証(この Issue では代表サンプルのみ)

Acceptance Criteria

  • AC1: 測定対象 5 SubAgent それぞれの output_chars / output_lines が本 Issue コメントに記録されている
  • AC2: schema_fields_present(機械可読フィールドの存在率)が各 SubAgent 分記録されている
  • AC3: full_body_reprint_detected(全文再掲の有無)が各 SubAgent 分記録されている
  • AC4: NEEDS_EXPANSION count(escape_hatch 発動回数)が各 SubAgent 分記録されている
  • AC5: 集計結果をもとに「OUTPUT_BUDGET_V1 の効果あり / 要改善」の判断が本 Issue コメントに記載されている
  • AC6: 効果不十分の場合は後続 implementation Issue の起票候補案が記載されている

Verification Commands

# AC1: output_chars / output_lines 記録の確認
gh issue view <ISSUE_NUMBER> --comments --repo squne121/loop-protocol | grep -c "output_chars"

# AC2: schema_fields_present 記録の確認
gh issue view <ISSUE_NUMBER> --comments --repo squne121/loop-protocol | grep -c "schema_fields_present"

# AC3: full_body_reprint_detected 記録の確認
gh issue view <ISSUE_NUMBER> --comments --repo squne121/loop-protocol | grep -c "full_body_reprint_detected"

# AC4: NEEDS_EXPANSION 記録の確認
gh issue view <ISSUE_NUMBER> --comments --repo squne121/loop-protocol | grep -c "NEEDS_EXPANSION"

# AC5: 効果判断コメントの存在確認
gh issue view <ISSUE_NUMBER> --comments --repo squne121/loop-protocol | grep -E "効果あり|要改善"

# AC6: 後続実装候補の記載確認(効果不十分の場合のみ)
gh issue view <ISSUE_NUMBER> --comments --repo squne121/loop-protocol | grep -E "implementation Issue|起票候補"

Allowed Paths

  • 読み取り専用。リポジトリ変更なし(既定)

Stop Conditions

  • Outcome / Scope / AC が検索可能な形で記載されていない場合は即停止
  • Allowed Paths 外への書き込みを試みた場合は即停止
  • 権限不足(permission denied)により操作が完了できない場合は即停止
  • 成果物の書き込みに失敗した場合(I/O エラー等)は即停止
  • 測定対象 SubAgent が 3 種以下しか実行できない場合は中断して報告

Handoff Contract

Runtime Verification Applicability

  • decision: not_applicable
  • reason: 本 Issue の成果物は本 Issue コメントへの測定記録であり、コード変更を伴わないため静的検証のみで完結する

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions