Skip to content

feat: add migrate command for agents.md standard#78

Open
blakemcanally wants to merge 1 commit intoblock:mainfrom
blakemcanally:feature/agents-md-migrate
Open

feat: add migrate command for agents.md standard#78
blakemcanally wants to merge 1 commit intoblock:mainfrom
blakemcanally:feature/agents-md-migrate

Conversation

@blakemcanally
Copy link
Copy Markdown

One-way migration from ai-rules/ layout to agents.md standard: root AGENTS.md, .agents/skills/, .agents/commands/.

New command: ai-rules migrate with --nested-depth, --dry-run, --force. Prompts for confirmation unless --force or --dry-run.

What it does: Builds root AGENTS.md (symlink or inlined content), moves ai-rules/skills and ai-rules/commands into .agents/, runs clean, purges ai-rules/, updates .gitignore.

See docs/migration.md for full guide.

Made with Cursor

- Add 'ai-rules migrate' subcommand with --nested-depth, --dry-run, --force
- Move ai-rules/skills and ai-rules/commands to .agents/, write root AGENTS.md
- Clean generated files, purge ai-rules/, update .gitignore
- One-way migration; prompts for confirmation unless --force or --dry-run
- Add CHANGELOG.md, docs/migration.md and README section

Co-authored-by: Cursor <cursoragent@cursor.com>
@blakemcanally blakemcanally force-pushed the feature/agents-md-migrate branch from 14efb7f to 7fbe882 Compare February 24, 2026 16:09
@blakemcanally blakemcanally marked this pull request as ready for review February 24, 2026 17:48
Comment thread src/operations/migrate.rs
}

/// Copies or moves ai-rules/mcp.json to project root .mcp.json if present.
fn copy_or_move_mcp_to_root(current_dir: &Path) -> Result<()> {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break some agents e.g gemini uses a different format. I think it's okay to just warn the user that this will happen and they have to handle it themself if they wanna migrate away

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I don't think we're entirely ready for this command to be widely adopted and used until every major tool is onboard with .agents/. However, when we do get there, I think its a good idea to have this in place to retire these shims gracefully.

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.

2 participants