Skip to content

Adopt Coast Standards

This skill only says where the releases are and how to run the installer. Nothing else lives here: the rules, the checks and the hooks are copied into the project by the installer and belong to the project from then on, like any other dependency.

Releases: https://github.com/Up-Coast/coast-standards/releases Installer: enforcement/adopt.py inside any release.

Steps

  1. Get the newest release into the cache. One command; it reads the newest tag from the releases page, fetches that release, and leaves it at ~/.cache/coast-standards/<version>/:
v=$(curl -fsSL https://api.github.com/repos/Up-Coast/coast-standards/releases/latest | python3 -c 'import json,sys; print(json.load(sys.stdin)["tag_name"].lstrip("v"))') && mkdir -p ~/.cache/coast-standards && curl -fsSL "https://github.com/Up-Coast/coast-standards/archive/refs/tags/v$v.tar.gz" | tar xz -C ~/.cache/coast-standards && rm -rf ~/.cache/coast-standards/"$v" && mv ~/.cache/coast-standards/coast-standards-"$v" ~/.cache/coast-standards/"$v" && echo "Coast Standards $v is at ~/.cache/coast-standards/$v"

Use the printed version in the paths below. A copy that is already in the cache can fetch any other release itself: adopt.py <project> --release <version>.

  1. Dry run first, and show the user the list. Nothing is written:
python3 ~/.cache/coast-standards/$v/enforcement/adopt.py <project> --dry-run
  1. Ask the few real questions before writing, each as a recommended default the user can veto. Do not ask what the dry run already answered.
  2. The platform, only if the installer could not tell (--platform ios|macos|android|react-native|web|python).
  3. Where the theme file (colours, fonts, spacing) lives, if the dry run did not find one.
  4. The name to record on the starting lines (--by), if the git user name is not the right one.
  5. Any check the project cannot run on this machine yet (a build that needs secrets, for example). That becomes a dated skip in .coast/rules-exceptions.json, never a permanent switch.
  6. The owner's and the product's names (--owner, --product), which every refusal sentence and the CLAUDE.md block use; and whether any rule, push-gate seat or session hook should be OFF for this project. The installer asks those on/off questions itself at a terminal; from an agent session pass --yes (everything on) and put the user's answers into .coast/config.json afterwards — or run --init in a terminal the user drives.

  7. Install, then commit what it wrote and push. The first push runs every check.

python3 ~/.cache/coast-standards/$v/enforcement/adopt.py <project>
  1. Tell the user what changed in plain words: the files added, the rules-enforced number the installer printed, the starting lines and their 90-day date, and the version now recorded in .coast/standards-version.

Upgrading

Run the same installer with a newer release. It replaces its own files, keeps anything the project edited, and lowers a starting-line count that has fallen:

python3 ~/.cache/coast-standards/<any version>/enforcement/adopt.py <project> --release <new version>

Rules for the agent

  • Never edit .coast/ (the checks, the session hook, the config, the baselines), .githooks/, .claude/settings.json or the rules document by hand; they are the project's governed files. Change the checks by upgrading; the config and the exceptions are the user's to edit, so relay what they should write rather than writing it.
  • Never pass --no-verify. When a check stops you, read docs/when-a-check-stops-you.md in the release, or the refusal line itself: it names the rule and the door.