Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/aRustyDev/agents --skill implement-from-ir명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | Implement from IR |
| version | 1.0.0 |
| description | Synthesize target language code from IR |
| category | conversion |
| languages | ["python","typescript","rust","java","go","scala","roc","kotlin","swift","elixir"] |
| tools | ["ir-synthesize-python","ir-synthesize-rust","ir-synthesize-typescript","ir-synthesize-go","ir-synthesize-scala","ir-synthesize-roc"] |
Generate idiomatic code in a target language from an Intermediate Representation (IR).
/codebase-implement-from-ir <ir-path> --target <language> [--style <mode>] [--gaps <handling>]
| Parameter | Description | Default |
|---|---|---|
ir-path | Path to IR file (JSON/YAML) | Required |
--target | Target language | Required |
--style | Generation style (minimal, idiomatic, verbose) | idiomatic |
--gaps | Gap handling (warn, error, annotate, ignore) | warn |
Validate the input IR:
Review detected gaps and apply mitigations:
| Gap Severity | Default Action |
|---|---|
| Critical | Halt, require human decision |
| High | Warn, suggest alternatives |
| Medium | Auto-convert with TODO comment |
| Low | Auto-convert silently |
| Info | Log for reference |
Map IR patterns to target idioms:
| Source | Python | Rust | TypeScript | Go | Scala |
|---|---|---|---|---|---|
int | int | i64 | number | int64 | Long |
str | str | String | string | string | String |
bool | bool | bool | boolean | bool | Boolean |
Option[T] | Optional[T] | Option<T> | T | undefined | *T | Option[T] |
Result[T,E] | Result[T,E] | Result<T,E> | Result<T,E> | (T, error) | Either[E,T] |
List[T] | list[T] | Vec<T> | T[] | []T | List[T] |
Dict[K,V] | dict[K,V] | HashMap<K,V> | Map<K,V> | map[K]V | Map[K,V] |
| Pattern | Source IR | Target Transformation |
|---|---|---|
| Pattern Match | MatchExpression | switch/if-else chain (if needed) |
| ADT | TypeDef.adt | sealed class/enum |
| Type Class | TypeClassDef | trait/interface + instances |
| Async | AsyncAnnotation | async/await, Future, goroutine |
| Error Handling | ResultType | Result, Either, (T, error) |
Generate syntactically correct code:
Apply target-language conventions:
Format code with target's standard tools:
black, ruffrustfmtprettiergofmtscalafmtoutput/
├── src/
│ ├── models.{ext} # Type definitions
│ ├── services.{ext} # Functions and methods
│ └── utils.{ext} # Helper functions
├── tests/
│ └── test_models.{ext} # Generated test stubs
├── Cargo.toml # (Rust) Package manifest
├── pyproject.toml # (Python) Package manifest
└── GAPS.md # Gap resolution notes
# Gap Resolution Report
## Critical Gaps (Require Human Decision)
### 1. Higher-Kinded Types (SC-001)
- **Source**: `Functor[F[_]]` in `types.scala`
- **Target**: TypeScript
- **Issue**: TypeScript cannot express HKT
- **Options**:
1. Monomorphize to specific types (List, Option, etc.)
2. Use type-level programming with conditional types
3. Simplify to concrete implementation
## High Severity Gaps (Auto-Converted with Warning)
### 1. Ownership Transfer (RS-001)
- **Source**: `fn take(self)` in `entity.rs`
- **Target**: Python
- **Resolution**: Converted to normal method, added runtime validation
Target these levels in order of priority:
Same observable behavior in all cases:
Follows target conventions even if slightly different:
Efficient for target platform:
/codebase-implement-from-ir analysis.ir.json --target rust
/codebase-implement-from-ir analysis.ir.json --target python --style verbose
/codebase-implement-from-ir analysis.ir.json --target go --gaps error