convert — AgentTeamsModule¶
Format migration utilities for converting existing agent teams between supported frameworks while preserving body prose.
Source:
agentteams/convert.py
Public Types¶
ConvertResult¶
Summary of a conversion run.
Fields:
converted: paths written (or that would be written in dry-run)skipped: paths skipped due to overwrite policy or classificationerrors: conversion errorsdry_run: whether writes were simulated
Property:
success:Truewhenerrorsis empty
Public Function¶
convert_team(source_dir, target_dir, target_framework, *, project_manifest=None, dry_run=False, overwrite=False)¶
Convert an existing team into a target framework format.
Args:
source_dir(Path): source agent directory.target_dir(Path): destination agent directory.target_framework(str): one ofcopilot-vscode,copilot-cli,claude.project_manifest(dict | None): optional context for adapter rendering.dry_run(bool): simulate write operations.overwrite(bool): overwrite existing files when true.
Returns:
ConvertResult
Raises:
ValueErrorfor unknown framework ids.FileNotFoundErrorwhen source directory does not exist.
Notes¶
- Preserves body prose while rewriting framework wrappers/front matter.
- Converts instructions file naming between
copilot-instructions.mdandCLAUDE.md. - Copies passthrough assets such as
SETUP-REQUIRED.mdandreferences/.