Skip to content

v9.2.0 - Feedback Loop Mechanism

Choose a tag to compare

@marcusgoll marcusgoll released this 21 Nov 02:26
· 132 commits to main since this release

Feedback Loop Mechanism for Epic and Feature Workflows

This release introduces a comprehensive feedback loop mechanism that enables iterative refinement of epic and feature workflows by automatically handling discovered implementation gaps during the validation phase.

✨ Key Features

Gap Discovery & Scope Validation

  • Automatic gap capture during /validate-staging phase
  • Interactive gap capture wizard (Invoke-GapCaptureWizard.ps1)
  • 4-check scope validation algorithm:
    • Objective mentioned check
    • Out of scope exclusion check
    • Subsystem alignment check
    • Acceptance criteria relationship check
  • Automatic classification: IN_SCOPE, OUT_OF_SCOPE, or AMBIGUOUS
  • Feature creep prevention: blocks gaps explicitly in "Out of Scope" section

Iteration System

  • workflow-state.yaml v3.0.0 with iteration tracking:
    • iteration.current, iteration.max_iterations (3), iteration.history
    • Gap statistics: discovered_count, in_scope_count, out_of_scope_count
    • Supplemental task tracking
  • Iteration limit enforcement to prevent infinite loops
  • Iteration-aware task filtering in /implement and /optimize
  • 40-60% performance improvement for iteration 2+ (focused quality gates)

Supplemental Task Generation

  • Automatic task creation for in-scope gaps (New-SupplementalTasks.ps1)
  • Smart dependency detection (30% keyword matching)
  • Generates implementation, test, and documentation tasks
  • Task ID continuation from previous iteration
  • Iteration markers in tasks.md: "## Iteration N: Gap Closure"

🛠️ New PowerShell Scripts

  • Invoke-ScopeValidation.ps1: Core validation algorithm
  • Invoke-GapCaptureWizard.ps1: Interactive gap collection
  • New-SupplementalTasks.ps1: Supplemental task generation

📋 New Templates

  • gaps-template.md: Gap documentation template
  • scope-validation-report-template.md: Detailed validation evidence

🔄 Command Integration

  • /validate-staging: Added Step 9 gap capture with --capture-gaps flag
  • /implement: Added Step 0.5 iteration detection and task filtering
  • /optimize: Added Step 0.5 iteration-specific quality gates
  • /epic continue and /feature continue: Iteration resume logic with gap summary

📚 Documentation

  • CLAUDE.md: Comprehensive "Feedback Loops (v10.0+)" section
  • Complete workflow diagram and example scenario
  • 7-step feedback loop process documentation

🐛 Fixes

  • Fixed PowerShell regex syntax in Invoke-ScopeValidation.ps1
  • Fixed PowerShell variable syntax in New-SupplementalTasks.ps1
  • Updated build-dist.js to include new feedback loop templates

🧪 Testing

  • Comprehensive test coverage: 100% pass rate on scope validation and task generation
  • Real-world Auth Epic scenario validation
  • Test summary: .spec-flow/testing/feedback-loop-test/TEST-SUMMARY.md

📖 Example Workflow

# 1. Complete iteration 1 implementation
/implement 001-auth-test

# 2. Optimize and deploy to staging
/optimize
/ship-staging

# 3. During staging validation, discover missing /v1/auth/me endpoint
/validate-staging
# → Prompt: "Discover any missing features? (y/N)" → y
# → Gap capture wizard launches

# 4. Gap validated as IN_SCOPE
# → Supplemental tasks generated (T031-T033)
# → workflow-state.yaml iteration.current = 2

# 5. Resume workflow for iteration 2
/feature continue
# → Shows gap summary
# → Executes only supplemental tasks (40-60% faster)

# 6. Re-deploy and validate
/optimize  # Focused quality gates
/ship-staging
/validate-staging  # No new gaps

# 7. Ship to production
/ship-prod
/finalize

Full Changelog: v9.1.0...v9.2.0