agentCanvas.aiAbout

Headless Claude Automation Template

A reusable template for autonomous software delivery using headless Claude agents. Feed a requirements doc in, review pull requests out. Two human touchpoints.

The Problem

Using Claude Code as a pair programmer is productive, but the orchestration overhead adds up fast. You write a requirements doc, then spend hours babysitting the implementation: breaking stories, creating issues, reviewing diffs, context-switching between "what should we build" and "let me check what the agent just did." The productivity gains get eaten by the management tax.

This template removes the management layer. Claude runs headless in GitHub Actions runners - no IDE, no chat window. Just a process that starts, reads an issue, implements a feature, opens a PR, and shuts down. The agent is gone, but the PR is there with a full conversation log of every decision it made.

How It Works

You write a requirements doc | v /pipeline command (Claude Code CLI) - Clones a starter codebase (optional) - Reads the requirements doc - Breaks it into stories in Linear - Syncs to GitHub Issues - Applies the "agent:ready" label | v Dev Agent (GitHub Actions) - Reads the issue, reads CLAUDE.md - Implements the feature, writes tests - Updates issue checkboxes in real time - Opens a PR with "Closes #N" | v Review Agent (auto-triggered) - Reviews the diff for security, architecture, test coverage - Posts structured review comments | v Fix Agent (if issues found) - Reads review feedback, pushes fixes - Up to 5 iterations, then escalates | v You review the PR and merge

What's in the Box

.github/workflows/ claude-dev.yml Dev agent: issue -> implementation -> PR claude-review.yml Review agent: auto-reviews every PR claude-fix.yml Fix agent: reads feedback, pushes fixes (5 cap) linear-sync.yml Bidirectional Linear <> GitHub sync .claude/ settings.json Safety hooks + permission rules hooks/block-destructive.sh commands/pipeline.md /pipeline: requirements -> stories -> agents commands/review.md /review: 3-pass QC review agents/security-reviewer.md .mcp.json Linear MCP server config CLAUDE.md Project instructions skeleton docs/requirements/ Where requirements docs live

Key Features

Separate Agent Roles
Dev, review, and fix agents each get a fresh context window scoped to their job. No context pollution between roles. Each agent runs on its own GitHub Actions VM and self-destructs when done.
Safety Hooks
Branch protection blocks all edits on main. Destructive command blocker catches force pushes, recursive deletes, and database drops. Credential deny rules block reading .env files. Bot-only fix triggers prevent unintended loops.
Linear Integration
The /pipeline command connects to Linear via MCP to create structured projects and issues. Stories sync bidirectionally - issues auto-close when PRs merge.
Starter Codebase Support
Pass a git URL as a second argument to /pipeline to build on an existing codebase instead of starting from scratch. The starter code is cloned, committed, and referenced in stories automatically.
Real-Time Progress
Dev agents update issue checkboxes as they complete each requirement, not in a batch at the end. Watch progress live in the GitHub Issue while the agent works.
Cost Controls
Turn limits on every agent (dev: 40, review: 10, fix: 15). Five-iteration fix cap prevents runaway loops. Concurrency groups prevent parallel conflicts. Each agent costs $1-5 per run.

Security

Actions
Pinned to SHA
Credentials
.env files denied
Branch Protection
Main branch locked
Destructive Cmds
Blocked by hook
Tool Restrictions
Per-agent scoping
Dependencies
Version-pinned

Quick Start

  1. Use this template to create a new repo (or copy files into an existing one)
  2. Add ANTHROPIC_API_KEY and LINEAR_API_KEY to GitHub repo secrets
  3. Run /install-github-app in Claude Code to install the Anthropic GitHub App
  4. Fill in CLAUDE.md with your project's architecture, policies, and commands
  5. Write a requirements doc in docs/requirements/
  6. Run /pipeline docs/requirements/your-feature.md
  7. Watch the agents work. Review the PRs.

Get Started

Fork the template, fill in your CLAUDE.md, and have autonomous agents running in 30 minutes.