目的
github-rag-mcp を Lin/Lay の記憶 DB として機能させるため、判断履歴の主要容器であるコメント系を ingest 対象に追加する。現状 issue/PR body + commit + release + docs しか入っておらず、コメント欄での判断履歴 (Master の指摘、AI 応答、セルフレビュー now/later/accepted 分類) が retrieval から欠落している。
前提 (検証済み 2026-04-23)
liplus-rag-mcp GitHub App の permission は Issues Read-only (related comments 含む) / Pull requests Read-only (related comments 含む) を grant 済。許可面は揃っている。
- 現状の ingest パイプライン (src/webhook.ts / src/pipeline.ts / src/poller.ts) は issue / pull_request / release / push のみ処理。
issue_comment / pull_request_review / pull_request_review_comment のハンドラなし。
- 直前の v0.8.0 で tool surface を
search_issues 1 つに統合済み。追加する type 値は search_issues の type enum 拡張で透過的にアクセス可能。
制約
ingest 対象と type 分類
| イベント |
新規 type 値 |
内容 |
issue_comment (issues + PRs 両方の top-level コメント) |
issue_comment |
comment body |
pull_request_review (submitted / edited / dismissed) |
pr_review |
review body (approve / request_changes / comment) |
pull_request_review_comment (created / edited / deleted) |
pr_review_comment |
行単位のインライン diff コメント |
bot フィルタ (必須)
sender.login が /\[bot\]$/ に match する場合は ingest しない (例: cloudflare-workers-and-pages[bot], github-actions[bot], dependabot[bot], liplus-rag-mcp[bot])
- フィルタは webhook ハンドラ側と poller 側の両方で適用
最小文字数
- comment body が 10 文字未満 (trim 後) の場合はスキップ。絵文字のみ /
LGTM 単独 / +1 等のノイズ排除
pipeline.ts 拡張
- 新規関数:
ingestIssueComment(...), ingestPRReview(...), ingestPRReviewComment(...)
- 各関数で bodyHash による変更検知 + 無変化スキップ
- embedding 入力 =
author\n\n + comment/review body (top-level の context のため author を prefix)
- IssueStore に新 key space (
comment:{repo}:{id}, review:{repo}:{id}, review_comment:{repo}:{id})
- Vectorize メタデータに既存スキーマと互換性のある形で type 追加
webhook.ts 拡張
eventType switch に 3 ケース追加 (issue_comment / pull_request_review / pull_request_review_comment)
- action フィルタ:
deleted の場合は IssueStore からの削除 + Vectorize 削除 (レコード消失の伝播)
poller.ts 拡張 (backfill)
- 既存の recent issues/PRs/releases/commits poll に加え、recent-activity window 内の comments backfill
- API 呼び出し最適化:
/issues/{N}/comments は issue ごとに 1 回 / /pulls/{N}/reviews / /pulls/{N}/comments も PR ごとに 1 回
- ratelimit 配慮: POLL_REPOS の件数 × 最近 N 件の issue/PR 分の API 呼び出しが増える。必要なら per-repo 件数で cap
search_issues の type enum 拡張
- 既存:
"issue" / "pull_request" / "release" / "doc" / "diff" / "all"
- 追加:
"issue_comment" / "pr_review" / "pr_review_comment"
"all" は全 type を含む semantics のまま維持
GitHub App webhook 購読 (merge 後の手動設定)
- GitHub App
liplus-rag-mcp の "Subscribe to events" で以下 3 つを有効化必要:
- Issue comment
- Pull request review
- Pull request review comment
- これは Master がダッシュボードで有効化する設定変更。コード側では対応ロジックだけ用意する。
Docs 更新
README.md / README.ja.md の search_issues パラメータ表で type enum を新 3 値含む形に更新
- 新 type 値の説明と使用例を追記
Target files
src/webhook.ts — 3 ケース追加
src/poller.ts — backfill 3 経路追加
src/pipeline.ts — ingest 関数 3 つ + bot フィルタ helper
src/types.ts — 新レコード型定義
src/store.ts — key space 追加 (必要に応じて)
src/mcp.ts — search_issues の type enum 拡張
README.md / README.ja.md — type 表更新
範囲
minor (新しい ingest type = user/system observable な新機能)
リリース後の手動ステップ
merge 後、Master が GitHub App ダッシュボード (https://github.com/settings/apps/liplus-rag-mcp/permissions) の "Subscribe to events" で以下を有効化:
- Issue comment ✓
- Pull request review ✓
- Pull request review comment ✓
poller の next tick で既存 comments は backfill される (hourly cron trigger)。webhook による realtime ingest は購読設定後から効く。
関連
- 判断記録候補: 本件 merge 後に
docs/f.-*.md として判断記録化を検討 (Li+ 記憶 DB の前提設計がここで固まる)
- 前段: PR #105 (v0.8.0、tool surface 1 化)
目的
github-rag-mcp を Lin/Lay の記憶 DB として機能させるため、判断履歴の主要容器であるコメント系を ingest 対象に追加する。現状 issue/PR body + commit + release + docs しか入っておらず、コメント欄での判断履歴 (Master の指摘、AI 応答、セルフレビュー now/later/accepted 分類) が retrieval から欠落している。
前提 (検証済み 2026-04-23)
liplus-rag-mcpGitHub App の permission は Issues Read-only (related comments 含む) / Pull requests Read-only (related comments 含む) を grant 済。許可面は揃っている。issue_comment/pull_request_review/pull_request_review_commentのハンドラなし。search_issues1 つに統合済み。追加する type 値は search_issues のtypeenum 拡張で透過的にアクセス可能。制約
ingest 対象と type 分類
issue_comment(issues + PRs 両方の top-level コメント)issue_commentpull_request_review(submitted / edited / dismissed)pr_reviewpull_request_review_comment(created / edited / deleted)pr_review_commentbot フィルタ (必須)
sender.loginが/\[bot\]$/に match する場合は ingest しない (例:cloudflare-workers-and-pages[bot],github-actions[bot],dependabot[bot],liplus-rag-mcp[bot])最小文字数
LGTM単独 /+1等のノイズ排除pipeline.ts 拡張
ingestIssueComment(...),ingestPRReview(...),ingestPRReviewComment(...)author\n\n+ comment/review body (top-level の context のため author を prefix)comment:{repo}:{id},review:{repo}:{id},review_comment:{repo}:{id})webhook.ts 拡張
eventTypeswitch に 3 ケース追加 (issue_comment/pull_request_review/pull_request_review_comment)deletedの場合は IssueStore からの削除 + Vectorize 削除 (レコード消失の伝播)poller.ts 拡張 (backfill)
/issues/{N}/commentsは issue ごとに 1 回 //pulls/{N}/reviews//pulls/{N}/commentsも PR ごとに 1 回search_issues の
typeenum 拡張"issue" / "pull_request" / "release" / "doc" / "diff" / "all""issue_comment" / "pr_review" / "pr_review_comment""all"は全 type を含む semantics のまま維持GitHub App webhook 購読 (merge 後の手動設定)
liplus-rag-mcpの "Subscribe to events" で以下 3 つを有効化必要:Docs 更新
README.md/README.ja.mdのsearch_issuesパラメータ表でtypeenum を新 3 値含む形に更新Target files
src/webhook.ts— 3 ケース追加src/poller.ts— backfill 3 経路追加src/pipeline.ts— ingest 関数 3 つ + bot フィルタ helpersrc/types.ts— 新レコード型定義src/store.ts— key space 追加 (必要に応じて)src/mcp.ts—search_issuesのtypeenum 拡張README.md/README.ja.md— type 表更新範囲
minor (新しい ingest type = user/system observable な新機能)
リリース後の手動ステップ
merge 後、Master が GitHub App ダッシュボード (https://github.com/settings/apps/liplus-rag-mcp/permissions) の "Subscribe to events" で以下を有効化:
poller の next tick で既存 comments は backfill される (hourly cron trigger)。webhook による realtime ingest は購読設定後から効く。
関連
docs/f.-*.mdとして判断記録化を検討 (Li+ 記憶 DB の前提設計がここで固まる)