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

must_haves:
  truths:
    - "Weak agent can resume session by reading STATE.md alone"
    - "WORK.md captures verbose execution for mid-task resume"
    - "INBOX.md captures loops from both user and agent"
    - "HISTORY.md shows completed phases in minimal format"
  artifacts:
    - path: "gsd_lite/STATE.md"
      provides: "Phase/task/decision tracker"
      min_lines: 30
      contains: ["Active Phase", "Current Task", "Key Decisions", "Session Log"]
    - path: "gsd_lite/WORK.md"
      provides: "Verbose execution log"
      min_lines: 20
      contains: ["Execution Log", "deleted after promotion"]
    - path: "gsd_lite/INBOX.md"
      provides: "Loop capture"
      min_lines: 15
      contains: ["From User", "From Agent"]
    - path: "gsd_lite/HISTORY.md"
      provides: "Completed phase record"
      min_lines: 10
      contains: ["Completed Phases"]
  key_links:
    - from: "STATE.md"
      to: "INBOX.md"
      via: "Open Loops reference"
      pattern: "INBOX\\.md"
---

<objective>
Create the 4 supporting template files: STATE.md, WORK.md, INBOX.md, HISTORY.md.

Purpose: These files work together with PROTOCOL.md to form the 5-file structure. Each has a specific role in the GSD-lite workflow - STATE tracks position, WORK logs execution, INBOX captures loops, HISTORY records completions.

Output: 4 template files ready for use in any gsd-lite project
</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

# Existing templates to enhance
@gsd_lite/STATE.md
@gsd_lite/template_gsd_lite/02_STATE_TEMPLATE.md
@gsd_lite/template_gsd_lite/01_PROJECT_TEMPLATE.md
</context>

<tasks>

<task type="auto">
  <name>Task 1: Create STATE.md template with moderate depth</name>
  <files>gsd_lite/STATE.md</files>
  <action>
Create gsd_lite/STATE.md (replacing existing) with MODERATE depth for weak agent resume:

```markdown
# GSD-Lite State

<!--
This file answers: "Where were we?"
Read this at session start to understand current position.
Update after decisions, task changes, or session end.
-->

## Active Phase

**Phase:** [Number] - [Name]
**Goal:** [One sentence]
**Status:** Planning | Executing | Blocked | Complete

## Current Task

**Task:** [Name]
**Status:** Not Started | In Progress | Blocked | Done
**Blocked By:** [If blocked, what's stopping progress]

## Key Decisions Made

<!--
Decisions logged here so agent doesn't re-ask same questions.
Format: Date - Decision summary - Why
-->

| Date | Decision | Why |
|------|----------|-----|
| YYYY-MM-DD | [Decision] | [Rationale] |

## Session Log

<!-- Brief history of what happened when -->

| Session | Date | Summary |
|---------|------|---------|
| 1 | YYYY-MM-DD | [What happened] |

## Open Loops

See INBOX.md for full list.
Currently: [N] loops pending review

---
*Last Updated: YYYY-MM-DD*
```

Key requirements:
- Moderate depth (more than just "where", but not full verbose log)
- Key Decisions table so weak agent doesn't repeat questions
- Session Log for continuity
- Reference to INBOX.md for open loops (don't duplicate)
  </action>
  <verify>
File exists: `ls gsd_lite/STATE.md`
Has required sections: `grep -E "(Active Phase|Current Task|Key Decisions|Session Log|Open Loops)" gsd_lite/STATE.md | wc -l` should be 5
  </verify>
  <done>
STATE.md template exists with Active Phase, Current Task, Key Decisions, Session Log, and Open Loops reference. Moderate depth suitable for weak agent resume.
  </done>
</task>

<task type="auto">
  <name>Task 2: Create WORK.md template for verbose execution</name>
  <files>gsd_lite/WORK.md</files>
  <action>
Create gsd_lite/WORK.md:

```markdown
# GSD-Lite Work Log

<!--
VERBOSE EXECUTION LOG - deleted after phase promotion.
Log every action here during execution mode.
-->

## ⚠️ This file is EPHEMERAL

Content deleted after phase completion. Extract important outcomes before promotion.

## Current Phase Execution

**Phase:** [From STATE.md]
**Started:** YYYY-MM-DD

### Execution Log

<!-- Format: timestamp, action, result -->

**[YYYY-MM-DD HH:MM]** - [Action taken]
- Result: [What happened]
- Decision: [If any decision was made]
- Loop: [If any loop was captured, reference INBOX.md]

**[YYYY-MM-DD HH:MM]** - [Next action]
...

---
*Delete this content after promoting phase outcomes to external artifact.*
```

Key requirements:
- Clearly marked as ephemeral (deleted after promotion)
- Verbose format with timestamp, action, result
- Cross-references INBOX.md for loop capture
- Reminder to extract before deletion
  </action>
  <verify>
File exists: `ls gsd_lite/WORK.md`
Ephemeral warning: `grep -i "ephemeral\|deleted" gsd_lite/WORK.md`
  </verify>
  <done>
WORK.md template exists with verbose execution log format and ephemeral warning.
  </done>
</task>

<task type="auto">
  <name>Task 3: Create INBOX.md template for loop capture</name>
  <files>gsd_lite/INBOX.md</files>
  <action>
Create gsd_lite/INBOX.md:

```markdown
# GSD-Lite Inbox

<!--
LOOP CAPTURE - ideas, questions, concerns parked here.
Loops come from TWO sources:
1. User: Non-linear thinker, asks questions mid-task
2. Agent: Discovers dependencies, future work, concerns
-->

## How to Use

- Capture immediately when loop discovered
- Don't interrupt current task to address loop
- Review at phase end for next phase planning

## From User

<!-- User-initiated loops: questions, concerns, ideas during session -->

| # | Date | Loop | Source | Status |
|---|------|------|--------|--------|
| U1 | YYYY-MM-DD | [Question/concern] | Session N, Turn M | Open |

## From Agent

<!-- Agent-discovered loops: dependencies, risks, future work -->

| # | Date | Loop | Source | Status |
|---|------|------|--------|--------|
| A1 | YYYY-MM-DD | [Discovery/concern] | Phase N execution | Open |

## Resolved

<!-- Move here when addressed -->

| # | Resolution | Date |
|---|------------|------|
| U1 | [How resolved] | YYYY-MM-DD |

---
*Review before each phase promotion.*
```

Key requirements:
- TWO sections: From User AND From Agent (CONTEXT.md requirement)
- Clear capture format with source tracking
- Resolved section for completed loops
- Review reminder for phase end
  </action>
  <verify>
File exists: `ls gsd_lite/INBOX.md`
Both sources: `grep -E "(From User|From Agent)" gsd_lite/INBOX.md | wc -l` should be 2
  </verify>
  <done>
INBOX.md template exists with separate sections for user and agent loops, plus resolution tracking.
  </done>
</task>

<task type="auto">
  <name>Task 4: Create HISTORY.md template for completed phases</name>
  <files>gsd_lite/HISTORY.md</files>
  <action>
Create gsd_lite/HISTORY.md:

```markdown
# GSD-Lite History

<!--
MINIMAL record of completed phases.
One line per phase - just enough to know what was done.
Details live in external artifacts (PRs, docs, etc.)
-->

## Completed Phases

| Phase | Name | Completed | Outcome |
|-------|------|-----------|---------|
| 1 | [Name] | YYYY-MM-DD | [One-line summary + link to artifact] |

## How to Use

After phase promotion:
1. Add one-line entry above
2. Link to external artifact (PR, doc, etc.)
3. Delete WORK.md content
4. Clear STATE.md active phase

---
*This file grows slowly. One line per completed phase.*
```

Key requirements:
- MINIMAL format (one line per phase)
- Links to external artifacts (PRs, docs)
- Clear instruction on when/how to update
  </action>
  <verify>
File exists: `ls gsd_lite/HISTORY.md`
Completed section: `grep "Completed Phases" gsd_lite/HISTORY.md`
  </verify>
  <done>
HISTORY.md template exists with minimal completed phase format and promotion instructions.
  </done>
</task>

</tasks>

<verification>
1. All 4 files exist: STATE.md, WORK.md, INBOX.md, HISTORY.md
2. STATE.md has moderate depth with Key Decisions table
3. WORK.md is clearly marked ephemeral
4. INBOX.md has both user and agent loop sections
5. HISTORY.md has minimal completed phase format
6. Files reference each other appropriately
</verification>

<success_criteria>
- 4 template files created with correct structure
- STATE.md enables weak agent resume (moderate depth)
- WORK.md logs verbose execution (ephemeral)
- INBOX.md captures loops from both sources
- HISTORY.md records completed phases (minimal)
- All files follow the hierarchy: Phase > Session > Task
</success_criteria>

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