MoirAI graph design
Use this skill after the domain inputs, outputs, and invariants are explicit.
- Define the root graph boundary and choose stable, bundle-unique graph ids.
- Split work by responsibility: deterministic action chains use
LOGIC.md, executor judgment usesAGENT.md, and reusable graph calls useSUBGRAPH.md. - Declare every phase and dependency in
graph.yaml; treat explicit call edges as topology truth. Keep phase identity in two places only: thephases/<phase_id>/directory name and itsgraph.yaml.phases[].id. Do not restate the id inside the phase document. - Trace required phase inputs to root inputs, upstream outputs, bindings, or iterator injection.
- Place reusable graphs directly under
graphs/<graph_id>/; never encode parentage through nested folders. - Add batch or loop iteration only with explicit item, range, concurrency or accumulation semantics.
- Compile the complete bundle and address the full diagnostic set before execution.
Build incrementally rather than all at once: compile the skeleton root graph before adding phases, then add phases and their type files one at a time, compiling at each step. A complete skill written before its first compile hands you every defect simultaneously and tells you nothing about which change caused which.
Do not combine parsing, judgment, and generation into one phase; do not assign an Agent to work that deterministic code can do; and do not accumulate unused fields in a schema for a future possibility that has not been requested.
Use skill anatomy, I/O dataflow, logic actions, Agent nodes, subgraphs, and iteration as needed; working discipline governs evidence and reporting.
Return the graph inventory, phase table, edges, field-level dataflow, subgraph and iterate decisions, and unresolved constraints. Do not add a graph.yaml to MoirAI integration assets; topology belongs only to the user's business gSkill.