AgentSkillsCN

export

从白房间会话中生成可执行的成果

SKILL.md
--- frontmatter
name: export
description: Generate execution-ready artifacts from White Room session

White Room: Export

Generate execution-ready artifacts from White Room session

Generate execution-ready artifacts from the completed White Room session.

Prerequisites

Check SESSION-STATE.json:

  • current_phase should be "complete" or "stress" with high confidence
  • If not complete, warn user:
    code
    ⚠️ White Room session is not complete (currently at [phase] [progress]%)
    
    Exporting now may result in incomplete specifications.
    Continue anyway? [y/N]
    

Export Formats

1. Task Breakdown (Default)

Generate 15-TASK-BREAKDOWN.md if not already complete.

Format:

markdown
# Task Breakdown

## Phase 1: Foundation
- [ ] Task 1 - [Description] - [Estimate]
- [ ] Task 2 - [Description] - [Estimate]

## Phase 2: Core Features
- [ ] Task 3 - [Description] - [Estimate]
  - Depends on: Task 1
- [ ] Task 4 - [Description] - [Estimate]

## Phase 3: Polish
- [ ] Task 5 - [Description] - [Estimate]

## Dependencies
Task 3 → Task 1 (needs foundation)
Task 4 → Task 2 (needs API)

2. PRD JSON

Generate prd.json for programmatic consumption:

json
{
  "name": "[project_name]",
  "version": "1.0",
  "generated_at": "ISO timestamp",
  "white_room_session": "[session_id]",

  "vision": {
    "summary": "[from 00-VISION.md]",
    "problem": "[problem statement]",
    "solution": "[solution summary]"
  },

  "users": [
    {
      "persona": "[name]",
      "role": "[role]",
      "goals": ["[goal]"],
      "pain_points": ["[pain]"]
    }
  ],

  "features": [
    {
      "id": "[feature_id]",
      "name": "[name]",
      "description": "[description]",
      "priority": "P0|P1|P2",
      "components": ["[component]"],
      "apis": ["[endpoint]"],
      "acceptance_criteria": ["[criterion]"]
    }
  ],

  "data_model": {
    "entities": [
      {
        "name": "[entity]",
        "fields": [
          {"name": "[field]", "type": "[type]", "constraints": "[constraints]"}
        ],
        "relationships": ["[relationship]"]
      }
    ]
  },

  "api_contracts": [
    {
      "endpoint": "[path]",
      "method": "[GET|POST|etc]",
      "auth": "[required|optional|none]",
      "request": {},
      "response": {},
      "errors": []
    }
  ],

  "risks": [
    {
      "id": "[risk_id]",
      "description": "[description]",
      "likelihood": "high|medium|low",
      "impact": "high|medium|low",
      "mitigation": "[mitigation]"
    }
  ],

  "decisions": [
    {
      "id": "[dec_id]",
      "decision": "[what was decided]",
      "alternatives": ["[alt]"],
      "rationale": "[why]"
    }
  ],

  "tasks": [
    {
      "id": "[task_id]",
      "title": "[title]",
      "description": "[description]",
      "dependencies": ["[task_id]"],
      "feature": "[feature_id]",
      "estimate": "[estimate]"
    }
  ]
}

3. Beads Import

Generate beads-import.json for Beads issue tracker.

CRITICAL: Include the scope label from SESSION-STATE.json

Read scope from .white-room/SESSION-STATE.json and add it to every issue.

json
{
  "scope": "[scope from SESSION-STATE.json, e.g., scope:iteration-2]",
  "issues": [
    {
      "title": "[Task title]",
      "description": "[Task description with acceptance criteria]",
      "labels": ["white-room", "[feature]", "[SCOPE]"],
      "dependencies": ["[issue_id]"]
    }
  ]
}

When creating beads manually (via bd create): Always include the scope label:

bash
bd create --title="..." --type=task --add-label="scope:iteration-2" ...

This ensures agents can filter by scope:

bash
bd ready --label=scope:iteration-2

4. Obra Plan

Generate obra-plan.md compatible with Obra's writing-plans skill:

markdown
# Implementation Plan: [Project Name]

## Overview
[Summary from vision]

## Prerequisites
- [ ] [Prerequisite]

## Implementation Steps

### Step 1: [Title]
**Files:** [files to create/modify]
**Description:** [what to do]
**Acceptance:** [how to verify]

### Step 2: [Title]
...

## Verification
- [ ] [Test to run]
- [ ] [Behavior to verify]

Step 1: Choose Export Format

code
═══════════════════════════════════════════════════════════════
                WHITE ROOM EXPORT
═══════════════════════════════════════════════════════════════
Session: [session_id]
Status: [phase] ([progress]%)

Available exports:
1. Task Breakdown (Markdown) - Human-readable task list
2. PRD JSON - Programmatic product spec
3. Beads Import - Issue tracker integration
4. Obra Plan - Implementation plan for Claude Code
5. All of the above

Which format(s)? [1-5]
═══════════════════════════════════════════════════════════════

Step 2: Generate Artifacts

Read all docs/white-room/*.md files and compile into chosen format(s).

Step 3: Validate Completeness

Check that generated artifacts have no:

  • Empty sections
  • "TBD" or "TODO" markers
  • Missing references
  • Broken dependencies

Step 4: Save Artifacts

Write to docs/white-room/exports/:

  • 15-TASK-BREAKDOWN.md
  • prd.json
  • beads-import.json
  • obra-plan.md

Step 5: Report

code
═══════════════════════════════════════════════════════════════
                EXPORT COMPLETE
═══════════════════════════════════════════════════════════════
Generated:
✓ docs/white-room/exports/15-TASK-BREAKDOWN.md
✓ docs/white-room/exports/prd.json
✓ docs/white-room/exports/beads-import.json
✓ docs/white-room/exports/obra-plan.md

Next steps:
1. Review the task breakdown
2. Import to your issue tracker (if using Beads: bd import beads-import.json)
3. Start implementation with /white-room-next or Obra's executing-plans

The White Room session is complete. Happy building! 🏗️
═══════════════════════════════════════════════════════════════

Integration Notes

With Obra Superpowers

The generated obra-plan.md is compatible with:

  • superpowers:writing-plans (as input)
  • superpowers:executing-plans (for execution)
  • superpowers:subagent-driven-development (for parallel work)

With Beads

Import with:

bash
bd import docs/white-room/exports/beads-import.json

With Ralph Loops

The prd.json can be used as Ralph's PRD input for autonomous building.