# Transformation Responsibilities

This skill uses human-in-the-loop validation at each stage, ensuring transformations align with developer intent before proceeding.

## Stage Ownership

| Stage | Agent | Developer | Notes |
|-------|-------|-----------|-------|
| 0. Understand inputs | Reviews | **Leads** | Developer defines transformation rules and provides examples |
| 1. Gather inputs | **Leads** | Validates | Agent reads files and validates access; developer confirms correct files identified |
| 2. Process & transform | **Leads** | Reviews | Agent applies transformations; developer reviews output before final report |
| 3. Final report | **Leads** | Approves | Agent generates report; developer approves completion status |

## Agent Responsibilities

- Read and validate file access (stop if files missing/unreadable)
- Parse files to identify sections matching transformation rules
- Apply transformations consistently to all sections
- Handle errors gracefully (continue on single-file failure, log errors)
- Generate structured report of results
- **Stop after each stage** — never proceed without developer approval

## Developer Responsibilities

- Define specific transformation rules in Stage 0 (not vague patterns)
- Provide input/output examples for clarity
- Validate file gathering results before transformations begin
- Review output and approve before final report
- Make judgment calls on what constitutes "success" or "partial success"
- Provide context the agent lacks (project intent, acceptable error thresholds)

## Why This Split?

**Agent strengths:**
- Consistent application of defined transformation rules
- Efficient file processing and error recovery
- Accurate execution of mechanical tasks

**Agent limitations:**
- Cannot infer transformation intent from vague descriptions
- Cannot judge if transformed output aligns with project goals
- Needs explicit error recovery strategy (e.g., continue vs. stop on failure)

**Human-in-the-loop ensures transformations serve their intended purpose** rather than mechanically changing content.
