Skip to content

Scenario-Driven + Test-First

Scenario-Driven + Test-First is the most critical principle in OpenLogos. It guarantees accuracy, reliability, and maintainability by combining two complementary strategies:

  1. Scenario-Driven: Every feature is decomposed into discrete scenarios (S01, S02 …) that trace from requirements through design to implementation.
  2. Test-First: For each scenario, a comprehensive test suite is designed before code is written, giving AI a precise definition of “done.”

A single scenario ID (S01) travels through all three phases — no traceability matrix needed, because the ID is the trace:

PhaseWhat S01 gets
Phase 1 · WHYPain point, acceptance criteria (GIVEN/WHEN/THEN)
Phase 2 · WHATInteraction spec, page flow, prototype
Phase 3 · HOWSequence diagram → APIs → test cases (UT-S01-001 …) → verified code

Change a requirement for S01? You know exactly which API, tests, and code are affected.

This is not traditional TDD (write one test → write code → refactor). OpenLogos designs the entire test system first:

LayerScopeExample
Unit tests (UT)Function correctnessUT-S01-001: username min 2 chars
Scenario tests (ST)Cross-module integrationST-S01-001: full register → task view
Orchestration tests (OT)End-to-end API flowOT-S01-001: register → login → create task

Then AI generates code with a precise, verifiable target — “pass these 12 test cases with specific IDs,” not a vague “build a login feature.”

When you tell AI “write a registration feature,” it guesses what “done” means. When you tell AI “write code that passes UT-S01-001 through ST-S01-012,” it has a precise, verifiable target. The output quality difference is dramatic.

Terminal window
openlogos verify

Three-layer verification checks:

CheckDescription
Pass rateAll tests pass
Design-time coverageEvery defined test case was executed
AC traceabilityRequirements → test cases → results linked

The result is a Gate 3.5 acceptance report — quality as a number, not a feeling.

{type}-S{scenario}-{number}
  • Type: UT (unit), ST (scenario), OT (orchestration)
  • Scenario: Two-digit scenario number (S01, S02 …)
  • Number: Sequential within the scenario (001, 002 …)

All test results are reported in JSONL format. See Test Results Format for the specification.


See also: Interactive deep dive — Scenario-Driven + Test-First