DirectiveOps Scanner is an open-source CLI for scanning AGENTS.md, CLAUDE.md, GEMINI.md, GitHub Copilot instructions, Cursor rules, NemoClaw/OpenShell policy yaml, and related AI coding agent instruction and policy files in a repository.
It helps engineering teams discover instruction files, normalize directives, detect drift or conflicts, and export JSON or Markdown reports. The free scanner is built for local repository analysis. Teams that need multi-repo visibility, rollout workflows, dashboards, policy management, and audit history should use the hosted product at DirectiveOps.
- Scans common AI instruction files such as
AGENTS.md,CLAUDE.md,GEMINI.md,.github/copilot-instructions.md,.github/instructions/*.instructions.md,.cursor/rules, andAI.md - Normalizes extracted instructions into a constitution-style model
- Detects basic drift, conflict, risky import, stale reference, and required-directive findings
- Exports machine-readable JSON and human-readable Markdown reports
- Supports local baselines through
directiveops.config.json
- Platform and developer experience teams auditing AI coding assistant instructions
- Security and governance teams reviewing prompt and policy drift
- Repository owners who want a free local scanner before adopting central controls
- Teams comparing
AGENTS.md, Copilot instructions, and other agent-specific instruction files
- Find all AI coding instruction files in a repo quickly
- Detect conflicting or risky instructions before they spread
- Standardize how agent instructions are analyzed across repositories
- Generate reports that can be shared in issues, PRs, or internal reviews
- Start with the free scanner, then move to DirectiveOps for centralized governance and paid workflows
By default, the scanner discovers:
AGENTS.mdCLAUDE.mdGEMINI.md.github/copilot-instructions.md.github/instructions/*.instructions.md.cursor/rulesor.cursor/rules.md.windsurf/*.md.github/copilot.yamlandcopilot.yamlnemoclaw.yaml,nemoclaw.yml,openshell-policy.yamlinference-profiles.yaml/inference-profiles.ymlpolicies/*.yamlSOUL.md,TOOLS.md,MEMORY.mdAI.md,AI-RULES.md- Any additional paths configured in
directiveops.config.json
- JSON output: a
ScannerResultcontaining discovered files, a normalized constitution graph, findings, summary counts, and a drift score - Markdown report: a human-readable summary suitable for sharing or attaching to issues, with optional sanitization
From npm:
npm install -g @directiveops/scanner-cliFrom source:
npm install
npm run build
npx directiveops-scanner scan --path .Scan the current repository:
directiveops-scanner scan --path .Export full JSON and a Markdown report:
directiveops-scanner scan --path . \
--format json \
--output directiveops-report.json \
--markdown directiveops-report.mdRun a sanitized report suitable for sharing:
directiveops-scanner scan --path . --markdown report.md --sanitizeUse DirectiveOps Scanner to inventory agent instruction files and see what guidance different tools are receiving.
Run the scanner against a repo baseline to flag required directives, conflicts, risky imports, and basic drift between code-level instructions and runtime policies such as NemoClaw/OpenShell yaml or Copilot configs.
Export JSON for tooling or Markdown for human review in pull requests and issues.
Use the local CLI for repository-level analysis, then adopt DirectiveOps when you need org-wide visibility, controls, and rollout workflows.
Place a directiveops.config.json at the repo root to control local baseline behavior:
{
"additionalInstructionPaths": [
"docs/AGENTS.md"
],
"requiredCategories": [
"testing",
"security"
],
"allowRemoteHosts": [
"github.com"
],
"baselineDirectives": [
{
"key": "testing:all-prs-must-run-tests",
"category": "testing",
"normalizedText": "all pull requests must run tests in ci"
}
]
}{
"rootDir": ".",
"repositoryName": "example-repo",
"scannedAt": "2026-03-16T12:34:56.000Z",
"discoveredFiles": ["AGENTS.md", ".github/copilot-instructions.md"],
"summary": {
"instructionFileCount": 2,
"directiveCount": 18,
"findingCount": 3,
"highSeverityCount": 1,
"driftScore": 30,
"conflictCount": 1
},
"findings": [
{
"type": "risky-import",
"severity": "high",
"summary": "Remote instruction import is outside the approved source set",
"affectedFiles": ["AGENTS.md"],
"affectedScope": "repository"
}
]
}# DirectiveOps OSS Scanner Report
- Repository: example-repo
- Scanned at: 2026-03-16T12:34:56.000Z
- Instruction files discovered: 2
- Directives extracted: 18
- Basic findings: 3
- High severity findings: 1
- Drift score: 30
- Conflicting instructions: 1
## Discovered Files
- `AGENTS.md`
- `.github/copilot-instructions.md`
## Findings
- [HIGH] Remote instruction import is outside the approved source set (AGENTS.md)- Local CLI for scanning one repository at a time
- Discovers and parses AI instruction files
- Builds a normalized constitution model
- Runs a basic findings engine for drift, conflicts, risky imports, stale references, and missing required directives
- Emits JSON and Markdown reports
- Central multi-repo inventory and dashboards
- Org-level templates and policy rules
- Rollout preview and PR generation
- Drift tracking and audit history
- Team collaboration, RBAC, and exception workflows
If you are evaluating the free scanner and need governance across repositories, use DirectiveOps as the next step.
AI instruction file scanner, AGENTS.md scanner, CLAUDE.md scanner, GEMINI.md scanner, GitHub Copilot instruction scanner, Cursor rules scanner, NemoClaw policy yaml scanner, OpenShell policy scanner, prompt governance, instruction drift detection, policy drift scanner, repository compliance scanner, developer tooling CLI.