Skip to content

Move agent roles into repo for multi-platform portability - #1498

Merged
bokelley merged 2 commits into
mainfrom
bokelley/migrate-agent-config
Mar 16, 2026
Merged

bokelley merged 2 commits into
mainfrom
bokelley/migrate-agent-config

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

  • Moves 18 agent role definitions from ~/.claude/agents/ into .agents/roles/*.md as vendor-neutral markdown (stripped model/color frontmatter)
  • Adds scripts/import-claude-agents.mjs to generate Codex configs from the canonical role files
  • Slims CLAUDE.md from 376 lines to a thin pointer to .agents/playbook.md
  • Adds AGENTS.md as a matching pointer for non-Claude agents
  • Gitignores .codex/ (generated output)

Why

Agent role definitions were living in ~/.claude/agents/ — tied to one machine, one tool. Moving them into the repo means they travel with the code and can serve any agent platform (Claude Code reads directly, Codex gets generated TOML, future platforms get their own thin adapter).

Test plan

  • node scripts/import-claude-agents.mjs generates valid TOML (validated with @taplo/cli check)
  • All 18 role files have valid frontmatter (name + description)
  • Import script validates agent names against [a-z0-9_-]+ (prevents TOML injection, path traversal)
  • tomlMultiline correctly escapes backslashes (was producing invalid TOML for docs-expert)
  • Pre-commit tests pass
  • Pre-push Mintlify broken-links check passes
  • No secrets or credentials in any role file

🤖 Generated with Claude Code

bokelley and others added 2 commits March 16, 2026 11:20
Agent roles now live in .agents/roles/*.md as vendor-neutral markdown
with name/description frontmatter. Claude Code reads them directly;
Codex configs are generated via scripts/import-claude-agents.mjs.

CLAUDE.md and AGENTS.md are now thin pointers to .agents/playbook.md.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Mintlify's broken-links check can't resolve paths to dotfile directories
(.agents/). Use plain text paths instead of markdown links.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@bokelley
bokelley merged commit 49007b0 into main Mar 16, 2026
9 checks passed
@bokelley
bokelley deleted the bokelley/migrate-agent-config branch March 16, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant