ast-grep

Structural search and replace for code using AST patterns

workhorse Rust ast-grep/ast-grep
67% pass rate
3/7 principles met

Spec Coverage

How many of the spec's requirements were verified for this tool. See /coverage for the full matrix.

Level Total Verified Unverified
MUST 23 9 14
SHOULD 16 0 16
MAY 7 0 7

Audience signal: mixed

This tool sends mixed signals: some agent-readable affordances are present, others are not. Treat the warnings below as friction points, not defects.

This is an informational signal, not an authoritative verdict — see methodology. The per-check evidence below is the ground truth.

Top Issues

All Checks

P1: Non-Interactive by Default

PASS Non-interactive by default
SKIP Non-interactive gate flag advertised in --help target satisfies P1 via alternative gate (help-on-bare or stdin-primary)
WARN Flags advertise env-var bindings in --help 3 flag(s) found in --help but no `[env: NAME]` bindings advertised

P2: Structured, Parseable Output

WARN Structured output support --output/--format flag detected but could not validate JSON via safe probes (--help/--version override output flags in most CLIs)

P3: Progressive Help Discovery

PASS Help flag produces useful output
PASS Version flag works

P4: Fail-Fast, Actionable Errors

PASS Rejects invalid arguments

P6: Composable, Predictable Command Structure

PASS Handles SIGPIPE gracefully
SKIP Pager-using CLI ships --no-pager escape hatch no pager signal (less/more/$PAGER/--pager) in --help
PASS Respects NO_COLOR

P7: Bounded, High-Signal Responses

WARN Quiet mode available no --quiet/-q flag detected in --help output

Details

Version scored
0.42.1
Audit date
2026-05-01 10:08:57 UTC
Duration
114ms
Platform
linux/x86_64
Mode
command
Anc build
0.3.0
Install
brew install ast-grep

Embed the badge

The badge floor is 80%; this scorecard is at 67% (13 points below). Once the score clears the floor, the embed snippet will appear here. The top issues above are the place to start.

Reproduce this scorecard for ast-grep locally and inspect the failing checks:

anc check --command sg --output json

Install anc first if you don't have it. Add --output json to get the same JSON shape committed under scorecards/.