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.From its SKILL.md
npx -y skills add gyuha/super-gsd --skill sg-ui-planAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.2 KB, as published. Nobody here has run it
<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>
<process> 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 <phase>" 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_NUMand$PHASE_SECTIONwith actual resolved values.$PHASE_SECTIONcontains 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 1Brainstorming 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>
- If PHASE_NUM is empty, print an explicit error message and exit.
- On PHASE_SECTION extraction failure, print a warning and proceed with brainstorming using empty context.
- The brainstorming Agent is executed and control moves to Step 4 after it completes.
- On brainstorming Agent error, print an error message and abort (no HANDOFF recorded).
- After brainstorming completes, a To=ui-plan row is recorded in HANDOFF.md (skip if the same phase+ui-plan combination already exists). </success_criteria>