Skip to main content

Trace markdown requirements against repository evidence and flag likely implementation gaps.

Project description

Spec Gap Scout terminal report

spec-gap-scout

spec-gap-scout checks whether requirements in a markdown spec have visible evidence in a repository. It is built for the awkward moment before a release review when a PRD, checklist, or customer promise says one thing and the code may say another.

Problem

Specs drift. A release checklist says "export CSV", "prevent duplicate retries", or "redact provider responses", but reviewers still have to search the repository by hand. spec-gap-scout extracts requirement-like lines, scans code and docs, scores evidence, and flags likely gaps without sending repository contents anywhere by default.

Install

pip install spec-gap-scout

Optional LLM risk notes need provider SDKs:

pip install "spec-gap-scout[llm]"

Quick Start

spec-gap-scout examples/product-spec.md --repo examples/sample_repo

Markdown and JSON reports are available:

spec-gap-scout SPEC.md --repo . --format markdown --output spec-gap-report.md
spec-gap-scout SPEC.md --repo . --format json --output spec-gap-report.json

The command exits with 1 when one or more requirements are missing, which makes it useful in release scripts and pre-merge checks.

LLM Risk Notes

The scanner is local-first. If you want a concise risk note from an LLM, choose a provider explicitly:

spec-gap-scout SPEC.md --repo . --format markdown --llm-provider openai
spec-gap-scout SPEC.md --repo . --llm-provider anthropic --llm-model claude-3-5-haiku-latest
spec-gap-scout SPEC.md --repo . --llm-provider ollama --llm-model llama3.1

Provider configuration uses the normal environment variables:

  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY
  • OLLAMA_HOST

Only the compact scan report is sent to the selected provider, not full source files.

What Counts as Evidence

For each requirement, the tool:

  • extracts keywords from requirement-like markdown bullets and numbered lines
  • scans common source, config, and documentation extensions
  • scores matching lines by keyword coverage, path relevance, and test/spec locations
  • redacts common key, token, secret, and password patterns in snippets
  • labels each requirement as covered, partial, or missing

This is not a proof of correctness. It is a fast review map that tells you where to look first.

Python API

from pathlib import Path
from spec_gap_scout import ScoutOptions, run_scan

report = run_scan(ScoutOptions(spec=Path("SPEC.md"), repo=Path(".")))
print(report["summary"])

Development

python3 -m venv .venv
. .venv/bin/activate
pip install -e . pytest
pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spec_gap_scout-0.1.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spec_gap_scout-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file spec_gap_scout-0.1.0.tar.gz.

File metadata

  • Download URL: spec_gap_scout-0.1.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for spec_gap_scout-0.1.0.tar.gz
Algorithm Hash digest
SHA256 66590a75b02ebe7b9beca0724492dd8a1c896a60cb5f84c43d4b1791b0d452d7
MD5 243893b27f5ec5e1c7ae0f5af3f3b274
BLAKE2b-256 e7e78651e5d0d701fd82520ca7b3a88bb73181b875b4843bfb008a43cbb6b746

See more details on using hashes here.

File details

Details for the file spec_gap_scout-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: spec_gap_scout-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for spec_gap_scout-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b72375f7a02eca72092da5f73e17bdd3da3a1f5a834e3c4ee40b461e8f18557
MD5 c4a94613304a87320199612ffb8f7763
BLAKE2b-256 a238ae5e7d171ff9bc334998a847b2a554e9fd700123cc8575a601ff34992a50

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page