Summary
Integrate entrenar's CITL (Compiler-in-the-Loop Training) oracle into decy for cost-free steady-state transpilation. Query accumulated fix patterns from .apr files before falling back to LLM.
Motivation
- 74% of C→Rust errors are ownership/lifetime-related (E0506, E0499, E0382, E0597, E0515)
- Cross-project pattern transfer: Ownership fixes from depyler are directly applicable
- Cost model: LLM-only = $182K/year vs Oracle @ 80% hit = $36K/year ($146K savings)
Implementation Phases
| Week |
Deliverable |
| 0 |
Create paiml/reprorusted-c-cli bootstrap corpus |
| 1 |
decy-oracle crate skeleton, OracleConfig |
| 2 |
Oracle struct, suggest_fix(), pattern loading |
| 3 |
CLI --oracle flag, auto-retry loop |
| 4 |
Cross-project transfer from depyler |
| 5 |
First bootstrap session on reprorusted-c-cli |
| 6 |
Metrics, observability, integration tests |
CLI Interface
# Basic oracle usage
decy transpile malloc_wrapper.c --oracle
# Auto-fix with high threshold
decy transpile src/cat.c --oracle --auto-fix --oracle-threshold 0.85
# Import patterns from depyler
decy transpile project/ --oracle --import-depyler ~/.depyler/decision_patterns.apr
Success Metrics
| Week |
Oracle Hit Rate |
LLM Cost Reduction |
| 4 |
35% |
35% |
| 12 |
75% |
75% |
| 20 |
85%+ |
85%+ |
Dependencies
entrenar with citl feature
paiml/reprorusted-c-cli (new repo - coreutils subset)
- depyler patterns for cross-project seeding
Specification
Full spec: docs/specifications/oracle-integration-spec.md
- 10 peer-reviewed citations
- C-specific decision categories
- Integration with decy-ownership
- Bootstrap corpus structure
References
Summary
Integrate entrenar's CITL (Compiler-in-the-Loop Training) oracle into decy for cost-free steady-state transpilation. Query accumulated fix patterns from
.aprfiles before falling back to LLM.Motivation
Implementation Phases
paiml/reprorusted-c-clibootstrap corpusdecy-oraclecrate skeleton, OracleConfigsuggest_fix(), pattern loading--oracleflag, auto-retry loopCLI Interface
Success Metrics
Dependencies
entrenarwithcitlfeaturepaiml/reprorusted-c-cli(new repo - coreutils subset)Specification
Full spec:
docs/specifications/oracle-integration-spec.mdReferences