---
name: update-feature-list-format
description: Update feature list from markdown to JSON format with verification steps
status: done
parts:
- CLAUDE.md
- src/servers/task.rs
- src/types/task.rs
estimate:
  optimistic: 2 hours
  normal: 3 hours
  pessimistic: 5 hours
---

# Implementation Plan

## Task Summary

| ID | Task | Files |
|----|------|-------|
| T1 | Update CLAUDE.md with new JSON format spec | `CLAUDE.md` |
| T2 | Update Feature struct and types | `src/types/task.rs` |
| T3 | Update save_features tool for JSON output | `src/servers/task.rs` |
| T4 | Update mark_feature_complete with step validation | `src/servers/task.rs` |
| T5 | Update related helpers and storage | `src/servers/task.rs`, `src/storage.rs` |

## Tasks

- [ ] **T1**: Update CLAUDE.md to document the new feature-list.json format with category, description, steps array, and passes boolean. Remove old markdown format documentation.

- [ ] **T2**: Update Feature struct in types/task.rs:
  - Add `category: String` field (free-form)
  - Add `steps: Vec<String>` field for verification steps
  - Rename `completed` to `passes: bool`
  - Remove `priority` field (order implies priority)
  - Keep `complexity` and `dependencies` as optional

- [ ] **T3**: Update `save_features` tool:
  - Change output from `feature-list.md` to `feature-list.json`
  - Remove `generate_feature_list_md` function
  - Add `generate_feature_list_json` function
  - Update FeatureInput struct to accept new fields

- [ ] **T4**: Update `mark_feature_complete` tool:
  - <promise>MUST validate that all steps are verified before setting passes=true</promise>
  - Add new parameter for step verification status
  - Update feature-list.json when marking complete

- [ ] **T5**: Update storage and helpers:
  - Add `feature_list_json_path()` method to StateManager
  - Update any references from .md to .json
  - Update list_project_tasks if it reads feature list

## New JSON Format

```json
[
  {
    "id": "F1",
    "category": "functional",
    "description": "Short description of the feature",
    "steps": [
      "Step 1 to verify",
      "Step 2 to verify",
      "Step 3 to verify"
    ],
    "passes": false,
    "complexity": "moderate",
    "dependencies": ["F2"]
  }
]
```

### Field Definitions

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| id | string | yes | Unique identifier (F1, F2, etc.) |
| category | string | yes | Free-form category (functional, ui, api, etc.) |
| description | string | yes | What this feature does |
| steps | string[] | yes | Verification steps to confirm feature works |
| passes | boolean | yes | Whether all steps have been verified |
| complexity | string | no | simple, moderate, complex |
| dependencies | string[] | no | IDs of features this depends on |

**Priority**: Determined by array order (first = highest priority)

## Testing Considerations

- Test save_features writes valid JSON
- Test mark_feature_complete validates steps before setting passes=true
- Test that passes cannot be set to true without step verification
- Verify JSON is properly formatted and readable

## Promises

- <promise>mark_feature_complete MUST validate that steps are verified before allowing passes=true</promise>

---

## Estimate

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

| Scenario | Time |
|----------|------|
| Optimistic | 2 hours |
| Normal | 3 hours |
| Pessimistic | 5 hours |

### Assumptions
- No backwards compatibility needed (fresh start)
- LLM provides steps explicitly when calling save_features
- Step validation mechanism needs to be designed (likely a new tool parameter or separate tool)
