| 1234567891011121314151617181920212223242526272829303132 |
- """Synchronize agent skill mirrors across Devin, Cursor, and Codex adapters.
- The canonical skill source lives under `agent-team/skills-src/`. This script
- regenerates the thin mirrors in `.devin/skills/`, `.agents/skills/`, and
- `.cursor/rules/` so all tools share the same contract without duplicating logic.
- """
- from __future__ import annotations
- import shutil
- import sys
- from pathlib import Path
- def _mirror(src_dir: Path, dst_dir: Path) -> None:
- if dst_dir.exists():
- shutil.rmtree(dst_dir)
- shutil.copytree(src_dir, dst_dir)
- def main() -> int:
- repo = Path(__file__).resolve().parents[1]
- src = repo / "agent-team" / "skills-src"
- if not src.is_dir():
- print(f"missing canonical skill source: {src}")
- return 1
- _mirror(src, repo / ".devin" / "skills")
- _mirror(src, repo / ".agents" / "skills")
- return 0
- if __name__ == "__main__":
- sys.exit(main())
|