Skip to content

Discover open issues/PRs for allowed owners #5

Closed

Description

@rmems

Note

Historical GitHub issue. This issue is closed and retained for provenance. Its original body may describe an older writ/worktrees-hives architecture; do not treat retired Python/lab, Research-Hive, Graph-MVP, hook-enforcement, managed-worktree, babysit, or blanket local-merge restrictions below as current requirements.
Current product direction: https://linear.app/rpd-34/issue/RM-116/epic-writ-parallel-subagent-collaboration-ownership-and-conflict
Linear is the required task tracker; GitHub keeps source/PR/review/check history.
Linked Linear record: https://linear.app/rpd-34/issue/RM-5/worktrees-hives-gh5-discover-open-issuesprs-for-allowed-owners
Original GitHub milestone B — Core hive loop is legacy taxonomy and does not define the current roadmap.

Summary

Implement discovery of open work across allowed GitHub owners so the hive can list candidate issues and/or PRs before claiming worktrees or starting babysit cycles.

Problem / context

The skill’s first operational step is “what should we work on?” Without a scoped discover command:

  • Agents may wander into arbitrary orgs/repos (safety and noise problem).
  • Operators lack a single view of open issues (to implement) vs open PRs (to babysit) across rmems/* and Limen-Neural/*.
  • pr-babysit already hard-scopes to those owners for PR babysitting; worktrees-hives must reuse the same allowlist for discovery and expand it to issues, not only PRs.

This is milestone B1 of the core hive loop: discover → claim/worktree → orchestrator → issue→PR → babysit.

Prior art: ~/.agents/skills/pr-babysit/SKILL.md (owner allowlist, gh pr view / checks, watchlist mental model). Discover is the multi-repo generalization of “what’s open?” before add / claim.

Goals

  • Support owners: rmems, Limen-Neural, or both (default: both unless operator narrows).
  • List open issues and/or open PRs with at least: URL, title, and for PRs a CI rollup (pass/fail/pending summary from statusCheckRollup or gh pr checks).
  • Refuse other owners/repos unless the user explicitly overrides (e.g. named owner/repo in the command).
  • Document the discover command in SKILL.md (command table + behavior + safety).
  • Produce output usable by humans and by the orchestrator (Multi-subagent orchestrator (capped parallel) #7) / claim path (Claim issue → branch → worktree isolation #6).

Non-goals

Detailed acceptance criteria

  • Owner allowlist constant/docs: rmems, Limen-Neural (match epic + pr-babysit).
  • discover supports filters at least:
    • owner: rmems | Limen-Neural | both (default both or documented default)
    • kind: issues | prs | all
    • optional: single owner/repo, labels, limit
  • For each open issue: number, title, URL, repo, labels (nice-to-have), state.
  • For each open PR: number, title, URL, repo, head/base (nice-to-have), CI rollup (e.g. all green / failing count / pending), mergeable if cheap.
  • Request for owner outside allowlist errors clearly unless explicit override flag/phrase is present; override is logged in output.
  • Empty results are a clean message, not a crash.
  • Auth failure (gh auth status) fails fast with remediation.
  • SKILL.md documents discover syntax, defaults, allowlist, and override policy.
  • Never merges; discover is read-only on GitHub.
  • Linear footer preserved: RM-5.

Design options

Option Approach Pros Cons
A. gh CLI search gh search issues/prs --owner …, gh pr list per repo Matches agent toolchain; no extra API client Rate limits; many repos need listing strategy
B. GitHub GraphQL Single search queries with org: / user: Efficient batching, rollup fields More complex queries; token scopes
C. Static repo catalog Hardcode known repos (pr-babysit lists) then gh issue/pr list Predictable, fewer false hits Must update catalog when repos are added
D. Hybrid Allowlist owners + optional curated repo list + search fallback Best of A/C Slightly more code/docs

Recommendation: D (hybrid) — start with owner allowlist + gh search / per-repo list; optionally seed known Limen-Neural and rmems repo names from pr-babysit for faster local loops. Prefer read-only gh for agent portability.

Suggested CLI shape (illustrative, not binding)

discover [--owner rmems|Limen-Neural|both] [--kind issues|prs|all]
         [--repo owner/name] [--limit N] [--label X] [--override-owner ...]

Output shape (illustrative)

Markdown table or structured sections:

Repo Kind # Title CI / state URL

Dependencies

Issue Relationship
#1 Epic Parent; B1 of core loop
#2 SKILL.md Soft block: command should be documented there; can land stub then fill
#3 README Docs mirror of discover
#4 Labels/templates Optional filter by labels once taxonomy is stable
#6 Claim → worktree Downstream consumer of discover results
#7 Orchestrator Feeds work queue from discover
#9 Babysit Discover PRs is input to babysit watchlist
#10 CI taxonomy Later refinement of rollup classes
#12 Watchlist state May persist discover picks
#13 Safety Allowlist + never-merge alignment

Blocked by: ideally #2 stub exists so discover has a home; not strictly required to prototype CLI snippets in docs first.

Risks

  • API rate limits when scanning many org repos — paginate, cache, respect --limit.
  • Noise (hundreds of stale issues) — default limits, optional label filters, “updated recently” sort.
  • Private repo visibility depends on gh auth token — document required scopes.
  • Override abuse — require explicit user intent; never default to “all of GitHub.”
  • CI rollup flakiness (statusCheckRollup pending/unknown) — show raw rollup, don’t pretend green.
  • Divergence from pr-babysit allowlist if one skill updates owners and the other does not — document single shared allowlist policy.

Suggested plan

  1. Codify allowlist + override policy in SKILL.md (mirror pr-babysit wording).
  2. Implement issue discovery for one owner, then both; print table.
  3. Add PR discovery with CI rollup via gh pr view --json statusCheckRollup or checks summary.
  4. Add --repo narrow path and refuse non-allowlisted owners without override.
  5. Wire example into README/SKILL command table; note read-only.
  6. Hand off sample output format to Claim issue → branch → worktree isolation #6/Multi-subagent orchestrator (capped parallel) #7 authors so claim/orchestrator can parse or copy IDs.

Prior art / references

  • pr-babysit owner scope and success criteria for PRs.
  • Epic: never auto-merge; platform-neutral skill packaging.
  • Example org surface: Limen-Neural Julia/Rust neural stack; rmems personal tooling repos.

Hybrid layer

Primary implementation layer: python (primary); see #37 P2, #30 P1

This issue remains valid under the Python/Rust hybrid architecture (epic #21). Rust owns worktrees, state, process supervision, and hard safety; Python owns orchestration/policy; agent skills document how agents drive both.


Linear: https://linear.app/rpd-34/issue/RM-5/worktrees-hives-gh5-discover-open-issuesprs-for-allowed-owners (RM-5)

Activity

  1. added this to the B — Core hive loop milestone on Jul 10, 2026
  2. self-assigned this
    on Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions