一键导入
test-plan
Use when creating test plans from implementation and design documents. Provides test plan structure, test case tracking, and coverage guidelines.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when creating test plans from implementation and design documents. Provides test plan structure, test case tracking, and coverage guidelines.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run mixed Tauri Rust and TypeScript lint, typecheck, formatting, and verification commands. Use when Codex is asked to lint, check, test, verify, or prepare Rust/TypeScript/Tauri changes in a Tauri template project, especially after editing src-tauri, src, package.json, Taskfile.yml, flake.nix, or agent lint scripts.
Use when building, validating, publishing, or tap-rendering Homebrew formula releases for this Go project, including scripts/build-homebrew-release.sh, scripts/render-homebrew-formula.sh, Taskfile Homebrew tasks, GitHub Release assets, and tap formula verification.
Use when setting up or verifying Apple Developer ID signing credentials, app-specific passwords, kinko secret storage, local keychain identities, notarytool credentials, or macOS notarization readiness for this Swift Homebrew Cask workflow without exposing credential values.
Use when building, validating, publishing, or tap-rendering Homebrew formula tarball releases for this Swift project, including scripts/build-homebrew-release.sh, scripts/render-homebrew-formula.sh, and task build:homebrew or homebrew:formula commands.
Use when building, signing, notarizing, validating, publishing, or tap-rendering macOS Homebrew Cask DMG releases for this Swift project, including Apple Developer ID signing, scripts/build-homebrew-cask-release.sh, scripts/render-homebrew-cask.sh, and release:homebrew-cask-local.
Use when executing tasks from implementation plans. Provides task selection, parallel execution, progress tracking, and review cycle guidelines.
| name | test-plan |
| description | Use when creating test plans from implementation and design documents. Provides test plan structure, test case tracking, and coverage guidelines. |
| allowed-tools | Read, Write, Glob, Grep |
This skill provides guidelines for creating and managing test plans from implementation and design documents.
Apply this skill when:
Test plans bridge the gap between implementation (what was built) and verification (does it work correctly). They provide:
CRITICAL: Due to context limitations, test plans MUST use a divide-and-conquer approach.
IMPORTANT: Test plans and impl-plans do NOT need 1:1 mapping.
| Mapping | When to Use |
|---|---|
| 1:N (one impl -> multiple test plans) | Large implementations need focused test plans |
| N:1 (multiple impls -> one test plan) | Related modules can share integration tests |
| 1:1 (one impl -> one test plan) | Well-bounded features with clear test scope |
Recommended granularity:
CRITICAL: Large test plan files cause agent OOM errors.
| Metric | Limit | Reason |
|---|---|---|
| Line count | MAX 400 lines | Prevents memory issues |
| Test cases per plan | MAX 15 | Keeps plans focused |
| Modules per plan | MAX 5 | Enables focused testing |
Split a test plan into multiple files when:
BEFORE: session-groups-tests.md (too large)
AFTER:
- session-groups-unit-tests.md (~200 lines)
- session-groups-integration-tests.md (~200 lines)
- session-groups-e2e-tests.md (~150 lines)
IMPORTANT: All test plans MUST be stored under test-plans/.
test-plans/
├── README.md # Index of all test plans
├── PROGRESS.json # Test status tracking (single source of truth)
├── <feature>-unit.md # Unit test plans
├── <feature>-integration.md # Integration test plans
└── <feature>-e2e.md # End-to-end test plans
Each test plan file MUST include:
# <Feature Name> Test Plan
**Status**: Planning | Ready | In Progress | Completed
**Implementation Reference**: impl-plans/<file>.md
**Source Files**: src/<path>/*.ts
**Test Type**: Unit | Integration | E2E
**Created**: YYYY-MM-DD
**Last Updated**: YYYY-MM-DD
## Test Environment
**Runtime**: Bun test
**Mocks Required**: List of mock implementations needed
**Fixtures**: List of test fixtures needed
**Setup/Teardown**: Special requirements
Each test case MUST have:
### TEST-001: <Test Case Name>
**Status**: Not Started | In Progress | Passing | Failing | Skipped
**Priority**: Critical | High | Medium | Low
**Parallelizable**: Yes | No
**Dependencies**: None | TEST-XXX | other-plan:TEST-XXX
**Target**: `src/path/file.ts:functionName`
**Description**:
Brief description of what this test verifies.
**Scenarios**:
1. Happy path: <expected behavior>
2. Edge case: <expected behavior>
3. Error case: <expected behavior>
**Assertions**:
- [ ] Assertion 1
- [ ] Assertion 2
**Test Code Location**: `src/path/file.test.ts`
## Test Status
| Test ID | Name | Status | Priority | Dependencies |
|---------|------|--------|----------|--------------|
| TEST-001 | Basic parsing | Not Started | High | None |
| TEST-002 | Error handling | Not Started | High | TEST-001 |
| TEST-003 | Edge cases | Not Started | Medium | TEST-001 |
## Coverage Targets
| Module | Current | Target | Status |
|--------|---------|--------|--------|
| src/sdk/queue/types.ts | 0% | 90% | Not Started |
| src/sdk/queue/manager.ts | 0% | 85% | Not Started |
## Completion Criteria
- [ ] All test cases implemented
- [ ] All tests passing
- [ ] Coverage targets met
- [ ] No flaky tests
- [ ] Documentation updated
## Progress Log
### Session: YYYY-MM-DD HH:MM
**Tests Completed**: TEST-001, TEST-002
**Tests In Progress**: TEST-003
**Blockers**: None
**Notes**: Discovered edge case requiring additional test
TEST-XXX where XXX is zero-padded (001, 002, etc.)<plan-name>:TEST-XXXSame-plan dependency:
**Dependencies**: TEST-001
**Dependencies**: TEST-001, TEST-002
Cross-plan dependency:
**Dependencies**: session-groups-unit:TEST-001
No dependencies:
**Dependencies**: None
Tests can be parallelized when:
Parallelizable: Yes - Test can run independently Parallelizable: No - Test depends on other tests or shared state
CRITICAL: After creating a test plan, update test-plans/PROGRESS.json.
{
"lastUpdated": "2026-01-09T16:00:00Z",
"summary": {
"totalPlans": 10,
"totalTests": 150,
"passing": 0,
"failing": 0,
"notStarted": 150
},
"plans": {
"feature-unit": {
"status": "Ready",
"testType": "Unit",
"implRef": "impl-plans/feature.md",
"tests": {
"TEST-001": { "status": "Not Started", "priority": "High", "parallelizable": true, "deps": [] },
"TEST-002": { "status": "Not Started", "priority": "High", "parallelizable": false, "deps": ["TEST-001"] }
}
}
}
}
| Status | Meaning |
|---|---|
Not Started | Test not yet implemented |
In Progress | Test being written |
Passing | Test implemented and passing |
Failing | Test implemented but failing |
Skipped | Test intentionally skipped |
| Priority | Meaning |
|---|---|
Critical | Must pass for release |
High | Should pass for release |
Medium | Important but not blocking |
Low | Nice to have |
*.test.ts adjacent to sourcetest-plans/<feature>-<type>.md| Section | Required | Format |
|---|---|---|
| Header | Yes | Markdown metadata |
| Implementation Reference | Yes | Link + summary |
| Test Environment | Yes | Requirements list |
| Test Cases | Yes | Structured format with scenarios |
| Status Table | Yes | Simple table |
| Coverage Targets | Yes | Target percentages |
| Completion Criteria | Yes | Checklist |
| Progress Log | Yes | Session entries |