Search by

voku / agent-learning

voku

Reviewable finding, proposal, redaction, and decision-history tooling for coding-agent learning loops.

Package info

github.com/voku/agent-learning

pkg:composer/voku/agent-learning

Fund package maintenance!

voku

Statistics

Installs: 133 925

Dependents: 3

Suggesters: 0

Stars: 3

Open Issues: 2

0.23.4 2026-11-30 11:05 UTC

This package is auto-updated.

Last update: 2026-11-30 11:06:47 UTC


README

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

Your agent "learned" something last session, and now it sits in the prompt forever, unchecked. agent-learning makes every lesson earn its place: observation → validated Finding → human-approved Proposal → durable guidance.

You get:

  • Confidence is never validation. A Finding keeps observation, hypothesis and validated conclusion separate, and validate rejects records that blur them (identical hypothesis and observation, a validated status without a conclusion).
  • Nothing becomes durable guidance without a human. Changes to MEMORY.md, skills or hard constraints need an approved Proposal and leave an append-only decision history; maintenance commands such as dream and guidance-evaluate only write candidates and never approve, apply, retire or rewrite guidance.
  • Deterministic and local. Records are plain JSON/JSONL files in your repository; the dream report is byte-stable for equivalent inputs, and backlog exits non-zero while validated Findings wait for consolidation.

Part of Agent Loop — a deterministic, local-first workflow for coding agents: approved Contracts, explicit next actions, evidence before "done". This package owns durable Learning: Findings, LearningNotes, Proposals and human-decided guidance.

Quickstart

Requires PHP ^8.3; the only runtime package dependency is voku/agent-graph, used for the Learning lineage index.

composer require voku/agent-learning

Capture an observation, have a reviewer validate it, and build the consolidation input for an LLM or human reviewer. Without --root, the CLI discovers .agent-loop/learning from the current directory.

mkdir -p .agent-loop/learning/findings

# 1. Capture an unverified report as a candidate Finding
vendor/bin/agent-learning finding-capture \
  --id finding.2026-11-29.001 \
  --task DEMO-1 --by dev \
  --observation "CI failed because composer.lock was out of date." \
  --hypothesis "Running composer validate --strict before pushing catches a stale lock file." \
  --evidence "CI log of the failed run"

# 2. A reviewer validates it with an explicit conclusion
vendor/bin/agent-learning finding-transition finding.2026-11-29.001 validated \
  --by reviewer \
  --conclusion "composer validate --strict reports the stale lock file locally."

# 3. Check the root and see what still needs handling
vendor/bin/agent-learning validate
vendor/bin/agent-learning finding-queue

# 4. Build consolidation input (classification + Proposal) for the validated finding
vendor/bin/agent-learning prepare --task DEMO-1 --output consolidation-prompt.md

Output of steps 3 and 4 (paths shortened):

Validated agent learning root: /path/to/project/.agent-loop/learning
Findings: 1
Proposals: 0
Recall selections: 0
Guidance outcomes: 0
Active constraints: 0
Findings needing handling: 1

finding.2026-11-29.001 [task DEMO-1] (0d old)
  conclusion: composer validate --strict reports the stale lock file locally.
  allowed: consolidated, superseded, archived
  signals: no_proposal
Selected findings: 1
- finding.2026-11-29.001 (DEMO-1)
Wrote consolidation input: consolidation-prompt.md

finding-capture and finding-transition print the record as JSON, including its available_actions. Nothing in this flow approves guidance: the consolidation result is imported with proposal-import as a candidate Proposal and still needs proposal-approve / proposal-reject by a human.

Learning root somewhere else? Pass --root with the learning root itself (the directory holding findings/, proposals/ and so on) or a project directory it can be resolved from; the CLI reference lists the discovery rules and every command, and vendor/bin/agent-learning help prints all options.

How it works

agent / human observation
   ↓ finding-capture              candidate Finding (unverified; confidence is not validation)
   ↓ finding-transition validated reviewer adds an explicit validated conclusion
   ↓ prepare → proposal-import    candidate Proposal (one bounded change, source Findings attached)
   ↓ proposal-approve / -reject   human decision, appended to history/
durable guidance (MEMORY.md, skill, hard constraint) or a LearningNote precedent

voku/agent-recall-compiler reads approved guidance and LearningNotes as task context; workflow hosts such as voku/agent-loop decide when a Learning transition is requested. Details: Concepts.

Documentation

I want to… Read
Understand Findings, LearningNotes, Proposals, evidence and decision history Concepts
Look up every agent-learning / agent-learning-note command CLI reference
Know exactly what validate checks and see example JSON records Record formats and validation
Run dream, re-anchor applied proofs or rebuild history projections Concepts: Dream maintenance cycle
Record and author reusable solved-case precedent LearningNotes · authoring dogfood
Turn usage history into promotion or retirement candidates Guidance usage evaluation · fixture
Prove applied guidance really exists in the repository Applied guidance proof · maintenance evidence
Promote a validated Finding into a PHPStan/CS-Fixer/test/CI constraint Record formats: constraints · constraint examples
Use local agent history (ctx) as evidence ctx integration
Embed it from PHP or find the shipped skills (PackageResources::skillsRoot()) PHP embedding · API reference
Give my agent a ready-made workflow skill (6 shipped) Shipped skills · agent-learning-consumer
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

The full gate 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 maintainers follow the agent-learning-maintainer skill.

License

MIT. See LICENSE.