---
name: write-the-plan
description: Document standard implementation plan format with task checkboxes and file tracking
status: done
parts:
- CLAUDE.md
---

# Feature: write-the-plan

## Description

When all questions have been answered and everything is clarified, write the implementation plan at the end of the markdown. The plan should use a standardized format with task checkboxes and a summary table.

---

## Q & A

### Q1: What sections should the 'plan' include? Looking at existing features, they have: (A) Complete Definition (synthesized requirements), (B) Implementation Plan (files to modify, steps), (C) Testing Considerations. Should all three be required, or just the Implementation Plan?
**Category:** clarification
**Answer:** Create the plan as checkboxes with short description and task identifier. Format: - [ ] [TASK-ID] Short description

### Q2: Should this be enforced in code (MCP server validates/requires these sections) or documented in CLAUDE.md as workflow instructions for the LLM to follow?
**Category:** integration
**Answer:** Keep it in the feature markdown file. The workflow instructions in CLAUDE.md guide the LLM behavior - if the template/structure is documented there, the LLM will follow it when writing plans.

### Q3: When exactly should the plan be written? Options: (A) Automatically after the last Q&A answer, (B) As a separate manual step before setting status to 'ready', (C) When status changes to 'ready'?
**Category:** clarification
**Answer:** When the feature is ready to be implemented and everything is clarified (after all Q&A is complete, before implementation begins).

### Q4: Should the Implementation Plan have a standard template/structure? For example: '### Files to Modify', '### Implementation Steps', '### Dependencies'?
**Category:** clarification
**Answer:** Use a good template structure and include a table of all tasks with ID, description, and file paths affected.

### Q5: Should the plan include file paths that will be created/modified? This could help with later automation (e.g., automatically populating the 'parts' field in frontmatter).
**Category:** missing_requirement
**Answer:** Yes, include file paths that will be created/modified in the plan.

### Q6: For features that don't require code changes (documentation-only), should a simplified plan format be used, or should they still follow the full template?
**Category:** edge_case
**Answer:** Yes, use a simplified plan format for documentation-only features.

---

## Complete Definition

### Overview

After all Q&A is complete and before implementation begins, the LLM must write a structured Implementation Plan. The plan uses:

1. **Task Table** - Summary of all tasks with IDs, descriptions, and affected files
2. **Task Checkboxes** - Detailed tasks that can be checked off during implementation
3. **Testing Considerations** - How to verify the implementation

### Plan Format

The Implementation Plan section follows this structure:

```markdown
---

## Implementation Plan

### Task Summary

| ID | Task | Files |
|----|------|-------|
| T1 | Short description | `path/to/file.rs` |
| T2 | Another task | `path/to/other.rs`, `path/to/another.rs` |

### Tasks

- [ ] **T1**: Detailed description of what needs to be done
- [ ] **T2**: Another detailed task description
- [ ] **T3**: Additional task if needed

### Testing Considerations

- How to test the implementation
- Edge cases to verify
```

### Timing

The plan is written:
1. After all Q&A questions are answered
2. Before setting status to `implementing`
3. As part of the `update_feature_document` step

### Documentation-Only Features

For features that only modify documentation (no code changes):

```markdown
---

## Implementation Plan

### Task Summary

| ID | Task | Files |
|----|------|-------|
| T1 | Update documentation | `CLAUDE.md` |

### Tasks

- [ ] **T1**: Update CLAUDE.md with new instructions
```

No Testing Considerations section is needed for doc-only features.

---

## Implementation Plan

### Task Summary

| ID | Task | Files |
|----|------|-------|
| T1 | Add Implementation Plan template to CLAUDE.md | `CLAUDE.md` |

### Tasks

- [ ] **T1**: Add a new section to CLAUDE.md documenting the Implementation Plan format, including the task table template, checkbox format, and guidance for documentation-only features

---

## Estimate

**Senior Developer Profile:** 5+ years experience, familiar with the project's tech stack.

| Scenario | Time |
|----------|------|
| Optimistic | 10 minutes |
| Normal | 20 minutes |
| Pessimistic | 30 minutes |

### Assumptions
- Only modifying CLAUDE.md documentation
- Clear understanding of existing workflow structure
- No code changes needed
