---
phase: 01.7-refactor-artifacts-for-grep-synergy
plan: 02
type: execute
wave: 1
depends_on: []
files_modified:
  - src/gsd_lite/template/workflows/moodboard.md
  - src/gsd_lite/template/workflows/whiteboard.md
  - src/gsd_lite/template/workflows/execution.md
  - src/gsd_lite/template/workflows/checkpoint.md
  - src/gsd_lite/template/workflows/revisit.md
autonomous: true

must_haves:
  truths:
    - "Fresh agent reading any workflow exhibits pair programming behavior (proposes, challenges, collaborates)"
    - "Fresh agent reading any workflow talks to user before writing to artifacts on first turn"
    - "Fresh agent reading any workflow ends responses with explicit handoff to user"
    - "grep 'STATE.md' across workflows returns only deprecation notices, not active usage"
    - "grep 'thinking partners' across workflows returns match in all 5 active workflow files"
  artifacts:
    - path: "src/gsd_lite/template/workflows/moodboard.md"
      provides: "Pair programming moodboard workflow"
      contains: "thinking partners"
    - path: "src/gsd_lite/template/workflows/execution.md"
      provides: "Pair programming execution workflow"
      contains: "[YOUR TURN]"
    - path: "src/gsd_lite/template/workflows/checkpoint.md"
      provides: "Updated checkpoint referencing WORK.md only"
      contains: "WORK.md"
  key_links:
    - from: "All workflows"
      to: "WORK.md"
      via: "artifact references"
      pattern: "WORK.md"
    - from: "All workflows"
      to: "pair programming"
      via: "coaching philosophy section"
      pattern: "thinking partners"
---

<objective>
Update all workflow files with pair programming philosophy and first-turn protocol.

Purpose: Transform agent behavior from "task executor" to "thinking partner." Agent operates as navigator (proposes hypotheses, challenges assumptions, teaches with analogies), user remains driver. Fix bug where agent writes to artifacts on first turn without talking to user.

Output:
- All 5 workflow files updated with new coaching philosophy
- First-turn protocol added to all workflows
- All STATE.md references replaced with WORK.md
- Confirmation loops with [YOUR TURN] in all workflows
</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.7-refactor-artifacts-and-protocols-and-workflows-to-synergy-with-grep/01.7-CONTEXT.md
@.planning/phases/01.7-refactor-artifacts-and-protocols-and-workflows-to-synergy-with-grep/01.7-RESEARCH.md
@.planning/phases/01.7-refactor-artifacts-and-protocols-and-workflows-to-synergy-with-grep/references/prompt_guided_learning.md
@src/gsd_lite/template/workflows/moodboard.md
@src/gsd_lite/template/workflows/execution.md
@src/gsd_lite/template/workflows/checkpoint.md
</context>

<tasks>

<task type="auto">
  <name>Task 1: Update moodboard.md and whiteboard.md with pair programming philosophy</name>
  <files>src/gsd_lite/template/workflows/moodboard.md, src/gsd_lite/template/workflows/whiteboard.md</files>
  <action>
Update moodboard.md:

1. **Replace Coaching Philosophy section:**

OLD: "User = founder/visionary. You = builder."

NEW: "User + Agent = thinking partners exploring together."

Agent behaviors to encode:
- **Propose hypotheses:** "What if we tried X?" for user to react to
- **Challenge assumptions:** "Why do you think that?" "Have you considered Y?"
- **Teach with analogies:** Explain concepts with relatable mental models
- **Celebrate discoveries:** "Exactly! You nailed it" for aha moments
- **Transparent reasoning:** Explain WHY you're asking a question
- **Treat errors as learning:** Failures are learning moments, not just bugs
- **Validate first:** Acknowledge correct logic before giving feedback

2. **Add First-Turn Protocol section (after Initialization Check):**

```markdown
## First Turn Protocol

**CRITICAL: On first turn, ALWAYS talk to user before writing to any artifact.**

First turn sequence:
1. Read PROTOCOL.md (silently)
2. Read WORK.md Current Understanding (silently)
3. **TALK to user:** "Here's what I understand from the artifacts... What would you like to explore today?"
4. Only write to artifacts AFTER conversing with user

**Never on first turn:**
- Write to INBOX.md or WORK.md
- Propose a plan without discussing
- Start executing without understanding context
```

3. **Add Confirmation Loop requirement:**

End every substantive response with explicit handoff:
```
[YOUR TURN] - What would you like to explore next?
```

4. **Remove hierarchical framing:**
- Remove "User owns outcome. Agent executes."
- Remove "Never expand scope mid-phase"
- Remove automatic INBOX capture for interesting threads (replace with "explore together or park for later - user decides")

5. **Update STATE.md references to WORK.md:**
- Replace "Read STATE.md" with "Read WORK.md Current Understanding"
- Update Initialization Check to check WORK.md

Apply same changes to whiteboard.md.
  </action>
  <verify>
- grep "thinking partners" workflows/moodboard.md returns match
- grep "YOUR TURN" workflows/moodboard.md returns match
- grep "First Turn Protocol" workflows/moodboard.md returns match
- grep "STATE.md" workflows/moodboard.md returns 0 (except deprecation mentions)
- Same checks pass for whiteboard.md
  </verify>
  <done>
moodboard.md and whiteboard.md updated with pair programming philosophy, first-turn protocol, and confirmation loops.
  </done>
</task>

<task type="auto">
  <name>Task 2: Update execution.md and checkpoint.md with pair programming philosophy</name>
  <files>src/gsd_lite/template/workflows/execution.md, src/gsd_lite/template/workflows/checkpoint.md</files>
  <action>
Update execution.md:

1. **Replace Coaching Philosophy section with pair programming framing**
   - Same transformation as moodboard.md
   - Emphasize: execution is still collaborative, not hierarchical
   - Agent can challenge approach during execution: "Before we proceed, have you considered..."

2. **Add First-Turn Protocol section**
   - Same as moodboard.md

3. **Add Confirmation Loops:**
   - After completing a task: "[YOUR TURN] - Task complete. What would you like to verify or explore next?"
   - When hitting a blocker: "[YOUR TURN] - I've hit a snag. Here's what I found... How would you like to proceed?"

4. **Update frustration handling:**
   - Add: "If user seems stuck or frustrated, switch from Socratic questioning to direct explanation, then resume guided inquiry once confidence is restored."

5. **Update STATE.md references to WORK.md**

Update checkpoint.md:

1. **Same Coaching Philosophy transformation**

2. **Update Current Understanding section references:**
   - Now refers to WORK.md section, not STATE.md
   - "Update WORK.md Current Understanding section" instead of "Update STATE.md"

3. **Add First-Turn Protocol section**

4. **Update artifact references:**
   - Remove STATE.md from "Update these artifacts" list
   - WORK.md now contains both state tracking AND session log
  </action>
  <verify>
- grep "thinking partners" workflows/execution.md returns match
- grep "YOUR TURN" workflows/execution.md returns match
- grep "First Turn Protocol" workflows/checkpoint.md returns match
- grep "STATE.md" workflows/checkpoint.md shows only deprecation references
  </verify>
  <done>
execution.md and checkpoint.md updated with pair programming philosophy, first-turn protocol, and WORK.md references.
  </done>
</task>

<task type="auto">
  <name>Task 3: Update revisit.md and remove promotion.md</name>
  <files>src/gsd_lite/template/workflows/revisit.md, src/gsd_lite/template/workflows/promotion.md</files>
  <action>
Update revisit.md:

1. **Same Coaching Philosophy transformation as other workflows**

2. **Add First-Turn Protocol section**

3. **Add Confirmation Loops with [YOUR TURN]**

4. **Update STATE.md references to WORK.md**

5. **Emphasize exploration:**
   - Revisit is a natural part of thinking together
   - "Let's step back and reconsider" is healthy, not a failure
   - Agent should help user articulate what's bothering them

Handle promotion.md:

1. **Delete or rename promotion.md:**
   - Rename to `promotion.md.deprecated` OR
   - Add prominent deprecation notice at top pointing to housekeeping.md
   - "This workflow is deprecated. Use housekeeping.md for PR extraction and archiving."

2. **Update any cross-references:**
   - Ensure no other workflow file references promotion.md
  </action>
  <verify>
- grep "thinking partners" workflows/revisit.md returns match
- grep "YOUR TURN" workflows/revisit.md returns match
- promotion.md either deleted, renamed, or has deprecation notice
- grep "promotion.md" workflows/*.md returns 0 (no active references)
  </verify>
  <done>
revisit.md updated with pair programming philosophy. promotion.md deprecated in favor of housekeeping.md.
  </done>
</task>

</tasks>

<verification>
After all tasks complete:

1. Pair programming check:
   - `grep -l "thinking partners" src/gsd_lite/template/workflows/*.md` returns all 5 active workflows

2. First-turn protocol check:
   - `grep -l "First Turn Protocol" src/gsd_lite/template/workflows/*.md` returns all 5 active workflows

3. Confirmation loop check:
   - `grep -l "YOUR TURN" src/gsd_lite/template/workflows/*.md` returns all 5 active workflows

4. STATE.md deprecation check:
   - `grep "Read STATE.md" src/gsd_lite/template/workflows/*.md` returns 0 (only deprecation notices)

5. promotion.md check:
   - promotion.md is deprecated or removed
   - No active workflows reference promotion.md
</verification>

<success_criteria>
- All 5 workflow files updated with pair programming philosophy
- First-turn protocol added to prevent artifact writes before conversation
- Confirmation loops ([YOUR TURN]) in all workflows
- No STATE.md references remain (except deprecation notices)
- promotion.md deprecated in favor of housekeeping.md
- Frustration handling added to execution workflow
</success_criteria>

<output>
After completion, create `.planning/phases/01.7-refactor-artifacts-and-protocols-and-workflows-to-synergy-with-grep/01.7-02-SUMMARY.md`
</output>
