Reconfigures Plan-Build-Run projects: updates agent model profiles (Sonnet/Haiku/Opus), features (TDD, auto-continue, git branching), depth/mode, CLAUDE.md.
From pbrnpx claudepluginhub sienklogic/plan-build-run --plugin pbrThis skill is limited to using the following tools:
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agentic engineering workflows: eval-first loops, 15-min task decomposition, model routing (Haiku/Sonnet/Opus), AI code reviews, and cost tracking.
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 1 immediately.
Before ANY tool calls, display this banner:
╔══════════════════════════════════════════════════════════════╗
║ PLAN-BUILD-RUN ► RECONFIGURE ║
╚══════════════════════════════════════════════════════════════╝
Then proceed to Step 1.
You are running the setup skill in reconfigure mode. This wizard lets existing Plan-Build-Run projects change model profiles, workflow features, and CLAUDE.md integration. It does NOT re-initialize or overwrite project state.
Check if .planning/config.json exists.
If .planning/config.json does NOT exist:
Display:
No Plan-Build-Run project found in this directory.
/pbr:setup is for reconfiguring existing projects.
To start a new project, run: /pbr:begin
/pbr:begin includes everything /pbr:setup used to do, plus deep requirements gathering and roadmap creation.
Stop. Do not proceed further.
If .planning/config.json exists:
.planning/config.jsonCurrent configuration:
- Model profile: {derived from models block — balanced/quality/budget or custom}
- Depth: {depth}
- Mode: {mode}
- Auto-continue: {features.auto_continue}
- TDD mode: {features.tdd_mode}
- Git branching: {git.branching}
Note: These profiles control agent models, not the orchestrator. The orchestrator uses your Claude Code session model. For cost optimization, consider running your session on Sonnet -- agents with inherit will follow. See references/model-profiles.md for details.
Use AskUserQuestion: question: "Which model profile should agents use?" header: "Models" options: - label: "Balanced (Recommended)" description: "Sonnet for most agents, Haiku for synthesizer. Good quality/cost tradeoff." - label: "Quality" description: "Opus for executor and planner, Sonnet for others. Best results, highest cost." - label: "Budget" description: "Haiku for most agents. Fastest and cheapest, but lower quality." - label: "Keep current" description: "Leave model settings unchanged."
Apply the selected profile to the models block in config.json:
Use AskUserQuestion: question: "Which workflow features do you want enabled?" header: "Features" multiSelect: true options: - label: "Auto-continue" description: "Automatically chain commands (build → review → next phase) without prompting" - label: "TDD mode" description: "Write tests before implementation in executor agents" - label: "Strict gates" description: "Require verification AND review to pass before advancing phases" - label: "Git branching" description: "Create a branch per phase for cleaner PR history"
Apply selections (others unchanged):
features.auto_continue: truefeatures.tdd_mode: truegates.verification: true, gates.review: true, gates.plan_approval: truegit.branching: "phase"Check if a CLAUDE.md file exists in the project root.
If it exists: Read it. If it does NOT already contain a "Plan-Build-Run" section, offer to append the integration block.
If it does NOT exist: Offer to create CLAUDE.md with the integration block.
Use AskUserQuestion: question: "Update CLAUDE.md with Plan-Build-Run integration notes?" header: "CLAUDE.md" options: - label: "Yes" description: "Add or update the Plan-Build-Run section in CLAUDE.md" - label: "No" description: "Skip — leave CLAUDE.md as-is"
If "Yes", append/create:
## Plan-Build-Run
This project uses [Plan-Build-Run](https://github.com/SienkLogic/plan-build-run) for structured development.
- Project state: `.planning/STATE.md` (source of truth for current phase and progress)
- Configuration: `.planning/config.json`
- Run `/pbr:status` to see current project state and suggested next action.
**After compaction or context recovery**: Read `.planning/STATE.md` (especially the `## Session Continuity` section) before proceeding with any work. The PreCompact hook writes recovery state there automatically.
Manage Claude Code platform settings that PBR recommends for optimal token usage.
Read .planning/config.json (already loaded in Step 1). Check for a platform_settings block:
{} (no managed settings).Check for existing .claude/settings.json:
{} if empty/missing).{}.Compute the merge:
.claude/settings.json content.platform_settings in config.json on top.platform_settings is absent or empty, skip the write entirely.Report drift (compare before/after):
Display the report:
Platform Settings:
Keys added: includeGitInstructions → false
Keys matched: (none)
Keys changed: (none)
Writing .claude/settings.json...
If all keys already match, display:
Platform Settings: .claude/settings.json is already in sync — no changes needed.
Conflict detection: If an existing .claude/settings.json has a key from platform_settings set to the OPPOSITE value (e.g., "includeGitInstructions": true when PBR wants false), display a WARNING before overwriting:
WARNING: .claude/settings.json has includeGitInstructions: true
PBR recommends false (removes redundant built-in git instructions).
Overwriting with PBR recommended value.
Write the merged settings.json:
.claude/settings.json in the project root (alongside .planning/)..claude/ exists (create it if needed with Bash mkdir -p .claude).$schema key at the top:
{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"includeGitInstructions": false
}
(Merge in any pre-existing keys from .claude/settings.json that are NOT managed by PBR — pass them through unchanged at the bottom of the object.)Drift detection note: On subsequent /pbr:setup runs, if .claude/settings.json has drifted from platform_settings (e.g., user manually changed it), this step will detect and re-apply the PBR values with a drift warning. This is by design — platform_settings in config.json is the source of truth.
CRITICAL: Write .planning/config.json NOW with all changes from Steps 2-3. Do NOT skip this step.
Write the updated config.json to disk with all applied changes.
Run a quick check:
.planning/config.json is valid JSON (read it back)Display:
╔══════════════════════════════════════════════════════════════╗
║ PLAN-BUILD-RUN ► RECONFIGURE COMPLETE ✓ ║
╚══════════════════════════════════════════════════════════════╝
Updated:
- Model profile: {new profile}
- Features changed: {list or "none"}
- CLAUDE.md: {updated/skipped}
- Platform settings: {".claude/settings.json updated" or "already in sync" or "no managed settings"}
Run /pbr:status to see current project state.