Skip to main content

Translate canonical coding-agent definitions into platform-native agent artifacts.

Project description

agent-def-translator

Maintain coding-agent role definitions once, then generate platform-native agent files for Claude Code, OpenAI Codex, and GitHub Copilot.

Status

This project is currently alpha software. The core translation model is usable, but the canonical definition shape and target-specific output formats may change before a stable release.

This project intentionally does not run agents, manage sessions, resume tasks, or provide an orchestration runtime. It only translates definition files into deterministic platform artifacts.

Install

uv sync

Agent Spec

Write canonical role definitions as TOML:

name = "repo-explorer"
description = "Read repository context and summarize relevant files."
instructions = """
Inspect the repository rules, locate the relevant files, and report concise
findings with file paths. Do not edit files.
"""

[targets.claude]
tools = ["Read", "Grep", "Glob"]
permission_mode = "plan"
model = "haiku"

[targets.codex]
model = "gpt-5.4-mini"
sandbox_mode = "read-only"

[targets.copilot]
tools = ["search", "fetch"]
target = "vscode"

Target-specific prompt overrides are supported:

[targets.claude]
prompt_append_file = "prompts/repo-explorer.claude.md"

Skill Examples

This repository does not vendor real workflow skills from any private or project-specific skill set. Skill examples are intentionally limited to tiny fixtures such as examples/skills/hello/SKILL.md, so the public package stays focused on definition translation rather than distributing an opinionated skill library.

CLI

Validate definitions:

uv run agent-def-translator validate --definitions-dir examples/agents

Validate only one platform projection:

uv run agent-def-translator validate --definitions-dir examples/agents --target codex

Generate all supported targets:

uv run agent-def-translator translate \
  --definitions-dir examples/agents \
  --output-dir generated

Check generated files without updating them:

uv run agent-def-translator diff \
  --definitions-dir examples/agents \
  --output-dir generated

Optional E2E smoke is available, but it is not part of the default check/test workflow:

uv run poe e2e

To also inspect installed external CLI help surfaces when available:

uv run poe e2e-live

Python API

from pathlib import Path

from agent_def_translator import Target, generate

generated = generate(
    definitions_dir=Path("examples/agents"),
    output_dir=Path("generated"),
    targets=(Target.CLAUDE, Target.CODEX, Target.COPILOT),
)

Design

  • name, description, and instructions are canonical.
  • Platform differences stay in [targets.<target>].
  • Generated files are disposable and should not become the source of truth.
  • Output is deterministic so drift can be detected in CI.
  • Validation renders each selected target, so missing prompt append files and unsupported target-specific metadata types fail before generation.
  • Concrete workflow skills are out of scope; examples use only minimal demonstration skills.

License

MIT License. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_def_translator-0.1.0.tar.gz (58.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_def_translator-0.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file agent_def_translator-0.1.0.tar.gz.

File metadata

  • Download URL: agent_def_translator-0.1.0.tar.gz
  • Upload date:
  • Size: 58.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agent_def_translator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 db6ba71e851e732395be329f9d5206359712a34171d7c8197e7129ea5cd9d591
MD5 9272d98e4508008b3e757056c329c723
BLAKE2b-256 7564890fccf659fa6669ff20093ccef7245c2e9cdce12d14ab6e1dbb1e5120f9

See more details on using hashes here.

File details

Details for the file agent_def_translator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_def_translator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78cfa32935d5c8053c6f7528adef97122986c5a1d66d29707925ed76f68084de
MD5 035fcbdcfed9d1214cce5682a0705ee9
BLAKE2b-256 657194c31d4eee28a0ac74a068c3ed5f8d9cbc460e30d6492ab6bdff8a5fd45f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page