Automotive diagnostic validation, accelerated by AI. Turn an ISO 14229-1 UDS requirement into execution-ready test scenarios, traceability, and reporting in seconds.
Diagnostic Autonomy Grid is a Python platform for automotive ECU validation teams. It combines deterministic UDS scenario generation with optional AI-assisted analysis and review, while still working cleanly in rule-based mode when AI dependencies are unavailable.
- Generates 88 baseline test cases across 11 UDS services
- Produces traceability, compliance, JSON/CSV exports, and HTML dashboards
- Supports a web UI, single-requirement CLI, batch CLI, and optional AI pipeline
- Keeps the core path deterministic and usable without real hardware
- Falls back gracefully when the Anthropic SDK or
ANTHROPIC_API_KEYis missing
Below is a generated dashboard from the current workspace output:
Install dependencies:
pip install -r requirements.txtStart the web UI:
python -m app.web_appThen open http://localhost:8000.
Run a single requirement:
python -m app.main
python -m app.main sample_data/requirement_0x27_security.jsonRun the full sample batch:
python -m app.batch_runner
python -m app.batch_runner sample_data/Run tests:
python -m pytest -qUse the AI pipeline when you have the SDK and API key available.
PowerShell:
$env:ANTHROPIC_API_KEY = "your_key_here"
python -m app.ai_agent_runnerBash:
export ANTHROPIC_API_KEY=your_key_here
python -m app.ai_agent_runnerWithout ANTHROPIC_API_KEY or the Anthropic SDK, the project continues in rule-based mode instead of crashing.
Sample requirement input:
{
"requirement_id": "REQ_DIAG_0x22_001",
"service_id": "0x22",
"did": "F191",
"requirement_summary": "The ECU shall support ReadDataByIdentifier service 0x22 for DID F191 to provide hardware number information.",
"expected_result": "The ECU shall return a positive response containing the hardware number for DID F191."
}Verified local run:
python -m app.ai_agent_runner sample_data/requirement_0x22_f191.jsonVerified outcome from this workspace:
8rule-based scenarios generated100%coverage reported for the sample requirement- HTML reports written to
outputs/report_dashboard.htmlandoutputs/REQ_DIAG_0x22_001_report.html - JSON and CSV exports written to
outputs/test_report.json,outputs/test_report.csv, andoutputs/traceability_matrix.csv - AI pipeline safely fell back to rule-based mode when
ANTHROPIC_API_KEYwas not set
AI-enabled run:
python -m app.ai_agent_runner sample_data/requirement_0x22_f191.jsonWhen the Anthropic SDK is installed and ANTHROPIC_API_KEY is set, the same pipeline also:
- adds supplemental AI-generated scenarios on top of the deterministic baseline
- runs AI coverage gap analysis and includes AI insights in the requirement report
- runs the agentic validation loop and writes
outputs/REQ_DIAG_0x22_001_agent_report.txt
AI-enabled batch mode:
python -m app.batch_runner sample_data/With AI enabled, batch mode also generates a release advisory and embeds it into:
outputs/batch_summary.jsonoutputs/batch_dashboard.html
- 11 UDS service generators covering
0x10,0x14,0x19,0x22,0x27,0x2E,0x31,0x34,0x36,0x37, and0x3E - Optional AI layer for scenario augmentation, coverage analysis, reviewer verdicts, and release guidance
- Web UI + CLI workflows for interactive use, single-requirement runs, and batch processing
- Pluggable harness design with deterministic simulation by default and a real ECU adapter stub
- Safer reporting with HTML escaping in generated dashboards and requirement reports
- Strong test coverage with
222passing tests
The project ships generators for:
DiagnosticSessionControl, ClearDiagnosticInformation, ReadDTCInformation, ReadDataByIdentifier, SecurityAccess, WriteDataByIdentifier, RoutineControl, RequestDownload, TransferData, RequestTransferExit, and TesterPresent.
Each service produces a baseline scenario set covering positive, negative, boundary, state-based, fault-injection, and recovery-oriented validation paths.
- Python 3.11 / 3.12
- Pydantic v2
- FastAPI + Uvicorn
- pandas + Chart.js
- SQLite for agent memory
- Anthropic Claude models for optional AI features
- Tests:
222passing - CI: GitHub Actions
- License: MIT
- Outputs are written to
outputs/ - Sample requirements are included in
sample_data/
