원클릭으로
phase-prep
Check prerequisites before starting a phase. Use before /phase-start to verify dependencies are met and context is loaded.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Check prerequisites before starting a phase. Use before /phase-start to verify dependencies are met and context is loaded.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Delegate code implementation to Codex CLI. Claude decomposes, scopes context, and verifies; Codex implements. Accepts a spec file, text description, or gathers requirements interactively.
Exploratory conversation before /product-spec. Asks one question at a time, runs background research for open-source/off-the-shelf alternatives, and writes DISCOVERY_NOTES.md. Use when the user has an idea but hasn't scoped it yet.
Generate EXECUTION_PLAN.md and scoped AGENTS.md files for a feature. Use after /feature-technical-spec to create the task breakdown.
Define feature requirements (problem, users, scope, acceptance criteria) through guided Q&A and write FEATURE_SPEC.md. Use when starting a new feature.
Define technical approach (architecture, integration points, data model) for a feature through guided Q&A and write FEATURE_TECHNICAL_SPEC.md. Use after /feature-spec.
Orient to project structure and load context. Use at the start of each new session or after context reset to understand the project state.
| name | phase-prep |
| description | Check prerequisites before starting a phase. Use before /phase-start to verify dependencies are met and context is loaded. |
| argument-hint | ["phase-number"] |
| allowed-tools | Bash, Read, Glob, Grep, Skill, AskUserQuestion, WebFetch, WebSearch |
I want to execute Phase $1 from EXECUTION_PLAN.md. Before starting, read EXECUTION_PLAN.md and check:
CONTINUITY RULE: After emitting the report you MUST evaluate the Auto-Advance
section at the end of this file. Auto-advance is frequently dropped when phase-prep
is invoked from a parent skill (/fresh-start or /go). Skipping it breaks the
execution chain. The checklist below tracks this — do not mark "Done" until the
auto-advance decision is made.
Copy this checklist and track progress:
Phase Prep Progress:
- [ ] Step 1: Run pre-flight checks 1-7
- [ ] Step 2: Verify all prerequisites pass
- [ ] Step 3: Load phase context and task list
- [ ] Step 4: Check for blocking dependencies
- [ ] Step 5: Emit report and log results
- [ ] Step 6: Auto-advance decision (MUST COMPLETE — do not stop before this)
CRITICAL: Before providing setup instructions for any external service (Supabase, Stripe, Firebase, Auth0, Vercel, etc.), you MUST read the latest official documentation first.
Fetch documentation when ANY of these apply:
STRIPE_API_KEY, SUPABASE_URL)See SERVICES.md for the full list of service documentation URLs and setup patterns.
When generating detailed setup guides (see "Detailed Setup Instructions" section below):
Determine working context:
If current working directory matches pattern */features/*:
/project/features/foo → /project)If current working directory matches pattern */plans/greenfield*:
/project/plans/greenfield → /project)Otherwise:
Before starting, confirm the required files exist:
EXECUTION_PLAN.md exists in the current working directory
PROJECT_ROOT/AGENTS.md exists
If either does not exist, STOP and tell the user:
plans/greenfield/EXECUTION_PLAN.md exists in the current working directory, tell them to cd plans/greenfield firstcd into their project/feature directory (the one containing EXECUTION_PLAN.md) and re-run /phase-prep $1Before starting: If context is below 40% remaining, run /compact first. This ensures the full command instructions remain in context throughout execution. Compaction mid-command loses procedural instructions.
Pre-Phase Setup — Check the "Pre-Phase Setup" section for Phase $1:
Verify: command if providedAuto-Verify Generation:
If a setup item lacks a Verify: line, infer one based on item type.
See SERVICES.md for the auto-verify command templates.
After auto-generating, add the Verify: line to EXECUTION_PLAN.md for future runs.
Dependencies — Verify prior phases are complete:
Verification Config — Check .claude/verification-config.json:
/configure-verification to auto-detectBROWSER:* criteria in EXECUTION_PLAN.md and config
has no auth or deployment section → emit warning (non-blocking):
WARNING: Phase $1 has browser criteria but no auth/deployment configured.
Browser tests will run against localhost without authentication.
Configure these in verification-config.json if needed.
Git Status — Check repository state:
git status to verify clean working tree (or understand current state)Tool Availability — Check optional tools by attempting a harmless call:
| Tool | Check | If Unavailable |
|---|---|---|
| ExecuteAutomation Playwright | Check for mcp__playwright__* or mcp__executeautomation__* | Next in chain |
| Browser MCP | Check for mcp__browsermcp__* tools | Next in chain |
| Microsoft Playwright MCP | Check for mcp__playwright__* tools | Next in chain |
| Chrome DevTools MCP | Call mcp__chrome-devtools__list_pages | Manual verification |
| code-simplifier | Check agent type available | Skip code simplification |
| Trigger.dev MCP | mcp__trigger__list_projects | Skip Trigger.dev features |
Browser tool fallback chain: ExecuteAutomation Playwright → Browser MCP → Microsoft Playwright → Chrome DevTools → Manual
Only check tools relevant to this project's tech stack.
Criteria Audit — Run /criteria-audit when preparing Phase 1:
$1 is 1, run /criteria-audit$1 is not 1, skip unless EXECUTION_PLAN.md was edited since last phasePermissions — Review the tasks in Phase $1:
If any Pre-Phase Setup items are FAIL or BLOCKED, provide detailed step-by-step instructions for each:
Identify the service/tool involved (e.g., Supabase, Stripe, Firebase)
Research if needed — Use WebFetch/WebSearch to get current setup steps
Generate a complete guide including:
Instead of:
Pre-Phase Setup:
- [ ] Create Supabase project — BLOCKED
Output:
PRE-PHASE SETUP GUIDE
=====================
## Create Supabase Project
1. Go to https://supabase.com/dashboard
2. Sign in or create account
3. Click "New Project" (green button, top right)
4. Fill in:
- Organization: Select or create one
- Name: `{project-name}` (or your preference)
- Database Password: Click "Generate" and SAVE THIS
- Region: Choose closest to your users
5. Click "Create new project"
6. Wait 2-3 minutes for provisioning
## Get Credentials
1. In Supabase dashboard, click "Project Settings" (gear icon)
2. Click "API" in the left menu
3. Copy these values:
- Project URL: `https://xxxxx.supabase.co` → SUPABASE_URL
- anon public key: `eyJ...` → SUPABASE_ANON_KEY
## Update .env File
Add to `.env`:
SUPABASE_URL=PASTE_PROJECT_URL SUPABASE_ANON_KEY=PASTE_ANON_PUBLIC_KEY
## Verify Setup
Run `/phase-prep $1` again to confirm all items complete.
See SERVICES.md for setup patterns for: Supabase, Firebase, Stripe, Auth0, Vercel/Netlify, and other common services.
After showing current phase prerequisites, scan ALL remaining phases and show human-required items.
For each phase after $1, extract ONLY human-required setup items:
Do NOT include:
## Future Phase Preview
Items below require human action. Complete now to avoid blockers later.
### Phase {N+1}: {Phase Title}
Human Setup Required:
- {Human item 1}
- {Human item 2}
### Phase {N+2}: {Phase Title}
Human Setup Required:
- {Human item 1}
### Phase {N+3}: {Phase Title}
(No human setup items)
---
TIP: Complete future setup now to avoid blockers later.
Run `/phase-prep {N}` for detailed instructions on any item.
If no future phases have human items, omit this section.
PHASE $1 PREREQUISITES
======================
Documents:
- EXECUTION_PLAN.md: ✓ | ✗
- AGENTS.md (at PROJECT_ROOT): ✓ | ✗
- Prior phases: Complete | N/A
Verification Config:
- verification-config.json: ✓ | ✗
- Configured: {list only commands that ARE in config, e.g., "test, lint, build"}
- Not configured: {list omitted commands, or "none" if all present}
Git: {branch}, {clean | dirty}
Pre-Phase Setup:
- {items with PASS/FAIL/BLOCKED}
[If any FAIL/BLOCKED, show detailed setup guide above]
Environment:
- {env vars or "None required"}
Tools:
- ExecuteAutomation Playwright: ✓ | ✗ (primary)
- Browser MCP Extension: ✓ | ✗
- Microsoft Playwright MCP: ✓ | ✗
- Chrome DevTools MCP: ✓ | ✗
- code-simplifier: ✓ | ✗
- Trigger.dev MCP: ✓ | ✗ | N/A
Criteria Audit: PASS | WARN | FAIL
Status: READY | BLOCKED | READY WITH NOTES
{Details if not READY}
---
## Future Phase Preview
[Show human items for all remaining phases]
After reporting, append the pre-phase results to .claude/verification-log.jsonl
with timestamps and any evidence paths (if collected).
Example log entry:
{
"timestamp": "{ISO timestamp}",
"scope": "phase-prep",
"phase": "$1",
"check": "pre-phase-setup",
"status": "PASS",
"evidence": null
}
| Situation | Action |
|---|---|
EXECUTION_PLAN.md not found in working directory | STOP and tell user to cd into their project or feature directory containing EXECUTION_PLAN.md |
| WebFetch/WebSearch fails when fetching service documentation | Retry with exponential backoff (2-3 attempts); if all retries fail, warn user and proceed with best available info |
Pre-Phase Setup Verify: command returns unexpected output | Mark item as FAIL, show the raw command output, and include it in the detailed setup instructions |
.claude/verification-config.json missing entirely | Run /configure-verification to auto-detect; do not block on omitted keys in an existing config |
| Git working tree is in a conflicted or detached-HEAD state | Report the git state clearly, suggest resolution steps, and mark Git check as BLOCKED |
STOP — READ THIS BEFORE RETURNING: You are NOT done. You MUST complete Step 6 below (Auto-Advance). Do not return to a parent skill or report readiness without making the auto-advance decision first.
Check if auto-advance is enabled and this prep passes all checks.
Read .claude/settings.local.json for auto-advance configuration:
{
"autoAdvance": {
"enabled": true // default: true
}
}
If autoAdvance is not configured, use defaults (enabled: true).
Auto-advance to /phase-start $1 ONLY if ALL of these are true:
--pause flag was NOT passed to this commandautoAdvance.enabled is true (or not configured, defaulting to true)Rationale: Auto-advance only proceeds when all prerequisites are verified (PASS). Re-running /phase-prep after completing human setup confirms readiness and allows auto-advance.
Write completion marker (so parent skills can detect success):
// Write to .claude/phase-prep-result.json
{
"phase": $1,
"status": "READY",
"auto_advanced": true,
"timestamp": "{ISO timestamp}"
}
Show brief notification:
AUTO-ADVANCE
============
All Phase $1 prerequisites verified. Proceeding to execution...
Execute immediately:
executionMode from .claude/settings.local.json. If "codex", pass --codex./phase-start $1 [--codex] using the Skill toolWrite completion marker (so parent skills can detect the outcome):
// Write to .claude/phase-prep-result.json
{
"phase": $1,
"status": "BLOCKED",
"auto_advanced": false,
"reason": "{first failing condition}",
"timestamp": "{ISO timestamp}"
}
Stop and report why:
AUTO-ADVANCE STOPPED
====================
Reason: {one of below}
- Pre-Phase Setup items failed or blocked
- Prior phases not complete
- Verification config not configured
- Criteria audit failed (Phase 1 only)
- Auto-advance disabled via --pause flag
- Auto-advance disabled in settings
{If human items exist:}
Human setup required:
- [ ] {human item 1} — See detailed instructions above
- [ ] {human item 2}
Next steps:
1. Complete the setup items above
2. Run /phase-start $1 manually when ready
If this is part of an auto-advance chain (.claude/auto-advance-session.json exists), append this command to the session log:
{
"commands": [
// ... previous commands
{"command": "/phase-prep $1", "status": "PASS", "timestamp": "{ISO}"}
]
}
If auto-advance stops here, generate the session report (see phase-checkpoint for format) and clean up the session file.