---
phase: 01.2-audit-and-fix-template-coherence-for-single-agent-sessions
plan: 01
type: execute
wave: 1
depends_on: []
files_modified:
  - gsd_lite/PROTOCOL.md
autonomous: true

must_haves:
  truths:
    - "Agent reads PROTOCOL.md first and knows exactly what to do"
    - "Agent shows moodboard in planning mode (does not skip)"
    - "Agent logs to WORK.md during execution"
    - "Agent captures loops from both user and itself"
    - "Agent gives sticky reminder at end of every turn"
  artifacts:
    - path: "gsd_lite/PROTOCOL.md"
      provides: "Single entrypoint for GSD-lite workflow"
      min_lines: 100
      contains: ["Session Start Checklist", "File Guide", "Planning Mode", "Execution Mode", "Loop Capture", "Sticky Reminder", "Promotion Workflow"]
  key_links:
    - from: "PROTOCOL.md"
      to: "STATE.md, WORK.md, INBOX.md, HISTORY.md"
      via: "File Guide table"
      pattern: "STATE\\.md.*WORK\\.md.*INBOX\\.md.*HISTORY\\.md"
---

<objective>
Create PROTOCOL.md as the single entrypoint for GSD-lite workflow.

Purpose: PROTOCOL.md is the bootloader prompt that agents read first. It must be self-contained and foolproof for weak reasoning models. Consolidates the scattered MANIFESTO, BOOTLOADER_PROMPT, and BOOTLOADER_TEMPLATE into one coherent protocol.

Output: gsd_lite/PROTOCOL.md - complete protocol document with all behavioral rules
</objective>

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

<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/01.2-audit-and-fix-template-coherence-for-single-agent-sessions/CONTEXT.md

# Source files to consolidate
@gsd_lite/00_MANIFESTO.md
@gsd_lite/BOOTLOADER_PROMPT.md
@gsd_lite/template_gsd_lite/03_BOOTLOADER_TEMPLATE.md
</context>

<tasks>

<task type="auto">
  <name>Task 1: Create PROTOCOL.md with all required sections</name>
  <files>gsd_lite/PROTOCOL.md</files>
  <action>
Create gsd_lite/PROTOCOL.md with the following structure:

```markdown
# GSD-Lite Protocol

[SYSTEM: GSD-LITE MODE ACTIVE]

## Session Start Checklist

When starting ANY session:
1. Read this PROTOCOL.md (you're doing it now)
2. Read STATE.md (current phase, task, decisions)
3. If resuming mid-task, also read WORK.md

## File Guide

| File | Purpose | When to Read | When to Write |
|------|---------|--------------|---------------|
| PROTOCOL.md | Session entrypoint | Always first | Never (immutable) |
| STATE.md | Phase/task tracker | Every session start | After decisions, phase changes |
| WORK.md | Verbose execution log | When resuming | Every action during execution |
| INBOX.md | Loop capture | When planning | When user OR agent discovers loop |
| HISTORY.md | Completed phases | For context | After phase promotion |

## Planning Mode

[10x emoji moodboard banner section with clear visual format]
DO NOT SKIP THE MOODBOARD. The visual banner is required to:
1. Interview user to understand goal
2. Present moodboard with visual boxes showing scope/risk/tasks
3. Wait for user confirmation before proceeding

Include the exact format for moodboard display.

## Execution Mode

During execution:
1. Log EVERY action to WORK.md (verbose)
2. Capture loops immediately to INBOX.md
3. Never expand scope mid-phase - defer to INBOX

## Loop Capture Protocol

Loops come from TWO sources:
- User: Non-linear thinker, will ask questions mid-task
- Agent: Discovers dependencies, concerns, future work

Capture format for INBOX.md.

## Sticky Reminder

End of EVERY turn, include:
- Current status (phase, task, blocked/unblocked)
- Loops captured this turn (if any)
- Next action

Format example provided.

## Scope Discipline

- Never expand scope mid-phase
- Capture scope creep as loops in INBOX.md
- Review INBOX.md at phase end

## Promotion Workflow

When phase completes:
1. Promote: Extract key outcomes to external artifact (PR, doc, etc.)
2. Record: Add one-line entry to HISTORY.md
3. Trim: Delete WORK.md content (aggressive trim)
4. Clear: Update STATE.md to show no active phase
```

Ensure the protocol:
- Uses 10x emoji banners for visual interrupts (from CONTEXT.md requirement)
- Is self-contained (no external references needed)
- Works for weak reasoning models (explicit, not implicit)
- Includes exact formats for moodboard, sticky reminder, loop capture
  </action>
  <verify>
File exists: `ls gsd_lite/PROTOCOL.md`
File has all sections: `grep -E "(Session Start|File Guide|Planning Mode|Execution Mode|Loop Capture|Sticky Reminder|Scope Discipline|Promotion Workflow)" gsd_lite/PROTOCOL.md | wc -l` should be 8+
Moodboard format present: `grep -i "moodboard" gsd_lite/PROTOCOL.md`
  </verify>
  <done>
PROTOCOL.md exists with all 8 required sections: Session Start Checklist, File Guide, Planning Mode (with moodboard), Execution Mode, Loop Capture, Sticky Reminder, Scope Discipline, Promotion Workflow
  </done>
</task>

<task type="auto">
  <name>Task 2: Add behavioral rules and examples</name>
  <files>gsd_lite/PROTOCOL.md</files>
  <action>
Enhance PROTOCOL.md with explicit behavioral rules and concrete examples:

1. Add "Golden Rules" section (from MANIFESTO):
   - No Ghost Decisions: If decision isn't in STATE.md, it didn't happen
   - Interview First: Never execute without understanding scope
   - Visual Interrupts: Use 10x emoji banners for critical questions

2. Add concrete examples for each mode:
   - Planning moodboard example (with actual emoji visual box)
   - Execution log entry example (WORK.md format)
   - Loop capture example (INBOX.md format)
   - Sticky reminder example (exact format)
   - History entry example (HISTORY.md format)

3. Add "Single-Read Constraint" note:
   - Agent can only read files at first turn
   - Protocol must be self-contained
   - No assumptions about agent memory between turns

The examples must be copy-paste-ready so weak models have exact templates to follow.
  </action>
  <verify>
Golden rules present: `grep -i "golden rule" gsd_lite/PROTOCOL.md`
Examples present: `grep -c "Example:" gsd_lite/PROTOCOL.md` should be 4+
Single-read noted: `grep -i "single.*read\|first turn" gsd_lite/PROTOCOL.md`
  </verify>
  <done>
PROTOCOL.md contains Golden Rules, 4+ concrete examples, and single-read constraint note. Human can read the protocol and understand the entire GSD-lite workflow without any other documents.
  </done>
</task>

</tasks>

<verification>
1. PROTOCOL.md exists in gsd_lite/
2. Contains all 8 required sections from CONTEXT.md
3. Has 10x emoji moodboard visual format
4. Is self-contained (no dangling references)
5. Includes concrete examples for each workflow step
6. A human can read it and understand the entire workflow
</verification>

<success_criteria>
- PROTOCOL.md is the single entrypoint for GSD-lite
- All behavioral rules from CONTEXT.md are present
- Moodboard planning mode with 10x emoji banner is prominently featured
- Weak reasoning models can follow it without interpretation
- File is 100+ lines with comprehensive coverage
</success_criteria>

<output>
After completion, create `.planning/phases/01.2-audit-and-fix-template-coherence-for-single-agent-sessions/01.2-01-SUMMARY.md`
</output>
