/verify
Execute your project tests and automatically update story test status in your tracking system. Verify is a core component of AgileFlow's session harness that ensures test validation throughout your development workflow.
Quick Start
# Run all tests and update all in-progress stories
/agileflow:verify
# Run tests and update specific story
/agileflow:verify US-0042The command will:
- Load test configuration from your project
- Execute the test suite
- Parse test results
- Update story test status (passing/failing)
- Display a clear report with visual indicators
Key Features
Automatic Test Parsing
Verify automatically detects and parses test results from:
| Framework | Example Output |
|---|---|
| Jest/Vitest (Node.js) | Tests: 42 passed, 42 total |
| Pytest (Python) | 42 passed in 2.5s |
| Cargo (Rust) | test result: ok. 42 passed |
| Go Test | ok github.com/user/project |
If parsing fails, it falls back to exit code (0 = passing, non-zero = failing).
Story Status Updates
Test results are automatically recorded in your stories:
{
"story_id": "US-0042",
"test_status": "passing",
"test_results": {
"last_run": "2025-12-06T10:30:00Z",
"command": "npm test",
"passed": 42,
"failed": 0,
"exit_code": 0,
"output_summary": "All tests passed (42/42)"
}
}Multi-Story Tracking
Without a specific story ID, verify updates all in_progress stories:
/agileflow:verify
# Updates test_status for:
# - US-0042: passing
# - US-0043: passing
# - US-0044: failingUsage
Run all tests
/agileflow:verifyExecutes your test suite and updates all in-progress stories with results.
Run tests for specific story
/agileflow:verify US-0042Runs tests and updates only US-0042's test status. Useful when you're working on just one story.
Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
STORY | No | All in-progress | Story ID to update (e.g., US-0042) |
Examples
Typical development workflow
# Make code changes...
# Verify tests still pass
/agileflow:verify
# Output:
# โ
PASSED | npm test | 42 passed, 0 failed | 12.3s
# Updated stories:
# - US-0042: passing
# - US-0043: passingTests failing - fix them
/agileflow:verify
# Output:
# โ FAILED | npm test | 40 passed, 2 failed | 8.7s
#
# Failed tests:
# โ auth.test.ts:42 - Expected redirect
# โ api.test.ts:67 - Session token not persisting
#
# Updated stories:
# - US-0042: failing
# - US-0043: failingBefore creating baseline
# Ensure all tests pass before marking a milestone
/agileflow:verify
# If passing:
/agileflow:baseline "Sprint 3 complete"
# If failing:
# (Fix tests first, then baseline)Output Format
Success Report
๐งช Test Verification Complete
Command: npm test
Duration: 12.3s
Result: โ
PASSED
Tests: 42 passed, 0 failed, 42 total
Updated stories:
- US-0042: passing
- US-0043: passing
All in-progress stories have passing tests โ
Failure Report
๐งช Test Verification Complete
Command: npm test
Duration: 8.7s
Result: โ FAILED
Tests: 40 passed, 2 failed, 42 total
Failed tests:
โ auth.test.ts:42
Expected redirect to /dashboard
Got redirect to /login
โ api.test.ts:67
Session token not persisting
Cookie not set after login
Updated stories:
- US-0042: failing
- US-0043: failing
โ ๏ธ WARNING: 2 stories now have failing testsTimeout
๐งช Test Verification Failed
Command: npm test
Result: โฑ๏ธ TIMEOUT (60s)
The test suite did not complete within 60 seconds.
Updated stories:
- US-0042: failing (timeout)
Consider:
1. Increase test_timeout_ms in environment.json
2. Optimize slow tests
3. Run specific test suites instead of all testsConfiguration
Verify uses settings from docs/00-meta/environment.json:
{
"test_command": "npm test",
"test_timeout_ms": 60000,
"project_type": "nodejs"
}To customize test behavior:
- Edit
docs/00-meta/environment.json - Change
test_commandto your command - Change
test_timeout_msto desired timeout - Run verify again
Prerequisites
Verify requires:
- Session harness initialized - Run
/agileflow:session:initfirst - docs/00-meta/environment.json - Test configuration file
- docs/09-agents/status.json - Story tracking
- Working tests - Your project must have a test suite
Initialize session harness
If you get a "Session harness not initialized" error:
/agileflow:session:initThis will:
- Detect your project type
- Create environment.json with test config
- Set up test verification for all stories
Integration with Other Commands
Verify is used automatically by:
| Command | When |
|---|---|
/babysit | After implementing code changes |
/baseline | Before creating verified checkpoints |
/session:resume | At start of work session |
/pr | Can include test status in PR description |
You can also run verify manually anytime to check status.
Common Scenarios
"Are my tests passing?"
/agileflow:verify
# Shows immediate pass/fail status with counts"Fix failing tests"
# See which tests failed
/agileflow:verify
# Fix the failing tests in your code editor
# Then verify again
/agileflow:verify
# Should show โ
PASSED now"One story failing, others passing"
# Check which story has failing tests
/agileflow:verify
# Review that story's test_status in output
# Focus on fixing just that story's tests
# Run verify with specific story to confirm fix
/agileflow:verify US-0042"Tests slow - taking too long"
# Timeout occurred
/agileflow:verify
# Options:
# 1. Increase timeout in environment.json
# 2. Run subset of tests: npm test -- --testPathPattern=auth
# 3. Optimize slow tests
# Increase timeout and try againTroubleshooting
"Session harness not initialized"
Error:
โ ๏ธ Session harness not initialized
Run /agileflow:session:init to set up test verificationFix:
/agileflow:session:init"Tests not found"
Error:
โ Test Command Failed
Command: npm test
Error: npm: command not foundFix:
- Install dependencies:
npm install - Verify test command in environment.json matches your setup
- Check PATH includes required tools
"Story not found"
Error:
โ ๏ธ Story US-0099 not found in status.json
Available in_progress stories:
- US-0042
- US-0043Fix:
- Verify story ID is correct (check status.json)
- Run without story ID to verify all in-progress stories
"Invalid status.json"
Error:
โ Cannot Update Status
File docs/09-agents/status.json is invalid or missing.Fix:
# Re-initialize AgileFlow setup
/agileflow:setupTips
Run tests frequently
# After every major change
/agileflow:verify
# Before committing
/agileflow:verify
# Before creating PR
/agileflow:verify
# Before baseline
/agileflow:verifyCatch regressions early
Verify automatically tracks test status by story, so you can:
- See when tests break (test_status changes)
- Identify which story introduced the failure
- Fix problems before they accumulate
Use with baseline
# Ensure all tests pass
/agileflow:verify
# If all passing:
/agileflow:baseline "Milestone complete"
# If any failing:
# (Fix first, then baseline)Related Commands
/babysit- Implementation mentor (runs verify automatically)/baseline- Create verified checkpoints (requires passing tests)/session:init- Initialize session harness/session:resume- Resume session (runs verify)/pr- Generate pull request (shows test status)
On This Page
/verifyQuick StartKey FeaturesAutomatic Test ParsingStory Status UpdatesMulti-Story TrackingUsageRun all testsRun tests for specific storyParametersExamplesTypical development workflowTests failing - fix themBefore creating baselineOutput FormatSuccess ReportFailure ReportTimeoutConfigurationPrerequisitesInitialize session harnessIntegration with Other CommandsCommon Scenarios"Are my tests passing?""Fix failing tests""One story failing, others passing""Tests slow - taking too long"Troubleshooting"Session harness not initialized""Tests not found""Story not found""Invalid status.json"TipsRun tests frequentlyCatch regressions earlyUse with baselineRelated Commands