run_lightflows
Skill14 starsChanged 27 days agoApache-2.0View on GitHub
Executes, inspects, and resumes existing Lightflow DAG workflows via CLI (`lightflow`, or the equivalent `python3 -m lightflow`). Use when asked to run, dry-run, check status, visualize, resolve an `operator_action` human-in-the-loop checkpoint (`EXIT_CODE=2`), or recover a failed Lightflow run without authoring a new workflow. Run `start` directly without pre-reading the manifest or `actions.py`.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- benchmark_lightflowSkill
- create_lightflowsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Read only
SKILL.md, then runstartdirectly: do not read lightflow.yaml, actions.py, or README.md first. - Very specific: line 17
Skip redundant
statuscalls & chain cleanup: when start or resume exits 0 (Lightflow completed successfully!), do not run status. - Very specific: line 49
2SUSPENDED at anoperator_action: follow the printed Instructions, then resume with a payload matching the Payload Schema.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Running & Resuming Lightflow Workflows (run_lightflows)
Authoring new workflows? Read
create_lightflowsinstead.
Fast-Path Rules
- Read only
SKILL.md, then runstartdirectly: do not readlightflow.yaml,actions.py, orREADME.mdfirst. The CLI compiles the manifest and prints any gate'sInstructions,Payload Schema, and the exactResume with:command.--lightflow=<path>accepts a manifest file or its directory. - Skip redundant
statuscalls & chain cleanup: whenstartorresumeexits0(Lightflow completed successfully!), do not runstatus. If asked to clean up afterwards, chainstart ... && cleanup ...(&&stops naturally at anEXIT_CODE=2gate).
1. Commands
python3 -m lightflow is equivalent to lightflow when the console script is
not on PATH. Runs remember their manifest, so status, resume, visualize,
and cleanup need only --log_id; if the manifest file moved, pass
--lightflow=<new path> once and it is re-recorded.
lightflow start --lightflow=<dir_or_manifest> --log_id=<run_id> [--payload='{...}' | --payload=@file.json]
lightflow start ... --dry_run # only when asked to preview; ends with a Summary: line and a 💡 --payload seed hint
# Resolve a paused gate once its Instructions are satisfied (APPROVE sets approved=true itself)
lightflow resume --log_id=<id> --stage=<gate_stage> --resolution=APPROVE --payload='{...}'
lightflow resume --log_id=<id> --stage=<gate_stage> --resolution=REJECT --comment="..." # runs rollback_action; dependents are blocked
# After fixing a failed stage: re-arms only failed stages, keeps completed work
lightflow resume --log_id=<id> [--payload='{...}']
lightflow status --log_id=<id> # one line per stage + any paused gate's Instructions, Schema, resume command; --verbose adds payload + stamp log
lightflow list # every saved run: log ID, lightflow, state, last activity, manifest
lightflow visualize --log_id=<id> --output=/tmp/viz.html
lightflow cleanup --log_id=<id> # deletes the run's state only; workflow artifacts on disk are untouched2. Exit Codes & Governance
0COMPLETED: done; report the stage outputs printed tostdout.2SUSPENDED at anoperator_action: follow the printedInstructions, thenresumewith a payload matching thePayload Schema.--resolution=APPROVEvalidates--payloadagainst the gate'sjson_schema; on a validation error the gate stays paused, so fix the payload and re-run (statusreprints the schema in a new conversation).1FAILED or REJECTED: the footer names the root cause and the exactresumecommand. Fix the cause, thenresume— neverstart --force, which discards completed stages and is only for rerunning a completed run from scratch. A rejected gate (🛑) is terminal unless deliberately re-opened:resume --stage=<gate> --resolution=APPROVE --payload='{...}'decides again in one call; a bareresume --stage=<gate>only re-opens it.statusexits like the run:0completed ·1failed, rejected, or interrupted ·2paused ·3no saved state ·4running in another process (wait; don'tresume) ·5waiting: apolling_policystage yielded before its condition was met, nothing is broken,resumeonce it holds. Use--verboseonly when you need the payload, stamp log, or Mermaid diagram.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

