improve-machine
БесплатноБез исполняемых скриптовНе проверенExperimental. Improve a @statelyai/agent policy machine (a TypeScript setupAgent machine or a JSON AgentWorkflowConfig) from its run traces toward its goal…
от statelyai★ 86 звёзд на GitHubОб этом скилле
Improve an agent machine
Targets
@statelyai/agent2.0 alpha, as on thenextbranch. APIs change between alphas: when a call here does not match the installed package, checknode_modules/@statelyai/agent/CHANGELOG.md.
Experimental: self-improvement is experimental. The gates are stable, but the round itself may change, and on a loop with no decision point it mostly proposes wording, cap, and approval-rule changes. Code-level causes come back as change requests for a person. Tell the user this skill is experimental before the first round.
You improve a policy: the machine that decides how the agent works toward its goal, written in TypeScript or as a JSON AgentWorkflowConfig. It runs inside an environment: a TypeScript machine whose states and guards encode the rules of the world and the business invariants. One round changes the policy once and measures it:
locate inputs → read traces → diagnose → propose one diff → gate (≤ 3 repairs) → replay train → replay held-out → recommend or discard → record → pull request
This is step 4 of 4, after loop-to-machine, add-traces, and add-evals. To author a JSON policy from scratch, use the generate-machine skill. Concept page: Environment and policy.
Hard rules
- Never edit the environment. Not its states, guards, invariants, event schemas, or the vocabulary it exposes. When the goal is unreachable without an environment change, write a change request for a person (template in reference.md) and stop.
- Never edit a machine while it runs. A promoted policy applies to new runs only.
- The objective comes from ground truth. Score outcomes from the traces (terminal states, outputs) or from effects recorded in the world. Never ask a model to grade its own runs.
- One cause per round, smallest diff. A diff that fixes two things cannot tell you which one helped.
- Diagnose from training scenarios only. Held-out scenarios are for the promotion decision. Never read their failures to shape a change, and never move a scenario between splits. Eval files may list baseline failures for every split; read only the training rows.
- Stop after 3 rounds without a promotion (or the limit the user gives).
- Propose, never promote. A round ends in a recommendation. A recommended candidate goes to a person as a pull request with its scorecard; merging it is the promotion. Never merge, deploy, or switch the running policy yourself.
Policy format
The rounds are the same for both formats. What differs is what the diff may touch and how it is gated.
| TypeScript policy | JSON policy | |
|---|---|---|
| The policy | A setupAgent machine in its own file(s), with a declared version |
An AgentWorkflowConfig file |
| May change | The policy file(s) and their CHANGELOG.md; once, the line in the runner that routes the decision to the policy; tests that pin measured numbers (see the pull request) |
The config's states and context |
| Gates | tsc, lintAgentMachine, explorePaths on the policy, the environment check, the overfit check |
verifyAgentConfig |
| Vocabulary | What the policy file imports and the events the environment offers | The allow lists |
No policy yet. loop-to-machine leaves a single model decision inside the environment when the old code had no policy logic. Then:
- Record
v0in a newCHANGELOG.mdnext to the environment (in apolicy/directory): "the model decides directly". This entry goes in the working tree. - The first recommended candidate introduces the policy as
v1: a policy file that reproduces the current behavior (it passes the environment's prompt and facts through to the model) plus the one rule the diagnosis found, and the routing line in the runner (withPolicy(modelExecutors)). The policy runs as the decider through a decide executor that callsrunAgent(policyMachine, { input })once per decision and returns its output event; the pattern is in../loop-to-machine/policy.md. - Its
descriptionis the environment's goal with measurable success criteria. If the environment's goal has none, draft them from the confirmed objective and list the draft under questions for the user. - If the policy needs a fact the environment does not pass in the decision's
metadata.facts, that is an environment change request.
For a TypeScript policy, before the first round:
- List the environment files (the environment machine, its guards, the world and its tools) and record a hash of each. Any change to them fails the round. The runner is not one of them, but its diff may contain only the routing line.
- Keep the policy a machine. A diff may add states,
choicebranches, guards over facts, helpers in the policy file, or change a prompt or a model ref. It may not turn the policy into a free function, call too
Установить improve-machine в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл improve-machine?
Experimental. Improve a @statelyai/agent policy machine (a TypeScript setupAgent machine or a JSON AgentWorkflowConfig) from its run traces toward its goal, inside a fixed environment machine, with gates and a held-out promotion rule, and hand the result to a person as a pull request. Use when asked to "improve this agent", "self-improve", "optimize the playbook from traces", "tune the policy", "make the agent cheaper or more accurate", or "why is my agent failing" for a machine whose runs are persisted to an event log store.
Как установить скилл improve-machine?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл improve-machine запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic