testing
Testing
Given task file path .plans/<project>/testing/NNN-task.md:
Process
Use TodoWrite to track testing validation:
☐ Validate existing tests (behavior-focused?)
☐ Check coverage of Validation checklist items
☐ Identify gaps (empty/null, boundaries, errors)
☐ Add tests for genuine gaps
☐ Run coverage (>80% statements, >75% branches)
☐ Update task status
- Validate existing tests - behavior-focused? Covers Validation?
- Identify gaps - empty/null inputs, boundaries, errors, race conditions, security
- Add minimal tests if genuinely missing
- Run coverage - verify >80% statements, >75% branches
- Update task status using Edit tool:
- Find:
**Status:** [current status] - Replace:
**Status:** READY_FOR_REVIEW
- Find:
- Append testing notes using Edit tool (add to end of task file):
**testing:** Validated [N] tests (behavior-focused) Added [M] edge cases: - [Test description] - [Test description] Test breakdown: Unit: X | Integration: Y | Total: Z Coverage: Statements: XX% | Branches: XX% | Functions: XX% | Lines: XX% Full suite: XXX/XXX passing Working Result verified: ✓ [description] - Report completion
Test Quality
Good: expect(response.status).toBe(401) (tests behavior)
Bad: expect(bcrypt.compare).toHaveBeenCalled() (tests implementation)
Granularity: Pure functions → Unit | DB/API → Integration | Critical workflows → E2E (rare)
Failure Handling
If tests fail or coverage <80%:
- Fix test scenarios first
- If code bug found:
- Update status using Edit tool: Find
**Status:** [current status]→ Replace**Status:** NEEDS_FIX - Append notes using Edit tool (append to end of file):
**testing:** Found issues: - [Specific issue] - [Specific issue] Requires code fixes. Moving back to implementation.
- Update status using Edit tool: Find
Completion
When testing is complete (status updated to READY_FOR_REVIEW or NEEDS_FIX):
- Report:
✅ Testing complete. Status: [STATUS]
More from dhruvbaldawa/ccconfigs
claude-md-authoring
Creates and reviews CLAUDE.md configuration files for Claude Code. Applies HumanLayer guidelines including instruction budgets (~50 user-level, ~100 project-level), WHAT/WHY/HOW framework, and progressive disclosure. Identifies anti-patterns like using Claude as a linter for style rules.
10writing-documentation
Produces concise, clear documentation by applying Elements of Style principles. Use when writing or improving any technical documentation (READMEs, guides, API docs, architecture docs). Not for code comments.
6writing-like-me
Write content in Dhruv Baldawa's authentic voice and style. Use when creating blog posts, LinkedIn posts, emails, documentation, technical writing, opinion pieces, or any written content that should sound like Dhruv. Triggers on requests like "write this as me", "draft in my voice", "write a blog post", "create a LinkedIn post", "help me write", or any content creation where the user wants their personal voice applied.
2blog-writing
Write blog posts in Dhruv Baldawa's distinctive voice - conversational yet analytical, grounded in personal experience, with clear structure and practical insights optimized for Substack. Use when writing or revising draft.md, translating ideas from braindump into polished prose.
2reviewing-code
Reviews implemented code for security, quality, performance, and test coverage using specialized review agents with clear accountability. Use when task file is in review/ directory. Launches Security Gatekeeper, Quality Guardian, and Test Auditor in parallel.
2brainstorming
Collaborative ideation for projects and writing. Ask clarifying questions, suggest angles, challenge assumptions, and help refine vague ideas into concrete requirements or topics. Use when exploring ideas before planning or drafting.
2