一键导入
sg-ui-plan
Use this when UI design brainstorming is needed before planning a phase — reads phase context from ROADMAP.md and runs superpowers:brainstorming.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use this when UI design brainstorming is needed before planning a phase — reads phase context from ROADMAP.md and runs superpowers:brainstorming.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | sg-ui-plan |
| description | Use this when UI design brainstorming is needed before planning a phase — reads phase context from ROADMAP.md and runs superpowers:brainstorming. |
| argument-hint | [phase] - optional. Defaults to STATE.md current phase. |
<execution_context> Self-contained. Reads .planning/STATE.md for phase resolution when no argument provided. Reads .planning/ROADMAP.md for phase context. Appends to .planning/HANDOFF.md. </execution_context>
1. **Phase resolve.** If $ARGUMENTS is provided, use it; otherwise extract from STATE.md: ```bash if [ -n "$ARGUMENTS" ]; then PHASE_NUM="$ARGUMENTS" else Read .planning/STATE.md, then extract the Phase: value from the YAML frontmatter. Set PHASE_NUM to the extracted value. fi if [ -z "$PHASE_NUM" ]; then echo "[sg-ui-plan] Error: Cannot determine PHASE_NUM. Pass it explicitly: /super-gsd:sg-ui-plan " exit 1 fi ```Extract PHASE_SECTION. Extract the phase section via gsd-sdk:
PHASE_SECTION_RAW=$(gsd-sdk query roadmap.get-phase "$PHASE_NUM" --pick section 2>/dev/null)
PHASE_SECTION=$(echo "$PHASE_SECTION_RAW" | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{try{process.stdout.write(JSON.parse(s.trim()))}catch(e){}})' 2>/dev/null || echo "$PHASE_SECTION_RAW")
if [ -z "$PHASE_SECTION" ]; then
echo "[sg-ui-plan] WARN: Phase $PHASE_NUM section not found in ROADMAP. Running brainstorming with empty context."
fi
Run brainstorming Agent.
echo "[sg-ui-plan] Starting UI design brainstorming for Phase $PHASE_NUM..."
Before calling Agent, replace every occurrence of $PHASE_NUM and $PHASE_SECTION with actual resolved values. $PHASE_SECTION contains multi-line text — insert it as literal text in the prompt string:
Agent(
description="superpowers:brainstorming for Phase $PHASE_NUM UI design",
prompt="Do NOT invoke writing-plans Skill after brainstorming completes. Your task is to run the superpowers brainstorming skill for Phase $PHASE_NUM UI design. The project root is the current working directory. Phase context:\n\n$PHASE_SECTION\n\nInvoke Skill(skill='superpowers:brainstorming', args='Proceeding with Phase $PHASE_NUM UI design. Refer to the above context. Important: do not invoke the writing-plans Skill after brainstorming completes. Only conduct the brainstorming conversation and then exit.') and follow its instructions to completion. Do NOT invoke writing-plans after brainstorming finishes.",
subagent_type="general-purpose"
)
If the Agent exits with an error:
echo "[sg-ui-plan] Brainstorming failed."
exit 1
Brainstorming is the core of this UI design command — abort on failure.
HANDOFF.md append. Run after brainstorming Agent completes:
HANDOFF_FILE=".planning/HANDOFF.md"
if [ ! -f "$HANDOFF_FILE" ] || ! grep -q "Timestamp.*Phase.*From.*To.*Plan Hash" "$HANDOFF_FILE" 2>/dev/null; then
mkdir -p "$(dirname "$HANDOFF_FILE")"
printf '| Timestamp | Phase | From | To | Plan Hash | User |\n| --- | --- | --- | --- | --- | --- |\n' > "$HANDOFF_FILE"
fi
PHASE_PAD=$(printf "%02d" "${PHASE_NUM:-0}" 2>/dev/null || echo "${PHASE_NUM:-0}")
PHASE_SLUG=$(ls -d .planning/phases/${PHASE_PAD}-* 2>/dev/null | head -1 | xargs basename 2>/dev/null)
[ -z "$PHASE_SLUG" ] && PHASE_SLUG="${PHASE_NUM:-unknown}"
if ! grep -q "| ${PHASE_SLUG} |.*| ui-plan |" "$HANDOFF_FILE" 2>/dev/null; then
TS=$(date -u +%Y-%m-%dT%H:%M:%SZ)
Read .planning/HANDOFF.md, then extract the To column (5th pipe-delimited field) from the last row that starts with "| " followed by a 4-digit year. Set FROM_STAGE to the extracted value.
[ -z "$FROM_STAGE" ] && FROM_STAGE="init"
GIT_USER=$(git config user.name 2>/dev/null || echo "-")
[ -z "$GIT_USER" ] && GIT_USER="-"
echo "| $TS | $PHASE_SLUG | $FROM_STAGE | ui-plan | - | $GIT_USER |" >> "$HANDOFF_FILE"
echo "[sg-ui-plan] ui-plan recorded in HANDOFF.md."
fi
echo "[sg-ui-plan] UI design brainstorming complete. Next step: /super-gsd:sg-execute"
<success_criteria>
Detect the current workflow stage from HANDOFF.md and STATE.md and report the next sg-* skill to activate.
Detect existing session or start new project — super-gsd workflow entry point
Display current workflow stage, last handoff timestamp, and next recommended command
Toggle the sg-learn stage on or off in the super-gsd workflow by flipping super_gsd.skip_learn in .planning/config.json. Accepts on|off, or no argument to flip.
Toggle the sg-review stage on or off in the super-gsd workflow by flipping super_gsd.skip_review in .planning/config.json. Accepts on|off, or no argument to flip.
Toggle the sg-tdd stage on or off in the super-gsd workflow by flipping super_gsd.tdd_mode in .planning/config.json. Accepts on|off, or no argument to flip.