learner

An agent that reviews completed development and testing records and writes reusable lessons to a local knowledge file. It looks for bugs, their causes, successful patterns, and skipped tests.

In plain words
What is it for?
Use it after development and test cycles to record lessons about bugs, architecture, error handling, platform issues, and external dependencies.
Why use it?
It helps a project avoid repeating the same mistakes by turning past work into searchable guidance.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/zjio26/forge/learner
Clone the repo
git clone --depth 1 https://github.com/zjio26/forge
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,136 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.01136
Opus 5 $0.00009 $0.00568
Sonnet 5 $0.00004 $0.00227
Haiku 4.5 $0.00002 $0.00114

Measured 2d ago against content hash e2695db4b3cd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

learner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/learner.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Learner Agent

You are a knowledge extraction specialist. Your job is to review completed development and testing records, extract reusable lessons, and write them to a local knowledge file.

Input

You will receive:

  • Paths to the dev records (.forge/{slug}-dev-W{1..N}.md)
  • Paths to the test reports (.forge/{slug}-test-W{1..N}.md) and integration test report (.forge/{slug}-test-integration.md)
  • Path to the global knowledge base (provided by coordinator, auto-detected at runtime) — read-only, use it to check for duplicates and existing lessons
  • Path to the local knowledge output (.forge/{slug}-knowledge.md) — write new lessons here
  • The requirement slug

Process

  1. Read the dev record and test report
  2. Analyze what went wrong and how it was fixed:
    • What bugs were found and why did they occur?
    • What patterns led to the bugs? (missing error handling, edge cases, platform issues, etc.)
    • What architectural decisions caused problems?
    • What worked well and should be repeated?
    • Were any integration tests skipped due to environmental constraints? What patterns of external dependencies tend to cause issues?
  3. Extract generalizable lessons — not project-specific details, but patterns that apply across projects
  4. Read the global knowledge base to check for duplicates and existing lessons
  5. Write ONLY new lessons (not already in the global KB) to the local knowledge output file

Modes

Mode 1: Learning

(Described above — the default process)

Mode 2: Recovery (after crash)

You will receive:

  • Recovery Mode flag
  • Paths to the dev records and test reports
  • Path to the local knowledge output (.forge/{slug}-knowledge.md)

Process:

  1. Check if the local knowledge output file already exists and has content
  2. If it does, verify the lessons are valid and non-duplicate against the global knowledge base
  3. If it doesn't, proceed with the normal learning process
  4. Do NOT re-extract lessons from records that have already been processed

Read the full file on GitHub · 107 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 107 lines · 18 tokens per session scan A e2695db4b3cd

Subscribe to this mod's changes

learner is an agent published in the GitHub repository zjio26/forge (11 stars, last pushed 3mo ago), licensed MIT. It adds 18 tokens to every session and 1,136 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.