Umbrella: #255
Spec: docs/specifications/depyler-repair-mode.md (branch `feat/repair-mode-spec`)
Depends on: DEPYLER-3003 (Phase 2)
Blocks: DEPYLER-3005 (Phase 4)
Scope
Add the two pieces that elevate Phase 2's "ask Claude to fix Rust" into a structured pipeline:
- Markdown skills under `crates/depyler-repair/skills/` — one file per recurring failure idiom. The agent loads relevant skills based on the failing diagnostic class.
- Oracle integration — the agent's exit condition becomes `cargo build && cargo test --oracle`, where the oracle is the original Python run on a captured input fixture. Repair output must match Python semantically, not just compile.
Skills (v1 starter set)
- `skills/lifetimes.md` — common borrow/lifetime resolution patterns
- `skills/stdlib_import_resolution.md` — when consult_stdlib_map returns nothing
- `skills/generators.md` — Python generators → Rust iterators
- `skills/context_managers.md` — `with` blocks → RAII / scope guards
- `skills/decorators.md` — common decorator translations
The skill format follows alchemize's: short, prescriptive, with idiomatic Rust examples.
Deliverables
Contracts enforced
- C-REPAIR-ORACLE (`contracts/repair-oracle-v1.yaml`) — exit requires both passes; oracle inputs captured before generation
- C-SKILL-GRADUATION (`contracts/skill-graduation-v1.yaml`) — skill invocations are logged
Exit criterion
- Tier 2 (typed-cli) corpus hits ≥85% single-shot-or-repaired (currently 62.5%)
- ≥3 skills graduated to `depyler-core` static rules (i.e., Phase 4's pipeline produces something)
- Every repaired file in the corpus has a recorded oracle pass in telemetry
Umbrella: #255
Spec: docs/specifications/depyler-repair-mode.md (branch `feat/repair-mode-spec`)
Depends on: DEPYLER-3003 (Phase 2)
Blocks: DEPYLER-3005 (Phase 4)
Scope
Add the two pieces that elevate Phase 2's "ask Claude to fix Rust" into a structured pipeline:
Skills (v1 starter set)
The skill format follows alchemize's: short, prescriptive, with idiomatic Rust examples.
Deliverables
Contracts enforced
Exit criterion