Search by

voku / agent-recall-compiler

voku

Deterministic L2 Meta-Prompt compiler and briefing manager for coding agents.

Package info

github.com/voku/agent-recall-compiler

pkg:composer/voku/agent-recall-compiler

Fund package maintenance!

voku

Statistics

Installs: 119 887

Dependents: 2

Suggesters: 0

Stars: 1

Open Issues: 1

0.29.21 2026-12-01 10:42 UTC

This package is auto-updated.

Last update: 2026-12-01 10:44:06 UTC


README

Build Status Latest Stable Version Total Downloads Monthly Downloads License PHP Version Require GitHub Stars GitHub Forks

Stop pasting "context" into your coding agent and hoping: compile the task plus bounded repository evidence into a replayable briefing, so the same input always gives the agent the same instructions.

You get:

  • Replayable briefings. Identical inputs produce an identical recall.bundle.json, system.md names that bundle's SHA-256, and meta.json records the SHA-256 of system.md and every other immutable artifact, so you can tell exactly which briefing was compiled (proving an agent actually received it needs host evidence).
  • No invented confidence. Every briefing makes the agent label each material conclusion VERIFIED, INFERRED, ASSUMED, BLOCKED or CONTRADICTED; every exposed source carries provenance, and missing evidence stays UNKNOWN.
  • Fail closed, never filler. Conflicting guidance or invalid constraints abort the compile instead of emitting a misleading briefing; with no learning root at all, Recall selects no guidance instead of inventing any.

Part of Agent Loop — a deterministic, local-first workflow for coding agents: approved Contracts, explicit next actions, evidence before "done". This package owns bounded task context (Recall) and operating-prompt recipes.

Quickstart

Requires PHP ^8.3.

composer require --dev voku/agent-recall-compiler

Compile a briefing from inside your repository. By default Recall reads the learning root at .agent-loop/learning and writes to .agent-loop/recall/<task-id>/; an empty or missing learning root is valid.

vendor/bin/agent-recall-compiler compile \
  --task DEMO-1 \
  --description "Make the greeting configurable" \
  --file src/Greeter.php \
  --file tests/GreeterTest.php
Briefing compiled successfully under: /path/to/project/.agent-loop/recall/DEMO-1/
- compilation ID: compilation.DEMO-1.<timestamp>.<suffix>
- system.md (selected guidance: 0, selected constraints: 0)
- recall.bundle.json (canonical, replayable)
- facts.json and selection-report.json
- validation-plan.md
- recall-log.draft.json

Hand system.md and validation-plan.md to the coding agent. The briefing opens like this:

# L2 Meta-Prompt Briefing for Task: DEMO-1
> Recall bundle SHA-256: d5984584eafd23ce6d98f9ae8efbb35f6e31857f1a7012ac327535169f7109da

## Evidence Discipline
Label every material conclusion honestly: **VERIFIED** (direct reproducible evidence), **INFERRED** ...

Before close-out, complete the generated outcome draft and record it:

vendor/bin/agent-recall-compiler log-outcome \
  --root .agent-loop/learning \
  --draft .agent-loop/recall/DEMO-1/recall-log.draft.json \
  --by "<agent-or-human>" \
  --commit "<commit-or-working-tree>"

The draft starts with no outcome rows. Add a row only for selected guidance that actually changed, confirmed, or misled the work; unjudged selections are neutral and still recorded as selection events.

Next steps: pass --root for a learning root elsewhere (for example --root infra/doc/agent-learning) and use the same value for compile and log-outcome, add --target "App\\Service\\UserService::save" --map-index .agent-map/php-symbols.json for exact agent-map context, or generate review artifacts with review blindspots <task-id> --output-dir .agent-loop/recall/<task-id> (the review commands default to .agent-recall/current). Run vendor/bin/agent-recall-compiler help for every command and option.

How it works

task (inline, JSON, or a governed approved-Contract envelope)
  + bounded evidence: guidance, constraints, project documents, agent-map facts, prior outcomes
        ↓  deterministic selection, with WHAT / WHY / HOW / AUTHORITY / USE / STATE provenance
system.md + validation-plan.md + recall.bundle.json (hash-identified) + recall-log.draft.json
        ↓
your coding agent implements; verification, review and close-out stay with their owners

Recall compiles context and prompt recipes only: it does not execute edits, approve work, acknowledge review, or change durable guidance. The full model is in Concepts.

Documentation

I want to… Read
Understand why Recall exists, the core contracts and what it does not own Concepts
See every artifact a compile writes and when it fails closed Concepts: generated artifacts
Look up compile, target/map, manifest, outcome, review and prompt commands CLI reference
Learn the rules behind bounded context, evidence states and authority Design principles
Use L2/L1 operating-prompt recipes or run Recall under agent-loop Operating prompt recipes
Pick the right prompt primitive (first-draft review, reflection, exploration) Prompt primitives
Re-ground a stale task before handing it to a fresh agent Discovery-first handoff
Understand provider boundaries, fact precedence and source digests Recall provider architecture · Context Explain
Record whether selected guidance helped Guidance event history · LearningNote precedents
Embed Recall from PHP or resolve shipped assets via PackageResources Embedding Recall · Public PHP API
Tell dependency readiness apart from a defect under review Dependency readiness
Give my agent a ready-made skill agent-recall-consumer · maintainer skill
Browse all docs Documentation index
See what changed or upgrade CHANGELOG · UPGRADING

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

Development

composer ci

composer ci runs strict Composer validation, PHPUnit, and PHPStan. Where to change what, and the focused commands, are in docs/development.md; contribution rules are in CONTRIBUTING.md and agent rules in AGENTS.md.

License

MIT. See LICENSE.