---
phase: 01.8-add-workflows-templated-artifacts
plan: 03
type: execute
wave: 3
depends_on: ["01.8-02"]
files_modified:
  - src/gsd_lite/template/PROTOCOL.md
autonomous: false

must_haves:
  truths:
    - "PROTOCOL.md routes agents to map-codebase workflow when appropriate"
    - "PROTOCOL.md routes agents to new-project workflow when appropriate"
    - "Agent can infer when to suggest each workflow from natural language"
    - "All new artifacts are coherent with existing GSD-lite structure"
  artifacts:
    - path: "src/gsd_lite/template/PROTOCOL.md"
      provides: "Updated router with utility workflow hints"
      contains: "map-codebase.md"
  key_links:
    - from: "PROTOCOL.md"
      to: "workflows/map-codebase.md"
      via: "Workflow router table"
      pattern: "map-codebase"
    - from: "PROTOCOL.md"
      to: "workflows/new-project.md"
      via: "Workflow router table"
      pattern: "new-project"
---

<objective>
Update PROTOCOL.md with router hints for map-codebase and new-project workflows, then verify full phase coherence.

Purpose: Complete the integration by teaching agents when to suggest these utility workflows, and ensure all new files work together with existing GSD-lite structure.

Output: Updated PROTOCOL.md with utility workflow routing + human verification of phase output.
</objective>

<context>
@.planning/phases/01.8-add-workflows-templated-artifact-for-codebase-mapper-and-new-project-inspired-from-gsd-upstream-workflows/01.8-CONTEXT.md
@.planning/phases/01.8-add-workflows-templated-artifact-for-codebase-mapper-and-new-project-inspired-from-gsd-upstream-workflows/01.8-01-SUMMARY.md
@.planning/phases/01.8-add-workflows-templated-artifact-for-codebase-mapper-and-new-project-inspired-from-gsd-upstream-workflows/01.8-02-SUMMARY.md

Current PROTOCOL.md to update:
@src/gsd_lite/template/PROTOCOL.md
</context>

<tasks>

<task type="auto">
  <name>Task 1: Update PROTOCOL.md with utility workflow routing</name>
  <files>src/gsd_lite/template/PROTOCOL.md</files>
  <action>
Update `src/gsd_lite/template/PROTOCOL.md` to add router hints for the new utility workflows.

**Add new section after "Secondary Routing" table:**

```markdown
### Utility Workflows (Standalone)

These workflows are standalone utilities, not part of the moodboard/whiteboard/execution core loop.

| Workflow | When to Suggest | Output |
|----------|-----------------|--------|
| map-codebase.md | ARCHITECTURE.md missing AND codebase exists | gsd-lite/ARCHITECTURE.md |
| new-project.md | PROJECT.md missing AND user states new vision | gsd-lite/PROJECT.md |

**Soft gates (suggest, don't block):**
- These workflows are helpful but not mandatory
- Agent suggests when conditions met, user decides
- Natural language triggers: "map the codebase", "start a new project", "what's in this repo"

**Invocation:**
- Explicit: "run map-codebase workflow"
- Natural: "help me understand this codebase" / "I want to start a new project"
```

**Update the File Guide table to include new output files:**

Add to the File Guide table:
```markdown
| ARCHITECTURE.md | Codebase structure | gsd-lite/ARCHITECTURE.md |
| PROJECT.md | Project vision | gsd-lite/PROJECT.md |
```

**Do NOT change:**
- Existing Primary Routing table
- Existing Secondary Routing table
- Safety Protocol section
- Any other existing content

**Placement:**
- Add "Utility Workflows" section after Secondary Routing section
- Update File Guide table with new files
  </action>
  <verify>`grep "map-codebase.md" src/gsd_lite/template/PROTOCOL.md` returns match in Utility Workflows section</verify>
  <done>PROTOCOL.md has Utility Workflows section with routing hints for map-codebase and new-project</done>
</task>

<task type="checkpoint:human-verify" gate="blocking">
  <what-built>Complete Phase 1.8 - Codebase mapper and new project workflows for GSD-lite</what-built>
  <how-to-verify>
Review the following files for quality and coherence:

1. **Templates (output artifacts):**
   - `cat src/gsd_lite/template/ARCHITECTURE.md`
   - `cat src/gsd_lite/template/PROJECT.md`
   - Check: Are they lightweight (~30-50 lines each)?
   - Check: Are they generalized (not Docker-specific)?
   - Check: Do they use consistent `## ` headers for grep?

2. **Workflows:**
   - `cat src/gsd_lite/template/workflows/map-codebase.md`
   - `cat src/gsd_lite/template/workflows/new-project.md`
   - Check: Do they follow GSD-lite patterns (coaching philosophy, sticky notes)?
   - Check: Are they single-agent (no spawning, no Task tool)?
   - Check: Do they reference the correct output templates?

3. **Router integration:**
   - `grep -A 10 "Utility Workflows" src/gsd_lite/template/PROTOCOL.md`
   - Check: Are both workflows listed?
   - Check: Are soft gates documented (suggest, don't block)?

4. **File inventory:**
   - `ls -la src/gsd_lite/template/` (should show ARCHITECTURE.md, PROJECT.md)
   - `ls -la src/gsd_lite/template/workflows/` (should show map-codebase.md, new-project.md)
  </how-to-verify>
  <resume-signal>Type "approved" if all checks pass, or describe issues to fix</resume-signal>
</task>

</tasks>

<verification>
Final phase verification after human approval:
1. All 4 new files exist:
   - `src/gsd_lite/template/ARCHITECTURE.md`
   - `src/gsd_lite/template/PROJECT.md`
   - `src/gsd_lite/template/workflows/map-codebase.md`
   - `src/gsd_lite/template/workflows/new-project.md`
2. PROTOCOL.md updated with Utility Workflows section
3. No OG GSD multi-agent patterns in any new file
4. All new files follow GSD-lite conventions (grep-friendly, coaching philosophy)
</verification>

<success_criteria>
- PROTOCOL.md has Utility Workflows section after Secondary Routing
- map-codebase and new-project workflows listed with soft gate conditions
- File Guide table updated with ARCHITECTURE.md and PROJECT.md entries
- Human verifies all phase outputs are correct and coherent
- Phase ready for roadmap update
</success_criteria>

<output>
After completion, create `.planning/phases/01.8-add-workflows-templated-artifact-for-codebase-mapper-and-new-project-inspired-from-gsd-upstream-workflows/01.8-03-SUMMARY.md`
</output>
