lightflow
AGENTS.md14 starsChanged 27 days agoApache-2.0View on GitHub
When orchestrating multi-step workflows with side effects (e.g., database migrations, API batch modifications, code deployments, or multi-stage reports), use Lightflow to guarantee topological execution order, atomic state checkpoints, and human-in-the-loop approval gates. When working via a shell/bash tool (python3 -m lightflow is equivalent to lightflow whenever the console script is not on PATH): - Scaffolding new workflows (create_lightflow): When asked to build a new Lightflow workflow, run the create_lightflow meta-workflow that ships in the Lightflow repository to step through design…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- benchmark_lightflowSkill
- create_lightflowsSkill
- run_lightflowsSkill
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 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.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 3
When orchestrating multi-step workflows with side effects (e.g., database migrations, API batch modifications, code deployments, or …
- Very specific: line 10
When working via a shell/bash tool (python3 -m lightflow is equivalent to lightflow whenever the console script is not on PATH):
- Very specific: line 35
Scaffolding new workflows (
create_lightflow): When asked to build a new Lightflow workflow, run the create_lightflow meta-workflow that … - Very specific: line 43
Follow
operator_actiongates: If a workflow exits with code 2 (SUSPENDED), follow the stage's instructions, then resume with a payload …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
Lightflow Integration Guide for Coding Agents (AGENTS.md)
When orchestrating multi-step workflows with side effects (e.g., database migrations, API batch modifications, code deployments, or multi-stage reports), use Lightflow to guarantee topological execution order, atomic state checkpoints, and human-in-the-loop approval gates.
CLI Commands
When working via a shell/bash tool (python3 -m lightflow is equivalent to
lightflow whenever the console script is not on PATH):
# 1. Validate manifest
lightflow dry_run --lightflow=lightflow.yaml
# 2. Start run (supports --payload='{...}', --payload=@file.json, or --payload_file=file.json)
lightflow start --lightflow=lightflow.yaml --log_id=my_run --payload='{}'
# 3. Check status (exit 0 done, 1 failed, 2 paused, 3 no state, 4 running, 5 waiting on a poll;
# prints Passport path + per-stage lines with failure/pending progress messages;
# add --verbose for payload, per-key provenance + Mermaid). --lightflow is
# optional for runs started by this version. `lightflow list` shows all runs.
lightflow status --log_id=my_run
# 4. Resume paused gate after user approval (--resolution=APPROVE sets
# approved=true automatically; --payload only needs the keys the gate's
# json_schema requires; --lightflow optional as for status)
lightflow resume --log_id=my_run \
--stage=approve --resolution=APPROVE --payload='{}'Guardrail Rules for Agents
- Scaffolding new workflows (
create_lightflow): When asked to build a new Lightflow workflow, run thecreate_lightflowmeta-workflow that ships in the Lightflow repository to step through design alignment, AST + unit test verification, anddry_run+visualizer.htmlproof. Run it from a clone ofgithub.com/google/lightflow, or pass the absolute path toexamples/create_lightflowin your clone:lightflow start --lightflow=/path/to/lightflow/examples/create_lightflow --log_id=scaffold_<name>. - Follow
operator_actiongates: If a workflow exits with code2(SUSPENDED), follow the stage'sinstructions, thenresumewith a payload matching itsjson_schema. The resume stamp records who decided and from which session. - Prefer
resumeoverstart --forceafter failures: Lightflow's append-onlyPassportpreserves completed stages so side effects are never duplicated. Fix the failing action and callresume.
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.

