Makefile Targets
Makefile Targets
Section titled “Makefile Targets”The Makefile at the repository root provides shortcuts for common tasks. Run make help to see all targets with descriptions.
Targets
Section titled “Targets”Display all available targets with descriptions.
make helpList all target names (without descriptions), sorted alphabetically.
make lsRun the setup script to install standards in a project. This copies .cursorrules, agent configuration files, Cursor commands, and git hooks into the project root.
make setupEquivalent to running ./scripts/setup.sh.
sync-standards
Section titled “sync-standards”Pull the latest standards from the remote and update the configuration files for the agents declared in .standards.yml (CLAUDE.md, .cursorrules, AGENTS.md, .github/copilot-instructions.md, .gemini/, .aider-instructions.md). Agent-specific extras (Cursor commands, Gemini settings, Claude settings/skills) are installed only for declared agents. Git aliases are never changed unless you run the script directly with --aliases.
make sync-standardsEquivalent to running ./.standards/scripts/sync-standards.sh from the project root. Never run it as make -C .standards sync-standards — the scripts refuse to run when the project root resolves to .standards/.
diff-standards
Section titled “diff-standards”Show what sync-standards would change, as a unified diff per agent config, without modifying anything.
make diff-standardsEquivalent to running ./.standards/scripts/diff-standards.sh. Add --exit-code to the script invocation to exit 1 when any config would change — a drop-in CI gate.
check-standards
Section titled “check-standards”Check whether the local standards submodule is up to date with the remote. Exits with code 1 if updates are available, making it suitable for CI pipelines.
make check-standardsExample output when standards are current:
Standards are up to dateExample output when updates are available:
Standards are out of date. Run 'make sync-standards'update-standards
Section titled “update-standards”Pull the latest commit from the standards remote and re-sync the agent configs by running ./.standards/scripts/sync-standards.sh from the project root.
make update-standardssetup-agents
Section titled “setup-agents”Set up AI agent configuration files without running the full setup. Useful when you want to add agent configs to a project that already has .cursorrules.
make setup-agentsadd-copilot-instructions
Section titled “add-copilot-instructions”Create a pull request that adds .github/copilot-instructions.md to the repository. The script creates a feature branch, commits the file, pushes, and opens a PR via GitHub CLI.
make add-copilot-instructionsRequires GitHub CLI (gh) to be installed and authenticated.
doctor
Section titled “doctor”Run the standards health check (scripts/doctor.sh): configuration, members, agent configs, checksums, languages, submodule, git hooks, .gitignore entries and worktrees (count, idle age, size; warnings on nesting and strays). Exits 1 on any FAIL.
make doctorworktree-gc
Section titled “worktree-gc”Remove finished agent worktrees — merged, upstream gone, or idle for more than 14 days — delete their merged branches (gone and idle branches are kept, since their commits are not in the base), prune stale registrations and report what remains with its idle age and size (proc-04 § Worktree Hygiene). The main checkout, the worktree you run it from and a worktree that still encloses other worktrees are never touched.
make worktree-gcmake worktree-gc ARGS="--dry-run" # previewmake worktree-gc ARGS="--max-age 30 --keep-dirty"Equivalent to running ./scripts/worktree-gc.sh; in a consumer project, ./.standards/scripts/worktree-gc.sh.
Lint all Markdown files using markdownlint (if installed).
make lintformat
Section titled “format”Format all Markdown files using prettier (if installed).
make formattest-scripts
Section titled “test-scripts”Validate shell script syntax for setup.sh and sync-standards.sh using bash -n.
make test-scriptsgenerate-standards-lists
Section titled “generate-standards-lists”Regenerate the standards file lists and language-detection maps inside the repo’s agent configs (.cursorrules, .github/copilot-instructions.md, .gemini/GEMINI.md, AGENTS.md, CLAUDE.md, standards/README.md) from the standards/ tree. Only content between <!-- BEGIN GENERATED --> / <!-- END GENERATED --> sentinels is rewritten.
make generate-standards-listsRun it after adding, renaming, or removing a standards file (and after updating its row in standards/catalog.tsv).
check-agent-configs
Section titled “check-agent-configs”Verify the agent configs match the standards/ tree without writing anything. Fails when a generated region is stale, when any agent config references a standards file that does not exist, or when one omits a standards file that does. CI runs this on every pull request.
make check-agent-configsQuick Reference
Section titled “Quick Reference”| Target | Description |
|---|---|
help |
Show all targets with descriptions |
ls |
List target names |
setup |
First-time project setup |
sync-standards |
Pull latest and update declared agent configs |
diff-standards |
Preview what sync-standards would change (--exit-code to gate CI) |
check-standards |
Check if standards are current (CI-friendly) |
update-standards |
Pull latest submodule commit |
setup-agents |
Install agent configs only |
add-copilot-instructions |
PR to add Copilot instructions |
doctor |
Standards health check (config, agents, hooks, worktrees) |
worktree-gc |
Remove merged, gone and idle agent worktrees; report the rest |
lint |
Lint Markdown files |
format |
Format Markdown files |
test-scripts |
Validate script syntax |
generate-standards-lists |
Regenerate standards lists in agent configs |
check-agent-configs |
Fail on agent-config drift (CI gate) |