AgileFlow

/verify

PreviousNext

Run project tests and update story test status

/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-0042

The command will:

  1. Load test configuration from your project
  2. Execute the test suite
  3. Parse test results
  4. Update story test status (passing/failing)
  5. Display a clear report with visual indicators

Key Features

Automatic Test Parsing

Verify automatically detects and parses test results from:

FrameworkExample 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 Testok 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: failing

Usage

Run all tests

/agileflow:verify

Executes your test suite and updates all in-progress stories with results.

Run tests for specific story

/agileflow:verify US-0042

Runs tests and updates only US-0042's test status. Useful when you're working on just one story.

Parameters

ParameterRequiredDefaultDescription
STORYNoAll in-progressStory 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: passing

Tests 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: failing

Before 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 tests

Timeout

๐Ÿงช 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 tests

Configuration

Verify uses settings from docs/00-meta/environment.json:

{
  "test_command": "npm test",
  "test_timeout_ms": 60000,
  "project_type": "nodejs"
}

To customize test behavior:

  1. Edit docs/00-meta/environment.json
  2. Change test_command to your command
  3. Change test_timeout_ms to desired timeout
  4. Run verify again

Prerequisites

Verify requires:

  • Session harness initialized - Run /agileflow:session:init first
  • 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:init

This 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:

CommandWhen
/babysitAfter implementing code changes
/baselineBefore creating verified checkpoints
/session:resumeAt start of work session
/prCan 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 again

Troubleshooting

"Session harness not initialized"

Error:

โš ๏ธ  Session harness not initialized
Run /agileflow:session:init to set up test verification

Fix:

/agileflow:session:init

"Tests not found"

Error:

โŒ Test Command Failed
Command: npm test
Error: npm: command not found

Fix:

  • 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-0043

Fix:

  • 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:setup

Tips

Run tests frequently

# After every major change
/agileflow:verify
 
# Before committing
/agileflow:verify
 
# Before creating PR
/agileflow:verify
 
# Before baseline
/agileflow:verify

Catch 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)
  • /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)