| name | sg-status |
| description | Display current workflow stage, last handoff timestamp, and next recommended command |
Detect the user's input language and respond in that language throughout this skill's output.
- Korean input โ respond in Korean
- English input โ respond in English
- Mixed input โ match the dominant language
Inspect the current super-gsd workflow state. Read .planning/HANDOFF.md to determine the current stage, .planning/STATE.md for the current phase line (single source of truth), and .planning/ROADMAP.md only to detect whether a following phase exists. Output exactly three header lines, a blank line, and one "Next:" line. Fully independent โ no GSD delegation needed.
## Platform Constraints (Codex / Gemini CLI / Antigravity CLI)
- No Superpowers integration: this skill runs fully standalone
- SubagentStop not supported: no impact since this skill only displays workflow state
- AskUserQuestion not supported: no impact since this skill only produces output
<execution_context>
Self-contained โ reads .planning/HANDOFF.md, .planning/STATE.md, .planning/ROADMAP.md. Writes nothing.
</execution_context>
0. **`--team` ํ๋๊ทธ ๊ฐ์ง.** `$ARGUMENTS`์ `--team`์ด ํฌํจ๋์ด ์์ผ๋ฉด ํ ํํฉ ํ
์ด๋ธ์ ์ถ๋ ฅํ๊ณ ์ข
๋ฃํ๋ค. ํฌํจ๋์ง ์์ผ๋ฉด ์ด Step์ ๊ฑด๋๋ฐ๊ณ Step 1๋ก ์งํํ๋ค:
```bash
if echo "$ARGUMENTS" | grep -qE '(^| )--team( |$)'; then
HANDOFF_FILE=".planning/HANDOFF.md"
# --- HANDOFF.md User ์ปฌ๋ผ ๊ธฐ๋ฐ ์ง๊ณ ---
# $7 = User ์ปฌ๋ผ (7๋ฒ์งธ pipe-delimited ํ๋)
# ์ปฌ๋ผ ์ธ๋ฑ์ค: $1=empty, $2=ts, $3=phase, $4=from, $5=to, $6=plan_hash, $7=user
# ์กฐ๊ฑด: ํ์ด ํ์์คํฌํ๋ก ์์ํ๊ณ , $7๊ฐ ์กด์ฌํ๋ฉฐ ๊ณต๋ฐฑ ์ ๊ฑฐ ํ "-"๊ฐ ์๋ ๊ฒ
TEAM_DATA=$(grep -E '^\| [0-9]{4}-' "$HANDOFF_FILE" 2>/dev/null \
| awk -F'|' '{
gsub(/ /, "", $7);
if ($7 != "" && $7 != "-") print $0
}')
if [ -n "$TEAM_DATA" ]; then
# ํ์๋ณ ์ต์ ํ 1๊ฐ ์ง๊ณ (ํ์ผ์ append-only์ด๋ฏ๋ก ๋ง์ง๋ง ๋ฑ์ฅ์ด ์ต์ )
# ์ปฌ๋ผ: $2=Timestamp, $3=Phase, $5=To(Stage), $7=User
echo "## ํ ํํฉ"
echo ""
printf '| ํ์ | ์ต๊ทผ Phase | ์ต๊ทผ Stage | ๋ง์ง๋ง ํ๋ |\n'
printf '| ---- | --------- | --------- | ---------- |\n'
echo "$TEAM_DATA" \
| awk -F'|' '{
gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2);
gsub(/^[[:space:]]+|[[:space:]]+$/, "", $3);
gsub(/^[[:space:]]+|[[:space:]]+$/, "", $5);
gsub(/^[[:space:]]+|[[:space:]]+$/, "", $7);
users[$7] = $2 "|" $3 "|" $5
}
END {
for (u in users) {
n = split(users[u], parts, "|");
printf "| %s | %s | %s | %s |\n", u, parts[2], parts[3], parts[1]
}
}'
else
# Fallback: git log ์์ฑ์ ์ง๊ณ
GIT_LOG=$(git log --format="%an|%ai|%s" -20 2>/dev/null)
if [ -n "$GIT_LOG" ]; then
echo "## ํ ํํฉ (git log ๊ธฐ๋ฐ โ HANDOFF User ์ปฌ๋ผ ๋ฐ์ดํฐ ์์)"
echo ""
printf '| ํ์ | ์ต๊ทผ Phase | ์ต๊ทผ Stage | ๋ง์ง๋ง ํ๋ |\n'
printf '| ---- | --------- | --------- | ---------- |\n'
echo "$GIT_LOG" \
| awk -F'|' '{
gsub(/^[[:space:]]+|[[:space:]]+$/, "", $1);
gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2);
if (!seen[$1]++) {
printf "| %s | - | - | %s |\n", $1, substr($2, 1, 19)
}
}'
else
echo "ํ ์ด๋ ฅ์ด ์์ต๋๋ค. sg-plan, sg-execute ๋ฑ sg-* ๋ช
๋ น์ ์คํํ๋ฉด ์ด๋ ฅ์ด ์์
๋๋ค."
fi
fi
exit 0
fi
1. **Read `Phase:` line verbatim from STATE.md.**
```bash
# --- BEGIN STATE.md Phase parsing block (D-07: Phase 8 sg-start replicates this block) ---
PHASE_LINE=$(grep -E '^Phase:' .planning/STATE.md 2>/dev/null | head -1 | sed -E 's/^Phase:[[:space:]]*//' | sed -E 's/[[:space:]]+$//')
[ -z "$PHASE_LINE" ] && PHASE_LINE="(none)"
PHASE_NUM=$(echo "$PHASE_LINE" | grep -oE '^[0-9]+' || echo "")
# --- END STATE.md Phase parsing block ---
-
Determine stage from HANDOFF.md.
LAST_ROW=$(grep -E '^\| [0-9]{4}-' .planning/HANDOFF.md 2>/dev/null | tail -1)
if [ -z "$LAST_ROW" ]; then
STAGE_RAW="init"
TS=""
else
STAGE_RAW=$(echo "$LAST_ROW" | awk -F'|' '{gsub(/ /,"",$5); print $5}')
TS=$(echo "$LAST_ROW" | awk -F'|' '{gsub(/ /,"",$2); print $2}')
case "$STAGE_RAW" in
gsd-plan|ui-plan|superpowers|parallel|execute|tdd|review|sg-retro|ship|complete|sg-next) ;;
*) echo "Unknown stage '${STAGE_RAW}' in .planning/HANDOFF.md last row. Schema may be corrupted." >&2; exit 1 ;;
esac
if [ "$STAGE_RAW" = "sg-next" ]; then
STAGE_RAW=$(echo "$LAST_ROW" | awk -F'|' '{gsub(/ /,"",$4); print $4}')
if [ "$STAGE_RAW" = "sg-next" ] || [ -z "$STAGE_RAW" ]; then
SCAN_ROW=$(grep -E '^\| [0-9]{4}-' .planning/HANDOFF.md 2>/dev/null \
| awk -F'|' 'BEGIN{last=""} {gsub(/ /,"",$5); if ($5 != "sg-next") last=$0} END{print last}')
STAGE_RAW=$(echo "$SCAN_ROW" | awk -F'|' '{gsub(/ /,"",$5); print $5}')
TS=$(echo "$SCAN_ROW" | awk -F'|' '{gsub(/ /,"",$2); print $2}')
[ -z "$STAGE_RAW" ] && STAGE_RAW="init"
fi
case "$STAGE_RAW" in
init|gsd-plan|ui-plan|superpowers|parallel|execute|tdd|review|sg-retro|ship|complete) ;;
*) echo "Scan-back recovered unknown stage '${STAGE_RAW}' โ defaulting to init." >&2; STAGE_RAW="init" ;;
esac
fi
fi
case "$STAGE_RAW" in
init) STAGE_DISPLAY="init" ;;
gsd-plan) STAGE_DISPLAY="gsd" ;;
ui-plan) STAGE_DISPLAY="gsd" ;;
superpowers) STAGE_DISPLAY="superpowers" ;;
parallel) STAGE_DISPLAY="superpowers" ;;
execute) STAGE_DISPLAY="superpowers" ;;
tdd) STAGE_DISPLAY="superpowers" ;;
review) STAGE_DISPLAY="superpowers" ;;
sg-retro) STAGE_DISPLAY="sg-retro" ;;
ship) STAGE_DISPLAY="ship" ;;
complete) STAGE_DISPLAY="complete" ;;
*) STAGE_DISPLAY="$STAGE_RAW" ;;
esac
-
Compute last handoff timestamp.
if [ -z "$TS" ]; then
LAST_TS="(none)"
else
LAST_TS="$TS"
fi
-
Compute next-phase number (for sg-retro/ship branches).
if [ "$STAGE_RAW" = "sg-retro" ] || [ "$STAGE_RAW" = "ship" ]; then
if echo "$PHASE_NUM" | grep -qE '^[0-9]+$'; then
NEXT_PHASE=$((PHASE_NUM + 1))
if grep -qE "^### Phase ${NEXT_PHASE}:" .planning/ROADMAP.md 2>/dev/null; then
NEXT_PHASE_EXISTS=1
else
NEXT_PHASE_EXISTS=0
fi
else
NEXT_PHASE_EXISTS=0
fi
fi
-
Map stage to next command ($sg-* skill syntax for Codex/Gemini platforms).
case "$STAGE_RAW" in
init)
if [ -n "$PHASE_NUM" ]; then
NEXT_CMD="\$sg-plan $PHASE_NUM"
else
NEXT_CMD="\$sg-plan"
fi
;;
gsd-plan) NEXT_CMD="\$sg-execute" ;;
ui-plan) NEXT_CMD="\$sg-execute" ;;
superpowers|parallel|execute|tdd|review)
NEXT_CMD=$(SG_STAGE="$STAGE_RAW" node -e 'let c={};try{c=(require("./.planning/config.json").super_gsd)||{}}catch(e){}var tdd=!!c.tdd_mode,sr=!!c.skip_review,sl=!!c.skip_learn,s=process.env.SG_STAGE,n;if(s==="execute"&&tdd){n="sg-tdd"}else if(s==="review"){n=sl?"sg-ship":"sg-learn"}else{n=sr?(sl?"sg-ship":"sg-learn"):"sg-review"}process.stdout.write("$"+n)' 2>/dev/null)
[ -z "$NEXT_CMD" ] && NEXT_CMD="\$sg-review"
;;
sg-retro) NEXT_CMD="\$sg-ship" ;;
ship)
if [ "${NEXT_PHASE_EXISTS:-0}" = "1" ]; then
NEXT_CMD="\$sg-plan $NEXT_PHASE"
else
NEXT_CMD="\$sg-complete"
fi
;;
complete) NEXT_CMD="\$sg-new" ;;
*) NEXT_CMD="(unknown stage: $STAGE_RAW)" ;;
esac
Note: execute stage (Codex direct execution mode) routes to $sg-review. The .agents/ mirror uses $sg-* skill invocation syntax instead of /super-gsd:sg-* slash commands because Codex/Gemini do not support Claude Code slash command namespaces.
-
Render milestone & phase progress context (before the status block). Read .planning/ROADMAP.md and .planning/STATE.md, then render two sections ABOVE the workflow-status block. Do not use fragile bash table parsing (grep -P, awk pipe-splitting) โ read the files and render the tables directly.
(a) Milestones summary. From ROADMAP.md ## Milestones, render the checkbox list preserving each milestone's [x]/[ ] completion state, version ID (vX.Y), and date. The section heading and any prose are written in the user's language (per this skill's language-detection directive); version IDs, dates, and milestone names stay verbatim.
(b) Current-milestone phase table. Read STATE.md's milestone: field (e.g. v2.7) to identify the current milestone, then from ROADMAP.md ## Progress (columns | Phase | Milestone | Plans Complete | Status | Completed |) select ONLY the rows whose Milestone column equals the current milestone, and render them as a compact table. The table headers are written in the user's language; cell values (phase slug text, plan counts like 2/3, status text, dates) stay verbatim from ROADMAP.
Localization rule: prose and table headers โ user's language. Machine tokens (milestone version IDs, command names, stage/status enum values, phase slugs, dates, timestamps) โ verbatim in their source form.
Emit these two sections first, then a single blank line, then the Step 7 status block.
-
Print output (status block โ final section).
Emit the following five lines as the LAST section, immediately after one blank line below the Step 6 sections. Keep the labels Phase:/Stage:/Last handoff:/Next: and all machine tokens in English (verbatim); do not localize this block:
Phase: <PHASE_LINE>
Stage: <STAGE_DISPLAY>
Last handoff: <LAST_TS>
Next: <NEXT_CMD>
<success_criteria>
- Output is ordered: (a) a Milestones summary + a current-milestone phase table (selected from ROADMAP.md
## Progress by STATE.md milestone:) appear FIRST, with prose and table headers in the user's language and all machine tokens (version IDs, slugs, status text, dates) verbatim; then (b) the workflow-status block appears LAST as the 5-line block with English labels and English machine tokens. The former "exactly 5 lines" lock is relaxed to permit the preceding milestone/phase sections.
- If HANDOFF.md has no data rows, Stage=init and Last handoff=(none).
$sg-* skill invocation syntax is used in the NEXT_CMD mapping (Codex/Gemini do not support /super-gsd:sg-* slash commands).
execute stage routes to $sg-review.
- STATE.md Phase parsing block is preserved (grep-sed-awk pipeline).
- Fully standalone regardless of whether GSD is installed.
$ARGUMENTS์ --team์ด ํฌํจ๋ ๊ฒฝ์ฐ, Step 0์์ ํ ํํฉ ํ
์ด๋ธ์ ์ถ๋ ฅํ๊ณ exit 0์ผ๋ก ์ข
๋ฃํ๋ค. ๊ธฐ์กด Step 1~7์ ์คํ๋์ง ์๋๋ค.
--team ์์ด ์คํํ๋ฉด Step 0์ ๊ฑด๋๋ฐ๊ณ ๊ธฐ์กด ๋์์ด ์์ ํ ์ ์ง๋๋ค.
</success_criteria>