# Execution Plan: [FEATURE/TASK NAME]
<!-- Purpose: Break a large task into concrete, ordered steps that an AI agent
     (or human) can follow. This is a living document -- update it as work
     proceeds. Check it into the repo so progress is visible in version control.

     Inspired by OpenAI's approach: agents work better with explicit progress
     logs, decision logs, and step-by-step plans checked into the repository.

     Usage:
       1. Create this file at the start of a multi-step task
       2. Agent checks off steps as it completes them
       3. Agent logs decisions and blockers in the logs below
       4. Reviewers can see progress at a glance
-->

## Metadata

| Field          | Value                                      |
|----------------|--------------------------------------------|
| Author         | [NAME or "AI Agent"]                       |
| Created        | [YYYY-MM-DD]                               |
| Target Date    | [YYYY-MM-DD or "N/A"]                      |
| Status         | [Not Started / In Progress / Blocked / Complete] |
| Design Doc     | [LINK or "N/A"]                            |
| Tracking Issue | [LINK or "N/A"]                            |

## Objective

[ONE_PARAGRAPH describing what this execution plan achieves and the definition
of done -- e.g., "Implement the new invoice PDF generation engine as described
in docs/design/invoice-engine-v2.md. Done when all existing invoice tests pass
with the new engine and performance benchmarks show P99 < 1s."]

## Prerequisites

- [ ] [PREREQ_1 -- e.g., "Design doc approved: docs/design/invoice-engine-v2.md"]
- [ ] [PREREQ_2 -- e.g., "Feature flag `new-invoice-engine` created in LaunchDarkly"]
- [ ] [PREREQ_3 -- e.g., "Database migration for new `invoice_templates` table applied"]

## Steps

<!-- Break the work into small, concrete steps. Each step should be completable
     in a single session. Mark each with a checkbox. -->

### Phase 1: [PHASE_NAME -- e.g., "Foundation"]

- [ ] **Step 1.1**: [DESCRIPTION -- e.g., "Create `src/lib/invoice-engine/` module with index.ts barrel export"]
  - Files: `[FILE_PATHS]`
  - Verify: `[VERIFICATION_COMMAND -- e.g., "pnpm tsc --noEmit"]`

- [ ] **Step 1.2**: [DESCRIPTION -- e.g., "Define InvoiceTemplate type and InvoiceEngine interface"]
  - Files: `[FILE_PATHS]`
  - Verify: `[VERIFICATION_COMMAND]`

- [ ] **Step 1.3**: [DESCRIPTION]
  - Files: `[FILE_PATHS]`
  - Verify: `[VERIFICATION_COMMAND]`

### Phase 2: [PHASE_NAME -- e.g., "Core Implementation"]

- [ ] **Step 2.1**: [DESCRIPTION]
  - Files: `[FILE_PATHS]`
  - Verify: `[VERIFICATION_COMMAND]`

- [ ] **Step 2.2**: [DESCRIPTION]
  - Files: `[FILE_PATHS]`
  - Verify: `[VERIFICATION_COMMAND]`

- [ ] **Step 2.3**: [DESCRIPTION]
  - Files: `[FILE_PATHS]`
  - Verify: `[VERIFICATION_COMMAND]`

### Phase 3: [PHASE_NAME -- e.g., "Testing & Integration"]

- [ ] **Step 3.1**: [DESCRIPTION]
  - Files: `[FILE_PATHS]`
  - Verify: `[VERIFICATION_COMMAND]`

- [ ] **Step 3.2**: [DESCRIPTION]
  - Files: `[FILE_PATHS]`
  - Verify: `[VERIFICATION_COMMAND]`

### Phase 4: [PHASE_NAME -- e.g., "Cleanup & Rollout"]

- [ ] **Step 4.1**: [DESCRIPTION]
  - Files: `[FILE_PATHS]`
  - Verify: `[VERIFICATION_COMMAND]`

## Decision Log

<!-- Record decisions made during execution. This is invaluable for
     understanding WHY the code looks the way it does. -->

| Date       | Decision                                  | Rationale                             |
|------------|-------------------------------------------|---------------------------------------|
| [DATE]     | [DECISION -- e.g., "Used puppeteer over wkhtmltopdf"] | [WHY -- e.g., "Better CSS grid support, actively maintained"] |
| [DATE]     | [DECISION]                                | [WHY]                                 |

## Progress Log

<!-- Append entries as work proceeds. Timestamp each entry. -->

### [YYYY-MM-DD HH:MM]
[WHAT_WAS_DONE -- e.g., "Completed steps 1.1-1.3. Foundation module created with
types and interface. All type checks pass."]

### [YYYY-MM-DD HH:MM]
[WHAT_WAS_DONE]

## Blockers

<!-- Record anything blocking progress. Remove or mark resolved when cleared. -->

| Blocker                        | Status    | Resolution                            |
|--------------------------------|-----------|---------------------------------------|
| [BLOCKER -- e.g., "Need an Azure subscription with billing enabled for the sandbox resource group"] | [Open/Resolved] | [RESOLUTION]                |

## Notes

<!-- Any additional context, links, or observations. -->

- [NOTE]
- [NOTE]
