# Repository Briefing: huggingface/atif-scan
> Source: https://repoforai.com/repo/huggingface/atif-scan (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/huggingface/atif-scan
- **Category**: LLMs & Inference (大模型与推理微调)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A (86/100 · Maintenance 35/35 · Adoption 11/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.8.24 (2026-11-19) — https://github.com/huggingface/atif-scan/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: CLI, MCP
- **Momentum**: 53 ★ total (+0 24h / +2 7d) · 6 forks
- **When to Use**: Best for: Evaluation teams with recorded ATIF runs that need repeatable batch scans, task-specific allowances, and a clear path from a finding to human review. Skip if: You need live telemetry collection, do not have or cannot produce ATIF traces, or need a definitive automated misconduct verdict.

## Overview
```text
### Architecture & Core Mechanics
atif-scan is a post-run ATIF analyzer. Source adapters resolve local paths and remote inputs; the loader normalizes records into a `Trace`; detectors, rules, and allowances feed the engine, which produces JSON or text reports. The analysis core uses only the Python standard library and never executes code or commands found in a trace. By default, detectors see agent-authored messages, reasoning, and tool-call arguments, while prompts, copied context, tool outputs, and payloads such as file contents and edits are excluded unless a check explicitly includes them.

`atif-scan` maps to `atif_scan.cli:main`; `atif-inspect` maps to `atif_scan.evidence.extract:main` and exposes step-level inspection without requiring the reviewer to parse ATIF manually. Task packs enter through `--plugin`, and `--rules` loads policy files. Allowances change the interpretation of matching findings without hiding them. At the CLI boundary, `huggingface_hub>=2.0.0` and `rich>=15.0.0` are imported lazily for Hub access and text rendering. The optional read-only MCP inspection path is separate from the scan engine.

### Key Capabilities & Differentiators
The scanner ingests local traces, Hugging Face buckets, Harbor jobs, and mirrors of public DeepSWE trials with their trial index. It checks trace integrity across cost, trial, and token accounting; applies deterministic checks for signals such as benchmark awareness and reward hacking; and statically examines recorded Python and JavaScript tool programs and dispatch ledgers. Bundled allowances cover tb-21, DeepSWE, tb-4, and tb-lite. Recognized ALE receipts select canonical ATIF files, retain missing attempts, and enable the mounted-reference request pack; conflicting evidence remains unknown.

Run briefs surface coverage, score, a scenario treating flagged successes as failures, cost, and wall time; single-trace detail breaks results down by check. Severity sets review priority, not the probability of misconduct. Reviewers can opt into masked citations, a localhost evidence browser, or question bundles. `hunt` can send questions to a model via the default fast-agent runner, or use another MCP-capable CLI agent. Imported answers annotate the report without rescoring, and `--image-model` can transcribe images that block a check.

### Trade-offs & Limitations
Compared with general LLM observability platforms, atif-scan focuses on auditing recorded ATIF runs rather than collecting live telemetry. Compared with an ad hoc script, it provides reusable rules, allowances, and a shared way to express missing evidence, but teams with other trace formats must first produce compatible input. Compared with a model-only judge, deterministic checks are easier to rerun and compare; they are also bounded by what was recorded and what each check is allowed to see. An allowance can encode legitimate task behavior, but overbroad allowances can make the score less informative even though the findings stay visible.

Use findings to route human review, not as automatic disqualifications. Masked citations and a read-only inspector serve different purposes: masking limits excerpt exposure, while read-only access prevents writes, not disclosure. Cache files, exports, and evidence sent to a model provider therefore need separate handling policies. MIT permits commercial use and self-hosting under its terms, but does not confer rights to the underlying traces.

### Hardware & Deployment Guide
The package requires Python 3.11 or newer. The published CLI can be launched with `uvx`; development uses `uv sync` and `uv run`. Local scans over existing files are offline, with no GPU requirement for the default analysis path. Hugging Face and Harbor sources add network access for fetching and cache storage, with remote inputs mirrored under `~/.cache/atif-scan` by default for incremental rescans. Plan CPU and memory around trace size and run volume, and budget disk separately for mirrors and evidence artifacts.

For `hunt --inspect-tool`, the optional MCP extra pins `mcp>=1.2,<2`; the server component can also be fetched with `uv`. The evidence browser runs on localhost. Model-assisted hunts explicitly add provider calls, and `--image-model` opts into model-based transcription; resource use and cost on those paths depend on the selected model and access method. The manifest and release listing identify v0.8.24, dated 2026-11-19. No release notes are available to attribute individual capabilities to that version.
```

## Key Capabilities
```text
- Evidence scope: Default checks see agent-authored messages, reasoning, and tool-call arguments; prompts, tool outputs, and file or edit payloads require explicit inclusion.
- Policy composition: `--plugin` and `--rules` add task-specific logic; allowances leave findings visible as `expected` but exclude them from scoring.
- Input handling: Local paths, Hugging Face buckets, and Harbor jobs feed the same scan pipeline; remote mirrors support incremental rescans.
- Static analysis: Inspect recorded Python and JavaScript tool programs and dispatch ledgers without executing trace contents.
- Evidence review: Plain reports omit trace excerpts; `--cite`, `--browse`, `atif-inspect`, and read-only MCP offer separate ways to inspect the evidence.
- Calibration: A label store measures checks and judges; golden prompt fixtures and allowlisted real-run snapshots support regression review.
```

## Quick Start / Clone
```bash
uvx atif-scan@latest --help
uvx --from atif-scan@latest atif-inspect --help
```
