Graph goal
Compile a long-horizon goal into a PERSISTENT goal graph at .claude/graph-state/<slug>.json — frozen objectives, dependency-ordered nodes, and a machine-checkable acceptance gate on every node — so an agent can work it across sessions with /graph-next. The durable companion to one-shot /graph.From its SKILL.md
npx -y skills add ayaangazali/graph-engineering --skill graph-goalAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.4 KB, as published. Nobody here has run it
Graph-goal: compile a goal into a persistent graph
One-shot /graph designs a DAG in context, runs it, and forgets it. This skill
writes the DAG to disk so a loop can grind at it across sessions:
$ARGUMENTS
If no goal was provided, ask for one and stop. This skill only compiles —
it never starts the work; /graph-next does that, one gated tick at a time.
Read ../graph/reference/goal-state.md first — it is the single source of
truth for the file format, statuses, and invariants. Do not improvise fields.
Procedure
-
Slug + collision. Kebab-case slug from the goal. If
.claude/graph-state/<slug>.jsonexists, stop and say so — suggest/graph-next <slug>to continue it, or a different slug. Never overwrite a live goal graph without explicit confirmation. -
Freeze the objectives. Distill the goal into 1–5 outcome-level objectives — what must be true when this goal is done, not tasks. These are immutable to agents after this step (the scope-creep bound), so get them right: show the objectives list to the user and get a yes before writing the file. In a non-interactive run (headless, piped, autonomous — the Step-0 rule from the
graphskill applies here verbatim), don't dead-end: write the file with your best-judgment objectives and record it as a conforminghistoryentry (never a free-form note):{date, tick: 0, node: null, action: "objectives-auto-frozen-unreviewed", gate: "n/a", sha: <HEAD, or null if no commits>}. -
Decompose into nodes using the
graphskill's Step 1 discipline: verb-first ids, one job per node, split by context boundaries, deps only where an artifact genuinely flows. Every node references an objective id. Keep it coarse — 5–15 nodes; a tick can split a node later, and a 30-node upfront plan is speculation wearing a graph costume. -
Gate every node. For each node, pick the acceptance kind by the same failure-mode routing as the
graphskill's Step 0.5, and state the routing in the node's firstlogentry ("routed: harness — result is executable"):- result runs →
harness: write a rerunnable script to.claude/graph-state/harness/<node-id>.shnow (card 9 discipline: it must FAIL against the current repo — run it once to confirm; a gate that passes before the work exists is not a gate, fix it until it fails). - mechanical fact (file exists, build passes, string present, tests green) →
checkswith concrete commands. Run each once to confirm it currently fails (or note why a subset already passes). - genuinely normative →
human, with anotesaying why no machine gate exists. If you find yourself reaching forhumanmore than ~twice, the decomposition is too vague — re-split until gates are checkable.
- result runs →
-
Mark
wide: trueonly on discovery/audit-shaped nodes (find/sweep/audit over many files) where a/graphfan-out genuinely beats one context. Default false — the tick loop is cheap on purpose. -
Write the file (valid JSON, all invariants from goal-state.md), plus the harness scripts, and show the user:
- the frozen objectives,
- the node table (
id | job | deps | gate kind | wide), - the frontier (what
/graph-nextwill pick up first), - one line: "Tick it with
/graph-next <slug>— one gated node per tick; run it under/loopfor continuous progress."
-
Commit
.claude/graph-state/— not optional-for-sharing: the SHA-based drift check assumes the state and the code share a history, and/graph-nextcommits every gated tick. If the repo has no commits yet, this is the initial commit.
What this skill refuses
- Prose done-conditions ("auth works well") — every node gets a command or an
explicit
humangate. - Objectives smuggled in as nodes — if a node doesn't serve a frozen objective, it doesn't go in.
- Starting the work — compilation and execution are separate on purpose
(design first, run second is the
graphskill's oldest rule).