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:
- Detect which AI agents your project already uses and assemble their configs (
CLAUDE.md,.cursorrules,AGENTS.md, …) - Write
.standards.ymland.standards-checksums - Set up a post-merge git hook that checks for standards updates
- Gitignore the agent worktree root (
worktree_dir:in.standards.yml, default.claude/worktrees) and install a pre-commit guard that refuses commits adding worktree paths - Configure git aliases for common workflows
To install for a specific agent only, pass --agents. An explicit list installs only that agent’s artifacts: no git hooks, git aliases, Cursor commands, .claude/settings.json or .gemini/ unless the owning agent is listed. Standards-owned files are still written in every mode: .standards.yml, .standards-checksums, the .gitignore entries, .trufflehog-ignore, and any tool configs for detected languages (for example .eslintrc, .ruff.toml).
.standards/scripts/setup.sh --agents codex # AGENTS.md + standards-owned files.standards/scripts/setup.sh --agents claude-code,cursor # two agents.standards/scripts/setup.sh --help # all flagsUnknown flags are rejected with exit code 2 before anything is written. See the scripts reference for every flag.
Optional: containerized agent-dev environment
Section titled “Optional: containerized agent-dev environment”The starter kit for arch-09 (a disposable Docker dev container with a deny-by-default egress proxy, where AI agents run with broad permissions) is opt-in, like --workflow:
.standards/scripts/setup.sh --containerized # add --dry-run to previewThis installs Dockerfile.dev, Dockerfile.prod, Dockerfile.egress, docker-compose.dev.yml, scripts/init-workspace.sh, scripts/setup-proxy.sh, the bootstrap-*.sh IDE scripts, proxy/ and .devcontainer/devcontainer.json, with the .example suffix stripped and the scripts made executable; when Cursor is among the configured agents it also installs .cursor/rules/containerized-dev.mdc. .env and .env.secret are added to .gitignore (the P0 guard from arch-09 §5; init-workspace.sh refuses to write secrets until they are). Existing files are never overwritten: one that differs from the kit is kept and the kit’s version is staged to .standards-pending/<path> with a note in MERGE_PLAN.md. Without the flag, setup only prints how to install the kit.
Then, on the host: adapt Dockerfile.dev and proxy/project-whitelist.txt, run ./scripts/init-workspace.sh and ./scripts/setup-proxy.sh, bring the stack up with docker compose -f docker-compose.dev.yml up -d --build, and run the Definition of Done checks in the kit README — the observed deny-path failure on your host is the only evidence of compliance. The Containerized Dev Validation guide walks through every check with the output to expect and records the run that pinned the kit’s versions.
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.
If the project already manages its hooks (lefthook, husky, or its own make hooks), declare hooks: lefthook, hooks: husky or hooks: custom in .standards.yml: setup then leaves the native hook alone and doctor.sh’s Git Hooks check is satisfied by the declared manager (see Curated Agent Configs).
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 script (run from the project root)./.standards/scripts/sync-standards.sh# or, if your Makefile has the targetmake sync-standards
# Preview first, and fail CI when configs have drifted./.standards/scripts/diff-standards.sh --exit-codeDo not copy .standards/.cursorrules over your own .cursorrules and do not run the scripts from inside .standards/ (make -C .standards ...): that file is the standards repo’s own config, and the scripts refuse to run when the project root resolves to .standards/.
Submodule 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"