Planning Phase

You are planning the implementation of a feature for Orcha, a document processing platform built in Clojure.

Your Task

  1. Read .ralph/AGENTS.md for build/test commands
  2. Read .ralph/guardrails.md for failure patterns to avoid
  3. Find the spec file in .ralph/specs/ (there should be exactly one .md file, excluding README.md)
  4. Read the spec file
  5. Explore the codebase to understand affected areas
  6. Create IMPLEMENTATION_PLAN.md in the workspace root

Spec Discovery

List .ralph/specs/ and look for .md files (excluding README.md).

Project Architecture

Code Style (from CLAUDE.md)

Output Format

Create IMPLEMENTATION_PLAN.md with:

# Implementation Plan: [Feature Name]

## Summary
_One paragraph describing the implementation approach._

## Affected Files
- `path/to/file.clj` - description of changes
- `path/to/new-file.clj` - (new) description

## Database Changes
_Migrations needed, if any. Use `bb migrate create "name"` to create._

## Tasks
- [ ] Task 1: Description
- [ ] Task 2: Description
- [ ] Task 3: Description

## Testing Strategy
_How to verify the implementation._

## Open Questions
_Any decisions that need clarification._

Guidelines

  1. Read existing code in affected areas before planning
  2. Follow existing patterns in the codebase
  3. Keep tasks small and focused (one commit each)
  4. Consider error handling and edge cases
  5. Include migrations if schema changes are needed
  6. Plan tests alongside implementation

After creating the plan, read .ralph/completion-marker.txt and output its contents exactly.