Installation
Installation
Section titled “Installation”This guide covers every installation method, team onboarding, and ongoing maintenance.
Installation Methods
Section titled “Installation Methods”Option 1: Git Submodule (Recommended for Teams)
Section titled “Option 1: Git Submodule (Recommended for Teams)”Best when multiple projects share the same standards.
Add the submodule
Section titled “Add the submodule”git submodule add https://github.com/c65llc/coding-standards.git .standardsgit submodule update --init --recursiveRun setup
Section titled “Run setup”.standards/scripts/setup.shThe setup script will:
- Copy
.cursorrulesto your project root - Install configuration files for all supported AI agents
- Set up a post-merge git hook that checks for standards updates
- Configure git aliases for common workflows
Commit the changes
Section titled “Commit the changes”git add .cursorrules .gitmodules .github/ .aiderrc .codexrc .gemini/git commit -m "chore: add project standards submodule"Option 2: Direct Clone (Single Project)
Section titled “Option 2: Direct Clone (Single Project)”Best for individual projects or full local control.
git clone https://github.com/c65llc/coding-standards.git .standards.standards/scripts/setup.shOption 3: Symlink (Local Development)
Section titled “Option 3: Symlink (Local Development)”Best when you maintain a single copy of standards on your machine.
ln -s /path/to/standards/.cursorrules .cursorrulesOnboarding New Team Members
Section titled “Onboarding New Team Members”When someone clones a project that uses submodule-based standards:
# Clone with submodules includedgit clone --recurse-submodules <project-url>
# Or initialize after cloninggit clone <project-url>git submodule update --init --recursive
# Run setup.standards/scripts/setup.shRestart the editor after setup to load the new configuration.
Updating Standards
Section titled “Updating Standards”Manual Sync
Section titled “Manual Sync”make sync-standards# or.standards/scripts/sync-standards.shThis pulls the latest standards, updates all AI agent configuration files, and notifies you to restart your editor.
Automatic Detection via Git Hooks
Section titled “Automatic Detection via Git Hooks”The setup script installs a post-merge hook. After every git pull or git merge, the hook checks whether the standards submodule has newer commits on the remote and prints a reminder if so.
CI/CD Validation
Section titled “CI/CD Validation”Add a check to your pipeline so pull requests fail when standards are out of date:
name: Check Standards
on: [push, pull_request]
jobs: check-standards: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: true
- name: Check standards are up to date run: make check-standardsScheduled Updates
Section titled “Scheduled Updates”Optionally auto-update on a schedule:
name: Update Standards
on: schedule: - cron: '0 0 * * 1' # Weekly on Monday workflow_dispatch:
jobs: update: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: true
- name: Update standards submodule run: | cd .standards git pull origin main cd .. git add .standards git commit -m "chore: update standards submodule" || exit 0 git pushVersioning Standards
Section titled “Versioning Standards”Tag releases so projects can pin to a known-good version:
# In the standards repogit tag -a v1.0.0 -m "Initial standards release"git push origin v1.0.0Pin a project to a specific version:
cd .standardsgit checkout v1.0.0cd ..git add .standardsgit commit -m "chore: pin standards to v1.0.0"Troubleshooting
Section titled “Troubleshooting”Editor Not Loading Rules
Section titled “Editor Not Loading Rules”- Confirm the config file (
.cursorrules,.github/copilot-instructions.md, etc.) exists in the project root. - Restart the editor completely (quit and reopen).
- Check file permissions:
chmod 644 .cursorrules.
Standards Out of Sync
Section titled “Standards Out of Sync”# Use the sync scriptmake sync-standards
# Or update the submodule manuallycd .standards && git pull origin main && cd ..cp .standards/.cursorrules .cursorrulesSubmodule Shows Modified or Detached HEAD
Section titled “Submodule Shows Modified or Detached HEAD”git submodule status
# Fix detached HEADcd .standardsgit checkout maincd ..
# Update submodule referencegit add .standardsgit commit -m "chore: update standards submodule"