agent/claude/issues/005-collect-github.md
Snider beb24f71d2 docs: add feature request issues for core CLI migration
12 issue files documenting features needed to replace shell scripts:

Claude Code hooks:
- 001: core ai session (state management)
- 002: core ai context (fact capture)
- 003: core ai hook (command validation)
- 004: core qa debug (debug statement detection)

Data collection:
- 005: core collect github (issues/PRs archive)
- 006: core collect bitcointalk (forum threads)
- 007: core collect market (CMC/CoinGecko)
- 008: core collect papers (whitepapers)
- 009: core collect excavate (project archaeology)
- 010: core collect process (HTML→MD)
- 011: core collect dispatch (event hooks)

000: Overview tracking issue

These will be submitted to host-uk/core when rate limit resets.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 18:49:35 +00:00

71 lines
1.8 KiB
Markdown

# feat(collect): Add GitHub history collection
## Summary
Add `core collect github` command to archive GitHub issues and PRs from repositories and organisations.
## Required Commands
```bash
core collect github <org/repo> # Collect issues + PRs from repo
core collect github <org> --org # Collect all repos in org
core collect github <org1,org2> --org # Batch collect multiple orgs
core collect github <repo> --issues-only # Issues only
core collect github <repo> --prs-only # PRs only
core collect github --check-rate # Show rate limit status
```
## Current Shell Script Being Replaced
- `claude/skills/github-history/collect.sh` - 517 lines of bash
## Features
1. **Rate limit protection**
- Check every N calls
- Auto-pause at 25% remaining (75% used)
- Resume after reset + 10s buffer
2. **Incremental collection**
- Skip already-fetched issues/PRs
- Resume interrupted collections
3. **Reception scoring**
- ADDRESSED: Closed after discussion
- DISMISSED: Labeled wontfix/invalid
- IGNORED: Closed with no response
- STALE: Open with no replies
- ACTIVE: Open with discussion
- MERGED/REJECTED/PENDING for PRs
4. **Output structure**
```
repo/{org}/{repo}/
├── Issue/
│ ├── INDEX.md
│ ├── 001.md
│ └── 002.md
├── PR/
│ ├── INDEX.md
│ ├── 001.md
│ └── 002.md
└── .json/
├── issues-list.json
└── prs-list.json
```
5. **Index generation**
- Markdown tables with seq, GitHub #, title, score
- Score legend
## Output Format
Progress to stderr, final summary to stdout:
```json
{
"repo": "host-uk/core",
"issues": 47,
"prs": 23,
"output": "repo/host-uk/core/"
}
```