flashtrace v0.12.1

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 specs, 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 (40+)

A tag is just a comment, so one syntax spans them all: C-family, hash (Python, shell, ..), SQL, Lua, HTML, ... 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

SemVer revisions & wildcards

Revisions match as SemVer versions - 2.4 equals 2.4.0 - and a 2.x wildcard accepts anything within revision 2. Learn more

Forwarding

Delegate a requirement’s obligation to another item with a forwarding tag - coverage follows the chain. Learn more

Git-aware scanning

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

Rich, CI-friendly reports

A readable text report or deterministic, schema-backed JSON on stdout - and 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 accepts anything within revision 2 - the 2.x 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.12.1.

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.