graph-engineering
БесплатноБез исполняемых скриптовНе проверенRoute an agent-reliability request to the right @statelyai/agent skill and keep the four steps in order — make it a state machine, add traces, add evals…
от statelyai★ 86 звёзд на GitHubОб этом скилле
Graph engineering
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.
Four steps, in order, each needing the one before it. Step 0 is optional, for existing code that stays as it is.
| Step | Skill | Done when |
|---|---|---|
| 0. Verify in place (existing code that stays as it is) | verify-in-place |
A model of the code, its rules proved complete with a non-vacuity check, every recorded run conforming or deviating with a confirmed, pinned finding, coverage gaps listed, and one seeded regression caught. The code is unchanged, or changed only by a seam commit the user approved |
| 1. Make it a state machine | loop-to-machine (existing code), build-machine (from scratch, TypeScript), or generate-machine (from scratch, when the spec fits JSON) |
Rules are guards and the sentinel is unreachable (canReach). From existing code: the parity report has no unreviewed regressions. From scratch: every invariant is proved complete or listed as not proved, or every verifyAgentConfig gate passes |
| 2. Add traces | add-traces |
Every run leaves a stamped log thread that replays to its final state |
| 3. Add evals | add-evals |
Evals per state at the cheapest level, an objective, baseline numbers per split |
| 4. Self-improve (experimental) | improve-machine |
A pull request with one policy change and its held-out scorecard, or a report that none helped |
Find where the project is
When the user wants guarantees about existing code without changing it, start at step 0 and stop there unless they ask for more. Migrating after step 0 is step 1 with loop-to-machine; the model and its proofs carry over.
Otherwise check in this order and start at the first step that is not done:
- Does the code path production actually runs go through a machine (
setupAgent,createMachine, anAgentWorkflowConfig)? Follow the route or entry point to the model call; a machine that nothing calls does not count. If the path is a loop or ad-hoc code, step 1. - Do runs persist to an event log store with a declared machine
versionand ametadatastamp? If not, step 2. - Is there an objective over ground truth, and evals that name the states they cover? If not, step 3.
- Otherwise, step 4, which is experimental: say so when you route there. A machine with no decision point (a tool loop, a scheduler: the model picks tools inside one text request) still goes to step 4:
improve-machine's "No decision points" branch, which turns traces into approval-rule, cap, and request-wording proposals.
From scratch, pick build-machine when a rule needs a threshold, a counter, spawned fan-out, a timer, or an any-time event: the JSON config's guards are truthy-only. Pick generate-machine when every rule is a truthy check.
Tell the user which step you are starting at and why, in one line, then load that skill.
Across all steps
- XState v6, not v5. Most training data is v5; v6 differs:
- A transition is a plain function:
({ context, event }) => ({ target, context }). There is noassign; return the new context. - Guards are inline JS in that function. Named guards are optional, not required.
- Targets are objects (
{ target: "b" }), never bare strings. - Actors:
createAsyncLogic, notfromPromise. Done/error events are{ type: "xstate.done.actor", actorId, output }and{ type: "xstate.error.actor", actorId, error }.
- A transition is a plain function:
- Keep targets in the transition function.
describeMachineparses each function and lists every target it can return. A target from a helper (=> resolveRound(context)) or a variable reads as→ ?: have the helper return data and pick the target inline. Pass{ source: true }to read each function under its line, andhelpers: { name: fn }for the functions they call by name. - To see what one event does, call
transition. It is pure and runs nothing; see loop-to-machine. - The environment is people's code. Rules, guards, invariants, and the sentinel change only by human review. No step rewrites them on its own.
- No decision point is not a dead end. Steps 2–4 still apply: traces stamp the request config or approval-rules version, evals are rule checks and per-state stats, and improvement proposes changes for a person to review.
- Ground truth scores everything. Outcomes and effects in the world, labeled by people. A model never grades its own runs.
- Ask for labels and rules; decide the mechanics. Expected outcomes, thresholds, the objective, and the train/held-out split are the user's. File layout, test names, and helper code are yours.
- Hand back between steps. Finish one step's hand-back before starting the next, unless the user asked for several in one go.
Установить graph-engineering в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл graph-engineering?
Route an agent-reliability request to the right @statelyai/agent skill and keep the four steps in order — make it a state machine, add traces, add evals, self-improve. Use when asked to "make my agent reliable", "graph engineering", "turn my agent into a state machine and improve it", "where do I start with this agent", or any request that spans more than one of those steps.
Как установить скилл graph-engineering?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл graph-engineering запускает скрипты?
Нет, скилл состоит только из инструкций (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