Skip to content

ziimakc/sdd-coverage

Repository files navigation

sdd-coverage

A Specification-Driven Development (SDD) coverage scanner. It recursively scans a project codebase for @req annotations, cross-references them with requirements.yaml and tasks.yaml, computes per-requirement coverage metrics, and exposes results via a REST API.

Test task implementation video:

part one

part two

Spend too much time on requirements, so second part is super fast to meet time budget requirements.


Build

Requires Rust 2024 edition toolchain.

cargo build --release

The binary is written to target/release/sdd-coverage.


CLI Mode

Scan

Scans source and test directories for @req annotations and prints a coverage report.

sdd-coverage scan \
  --requirements <path/to/requirements.yaml> \
  --source       <path/to/src> \
  --tests        <path/to/tests>
Flag Required Description
--requirements yes Path to requirements.yaml
--source yes Directory to scan for implementation annotations
--tests yes Directory to scan for test annotations
--strict no Exit non-zero if any requirement lacks full coverage

The report is printed to stdout. Warnings are printed to stderr.

Serve

Starts the HTTP REST API server.

sdd-coverage serve [--addr 0.0.0.0:3000]
Flag Default Description
--addr 0.0.0.0:3000 Address to bind on

Server Mode

sdd-coverage serve --addr 0.0.0.0:3000

The server reads requirements.yaml, tasks.yaml, src/, and tests/ relative to the working directory at scan time. Trigger a scan via POST /scan, then query results through the REST API.


API Documentation

Interactive API documentation is served by the running server:

URL Description
http://localhost:3000/swagger-ui/ Swagger UI
http://localhost:3000/api-docs/openapi.json OpenAPI schema

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages