/baseline
Create verified checkpoints representing known-good states of your project. Baselines use git tags and metadata tracking to create safe reset points, compare test results over time, and track regressions from verified states.
Quick Start
# Create baseline (requires passing tests)
/agileflow:baseline
# Create with custom message
/agileflow:baseline "Sprint 3 complete - all features tested"
# Create for epic completion
/agileflow:baseline "EP-0005: User authentication complete"The command will:
- Verify tests are passing
- Verify git working tree is clean
- Create git tag with timestamp
- Update metadata (baseline_commit, baseline_history)
- Mark stories as verified at this baseline
- Display final verification report
Key Features
Safety Verification
Before creating baseline, verify:
- ✅ Tests passing - All tests must pass (0 failures)
- ✅ Clean git - No uncommitted changes
- ✅ Story tests passing - All in-progress stories have passing tests
- ✅ Session initialized - environment.json exists
If any check fails, baseline creation is blocked with clear instructions.
Timestamped Tags
Baselines create git tags with precise timestamps:
agileflow-baseline-20251222-143000
YYYYMMDD-HHMMSSUse these tags to:
- Reset to exact checkpoint:
git checkout agileflow-baseline-... - Compare versions:
git diff agileflow-baseline-20251206... agileflow-baseline-20251215... - Share with team:
git push origin agileflow-baseline-...
Metadata Tracking
All baseline information stored in:
docs/00-meta/environment.json
├─ baseline_commit: "abc123def456"
└─ baseline_established: "2025-12-06T14:30:00Z"
docs/09-agents/session-state.json
└─ baseline_history: [
{
"tag": "agileflow-baseline-20251206-143000",
"commit": "abc123def456",
"created_at": "2025-12-06T14:30:00Z",
"message": "Sprint 3 complete",
"test_count": 42,
"stories_verified": ["US-0043", "US-0044", "US-0045"]
}
]
docs/06-stories/US-0042.md (frontmatter)
└─ verified_at_baseline: "agileflow-baseline-20251206-143000"Baseline History
View all baselines created:
Baselines (most recent first):
1. agileflow-baseline-20251206-143000
Date: 2025-12-06 14:30:00
Message: Sprint 3 complete - all features tested
Tests: 42/42 passing
Stories: US-0043, US-0044, US-0045
2. agileflow-baseline-20251130-103000
Date: 2025-11-30 10:30:00
Message: Before auth refactor
Tests: 38/38 passing
Stories: US-0040, US-0041Usage
Basic baseline
/agileflow:baselineCreates baseline with default message "Baseline - all tests passing"
With custom message
/agileflow:baseline "Sprint 3 complete - 15 stories done"Meaningful messages help you remember what this baseline represents.
Multiline message
/agileflow:baseline "
Release v1.0 - Ready for production
All features tested and approved
Security audit passed
Performance benchmarks met
Documentation complete
"Parameters
| Parameter | Required | Default | Description |
|---|---|---|---|
MESSAGE | No | "Baseline - all tests passing" | Descriptive message for this baseline |
Examples
After epic completion
# All stories in EP-0005 are done and tested
/agileflow:baseline "EP-0005: User authentication complete"
# Output:
# ✅ Baseline Established
#
# Tag: agileflow-baseline-20251206-143000
# Commit: abc123def456
# Message: EP-0005: User authentication complete
# Tests: 42/42 passing
# Stories: US-0039, US-0040, US-0041, US-0042
#
# Epic is now marked as verified baseline!Before risky refactor
# Take safety checkpoint before refactoring
/agileflow:baseline "Before auth system refactor"
# Make changes...
# If something breaks, reset with:
# git checkout agileflow-baseline-20251206-143000Sprint completion
/agileflow:baseline "Sprint 12 complete - 15 stories finished, 58 tests passing"
# Sprint checkpoint created
# Can track progress across sprintsReady for release
/agileflow:baseline "v1.0 release candidate - all tests passing, security audit done"
# Release checkpoint saved
# Can reference later if issues ariseWorkflow
Pre-flight Checks
1. Check session harness initialized
└─ docs/00-meta/environment.json exists
2. Verify tests passing
└─ Run: npm test (or configured test command)
└─ Exit code must be 0
3. Check git working tree clean
└─ No uncommitted changes
└─ No untracked files
4. Verify story test status
└─ All in_progress stories have test_status: passingCreate Baseline
1. Generate tag name with timestamp
└─ agileflow-baseline-YYYYMMDD-HHMMSS
2. Get baseline message (from arg or user input)
└─ Default: "Baseline - all tests passing"
3. Create git annotated tag
└─ git tag -a "agileflow-baseline-..." -m "message"
4. Update environment.json
└─ baseline_commit: commit SHA
└─ baseline_established: ISO timestamp
5. Update session-state.json
└─ Add to baseline_history array
6. Update story metadata
└─ Each verified story gets verified_at_baseline tag
7. Display final reportOutput
Success Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Baseline Established
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Tag: agileflow-baseline-20251206-143000
Commit: abc123def456
Message: Sprint 3 complete - all features tested
Timestamp: 2025-12-06 14:30:00
Verification Status:
✅ Tests: 42/42 passing
✅ Stories: 3 verified (US-0043, US-0044, US-0045)
✅ Git: Clean working tree
✅ Branch: main
This baseline can be used to:
• Reset to known-good state (git checkout <tag>)
• Compare test results over time
• Track regression from this point
• Verify deployment readiness
Baseline saved in:
• Git tag: agileflow-baseline-20251206-143000
• environment.json: baseline_commit updated
• session-state.json: baseline history
• Story metadata: verified_at_baseline
To push baseline to remote:
git push origin agileflow-baseline-20251206-143000
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Failure: Tests Not Passing
❌ Cannot Create Baseline - Tests Failing
Command: npm test
Result: 2/42 tests failed
Failed tests:
❌ auth.test.ts:42 - Session timeout handling
❌ api.test.ts:15 - Rate limiting check
Baselines require all tests passing.
Options:
1. Fix failing tests
2. Skip failing tests (creates PARTIAL baseline)
3. Cancel baseline creation
Run /agileflow:verify to see full details
Then fix the tests and try again.Failure: Dirty Git
❌ Cannot Create Baseline - Uncommitted Changes
Working tree changes:
M src/components/Profile.tsx
M src/api/auth.ts
?? temp/debug.log
Baselines require clean git state.
Options:
1. Commit changes first
2. Stash changes and create baseline
3. Cancel baseline creation
Commit your changes and try again.Failure: Not Initialized
⚠️ Session Harness Not Initialized
The baseline command requires session harness configuration.
Run /agileflow:session:init to:
1. Detect your project type
2. Create environment.json
3. Enable baseline creation
Or manually create docs/00-meta/environment.jsonWhen to Create Baselines
Best Times
| When | Message |
|---|---|
| After epic completion | "EP-0005: User authentication complete" |
| After sprint ends | "Sprint 12 complete - 15 stories finished" |
| Before risky refactor | "Before auth system refactor" |
| Before major update | "Before updating TensorFlow" |
| At release milestone | "v1.0 release candidate" |
Benefits
- Reset point:
git checkout agileflow-baseline-...to go back - Regression detection: Compare current tests to baseline
- Progress tracking: Show evolution over time
- Release safety: Mark verified deployable state
- Team sharing: Push tags for team access
Advanced Features
Compare to Baseline
View what's changed since baseline:
# Show commits since baseline
git log agileflow-baseline-20251206-143000..HEAD
# Show code changes since baseline
git diff agileflow-baseline-20251206-143000..HEADList All Baselines
# Show all baseline tags
git tag -l "agileflow-baseline-*" --sort=version:refnameRestore from Baseline
# Create safety backup first
git checkout -b backup/pre-restore
# Restore to specific baseline
git checkout agileflow-baseline-20251206-143000
# Or restore to latest baseline
git checkout $(git tag -l "agileflow-baseline-*" --sort=version:refname | tail -1)Push to Team
# Push specific baseline to remote
git push origin agileflow-baseline-20251206-143000
# Push all baselines
git push origin "refs/tags/agileflow-baseline-*"Integration with Other Commands
| Command | Integration |
|---|---|
/verify | Baseline requires passing tests (runs verify) |
/babysit | Babysit guides to baseline at feature completion |
/pr | PR can reference baseline in description |
/session:init | Initializes baseline capability |
/session:resume | Checks baseline status at session start |
Typical Development Flow
Start Sprint
↓
Work on stories with /agileflow:babysit
↓
Verify tests with /agileflow:verify
↓
Code review with /agileflow:review
↓
Create PR with /agileflow:pr
↓
Merge PR
↓
Sprint complete - Run /agileflow:baseline
↓
Next sprintTips
Create frequently
# Weekly baselines
/agileflow:baseline "Week 50 complete"
# Per-epic baselines
/agileflow:baseline "EP-0005 complete"
# Pre-risky-change baselines
/agileflow:baseline "Before major refactor"Use meaningful messages
Good messages:
"Sprint 12 complete - user auth feature"
"v1.0 release candidate"
"Before TensorFlow upgrade"
"Payment integration verified"Bad messages:
"baseline"
"checkpoint"
"test"Push to remote for team
# Share baselines with team
git push origin agileflow-baseline-20251206-143000
# Team can check out shared baseline
git checkout agileflow-baseline-20251206-143000Track baselines over time
# See progression of baselines
git log --all --oneline --decorate | grep baseline
# Useful for tracking progress through projectRelated Commands
/verify- Run tests (required for baseline)/babysit- Implementation (ends with baseline suggestion)/session:init- Initialize baseline capability/session:resume- Start session with baseline check/pr- Generate PR (reference baseline if relevant)
On This Page
/baselineQuick StartKey FeaturesSafety VerificationTimestamped TagsMetadata TrackingBaseline HistoryUsageBasic baselineWith custom messageMultiline messageParametersExamplesAfter epic completionBefore risky refactorSprint completionReady for releaseWorkflowPre-flight ChecksCreate BaselineOutputSuccess ReportFailure: Tests Not PassingFailure: Dirty GitFailure: Not InitializedWhen to Create BaselinesBest TimesBenefitsAdvanced FeaturesCompare to BaselineList All BaselinesRestore from BaselinePush to TeamIntegration with Other CommandsTypical Development FlowTipsCreate frequentlyUse meaningful messagesPush to remote for teamTrack baselines over timeRelated Commands