/openlogos:test-writerfrom openlogos
Designs unit and scenario test cases from API specs, DB constraints, and sequence diagrams. Use when API specs exist but test documents are missing.
Ships in openlogos. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Based on sequence diagrams, API specifications, and DB constraints, design unit test cases and scenario test cases for each business scenario. Applicable to all project types (API services, CLI tools, frontend applications, libraries, etc.), this is a mandatory prerequisite step before code generation.
logos/resources/prd/3-technical-plan/2-scenario-implementation/ contains sequence diagrams (required)logos/resources/api/ contains API specifications (read if present, skip if absent — non-API projects may not have these)logos/resources/database/ contains DB DDL (read if present, skip if absent)logos/resources/prd/1-product-requirements/ contains requirements documents (for tracing acceptance criteria)Cannot be skipped: Regardless of project type, Step 3a (this Skill) must be executed.
Read the following files to establish complete context:
logos/resources/prd/3-technical-plan/2-scenario-implementation/)logos/resources/api/) — if presentlogos/resources/database/) — if presentConfirm the following for the current scenario:
Extract unit test cases from three categories of sources:
Inspect requestBody and parameters for each API endpoint:
type → Type error cases (passing incorrect types)format (email, uuid, date-time) → Format validation casesminLength / maxLength → Boundary value cases (exactly at limit, exceeding by 1)required → Required field missing casesenum → Enumeration value cases (valid values + invalid values)minimum / maximum → Numeric range casesInspect constraints for each related table:
UNIQUE → Duplicate insertion casesNOT NULL → Null value insertion casesCHECK → Constraint violation casesFOREIGN KEY → Referencing non-existent record casesDEFAULT → Default value verification when no value is providedExtract single-point business logic from sequence diagram Step descriptions and EX exception cases:
Format for each unit test case:
| Field | Description |
|---|---|
| ID | UT-{scenario-number}-{sequence}, e.g., UT-S01-01 |
| Description | What behavior is being tested |
| Source | Constraint origin (e.g., auth.yaml → register → email: format:email) |
| Preconditions | State required before the test |
| Input | Specific input values |
| Expected Output | Expected return value or error message |
Extract scenario test cases from two categories of sources:
Treat the complete Step 1 → Step N sequence from the sequence diagram as an end-to-end code call chain:
Expand each EX exception case into a scenario test case:
Format for each scenario test case:
| Field | Description |
|---|---|
| ID | ST-{scenario-number}-{sequence}, e.g., ST-S01-01 |
| Description | What scenario flow is being tested |
| Covered Steps | Which sequence diagram Steps are covered (e.g., Step 1→6) or which EX (e.g., EX-2.1) |
| Preconditions | State and data required before the test |
| Operation Sequence | Ordered list of operations following Step sequence |
| Expected Result | Final state (return value + database state + side effects) |
Reverse-validate whether test cases cover all critical constraints:
required field in the API has at least 1 UT caseUNIQUE / CHECK constraint in the DB has at least 1 UT caseIf any items are uncovered, add supplementary cases or explain the reason to the user.
Extract each GIVEN/WHEN/THEN acceptance criterion from the Phase 1 requirements document, assign a traceability ID to each, and link it to the test case IDs that cover that criterion.
{scenario-number}-AC-{two-digit-sequence}, e.g., S01-AC-01, S01-AC-02openlogos verify parses this traceability table and links AC → test case ID → execution result across three layers to generate a complete acceptance traceability report.
Output the test case specification document in Markdown format, organized by scenario.
Guide the user to the next step based on project type:
logos/resources/test/<module>-{scenario-number}-test-cases.md (e.g., core-S01-test-cases.md; read current module from modules[] in logos-project.yaml, default is core)UT-{scenario-number}-{sequence} / ST-{scenario-number}-{sequence}# {scenario-number}: {scenario-name} — Test Cases
## 1. Unit Test Cases
### 1.1 {group-name} (Source: {constraint-origin})
| ID | Description | Source | Preconditions | Input | Expected Output |
|----|-------------|--------|---------------|-------|-----------------|
| UT-S01-01 | ... | ... | ... | ... | ... |
## 2. Scenario Test Cases
### 2.1 Happy Path: {scenario-name}
| ID | Description | Covered Steps | Preconditions | Operation Sequence | Expected Result |
|----|-------------|---------------|---------------|--------------------|-----------------|
| ST-S01-01 | ... | Step 1→6 | ... | ... | ... |
### 2.2 Exception Paths
| ID | Description | Covered EX | Preconditions | Trigger Condition | Expected Result |
|----|-------------|------------|---------------|-------------------|-----------------|
| ST-S01-02 | ... | EX-2.1 | ... | ... | ... |
## 3. Coverage Validation
- [x] Phase 1 normal acceptance criteria: fully covered
- [x] Phase 1 exception acceptance criteria: fully covered
- [x] EX exception cases: fully covered
- [x] API required fields: fully covered
- [x] DB UNIQUE/CHECK constraints: fully covered
## 4. Acceptance Criteria Traceability
| AC ID | Acceptance Criterion | Covered By |
|-------|----------------------|------------|
| S01-AC-01 | Normal: Fresh project initialization — create complete directory structure | ST-S01-01 |
| S01-AC-02 | Normal: Confirm when explicit project name differs from config file | ST-S01-02 |
| S01-AC-03 | Exception: Project already initialized — display error message | ST-S01-03, UT-S01-05 |
Test case IDs (UT-S01-01, ST-S01-01) serve as a binding contract between design documents and runtime:
openlogos verify maps execution results back to test case specifications via IDs, automatically determining acceptanceSee logos/spec/test-results.md for the detailed JSONL format definition and reporter code templates for each language.
openlogos verify to report incomplete resultsThe following prompts can be copied directly for AI use:
Design test cases for meDesign unit tests and scenario tests for S01Design test cases for all P0 scenariosCheck the test coverage for S01测试设计前读取 spec/authority-closure.md、Authority Registry 和有效 sequence diagram。按 required fact_id 生成矩阵,不另建 owner/writer 清单。
每个 fact 至少覆盖 authority happy path、stale projection、conflicting old copy、legacy/concurrent writer、response lost + new-process restart、projection rebuild、cutover rollback、forbidden reverse inference。确实不可发生的维度必须引用架构不变量给证据,不能静默省略。
断言必须证明最终 decision/恢复来源是 authority identity/action;故意让投影与权威值不同,restart 必须启新进程并保留旧残留。所有自动化 UT/ST/smoke 使用真实 ID 并接入 OpenLogos reporter;漏任一 required 维度时测试规格不完成。
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
16 skills in this plugin
/api-designerDesign OpenAPI specifications derived from scenario sequence diagrams. Use when scenarios exist in 2-scenario-implementation/ but logos/resources/api/ is empty. All description and summary values in YAML must be double-quoted./architecture-designerDesign technical architecture and select technology stack. Use when product design exists in logos/resources/prd/2-product-design/ but logos/resources/prd/3-technical-plan/1-architecture/ is empty./change-writerWrite change proposals with impact analysis following OpenLogos delta workflow. Use when the project lifecycle is active and source code or methodology documents need modification./code-implementorGenerate business code and test code based on the full specification chain (sequence diagrams, API YAML, DB DDL, test case specs). Use when test cases exist in logos/resources/test/ but logos/resources/implementation/ is empty./code-reviewerReview code for OpenLogos methodology compliance, including YAML validity checks. Use when reviewing code changes, checking pull requests, or performing code quality analysis./db-designerDesign database schema based on API and scenario requirements. Use when scenarios exist but logos/resources/database/ is empty.npx claudepluginhub miniidealab/openlogos --plugin openlogosOther plugins' skills for the same job