---
phase: 01.3-context-lifecycle-coaching-workflow-decomposition
plan: 03
type: execute
wave: 2
depends_on: ["01.3-01", "01.3-02"]
files_modified:
  - gsd-lite/PROTOCOL.md
  - gsd-lite/template/PROTOCOL.md
  - gsd-lite/template/STATE.md
autonomous: true

must_haves:
  truths:
    - "PROTOCOL.md is minimal entrypoint (~100-150 lines)"
    - "PROTOCOL.md routes to correct workflow based on state"
    - "STATE.md template includes Current Mode field"
    - "Session start reads STATE.md then loads appropriate workflow"
  artifacts:
    - path: "gsd-lite/PROTOCOL.md"
      provides: "Minimal session entrypoint"
      min_lines: 80
      max_lines: 200
    - path: "gsd-lite/template/STATE.md"
      provides: "State template with mode tracking"
      contains: "Current Mode:"
  key_links:
    - from: "gsd-lite/PROTOCOL.md"
      to: "gsd-lite/workflows/"
      via: "Workflow routing based on state"
      pattern: "workflows/"
---

<objective>
Create minimal PROTOCOL.md entrypoint that routes to workflows.

Purpose: Replace the 929-line monolithic PROTOCOL.md with a minimal entrypoint (~100-150 lines) that reads STATE.md and routes to the appropriate workflow file. This completes the decomposition.

Output: Minimal PROTOCOL.md that serves as router, and updated STATE.md template with explicit mode tracking.
</objective>

<execution_context>
@/Users/luutuankiet/.claude/get-shit-done/workflows/execute-plan.md
@/Users/luutuankiet/.claude/get-shit-done/templates/summary.md
</execution_context>

<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/01.3-context-lifecycle-coaching-workflow-decomposition/01.3-RESEARCH.md
@gsd-lite/workflows/moodboard.md
@gsd-lite/workflows/whiteboard.md
@gsd-lite/workflows/execution.md
@gsd-lite/workflows/checkpoint.md
</context>

<tasks>

<task type="auto">
  <name>Task 1: Create minimal PROTOCOL.md entrypoint</name>
  <files>gsd-lite/PROTOCOL.md, gsd-lite/template/PROTOCOL.md</files>
  <action>
Replace the current 929-line PROTOCOL.md with a minimal entrypoint (~100-150 lines):

```markdown
# GSD-Lite Protocol

[SYSTEM: GSD-LITE MODE ACTIVE]

## Session Start

1. Read this file (PROTOCOL.md)
2. Read STATE.md to determine current mode
3. Load appropriate workflow from gsd-lite/workflows/

## Workflow Router

**How routing works:** This is documentation-only routing. The agent manually reads STATE.md, checks the `Current Mode:` field, then reads and follows the appropriate workflow file. There is no programmatic automation - the agent interprets and follows instructions.

Read STATE.md `Current Mode:` field and load:

| State | Workflow | Purpose |
|-------|----------|---------|
| `none` or `planning` | moodboard.md | New phase, extract user vision |
| `moodboard-complete` | whiteboard.md | Present plan for approval |
| `execution` | execution.md | Execute tasks, log progress |
| `checkpoint` | checkpoint.md | Promote, trim, prepare next |

If STATE.md doesn't exist or has no active phase, load moodboard.md.

**Agent reads and follows:** Agent reads the workflow file content, then follows those instructions for the session. This is NOT programmatic routing - it's documentation the agent interprets.

## File Guide (Quick Reference)

| File | Purpose | Write Target |
|------|---------|--------------|
| PROTOCOL.md | Router (this file) | Never (immutable) |
| STATE.md | Phase/task tracker | gsd-lite/STATE.md |
| WORK.md | Execution log | gsd-lite/WORK.md |
| INBOX.md | Loop capture | gsd-lite/INBOX.md |
| HISTORY.md | Completed phases | gsd-lite/HISTORY.md |

## Systematic ID Format

All items use TYPE-NNN format (zero-padded, globally unique):
- PHASE-NNN: Phases in project
- TASK-NNN: Tasks within phases
- LOOP-NNN: Open questions/loops
- DECISION-NNN: Key decisions made

## Golden Rules

1. **No Ghost Decisions:** If not in STATE.md, it didn't happen
2. **Interview First:** Never execute without understanding scope
3. **Visual Interrupts:** 10x emoji banners for critical questions
4. **Sticky Notes:** Status block at end of EVERY turn
5. **User Owns Completion:** Agent signals readiness, user decides

## Coaching Philosophy

**User = visionary. Agent = builder.**

User decides:
- Vision and outcome
- Scope boundaries
- Implementation choices (if affects UX)
- When to complete phase

Agent decides:
- Technical details (with deviation log)
- Critical security fixes (immediately)

Agent never decides:
- Architectural changes (pause, present decision)
- Scope expansion (capture to INBOX)

## Context Lifecycle

Sessions use checkpoint -> clear -> resume:

1. **Checkpoint:** Save state to artifacts at session end
2. **Clear:** Start fresh chat (new context window)
3. **Resume:** Reconstruct from artifacts, not chat history

---
*GSD-Lite Protocol v2.0*
*Workflow decomposition: gsd-lite/workflows/*
```

Write to both:
- gsd-lite/PROTOCOL.md (active)
- gsd-lite/template/PROTOCOL.md (template)
  </action>
  <verify>
- gsd-lite/PROTOCOL.md exists
- gsd-lite/template/PROTOCOL.md exists
- Both are < 200 lines (minimal entrypoint)
- Contains "Workflow Router" section
- References workflows/ directory
  </verify>
  <done>
PROTOCOL.md is minimal router (~100-150 lines) that directs to workflow files.
  </done>
</task>

<task type="auto">
  <name>Task 2: Update STATE.md template with mode tracking</name>
  <files>gsd-lite/template/STATE.md</files>
  <action>
Update gsd-lite/template/STATE.md to include explicit mode tracking:

Add at the top of the template:

```markdown
## Current Mode

**Mode:** [none | planning | moodboard-complete | execution | checkpoint]
**Workflow:** [moodboard.md | whiteboard.md | execution.md | checkpoint.md]

---
```

The mode field tells the router which workflow to load.

Mode transitions:
- `none` -> Start moodboard for new phase
- `planning` -> Continue moodboard questioning
- `moodboard-complete` -> Present whiteboard
- `execution` -> Execute tasks, update WORK.md
- `checkpoint` -> User triggered promotion

Keep existing sections:
- Active Phase
- Current Task
- Key Decisions Made
- ID Registry
- Session Log
  </action>
  <verify>
- gsd-lite/template/STATE.md contains "Current Mode:" field
- Contains mode transition guidance
- Existing sections preserved
  </verify>
  <done>
STATE.md template includes explicit mode tracking for workflow routing.
  </done>
</task>

<task type="auto">
  <name>Task 3: Update active STATE.md with mode field</name>
  <files>gsd-lite/STATE.md</files>
  <action>
Update the active gsd-lite/STATE.md to include mode tracking.

Add the Current Mode section at the top, initialized appropriately based on current state.

If no active phase, set:
```markdown
## Current Mode

**Mode:** none
**Workflow:** moodboard.md

---
```
  </action>
  <verify>
- gsd-lite/STATE.md contains "Current Mode:" field
- Mode is set to appropriate value
  </verify>
  <done>
Active STATE.md has mode tracking field.
  </done>
</task>

</tasks>

<verification>
1. PROTOCOL.md is < 200 lines (was 929 lines)
2. PROTOCOL.md contains workflow router table
3. PROTOCOL.md references gsd-lite/workflows/
4. STATE.md template contains "Current Mode:" field
5. Active STATE.md contains "Current Mode:" field
6. Golden Rules and Coaching Philosophy preserved in PROTOCOL.md
</verification>

<success_criteria>
- Monolithic PROTOCOL.md replaced with minimal router
- STATE.md template updated with mode tracking
- Router correctly maps modes to workflows
- All golden rules and coaching philosophy preserved
</success_criteria>

<output>
After completion, create `.planning/phases/01.3-context-lifecycle-coaching-workflow-decomposition/01.3-03-SUMMARY.md`
</output>
