Graph engineering
Design, audit, and evolve Codex-native project agent graphs. Use when a user wants to turn a project workflow into governed agent graphs, define a Supervisor and sub-agent collaboration model, add reviewer loops or human gates, create `.codex/graphs` contracts, or improve an existing project graph from execution evidence. Do not use to execute the business workflow itself.From its SKILL.md
npx -y skills add luxiaolei/graph-engineering --skill graph-engineeringAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 15 days oldThe repository was created 15 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 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
6.5 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
Graph Engineering
Design project-local graph contracts that a Codex Supervisor can follow. Do not build a graph runtime and do not execute the target business workflow.
Select the mode
- Use create to establish the first graph or add a new graph to an existing registry.
- Use audit for an existing
.codex/graphscontract. - Use evolve when the user supplies execution history, failures, or corrections and wants a governed improvement.
Read the discovery protocol before create or evolve work. Read the graph contract before writing graph files. Read the Codex mapping when choosing dynamic versus stable agents. Read governance for evolve work or any external side effect. Read multi-repo guidance whenever more than one repository is in scope.
Create workflow
- Explore the target project read-only first: applicable
AGENTS.md, README, architecture and product documents, entry points, tests, Git state, existing.codexfiles, and relevant history. Derive facts instead of asking for them. - Maintain a
Graph Intent Briefin the conversation. Resolve project goal, intended users, success criteria, graph inventory, triggers, non-goals, artifacts, state, actors, tools, permissions, context boundaries, evaluation, failure routes, termination, human gates, repository boundaries, actual model availability, cost/latency preferences, minimum capability, and Max/Ultra policy. - Ask only one to three decision-changing questions per turn. Do not write project files until all required facts are confirmed, explicitly defaulted, or marked as a blocker.
- Present the complete Intent Brief and exact proposed paths. Obtain explicit user approval before creating or changing graph files.
- Copy and tailor the templates in
assets/templates/. For a multi-repository graph, createTOPOLOGY.mdonly at the named governance root and placeGRAPH-ENGINEERING-BOUNDARY.mdin each authorized member repository; do not copy the graph registry or contracts to members. For an existing graph registry, merge rather than replace: preserve every approved graph document, registry row, proposal, Agent TOML, and non-markedAGENTS.mdcontent; add only the new graph, its one registry row, and any required project-local agent. On a graph ID/path, registry row, proposal path, or Agent-name collision, stop and ask the user whether to evolve the existing artifact or choose a new identifier—never overwrite it. After approval, usescripts/integrate_supervisor_guidance.py --project <target-project>to add or refresh the markedAGENTS.mdsupervisor block without overwriting existing guidance. - Run
scripts/validate_project_graph.py --project <target-project>and fix structural failures. For a multi-repository graph, supply every declared member as--member-root <repository-id>=<path>; validation is incomplete without them. Report validation gaps honestly.
Graph rules
- A project can have multiple graphs. Register them in
.codex/graphs/INDEX.md. - Treat a node as a bounded execution unit, not automatically as one sub-agent. Use node types
agent,composite loop,tool,human gate, orsubgraph. - Model an independent review loop as a composite node: the Supervisor delegates implementation and review separately, routes only the necessary feedback back to the implementer, and enforces a finite retry or escalation policy.
- Define every edge with a guard, minimal context payload, destination, and a budget or escalation rule. Cycles and local repair routes are valid only when they can terminate.
- Keep agents project-local. Generate
.codex/agents/*.tomlonly for roles that need pinned model/reasoning, permissions, tools, or persistent instructions; otherwise let the Supervisor spawn a bounded dynamic agent. - Require a human gate before high-risk external side effects. A passing model score alone is never sufficient.
- For every delegated role, define adaptive execution routing: minimum/default capability tier, reasoning floor, difficulty signals, authority, and fallback. Discover the active spawn surface's available models before delegating; never infer Luna, Terra, or Sol availability from another surface.
- Generate stable project Agent TOML for instructions or configuration that must persist. Omit model and reasoning pins when the role needs adaptive routing; add both only with explicit user approval and active-surface confirmation.
Audit workflow
- Inspect graph documents and related project guidance without changing them.
- Run the validator.
- Check that each graph still matches the project, has bounded cycles, minimizes context, distinguishes durable agents from dynamic roles, and has effective evaluation and human gates.
- Return evidence-backed findings and a minimal repair proposal. Do not edit unless the user asks.
Evolve workflow
- Classify the evidence as a memory, skill, agent, or graph change. Prefer the least invasive layer that fixes the measured problem.
- Create a proposal from
assets/templates/evolution-proposal.md; include evidence, expected benefit, risk, validation, rollback, and a concrete diff plan. - Do not alter graph, agent, or skill files before the user explicitly approves the proposal.
- After approval, make the smallest coherent change, validate it, and leave Git history reviewable. Do not commit or push without explicit authorization.
Resources
references/discovery.md— interview and confirmation gate.references/graph-contract.md— canonicalgraph-engineering/v1document format.references/codex-runtime.md— Supervisor, dynamic sub-agent, and custom-agent mapping.references/multi-repo.md— control-plane and repository boundary rules.references/evolution-governance.md— evidence and approval requirements.assets/templates/— copyable project artifacts.scripts/validate_project_graph.py— deterministic structural validation.scripts/integrate_supervisor_guidance.py— idempotentAGENTS.mdSupervisor integration after approval.
What ships with it: 29 files
180.6 KB alongside SKILL.md, 3 of them executable
agents/
- openai.yaml206 B
assets/
- templates/AGENTS.graph-engineering.md992 B
- templates/evolution-proposal.md1.0 KB
- templates/graph-authority-critical.md10.9 KB
- templates/GRAPH-ENGINEERING-BOUNDARY.md320 B
- templates/graph.md2.9 KB
- templates/graph-reviewed-batch.md3.8 KB
- templates/INDEX.md2.1 KB
- templates/lifecycle-witness.json2.2 KB
- templates/managed-supervisor-prompt.md3.6 KB
- templates/stable-agent.toml631 B
- templates/task-admission-pack.yaml1.5 KB
- templates/TOPOLOGY.md502 B
- templates/witness-blocked.json153 B
- templates/witness-final-rereview.json161 B
- templates/witness-initial-review.json161 B
- templates/witness-peer-root-portability.json168 B
- templates/witness-repair.json153 B
- templates/witness-review-materialization.json173 B
- templates/witness-success.json153 B
- templates/witness-terminal-seal.json158 B
references/
- codex-runtime.md8.0 KB
- discovery.md3.0 KB
- evolution-governance.md2.3 KB
- graph-contract.md13.8 KB
- multi-repo.md1.7 KB
scripts/
- generate_managed_supervisor_prompt.pyruns4.7 KB
- integrate_supervisor_guidance.pyruns1.8 KB
- validate_project_graph.pyruns113.4 KB