voku / agent-loop
Keep coding-agent work moving: a local PHP 8.3+ CLI that holds each task to an approved Contract, deterministic validation and independent review, so 'done' needs evidence.
Fund package maintenance!
Requires
- php: ^8.3
- helgesverre/toon: ^3.1
- voku/agent-edit: ^0.8.2
- voku/agent-kanban: ^0.4.11
- voku/agent-learning: ^0.23.4
- voku/agent-map: ^0.25.4
- voku/agent-recall-compiler: ^0.29.18
- voku/agent-session: ^0.7.4
- voku/portable-utf8: ^6.1
Requires (Dev)
- brianium/paratest: ^7.8
- composer/semver: ^3.4
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^12.0.1
- symfony/yaml: ^7.4
- voku/itp-context: ^0.4.0
- voku/phpstan-agent-format: ^0.3.1 || ^0.4.0
Suggests
- voku/housekeeping: Standalone cron runner to auto-run agent-loop maintenance tasks against a target repository.
Provides
None
Conflicts
None
Replaces
None
- dev-main / 0.21.x-dev
- 0.21.6
- 0.21.5
- 0.21.4
- 0.21.3
- 0.21.2
- 0.21.1
- 0.21.0
- 0.20.113
- 0.20.112
- 0.20.111
- 0.20.110
- 0.20.109
- 0.20.108
- 0.20.107
- 0.20.106
- 0.20.105
- 0.20.104
- 0.20.103
- 0.20.102
- 0.20.101
- 0.20.100
- 0.20.99
- 0.20.98
- 0.20.97
- 0.20.96
- 0.20.95
- 0.20.94
- 0.20.93
- 0.20.92
- 0.20.91
- 0.20.90
- 0.20.89
- 0.20.88
- 0.20.87
- 0.20.86
- 0.20.85
- 0.20.84
- 0.20.83
- 0.20.82
- 0.20.81
- 0.20.80
- 0.20.79
- 0.20.78
- 0.20.77
- 0.20.76
- 0.20.75
- 0.20.74
- 0.20.73
- 0.20.72
- 0.20.71
- 0.20.70
- 0.20.69
- 0.20.68
- 0.20.67
- 0.20.66
- 0.20.65
- 0.20.64
- 0.20.63
- 0.20.62
- 0.20.61
- 0.20.60
- 0.20.59
- 0.20.58
- 0.20.57
- 0.20.56
- 0.20.55
- 0.20.54
- 0.20.53
- 0.20.52
- 0.20.51
- 0.20.50
- 0.20.49
- 0.20.48
- 0.20.47
- 0.20.46
- 0.20.45
- 0.20.44
- 0.20.43
- 0.20.42
- 0.20.41
- 0.20.40
- 0.20.39
- 0.20.38
- 0.20.37
- 0.20.36
- 0.20.35
- 0.20.34
- 0.20.33
- 0.20.32
- 0.20.31
- 0.20.30
- 0.20.29
- 0.20.28
- 0.20.27
- 0.20.26
- 0.20.25
- 0.20.24
- 0.20.23
- 0.20.22
- 0.20.21
- 0.20.20
- 0.20.19
- 0.20.18
- 0.20.17
- 0.20.16
- 0.20.15
- 0.20.14
- 0.20.13
- 0.20.12
- 0.20.11
- 0.20.10
- 0.20.9
- 0.20.8
- 0.20.7
- 0.20.6
- 0.20.5
- 0.20.4
- 0.20.3
- 0.20.2
- 0.20.1
- 0.20.0
- 0.19.0
- 0.18.6
- 0.18.5
- 0.18.4
- 0.18.3
- 0.18.2
- 0.18.1
- 0.18.0
- 0.17.2
- 0.17.1
- 0.17.0
- 0.16.6
- 0.16.5
- 0.16.4
- 0.16.3
- 0.16.2
- 0.16.1
- 0.16.0
- 0.15.2
- 0.15.1
- 0.15.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.1
- 0.10.0
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.0
- 0.7.0
- 0.6.8
- 0.6.7
- 0.6.6
- 0.6.5
- 0.6.4
- 0.6.3
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.11
- 0.2.10
- 0.2.9
- 0.2.8
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.2
- 0.1.1
- 0.1.0
- 0.0.3
- 0.0.2
- 0.0.1
- dev-claude/agent-stack-engineering-ipfw5o
- dev-chore/release-0.21.6-tag
- dev-chore/release-0.21.6
- dev-chore/deps-agent-learning-0.23.4
- dev-ccr-70f31068-ozrtow
- dev-chore/release-0.21.5
- dev-fix/claude-hook-project-dir
- dev-ccr-784c9e99-0jrxgb
- dev-ccr-44bf1ea9-qiofzm
- dev-chore/learning-finding-1167
- dev-fix/gh-1167-validation-attention-response
- dev-ccr-764cd186-7diam7
- dev-ccr-15823ed8-z12v42
- dev-ccr-7dac2082-p9mp2n
- dev-gh-1252-stale-binding
- dev-ccr-c2fe0baa-tifr62
- dev-claude/gh-1156-composer-walkthrough
- dev-ccr-aa56cccc-q8t2ue
- dev-ccr-1bf17765-eu6d95
- dev-ccr-0ca1f0b3-slnot0
- dev-learning/gh-1252-findings
- dev-claude/agent-stack-efficiency-qo3x8v
- dev-claude/gh-623-claude-bootstrap-promotion
- dev-ccr-f423b9e4-nn4wx3
- dev-gh-1252-learning-authority
- dev-ccr-f423b9e4-nn4wx3-rejected
- dev-ccr-f6ae47e6-y5bjjs-gh1305
- dev-claude/gh-1156-verified-card-routing
- dev-claude/gh-1171-issue-first-guide
- dev-claude/gh-1142-enter-pipeline-stages
- dev-claude/gh-1201-part-b-commit-rejection-record
- dev-ccr-f6ae47e6-y5bjjs-keep-effect
- dev-ccr-f6ae47e6-y5bjjs-gh1217-defects
- dev-codex/gh-1213-publication-progress
- dev-ccr-f6ae47e6-y5bjjs-gh1217
- dev-codex/map-scope-followup
- dev-ccr-f6ae47e6-y5bjjs-gh1167
- dev-ccr-f6ae47e6-y5bjjs
- dev-feat/gh-1185-decision-outcomes
- dev-codex/1142-profile-choice-presentation
- dev-codex/gh-1208-map-scope
- dev-chatgpt/gh1082-docker-profile-ci
- dev-probe/gh-1082-b-contract-bootstrap
- dev-codex/1212-target-diagnostics
- dev-fix/gh-1225-untrusted-config-display
- dev-release/0.20.111-tag
- dev-fix/gh-1237-merged-candidate
- dev-release/0.20.111
- dev-feat/observe-execution-projection
- dev-release/0.20.110-tag
- dev-release/0.20.110
- dev-feat/request-contract-changes-api
- dev-fix/gh-1237-state-config-identity
- dev-learning/2026-11-28-agent-ui-session
- dev-fix/gh-1201-why-parser
- dev-fix/gh-1141-owner-artifact-rule
- dev-fix/gh-1198-candidate-recovery
- dev-probe/gh-1141-remote-bootstrap
- dev-bootstrap/gh-1082-c-remote
- dev-ccr-00331a18-59zma5-gh1198
- dev-ccr-00331a18-59zma5-gh1172
- dev-ccr-00331a18-59zma5
- dev-ccr-00331a18-59zma5-tag-0.20.109
- dev-ccr-00331a18-59zma5-release-0.20.109
- dev-ccr-00331a18-59zma5-gh1213
- dev-ccr-00331a18-59zma5-gh1213-followup
- dev-fix/gh-1208-map-language-acceptance
- dev-codex/gh-1142-review-routing
- dev-evidence/gh-1213-publication-waiver-baseline
- dev-fix/setup-wizard-followups
- dev-work/gh-1208-map-scope-contract
- dev-fix/enter-target-followups
- dev-chore/release-0.20.108-marker
- dev-feat/setup-wizard-interactive
- dev-ci/itp-context-041-consumer-proof
- dev-chore/release-0.20.108-prep
- dev-fix/gh-1184-grounded-commit-intent
- dev-feat/target-evidence-projection
- dev-feat/setup-wizard
- dev-evidence/gh-457-alias-candidate-20261126
- dev-evidence/gh-457-git-shape-falsifier-20261126
- dev-evidence/gh-1184-commit-policy
- dev-feat/map-itp-context-hints
- dev-fix/base-commit-exact-plan-time-20261125
- dev-fix/retain-validation-attention-responses-20261125
- dev-fix/task-start-approval-churn-preflight-20261125
- dev-fix/validation-output-order
- dev-fix/dogfood-preference-isolation
- dev-feat/session-question
- dev-fix/validation-repair-cap
- dev-fix/1156-published-consumer-first-plan
- dev-ccr-81e4f295-571n42
- dev-docs/gpt-6-2-self-contained-closeout
- dev-codex/pre-review-validation
- dev-release/tag-0.20.106
- dev-release/prepare-0.20.106
- dev-fix/ng10-plan-scope-files
- dev-codex/issue-1138
- dev-ccr-9c63a6d1-iq4gl1
- dev-codex/issue-1136
- dev-release/0.20.103-marker
- dev-release/0.20.103-changelog-v2
- dev-release/0.20.103-changelog
- dev-fix/allow-grep-search
- dev-ci/h2-historical-oracle-replay-20261120
- dev-docs/457-causal-proof-status-20261102
- dev-claude/agent-ecosystem-handover-az7pys
- dev-chore/tag-0.20.97
- dev-chore/release-0.20.97
- dev-fix/read-only-pending-attention-observation-20261113
- dev-fix/fresh-review-candidate-guidance
- dev-chore/release-0.20.96-tag
- dev-chore/release-0.20.96-changelog
- dev-fix/php85-recovery-null-offset-1051
- dev-feat/interaction-preference-1052
- dev-feat/task-scoped-local-autonomy
- dev-fix/docker-cli-pcntl-20261115
- dev-experiment/gh-1031-oracle-calibration-20261115
- dev-feat/agent-decision-composer-migration
- dev-release/tag-0.20.95-router-guidance
- dev-release/prepare-0.20.95-router-guidance
- dev-docs/minimize-projected-router-20261114
- dev-ci/skillevaluator-tier1-20261113
- dev-chore/lean-router-codelight-1031
- dev-feat/task-autonomy-sealed-evidence-1024
- dev-feat/1028-readonly-run-retention-inventory
- dev-fix/kanban-lane-sync-1023
- dev-fix/pipeline-rework-routing
- dev-release/0.20.91-marker
- dev-feat/human-attention-decision-api
- dev-agent/guidance-relevance-longitudinal-20261111
- dev-release/0.20.90-marker
- dev-release/0.20.90-prepare
- dev-fix/validate-managed-provenance-digests
- dev-docs/readme-file-guide-20261110
- dev-feat/plan-default-base-commit-head
- dev-fix/approval-preserving-scope-add-20261109
- dev-release/tag-0.20.89-marker
- dev-validation/pr1002-pr1003-pr1004-integration-20261109
- dev-fix/plan-present-exact-approval-subject-20261109
- dev-feat/bump-recall-and-learning-dependencies
- dev-release/tag-0.20.88-symlink-security-20261109
- dev-release/0.20.88-symlink-security-20261109
- dev-fix/init-scaffold-symlink-confinement-20261109
- dev-release/0.20.87-marker
- dev-release/0.20.87-notes
- dev-fix/php-setup-requested-language-20261109
- dev-fix/php-setup-selected-language-20261109
- dev-fix/php-setup-selected-language-evidence-20261108
- dev-release/tag-0.20.86-20261108
- dev-release/0.20.86-marker-20261108
- dev-release/prepare-0.20.86-approval-20261108
- dev-release/0.20.86-changelog-20261108
- dev-docs/php-setup-scaffold-before-final-plan-20261108
- dev-fix/init-slop-json-container-shapes-981
- dev-fix/approval-baseline-evidence-20261108
- dev-ci/probe-approval-ui-consumer-20261108
- dev-ci/itp-real-consumer-preedit-proof
- dev-fix/approval-baseline-classification-20261108
- dev-fix/approval-baseline-classification-scaffold-20261108
- dev-docs/conditional-itp-phpstan-guidance
- dev-feat/init-slop-policy-readonly-evidence-947
- dev-experiment/copilot-real-history-ab-20261108
- dev-chore/tag-agent-loop-0.20.85
- dev-chore/release-0.20.85-approval
- dev-feat/decision-briefing-ui-launch-20261108
- dev-fix/916-approval-delta-approved-baseline
- dev-test/runtime-history-guidance-consumption-20261108
- dev-test/init-fixer-only-empty-consumers-947
- dev-fix/surgical-bugfix-history-handoff-20261108
- dev-feat/init-composer-dev-scope-947
- dev-feat/bounded-git-history-investigation-20261108
- dev-feat/init-approve-language-apply-947
- dev-release/tag-0.20.84-20261107
- dev-release/0.20.84-followup-identity
- dev-fix/followup-card-identity-guidance-20261107
- dev-ci/renovate-docker-build-smoke
- dev-feat/init-plan-explicit-language-20261107
- dev-release/agent-loop-0.20.83-marker
- dev-release/agent-loop-0.20.83-notes
- dev-feat/init-proposal-preview-947
- dev-feat/init-reviewable-plan-947
- dev-fix/recall-027-release-pins
- dev-feat/init-setup-typed-plan
- dev-fix/php-onboarding-copyable-commands-20261107
- dev-fix/init-recommend-phpstan-nested-scope-20261107
- dev-feat/opt-in-recall-recipe-choice-20261107
- dev-chore/release-0.20.82-marker-20261107
- dev-release/prepare-0.20.82-20261107
- dev-feat/php-agent-onboarding-skill
- dev-feat/init-project-recommendations
- dev-feat/php-composer-validation-evidence
- dev-feat/init-llm-setup-brief
- dev-chore/recall-0.26.0-consumer-20261107
- dev-fix/execution-plan-required-stage-paths-20261107
- dev-chore/recall-compiler-026-consumer-20261107
- dev-release/0.20.81-marker
- dev-release/0.20.81-prep
- dev-fix/stale-validation-finish
- dev-docs/921-remove-duplicated-self-shape-context
- dev-docs/conditional-phpstan-itp-notices
- dev-experiment/922-operating-prompt-reorder-red-20261102
- dev-experiment/922-approval-delta-red-20261102
- dev-experiment/executable-probes-distinct-from-regressions-20261102
- dev-ci/avoid-duplicate-feature-branch-ci-20261102
- dev-simplify/discover-inert-followup-budget-20261102
- dev-release/0.20.80-marker
- dev-release/0.20.80-changelog
- dev-experiment/781-actor-trust-context
- dev-experiment/875-local-model-codex-dogfood
- dev-fix/879-reserve-standing-actor-owner-gates
- dev-docs/itp-pre-edit-dogfood-781
- dev-chore/request-0.20.78-tag
- dev-chore/release-0.20.78-changelog
- dev-fix/cli-human-approval-presentation
- dev-feat/914-agent-skills-composer-consumer
- dev-fix/gh852-implicit-workspace-ambiguity
- dev-release/0.20.77-marker
- dev-release/0.20.77-prep
- dev-fix/gh852-null-base-guard
- dev-fix/gh852-explicit-base-revert
- dev-chore/release-0.20.76-changelog
- dev-feature/gh852-workspace-hint
- dev-feature/gh906-disposable-work-checks
- dev-fix/front-door-json-test-diagnostics-20261031
- dev-fix/export-cleanup-unreadable-dir
- dev-fix/859-typed-scope-notice
- dev-feat/recall-next-step-0.25.10
- dev-experiment/tdd-agent-ab-890
- dev-test/tdd-review-recall-delivery
- dev-experiment/map-hook-e2e-ci-20261029
- dev-experiment/agent-map-real-consumer-ab-20261029
- dev-fix/refresh-on-composer-lock-change-20261029
- dev-test/875-codex-implicit-provider-router
- dev-docs/walkinglabs-harness-evidence-map
- dev-fix/learning-note-457-evidence
- dev-experiment/779-e3-decision
- dev-experiment/779-e2-0-native-baselines
- dev-experiment/779-e1-4-runtime-replay
- dev-experiment/779-e1-3-ci-replay
- dev-experiment/779-e1-2-phpstan-replay
- dev-experiment/779-e1-parser-regression-replay
- dev-experiment/779-codex-diagnostic-opt-in-proof
- dev-evidence/767-fresh-learning-consumer-20261011
- dev-fix/self-shape-governed-memory-reanchor
- dev-fix/self-shape-reanchored-canonical-home-20261010
- dev-fix/623-claude-pretool-capability-semantics
- dev-dogfood/agent-map-method-move-gap
- dev-feat/663-minimal-discipline
- dev-experiment/663-copilot-real-host-crossover
- dev-refactor/663-minimal-discipline-bootstrap
- dev-chore/663-discipline-context-action-proof
- dev-claude/gh-503-l2l1-edge-experiment
- dev-dogfood/gh-457-task-b-precedent-handoff
- dev-experiment/457-task-b-precedent-handoff
- dev-experiment/457-closed-learning-loop-self-discovery
This package is auto-updated.
Last update: 2026-12-01 12:46:05 UTC
README
Your coding agent forgets the task, guesses the next step and says “done” without proof. Agent Loop replaces that with an approved Contract, one explicit next action at a time, and evidence before “done”.
You get:
- Two commands and one rule.
enterandfinisheach return exactly onenext_action_kind(one of five values) and onenext_action; the agent does what the last result says instead of inventing a phase order. - No edits before approval, no self-certified “done”.
enterdoes not authorize mutation until a named human approves the exact Contract revision, and onlyfinishreports completion: its close gates check validation, review and the Learning decision instead of taking the agent's word. - Local and provider-independent. A PHP CLI around the agent you already use (Codex, Claude Code, OpenCode, Copilot, Gemini CLI, Antigravity, Cursor). It never calls an LLM itself, never auto-commits, pushes or merges, and never invents approval.
The front door of the Agent Loop toolchain: one local CLI that composes the narrower packages into one governed workflow. Overview and demo: voku.github.io/agent_loop_demo.
Two commands
vendor/bin/agent-loop enter ABC-123 --format=json # start or resume a task # ... follow next_action_kind + next_action, do the work it authorizes ... vendor/bin/agent-loop finish ABC-123 --format=json # reconcile evidence, get the next step # repeat until the result reports completion
next_action_kind |
What it means |
|---|---|
command |
Execute it as written. |
command_template |
Fill the model-owned placeholders from the request and repository evidence, then execute it. |
host_work |
Implementation or model work in your coding host; next_action describes it and is not a command. |
decision_required |
A genuine human-authority decision is needed first; show it to a human, never invent approval. |
none |
Nothing further is required. |
You do not memorize a phase order or rebuild a state machine in the prompt. See the lifecycle contract for the exact ownership model.
One real run, one human decision
A real bug in voku/email-check (task EMAIL-1), taken from composer require
to a complete governed Run with Claude Code as the host. Abridged; exit codes and
returned steps are the observed ones:
| Step | Exit | next_action_kind |
next_action |
|---|---|---|---|
enter (no Contract) |
1 | command_template |
agent-loop workflow plan EMAIL-1 --by <actor> … |
workflow plan |
0 | decision_required |
agent-loop workflow approve EMAIL-1 --revision 1 --by <named-actor> |
workflow approve (the one human decision) |
0 | — | vendor/bin/agent-loop enter EMAIL-1 |
enter (approved) |
0 | command |
agent-loop pipeline status EMAIL-1 --format=json |
pipeline stages: investigate, build, validation, two reviews, verify |
0 | host_work, command or command_template |
the next stage, then agent-loop finish EMAIL-1 |
finish |
1 | command_template |
… --reviewed-report-sha256 <sha256> --by <actor> |
finish --learning findings_recorded … (refused: no validated Finding) |
1 | command_template |
the same Learning template |
finish --learning follow_up_required … |
0 | none |
none |
enter exited 1 until the task was ready for mutation, and finish exited 1
until the Run was complete; every non-zero exit came with the step that moved the
task forward. The full table and transcript are in
Your first governed task.
Start a repository
Requirements: PHP 8.3+ and Composer (or the Docker setup).
composer require --dev voku/agent-loop vendor/bin/agent-loop init scaffold
Or create the tutorial board and task, then run the two commands against it:
vendor/bin/agent-loop init scaffold --demo vendor/bin/agent-loop board card show DEMO-1 vendor/bin/agent-loop enter DEMO-1 --format=json
Project the package-owned skills and roles into your coding host, then check
what the host still needs (--dry-run writes nothing):
vendor/bin/agent-loop init install-assets --agent=all --dry-run vendor/bin/agent-loop init host-status --format=json
Then follow Your first governed task: one real bug taken
from composer require to a complete governed Run, with every observed exit code
and returned step.
Why deterministic?
| Without it | With Agent Loop |
|---|---|
| A new chat means reconstructing the task | Approved task intent and progress survive the conversation |
| The agent decides what to do next from prose and memory | The workflow exposes the current next step |
| “Looks good” can quietly become “done” | Tests, analysis and review remain explicit evidence |
| Instructions keep growing forever | Repeated objective lessons can become tests, static rules or other deterministic checks |
More in Concepts: how it works, the convenience front doors
(quick, repair, pipeline) and what Agent Loop deliberately does not do.
CLI namespaces
Use vendor/bin/agent-loop help or <namespace> help for the executable
details; the CLI overview has examples.
edit governed edit preparation and execution
board Git-native work items
session temporary working memory and validation evidence
map repository structure and code navigation
recall bounded task context and outcome logging
learn findings, proposals, constraints and learning history
verify cross-package consistency checks
workflow durable governed workflow orchestration
board:verify board-only consistency checks
memory MEMORY.md validation and review
review deterministic review helpers
init repository setup and managed agent assets
Documentation
| I want to… | Read |
|---|---|
| Run my first governed task end to end | Your first governed task |
| Know which decisions need a human | Human authority |
| Brief my coding agent | Coding-agent field guide |
Pick a workflow or recovery path (quick, repair, pipeline) |
Workflow index |
| Understand the lifecycle and who owns what | Lifecycle contract and Concepts |
| Set up Codex, Claude Code, Cursor or another host | Agent assets and host integration |
| See the commands, or record a human Finding | CLI overview |
| Understand the commit rules in Git hooks | Git hooks |
| Use it in a TypeScript/JavaScript project | Non-PHP projects |
| Run it without local PHP | Docker setup |
| Know what becomes durable memory | Learning and durable-memory boundary |
| Check pre-1.0 compatibility guarantees | Compatibility and durable-state contract |
| See how it is tested on real issues | Real-issue acceptance and first-party dogfood |
| Check third-party sources and licences | Third-party notices |
| Browse everything | Documentation index, CHANGELOG, AGENTS.md |
Part of the Agent Loop toolchain
Each package owns one concern and can be used on its own. voku/agent-loop composes them into one governed workflow.
| Package | Owns |
|---|---|
| agent-loop | Task Contracts, lifecycle, next actions, validation and review gates |
| agent-kanban | Git-native Markdown board and card semantics |
| agent-session | Per-task working memory, decisions and checkpoints |
| agent-map | Read-only repository symbol maps and typed edit plans |
| agent-edit | Transactional, verified application of edit plans |
| agent-graph | Deterministic SQLite graph index and runtime |
| agent-recall-compiler | Bounded task context (Recall) and prompt recipes |
| agent-learning | Reviewable findings, proposals and durable guidance |
| agent-skills | Portable engineering skills for coding agents |
| agent-ui | Local server-rendered control plane for humans |
| agent-decision | Experimental bounded, advisory-only decision helper |
| agent-dotfiles | Shell dotfiles for non-interactive agent shells |
You do not need to understand every package to use Agent Loop; each kind of
information has one clear owner instead of one framework quietly owning
everything. agent-loop-runner is a
separate, optional execution plane for isolated coding-host runs.
Development
composer install
composer test
composer phpstan
composer ci
Never report a command as passed unless it actually ran and its exit code was observed. To find where a change belongs, see Find the right file; repository rules for contributors and agents live in AGENTS.md.
License
MIT. See LICENSE.