Skip to content

feat: semport skill -- semantically-aware cross-tool and cross-language code porting #59

@AlexMikhalev

Description

@AlexMikhalev

Summary

Add a semport skill to terraphim-skills that teaches agents how to perform semantically-aware code ports -- preserving intent and architecture rather than mechanical line-by-line translation.

Based on StrongDM's Factory technique: https://factory.strongdm.ai/techniques/semport

Three Port Models

Model Use Case
Cross-tool Port SKILL.md + agent prompts from Claude Code to OpenCode, Codex, Gemini CLI, Copilot, Kiro
Cross-language Evaluate upstream commits and translate with semantic adaptation (Python -> Rust)
Adaptive Reshape external API surface into internal conventions while maintaining semantic equivalence

Skill Structure

skills/semport/
  SKILL.md                        -- technique, workflows, constraint rules
  references/
    tool-format-map.md            -- Claude Code format -> each target tool format
    validation.md                 -- port correctness validation strategies
    examples.md                   -- concrete before/after per port type

Integration Points

  • terraphim-hooks KG: source->target term mappings for format conversion tokens
  • terraphim-agent replace: mechanical token replacement layer beneath semantic translation
  • Judge system: validate port quality via behavioral test comparison
  • Compound engineering P5: this skill IS the implementation of cross-tool conversion

Implementation Plan

See: plans/semport-terraphim-skill.md in cto-executive-system

Steps:

  1. Create SKILL.md with three-model workflow and constraint hierarchy (~1h)
  2. Create tool-format-map.md reference mapping Claude Code -> 6 targets (~1h)
  3. Create validation.md with per-port-type validation strategies (~30m)
  4. Create examples.md with concrete before/after ports (~30m)
  5. Wire into compound-engineering adoption plan P5 (~15m)

Estimated effort: ~3.5h

Acceptance Criteria

  • SKILL.md covers all three port models with decision tree
  • tool-format-map.md maps Claude Code skill format to all 6 target tools
  • At least one concrete example per port model in examples.md
  • Validation strategy defined for each port type
  • Cross-referenced with compound-engineering adoption plan P5

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions