From e939af06890e27e43ec44a9c7c33aaed266c25ac Mon Sep 17 00:00:00 2001 From: lmiranda Date: Mon, 2 Feb 2026 14:02:32 -0500 Subject: [PATCH] docs(projman): expand /test command documentation - Added sprint integration section (pre-close verification workflow) - Added concrete usage examples for all modes - Added edge cases table - Added DO NOT rules for both modes Co-Authored-By: Claude Opus 4.5 --- .doc-guardian-queue | 1 + plugins/projman/commands/test.md | 72 ++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/.doc-guardian-queue b/.doc-guardian-queue index 6d59e49..0be6d98 100644 --- a/.doc-guardian-queue +++ b/.doc-guardian-queue @@ -24,3 +24,4 @@ 2026-02-02T13:51:49 | skills | /home/lmiranda/claude-plugins-work/plugins/contract-validator/skills/validation-rules.md | README.md 2026-02-02T13:52:07 | skills | /home/lmiranda/claude-plugins-work/plugins/contract-validator/skills/mcp-tools-reference.md | README.md 2026-02-02T13:59:09 | skills | /home/lmiranda/claude-plugins-work/plugins/projman/skills/progress-tracking.md | README.md +2026-02-02T14:01:34 | commands | /home/lmiranda/claude-plugins-work/plugins/projman/commands/test.md | docs/COMMANDS-CHEATSHEET.md README.md diff --git a/plugins/projman/commands/test.md b/plugins/projman/commands/test.md index cc5925f..2df4020 100644 --- a/plugins/projman/commands/test.md +++ b/plugins/projman/commands/test.md @@ -93,6 +93,78 @@ Generate comprehensive tests for specified code. See `skills/test-standards.md` for test patterns and structure. +### DO NOT (Generate Mode) + +- Install dependencies without asking first +- Generate tests that import private/internal functions not meant for testing +- Overwrite existing test files without confirmation +- Generate tests with hardcoded values that should be environment-based + +--- + +## Sprint Integration + +The `/test` command plays a critical role in the sprint close workflow: + +1. After `/review` identifies code quality issues +2. Before `/sprint-close` finalizes the sprint +3. The code reviewer and orchestrator reference test results when deciding if a sprint is ready to close + +### Pre-Close Verification + +When running `/test run` before sprint close: + +1. **Identify sprint files** - Files changed in the current sprint (via git diff against development) +2. **Check test coverage** - Report which sprint files have tests and which don't +3. **Flag untested code** - Warn if new code has no corresponding tests +4. **Recommend action** - "READY FOR CLOSE" or "TESTS NEEDED: [list of untested files]" + +--- + +## Examples + +### Run all tests +``` +/test run +``` +Detects framework, runs full test suite, reports results. + +### Run with coverage +``` +/test run --coverage +``` +Same as above plus coverage percentage per file. + +### Generate tests for a specific file +``` +/test gen src/auth/jwt_service.py +``` +Analyzes the file, generates a test file at `tests/test_jwt_service.py`. + +### Generate specific test type +``` +/test gen src/api/routes/auth.py --type=integration +``` +Generates integration tests (request/response patterns) instead of unit tests. + +### Generate with specific framework +``` +/test gen src/components/Card.jsx --framework=vitest +``` +Uses Vitest instead of auto-detected framework. + +--- + +## Edge Cases + +| Scenario | Behavior | +|----------|----------| +| No test framework detected | List what was checked, ask user to specify test command | +| Tests fail | Report failures clearly, recommend "TESTS MUST PASS before sprint close" | +| No tests exist for sprint files | Warn with file list, offer to generate with `/test gen` | +| External services required | Ask for confirmation before running tests that need database/API | +| Mixed framework project | Detect all frameworks, ask which to run or run all | + --- ## Visual Output