[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MXT74YGX0H77S9RYM0R85V":3,"skill-same:01M6MXT74YGX0H77S9RYM0R85V":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M6MXT74YGX0H77S9RYM0R85V","test-writer",null,"Write unit test and scenario test case documents. Use when API specs exist in logos\u002Fresources\u002Fapi\u002F but logos\u002Fresources\u002Ftest\u002F is empty.","miniidealab\u002Fopenlogos","miniidealab","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4251156?v=4","01M6MX6BM454XESZCRPBQQHKRT","FredHuang","01M6MX6BR4417H4QA658D4GW9X",581,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fminiidealab\u002Fopenlogos\u002Fblob\u002Fmaster\u002Fplugin\u002Fskills\u002Ftest-writer\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37],"test","test writer","writer","documents","api","write","use","but","empty","scenario","resources","case","unit","unit test","2026-11-10 10:12:30",false,"---\nname: test-writer\ndescription: \"Write unit test and scenario test case documents. Use when API specs exist in logos\u002Fresources\u002Fapi\u002F but logos\u002Fresources\u002Ftest\u002F is empty.\"\n---\n\n# Skill: Test Writer\n\n> 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.\n\n## Trigger Conditions\n\n- User requests test case or test plan design\n- User mentions \"Phase 3 Step 3\", \"Step 3a\", \"test-first\", \"test design\"\n- Sequence diagrams already exist, and tests need to be designed before writing code\n- User specifies a scenario number (e.g., S01) that needs test design\n\n## Prerequisites\n\n- `logos\u002Fresources\u002Fprd\u002F3-technical-plan\u002F2-scenario-implementation\u002F` contains sequence diagrams (**required**)\n- `logos\u002Fresources\u002Fapi\u002F` contains API specifications (read if present, skip if absent — non-API projects may not have these)\n- `logos\u002Fresources\u002Fdatabase\u002F` contains DB DDL (read if present, skip if absent)\n- `logos\u002Fresources\u002Fprd\u002F1-product-requirements\u002F` contains requirements documents (for tracing acceptance criteria)\n\n**Cannot be skipped**: Regardless of project type, Step 3a (this Skill) must be executed.\n\n## Core Capabilities\n\n1. Extract unit test cases from API field constraints (type, format, length, enum)\n2. Extract unit test cases from DB constraints (UNIQUE, CHECK, NOT NULL, FK)\n3. Extract unit test cases from business rules and single-point error handling in EX exception cases\n4. Extract scenario test cases from sequence diagram Step sequences (happy path)\n5. Extract scenario test cases from EX exception cases (exception paths)\n6. Reverse-validate test coverage completeness against Phase 1\u002F2 acceptance criteria\n\n## Execution Steps\n\n### Step 1: Load Scenario Context\n\nRead the following files to establish complete context:\n\n- Sequence diagrams (`logos\u002Fresources\u002Fprd\u002F3-technical-plan\u002F2-scenario-implementation\u002F`)\n- API YAML (`logos\u002Fresources\u002Fapi\u002F`) — if present\n- DB DDL (`logos\u002Fresources\u002Fdatabase\u002F`) — if present\n- Phase 1 requirements documents (acceptance criteria)\n- Phase 2 product design documents (interaction-level acceptance criteria)\n\nConfirm the following for the current scenario:\n- **Step count**: How many Steps are in the sequence diagram\n- **EX count**: How many exception cases exist\n- **API endpoints**: Which endpoints are involved and their field constraints\n- **DB tables**: Which tables are involved and their constraints\n\n### Step 2: Design Unit Test Cases\n\nExtract unit test cases from three categories of sources:\n\n#### 2a: API Field Constraints\n\nInspect `requestBody` and `parameters` for each API endpoint:\n\n- `type` → Type error cases (passing incorrect types)\n- `format` (email, uuid, date-time) → Format validation cases\n- `minLength` \u002F `maxLength` → Boundary value cases (exactly at limit, exceeding by 1)\n- `required` → Required field missing cases\n- `enum` → Enumeration value cases (valid values + invalid values)\n- `minimum` \u002F `maximum` → Numeric range cases\n\n#### 2b: DB Constraints\n\nInspect constraints for each related table:\n\n- `UNIQUE` → Duplicate insertion cases\n- `NOT NULL` → Null value insertion cases\n- `CHECK` → Constraint violation cases\n- `FOREIGN KEY` → Referencing non-existent record cases\n- `DEFAULT` → Default value verification when no value is provided\n\n#### 2c: Business Rules\n\nExtract single-point business logic from sequence diagram Step descriptions and EX exception cases:\n\n- Permission checks (not logged in, insufficient permissions)\n- State machine transitions (only specific states allow certain operations)\n- Rate limiting \u002F throttling rules\n- Data computation logic (amount calculations, discount rules)\n\n**Format for each unit test case**:\n\n| Field | Description |\n|-------|-------------|\n| ID | `UT-{scenario-number}-{sequence}`, e.g., `UT-S01-01` |\n| Description | What behavior is being tested |\n| Source | Constraint origin (e.g., `auth.yaml → register → email: format:email`) |\n| Preconditions | State required before the test |\n| Input | Specific input values |\n| Expected Output | Expected return value or error message |\n\n### Step 3: Design Scenario Test Cases\n\nExtract scenario test cases from two categories of sources:\n\n#### 3a: Happy Path (Sequence Diagram Step Sequence)\n\nTreat the complete Step 1 → Step N sequence from the sequence diagram as an end-to-end code call chain:\n\n- Determine the scenario's entry and exit points\n- Annotate data passing between each Step (previous step's output as next step's input)\n- Verify the final state (database records, return values)\n\n#### 3b: Exception Paths (EX Exception Cases)\n\nExpand each EX exception case into a scenario test case:\n\n- Annotate which Step triggers the exception\n- Verify the handling logic after the exception is triggered (error response, compensation\u002Frollback)\n- Verify the exception did not compromise the integrity of other data\n\n**Format for each scenario test case**:\n\n| Field | Description |\n|-------|-------------|\n| ID | `ST-{scenario-number}-{sequence}`, e.g., `ST-S01-01` |\n| Description | What scenario flow is being tested |\n| Covered Steps | Which sequence diagram Steps are covered (e.g., `Step 1→6`) or which EX (e.g., `EX-2.1`) |\n| Preconditions | State and data required before the test |\n| Operation Sequence | Ordered list of operations following Step sequence |\n| Expected Result | Final state (return value + database state + side effects) |\n\n### Step 4: Coverage Validation\n\nReverse-validate whether test cases cover all critical constraints:\n\n- [ ] Each normal acceptance criterion from Phase 1 maps to at least 1 ST case\n- [ ] Each exception acceptance criterion from Phase 1 maps to at least 1 ST or UT case\n- [ ] Each EX exception case maps to at least 1 ST case\n- [ ] Each `required` field in the API has at least 1 UT case\n- [ ] Each `UNIQUE` \u002F `CHECK` constraint in the DB has at least 1 UT case\n\nIf any items are uncovered, add supplementary cases or explain the reason to the user.\n\n### Step 5: Acceptance Criteria Traceability\n\nExtract each GIVEN\u002FWHEN\u002FTHEN 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.\n\n#### Acceptance Criteria ID Rules\n\n- Format: `{scenario-number}-AC-{two-digit-sequence}`, e.g., `S01-AC-01`, `S01-AC-02`\n- Numbered in the order they appear in the requirements document; normal and exception criteria use a unified numbering sequence\n- AC IDs within the same scenario must be consecutive and unique\n\n#### Traceability Table Rules\n\n1. Read all acceptance criteria (normal + exception) for the current scenario from the requirements document\n2. Assign an AC ID to each acceptance criterion\n3. Find the test case IDs that cover each criterion (can be UT or ST), and fill in the \"Covered By\" column\n4. Each AC must be linked to at least 1 test case; if it cannot be covered, note the reason in the \"Covered By\" column\n\n`openlogos verify` parses this traceability table and links AC → test case ID → execution result across three layers to generate a complete acceptance traceability report.\n\n### Step 6: Output Test Case Specification Document\n\nOutput the test case specification document in Markdown format, organized by scenario.\n\n### Step 7: Guide Next Steps\n\nGuide the user to the next step based on project type:\n\n- **Involves API** → \"Continue to Step 3b to design API orchestration tests?\"\n- **Does not involve API** → \"Test design is complete. Recommend proceeding to code generation: say 'Implement based on the S01 specification for me'\"\n\n## Output Specification\n\n- **File format**: Markdown\n- **Location**: `logos\u002Fresources\u002Ftest\u002F`\n- **Naming convention**: `\u003Cmodule>-{scenario-number}-test-cases.md` (e.g., `core-S01-test-cases.md`; read current module from `modules[]` in `logos-project.yaml`, default is `core`)\n- Each file contains: Unit test cases (grouped by source) + Scenario test cases (happy path + exception paths)\n- Case IDs are globally unique: `UT-{scenario-number}-{sequence}` \u002F `ST-{scenario-number}-{sequence}`\n\n### Document Structure Template\n\n```markdown\n# {scenario-number}: {scenario-name} — Test Cases\n\n## 1. Unit Test Cases\n\n### 1.1 {group-name} (Source: {constraint-origin})\n\n| ID | Description | Source | Preconditions | Input | Expected Output |\n|----|-------------|--------|---------------|-------|-----------------|\n| UT-S01-01 | ... | ... | ... | ... | ... |\n\n## 2. Scenario Test Cases\n\n### 2.1 Happy Path: {scenario-name}\n\n| ID | Description | Covered Steps | Preconditions | Operation Sequence | Expected Result |\n|----|-------------|---------------|---------------|--------------------|-----------------|\n| ST-S01-01 | ... | Step 1→6 | ... | ... | ... |\n\n### 2.2 Exception Paths\n\n| ID | Description | Covered EX | Preconditions | Trigger Condition | Expected Result |\n|----|-------------|------------|---------------|-------------------|-----------------|\n| ST-S01-02 | ... | EX-2.1 | ... | ... | ... |\n\n## 3. Coverage Validation\n\n- [x] Phase 1 normal acceptance criteria: fully covered\n- [x] Phase 1 exception acceptance criteria: fully covered\n- [x] EX exception cases: fully covered\n- [x] API required fields: fully covered\n- [x] DB UNIQUE\u002FCHECK constraints: fully covered\n\n## 4. Acceptance Criteria Traceability\n\n| AC ID | Acceptance Criterion | Covered By |\n|-------|----------------------|------------|\n| S01-AC-01 | Normal: Fresh project initialization — create complete directory structure | ST-S01-01 |\n| S01-AC-02 | Normal: Confirm when explicit project name differs from config file | ST-S01-02 |\n| S01-AC-03 | Exception: Project already initialized — display error message | ST-S01-03, UT-S01-05 |\n```\n\n## Test Case ID Contract\n\nTest case IDs (`UT-S01-01`, `ST-S01-01`) serve as a **binding contract** between design documents and runtime:\n\n- IDs defined in test-cases.md must be used as-is in the generated test code\n- The test code reporter writes each case's ID and execution result to a JSONL file\n- `openlogos verify` maps execution results back to test case specifications via IDs, automatically determining acceptance\n- When modifying case IDs, the corresponding IDs in the test code must be updated simultaneously\n\nSee `logos\u002Fspec\u002Ftest-results.md` for the detailed JSONL format definition and reporter code templates for each language.\n\n## Best Practices\n\n- **Test cases are design documents, not code**: This Skill produces test case specifications in Markdown format; the actual test code is implemented by AI during Step 4 code generation based on these specifications\n- **Unit first, then scenario**: Unit test cases cover the correctness of individual functions; scenario tests cover cross-module integration — first ensure the building blocks are correct, then verify they fit together\n- **Don't overlook DB constraints**: Many bugs originate from database-level constraint violations; DB constraints are an important source of unit test cases\n- **Scenario tests focus on data passing**: Data passing between Steps (previous step's output → next step's input) is where errors most commonly occur\n- **EX exception cases must have corresponding scenario tests**: Every EX annotated in the sequence diagram should be reflected in scenario tests\n- **Boundary values first**: Unit test cases should prioritize boundary values (just valid, just invalid) over random values\n- **Complementary with test-orchestrator**: This Skill designs code-level tests (function call level); test-orchestrator designs API-level tests (HTTP request level). Together they cover different layers of the \"testing pyramid\"\n- **Case IDs are cross-phase contracts**: IDs span test-cases.md → test code → test-results.jsonl → acceptance-report.md; any inconsistency will cause `openlogos verify` to report incomplete results\n\n## Recommended Prompts\n\nThe following prompts can be copied directly for AI use:\n\n- `Design test cases for me`\n- `Design unit tests and scenario tests for S01`\n- `Design test cases for all P0 scenarios`\n- `Check the test coverage for S01`\n\n## Authority Closure 可证伪测试矩阵（规范引用）\n\n\n测试设计前读取 `spec\u002Fauthority-closure.md`、Authority Registry 和有效 sequence diagram。按 required `fact_id` 生成矩阵，不另建 owner\u002Fwriter 清单。\n\n每个 fact 至少覆盖 authority happy path、stale projection、conflicting old copy、legacy\u002Fconcurrent writer、response lost + new-process restart、projection rebuild、cutover rollback、forbidden reverse inference。确实不可发生的维度必须引用架构不变量给证据，不能静默省略。\n\n断言必须证明最终 decision\u002F恢复来源是 authority identity\u002Faction；故意让投影与权威值不同，restart 必须启新进程并保留旧残留。所有自动化 UT\u002FST\u002Fsmoke 使用真实 ID 并接入 OpenLogos reporter；漏任一 required 维度时测试规格不完成。\n","# Skill: Test Writer\n\n> 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.\n\n## Trigger Conditions\n\n- User requests test case or test plan design\n- User mentions \"Phase 3 Step 3\", \"Step 3a\", \"test-first\", \"test design\"\n- Sequence diagrams already exist, and tests need to be designed before writing code\n- User specifies a scenario number (e.g., S01) that needs test design\n\n## Prerequisites\n\n- `logos\u002Fresources\u002Fprd\u002F3-technical-plan\u002F2-scenario-implementation\u002F` contains sequence diagrams (**required**)\n- `logos\u002Fresources\u002Fapi\u002F` contains API specifications (read if present, skip if absent — non-API projects may not have these)\n- `logos\u002Fresources\u002Fdatabase\u002F` contains DB DDL (read if present, skip if absent)\n- `logos\u002Fresources\u002Fprd\u002F1-product-requirements\u002F` contains requirements documents (for tracing acceptance criteria)\n\n**Cannot be skipped**: Regardless of project type, Step 3a (this Skill) must be executed.\n\n## Core Capabilities\n\n1. Extract unit test cases from API field constraints (type, format, length, enum)\n2. Extract unit test cases from DB constraints (UNIQUE, CHECK, NOT NULL, FK)\n3. Extract unit test cases from business rules and single-point error handling in EX exception cases\n4. Extract scenario test cases from sequence diagram Step sequences (happy path)\n5. Extract scenario test cases from EX exception cases (exception paths)\n6. Reverse-validate test coverage completeness against Phase 1\u002F2 acceptance criteria\n\n## Execution Steps\n\n### Step 1: Load Scenario Context\n\nRead the following files to establish complete context:\n\n- Sequence diagrams (`logos\u002Fresources\u002Fprd\u002F3-technical-plan\u002F2-scenario-implementation\u002F`)\n- API YAML (`logos\u002Fresources\u002Fapi\u002F`) — if present\n- DB DDL (`logos\u002Fresources\u002Fdatabase\u002F`) — if present\n- Phase 1 requirements documents (acceptance criteria)\n- Phase 2 product design documents (interaction-level acceptance criteria)\n\nConfirm the following for the current scenario:\n- **Step count**: How many Steps are in the sequence diagram\n- **EX count**: How many exception cases exist\n- **API endpoints**: Which endpoints are involved and their field constraints\n- **DB tables**: Which tables are involved and their constraints\n\n### Step 2: Design Unit Test Cases\n\nExtract unit test cases from three categories of sources:\n\n#### 2a: API Field Constraints\n\nInspect `requestBody` and `parameters` for each API endpoint:\n\n- `type` → Type error cases (passing incorrect types)\n- `format` (email, uuid, date-time) → Format validation cases\n- `minLength` \u002F `maxLength` → Boundary value cases (exactly at limit, exceeding by 1)\n- `required` → Required field missing cases\n- `enum` → Enumeration value cases (valid values + invalid values)\n- `minimum` \u002F `maximum` → Numeric range cases\n\n#### 2b: DB Constraints\n\nInspect constraints for each related table:\n\n- `UNIQUE` → Duplicate insertion cases\n- `NOT NULL` → Null value insertion cases\n- `CHECK` → Constraint violation cases\n- `FOREIGN KEY` → Referencing non-existent record cases\n- `DEFAULT` → Default value verification when no value is provided\n\n#### 2c: Business Rules\n\nExtract single-point business logic from sequence diagram Step descriptions and EX exception cases:\n\n- Permission checks (not logged in, insufficient permissions)\n- State machine transitions (only specific states allow certain operations)\n- Rate limiting \u002F throttling rules\n- Data computation logic (amount calculations, discount rules)\n\n**Format for each unit test case**:\n\n| Field | Description |\n|-------|-------------|\n| ID | `UT-{scenario-number}-{sequence}`, e.g., `UT-S01-01` |\n| Description | What behavior is being tested |\n| Source | Constraint origin (e.g., `auth.yaml → register → email: format:email`) |\n| Preconditions | State required before the test |\n| Input | Specific input values |\n| Expected Output | Expected return value or error message |\n\n### Step 3: Design Scenario Test Cases\n\nExtract scenario test cases from two categories of sources:\n\n#### 3a: Happy Path (Sequence Diagram Step Sequence)\n\nTreat the complete Step 1 → Step N sequence from the sequence diagram as an end-to-end code call chain:\n\n- Determine the scenario's entry and exit points\n- Annotate data passing between each Step (previous step's output as next step's input)\n- Verify the final state (database records, return values)\n\n#### 3b: Exception Paths (EX Exception Cases)\n\nExpand each EX exception case into a scenario test case:\n\n- Annotate which Step triggers the exception\n- Verify the handling logic after the exception is triggered (error response, compensation\u002Frollback)\n- Verify the exception did not compromise the integrity of other data\n\n**Format for each scenario test case**:\n\n| Field | Description |\n|-------|-------------|\n| ID | `ST-{scenario-number}-{sequence}`, e.g., `ST-S01-01` |\n| Description | What scenario flow is being tested |\n| Covered Steps | Which sequence diagram Steps are covered (e.g., `Step 1→6`) or which EX (e.g., `EX-2.1`) |\n| Preconditions | State and data required before the test |\n| Operation Sequence | Ordered list of operations following Step sequence |\n| Expected Result | Final state (return value + database state + side effects) |\n\n### Step 4: Coverage Validation\n\nReverse-validate whether test cases cover all critical constraints:\n\n- [ ] Each normal acceptance criterion from Phase 1 maps to at least 1 ST case\n- [ ] Each exception acceptance criterion from Phase 1 maps to at least 1 ST or UT case\n- [ ] Each EX exception case maps to at least 1 ST case\n- [ ] Each `required` field in the API has at least 1 UT case\n- [ ] Each `UNIQUE` \u002F `CHECK` constraint in the DB has at least 1 UT case\n\nIf any items are uncovered, add supplementary cases or explain the reason to the user.\n\n### Step 5: Acceptance Criteria Traceability\n\nExtract each GIVEN\u002FWHEN\u002FTHEN 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.\n\n#### Acceptance Criteria ID Rules\n\n- Format: `{scenario-number}-AC-{two-digit-sequence}`, e.g., `S01-AC-01`, `S01-AC-02`\n- Numbered in the order they appear in the requirements document; normal and exception criteria use a unified numbering sequence\n- AC IDs within the same scenario must be consecutive and unique\n\n#### Traceability Table Rules\n\n1. Read all acceptance criteria (normal + exception) for the current scenario from the requirements document\n2. Assign an AC ID to each acceptance criterion\n3. Find the test case IDs that cover each criterion (can be UT or ST), and fill in the \"Covered By\" column\n4. Each AC must be linked to at least 1 test case; if it cannot be covered, note the reason in the \"Covered By\" column\n\n`openlogos verify` parses this traceability table and links AC → test case ID → execution result across three layers to generate a complete acceptance traceability report.\n\n### Step 6: Output Test Case Specification Document\n\nOutput the test case specification document in Markdown format, organized by scenario.\n\n### Step 7: Guide Next Steps\n\nGuide the user to the next step based on project type:\n\n- **Involves API** → \"Continue to Step 3b to design API orchestration tests?\"\n- **Does not involve API** → \"Test design is complete. Recommend proceeding to code generation: say 'Implement based on the S01 specification for me'\"\n\n## Output Specification\n\n- **File format**: Markdown\n- **Location**: `logos\u002Fresources\u002Ftest\u002F`\n- **Naming convention**: `\u003Cmodule>-{scenario-number}-test-cases.md` (e.g., `core-S01-test-cases.md`; read current module from `modules[]` in `logos-project.yaml`, default is `core`)\n- Each file contains: Unit test cases (grouped by source) + Scenario test cases (happy path + exception paths)\n- Case IDs are globally unique: `UT-{scenario-number}-{sequence}` \u002F `ST-{scenario-number}-{sequence}`\n\n### Document Structure Template\n\n```markdown\n# {scenario-number}: {scenario-name} — Test Cases\n\n## 1. Unit Test Cases\n\n### 1.1 {group-name} (Source: {constraint-origin})\n\n| ID | Description | Source | Preconditions | Input | Expected Output |\n|----|-------------|--------|---------------|-------|-----------------|\n| UT-S01-01 | ... | ... | ... | ... | ... |\n\n## 2. Scenario Test Cases\n\n### 2.1 Happy Path: {scenario-name}\n\n| ID | Description | Covered Steps | Preconditions | Operation Sequence | Expected Result |\n|----|-------------|---------------|---------------|--------------------|-----------------|\n| ST-S01-01 | ... | Step 1→6 | ... | ... | ... |\n\n### 2.2 Exception Paths\n\n| ID | Description | Covered EX | Preconditions | Trigger Condition | Expected Result |\n|----|-------------|------------|---------------|-------------------|-----------------|\n| ST-S01-02 | ... | EX-2.1 | ... | ... | ... |\n\n## 3. Coverage Validation\n\n- [x] Phase 1 normal acceptance criteria: fully covered\n- [x] Phase 1 exception acceptance criteria: fully covered\n- [x] EX exception cases: fully covered\n- [x] API required fields: fully covered\n- [x] DB UNIQUE\u002FCHECK constraints: fully covered\n\n## 4. Acceptance Criteria Traceability\n\n| AC ID | Acceptance Criterion | Covered By |\n|-------|----------------------|------------|\n| S01-AC-01 | Normal: Fresh project initialization — create complete directory structure | ST-S01-01 |\n| S01-AC-02 | Normal: Confirm when explicit project name differs from config file | ST-S01-02 |\n| S01-AC-03 | Exception: Project already initialized — display error message | ST-S01-03, UT-S01-05 |\n```\n\n## Test Case ID Contract\n\nTest case IDs (`UT-S01-01`, `ST-S01-01`) serve as a **binding contract** between design documents and runtime:\n\n- IDs defined in test-cases.md must be used as-is in the generated test code\n- The test code reporter writes each case's ID and execution result to a JSONL file\n- `openlogos verify` maps execution results back to test case specifications via IDs, automatically determining acceptance\n- When modifying case IDs, the corresponding IDs in the test code must be updated simultaneously\n\nSee `logos\u002Fspec\u002Ftest-results.md` for the detailed JSONL format definition and reporter code templates for each language.\n\n## Best Practices\n\n- **Test cases are design documents, not code**: This Skill produces test case specifications in Markdown format; the actual test code is implemented by AI during Step 4 code generation based on these specifications\n- **Unit first, then scenario**: Unit test cases cover the correctness of individual functions; scenario tests cover cross-module integration — first ensure the building blocks are correct, then verify they fit together\n- **Don't overlook DB constraints**: Many bugs originate from database-level constraint violations; DB constraints are an important source of unit test cases\n- **Scenario tests focus on data passing**: Data passing between Steps (previous step's output → next step's input) is where errors most commonly occur\n- **EX exception cases must have corresponding scenario tests**: Every EX annotated in the sequence diagram should be reflected in scenario tests\n- **Boundary values first**: Unit test cases should prioritize boundary values (just valid, just invalid) over random values\n- **Complementary with test-orchestrator**: This Skill designs code-level tests (function call level); test-orchestrator designs API-level tests (HTTP request level). Together they cover different layers of the \"testing pyramid\"\n- **Case IDs are cross-phase contracts**: IDs span test-cases.md → test code → test-results.jsonl → acceptance-report.md; any inconsistency will cause `openlogos verify` to report incomplete results\n\n## Recommended Prompts\n\nThe following prompts can be copied directly for AI use:\n\n- `Design test cases for me`\n- `Design unit tests and scenario tests for S01`\n- `Design test cases for all P0 scenarios`\n- `Check the test coverage for S01`\n\n## Authority Closure 可证伪测试矩阵（规范引用）\n\n\n测试设计前读取 `spec\u002Fauthority-closure.md`、Authority Registry 和有效 sequence diagram。按 required `fact_id` 生成矩阵，不另建 owner\u002Fwriter 清单。\n\n每个 fact 至少覆盖 authority happy path、stale projection、conflicting old copy、legacy\u002Fconcurrent writer、response lost + new-process restart、projection rebuild、cutover rollback、forbidden reverse inference。确实不可发生的维度必须引用架构不变量给证据，不能静默省略。\n\n断言必须证明最终 decision\u002F恢复来源是 authority identity\u002Faction；故意让投影与权威值不同，restart 必须启新进程并保留旧残留。所有自动化 UT\u002FST\u002Fsmoke 使用真实 ID 并接入 OpenLogos reporter；漏任一 required 维度时测试规格不完成。\n",{"name":5,"description":7},"master","abf55fdedadaeb660f928aa7258b9ec35d4ab003","plugin\u002Fskills\u002Ftest-writer",10,"https:\u002F\u002Fgithub.com\u002Fminiidealab\u002Fopenlogos","https:\u002F\u002Fgithub.com\u002Fminiidealab","2026-10-18 11:36:11",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add miniidealab\u002Fopenlogos --skill test-writer",{"tool":56,"command":57},"bunx","bunx skills add miniidealab\u002Fopenlogos --skill test-writer",{"tool":59,"command":60},"pnpm","pnpm dlx skills add miniidealab\u002Fopenlogos --skill test-writer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fminiidealab\u002Fopenlogos\u002Fblob\u002Fmaster\u002Fplugin\u002Fskills\u002Ftest-writer\u002FSKILL.md",true,[],[65,109,115,124,132,140],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":88,"publishedAt":38},"01M6MXX45142DGRFD9ZYPT5YC9","ui-ux-pro-max","UI\u002FUX design intelligence. 67 styles, 96 palettes, 57 font pairings, 25 charts, 13 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn\u002Fui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI\u002FUX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient. Integrations: shadcn\u002Fui MCP for component search and examples.","https:\u002F\u002Fgithub.com\u002Fminiidealab\u002Fopenlogos\u002Fblob\u002Fmaster\u002Fskills\u002Fui-ux-pro-max\u002FSKILL.md",[71,74,77,80,85],{"categoryNo":72,"categoryName":73,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":75,"categoryName":76,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":78,"categoryName":79,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":81,"categoryName":82,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",{"categoryNo":86,"categoryName":87,"taxonomyType":83,"taxonomyTypeDesc":84},"01JBSEEDCAT000000000000033","数据分析师",[89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108],"ui ux","pro","max","ui ux pro max","ui","ux","projects","mode","card","app","tsx","fix","improve","Tailwind","Charts","Animation","design","actions","MCP","search",{"skillNo":110,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":114,"publishedAt":38},"01M6MXWY8HJV93BBR8FPNJXAMV","https:\u002F\u002Fgithub.com\u002Fminiidealab\u002Fopenlogos\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-writer\u002FSKILL.md",[113],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[26,25,24],{"skillNo":116,"name":117,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":121,"publishedAt":38},"01M6MXWSAMN9AD3T8F6N099ZGY","test-orchestrator","https:\u002F\u002Fgithub.com\u002Fminiidealab\u002Fopenlogos\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-orchestrator\u002FSKILL.md",[120],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[122,123,24],"orchestrator","test orchestrator",{"skillNo":125,"name":126,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":38},"01M6MXWN29FY7K9ASMFRSPWQCN","slice-planner","https:\u002F\u002Fgithub.com\u002Fminiidealab\u002Fopenlogos\u002Fblob\u002Fmaster\u002Fskills\u002Fslice-planner\u002FSKILL.md",[],[130,131],"slice planner","planner",{"skillNo":133,"name":134,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":38},"01M6MXWFR1C1V66NSRTAM1FZPR","scenario-architect","https:\u002F\u002Fgithub.com\u002Fminiidealab\u002Fopenlogos\u002Fblob\u002Fmaster\u002Fskills\u002Fscenario-architect\u002FSKILL.md",[],[138,33,139],"architect","scenario architect",{"skillNo":141,"name":142,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":143,"categories":144,"keywords":145,"publishedAt":38},"01M6MXWD6ZCGPT4FDT580S8K96","project-init","https:\u002F\u002Fgithub.com\u002Fminiidealab\u002Fopenlogos\u002Fblob\u002Fmaster\u002Fskills\u002Fproject-init\u002FSKILL.md",[],[146,147,148],"project init","init","project"]