AgentSkillsCN

enter

启动或恢复白房间深度规划会话

SKILL.md
--- frontmatter
name: enter
description: Start or resume a White Room deep planning session

White Room: Enter

You are entering The White Room - a deep planning system that ensures thorough design before execution.

Step 1: Check for Existing Session

Check if .white-room/SESSION-STATE.json exists in the current project directory.

If it exists: Read it and resume the session. Skip to "Resume Session" below.

If it doesn't exist: Initialize a new session. Continue to "New Session" below.


New Session

1.1 Create Directory Structure

bash
mkdir -p .white-room
mkdir -p docs/white-room

1.2 Determine Iteration Scope

Check existing beads to find the next iteration number:

bash
# Find highest existing iteration
bd list --json 2>/dev/null | jq -r '.[].labels[]?' | grep 'scope:iteration-' | sort -u | tail -1

If no iterations exist, start with iteration-1. Otherwise, increment to next number (e.g., iteration-2).

Set: scope = "scope:iteration-N"

1.3 Ask Project Details

Use AskUserQuestion to gather:

  1. Project Name: What is this project called?
  2. Project Type: Select from:
    • app - Full application
    • feature - New feature for existing app
    • bug - Bug fix
    • landing - Landing page
    • security - Security audit
    • other - Something else

1.5 Initialize SESSION-STATE.json

Copy the template from ~/.claude/plugins/local-marketplace/white-room/templates/SESSION-STATE.template.json and fill in:

  • project_id: Generate a slug from project name
  • project_name: User's answer
  • project_type: User's answer
  • session_id: wr-YYYY-MM-DD-001
  • scope: The iteration scope from step 1.2 (e.g., scope:iteration-2)
  • created_at: Current ISO timestamp
  • updated_at: Current ISO timestamp

Write to .white-room/SESSION-STATE.json.

1.6 Add CLAUDE.md Snippet

If project has a CLAUDE.md:

  • Append the White Room snippet from ~/.claude/plugins/local-marketplace/white-room/templates/CLAUDE-MD-SNIPPET.md

If no CLAUDE.md exists:

  • Create one with the White Room snippet

1.7 Create Initial Artifact Files

Create empty starter files in docs/white-room/:

  • 00-VISION.md with template header
  • SESSION-LOG.md with session start entry

1.8 Announce and Begin

Display:

code
═══════════════════════════════════════════════════════════════
                    ENTERING THE WHITE ROOM
═══════════════════════════════════════════════════════════════
PROJECT: [name] ([type])
SESSION: [session_id]
SCOPE: [scope] ← All beads will be tagged with this

Phase 1: SKELETON
Goal: Capture everything. See the full scope.

Let's start with the vision. In 2-3 sentences:
What is this project and why does it need to exist?
═══════════════════════════════════════════════════════════════

Begin the Skeleton phase by asking about vision.


Resume Session

2.1 Load State

Read .white-room/SESSION-STATE.json and parse current state.

2.2 Show Status Summary

Display:

code
═══════════════════════════════════════════════════════════════
                RESUMING WHITE ROOM SESSION
═══════════════════════════════════════════════════════════════
PROJECT: [name] ([type])
SESSION: [session_id]
SCOPE: [scope] ← Beads tagged with this
PHASE: [current_phase] ([phase_progress]%)
TIME: [total_session_time_minutes]m

NEXT ACTION: [next_action from state]
═══════════════════════════════════════════════════════════════

2.3 Check for Blockers

If global_blockers is not empty:

  • List blockers
  • Ask user how to resolve before continuing

2.4 Continue from Current State

Pick up from current_focus.next_item and continue the appropriate phase.


Phase Behaviors

SKELETON Phase

Focus on: Vision, Users, Scope, Features Ask questions to capture the full picture. Output to: 00-VISION.md, 01-USERS.md, 02-SCOPE.md, 03-FEATURES.md Beads: Create feature beads for each major feature identified.

ANATOMY Phase

Focus on: Data models, APIs, Architecture, Components Break down each feature systematically. Output to: 05-ARCHITECTURE.md, 06-DATA-MODEL.md, 07-API-CONTRACTS.md, 08-UI-SPEC.md Beads: Create task beads for components, API endpoints, data models.

PHYSIOLOGY Phase

Focus on: Error handling, Edge cases, What-ifs Apply the Depth Drill to every operation. Output to: 04-USER-FLOWS.md, 09-SECURITY.md, 10-TESTING.md, 11-DEPLOYMENT.md Beads: Create task beads for edge cases and error handling work.

STRESS Phase

Focus on: Stranger test, Adversarial gauntlet Validate from outside perspectives. Output to: 12-RISKS.md, 13-DECISIONS.md, 14-GLOSSARY.md, 15-TASK-BREAKDOWN.md Beads: Create task or bug beads for risks and issues found.


Bead Labeling

All beads created during a White Room session MUST include:

bash
--add-label="[SCOPE]"        # e.g., scope:iteration-2 (from SESSION-STATE.json)
--add-label="white-room"     # Links to this planning session
--add-label="phase:[phase]"  # skeleton, anatomy, physiology, stress

This enables agents to filter work:

bash
bd ready --label=scope:iteration-2  # Get work for this iteration
bd list --label=white-room          # Get all White Room planned work

Key Rules

  1. Update state after every significant progress - Write to SESSION-STATE.json
  2. Auto-continue unless blocked - Keep moving forward
  3. One question at a time - Don't overwhelm
  4. Check phase gates before advancing - No skipping
  5. Create beads as you go - Don't wait until export