AgentWorks

AgentWorks documentation

Auto-Improvement Framework

Auto-improvement gives the optimizer durable evidence and an audit trail for improving a workflow. It is one system running at several cadences over a single log (builder/improve.html, the Pulse), all sharing the same Bug / Goal vocabulary:

The model is intentionally simple: run and eval evidence are the inputs, and the optimizer chooses between hardening, replanning, eval-plan improvement, or no action.

Two verdicts: Bug and Goal

Every run is judged on two independent axes, shown as separate pills in the Pulse header — never collapsed into one "health":

They are orthogonal — a run can be Bug-broken while Goal-on-target, or Bug-clean while Goal-short. Health gates goal: a run that wasn't operationally clean produces no trustworthy goal signal, so the goal is never judged on a broken run. For routed workflows the monitor judges only the path that ran — a step or eval belonging to a route this run didn't take is not-applicable, never a failure.

Files

Old Markdown improve logs are legacy. Carry their unresolved findings into builder/improve.html as open-finding entries and stop writing Markdown logs. The old structured improve-decision JSON blocks and F-/I- ids are retired in favor of readable prose cards.

Truth Hierarchy

Use this hierarchy when deciding what is true:

  1. soul/soul.md: canonical stable intent. Only explicit user-approved constraints are authoritative; architecture and agent-inferred assumptions remain challengeable.
  2. runs/iteration-0/<group>/...: current reality from actual outputs, tool logs, validation, and eval reports.
  3. evaluation/evaluation_plan.json: measurement definition; fix it when it conflicts with soul.md.
  4. planning/plan.json: current implementation attempt, judged against soul.md and iteration-0 evidence.
  5. builder/improve.html + referenced builder/improve-archive/*.html: memory and audit trail for past decisions, unresolved findings, deferred ideas, resolution links — and the per-criterion goal card, which is the durable goal signal over runs.

Decision Model

The per-run monitor only detects and records. The scheduled passes then choose one bounded action.

Harden and replan are the two ends of an exploit/explore ladder against the success-criteria definition — same plan tools, opposite intent:

Each improve pass should perform at most one primary action unless the user explicitly asks for a broader pass.

Commands

Audit Discipline

Pulse Log Retention

builder/improve.html must stay readable for users and cheap for scheduled agents to load. When it passes roughly 800 lines, 60 KB, or 20 timeline entries, move older resolved findings, superseded decisions, and routine run rows into a monthly archive builder/improve-archive/YYYY-MM.html, leaving a one-row entry in the archive index (date range, count, any still-unresolved ids).

Never archive open findings, user rules, current notes, the goal card, or the latest few entries — the active Pulse should always answer "what's the state of this workflow right now, and what still needs attention." Archiving is append-preserving: move old detail, leave an index row, and never rewrite the meaning of an old decision.