Joining an Existing Team
This guide walks you through joining a project that already uses AlignTrue in team mode.
Prerequisites
- AlignTrue CLI installed (
npm install -g @aligntrue/cli) - Access to the team’s repository
- Git configured with your credentials
Step 1: Clone the Repository
git clone git@github.com:yourteam/project.git
cd projectStep 2: Initialize AlignTrue
Run the init command:
aligntrue initAlignTrue will detect the existing team configuration and show you a summary:
✓ Detected team mode configuration
Team Configuration:
Mode: team
Approval: pr_approval (relaxed)
Team sections: Security, Compliance, Architecture
Your Options:
1. Use team rules only (no personal rules)
2. Add personal rules (local only)
3. Add personal rules (with remote backup)Option 1: Team Rules Only
Select this if you don’t need any personal rules:
aligntrue init --team-onlyThis is the simplest setup. All rules come from the team repository.
Option 2: Personal Rules (Local)
Select this if you want personal rules but don’t need version control:
aligntrue init --with-personal-localYour personal rules will be stored in .aligntrue/.local/personal/ and git-ignored.
Option 3: Personal Rules (Remote)
Select this if you want personal rules with version control and backup:
aligntrue init --with-personal-remoteYou’ll be prompted to set up a remote repository. See Personal Repository Setup for details.
Step 3: Initial Sync
After initialization, sync the rules to your agent files:
aligntrue syncThis will:
- Load team rules from the repository
- Load your personal rules (if configured)
- Merge them together
- Export to agent files (
.cursor/rules/*.mdc,AGENTS.md, etc.)
Step 4: Verify Setup
Check that rules were exported correctly:
# List generated files
ls -la .cursor/rules/
cat AGENTS.md
# Check configuration
aligntrue configUnderstanding Team Mode
Team Rules
Team rules are:
- Stored in
.aligntrue/.rules.yamlin the main repository - Committed to version control
- Visible to all team members
- Require approval to change (depending on mode)
Personal Rules
Personal rules are:
- Stored locally or in a private remote
- Not visible to other team members
- Can be changed without approval
- Merged with team rules during sync
Agent Files
Agent files (.cursor/rules/*.mdc, AGENTS.md) are:
- Generated from team + personal rules
- Git-ignored by default (recommended)
- Regenerated on each sync
- Safe to edit locally (changes sync back to IR)
Making Changes
Editing Team Rules
To propose changes to team rules:
- Edit
AGENTS.mdor agent files directly - Run
aligntrue sync - Commit the changes to
.aligntrue/.rules.yaml - Push and create a PR
- Team lead reviews and approves
- After merge, everyone runs
aligntrue syncto get updates
Editing Personal Rules
To change your personal rules:
- Edit
AGENTS.mdor agent files (personal sections) - Run
aligntrue sync - Changes stay local or sync to your personal remote
- No approval needed
Approval Modes
Your team may use different approval modes:
Relaxed (pr_approval)
- Changes go through normal PR process
- No special AlignTrue approval needed
- CI validates lockfile integrity
- Most common for internal teams
Strict (allowlist)
- Changes must be explicitly approved
aligntrue drift --gatesfails in CI if unapproved- Team lead runs
aligntrue team approve --current - More common for external dependencies
Check your team’s mode:
aligntrue config get approval.internalCommon Workflows
Daily Sync
Pull latest team rules:
git pull
aligntrue syncPropose Rule Change
-
Create a branch:
git checkout -b add-security-rule -
Edit rules:
# Edit AGENTS.md or agent files aligntrue sync -
Commit and push:
git add .aligntrue/.rules.yaml git commit -m "feat: Add security scanning rule" git push origin add-security-rule -
Create PR and wait for approval
Update Personal Rules
- Edit your personal sections in
AGENTS.md - Run
aligntrue sync - Changes stay local (no PR needed)
Resolve Drift
If CI reports drift:
# Check what changed
aligntrue drift
# If you made the change, ask team lead to approve:
# (Team lead runs) aligntrue team approve --current
# Or revert your changes:
git checkout .aligntrue/.rules.yaml
aligntrue syncTroubleshooting
Sync Fails with “Lockfile Mismatch”
Cause: Your rules don’t match the approved lockfile.
Fix:
# Pull latest changes
git pull
# Sync again
aligntrue sync
# If still failing, check for local modifications
git statusPersonal Rules Not Showing
Cause: Personal rules might not be configured correctly.
Fix:
# Check configuration
aligntrue config get storage.personal
# Reconfigure if needed
aligntrue init --with-personal-localAgent Files Not Generated
Cause: Exporters might not be enabled.
Fix:
# Check enabled exporters
aligntrue adapters list
# Enable missing exporters
aligntrue adapters enable cursor
aligntrue adapters enable agents-md
# Sync again
aligntrue syncRemote Personal Repo Fails
Cause: SSH access or repository not configured.
Fix:
See Personal Repository Setup for detailed troubleshooting.
Best Practices
DO
- ✅ Run
aligntrue syncafter pulling changes - ✅ Keep agent files git-ignored (recommended)
- ✅ Use personal rules for machine-specific preferences
- ✅ Create PRs for team rule changes
- ✅ Review lockfile changes in PRs
DON’T
- ❌ Commit agent files to the repository
- ❌ Edit
.aligntrue/.rules.yamldirectly - ❌ Put personal rules in the main repository
- ❌ Skip sync after pulling changes
- ❌ Force push lockfile changes
Getting Help
If you’re stuck:
- Check the Troubleshooting Guide
- Ask your team lead about team-specific configuration
- Run
aligntrue checkto validate your setup - Check logs:
aligntrue sync --verbose