Skip to content

Makefile Targets

The Makefile at the repository root provides shortcuts for common tasks. Run make help to see all targets with descriptions.

Display all available targets with descriptions.

Terminal window
make help

List all target names (without descriptions), sorted alphabetically.

Terminal window
make ls

Run the setup script to install standards in a project. This copies .cursorrules, agent configuration files, Cursor commands, and git hooks into the project root.

Terminal window
make setup

Equivalent to running ./scripts/setup.sh.

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.

Terminal window
make sync-standards

Equivalent 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/.

Show what sync-standards would change, as a unified diff per agent config, without modifying anything.

Terminal window
make diff-standards

Equivalent 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 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.

Terminal window
make check-standards

Example output when standards are current:

Standards are up to date

Example output when updates are available:

Standards are out of date. Run 'make sync-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.

Terminal window
make update-standards

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.

Terminal window
make setup-agents

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.

Terminal window
make add-copilot-instructions

Requires GitHub CLI (gh) to be installed and authenticated.

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.

Terminal window
make doctor

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.

Terminal window
make worktree-gc
make worktree-gc ARGS="--dry-run" # preview
make 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).

Terminal window
make lint

Format all Markdown files using prettier (if installed).

Terminal window
make format

Validate shell script syntax for setup.sh and sync-standards.sh using bash -n.

Terminal window
make test-scripts

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.

Terminal window
make generate-standards-lists

Run it after adding, renaming, or removing a standards file (and after updating its row in standards/catalog.tsv).

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.

Terminal window
make check-agent-configs
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)