Migration guide
Step-by-step guide for migrating from existing agent configurations to AlignTrue.
Overview
AlignTrue can import rules from multiple agents automatically. This guide covers:
- Cursor (
.cursor/*.mdcfiles) - AGENTS.md (universal format)
- Aider (
.aider.conf.yml) - VS Code MCP (
.vscode/mcp.json) - Other agent formats
Quick migration
1. Initialize with import
# AlignTrue detects existing configs and offers import
npx aligntrue init
# Or explicitly import from specific agent
aligntrue init --import cursor2. Review imported rules
# Check what was imported in the internal IR
cat .aligntrue/.rules.yaml
# Validate all rules
aligntrue check3. Sync to all agents
aligntrue syncDone! Your rules are now managed by AlignTrue and synced to all agents. Edit AGENTS.md or any agent file to make changes.
Agent-specific migration
Migrating from Cursor
Before AlignTrue:
.cursor/
rules/
global.mdc
project.mdc
testing.mdcMigration steps:
- Initialize with import:
aligntrue init --import cursor- Review imported rules:
cat .aligntrue/.rules.yamlAlignTrue imports all .mdc files, merges them into the IR, and creates AGENTS.md as the user-editable interface.
- Sync back to Cursor:
aligntrue syncAfter AlignTrue:
.aligntrue/
.rules.yaml # Internal IR (auto-generated)
config.yaml # Configuration
AGENTS.md # User-editable (primary editing interface)
.cursor/
rules/
aligntrue.mdc # Generated by AlignTrueBenefits:
- Edit rules in AGENTS.md or agent-native formats
- Sync same rules to other agents
- Version control with git
- Team collaboration with lockfiles
- Two-way sync keeps everything aligned
Migrating from GitHub Copilot / Claude Code
Before AlignTrue:
AGENTS.md # Universal formatMigration steps:
- Initialize with import:
aligntrue init --import agents-md- Review imported rules:
cat .aligntrue/.rules.yaml- Sync to all agents:
aligntrue syncAfter AlignTrue:
.aligntrue/
.rules.yaml # Internal IR (auto-generated)
config.yaml # Configuration
AGENTS.md # Primary user-editable file
.cursor/
rules/
aligntrue.mdc # Also generated if Cursor detectedBenefits:
- Keep AGENTS.md format
- Add support for Cursor and other agents
- Two-way sync (edit either file)
Migrating from Aider
Before AlignTrue:
.aider.conf.ymlMigration steps:
- Initialize with import:
aligntrue init --import aider- Review imported rules:
cat .aligntrue/.rules.yaml- Sync to all agents:
aligntrue syncAfter AlignTrue:
.aligntrue/
.rules.yaml # Internal IR (auto-generated)
config.yaml
AGENTS.md # Primary editing file (Aider reads this)
.aider.conf.yml # Generated by AlignTrueNote: Edit AGENTS.md, AlignTrue syncs to all agent formats.
Migrating from VS Code MCP
Before AlignTrue:
.vscode/
mcp.jsonMigration steps:
- Initialize with import:
aligntrue init --import vscode-mcp- Review imported rules:
cat .aligntrue/.rules.yaml- Sync to all agents:
aligntrue syncAfter AlignTrue:
.aligntrue/
.rules.yaml # Internal IR (auto-generated)
config.yaml
AGENTS.md # Primary editing file
.vscode/
mcp.json # Generated by AlignTrueMigrating from multiple agents
Before AlignTrue:
.cursor/rules/*.mdc
AGENTS.md
.aider.conf.ymlMigration steps:
- Initialize (detects all):
aligntrue initYou’ll be prompted:
✓ Detected existing configs:
- Cursor (.cursor/rules/*.mdc)
- AGENTS.md
- Aider (.aider.conf.yml)
? Import rules from these sources? (Y/n)- AlignTrue merges all sources:
- Deduplicates identical rules
- Preserves agent-specific settings in
vendor.*namespace - Creates unified
AGENTS.mdand.aligntrue/.rules.yaml
- Review merged rules:
cat AGENTS.md- Sync to all agents:
aligntrue syncAfter AlignTrue:
.aligntrue/
.rules.yaml # Internal IR (auto-generated)
config.yaml
AGENTS.md # Merged from all sources (edit this)
.cursor/rules/aligntrue.mdc
.aider.conf.yml # Generated by AlignTrueImport command reference
Basic import
# Import from detected agent
aligntrue import cursor
# Creates AGENTS.md immediately
aligntrue import cursor --write
# Preview without writing
aligntrue import cursor --dry-runCoverage analysis
# Show what will be imported
aligntrue import cursor --coverageOutput:
Coverage Analysis
─────────────────
Source: .cursor/rules/global.mdc
✓ 5 rules imported
✓ 2 agent-specific settings preserved
Source: .cursor/rules/project.mdc
✓ 3 rules imported
⚠ 1 rule skipped (duplicate)
Total: 8 rules imported, 1 skippedSupported agents
aligntrue import --listOutput:
Supported import sources:
- cursor .cursor/rules/*.mdc
- agents-md AGENTS.md
- aider .aider.conf.yml
- vscode-mcp .vscode/mcp.json
- windsurf .windsurf/mcp_config.jsonHandling conflicts
Duplicate rules
If multiple sources have the same rule, AlignTrue:
- Imports the first occurrence
- Skips duplicates
- Reports in coverage analysis
Example:
⚠ Rule "use-typescript" found in:
- .cursor/rules/global.mdc (imported)
- AGENTS.md (skipped, duplicate)Agent-specific settings
Agent-specific settings are preserved in vendor.* namespace:
rules:
- id: use-typescript
content: "Always use TypeScript"
vendor:
cursor:
priority: highThese settings are excluded from hashing but preserved on sync.
Conflicting rule content
If the same rule ID has different content:
⚠ Conflict detected:
Rule: use-typescript
Source 1: .cursor/rules/global.mdc
"Always use TypeScript with strict mode"
Source 2: AGENTS.md
"Prefer TypeScript"
? Which version to keep?
> Source 1 (.cursor/rules/global.mdc)
Source 2 (AGENTS.md)
Merge manuallyPost-migration checklist
1. Validate rules
aligntrue check2. Test sync
aligntrue sync --dry-run3. Verify agent files
Check that generated files look correct:
cat .cursor/rules/aligntrue.mdc
cat AGENTS.md4. Test in your IDE
- Restart your IDE (Cursor, VS Code, etc.)
- Verify rules are loaded
- Test AI agent behavior
5. Commit to git
git add .aligntrue/
git commit -m "feat: Migrate to AlignTrue"6. Clean up old files (optional)
If you’re confident everything works:
# Remove old Cursor rules (AlignTrue generates new ones)
rm -rf .cursor/rules/*.mdc
# Keep .cursor/rules/aligntrue.mdc
# Remove old Aider config (if using AGENTS.md)
rm .aider.conf.ymlImportant: Don’t delete files until you’ve verified AlignTrue works!
Rollback
If you need to rollback:
1. Restore from git
git restore .cursor/ AGENTS.md .aider.conf.yml2. Remove AlignTrue
rm -rf .aligntrue/3. Uninstall CLI (optional)
npm uninstall -g @aligntrue/cliCommon migration scenarios
Scenario 1: Solo developer with Cursor
Goal: Keep using Cursor, add support for other agents
Steps:
aligntrue init --import cursoraligntrue sync- Keep editing
AGENTS.mdor.cursor/*.mdc(two-way sync)
Scenario 2: Team with AGENTS.md
Goal: Add team mode with lockfiles
Steps:
aligntrue init --import agents-mdaligntrue team enable- Commit
.aligntrue.lock.jsonto git - Team members run
aligntrue sync
Scenario 3: Multiple agents, consolidate
Goal: Merge rules from Cursor, Aider, and AGENTS.md
Steps:
aligntrue init(detects all)- Review merged rules in
AGENTS.md aligntrue sync- Remove old config files after verification
Scenario 4: Fresh start, keep old rules as reference
Goal: Start fresh but reference old rules
Steps:
- Backup old configs:
cp -r .cursor .cursor.bak aligntrue init(don’t import)- Manually copy rules you want from
.cursor.bak aligntrue sync
Troubleshooting migration
Import fails with “No rules found”
Cause: Agent config files are empty or invalid
Fix:
- Check files exist:
ls .cursor/rules/ - Check files have content:
cat .cursor/rules/*.mdc - Validate format (must be valid MDC/YAML)
Imported rules don’t sync to agent
Cause: Exporter not enabled
Fix:
# Check enabled exporters
cat .aligntrue/config.yaml | grep exporters -A 5
# Enable if missing
aligntrue sync --target cursorRules work in Cursor but not Copilot
Cause: Different format requirements
Fix:
- Check AGENTS.md was generated:
cat AGENTS.md - Verify format is correct
- Restart IDE
Lockfile immediately shows drift
Cause: Volatile fields included in hash
Fix:
# .aligntrue/config.yaml
vendor:
_meta:
volatile: ["cursor.timestamp", "cursor.session"]Next steps
After migration:
- Workflows guide - Choose your workflow
- Team mode - Enable team features
- Git workflows - Share rules via git
See also
- Import workflow reference - Detailed import documentation
- Sync behavior - How sync works
- Troubleshooting - Common issues