[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EKWNGDF4Z9PSJ1WWXA2Z8M":3,"skill-same:01M7EKWNGDF4Z9PSJ1WWXA2Z8M":78},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7EKWNGDF4Z9PSJ1WWXA2Z8M","graph-automation",null,"Run a task as a graph of bounded nodes and leave behind a rerunnable automation. graphify maps the source material, the task is split into nodes with one input, one output and one check each, deterministic steps run as code, model steps run as bounded subagents behind evidence gates, and graph.md, checks.md and progress.md make the run resumable, repeatable and schedulable. Use this whenever the user wants work done \"as a graph of nodes\", mentions bounded nodes, node graphs, gates, graph.md, checks.md, progress.md, an autoresearch-style run, a repeatable or rerunnable automation built from subagents, or a multi-step job with verification and a handoff another session can resume; also for \u002Fgraph-automation resume, rerun or status. Not for a single quick edit or a one-shot question.","crzyc0d3r\u002Fskill-hive","crzyc0d3r","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F15002510?v=4","01M7EKWKSPN6TWC5549XB05APG","Marc Sooter","01M7EKWKTBSMJ9M0V8D48VSSH6",1,"MIT","https:\u002F\u002Fgithub.com\u002Fcrzyc0d3r\u002Fskill-hive\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgraph-automation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: graph-automation\ndescription: Run a task as a graph of bounded nodes and leave behind a rerunnable automation. graphify maps the source material, the task is split into nodes with one input, one output and one check each, deterministic steps run as code, model steps run as bounded subagents behind evidence gates, and graph.md, checks.md and progress.md make the run resumable, repeatable and schedulable. Use this whenever the user wants work done \"as a graph of nodes\", mentions bounded nodes, node graphs, gates, graph.md, checks.md, progress.md, an autoresearch-style run, a repeatable or rerunnable automation built from subagents, or a multi-step job with verification and a handoff another session can resume; also for \u002Fgraph-automation resume, rerun or status. Not for a single quick edit or a one-shot question.\nargument-hint: '\"\u003Ctask>\" [--output P] [--sources P ...] [--checks \"text::cmd\" ...] [--scope G ...] [--limit N] [--slug s] [--auto] [--no-map] | resume \u003Cslug> | rerun \u003Cslug> [--sources P ...] | status \u003Cslug>'\n---\n\n# graph-automation\n\nInvocation: `$ARGUMENTS`\n\nYou are the lead that designs, runs and maintains one graph of bounded nodes. The governing prompt is\n`references\u002Fprompt.md`; read it first. This file is the runbook that executes it with two tools:\n\n- **graphify** maps the source material into a knowledge graph (communities = what gets read together, god nodes = shared inputs, edges = dependencies). That is the information layer 1 needs: \"split by what each node must read, not by folder\".\n- **graphctl** is the deterministic engine. Readiness, gates, attempt caps, evidence tables, completion and state all have one correct answer, so they are code, never a model call. It is one script; call it by its full path, from the project root, in every command:\n\n```bash\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py \u003Ccommand> \u003Cslug> …\n```\n\nType that path literally. Do not stash it in a shell variable: zsh does not word-split `$G`, and shell state does not survive between tool calls anyway. Below, \"graphctl\" in prose means that command. If this skill loaded from a different directory (another agent's skills folder, or the Skills Manager library at `~\u002F.skills-manager\u002Fskills\u002Fgraph-automation`), use that directory in place of `~\u002F.claude\u002Fskills\u002Fgraph-automation` in every command; the scripts resolve their own location, so nothing else changes.\n\nWhat a run leaves behind, in `automations\u002F\u003Cslug>\u002F`: `graph.md` (the reusable template: spec, edges, code nodes, decisions, learned rules), `checks.md` (node | requirement | verdict | evidence), `progress.md` (handoff), `out\u002F`, `code\u002F`, `runs\u002F\u003Crun>\u002F` (filled prompt, briefs, returns, gate logs, snapshots), plus the deliverable at its own path. That bundle is the automation: any session can `resume` or `rerun` it.\n\n| prompt layer | what you do | with |\n|---|---|---|\n| inputs | fill task, output, checks, sources, scope, limit | Step 0 |\n| 1 split | map with graphify, write the spec, pause for approval | Steps 1–2, `graph_context.py`, graphctl `validate` \u002F `approve` |\n| 2 nodes | one subagent per model node, given only its brief | Step 3, graphctl `dispatch`, Agent tool |\n| 3 code nodes | deterministic steps as `kind: code` | graphctl `run-code` |\n| 4 permissions | scope globs enforced on every `writes`; snapshots before risky merges | graphctl `validate`, `risky: true` |\n| 5 gates | cmd first, node report second, verifier last; rows in checks.md | graphctl `gate` |\n| 6 return paths | correction edge (3 attempts), learning edge | graphctl `dispatch` again, graphctl `learn` |\n| 7 completion | checklist with observable evidence | graphctl `baseline` \u002F `accept` \u002F `complete` |\n| handoff | progress.md after every wave | graphctl `progress` |\n\n## Modes\n\n- **New task** (default): Steps 0 to 4.\n- **`resume \u003Cslug>`**: read `graph.md` and `progress.md` first, then graphctl `status`, and continue at Step 3 from the recorded next action. Passed nodes are never re-run.\n- **`rerun \u003Cslug> [--sources …] [--limit N]`**: graphctl `rerun` archives the finished run and resets the nodes on the same template. Refresh the map (Step 1) and go to Step 3. An approved template whose nodes did not change needs no new approval.\n- **`status \u003Cslug>`**: graphctl `status` plus the Open issues and Next action from progress.md. Stop there.\n- **`--auto`**: no pauses and no approval table. Approve a new graph yourself, record `auto-approved by --auto` with graphctl `decide`, and say so in the final message. Reruns of an approved template never pause anyway. Use this for scheduled or headless runs. Without `--auto`, the approval pause in Step 2 is mandatory.\n\n## Step 0 — Fill the inputs\n\nEvery field of the governing prompt's `\u003Cinputs>` must be filled before anything runs.\n\n| field | source | default when the user gave nothing |\n|---|---|---|\n| task | the invocation text | ask |\n| output | `--output` | `automations\u002F\u003Cslug>\u002Fout\u002Fresult.md`, and say so |\n| checks | `--checks`; `text::cmd` makes one deterministic | \"deliverable exists and is non-empty\" plus one check per requirement the task states |\n| sources | `--sources` | the project root |\n| scope | `--scope` | the output path plus `automations\u002F\u003Cslug>\u002F**` |\n| limit | `--limit` | 3 × the number of model nodes, once the split exists |\n| slug | `--slug` | kebab-case from the task, short |\n\nThe limit caps model-node dispatches for the whole run (code nodes are free); the per-node cap of 3 attempts is fixed and separate. The default lets every model node use its full correction budget.\n\nAsk one focused question only if a missing detail changes the outcome (which file is the deliverable, which of two codebases). Otherwise choose the default and record it with graphctl `decide` once the bundle exists. Under `--auto`, never ask.\n\nAlso read the project's own instructions (CLAUDE.md) and look at the current state of the deliverable path before editing anything: the lead inspects current work first.\n\n## Step 1 — Map the sources with graphify\n\nThe map replaces reading the whole corpus. Communities become candidate nodes, god nodes become shared inputs that one node owns and others read, cross-community edges become candidate task edges, and `graphify explain` \u002F `affected` give each subagent bounded context later. graphify writes its map to `\u003Cscan root>\u002Fgraphify-out\u002F`; call that directory `MAP` and pass it explicitly to every graphify memory command, because `reflect` and `save-result` otherwise use `.\u002Fgraphify-out\u002F` relative to the current directory and the learning edge silently misses.\n\n```bash\nls \u003Csources>\u002Fgraphify-out\u002Fgraph.json graphify-out\u002Fgraph.json 2>\u002Fdev\u002Fnull || true     # reuse an existing map (prints whichever exists)\ngraphify extract \u003Csources> --code-only                                         # code-only corpus: deterministic, no API key, seconds\n# docs, papers or images in the corpus: invoke the graphify skill (\u002Fgraphify \u003Csources>); it extracts them with subagents and costs tokens, so say so.\n# With GEMINI_API_KEY or GOOGLE_API_KEY set, `graphify extract \u003Csources>` does it headlessly instead.\ngraphify reflect --if-stale --graph MAP\u002Fgraph.json --memory-dir MAP\u002Fmemory --out MAP\u002Freflections\u002FLESSONS.md && cat MAP\u002Freflections\u002FLESSONS.md\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraph_context.py summary --graph MAP\u002Fgraph.json\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraph_context.py focus --graph MAP\u002Fgraph.json --query \"\u003Cthe task>\"\n```\n\n`summary` lists communities with their files, god nodes and cross-community edges. `focus` finds the communities the task touches and prints a draft split with candidates already merged where their files overlap, plus the shared files one node must own. graphify matches identifiers, not task words: when `focus` finds no vocabulary, take symbol names from `summary` and use `graphify explain \"\u003Csymbol>\" --graph MAP\u002Fgraph.json` or `graphify affected \"\u003Csymbol>\" --graph MAP\u002Fgraph.json`, or split from the per-community file lists. `GRAPH_REPORT.md` exists only after the full graphify skill or `graphify cluster-only \u003Csources> --no-viz --no-label`; neither is required.\n\nIf `graphify extract` refreshes an existing map it refuses to shrink it; pass `--force` only after confirming files were really deleted. `--no-map` skips this step; then split from the file list and say in the final message that the split was not graph-informed. If graphify is missing and installing it is not possible, that is a named blocker, not a reason to stop: preserve the nodes that can still be completed.\n\n## Step 2 — Split into graph.md and pause for approval\n\nWrite the nodes before any work starts. Read `references\u002Fgraph-spec.md` for the exact fields. A good node:\n\n- has one `scope` sentence a stranger could execute, one `writes` path, one `check`;\n- reads what one community reads; two candidates whose reads overlap heavily become one node (fewer nodes when results are comparable);\n- is `kind: code` when the step has exactly one correct answer (inventory, merge, sort, dedupe, count, compare, diff, format); a model call is for judgment only;\n- gets an edge only when it consumes another node's output;\n- gets `check.verify` only when correctness is a judgment that no command can test. A verifier is a second subagent and costs as much as the node did; for small nodes a `check.cmd` is enough. Likewise add `context` commands only when the node must understand code it does not receive as input;\n- is `risky: true` when it writes a real project file (usually the final code merge node).\n\nIn this order:\n\n```bash\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py init \u003Cslug> --task '…' --output P --checks 'text::cmd' 'text' --sources … --scope … --limit N --graph-json MAP\u002Fgraph.json --lessons MAP\u002Freflections\u002FLESSONS.md\n# now the bundle exists: write the code-node scripts and check scripts under automations\u002F\u003Cslug>\u002Fcode\u002F\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py spec \u003Cslug> --from \u002Fpath\u002Fto\u002Fspec.json       # {\"nodes\": [...]} is enough; \"inputs\" there is merged field by field\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py validate \u003Cslug>                             # fix every error; its warnings are usually right too\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py render \u003Cslug>\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py prompt \u003Cslug>                               # writes runs\u002F\u003Crun>\u002Fprompt.md (the governing prompt with the inputs filled in) and prints its path\n```\n\nSingle-quote `--checks` and `--task` values so `$(…)` and `'^## '` are stored, not expanded; or put `inputs.checks` in the spec file instead. `init` is safe on an existing directory and refuses to overwrite an existing spec without `--force`.\n\nThen **pause** (not under `--auto`): show the user the Nodes table and Edges from `graph.md` (not the raw JSON), name the code nodes and the checks, state the limit, and ask for approval in one message. Do not dispatch anything until they answer. Edits they ask for go into the spec, then `validate` again. When they approve, or under `--auto`:\n\n```bash\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py approve \u003Cslug>\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py baseline \u003Cslug> --note \"\u003Canything measured before the run, e.g. current test count>\"\n```\n\nThe baseline records which acceptance checks already pass before any node runs, so the run measures a change rather than asserting one.\n\nCheck the permission mode before dispatching (`grep -h -A3 '\"permissions\"' .claude\u002Fsettings.json ~\u002F.claude\u002Fsettings.json 2>\u002Fdev\u002Fnull || true`, or the mode shown in your session context): subagents inherit it, and a mode that blocks writes blocks every node. Scope is enforced by `validate` (every `writes` must match `inputs.scope`) and by each brief; if the user wants the sandbox to enforce it too, that is a settings change for the `update-config` skill, not something to do silently.\n\n## Step 3 — Execute the loop\n\nRead `references\u002Fexecution.md` once for the mechanics (Agent tool shape, return files, verifier agents, SendMessage for corrections, the optional Workflow runner, inline fallback). The loop, with `graphctl` standing for the full command:\n\n```bash\ngraphctl ready \u003Cslug>                                      # 1. next ready nodes (deps passed, attempts \u003C 3, limit not reached)\ngraphctl run-code \u003Cslug> \u003Ccode-node>                       # 2a. code nodes: runs, reports, gates; no subagent\ngraphctl dispatch \u003Cslug> \u003Cmodel-node>                      # 2b. model nodes: prints the brief; one Agent call per node, all in ONE message\ngraphctl report \u003Cslug> \u003Cnode> --json-file automations\u002F\u003Cslug>\u002Fruns\u002F\u003Crun>\u002Freturns\u002F\u003Cnode>.a\u003CN>.json --tokens \u003Csubagent_tokens from the Agent result>\ngraphctl gate \u003Cslug> \u003Cnode>                                # 4. deterministic check → node report → verifier; exit 0 pass \u002F 1 fail \u002F 2 unresolved\ngraphctl progress \u003Cslug>                                   # 5. after every wave\n```\n\n- Run everything `ready` lists together; independent nodes are parallel by construction. `dispatch` counts against the limit, so call it only when you are about to call the Agent.\n- A failed gate returns that unit only: `dispatch` again prints a brief with the Correction section (reason, evidence, \"fix this node only\"). Three failures block the node; keep running everything that does not depend on it.\n- Merge accepted outputs in code (a `kind: code` node), never by hand.\n- Record decisions that change the graph with graphctl `decide`; after a passed node proves a rule worth starting from next time, graphctl `learn … --node \u003Cid>`.\n- Never weaken a gate to obtain a pass. Fixing a wrong check is a decision plus a spec change plus re-approval.\n- Continue until `ready` is empty and nothing is running, a blocker stops the graph, or the limit holds the remaining model nodes.\n\n## Step 4 — Complete and deliver\n\n```bash\ngraphctl accept \u003Cslug> --run                                            # deterministic acceptance checks\ngraphctl accept \u003Cslug> --check N --verdict pass|fail --evidence \"…\"     # judged ones (N is 0-based, as `accept --run` prints them): point at the evidence you actually looked at\ngraphctl complete \u003Cslug>                                                # outputs open, gates ran against the saved versions, nothing ran outside the graph, limit respected\ngraphctl progress \u003Cslug> [--issue \"…\"]                                  # final handoff; --issue for anything unresolved, in words\n```\n\n`complete` exits 0 only for COMPLETE; PARTIAL prints the exact nodes left. Do not edit checks.md or state.json by hand to change a verdict.\n\nClose the learning edge with graphify when the map helped or misled: `graphify save-result --question \"…\" --answer \"…\" --type query --nodes \u003Cgraph node labels> --outcome useful|dead_end --memory-dir MAP\u002Fmemory` (the same MAP as Step 1, so the next `reflect` sees it), and refresh the map after the run changed code under the sources (`graphify update \u003Csources>`).\n\nThe final message to the user: the deliverable path; the bundle path; what was checked and passed; what remains unresolved or blocked, by node; whether the graph was auto-approved; measured usage only if `complete` printed recorded tokens (never inferred savings); and the one-line rerun command:\n\n```bash\n\u002Fgraph-automation rerun \u003Cslug> --auto\n```\n\nOffer, in one line, to put that command on a schedule with the `schedule` skill when the task is recurring.\n\n## Boundaries\n\n- Ask before publishing, sending or spending; nodes never do those, and every brief tells them so.\n- Two nodes never edit the same file (`validate` refuses it). Nodes write only inside `inputs.scope`.\n- Risky merges are snapshotted to `runs\u002F\u003Crun>\u002Fsnapshots\u002F` before each attempt; the gate log records the snapshot or why it was skipped.\n- Evidence stays visible: missing reports show as unresolved in checks.md, failed attempts stay in the table marked superseded.\n- Do not delete `automations\u002F\u003Cslug>\u002F` or a `graphify-out\u002F` directory on the user's behalf.\n\n## Reference files\n\n- `references\u002Fprompt.md` — the governing prompt (verbatim; graphctl `prompt` fills its placeholders)\n- `references\u002Fgraph-spec.md` — spec fields, gate semantics, statuses, bundle layout, graphctl cheat sheet\n- `references\u002Fexecution.md` — running nodes: Agent calls, return files, verifiers, correction edge, limits, fallbacks, Workflow runner\n- `scripts\u002Fgraphctl.py` — the engine (`--help` lists every command)\n- `scripts\u002Fgraph_context.py` — graphify map → split inputs (`summary`, `focus`, `files`)\n- `assets\u002Frun.js` — optional Workflow script that fans out one wave\n","# graph-automation\n\nInvocation: `$ARGUMENTS`\n\nYou are the lead that designs, runs and maintains one graph of bounded nodes. The governing prompt is\n`references\u002Fprompt.md`; read it first. This file is the runbook that executes it with two tools:\n\n- **graphify** maps the source material into a knowledge graph (communities = what gets read together, god nodes = shared inputs, edges = dependencies). That is the information layer 1 needs: \"split by what each node must read, not by folder\".\n- **graphctl** is the deterministic engine. Readiness, gates, attempt caps, evidence tables, completion and state all have one correct answer, so they are code, never a model call. It is one script; call it by its full path, from the project root, in every command:\n\n```bash\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py \u003Ccommand> \u003Cslug> …\n```\n\nType that path literally. Do not stash it in a shell variable: zsh does not word-split `$G`, and shell state does not survive between tool calls anyway. Below, \"graphctl\" in prose means that command. If this skill loaded from a different directory (another agent's skills folder, or the Skills Manager library at `~\u002F.skills-manager\u002Fskills\u002Fgraph-automation`), use that directory in place of `~\u002F.claude\u002Fskills\u002Fgraph-automation` in every command; the scripts resolve their own location, so nothing else changes.\n\nWhat a run leaves behind, in `automations\u002F\u003Cslug>\u002F`: `graph.md` (the reusable template: spec, edges, code nodes, decisions, learned rules), `checks.md` (node | requirement | verdict | evidence), `progress.md` (handoff), `out\u002F`, `code\u002F`, `runs\u002F\u003Crun>\u002F` (filled prompt, briefs, returns, gate logs, snapshots), plus the deliverable at its own path. That bundle is the automation: any session can `resume` or `rerun` it.\n\n| prompt layer | what you do | with |\n|---|---|---|\n| inputs | fill task, output, checks, sources, scope, limit | Step 0 |\n| 1 split | map with graphify, write the spec, pause for approval | Steps 1–2, `graph_context.py`, graphctl `validate` \u002F `approve` |\n| 2 nodes | one subagent per model node, given only its brief | Step 3, graphctl `dispatch`, Agent tool |\n| 3 code nodes | deterministic steps as `kind: code` | graphctl `run-code` |\n| 4 permissions | scope globs enforced on every `writes`; snapshots before risky merges | graphctl `validate`, `risky: true` |\n| 5 gates | cmd first, node report second, verifier last; rows in checks.md | graphctl `gate` |\n| 6 return paths | correction edge (3 attempts), learning edge | graphctl `dispatch` again, graphctl `learn` |\n| 7 completion | checklist with observable evidence | graphctl `baseline` \u002F `accept` \u002F `complete` |\n| handoff | progress.md after every wave | graphctl `progress` |\n\n## Modes\n\n- **New task** (default): Steps 0 to 4.\n- **`resume \u003Cslug>`**: read `graph.md` and `progress.md` first, then graphctl `status`, and continue at Step 3 from the recorded next action. Passed nodes are never re-run.\n- **`rerun \u003Cslug> [--sources …] [--limit N]`**: graphctl `rerun` archives the finished run and resets the nodes on the same template. Refresh the map (Step 1) and go to Step 3. An approved template whose nodes did not change needs no new approval.\n- **`status \u003Cslug>`**: graphctl `status` plus the Open issues and Next action from progress.md. Stop there.\n- **`--auto`**: no pauses and no approval table. Approve a new graph yourself, record `auto-approved by --auto` with graphctl `decide`, and say so in the final message. Reruns of an approved template never pause anyway. Use this for scheduled or headless runs. Without `--auto`, the approval pause in Step 2 is mandatory.\n\n## Step 0 — Fill the inputs\n\nEvery field of the governing prompt's `\u003Cinputs>` must be filled before anything runs.\n\n| field | source | default when the user gave nothing |\n|---|---|---|\n| task | the invocation text | ask |\n| output | `--output` | `automations\u002F\u003Cslug>\u002Fout\u002Fresult.md`, and say so |\n| checks | `--checks`; `text::cmd` makes one deterministic | \"deliverable exists and is non-empty\" plus one check per requirement the task states |\n| sources | `--sources` | the project root |\n| scope | `--scope` | the output path plus `automations\u002F\u003Cslug>\u002F**` |\n| limit | `--limit` | 3 × the number of model nodes, once the split exists |\n| slug | `--slug` | kebab-case from the task, short |\n\nThe limit caps model-node dispatches for the whole run (code nodes are free); the per-node cap of 3 attempts is fixed and separate. The default lets every model node use its full correction budget.\n\nAsk one focused question only if a missing detail changes the outcome (which file is the deliverable, which of two codebases). Otherwise choose the default and record it with graphctl `decide` once the bundle exists. Under `--auto`, never ask.\n\nAlso read the project's own instructions (CLAUDE.md) and look at the current state of the deliverable path before editing anything: the lead inspects current work first.\n\n## Step 1 — Map the sources with graphify\n\nThe map replaces reading the whole corpus. Communities become candidate nodes, god nodes become shared inputs that one node owns and others read, cross-community edges become candidate task edges, and `graphify explain` \u002F `affected` give each subagent bounded context later. graphify writes its map to `\u003Cscan root>\u002Fgraphify-out\u002F`; call that directory `MAP` and pass it explicitly to every graphify memory command, because `reflect` and `save-result` otherwise use `.\u002Fgraphify-out\u002F` relative to the current directory and the learning edge silently misses.\n\n```bash\nls \u003Csources>\u002Fgraphify-out\u002Fgraph.json graphify-out\u002Fgraph.json 2>\u002Fdev\u002Fnull || true     # reuse an existing map (prints whichever exists)\ngraphify extract \u003Csources> --code-only                                         # code-only corpus: deterministic, no API key, seconds\n# docs, papers or images in the corpus: invoke the graphify skill (\u002Fgraphify \u003Csources>); it extracts them with subagents and costs tokens, so say so.\n# With GEMINI_API_KEY or GOOGLE_API_KEY set, `graphify extract \u003Csources>` does it headlessly instead.\ngraphify reflect --if-stale --graph MAP\u002Fgraph.json --memory-dir MAP\u002Fmemory --out MAP\u002Freflections\u002FLESSONS.md && cat MAP\u002Freflections\u002FLESSONS.md\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraph_context.py summary --graph MAP\u002Fgraph.json\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraph_context.py focus --graph MAP\u002Fgraph.json --query \"\u003Cthe task>\"\n```\n\n`summary` lists communities with their files, god nodes and cross-community edges. `focus` finds the communities the task touches and prints a draft split with candidates already merged where their files overlap, plus the shared files one node must own. graphify matches identifiers, not task words: when `focus` finds no vocabulary, take symbol names from `summary` and use `graphify explain \"\u003Csymbol>\" --graph MAP\u002Fgraph.json` or `graphify affected \"\u003Csymbol>\" --graph MAP\u002Fgraph.json`, or split from the per-community file lists. `GRAPH_REPORT.md` exists only after the full graphify skill or `graphify cluster-only \u003Csources> --no-viz --no-label`; neither is required.\n\nIf `graphify extract` refreshes an existing map it refuses to shrink it; pass `--force` only after confirming files were really deleted. `--no-map` skips this step; then split from the file list and say in the final message that the split was not graph-informed. If graphify is missing and installing it is not possible, that is a named blocker, not a reason to stop: preserve the nodes that can still be completed.\n\n## Step 2 — Split into graph.md and pause for approval\n\nWrite the nodes before any work starts. Read `references\u002Fgraph-spec.md` for the exact fields. A good node:\n\n- has one `scope` sentence a stranger could execute, one `writes` path, one `check`;\n- reads what one community reads; two candidates whose reads overlap heavily become one node (fewer nodes when results are comparable);\n- is `kind: code` when the step has exactly one correct answer (inventory, merge, sort, dedupe, count, compare, diff, format); a model call is for judgment only;\n- gets an edge only when it consumes another node's output;\n- gets `check.verify` only when correctness is a judgment that no command can test. A verifier is a second subagent and costs as much as the node did; for small nodes a `check.cmd` is enough. Likewise add `context` commands only when the node must understand code it does not receive as input;\n- is `risky: true` when it writes a real project file (usually the final code merge node).\n\nIn this order:\n\n```bash\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py init \u003Cslug> --task '…' --output P --checks 'text::cmd' 'text' --sources … --scope … --limit N --graph-json MAP\u002Fgraph.json --lessons MAP\u002Freflections\u002FLESSONS.md\n# now the bundle exists: write the code-node scripts and check scripts under automations\u002F\u003Cslug>\u002Fcode\u002F\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py spec \u003Cslug> --from \u002Fpath\u002Fto\u002Fspec.json       # {\"nodes\": [...]} is enough; \"inputs\" there is merged field by field\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py validate \u003Cslug>                             # fix every error; its warnings are usually right too\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py render \u003Cslug>\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py prompt \u003Cslug>                               # writes runs\u002F\u003Crun>\u002Fprompt.md (the governing prompt with the inputs filled in) and prints its path\n```\n\nSingle-quote `--checks` and `--task` values so `$(…)` and `'^## '` are stored, not expanded; or put `inputs.checks` in the spec file instead. `init` is safe on an existing directory and refuses to overwrite an existing spec without `--force`.\n\nThen **pause** (not under `--auto`): show the user the Nodes table and Edges from `graph.md` (not the raw JSON), name the code nodes and the checks, state the limit, and ask for approval in one message. Do not dispatch anything until they answer. Edits they ask for go into the spec, then `validate` again. When they approve, or under `--auto`:\n\n```bash\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py approve \u003Cslug>\npython3 ~\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py baseline \u003Cslug> --note \"\u003Canything measured before the run, e.g. current test count>\"\n```\n\nThe baseline records which acceptance checks already pass before any node runs, so the run measures a change rather than asserting one.\n\nCheck the permission mode before dispatching (`grep -h -A3 '\"permissions\"' .claude\u002Fsettings.json ~\u002F.claude\u002Fsettings.json 2>\u002Fdev\u002Fnull || true`, or the mode shown in your session context): subagents inherit it, and a mode that blocks writes blocks every node. Scope is enforced by `validate` (every `writes` must match `inputs.scope`) and by each brief; if the user wants the sandbox to enforce it too, that is a settings change for the `update-config` skill, not something to do silently.\n\n## Step 3 — Execute the loop\n\nRead `references\u002Fexecution.md` once for the mechanics (Agent tool shape, return files, verifier agents, SendMessage for corrections, the optional Workflow runner, inline fallback). The loop, with `graphctl` standing for the full command:\n\n```bash\ngraphctl ready \u003Cslug>                                      # 1. next ready nodes (deps passed, attempts \u003C 3, limit not reached)\ngraphctl run-code \u003Cslug> \u003Ccode-node>                       # 2a. code nodes: runs, reports, gates; no subagent\ngraphctl dispatch \u003Cslug> \u003Cmodel-node>                      # 2b. model nodes: prints the brief; one Agent call per node, all in ONE message\ngraphctl report \u003Cslug> \u003Cnode> --json-file automations\u002F\u003Cslug>\u002Fruns\u002F\u003Crun>\u002Freturns\u002F\u003Cnode>.a\u003CN>.json --tokens \u003Csubagent_tokens from the Agent result>\ngraphctl gate \u003Cslug> \u003Cnode>                                # 4. deterministic check → node report → verifier; exit 0 pass \u002F 1 fail \u002F 2 unresolved\ngraphctl progress \u003Cslug>                                   # 5. after every wave\n```\n\n- Run everything `ready` lists together; independent nodes are parallel by construction. `dispatch` counts against the limit, so call it only when you are about to call the Agent.\n- A failed gate returns that unit only: `dispatch` again prints a brief with the Correction section (reason, evidence, \"fix this node only\"). Three failures block the node; keep running everything that does not depend on it.\n- Merge accepted outputs in code (a `kind: code` node), never by hand.\n- Record decisions that change the graph with graphctl `decide`; after a passed node proves a rule worth starting from next time, graphctl `learn … --node \u003Cid>`.\n- Never weaken a gate to obtain a pass. Fixing a wrong check is a decision plus a spec change plus re-approval.\n- Continue until `ready` is empty and nothing is running, a blocker stops the graph, or the limit holds the remaining model nodes.\n\n## Step 4 — Complete and deliver\n\n```bash\ngraphctl accept \u003Cslug> --run                                            # deterministic acceptance checks\ngraphctl accept \u003Cslug> --check N --verdict pass|fail --evidence \"…\"     # judged ones (N is 0-based, as `accept --run` prints them): point at the evidence you actually looked at\ngraphctl complete \u003Cslug>                                                # outputs open, gates ran against the saved versions, nothing ran outside the graph, limit respected\ngraphctl progress \u003Cslug> [--issue \"…\"]                                  # final handoff; --issue for anything unresolved, in words\n```\n\n`complete` exits 0 only for COMPLETE; PARTIAL prints the exact nodes left. Do not edit checks.md or state.json by hand to change a verdict.\n\nClose the learning edge with graphify when the map helped or misled: `graphify save-result --question \"…\" --answer \"…\" --type query --nodes \u003Cgraph node labels> --outcome useful|dead_end --memory-dir MAP\u002Fmemory` (the same MAP as Step 1, so the next `reflect` sees it), and refresh the map after the run changed code under the sources (`graphify update \u003Csources>`).\n\nThe final message to the user: the deliverable path; the bundle path; what was checked and passed; what remains unresolved or blocked, by node; whether the graph was auto-approved; measured usage only if `complete` printed recorded tokens (never inferred savings); and the one-line rerun command:\n\n```bash\n\u002Fgraph-automation rerun \u003Cslug> --auto\n```\n\nOffer, in one line, to put that command on a schedule with the `schedule` skill when the task is recurring.\n\n## Boundaries\n\n- Ask before publishing, sending or spending; nodes never do those, and every brief tells them so.\n- Two nodes never edit the same file (`validate` refuses it). Nodes write only inside `inputs.scope`.\n- Risky merges are snapshotted to `runs\u002F\u003Crun>\u002Fsnapshots\u002F` before each attempt; the gate log records the snapshot or why it was skipped.\n- Evidence stays visible: missing reports show as unresolved in checks.md, failed attempts stay in the table marked superseded.\n- Do not delete `automations\u002F\u003Cslug>\u002F` or a `graphify-out\u002F` directory on the user's behalf.\n\n## Reference files\n\n- `references\u002Fprompt.md` — the governing prompt (verbatim; graphctl `prompt` fills its placeholders)\n- `references\u002Fgraph-spec.md` — spec fields, gate semantics, statuses, bundle layout, graphctl cheat sheet\n- `references\u002Fexecution.md` — running nodes: Agent calls, return files, verifiers, correction edge, limits, fallbacks, Workflow runner\n- `scripts\u002Fgraphctl.py` — the engine (`--help` lists every command)\n- `scripts\u002Fgraph_context.py` — graphify map → split inputs (`summary`, `focus`, `files`)\n- `assets\u002Frun.js` — optional Workflow script that fans out one wave\n",{"name":5,"description":7,"argument-hint":24},"\"\u003Ctask>\" [--output P] [--sources P ...] [--checks \"text::cmd\" ...] [--scope G ...] [--limit N] [--slug s] [--auto] [--no-map] | resume \u003Cslug> | rerun \u003Cslug> [--sources P ...] | status \u003Cslug>","main","314f700f90cd0d0d22e1f3c7e4d3b82d5fbde8ca",".claude\u002Fskills\u002Fgraph-automation",0,"https:\u002F\u002Fgithub.com\u002Fcrzyc0d3r\u002Fskill-hive","https:\u002F\u002Fgithub.com\u002Fcrzyc0d3r","2026-11-07 00:21:13",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add crzyc0d3r\u002Fskill-hive --skill graph-automation",{"tool":38,"command":39},"bunx","bunx skills add crzyc0d3r\u002Fskill-hive --skill graph-automation",{"tool":41,"command":42},"pnpm","pnpm dlx skills add crzyc0d3r\u002Fskill-hive --skill graph-automation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcrzyc0d3r\u002Fskill-hive\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgraph-automation\u002FSKILL.md",true,[46,52,58,62,66,70,74],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"assets\u002Frun.js","SCRIPT","脚本",1634,"https:\u002F\u002Fgithub.com\u002Fcrzyc0d3r\u002Fskill-hive\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fassets\u002Frun.js",{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"evals\u002Fevals.json","REFERENCE","参考文档",1760,"https:\u002F\u002Fgithub.com\u002Fcrzyc0d3r\u002Fskill-hive\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fevals\u002Fevals.json",{"path":59,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fexecution.md",5315,"https:\u002F\u002Fgithub.com\u002Fcrzyc0d3r\u002Fskill-hive\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgraph-automation\u002Freferences\u002Fexecution.md",{"path":63,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fgraph-spec.md",7926,"https:\u002F\u002Fgithub.com\u002Fcrzyc0d3r\u002Fskill-hive\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgraph-automation\u002Freferences\u002Fgraph-spec.md",{"path":67,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fprompt.md",4870,"https:\u002F\u002Fgithub.com\u002Fcrzyc0d3r\u002Fskill-hive\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgraph-automation\u002Freferences\u002Fprompt.md",{"path":71,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":72,"sourceHtmlUrl":73},"scripts\u002Fgraph_context.py",13887,"https:\u002F\u002Fgithub.com\u002Fcrzyc0d3r\u002Fskill-hive\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraph_context.py",{"path":75,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":76,"sourceHtmlUrl":77},"scripts\u002Fgraphctl.py",67746,"https:\u002F\u002Fgithub.com\u002Fcrzyc0d3r\u002Fskill-hive\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgraph-automation\u002Fscripts\u002Fgraphctl.py",[]]