Skip to content
TudorAndreiPublic

About

Local CLI for keeping repository docs, ADRs, architecture notes, and source references connected as a validated knowledge graph.

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Latest commit

 

History

513 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

criv

criv connects your architectural decisions (ADRs) to the code they govern, and blocks changes that break them.

Why

Decision records drift because nothing checks them against the code. criv does:

  • An ADR names the source paths it governs and links to files and symbols. criv check fails when a link no longer resolves.
  • An ADR can carry ast-grep policies. criv enforce blocks the commit, push, or CI run that breaks one.
  • criv query answers which decisions govern a file, and which code has no decision.

criv runs locally, with no server and no network access.

Install

Add criv to the mise.toml of your repository:

[tools."github:TudorAndrei/criv"]
version = "latest"

Then run:

mise install
criv init

criv init writes criv.toml, the docs/adr/ folder, and agent skills. Keep .criv/ out of Git.

Use

criv adr new "Cache compiled policies"   # draft a decision
criv check                               # validate decisions and their links
criv enforce --stage commit              # block changes that break a policy
criv query governing src/main.rs         # which decisions govern this file?

An ADR declares its scope and policies in its frontmatter:

governs:
  - src/**/*.rs
policy:
  patterns:
    - id: no-println
      language: rust
      pattern: "println!($$$ARGS)"
      message: Prefer structured diagnostics.

Each diagnostic prints the fix: that repairs it. Run criv <command> --help for every flag, or criv --usage-json for the full command tree.

Learn more

Develop

See AGENTS.md, tooling, testing, and releasing.

About

Local CLI for keeping repository docs, ADRs, architecture notes, and source references connected as a validated knowledge graph.

Topics

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages