
# gh-status

Project-management dashboard for the current repo.

## What it does

1. Determine repo from `git remote get-url origin`
2. Detect features via `${CLAUDE_PLUGIN_ROOT}/lib/ghcall.sh detect-features`
3. **If a `gh-pms` Projects v2 board exists**, prefer reading it (single canonical view of Status, Severity, Effort, Service across the whole project):
   ```bash
   gh project item-list <project_number> --owner <owner> --format json
   ```
   Group by Project's `Status` field. **Within each Status bucket, sort by `Severity` (Critical → High → Medium → Low)** so the most urgent items surface first regardless of kind. Severity values come from `workflows/default.yaml.severities.values[]`.
4. **Otherwise** (no project), fall back to label-based grouping:
   - `mcp__github__list_issues` — all open issues, grouped by `status:*` label
   - Within each group, sort by `severity:*` label using the same Critical → Low order
   - Issues assigned to current user with `status:in-progress`
   - Open `type:request` issues
5. **Always** include milestone progress via `gh api repos/{owner}/{repo}/milestones?state=open` — show plans (= milestones) with their progress bars
6. Render a grouped table:

```
gh-pms · {owner}/{repo}                    [Project: gh-pms (#3)] [Issue Types: ✓]

Active (assigned to @{me})
  #43 [Feature] Bridge endpoint        Status: In Progress    Effort: M  started 2h ago

Pipeline (from Project Status field, severity-sorted)
  Todo                : 5  (#44🔴 #45🟠 #46🟡 #47🟡 #48🟢)
  In Progress         : 1  (#43🟠)
  Ready for Testing   : 0
  In Testing          : 0
  Ready for Docs      : 0
  In Docs             : 0
  Documented          : 0
  In Review           : 2  (#41🔴 #42🟡)
  Blocked             : 1  (#39🟠 — blocked by #38)
  Legend: 🔴 critical · 🟠 high · 🟡 medium · 🟢 low

Milestones (= Plans)
  #M1 Migrate auth flow            ████░░░░░ 60%   3/5 closed   due 2026-06-01
  #M2 Real-time dashboards         ░░░░░░░░░  0%   0/4 closed   no due date

Requests (deferred)
  #50 [Request] Add MCP for Vercel    waiting triage
  #51 [Request] Bilingual error pages waiting triage

Velocity (last 7 days)
  Closed: 6 (S:3, M:2, L:1, XL:0)
  Throughput: ~1 story/day equivalent

Cross-repo milestones (when the active plan is cross-repo)
  v0.7 — Tier 2     primary: fadymondy/gh-pms#1   spans:
    fadymondy/gh-pms-api#3        2/3 closed
    fadymondy/gh-pms-web#5        1/2 closed
  Aggregated:                     3/5 closed (60%)

Next actionable
  → #44 (next feature in milestone #M1, no unmet deps)
```

## Notes

- "Started Xh ago" comes from the local state file
- "N/M sub-issues done" comes from counting closed children of the plan via `mcp__github__list_issues` filtered by parent
- "Blocked by #X" reads from issue body's `**Depends on**: #X` line
- **Velocity** is computed by summing the `effort:*` labels (or Project v2 Effort field) of issues closed in the last 7 days. S/M/L/XL count as 1/3/5/8 story-points equivalent for the throughput line. Issues without an effort don't contribute (so unestimated work doesn't skew the metric)
