graph

GitHub

用于执行确定性编排图的运行时,支持声明式DAG流水线、崩溃恢复及审计。适用于多步骤依赖任务、需中断后续跑的场景。

skills/graph/SKILL.md Yeachan-Heo/oh-my-claudecode

Trigger Scenarios

需要运行包含明确依赖关系的多步骤流水线 任务必须能从中断或崩溃中恢复并继续执行 需要可审计的执行记录

Install

npx skills add Yeachan-Heo/oh-my-claudecode --skill graph -g -y
More Options

Use without installing

npx skills use Yeachan-Heo/oh-my-claudecode@graph

指定 Agent (Claude Code)

npx skills add Yeachan-Heo/oh-my-claudecode --skill graph -a claude-code -g -y

安装 repo 全部 skill

npx skills add Yeachan-Heo/oh-my-claudecode --all -g -y

预览 repo 内 skill

npx skills add Yeachan-Heo/oh-my-claudecode --list

SKILL.md

Frontmatter
{
    "name": "graph",
    "level": 4,
    "aliases": [],
    "description": "Deterministic orchestration graph runtime - declarative DAG pipelines with journal-based crash recovery",
    "argument-hint": "<descriptor.json | describe the pipeline> [--runs-root <dir>]"
}

Graph Skill

Run a deterministic orchestration graph from a declarative JSON descriptor. The runtime consumes the sealed-descriptor and pure-scheduler contracts in src/graph/* and executes through an independent OS process (omc graph run), so crash recovery (kill mid-run, rerun, resume from journal) works for real.

Usage

/oh-my-claudecode:graph <descriptor.json>
/oh-my-claudecode:graph "build then test then ask me before deploy"   (author the descriptor first)

The execution surface is always the CLI subcommand:

omc graph run <descriptor.json> [--runs-root <dir>]

Run it via the Bash tool for non-interactive graphs. Progress lines stream as [run], [node], [ok], [fail], [join], [done].

When To Use

  • Repeatable multi-step pipelines with explicit dependencies (DAG)
  • Work that must survive interruption: kill/restart resumes from journal
  • Auditable runs: OCC journal + projection snapshots under .omc/graph-runs/<run_id>/

When NOT to use: exploratory one-off work (use conversation or /team); anything needing adaptive re-planning mid-run (graphs are deterministic).

Workflow

  1. Descriptor given -> go to step 3.

  2. Pipeline described -> author the descriptor JSON (schema below), write it next to the project (suggest .omc/graphs/<name>.json) and show it to the user before running. run_id must be unique per logical pipeline; rerunning with the same run_id RESUMES, not restarts.

  3. Approval nodes: if the descriptor contains any "kind": "human-approval" node, do NOT run it through the Bash tool (stdin is not interactive there; EOF fails closed to denied). Tell the user to run interactively instead:

    ! omc graph run <file>
    

    The ! prefix runs it inside this session with live stdin so y/n works.

  4. Run and relay progress. Exit codes (normative): 0 succeeded | 1 terminal failed | 19 another writer owns this run (busy) 20 corrupt/tampered journal (fail-closed) | 21 descriptor drift on resume | 70 runtime crash (unmapped error)

  5. Resume: rerunning the same command after a crash replays committed transitions and continues. Completed nodes never re-execute.

Descriptor Schema (minimal)

{ "descriptor_version": 1, "run_id": "unique-pipeline-id", "revision_id": "rev-1", "goal": "one line", "nodes": [ { "id": "n1", "kind": "command", "title": "...", "timeout_ms": 60000, "max_attempts": 2, "effect_policy": { "policy": "side_effect_free" }, "command": "npm test" }, { "id": "a1", "kind": "agent", "title": "...", "timeout_ms": 300000, "max_attempts": 1, "effect_policy": { "policy": "side_effect_free" }, "instructions": "..." }, { "id": "gate", "kind": "human-approval", "title": "...", "prompt": "Proceed?" } ], "edges": [ { "id": "e1", "kind": "fixed", "from": "n1", "to": "a1" } ], "entry_node_ids": ["n1"], "concurrency_limit": 2, "terminal_verification_node_id": "a1" }

Edge kinds: fixed | conditional | fan_out/join pairs | back_edge (bounded retries via max_traversals). See src/graph/schema.ts for the authoritative Zod schema — and read the Capability Boundary section above for what built-in executors actually execute today.

Capability Boundary & Semantics (read before authoring)

  • Edge support: built-in command/agent executors cover fixed edges and fan_out/join pairs. conditional and back_edge routes are fully supported by the runtime and scheduler contracts but require a custom NodeExecutor that emits route on its results — built-in executors never produce routes, so graphs relying on them fail fast with route_required rather than guessing.
  • Crash-recovery guarantee is at-least-once for command nodes: a crash between an external side effect and its journal append re-executes that node on resume. For idempotent commands, the resolved key is available to the command as GRAPH_IDEMPOTENCY_KEY before it starts and is also recorded for downstream dedupe. Built-in executors reject reconcile; reconciliation requires a custom executor with an actual external reconciliation authority. Exactly-once for external side effects is out of scope for v1.
  • Command trust boundary: command nodes are arbitrary shell lines with process authority in the current working directory. Only run descriptors you wrote or trust. Command children receive an allowlisted environment (PATH, HOME/USERPROFILE, TEMP/TMP, locale/timezone, USER identity, GRAPH_*, and the optional idempotency key), not the host's full secrets. Commands are not filesystem/process sandboxed.
  • Agent authority boundary: built-in agent nodes are explicitly read-only. They run in the current working directory with no additional directories, only Read, Glob, and Grep, permissionMode: dontAsk, session persistence disabled, and a provider-specific environment allowlist. Agent timeouts abort and interrupt the SDK query. Use a custom executor for any agent that needs mutation or external effects. Treat .omc/graph-runs/<run_id>/descriptor.json as executable content.

Version History

  • e9e8fa3 Current 2026-09-03 09:14

Same Skill Collection

skills/ai-slop-cleaner/SKILL.md
skills/ask/SKILL.md
skills/autopilot/SKILL.md
skills/autoresearch/SKILL.md
skills/cancel/SKILL.md
skills/ccg/SKILL.md
skills/configure-notifications/SKILL.md
skills/debug/SKILL.md
skills/deep-dive/SKILL.md
skills/deep-interview/SKILL.md
skills/deepinit/SKILL.md
skills/drydock/SKILL.md
skills/execute/SKILL.md
skills/external-context/SKILL.md
skills/hud/SKILL.md
skills/launch/SKILL.md
skills/learner/SKILL.md
skills/local-build-reminder/SKILL.md
skills/mcp-setup/SKILL.md
skills/merge-readiness/SKILL.md
skills/minimal-code-discipline/SKILL.md
skills/omc-doctor/SKILL.md
skills/omc-reference/SKILL.md
skills/omc-setup/SKILL.md
skills/omc-teams/SKILL.md
skills/plan/SKILL.md
skills/project-session-manager/SKILL.md
skills/ralph/SKILL.md
skills/ralplan/SKILL.md
skills/release/SKILL.md
skills/remember/SKILL.md
skills/research/SKILL.md
skills/review/SKILL.md
skills/sciomc/SKILL.md
skills/self-improve/SKILL.md
skills/setup/SKILL.md
skills/skill/SKILL.md
skills/skillify/SKILL.md
skills/team/SKILL.md
skills/trace/SKILL.md
skills/ultragoal/SKILL.md
skills/ultraqa/SKILL.md
skills/ultrawork/SKILL.md
skills/verify/SKILL.md
skills/visual-verdict/SKILL.md
skills/wiki/SKILL.md
skills/writer-memory/SKILL.md

Metadata

Files
0
Version
e9e8fa3
Hash
c0ebe6dd
Indexed
2026-09-03 09:14

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-05 23:40
浙ICP备14020137号-1 $お客様$