Actionable steps for branch protection, PR review, CI enforcement, and autopilot governance. All instructions reference the GitHub web UI.
Repository: https://github.com/Clawland-AI/Geneclaw
Default branch: master
- Open https://github.com/Clawland-AI/Geneclaw
- Click Settings (top tab, requires admin access)
- Left sidebar → Branches
- Under "Branch protection rules", click Add rule
| Field | Value |
|---|---|
| Branch name pattern | master |
| Require a pull request before merging | ✅ Checked |
| Required approvals | 1 (minimum; increase for team) |
| Dismiss stale pull request approvals when new commits are pushed | ✅ Recommended |
| Require status checks to pass before merging | ✅ Checked |
| Require branches to be up to date before merging | ✅ Recommended |
| Status checks that are required | test (see Section 2) |
| Require conversation resolution before merging | ✅ Recommended |
| Do not allow bypassing the above settings | ✅ Checked (even admins must follow) |
| Restrict who can push to matching branches | Optional — leave unchecked for now |
| Allow force pushes | ❌ Unchecked (never) |
| Allow deletions | ❌ Unchecked (never) |
- Click Create (or Save changes)
Recommended: Squash and merge as default.
- Settings → General (left sidebar)
- Scroll to "Pull Requests"
- Uncheck "Allow merge commits"
- ✅ Check "Allow squash merging" → Default message: "Pull request title and description"
- Uncheck "Allow rebase merging" (optional, for cleaner history)
- Click Save
The CI pipeline is defined in .github/workflows/ci.yml:
name: CI
on: [push, pull_request]
jobs:
test: # ← This is the job name for status checks
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- pip install -e ".[dev]"
- ruff check . # advisory, continue-on-error: true
- pytest -q # must passWhen configuring the branch protection rule (Section 1.2):
- Check Require status checks to pass before merging
- In the search box, type
test - Select the test job (it will appear after the first CI run completes)
- Optionally also add
test (3.11),test (3.12),test (3.13)for matrix granularity
Note: Status checks only appear in the search after the workflow has run at least once. If
testdoesn't appear, push a commit or open a PR to trigger CI first, then come back to configure the rule.
| Step | Command | Blocking? |
|---|---|---|
| Lint | ruff check . |
No (advisory, continue-on-error: true) |
| Test | pytest -q |
Yes — must pass on all Python versions |
Every PR must use the template at .github/pull_request_template.md.
Reviewers should verify:
| Field | What to check |
|---|---|
| Summary | Clear description of what changed and why |
| Risk Level | low / medium / high — must match the actual change scope |
| Evo-Event-ID | Present if the PR was generated by geneclaw evolve |
| Tests Run | Specific pytest commands that were executed |
| Rollback Plan | Concrete steps to undo the change |
- All CI checks pass (green)
- Risk Level matches actual change scope
- If
Evo-Event-IDpresent: verify the proposal JSON in~/.nanobot/workspace/geneclaw/proposals/ - Files touched are within the allowlist (
geneclaw/,docs/,tests/,nanobot/) - No secrets, API keys, or credentials in the diff
- No
eval(),exec(),os.system(),subprocess.call()without justification - Tests cover the changed code paths
- Rollback plan is actionable
- Low risk, all checks green, 1+ approval → Squash and merge
- Medium risk → Require 2 approvals or admin sign-off
- High risk → Require team discussion + explicit approval from repo admin
The recommended workflow for autopilot-generated changes:
nanobot geneclaw autopilot --dry-run --max-cycles 3
↓
Review proposals in ~/.nanobot/workspace/geneclaw/proposals/
↓
If acceptable: create a branch, apply manually, open PR
↓
PR goes through normal review (Section 3)
↓
Squash and merge after approval
Prerequisites (all must be met):
- ≥20 prior autopilot proposals have been human-reviewed and merged
- Success rate ≥ 80% (
nanobot geneclaw report) -
auto_approve_riskset tolowonly (nevermediumorhigh) -
allowlist_pathsrestricted to["geneclaw/", "docs/"](Phase 1) -
max_patch_lines≤ 100 -
tools.restrictToWorkspace=true - CI is enforced via branch protection (Section 1–2)
Auto-apply workflow:
nanobot geneclaw autopilot --apply --auto-approve low --max-cycles 1
↓
Autopilot creates evo/<timestamp>-<slug> branch
↓
Autopilot runs pytest; if fail → auto-rollback
↓
If pass → open PR from evo/ branch (manual or scripted)
↓
PR still requires human review + CI check (branch protection enforces this)
Immediately revert to dry-run mode if:
- Any apply fails (
nanobot geneclaw reportshowsapply_failed > 0) - Success rate drops below 70%
- A proposal touches files outside the allowlist
- A security concern is raised during review
- The
nanobot geneclaw doctorshows new warnings or errors
Regular health checks (recommend weekly):
nanobot geneclaw doctor
nanobot geneclaw report --since 168 # last 7 days
nanobot geneclaw report --format json --since 168 > weekly-report.json- Never commit API keys or secrets to the repository
geneclaw.redact_enabledmust remaintruein production- All event logs and proposals are redacted before writing to disk
- The
.envfile is in.gitignoreand on the denylist - Review
docs/specs/GEP-v0.mdSection 10 for the full allowlist strategy