flashtrace v0.11.4

Lightning-fast, reference-based requirement tracing

flashtrace verifies that every requirement in your Markdown specs is covered by the code and tests it demands - with zero runtime dependencies, anywhere Node.js runs.

How it works

  1. 1

    Write specs in Markdown

    An item is a line holding only its ID in backticks. The heading above becomes its title, the paragraph below its description and Needs lists the IDs that must cover it.

    spec.md
    ## Login requirement
    
    `req:auth/login#1`
    
    Users must be able to log in.
    
    Needs: impl:auth/login#1
  2. 2

    Tag your code

    Drop the ID into a comment - flashtrace understands the comment syntax of dozens of languages, from C-Like (incl. JS/TS) to SQL to Powershell.

    login.ts
    // [impl:auth/login#1]
    // [>>utest:auth/login#1]
    export function login(token) {
      …
    }
  3. 3

    Run flashtrace

    One command traces every requirement to its coverage - transitively - and reports what is missing, orphaned, unwanted, outdated or duplicated.

    terminal
    $ npx flashtrace
    
    Summary
      items       3  (1 from markdown, 2 from code)
      ok          3
      defective   0
    
    ok

Built to stay out of your way

Zero runtime dependencies

One self-contained script. Vendor it or install it - nothing else comes along.

Runs anywhere

Everything Node.js ≥ 18 runs on: your laptop, your CI, your air-gapped build box.

Many languages

Tags live in ordinary comments - C-family, Python, Ruby, shell, SQL, Lua, HTML, Vue and more. Learn more

Deep, transitive coverage

An item is only deep-covered when its whole tracing chain is. Broken links show up wherever they hide. Learn more

Wildcards & forwarding

Accept any 2.x revision, or delegate a requirement’s obligation to another item with a forwarding tag. Learn more

Git-aware scanning

Files ignored by git are excluded automatically - no config to keep in sync. Learn more

CI-friendly

Plain-text report, meaningful exit codes: 0 clean, 1 defects found, 2 usage error. Learn more

See it trace

Three scenarios, captured from real flashtrace runs. Flip each between its input files and the report it produces.

A requirement needs an implementation at any 2.x revision; the wildcard resolves to impl:login#2.4 and the whole chain is deep-covered.

spec.md
## Login

`req:login#1`

Users can sign in with a session token.

Needs: impl:login#2.x
login.ts
// [impl:login#2.4]
export function login(token: SessionToken) {
  return openSession(token);
}

Install in seconds

Two ways in, both ending at the same single file. Current release: v0.11.4.

As a dev dependency

npm install flashtrace -D
npx flashtrace

Vendored, zero install

Download dist/flashtrace.mjs into your repository and run it directly.

node flashtrace.mjs

Node.js ≥ 18 required. Read the Usage Guide for options and details.