agentleFS
GoogleKnown publishergoogle/lightflow/CLAUDE.md

lightflow

CLAUDE.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 the bash tool in Claude Code (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…

The file

We split this CLAUDE.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
  1. Very specific:

    When orchestrating multi-step workflows with side effects (e.g., database migrations, API batch modifications, code deployments, or …

    line 3
  2. Very specific:

    When working via the bash tool in Claude Code (python3 -m lightflow is equivalent to lightflow whenever the console script is not on PATH):

    line 10
  3. Very specific:

    Scaffolding new workflows (create_lightflow): When asked to build a new Lightflow workflow, run the create_lightflow meta-workflow that …

    line 35
  4. Very specific:

    Follow operator_action gates: If a workflow exits with code 2 (SUSPENDED), follow the stage's instructions, then resume with a payload …

    line 43

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Lightflow Integration Guide for Claude Code & Claude Desktop

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 the bash tool in Claude Code (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 the create_lightflow meta-workflow that ships in the Lightflow repository to step through design alignment, AST + unit test verification, and dry_run + visualizer.html proof. Run it from a clone of github.com/google/lightflow, or pass the absolute path to examples/create_lightflow in your clone: lightflow start --lightflow=/path/to/lightflow/examples/create_lightflow --log_id=scaffold_<name>.
  • Follow operator_action gates: If a workflow exits with code 2 (SUSPENDED), follow the stage's instructions, then resume with a payload matching its json_schema. The resume stamp records who decided and from which session.
  • Prefer resume over start --force after failures: Lightflow's append-only Passport preserves completed stages so side effects are never duplicated. Fix the failing action and call resume.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.