Slash Command

/derive-tdd

Derive test skeleton files from an approved SDD specification document.

From universal-dev-standards
Install
1
Run in your terminal
$
npx claudepluginhub asiaostrich/universal-dev-standards --plugin universal-dev-standards
Command Content

/derive-tdd — Derive TDD Skeletons | 推演 TDD 測試骨架

Derive test skeleton files from an approved SDD specification document.

從已核准的 SDD 規格文件推演測試骨架檔案。

Workflow | 工作流程

SPEC-XXX.md ──► Parse AC ──► Generate .test.ts ──► Review
  1. Read the SDD spec and extract acceptance criteria
  2. Map each AC to a describe/it block with AAA pattern
  3. Generate test file with [TODO] markers for implementation
  4. Output derivation summary

Output Format | 輸出格式

describe('SPEC-001: [Feature Name]', () => {
  describe('AC-1: [AC description]', () => {
    it('should [expected behavior]', () => {
      // Arrange — [TODO]
      // Act — [TODO]
      // Assert — [TODO]
    });
  });
});

Usage | 使用方式

CommandPurpose用途
/derive-tdd specs/SPEC-001.mdDerive TDD from specific spec從特定規格推演 TDD
/derive-tddInteractive — ask for spec file互動式 — 詢問規格檔案

Reference | 參考

Stats
Parent Repo Stars46
Parent Repo Forks9
Last CommitFeb 9, 2026