Skip to content

実装: AI駆動開発における SubAgent 観察結果の Orchestrator ルーティングと GitHub 反映責務を定義する #197

Open

Description

@squne121

Machine-Readable Contract

contract_schema_version: v1
issue_kind: implementation
parent_issue: "none"
goal_ref: "SubAgent が作業中に発見した不整合・派生改善・人間判断事項を、直接 mutation せず orchestrator に構造化報告し、orchestrator が適切な経路へ委任する運用設計を定義する"
change_kind: docs

Parent Issue

none

Parent Goal Ref

  • Goal: AI駆動開発において SubAgent の観察結果が orchestrator を経由して適切な GitHub アクションに変換されるよう、責務境界と routing 規則を docs/dev/agent-skill-boundaries.md に定義する
  • Desired Destination: GitHub を人間向け primary interface としつつ、不要な「Issueを修正するIssue」「milestone割当Issue」「metadata修正Issue」を増やさず、必要な follow-up だけを Issue 化できる状態

Current Validated Scope

  • docs/dev/agent-skill-boundaries.md に SUBAGENT_OBSERVATION_V1 スキーマを追加する
  • FOLLOW_UP_ISSUE_REQUEST_V1 は SUBAGENT_OBSERVATION_V1 から派生する Issue化専用 payload と位置づける関係を明記する
  • SubAgent は mutation 判断をしない、orchestrator が routing owner であることを明記する
  • observation の action フィールドに routing table(edit_current_issue / edit_current_pr / create_follow_up_issue / metadata_update / comment_question / record_note / human_escalation)を追加する
  • 「Issueを修正するIssue」「Milestone割当Issue」「Label修正Issue」など不要 Issue パターンを分類・禁止ルールとして明記する
  • issue-refinement-loop の終了処理から observation を集約することを明記する

Remaining Parent Gaps

なし

Outcome

docs/dev/agent-skill-boundaries.md に SUBAGENT_OBSERVATION_V1 が追加され、SubAgent → orchestrator → GitHub の責務境界と routing table が定義され、不要 Issue パターンの原則禁止が明記された状態

In Scope

  • docs/dev/agent-skill-boundaries.md への SUBAGENT_OBSERVATION_V1 スキーマ追加
  • FOLLOW_UP_ISSUE_REQUEST_V1 を SUBAGENT_OBSERVATION_V1 の派生 payload と位置づける記述
  • SubAgent は mutation 判断をしない、orchestrator が routing owner であることの明記
  • orchestrator が各 action に分類する routing table の追加(edit_current_issue / edit_current_pr / create_follow_up_issue / metadata_update / comment_question / record_note / human_escalation)
  • 「Issueを修正するIssue」は原則禁止の明記
  • milestone / label / project field の単純付与は原則 Issue 化しないことの明記
  • issue-refinement-loop の終了処理から observation を集約することの明記

Out of Scope

  • create-issue / edit-issue の内部実装変更
  • GitHub Projects 自動化実装
  • 既存 Issue 群への一括 milestone 移行
  • Agent SDK typed tool 化

Acceptance Criteria

  • AC1: docs/dev/agent-skill-boundaries.md に SUBAGENT_OBSERVATION_V1 が定義されている
  • AC2: SubAgent は Issue/PR mutation の最終判断を行わず orchestrator に報告する、と明記されている
  • AC3: orchestrator が各 action に分類する routing table がある(edit_current_issue / edit_current_pr / create_follow_up_issue / metadata_update / comment_question / record_note / human_escalation)
  • AC4: 「Issueを修正するIssue」は原則禁止と明記されている
  • AC5: milestone / label / project field の単純付与は原則 Issue 化しないと明記されている
  • AC6: follow-up 技術的負債のみ FOLLOW_UP_ISSUE_REQUEST_V1 に変換する関係が明記されている

Verification Commands

  • pnpm typecheck — TypeScript 型エラーなし
  • pnpm lint — ESLint エラーなし
  • pnpm test — Vitest 全件 PASS
  • pnpm build — vite build 成功
# AC1: SUBAGENT_OBSERVATION_V1 が定義されている
rg "SUBAGENT_OBSERVATION_V1" docs/dev/agent-skill-boundaries.md && echo "PASS: AC1" || echo "FAIL: AC1"

# AC2: SubAgent は mutation 判断をしない旨が明記されている
rg "orchestrator|routing owner" docs/dev/agent-skill-boundaries.md | rg -q "SubAgent|mutation" && echo "PASS: AC2" || echo "FAIL: AC2"

# AC3: routing table の必須 action が存在する
rg "create_follow_up_issue" docs/dev/agent-skill-boundaries.md && rg "human_escalation" docs/dev/agent-skill-boundaries.md && echo "PASS: AC3" || echo "FAIL: AC3"

# AC4: 「Issueを修正するIssue」が禁止と明記されている
rg "Issue.*修正.*Issue" docs/dev/agent-skill-boundaries.md && echo "PASS: AC4" || echo "FAIL: AC4"

# AC5: milestone/label の単純付与は Issue 化しない旨が明記されている
rg "milestone|label" docs/dev/agent-skill-boundaries.md | rg -q "Issue 化しない\|Issue化しない\|禁止\|原則" && echo "PASS: AC5" || echo "FAIL: AC5"

# AC6: FOLLOW_UP_ISSUE_REQUEST_V1 が SUBAGENT_OBSERVATION_V1 の派生 payload と明記されている
rg "FOLLOW_UP_ISSUE_REQUEST_V1" docs/dev/agent-skill-boundaries.md | rg -q "派生\|SUBAGENT_OBSERVATION" && echo "PASS: AC6" || echo "FAIL: AC6"

Allowed Paths

  • docs/dev/agent-skill-boundaries.md

Stop Conditions

  • Allowed Paths 外の変更が必要と判明した場合
  • In Scope の固定契約(キー集合・スキーマ・型定義)の変更が必要になった場合
  • 新規 Issue の起票が必要と判断した場合(スコープ分割が発生する場合)
  • 後続 Phase / 別スコープへの波及が判明した場合
  • nested SubAgent delegation が必要になった場合
  • 外部サービス利用・権限昇格・既存テスト大規模改変が必要になった場合

Required Skills

なし

Runtime Verification Applicability

decision: not_applicable
reason: "docs テキストファイルへの決定論的変更のみ。ゲームランタイム・ブラウザ動作確認は不要"

Delivery Rule

本 Issue は docs/dev/agent-skill-boundaries.md への追記のみを対象とする。
実装完了時は AC1-AC6 の Verification Commands が全件 PASS していること。
スキーマ追加後、FOLLOW_UP_ISSUE_REQUEST_V1 との関係記述が既存セクション(152-198 行付近)と矛盾しないことを確認すること。

背景

Issue #194「実装: issue-refinement-loop の派生改善候補処理に「即時実行 vs Issue 起票」判断基準を追加する」は、「gh issue edit で済む修正を Issue 化した」という局所パッチに過ぎず OWNER(squne121)により close 対象と判断された(参照: https://github.com/squne121/loop-protocol/issues/194#issuecomment-4513734938)。

本質的課題は、SubAgent が作業中に見つけた不整合・派生改善を orchestrator に構造化報告し、orchestrator が適切な経路へ委任する運用設計が未定義であること。既存の FOLLOW_UP_ISSUE_REQUEST_V1 は Issue 化専用の payload に過ぎず、その上位に「SubAgent が観察を報告する」契約(SUBAGENT_OBSERVATION_V1)が必要。また「Issueを修正するIssue」などの不要 Issue パターンを明示的に禁止するルールも未整備であった。

Scope Delta(任意)

N/A

Activity

  1. added
    enhancement
    phase/implementation
    state/queued
    agent/implementer
    on May 22, 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

    agent/implementerenhancementphase/implementationstate/queued

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions