---
name: repo-hygiene
description: The standard for keeping a project's GitHub repository created, current, organized, and useful at all times. Apply on every session and after every change — creating the repo if it does not exist yet, and never letting it drift stale.
---
# Repository Hygiene Standard

The project does not live only on disk — it lives on GitHub. The harness treats a current,
well-organized GitHub repository as a **standing invariant**, not a one-time chore. This standard
defines what "the repo is in good shape" means; the `gardener` agent enforces it and
`harness/repo.sh` makes the mechanical parts deterministic.

## 1. It must exist on GitHub

- Every project has a GitHub `origin` remote. If `harness/repo.sh status` reports no remote, run
  `harness/repo.sh ensure` to create it (private by default; set `RIG_REMOTE_VISIBILITY=public` to
  publish). Never leave real work only on local disk.

## 2. It must be current — never stale

- After any meaningful change, commit with a clear, imperative message and push. The Stop gate will
  refuse to finish while the working tree is dirty or the branch is unpushed (`RIG_REQUIRE_SYNCED`).
- Keep these in step with the code, every time they're affected:
  - `README.md` — quickstart, structure, and counts match reality.
  - `CHANGELOG.md` — an `Unreleased` entry for every user-visible change.
  - `.claude/` agent/command/skill counts and any docs that cite them.
- Stale documentation is a defect. If a doc claims something the code no longer does, fix the doc in
  the same change.

## 3. It must be organized

- Logical layout, no orphaned or dead files, no committed build artifacts or secrets (`.gitignore`
  covers them). A clear `README`, `LICENSE`, `CONTRIBUTING`, `SECURITY`, and issue/PR templates.
- Work flows through branches and pull requests, not direct commits to `master`, whenever review
  adds value. CI must be green before merge.

## 4. It must be useful

- The README answers "what is this, why, and how do I start" in the first screen.
- Issues and PRs are triaged, not left to rot. Close what's done; label what's open.
- Releases/tags mark meaningful milestones.

## How to apply

- **Start of session:** read the injected repo status. If there's no remote, create it. If it's
  dirty or behind, plan to bring it current.
- **After each task:** commit + push; update README/CHANGELOG if the change is user-visible.
- **Before finishing:** the repo must be clean and pushed, CI green, docs in step. Run `/repo` to
  verify and to see open PRs/issues.

Do not weaken this to "good enough later." A repository that drifts stale is the slow failure mode
this standard exists to prevent.
