基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/joshsymonds/gambit --skill testing-quality命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Turns a rough idea into an approved epic contract with immutable requirements, anti-patterns, and a first wave of executable tasks.
Turns a rough idea into an approved epic contract with immutable requirements, anti-patterns, and a first wave of executable tasks.
Executes an approved epic one wave at a time, dispatching a worker per task and stopping at a checkpoint after each wave. Use when an approved epic contract and native wave plan exist in the current root session, when resuming work after a previous checkpoint, or when iteratively building a feature and execution learnings require a later wave. User phrases like "continue the plan", "next wave", "resume where we left off", "pick up the epic".
| name | testing-quality |
| description | Audits an existing test suite for tests that pass without catching bugs, and specifies the replacements. |
| when_to_use | Use this implementation mechanic to audit an existing test suite only when explicitly invoked by name or called by an active Gambit workflow owner; do not select it implicitly as a peer workflow. |
| user_invokable | true |
Freedom: MEDIUM — corner-case discovery adapts to the codebase. Fixed: the phase order and the RED/YELLOW/GREEN criteria.
Audit test suites for real effectiveness, not vanity metrics. Identify tests that provide false confidence and missing corner cases. Create Tasks for improvements.
Audit test suites for real effectiveness, not vanity metrics. Identify tests that provide false confidence and missing corner cases. Present a complete improvement contract and worker briefs in the root transcript, with concise waves in the native plan.
Core principle: Tests must catch bugs, not inflate coverage metrics. Coverage measures execution, not assertion quality.
| Phase | Action | Output |
|---|---|---|
| 1 | Inventory all test files | Test catalog |
| 2 | Read production code | Context for analysis |
| 3 | Categorize (skeptical default) | RED/YELLOW/GREEN per test |
| 4 | Self-review all classifications | Validated categories |
| 5 | Line-by-line justification (MANDATORY for every RED/YELLOW) | Written justification per test |
| 6 | Discover missing corner cases | Gap analysis |
| 7 | Prioritize by business impact | Priority matrix |
| 8 | Create Tasks for improvements | Tracked improvement plan |
| 8 | Present improvement contract and worker briefs | Root-session implementation context |
Iron Law: Read production code BEFORE categorizing ANY test.
CRITICAL MINDSET: Assume tests were written by junior engineers optimizing for coverage metrics. A test is RED or YELLOW until proven GREEN.
Don't use when:
gambit:test-driven-developmentCreate complete catalog of tests to analyze. Use Glob and Grep to find all test files and count tests per module. Adapt file patterns to the language.
MANDATORY before categorizing ANY test.
For each test file:
Why: Without reading production code, you WILL miscategorize tests as GREEN when they're YELLOW or RED. Junior engineers commonly create test utilities and test THOSE instead of production code, or set up mocks that determine test outcomes.
Assume every test is RED or YELLOW until you have concrete evidence it's GREEN.
For EACH test, answer these four questions:
!= nil, testing fixtures → weak)Tests that pass by definition or test mocks instead of production code:
See REFERENCE.md for detailed code examples of each RED pattern.
Tests with real value but significant gaps:
!= nil or > 0 when exact values are availableSee REFERENCE.md for detailed code examples of each YELLOW pattern.
GREEN is the EXCEPTION, not the rule. A test is GREEN only if ALL four conditions are true:
!= nil)Before marking ANY test GREEN, you MUST state:
If you cannot fill in those blanks, the test is YELLOW at best.
Before finalizing ANY categorization, verify:
For each GREEN test:
For each YELLOW test:
If you have ANY doubt about a GREEN, downgrade to YELLOW.
MANDATORY for every RED or YELLOW classification.
This forces verification that your classification is correct by explaining exactly WHY the test is problematic.
Required format:
### [Test Name] - RED/YELLOW
**Test code (file:lines):**
- Line X: `code` - [what this line does]
- Line Y: `assertion` - [what this asserts]
**Production code it claims to test (file:lines):**
- [Brief description of what production code does]
**Why RED/YELLOW:**
- [Specific reason with line references]
- [What bug could slip through despite this test passing]
If you cannot write this justification, you haven't done the analysis properly.
For each module, identify missing corner case tests across these categories:
See REFERENCE.md for the complete corner case tables with specific examples and recommended test names.
| Priority | Criteria | Action Timeline |
|---|---|---|
| P0 - Critical | Auth, payments, data integrity | This sprint |
| P1 - High | Core business logic, user-facing | Next sprint |
| P2 - Medium | Internal tools, admin features | Backlog |
| P3 - Low | Utilities, non-critical paths | As time permits |
Create epic Task for test quality improvement, then subtasks for each action group (remove RED tests, strengthen YELLOW tests, add missing corner cases).
Each subtask must be:
Set dependencies so removal happens before additions.
See REFERENCE.md for epic and subtask templates.
Draft the complete test-quality epic contract and every full improvement worker brief. Group independent removals, assertion strengthening, and corner-case additions into waves.
Each worker brief must be:
For a fresh epic, obtain explicit user approval of the complete draft contract and every complete worker brief. Only after approval, present the full approved contract and briefs in the root transcript, then initialize the complete ordered plan with SessionPlanWrite and concise wave summaries.
Existing-plan checkpoint updates do not require new approval. When this analysis belongs to an already approved epic in the same root session, retain every complete new brief in the durable checkpoint first, then use SessionPlanWrite to replace the complete plan while preserving every existing wave status. Put prerequisite removals in an earlier wave than additions. Full evaluation and fix specifications never belong in plan steps.
See REFERENCE.md for transcript contract, worker brief, and complete wave-list templates.
Present results as a structured report. See REFERENCE.md for the complete output template.
Executive summary table:
| Metric | Count | % |
|---|---|---|
| Total tests analyzed | N | 100% |
| RED (remove/replace) | N | X% |
| YELLOW (strengthen) | N | X% |
| GREEN (keep) | N | X% |
| Missing corner cases | N | - |
Overall Assessment: CRITICAL / NEEDS WORK / ACCEPTABLE / GOOD
Don't:
Do:
Called by:
/gambit:testing-qualityCreates:
Workflow:
<!-- gambit-backend:claude -->
gambit:testing-quality → Analyze → Create improvement Tasks
<!-- /gambit-backend -->
<!-- gambit-backend:codex -->
gambit:testing-quality → Analyze → fresh: approve then initialize / existing: checkpoint then update
<!-- /gambit-backend -->
gambit:executing-plans → Implement improvements with TDD
gambit:verification → Verify improvements complete