Skip to content

Repository files navigation

Claimline

Claimline checks engineering claims authored in Markdown: each claim binds prose to implementation anchors (path#Lstart-Lend), test evidence globs, and optional git-backed re-attestation policy when anchored files drift.

Ten-minute CLI setup

Requirements: Rust 1.79+ (for cargo install), or build from source.

cargo install --path . --locked
claimline verify --root . --glob '**/*.md'
claimline verify --root . --format sarif --glob '**/docs/**/*.md' > claimline.sarif

Outputs:

Flag Behaviour
--format text (default) Human-readable diagnostics
--format json JSON array of diagnostic objects
--format sarif SARIF 2.1.0 for CI viewers
--warnings-as-errors Promotes warnings to failures
--skip-git Skips git policy checks

claimline parse prints every discovered fence plus parsed YAML (pretty JSON envelope).

Example claim fence

```claimline
kind: invariant
severity: medium
anchors:
  - impl: src/token.rs#L1-L80
evidence:
  tests:
    globs:
      - "tests/**/*.rs"
policy:
  require_refresh_when:
    anchored_files_changed_on: main
attestation:
  sha: "<commit where this claim was last reviewed>"
statement: |

  Bounded work per tenant.
```

Demo fixture

demo/docs/claims.md references demo/lib.rs and matching tests. CI runs verification against those paths—copy the folder structure when bootstrapping a new repo.

GitHub Actions

Composite action (requires Rust + Cargo on the runner, e.g. dtolnay/rust-toolchain@stable first):

- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Alpoflex/claimline@v0.1.0 # or `./` during development in this checkout
  with:
    root: "."
    glob: "**/*.md"

Inputs: root, glob, extra_args (passed verbatim to claimline verify). The action installs the crate via cargo install --path "${GITHUB_ACTION_PATH}" --locked.

Additional workflow samples live in examples/github-actions/.

Licenses

Distributed under either MIT or Apache 2.0 at your option.

About

Claimline: Markdown engineering claims tied to code, tests, and attestations

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages