From 85bf97985259af79ba773d5497fed96092aaa383 Mon Sep 17 00:00:00 2001 From: Sebastien Taggart Date: Thu, 26 Mar 2026 20:09:24 -0400 Subject: [PATCH] Add 'what's next' section to /status skill Extends the status skill with a priority-ordered suggestion engine that reads local git state and GitHub data to recommend the logical next workflow step (e.g. /submit-for-review, /deploy, /start). Also adds future /status enhancement ideas to the roadmap. --- ROADMAP.md | 14 ++++++++++ docs/skills/status.md | 14 ++++++++++ skills/status.md | 63 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 90 insertions(+), 1 deletion(-) diff --git a/ROADMAP.md b/ROADMAP.md index f05c2e3..ba1c679 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -16,6 +16,20 @@ Possible additions: Decision for now: better discipline (one agent per issue, sequential) is the right path. Revisit when the pain of sequential work outweighs the cost of coordination tooling. +## `/status` enhancements + +### PR health indicators + +Show whether checks are passing or failing on open PRs, and surface unresolved review comments. A PR with "changes requested" is very different from one awaiting first review — the status output should make that obvious at a glance. + +### Stale work detection + +Flag PRs or issues that haven't been touched in a configurable number of days. Helps surface forgotten branches and abandoned work before they rot. + +### `/status --team` + +Aggregate view across all open PRs and assigned issues in the repo, not scoped to a single user. Useful for team leads and standups where you want the full picture in one command. + ## Three-branch Makefile targets GitHub issue #6. `Makefile.agents.mk` lacks `STAGING_BRANCH` support — no `promote` target, no staging guard rails. The skills handle three-branch mode but the Makefile doesn't. diff --git a/docs/skills/status.md b/docs/skills/status.md index 1a846ef..83967b1 100644 --- a/docs/skills/status.md +++ b/docs/skills/status.md @@ -47,6 +47,20 @@ When `--milestone` or `--sprint` is passed, `/status` fetches all issues in that Shows a progress summary: "X of Y issues closed, Z in progress, W not started." +## What's next (personal mode only) + +After the status summary, `/status` appends a single actionable suggestion based on local git state and the GitHub data already fetched. It evaluates conditions in priority order and shows the first match: + +- **Feature branch with uncommitted changes** → "Run `/submit-for-review`" +- **Feature branch with approved PR and passing checks** → "Run `/deploy`" +- **Feature branch with open PR** → "Awaiting review" +- **Feature branch with no PR** → "Run `/submit-for-review` to open one" +- **Integration branch with unreleased commits since last tag** → "Run `/deploy`" +- **Nothing in progress** → "Run `/start`" +- **Open issues in backlog** → "Run `/start N` to pick one up" + +This section is omitted in milestone mode and when no condition matches. + ## Why it's built this way **Read-only, always.** `/status` never writes to GitHub — no comments, labels, or issue updates. It's safe to run at any time without side effects. diff --git a/skills/status.md b/skills/status.md index c53c012..7542feb 100644 --- a/skills/status.md +++ b/skills/status.md @@ -115,6 +115,68 @@ Do not post, comment, write files, or take any action. Output only. --- +## Step 6 — What's next + +After the status summary, append a single actionable suggestion based on local git state and the GitHub data already fetched. + +### 6a — Gather additional local state + +Run these commands (skip if not in a git repo): + +```bash +git branch --show-current +``` + +```bash +git status --porcelain +``` + +```bash +git describe --tags --abbrev=0 2>/dev/null +``` + +```bash +git rev-list ..HEAD --count 2>/dev/null +``` + +From the GitHub data fetched in Step 2, also check for the current branch's PR approval status: + +```bash +gh pr view --json number,title,url,reviewDecision,statusCheckRollup \ + --jq '{number,title,url,reviewDecision,checks: [.statusCheckRollup[]? | .status]}' +``` + +If `gh pr view` exits non-zero (no PR for current branch), note that there is no open PR. + +### 6b — Determine suggestion + +Evaluate the following conditions **in order**. Use the **first** match: + +| Priority | Condition | Output | +|----------|-----------|--------| +| 1 | On a `feature/*` branch with uncommitted changes (`git status --porcelain` is non-empty) | `What's next: You have uncommitted changes on \`\`. When ready, run \`/submit-for-review\`.` | +| 2 | On a `feature/*` branch with an open PR that has `reviewDecision: APPROVED` and all status checks are `COMPLETED` | `What's next: PR # is approved and checks pass. Consider running \`/deploy\`.` | +| 3 | On a `feature/*` branch with an open PR (any other review/check state) | `What's next: PR # () is open and awaiting review.` | +| 4 | On a `feature/*` branch with no open PR and clean working tree | `What's next: No open PR for \`<branch>\`. Run \`/submit-for-review\` to open one.` | +| 5 | On the integration branch (`dev`, `develop`, or `main` when no integration branch exists) with unreleased commits (rev-list count > 0 since last tag) | `What's next: <N> commit(s) on \`<branch>\` since \`<tag>\`. Run \`/deploy\` when ready to release.` | +| 6 | No open PRs, no open issues assigned to subject | `What's next: Nothing in progress. Run \`/start\` to begin new work.` | +| 7 | Open issues exist in "Up next" | `What's next: Next up is #<number> (<title>). Run \`/start <number>\` to pick it up.` | + +If none of the above match, omit the "What's next" section entirely. + +### 6c — Format + +Print the suggestion after a horizontal rule, below the local commits section: + +``` +--- +🧭 <suggestion text> +``` + +This section is omitted in milestone mode. + +--- + ## Milestone mode (Steps M1–M3) Only entered when `--milestone` or `--sprint` is detected in Step 1. @@ -173,7 +235,6 @@ Do not post, comment, write files, or take any action. Output only. ## Hard rules - Never write to GitHub (no comments, labels, issue updates, or PR changes). -- Never suggest what the developer should work on next. - If `gh` is unauthenticated or any fetch fails, report the error and stop immediately. - Do not retry failed commands. - Strip the leading `@` from the subject when passing to `gh` flags that do not accept it.