---
name: promote
description: Transform a development project into a production scripting project. Bridge between development and treatment.
allowed-tools: Read, Write, Glob, Bash
argument-hint: "[project] [--dry-run|--force]"
---

# /promote - Promote Project to Scripting

Transform a development project into a production scripting project. This is the bridge between development and treatment generation.

## Usage

```
/promote [project]
/promote [project] --dry-run
/promote [project] --force
```

**Examples:**
```
/promote asi-bridge               # Standard promotion
/promote asi-bridge --dry-run     # Preview without creating files
/promote leviathan --force        # Overwrite existing scripting folder
```

## Parameters

| Parameter | Required | Default | Description |
|-----------|----------|---------|-------------|
| `project` | Yes | — | Project folder name in `/projects/[project]/development/` |
| `--dry-run` | No | false | Preview transformation without writing files |
| `--force` | No | false | Overwrite existing `/[project]/` folder if it exists |

## What It Does

1. **Validates Prerequisites**
   - All 34 STATUS.md items checked
   - Required development documents exist
   - Behavioral DNA validation passes
   - Arc validation passes

2. **Creates Scripting Folder Structure**
   ```
   /[project]/
   ├── bible/
   │   ├── series_bible.md        ← From: thematic_spine.md, world.md, concept
   │   ├── characters.md          ← From: characters.md (COPIED DIRECTLY)
   │   └── episode_arc.md         ← From: structure_outline.md (EXPANDED)
   ├── state/
   │   └── current_state.json     ← Initialized
   ├── episodes/                  ← Empty, ready for generation
   └── ORCHESTRATION.md           ← Project-specific rules
   ```

3. **Copies/Transforms Documents**
   - `characters.md` → Copied directly (same format in dev and production)
   - Other development docs → Production format (standardized, parseable)
   - Consolidates documents into bible/ structure

4. **Fills Episode Arc Details** (AI step)
   - Python creates `episode_arc.md` skeleton with `[FILL]` placeholders
   - AI reads dev documents and fills in per-episode details:
     - **One-Line** — Episode summary from structure_outline.md
     - **Cliffhanger** — Specific image/line ending each episode
     - **Type** — Cliffhanger code (M-CF, M-PT, A-RE, etc.)
     - **Intensity** — 1-10 rating
   - Verifies cliffhanger distribution and emotional beat placement

5. **Initializes State**
   - Creates `current_state.json` with generation tracking

## Prerequisites (HARD GATES)

Before promotion can proceed:

| Gate | Requirement | Check |
|------|-------------|-------|
| Checklist | All 34 STATUS.md items complete | Manual + automated |
| Documents | 5 required development docs exist | Automated |
| Behavioral DNA | Characters have filmable DNA | `validate_behavioral_dna.py` |
| Arc Structure | 60 episodes with beats defined | `validate_episode_arc.py` |
| /validate | Comprehensive validation passes | `/validate [project]` |

**If any gate fails, promotion is blocked.**

## Execution

When this skill is invoked:

1. **Read the agent prompt:** `/agents/promote_agent.md`
2. **Follow the workflow** specified in the agent
3. **Run all validation gates** before any file transformation
4. **Create output files** only after all gates pass
5. **Report results** with next steps

## Workflow Position

```
/projects/[project]/development/    ← Development phase
    ↓
/validate [project]               ← Pre-promotion validation
    ↓
/promote [project]                ← THIS COMMAND
    ↓
/projects/[project]/              ← Scripting phase (created)
    ↓
/treatment [project]              ← Treatment generation
```

## Results

| Condition | Result |
|-----------|--------|
| Any prerequisite fails | BLOCKED — lists specific failures |
| `--dry-run` | PREVIEW — shows what would be created |
| Success | PROMOTED — lists created files |
| `/[project]/` exists | BLOCKED (use `--force` to overwrite) |

## Post-Promotion

After successful promotion:

1. **Development folder preserved** — `/projects/[project]/development/` remains unchanged
2. **Scripting folder created** — `/[project]/` ready for treatment
3. **Treatment unlocked** — `/treatment [project]` now available

## Example Output

```
═══════════════════════════════════════════════════════════════
PROMOTION: asi-bridge
═══════════════════════════════════════════════════════════════

PREREQUISITES:
  ✓ STATUS.md: 34/34 complete
  ✓ Documents: All 5 required documents exist
  ✓ Behavioral DNA: 3 characters validated
  ✓ Arc Structure: 60 episodes defined
  ✓ /validate: Passed with score 4.1/5.0

TRANSFORMATION:
  ✓ characters.md → bible/characters.md (copied)
  ✓ structure_outline.md → bible/episode_arc.md (skeleton created)
  ✓ episode_arc.md filled with 60 episode details
  ✓ thematic_spine.md + world.md → bible/series_bible.md
  ✓ state/current_state.json initialized
  ✓ ORCHESTRATION.md created

EPISODE ARC VERIFICATION:
  ✓ 60/60 episodes have one-liners
  ✓ Cliffhanger distribution: 78% Mid-Action, 22% Aftermath
  ✓ 11 emotional beats marked
  ✓ Intensity curve verified

FILES CREATED:
  /asi-bridge/scripting/bible/series_bible.md
  /asi-bridge/scripting/bible/characters.md
  /asi-bridge/scripting/bible/episode_arc.md
  /asi-bridge/_pipeline/state/current_state.json
  /asi-bridge/ORCHESTRATION.md
  /asi-bridge/scripting/episodes/ (empty)

───────────────────────────────────────────────────────────────
RESULT: PROMOTED

Development folder preserved: /projects/asi-bridge/development/

NEXT STEPS:
  1. Review bible/ files for accuracy
  2. Run: /treatment asi-bridge
═══════════════════════════════════════════════════════════════
```

## Integration

### With /validate
Run `/validate` first to ensure readiness:
```
/validate asi-bridge      # Check readiness
  → If PASS: /promote asi-bridge
```

### With /treatment
After promotion, treatment is unlocked:
```
/promote asi-bridge       # Creates scripting folder
/treatment asi-bridge     # Now available
```

### Keeping Development Folder
The development folder is **preserved** after promotion:
- Continue iterating on development docs if needed
- Re-run `/promote --force` to sync changes
- Reference development docs during scripting
