Repository Hygiene exit conditions
Candidate exit conditions for the Repository Hygiene type. See the catalog overview for how to adopt these.
Working tree and merge state
| Exit condition | What it checks |
|---|---|
|
The working tree has no uncommitted modifications, staged changes, or deletions. |
|
No untracked files remain outside those matched by |
|
No unresolved Git merge-conflict markers appear in any tracked file. |
|
The repository has no leftover stash entries associated with the change. |
|
No in-progress merge, rebase, cherry-pick, or bisect state is present in |
|
Every submodule points at a committed, pushed commit matching the recorded gitlink. |
|
HEAD points at a named branch rather than a detached commit. |
|
The staging index is identical to HEAD with no partially staged hunks. |
|
The branch contains no zero-diff empty commits. |
Rebase and branch integration
| Exit condition | What it checks |
|---|---|
|
The branch is rebased onto the current tip of its base branch with no divergence. |
|
The branch history contains no merge commits from the base branch. |
|
Commit history is strictly linear with a single parent per commit. |
|
No commits remain that were already merged to the base under a different hash. |
|
The branch can be fast-forwarded onto the base without conflicts. |
|
The branch contains no commit that adds code later removed within the same branch. |
|
The local branch is neither ahead of nor behind its tracked remote branch unexpectedly. |
|
The base branch was not merged back into the feature branch to resolve drift. |
Commit quality and conventions
| Exit condition | What it checks |
|---|---|
|
Every commit subject conforms to the Conventional Commits type/scope grammar. |
|
Each commit represents one coherent, independently revertible logical change. |
|
Commit subject lines stay within the configured maximum character length. |
|
Commit subjects use imperative mood rather than past or gerund forms. |
|
Commit message bodies are wrapped at the configured column width. |
|
Each commit or the branch references a tracking issue or ticket identifier. |
|
No commit subjects contain |
|
No commits retain default auto-generated messages like |
|
Every commit carries a |
|
Co-authorship is recorded via |
Commit signing and provenance
| Exit condition | What it checks |
|---|---|
|
Every commit carries a valid GPG, SSH, or S/MIME signature. |
|
Each commit signature verifies against a trusted, non-revoked key. |
|
Any release tags on the branch are annotated and cryptographically signed. |
|
Commit author emails match the organization’s allowed domain policy. |
|
No commit is attributed to an author outside the recognized contributor set. |
|
Author and committer identities are consistent and non-spoofed across the branch. |
|
No commit reuses another contributor’s identity without a signing key match. |
|
Signing keys used were valid and unexpired at each commit’s timestamp. |
Branch policy and naming
| Exit condition | What it checks |
|---|---|
|
The branch name matches the configured prefix and slug naming convention. |
|
The branch age is within the trunk-based short-lived branch threshold. |
|
The target base branch has required protection rules enabled. |
|
No commits were pushed directly to a protected branch bypassing review. |
|
All required status checks are configured and passing on the branch. |
|
No merged or abandoned branches for this work linger on the remote. |
|
The branch scopes to one feature or fix rather than bundling unrelated work. |
|
The branch targets the canonical trunk rather than an intermediate long-lived branch. |
|
No force-push rewrote history on a shared or protected branch. |
Committed artifacts and file hygiene
| Exit condition | What it checks |
|---|---|
|
No committed file exceeds the configured maximum binary size threshold. |
|
Build outputs, compiled artifacts, and generated code are not tracked. |
|
|
|
No file already ignored by |
|
No |
|
No editor or IDE workspace files are tracked outside a sanctioned shared config. |
|
Large binary assets are tracked via Git LFS rather than inline blobs. |
|
No dependency directories such as |
|
Tracked text files use consistent line endings per |
|
No |
Secret and sensitive data hygiene
| Exit condition | What it checks |
|---|---|
|
No credentials, tokens, or private keys appear in the current tree. |
|
No secret is recoverable from any commit in the branch history. |
|
No populated |
|
No PEM, PKCS, or SSH private key material is committed. |
|
No hardcoded passwords or connection strings appear in source files. |
|
No cloud provider access keys or service-account JSON files are present. |
|
The configured secret-scanning tool reports zero findings on the diff. |
|
No internal hostnames or private endpoints are exposed in tracked config. |
Dead code and project structure
| Exit condition | What it checks |
|---|---|
|
No unreferenced modules, functions, or files remain after the change. |
|
Static analysis reports no unreachable or unused code paths. |
|
No large blocks of commented-out source code are shipped. |
|
No |
|
New files follow the project’s established directory and package layout. |
|
No byte-identical or near-duplicate files are introduced. |
|
File and directory names follow the project’s casing and naming rules. |
|
No empty or placeholder-only directories are added. |
|
No test files reference deleted or renamed source modules. |
|
New source files carry the required license or copyright header. |
|
Tracked files conform to the repository’s |
|
All changed files pass the project’s configured formatter with no diff. |
Dependency and manifest hygiene
| Exit condition | What it checks |
|---|---|
|
A dependency lockfile exists and is committed alongside the manifest. |
|
The lockfile is consistent with the declared dependency manifest. |
|
A clean install from the lockfile reproduces the exact dependency tree. |
|
No declared dependency is unused by any source file. |
|
Every imported package is declared in the dependency manifest. |
|
No code relies on transitive dependencies not directly declared. |
|
Dependency versions are pinned per the project’s version-range policy. |
|
No dependency appears at conflicting duplicate versions in the tree. |
|
Dependency manifest entries follow the required sorted, canonical order. |
|
No manifest entries point at local filesystem paths or unpublished sources. |
Pull request and review governance
| Exit condition | What it checks |
|---|---|
|
The change stays within the configured maximum lines-changed per pull request. |
|
The number of files touched stays within the configured review threshold. |
|
A |
|
Required code owners have approved the changes to their paths. |
|
The pull request includes a non-empty description linking scope and rationale. |
|
The pull request references the tracking issue it resolves. |
|
The change carries the minimum required number of approving reviews. |
|
No open, unresolved review comment threads remain on the change. |
|
The pull request addresses a single concern rather than bundling unrelated changes. |