Development status
Status orchestrator: collect repository state, format a report, write a short summary. Read-only, no agent.
Step 1 — Collect
One call:
bash ${CLAUDE_PLUGIN_ROOT}/lib/gst-collect.sh
Parse the structured block. A top-level field is a line matching ^[A-Z_]+: at column 0; its value is inline (KEY: value) or, for list fields (CHANGED_FILES, HOT_FILES, COMMITS, STASH, CONFLICTS), the indented lines that follow until the next top-level field. Each COMMITS line is hash|subject|relative-time|author.
Step 2 — Format
Build the report from this template; skip every empty section:
Branch: <BRANCH> [ahead <AHEAD>, behind <BEHIND> <UPSTREAM>]
Changes: <SHORTSTAT>
staged: <STAGED> unstaged: <UNSTAGED> untracked: <UNTRACKED>
Changed files (vs <DEFAULT_BRANCH>):
<directory>/
<status> <file> (+N -M)
Hot files:
1. <path> — +N -M
...
Commits (from <DEFAULT_BRANCH>): +<COMMITS_COUNT> commits
<hash> <subject> — <relative-time>
...
Stash: <STASH_COUNT> entries
Summary: <2-3 sentences>
Rules:
- Group
CHANGED_FILES by directory, not alphabetically.
- Relative times come straight from the 3rd
COMMITS field; never print absolute dates.
- Skip empty sections (no stash, no hot files, no changes → hide them).
- File status:
M modified, A added, D deleted (renames appear as D + A).
- Plain text, no emoji.
Step 3 — Summary
Write 2-3 sentences on the outcome ("added JWT-based authentication"), not the file list. Base them on COMMITS and CHANGED_FILES.
Edge cases
Exclusive states — check in order, first match wins:
EMPTY_REPO = true → New repository. Untracked files: <UNTRACKED>. Nothing else to show.
DETACHED = true → header Branch: detached at <BRANCH>, then the rest of the report.
CONFLICTS non-empty → lead with MERGE CONFLICTS: and the file list, then the normal report.
ON_DEFAULT_BRANCH = true or MERGE_BASE = NONE → no diff vs default; show Recent commits: from COMMITS; skip "Changed files" and "Hot files".
Modifiers — apply independently:
HAS_UPSTREAM = false → header Branch: <BRANCH> (no upstream); omit ahead/behind.
- No changes (
STAGED, UNSTAGED, UNTRACKED all 0) → skip Changes, Changed files, Hot files.
Rules
- The script runs only read-only git commands.
- No agent — format inline in this turn.
- Limits: max 20 commits, max 50 file lines, max 10 stash entries.
1---2name: gst3description: Shows development status in the repository: branch, uncommitted changes, recent commits, diff vs main, hot files, semantic summary. Used when a developer writes "status", "gst", "git status", "what's going on", "repo state", "show changes".4---56# Development status78Status orchestrator: collect repository state, format a report, write a short summary. Read-only, no agent.910## Step 1 — Collect1112One call:1314```bash15bash ${CLAUDE_PLUGIN_ROOT}/lib/gst-collect.sh16```1718Parse the structured block. A top-level field is a line matching `^[A-Z_]+:` at column 0; its value is inline (`KEY: value`) or, for list fields (`CHANGED_FILES`, `HOT_FILES`, `COMMITS`, `STASH`, `CONFLICTS`), the indented lines that follow until the next top-level field. Each `COMMITS` line is `hash|subject|relative-time|author`.1920## Step 2 — Format2122Build the report from this template; skip every empty section:2324```25Branch: <BRANCH> [ahead <AHEAD>, behind <BEHIND> <UPSTREAM>]2627Changes: <SHORTSTAT>28 staged: <STAGED> unstaged: <UNSTAGED> untracked: <UNTRACKED>2930Changed files (vs <DEFAULT_BRANCH>):31 <directory>/32 <status> <file> (+N -M)3334Hot files:35 1. <path> — +N -M36 ...3738Commits (from <DEFAULT_BRANCH>): +<COMMITS_COUNT> commits39 <hash> <subject> — <relative-time>40 ...4142Stash: <STASH_COUNT> entries4344Summary: <2-3 sentences>45```4647Rules:4849- Group `CHANGED_FILES` by directory, not alphabetically.50- Relative times come straight from the 3rd `COMMITS` field; never print absolute dates.51- Skip empty sections (no stash, no hot files, no changes → hide them).52- File status: `M` modified, `A` added, `D` deleted (renames appear as `D` + `A`).53- Plain text, no emoji.5455## Step 3 — Summary5657Write 2-3 sentences on the outcome ("added JWT-based authentication"), not the file list. Base them on `COMMITS` and `CHANGED_FILES`.5859## Edge cases6061Exclusive states — check in order, first match wins:62631. `EMPTY_REPO = true` → `New repository. Untracked files: <UNTRACKED>`. Nothing else to show.642. `DETACHED = true` → header `Branch: detached at <BRANCH>`, then the rest of the report.653. `CONFLICTS` non-empty → lead with `MERGE CONFLICTS:` and the file list, then the normal report.664. `ON_DEFAULT_BRANCH = true` or `MERGE_BASE = NONE` → no diff vs default; show `Recent commits:` from `COMMITS`; skip "Changed files" and "Hot files".6768Modifiers — apply independently:6970- `HAS_UPSTREAM = false` → header `Branch: <BRANCH> (no upstream)`; omit ahead/behind.71- No changes (`STAGED`, `UNSTAGED`, `UNTRACKED` all 0) → skip Changes, Changed files, Hot files.7273## Rules7475- The script runs only read-only git commands.76- No agent — format inline in this turn.77- Limits: max 20 commits, max 50 file lines, max 10 stash entries.