Skip to content

Phase 1055: Smart Batching & Orchestration#25

Merged
wiseyoda merged 10 commits intomainfrom
1055-smart-batching-orchestration
Jan 22, 2026
Merged

Phase 1055: Smart Batching & Orchestration#25
wiseyoda merged 10 commits intomainfrom
1055-smart-batching-orchestration

Conversation

@wiseyoda
Copy link
Owner

Summary

  • Autonomous workflow execution with smart batching and auto-healing
  • Configuration modal for orchestration settings
  • State machine for design → analyze → implement → verify flow
  • Claude Helper utility for intelligent decisions
  • Progress UI with batch tracking
  • SSE-based real-time updates for phases

Test plan

  • Configuration modal appears with detected batch count
  • State machine transitions correctly
  • Batches execute sequentially
  • Skip options work (skipDesign, skipAnalyze)
  • Progress UI replaces action buttons during orchestration
  • Auto-merge works when enabled
  • Pauses at merge-ready when auto-merge disabled
  • USER GATE verified

🤖 Generated with Claude Code

wiseyoda and others added 10 commits January 22, 2026 03:12
Add orchestration infrastructure for automated workflow execution:

- Dashboard: New orchestration components, command palette enhancements,
  project card updates, and workflow skill picker improvements
- Services: Orchestration runner, batch parser, auto-healing service,
  Claude helper integration, and process reconciler
- Schemas: Batch item, orchestration config/execution, and Claude helper
- Flow commands: Enhanced orchestrate, design, implement, verify, merge,
  review, analyze, and memory commands with improved guidance
- Templates: New guides for error recovery, parallel execution, state
  lifecycle, user gates, goal coverage, and verification checklists
- CLI: Updated check command and phase open enhancements

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- CLI status no longer reports artifacts from old specs directories when
  no phase is active (phaseStatus is null or 'not_started')
- Dashboard shows "Start New Phase" instead of "Phase Unknown" when no
  phase is active

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Removed workflow spawn from API route - runner now solely responsible
  for spawning workflows, preventing race conditions that caused 3
  flow.design sessions to start
- Added logic in runner to spawn workflow when none exists for current phase
- This ensures single source of workflow spawning

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add orchestrationId field to WorkflowExecution for workflow-orchestration linking
- Add workflow queue check to prevent duplicate spawns during race conditions
- Add fallback workflow discovery via orchestrationId when stored ID is stale
- Add needs_attention status with recovery context for graceful error handling
- Add RecoveryPanel component with Retry/Skip/Abort actions
- Add /api/workflow/orchestrate/recover endpoint for recovery actions
- Update useOrchestration hook with recover() method and loading states
- Fix skip recovery action to properly transition to next phase
- Update tests with new mock methods

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The orchestration API was failing with "Could not find tasks.md" when
the phase was open but design hadn't been run yet (no artifacts exist).

- Add needsDesign() check for phases open without artifacts
- Allow starting orchestration when design needs to run first
- Pass null batchPlan when design is needed (like phaseNeedsOpen)
- Update response to indicate designNeeded status

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… modals

- Add /api/workflow/orchestrate/pause endpoint for pausing orchestrations
- Fix useOrchestration hook to call correct pause endpoint (was calling resume)
- Update orchestrationService.pause() and cancel() to actually kill Claude processes
- Add confirmation modal to Cancel button in orchestration controls
- Create SessionControls component with Pause/Cancel buttons for session console
- Add Pause button to session console (shows when orchestration is active)
- Fix premature verify transition by checking currentPhase !== 'implement'
- Add 'needs_attention' to hasActiveOrchestration check for progress visibility
- Return active workflow sessionId from orchestration status API

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The didSessionEndGracefully() function now uses multiple detection methods:
1. Stop hook feedback meta message (existing, most reliable)
2. Result type message from Claude CLI
3. Final assistant message without pending tool calls

This fixes workflows showing as "Failed: Process terminated unexpectedly"
when they actually completed successfully but didn't have a Stop hook marker.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Both usePhaseHistory and usePhaseDetail now poll every 10 seconds
to keep the phase card updated automatically. Previously the card
only updated on page refresh.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replaces the polling approach with proper SSE-based updates for ROADMAP.md
phases data, following the unified-data-context architecture guidelines.

Changes:
- Add PhasesData schema to @specflow/shared
- Add 'phases' SSE event type
- Update watcher.ts to watch ROADMAP.md and broadcast phase events
- Create roadmap-parser.ts shared utility for parsing ROADMAP.md
- Update unified-data-context and use-sse to handle phases
- Update use-phase-history hook to use SSE context instead of polling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@wiseyoda wiseyoda merged commit 834cc0b into main Jan 22, 2026
2 of 3 checks passed
@wiseyoda wiseyoda deleted the 1055-smart-batching-orchestration branch January 22, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant