A ready-to-use, stack-agnostic template for running AI coding agents through a full delivery loop: understand -> plan -> implement -> test -> human validation -> iterate -> PR.
- Agent entrypoint and navigation map:
AGENTS.md - Agent control plane under
agent/for project profile + evolution log - Durable engineering standards under
docs/ - Scope boundary policy:
docs/SCOPES.md - Execution plan workflow under
docs/exec-plans/ - Shared human-agent validation loop in
VALIDATION.md - PR template under
.github/PULL_REQUEST_TEMPLATE.md - CI entrypoint under
.github/workflows/ci.yml - Automation scripts:
scripts/agent/bootstrap-project.shscripts/agent/scope-check.shscripts/agent/validate.shscripts/agent/create-pr.sh
agent-harness-template/
|-- AGENTS.md
|-- ARCHITECTURE.md
|-- agent/
| |-- README.md
| |-- project.env
| `-- evolution-log.md
|-- docs/
| |-- DESIGN.md
| |-- PLANS.md
| |-- SCOPES.md
| |-- CODING_STYLE.md
| |-- QUALITY_SCORE.md
| |-- SECURITY.md
| |-- RELIABILITY.md
| |-- design-docs/
| | |-- index.md
| | `-- core-beliefs.md
| |-- exec-plans/
| | |-- active/
| | | `-- .gitkeep
| | |-- completed/
| | | `-- .gitkeep
| | `-- tech-debt-tracker.md
| `-- references/
| `-- .gitkeep
|-- .github/
| |-- PULL_REQUEST_TEMPLATE.md
| `-- workflows/
| `-- ci.yml
|-- scripts/
| `-- agent/
| |-- bootstrap-project.sh
| |-- scope-check.sh
| |-- validate.sh
| `-- create-pr.sh
`-- VALIDATION.md
- Initialize git and first commit if needed.
- Open
AGENTS.mdand use it as the first file every agent reads. - Run
scripts/agent/bootstrap-project.shto detect stack/language and generateagent/project.env. - For a new task, create
docs/exec-plans/active/[task-slug].mdusing the template indocs/PLANS.md. - Implement in small commits using:
[task-slug] step-N: description
- Run:
scripts/agent/validate.sh
- Update
VALIDATION.mdand set status toawaiting-review. - After human approval (
status: approved), run:scripts/agent/create-pr.sh [task-slug]
This template is intentionally stack-agnostic. Primary setup is profile-driven:
scripts/agent/bootstrap-project.shThis writes agent/project.env with detected defaults for:
- stack/language
- test and lint commands
- project-code roots vs agent-structure roots
You can still override validation commands ad hoc with env vars:
export AGENT_TEST_CMD="<your test command>"
export AGENT_LINT_CMD="<your lint command>"Examples:
- Node:
AGENT_TEST_CMD="npm test",AGENT_LINT_CMD="npm run lint" - Python:
AGENT_TEST_CMD="pytest",AGENT_LINT_CMD="ruff check ." - Go:
AGENT_TEST_CMD="go test ./...",AGENT_LINT_CMD="go vet ./..."
- Agent writes/updates
VALIDATION.md. - Human executes listed steps and records issues in the same file.
- Agent resolves issues one by one, appends iteration logs, resets status to
awaiting-review. - Human sets status to
approvedwhen satisfied.
- Keep
AGENTS.mdconcise and navigational. - Keep execution plans and validation history append-only.
- Keep docs and behavior aligned in the same change set.
- Use
scripts/agent/scope-check.shto classify changed paths before committing.