Conversation
Comprehensive orchestration hardening with structured context schema, event-driven completion detection, file conflict detection, produces_for prompt injection, retry escalation, progress streaming, merge validation, and 44 bats tests. Key changes: - Define 6-section structured context schema (Project Setup, File Patterns, Conventions, Key Decisions, Known Issues, Task History) for execution_context.md and per-task context files with automatic compaction at 10+ entries - Embed full 4-phase execution workflow in task-executor.md (414 lines) with verification rules and result file format validation - Implement event-driven completion detection (watch-for-results.sh with fswatch) with adaptive polling fallback (poll-for-results.sh with configurable intervals) - Create PostToolUse validation hook (validate-result.sh) for result-task-*.md files with .invalid rename for failures - Add pre-wave file conflict detection using regex pattern matching to prevent concurrent file edits - Implement produces_for prompt injection mechanism for upstream task output propagation with "CONTEXT FROM COMPLETED DEPENDENCIES" header - Add 3-tier retry escalation: Standard → Context Enrichment → User Escalation with AskUserQuestion for user involvement - Add progress streaming at session/wave granularity with completion summaries - Implement post-wave merge validation with auto-repair and force compaction logic for execution_context.md - Create comprehensive bats test suite: 19 tests for validation hook, 14 for polling, 11 for watching (44 total, all passing) - Update create-tasks skill to 9-phase workflow with Phase 6 for produces_for relationship detection Execution results: 16/16 tasks PASS, 0 retries, 75m 50s execution time, 1,276,713 total tokens. All hardening features validated and 44/44 tests passing.
- Add --phase argument to create-tasks for incremental phase generation - Implement Phase 4: Select Phases with interactive multi-select for 2-3 phases, two-step flow for 4+ phases, and merge mode support - Phase 2: Extract spec_phase metadata from existing tasks for phase-aware merge - Phase 3: Add Phase Extraction sub-step to parse Section 9 Implementation Plan (headers, deliverables, completion criteria, checkpoint gates, cross-references) - Phase 5: Hybrid phase-aware decomposition from Section 5 features and Section 9 deliverables with spec_phase/spec_phase_name metadata on every task - Phase 6: Implement 3-scenario cross-phase dependency handling (current generation, prior generation merge mode, missing predecessor phases) - Phase 8: Add phase annotations to preview (PHASES, PREREQUISITES sections) - Phase 10: Add phase-related error handling - Add --phase filtering to execute-tasks with AND logic for --task-group - Update session ID generation to incorporate phase (multi-tier resolution) - Update orchestration.md Step 1 and 5.5 for phase filtering and session IDs - Update dependency-inference.md Section 9 mapping with 3 scenarios - Verify cross-file consistency: phase numbering (1-10), metadata field names, AskUserQuestion option counts (2-4), scenario alignment - All changes are backward compatible: spec_phase/spec_phase_name omitted when no phases exist
New 947-line reference document for understanding and modifying the execute-tasks orchestration engine. Covers: - 10-step orchestration loop with full procedures - Wave-based parallelism and topological task sorting - Pre-wave file conflict detection - Event-driven completion detection with polling fallback - Batch result processing and 3-tier retry escalation - 6-section structured context merge protocol - Session management and interrupted session recovery - Hook integration (auto-approve and validation) - 5 architectural flow diagrams (Mermaid) - Appendix with environment variables, critical invariants, and modification reference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.