Skip to content

spec(subagent): simplify delegation to hook-chain driven workflow#895

Merged
liplus-lin-lay merged 5 commits intomainfrom
890-simplify-subagent-delegation
Mar 27, 2026
Merged

spec(subagent): simplify delegation to hook-chain driven workflow#895
liplus-lin-lay merged 5 commits intomainfrom
890-simplify-subagent-delegation

Conversation

@liplus-lin-lay
Copy link
Copy Markdown
Collaborator

@liplus-lin-lay liplus-lin-lay commented Mar 27, 2026

Refs #890
Part of #889

変更内容

サブエージェントへの伝達ルールを hook チェーン駆動 に書き換え。親からの伝達を最小化した。

背景

従来: 親が core + operations パス + issue 番号 + repo + intent を伝達 → サブが2ファイル読み込み。
課題: operations パスの明示伝達が冗長。hook (PostToolUse) がサブで発火することを確認済み。

変更の具体

Li+github.md (Subagent Delegation, L129-133)

  • 変更前: Convey: Li+core.md path, Li+operations.md path, issue number, repository, intent
  • 変更後: Convey: Li+core.md path, issue URL
  • intent は issue body に既にあるため伝達不要
  • hook チェーンの説明追加: self-assign → on_issue → github.md / branch → on_branch → operations.md
  • hook 非対応環境のフォールバック: operations パスも渡す

Li+github.md (Issue_Flow, Sub-issue)

docs/2.-Task.md (伝達内容, L148)

  • 日本語の伝達内容説明を hook チェーン駆動に更新

@liplus-lin-lay
Copy link
Copy Markdown
Collaborator Author

CHANGES_REQUESTED

Li+github.md と docs/2.-Task.md の変更は正確。ただし以下の Target Files が未対応:

  1. Li+agent.md (L74-99 Subagent_Delegation): 伝達ルールがまだ旧仕様(core + operations パス + issue番号 + repo + intent)。hook チェーン駆動(core パス + issue URL のみ)に更新が必要。

  2. Li+claude.md (post-tool-use.sh L213): on_issue パターンが gh issue assign / gh api .*/issues/.*/assignees にもマッチし、Li+github.md を読み込む。サブの self-assign 時は operations.md (Branch_And_Label_Flow) を読み込むべき。assignees 系 API コールを operations 読み込みに振り分ける修正が必要。

Copy link
Copy Markdown
Collaborator

@smileygames smileygames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

まぁたたき台だな!

@liplus-lin-lay liplus-lin-lay force-pushed the 890-simplify-subagent-delegation branch from a9afbf9 to dc8e6e1 Compare March 27, 2026 13:30
サブエージェントへの伝達を最小化し、hook チェーン駆動で自律的にオペレーション
ファイルを読み込むワークフローに変更。

変更前: Li+core.md パス、Li+operations.md パス、issue 番号、リポジトリ、意図を伝達
変更後: Li+core.md パスと issue URL のみ伝達。意図は issue body に記載済み。
Li+operations.md は hook チェーン(on_issue → on_branch → ...)で自動読み込み。
hook 非対応環境ではフォールバックとして operations パスも渡す。

Refs #890
…_Label_Flow

Issue_Flow のブランチ関連記述(sub-issue ブランチルール、gh issue develop リンク制約、
ブランチリンクターゲット)を operations レイヤーの Branch_And_Label_Flow に移動。
on_issue で読み込む内容を issue 管理(ラベル・アサイン・body)に集中させる。
docs/2.-Task.md と docs/3.-Operations.md も対応更新。

Refs #891
Li+agent.md: 委譲ルールをhookチェーン駆動に更新(core path + issue URLのみ伝達)。
Li+github.md で適用済みの簡素化仕様と同じセマンティクスに統一。

Li+claude.md: assignees系APIコール(gh issue assign / gh api .*/issues/.*/assignees)を
on_issueブロックより前でインターセプトし、Li+operations.md Branch_And_Label_Flow を
読み込むよう修正。assign = 即行動 = ブランチ作業開始のため。

Refs #890
委任セクションをhookチェーン駆動仕様に更新。
post-tool-use.sh テーブルに assignees インターセプト行を追加。

Refs #890
Refs #897

hook が利用できない環境でのフォールバックに Li+github.md パスを追加。
サブエージェントが hook チェーンなしで起動した場合、on_issue による
Li+github.md 自動読込が発火しないため、明示的にパスを伝える必要がある。

対象ファイル: Li+github.md, Li+agent.md, docs/2.-Task.md, docs/4.-Adapter.md
@liplus-lin-lay liplus-lin-lay merged commit b9decb8 into main Mar 27, 2026
2 checks passed
@liplus-lin-lay liplus-lin-lay deleted the 890-simplify-subagent-delegation branch March 27, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify subagent delegation to hook-chain driven workflow

2 participants