Start with a bounded question
Pilot Light is a Rust CLI for finding evidence of AI components in repositories. The useful question is: which dependencies, SDK calls, agent patterns, and MCP declarations can this scan explain? That is narrower than discovering every AI service in an organization.
This study uses a source snapshot, an explicit scan configuration, and a versioned set of detection rules. Repository access is a prerequisite. A local scan does not need to execute the application or send its source to a model.
Acquire and inspect without running the project
Separate source acquisition from analysis. A remote repository reference resolves to a fixed revision; a local tree needs a stable snapshot for a repeatable scan. Bound file sizes and archive expansion, reject unsafe archive paths, and report files that could not be inspected.
Manifest and configuration readers collect declarations. Tree-sitter adapters inspect source syntax and supported bindings. An import can establish a dependency reference; a recognized constructor or tool registration can support a more specific finding. Parsing alone does not establish behavior.
Keep detection knowledge separate from the engine
Pilot Light is inspired by Cisco AI BOM and reuses catalog data with attribution. Its own mappings and detection packs add reviewed syntax patterns and classifications. Keep that provenance visible instead of treating every upstream label as a verified agent or model.
Version the effective catalog and packs with each scan. Positive and negative fixtures should accompany rule changes. Declarative packs can extend supported patterns, but a new language or analysis mechanism still needs engine work. Scanned repositories must not silently choose the scanner's rules.
Make each finding inspectable
Keep the source location, extraction mechanism, matched rule, and supported relationship with the finding. Distinguish package evidence from an agent construction or an MCP configuration reference. Preserve ambiguous and unresolved cases rather than assigning them a confident role.
Repository-scoped occurrence IDs help keep reports distinct. They are not stable identities across refactors, and they are not runtime asset IDs. Export an AI bill of materials alongside coverage information so a downstream inventory does not lose the qualifications.
An empty report needs an explanation
Report the requested scope, supported detectors, skipped files, parse failures, and scan limits. A successful process exit and zero findings cannot establish that a repository has no AI usage. Dynamic imports, generated configuration, indirect wrappers, and unsupported languages can all leave gaps.
Review scan output before sharing it: paths and component names may themselves be sensitive. A static finding does not establish whether a component executes, is approved, or creates a vulnerability. Those decisions need deployment evidence, ownership, and policy context.
Measure coverage separately from speed
A compiled CLI, bounded parallel parsing, and preloaded lookup data make a practical scanning design. They do not establish a latency or accuracy claim. Measure acquisition and scanning separately on pinned inputs, and evaluate precision and recall against independently reviewed labels.
The tradeoff is explicit: static scanning is repeatable and can work offline, but runtime visibility needs other evidence. Extend coverage with reviewed fixtures before broadening the claims made by the report.