/pbr:ui-phase runs instead · from pbr
Generates UI-SPEC.md design contracts for frontend-heavy phases. Detects frontend projects and loads phase context from ROADMAP.md.
This skill never runs in Claude Code
It ships in pbr at skills/, but /pbr:ui-phase (a command, or a skill Claude Code finds first) has the same name: typing it, or Claude choosing it, runs that one instead.
STOP -- DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's plugin system. Using the Read tool on this SKILL.md file wastes tokens. Begin executing Step 0 immediately.
Before ANY tool calls, display this banner:
╔══════════════════════════════════════════════════════════════╗
║ PLAN-BUILD-RUN ► UI PHASE DESIGN ║
╚══════════════════════════════════════════════════════════════╝
Then proceed to Step 1.
Read the following files:
pbr-tools state load
Also read .planning/config.json to check for ui.enabled setting.
Determine whether the UI pipeline should be active:
2a. If config.ui.enabled is explicitly true, proceed to Step 3.
2b. If config.ui.enabled is explicitly false, display:
UI pipeline is disabled. Enable with: /pbr:config set ui.enabled true
Then STOP. Do not proceed further.
2c. If ui.enabled is not set (undefined), auto-detect frontend project:
package.json for dependencies or devDependencies containing: react, vue, angular, svelte, next, nuxt, solid-js, preact, lit, @angular/coreindex.html in the project root or public/ or src/.css, .scss, .less, .sass files in src/ or styles/If frontend indicators are found, proceed to Step 3.
If NO frontend indicators are found, ask the user:
This doesn't appear to be a frontend project. No frontend frameworks
or UI files were detected.
Options:
1. Continue anyway (I know this project has UI components)
2. Cancel (this project doesn't need UI design contracts)
3. Enable permanently: /pbr:config set ui.enabled true
If the user chooses option 1, proceed. If option 2, STOP. If option 3, tell them to run the config command and then re-run /pbr:ui-phase.
Parse $ARGUMENTS for:
http://localhost:3000)If no phase number is provided, display usage and STOP:
Usage: /pbr:ui-phase <phase-number> [--url <dev-server-url>]
Example: /pbr:ui-phase 3 --url http://localhost:3000
Read the ROADMAP.md to find the phase directory matching the given phase number:
pbr-tools state load
Read the phase directory at .planning/phases/{NN}-{slug}/ to understand the phase goal and any existing plans. Extract the phase goal from ROADMAP.md for the given phase number.
If the phase directory does not exist, display an error and STOP:
Phase {N} not found. Check /pbr:status for available phases.
CRITICAL: Agent type rule -- ALWAYS use subagent_type: "pbr:ui-researcher". NEVER use general-purpose or other non-PBR agent types. The PreToolUse hook will block non-PBR agents.
Spawn a Task with:
subagent_type: "pbr:ui-researcher"--url, otherwise state "not provided").planning/phases/{NN}-{slug}/UI-SPEC.md${CLAUDE_PLUGIN_ROOT}/templates/UI-SPEC.md.tmpl — the agent should read this template for the standard UI-SPEC format (design system, spacing, typography, color, components)Display before spawning:
Spawning ui-researcher... (est. 2-5 min)
Wait for agent completion.
Read the generated UI-SPEC.md from .planning/phases/{NN}-{slug}/UI-SPEC.md.
If the file was not created, report the error and STOP.
Present a summary to the user showing:
Ask the user:
Review the design contracts above. Options:
1. Confirm -- lock UI-SPEC.md and proceed to planning
2. Request changes -- describe what to adjust
3. Cancel -- discard UI-SPEC.md
If the user requests changes, describe what they want adjusted and re-spawn the ui-researcher agent with the feedback. Repeat until confirmed or cancelled.
If cancelled, delete the UI-SPEC.md file and STOP.
Display:
UI-SPEC.md locked for phase {N}.
Next step: Run /pbr:plan-phase {N} to plan with these design contracts.
The planner will reference UI-SPEC.md as a constraint alongside CONTEXT.md.
Reference: skills/shared/context-budget.md for the universal orchestrator rules.
Reference: skills/shared/agent-type-resolution.md for agent type fallback when spawning Task() subagents.
Additionally for this skill:
Reference: skills/shared/commit-planning-docs.md -- if planning.commit_docs is true, commit UI-SPEC.md.
pbr:ui-researcherWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
ui-spec, design-contracts, frontend-planning, phase-planning
Generated from the plugin's indexed repository (sienklogic/plan-build-run) — no native marketplace selected
npx claudepluginhub p/sienklogic-pbr-plugins-pbr46 skills in this plugin
/backlogManage backlog items — ideas not ready for active planning. Add, review, promote, or remove.Other plugins' skills for the same job