Core Principle

Scenario-Driven.
Test-First.

One scenario ID traces from the first requirement to the last line of verified code. Tests define "done" before a single line is written. Quality becomes a number — not a feeling.

One ID. Three phases. Complete traceability.

Follow scenario S01 from a one-sentence pain point to automated acceptance.

Phase 1 · WHY S01
"Users need to register with email"
Pain Point P01: No way to create an account
Acceptance GIVEN valid email WHEN submit THEN account created
Same S01
Phase 2 · WHAT S01
Pages Registration form → Success page
Fields email (required, format), password (min 8)
States loading, success, error (duplicate email)
Same S01
Phase 3 · HOW S01
Step 1 Sequence diagram → POST /auth/register
Step 2 OpenAPI YAML + users table DDL
Step 3 12 test cases: UT-S01-001 … ST-S01-012
Step 4 AI generates code + test code
Step 5 openlogos verify → Gate 3.5 PASS ✓
No traceability matrix needed. The scenario ID is the trace. Change a requirement for S01? You know exactly which API, tests, and code are affected.

Define "done" before writing code

This is not traditional TDD. It's designing the entire test system before any implementation.

Traditional TDD
Write one test
Write code to pass it
Refactor
Repeat (code-level thinking)
vs
OpenLogos Test-First
Design all test cases first
Unit tests (function correctness)
Scenario tests (cross-module flow)
API orchestration tests (end-to-end)
Then AI generates code with full context

Why does this matter for AI?

When you tell AI "write a registration feature," it guesses what "done" means. When you tell AI "write code that passes these 12 test cases with IDs UT-S01-001 through ST-S01-012," it has a precise, verifiable target. The output quality difference is dramatic.

Quality is a number, not a feeling

1

Tests run

npm test / pytest — any framework, any language

2

Results captured

OpenLogos reporter writes each result to test-results.jsonl

3

Three-layer verification

openlogos verify checks coverage, pass rate, and AC traceability

PASS Gate 3.5 — Acceptance Report
Test pass rate76/76 (100%)
Design-time coverage25/25 assertions ✓
Acceptance criteria21/21 AC traced ✓

See the full picture

Learn how Documents as Context completes the methodology.