Skip to content

Split on_issue hook into fine-grained section reads #902

@liplus-lin-lay

Description

@liplus-lin-lay

Purpose

on_issue hook の読み込みを操作に応じたサブセクション単位に細分化し、コンテキスト効率を改善する。

Premise

  • 現状:on_issue は [Issue Flow] から [evolution] まで一括読み込み
  • gh issue view するだけでラベル定義、sub-issue ルール、Subagent Delegation、PR Review Judgment が全部コンテキストに入る
  • サブエージェントが gh issue view するたびに Subagent Delegation(自分の委任ルール)まで読み込まれる
  • 必要なのは操作に応じた部分だけ:
    • gh issue view/create/edit → issue body ルール + ラベル定義
    • サブエージェント委任時 → Subagent Delegation のみ(親が読む)
    • PR レビュー結果受領時 → PR Review Judgment のみ(親が読む)
  • gh issue assign は既に operations (Branch_And_Label_Flow) に振り分け済み (Simplify subagent delegation to hook-chain driven workflow #890)

設計方針

operations 層と同じ設計にする。github.md を以下のようなトップレベルセクションに分割し、hook がそれぞれ独立して読めるようにする:

  • [Issue Rules] — issue body ルール、ラベル定義、自律管理
  • [Subagent Delegation] — サブエージェント委任ルール
  • [PR Review Judgment] — PR レビュー判断基準

post-tool-use.sh の on_issue パターンを細分化し、操作に応じて該当セクションだけを読み込む。

Constraints

  • Li+github.md のセクション構造(見出し)を hook が参照できる形に整理する必要がある
  • post-tool-use.sh の get_section の開始・終了マーカーを細分化する
  • Li+claude.md(hook ソースオブトゥルース)の更新が必要

Target Files

  • Li+github.md — セクション構造をトップレベルに分割
  • Li+claude.md — post-tool-use.sh の on_issue パターン細分化
  • docs/2.-Task.md — セクション構造変更の反映(依存)

Metadata

Metadata

Assignees

No one assigned

    Labels

    memoメモとして開始した状態。見出しは必要なものだけでよいspecLi+の挙動に影響する仕様・ポリシー・定義

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions