agentleFS
flooooooooooowflooooooooooow/flow-skills/skills/flow-verify/SKILL.md

flow-verify

Skill1 starsChanged 3 months agoMITView on GitHub

Test Flow code and produce evidence that it does what it claims. Use before reporting any Flow work as done, when adding tests, when checking a numerical result, when running the test suite, or when auditing whether a claim about Flow is actually supported by working code.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Add --sanitize=ub,asan,tsan to compile-and-run tests when memory or concurrency is involved.

    line 64
  2. Distinctive:

    Run the suite once, read the output, and act.

    line 67
  3. Distinctive:

    When asked whether Flow does X, classify it honestly:

    line 97
  4. Distinctive:

    Every completed piece of work ends with:

    line 112
  5. Distinctive:

    Never describe planned behaviour as shipped.

    line 119

≈ “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.

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

Verification and evidence

A program that compiles has not been shown to be correct. Climb the ladder as far as the risk requires, then say where you stopped.

The ladder

LevelQuestionCommand
1Does it parse and emit C?flow compile f.flow --strict
2Does the C compile?flow compile f.flow
3Does it run and exit zero?flow run f.flow; echo $?
4Does it assert something true?Self-checks in main
5Does it agree across hosts or backends?Run both, diff the output

Level 4 is where most of the value is. Levels 1 to 3 are cheap and prove very little.

Self-checking programs

The shipped examples are tests. They compute, check, and return a distinct code per failure:

function main() -> i32 {
    let result: f64 = simulate()

    if result != result {
        println("FAIL: state became NaN")
        return 1
    }
    if fabs(result - 2.0) > 1e-6 {
        println("FAIL: expected 2.0")
        return 2
    }

    println("    OK: converged to the closed-form value")
    return 0
}

Distinct codes mean the CI failure tells you which check broke without reading the log.

Running the suites

flow test --strict --verbose    # transpile plus clang, fail on type errors
flow test --tier1               # transpile only, fastest
flow test-runtime               # compile and execute
flow test-lang                  # tests/lang/, strict transpile plus run
flow test-python                # Python unit tests
flow test-mlir                  # needs LLVM
flow test-gpu
flow test-interop
flow test-all                   # everything

Add --sanitize=ub,asan,tsan to compile-and-run tests when memory or concurrency is involved.

Run the suite once, read the output, and act. Do not loop a suite waiting for a different answer.

Checking numerical claims

Pick at least one:

  • a closed-form answer for a simplified case;
  • a conserved quantity that should stay flat;
  • convergence under a halved step size;
  • a known qualitative behaviour, such as a decaying envelope or a limit cycle;
  • agreement with a second method.

examples/evolution/bouncing_ball.flow compares interpolated impact times against the closed-form sequence and fails if they drift. That is the standard to match.

Safety profiles

flow show-flags --profile=safety
FLOW_PROFILE=safety flow compile program.flow
flow analyze build/program.c --standard=misra-c-2024 --fail-on-violation

Apply these in proportion to risk. A demo does not need MISRA. Anything headed for a device does.

Auditing a claim

When asked whether Flow does X, classify it honestly:

VerdictMeans
ShippedA test or runnable example exercises it
LimitedWorks within stated bounds; name the bounds
Parsed onlyThe grammar accepts it; nothing lowers it
DesignedA document describes it; no implementation
PlannedOn the roadmap

Give the file and command that support the verdict. If two documents disagree, trust the one the test agrees with and say the other is stale.

The report

Every completed piece of work ends with:

  • the exact command, environment variables included;
  • the real output, trimmed but not paraphrased;
  • what was checked and what was not;
  • any limit worth knowing.

Never describe planned behaviour as shipped. Never call a compile a pass.

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.