Section 01 · Infrastructure & Setup
Git Repo Setup & Security
Repository configuration, branch strategy, CI/CD, and cleanliness standards
This guide walks you through auditing a repository's Git setup, branch strategy, CI/CD configuration, and overall cleanliness.
The Goal: Clone-to-Running in Minutes
A new developer should be able to clone, install, and run the project without asking anyone for help. The repository should be self-documenting, secure by default, and impossible to accidentally break.
- Runnable — clone to working app with zero manual intervention
- Protected — branch rules enforce code review and prevent direct pushes
- Tested — CI validates every PR with linting and tests
- Secure — no secrets exposed in code or git history
- Clean — proper .gitignore patterns, no stale files or cruft
Before You Start
- Read the project config from
projects/<project-name>.yamlto get therepofield (e.g.,acme-corp/acme-api) - Clone the repo yourself — do NOT ask the user for evidence you can gather automatically:
If SSH fails, fall back to HTTPS:git clone [email protected]:<owner>/<repo>.git /tmp/audit-<project>-$(date +%s)git clone https://github.com/<owner>/<repo>.git /tmp/audit-<project>-$(date +%s) - Use the cloned directory as your working directory for all checks in this section
- Verify you have access to GitHub API (via
ghCLI) for branch protection checks - Clean up the clone when the section is complete
clone-and-run
Repository can be cloned, built, and run without external system setup
“Can a new hire be running locally in under 10 minutes?”
Sandbox/development environment variables provided in .env.example or .env
“Missing one key — does everything break with no explanation?”
Missing keys produce clear warnings with helpful error messages
“What does the app say when a required env var is missing?”
branch-strategy
Only main/staging as long-lived branches, no dev/develop branch
“How many long-lived branches exist, and why?”
All development work happens in feature branches via PRs
“When was the last direct commit to main?”
Merged feature branches are promptly deleted
“How many merged branches are still sitting around?”
Branches with no push for 30-45 days are reviewed and cleaned up
“Any branches untouched for 45+ days nobody's talking about?”
ci-cd
Linting tools configured locally and in CI, runs on PRs
“Does a sloppy PR actually get blocked, or just warned?”
Test framework configured locally and in CI, runs on PRs
“Can broken code merge if all tests are skipped?”
documentation
Repository has a README with accurate setup instructions
“Is the README still accurate, or is it lying to new devs?”
CLAUDE.md or AGENTS.md provides context for AI agents
“Would an AI agent know what NOT to touch in this repo?”
repo-cleanliness
No backup files, dated reports, or outdated planning documents
“Any files in here nobody's opened in 6 months?”
Test output, coverage reports not committed
“Are coverage reports cluttering your git history?”
No production secrets in repository or git history
“Searched git history for secrets lately — really searched?”
Sandbox keys have rotation schedule and last rotation date in comments
“When were the sandbox keys last rotated — do you know?”
IDE configs and personal settings not committed
“Is someone's .vscode/ or .idea/ folder in this repo?”
.gitignore covers all standard patterns for the project type
“How confident are you nothing sensitive slips through?”