auto-build-loop

A driver for building an approved software specification in unattended phases, with tests, commits, reviews, and pauses for human approval.

In plain words
What is it for?
It is for starting fresh build sessions per phase, running tests, making isolated commits, submitting work for review, checking alignment with the original request, and optionally creating pushes or pull requests under selected autonomy settings.
Why use it?
It coordinates long builds and stops when a milestone, review, origin check, or other safety condition needs human attention.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/gosha70/code-copilot-team/auto-build-loop
Clone the repo
git clone --depth 1 https://github.com/gosha70/code-copilot-team

Made for: Cursor.

Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,623 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00043 $0.03623
Opus 5 $0.00022 $0.01811
Sonnet 5 $0.00009 $0.00725
Haiku 4.5 $0.00004 $0.00362

Measured yesterday against content hash e61843db4eb6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

auto-build-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

adapters/cursor/.cursor/rules/auto-build-loop.mdc · 240 lines

How it starts

The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Auto-Build Loop (Autonomous Build After Spec Approval)

Once a feature's SDD bundle is approved, scripts/auto-build-loop.sh runs the build loop unattended. The driver lives OUTSIDE any copilot session (the phase workflow mandates a fresh session per phase): it starts headless build sessions, runs tests, commits, submits each phase to cross-provider review, re-checks origin alignment, and pauses for humans only at milestones or breakers. Design: specs/auto-build-loop/design.md.

Autonomy Profiles (explicit opt-in — no silent gate bypass)

Gate (phase-workflow step) advisory pr merge
Manual testing (6) deferred to milestone checkpoint deferred to milestone deferred to milestone
Commit gate (8) auto-commit, local only, isolated branch auto-commit auto-commit
Wait-for-approval (9) auto-advance; hard pause at milestones same same
Origin gate exit >= 2 (10) always escalate to human always escalate always escalate
Peer review (11) driver-run, gating, driver verifies PASS same same + green CI
Push / PR / merge never / never / never auto / auto / never auto / auto / gated auto

All three attended profiles — advisory, pr, and merge — are implemented. The fourth profile, unattended (#191 policy core, #193 admission), must be declared in automation.json itself (schema_version: 2, explicit caps.*, validated by scripts/validate-automation-config.sh; never via --profile/CCT_AUTOBUILD_PROFILE override) and must pass admission control before anything runs: validate-spec.sh --unattended --feature-id <id> --config <effective-config> proves a finalized specs/<id>/verification.yaml (generated by scripts/generate-verification-draft.sh, author-finalized) covers every FR-N with executable verifiers, every statement_sha recomputes clean against spec.md, governance holds (approved plan, origin gate ≤1), and test.command passes on the base ref (run in a throwaway worktree of HEAD — uncommitted and gitignored files are absent there, so commit what the suite needs, add a bootstrap step, or opt out with CCT_ADMISSION_TEST_IN_PLACE=1). A refusal is an un-admitted exit-1 preflight error naming every failing check; an admitted run executes unattended. See "Terminal outcomes" below for how its breakers dispatch.

Read the full file on GitHub · 240 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 240 lines · 43 tokens per session scan A e61843db4eb6

Subscribe to this mod's changes

auto-build-loop is a cursor rule published in the GitHub repository gosha70/code-copilot-team (6 stars, last pushed 2d ago), licensed MIT. It adds 43 tokens to every session and 3,623 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.