# /setup — Initialize Project State Files

> First-time setup for a new project. Creates state files and captures project identity.

---

## Procedure

### Step 1: Check Existing State

Check if these files exist:
- `.claude/project/STATE.md`
- `.claude/project/EVENTS.md`
- `.claude/project/RUN_POLICY.md`

**If all three exist**, print:

> "Already initialized. Run `/start` to see your project status."

Then stop. Do not proceed.

### Step 2: Create Missing Files

If any of the three files are missing, create them from the templates that ship with the Bashi Starter framework. For a fresh install from the template, all files should already exist, so this step handles partial or corrupted states.

For each missing file, use the standard template:

**STATE.md** — Initialize with:
- Current Phase: Not Started
- Mode: Semi-Autonomous
- Active Task: None
- Next Task Queue: empty
- Session Lock: cleared

**EVENTS.md** — Initialize with:
- Header row and empty event table

**RUN_POLICY.md** — Initialize with:
- Default cycle limits per mode (Safe: 0, Semi-Auto: 1, Autonomous: 5)
- Default stop conditions

### Step 3: Capture Project Identity

Ask the user three questions (wait for answers before proceeding):

1. "What is the name of your project?"
2. "What does it do? (one sentence)"
3. "What tech stack will you use? (or say 'not sure yet')"

Write the answers to `.claude/project/IDENTITY.md`:

```markdown
# Project Identity

**Name:** [answer]
**Purpose:** [answer]
**Tech Stack:** [answer]
**Created:** [current date]
```

### Step 4: Confirm

Print:

> "Setup complete. Run `/capture-idea` to describe what you want to build."

---

## Rules

- Do not overwrite existing files. Only create files that are missing.
- Do not skip the user prompts in Step 3. Wait for answers.
- If the user says "not sure yet" for tech stack, write that literally. Do not suggest one.
