From ba7b9c1ea38e008b80746a360e8852793d7d4bbd Mon Sep 17 00:00:00 2001 From: Copilot Date: Thu, 26 Mar 2026 10:06:11 +0200 Subject: [PATCH] feat(skills): add ralph-two-pass-scan skill -- lightweight scan before selective hydration Implements two-pass Ralph scanning pattern that cuts GitHub API calls by ~72% per round. Pass 1 uses lightweight list-only query; Pass 2 selectively hydrates only actionable issues. Resolves: #596 Co-authored-by: Tamir Dresher --- .changeset/ralph-two-pass-scan-skill.md | 4 +++ .squad/skills/ralph-two-pass-scan/SKILL.md | 35 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .changeset/ralph-two-pass-scan-skill.md create mode 100644 .squad/skills/ralph-two-pass-scan/SKILL.md diff --git a/.changeset/ralph-two-pass-scan-skill.md b/.changeset/ralph-two-pass-scan-skill.md new file mode 100644 index 000000000..35a7ff21d --- /dev/null +++ b/.changeset/ralph-two-pass-scan-skill.md @@ -0,0 +1,4 @@ +--- +--- + +Add ralph-two-pass-scan skill — lightweight issue list scan before selective hydration, cutting Ralph's GitHub API calls by ~72% per round (resolves #596) diff --git a/.squad/skills/ralph-two-pass-scan/SKILL.md b/.squad/skills/ralph-two-pass-scan/SKILL.md new file mode 100644 index 000000000..a1320b821 --- /dev/null +++ b/.squad/skills/ralph-two-pass-scan/SKILL.md @@ -0,0 +1,35 @@ +# Skill: Ralph — Two-Pass Issue Scanning +**Confidence:** high +**Domain:** work-monitoring +**Last validated:** 2026-03-24 + +## Context +Cuts GitHub API calls from N+1 to ~7 per round (~72% reduction) by separating list scanning from full hydration. +Addresses the scanning inefficiency described in issue #596. + +## Pattern + +### Pass 1 — Lightweight Scan + +``` +gh issue list --state open --json number,title,labels,assignees --limit 100 +``` + +**Skip hydration if ANY of these match:** + +| Condition | Skip reason | +|-----------|-------------| +| `assignees` non-empty AND no `status:needs-review` | Already owned | +| Labels contain `status:blocked` or `status:waiting-external` | Externally gated | +| Labels contain `status:done` or `status:postponed` | Closed loop | +| Title matches stale/noisy pattern (`[chore]`, `[auto]`) | Low-signal | + +### Pass 2 — Selective Hydration + +For each issue surviving Pass 1: + +``` +gh issue view --json number,title,body,labels,assignees,comments,state +``` + +Then apply normal Ralph triage logic. Rule of thumb: hydrate ≤ 30% of scanned list. If more than 30% survive Pass 1, tighten filter rules.