← ClaudeAtlas

improve-agentlisted

Improve an agent's formula TOML based on post-execution learnings. Use after a formula run required manual intervention, produced incorrect artifacts, or left cleanup work for the operator. Classifies the failure type, scans for sibling vulnerabilities, selects the appropriate fix pattern, and surgically inserts corrective steps into the formula.
stempeck/agentfactory · ★ 3 · AI & Automation · score 64
Install: claude install-skill stempeck/agentfactory
# Improve Agent Formula Surgical improvement of a formula TOML based on observed execution failures or required manual intervention. ## Invocation `/improve-agent <formula-path>` or `/improve-agent <agent-name>` If agent-name given, resolve to `$AF_ROOT/.agentfactory/store/formulas/<agent-name>.formula.toml`. ## Phase 1: Gather Evidence Collect what went wrong. Ask the user if not already clear from conversation context: 1. **What manual work was required after the formula ran?** 2. **Which files/paths were affected?** 3. **What was the expected state vs actual state?** Record as a structured gap: ``` GAP: <one-line description> EXPECTED: <what should have happened> ACTUAL: <what happened instead> MANUAL FIX: <what the operator had to do> AFFECTED PATHS: <specific files/directories> ``` ## Phase 1.5: Context Review Phase 1 collects what the operator noticed. This phase collects what the run **measured** — the per-step context figures the formula's own step records carry. Do it before reading the formula, so Phase 2 already knows which steps are suspect. 1. **Find this run's instance.** Read `.runtime/improvement_pending` (relative to your own agent directory) and take its `instance_id` field. The marker survives the whole improvement session — it is consumed only by `af improvement complete`. 2. **Pull the report.** ```bash af telemetry report --instance <instance_id> --json ``` Read the JSON body, not the exit code: this command reports i