- Add internal/graph package for dependency management - Implement DependencyGraph for task ordering - Support task dependencies and prerequisite tracking - Validate graph for cycles (no circular dependencies) - Topological sort for execution order (Kahn's algorithm) - Track task status (pending, completed, failed) - Get ready-to-execute tasks based on dependencies - Get tasks that depend on a given task - Check if task can execute (all deps complete) - Calculate critical path through graph - Task metadata support - 23 graph tests, all passing Features: - AddTask() - add task to graph - AddDependency(dependent, prerequisite) - specify ordering - ValidateGraph() - check for cycles - GetTopologicalOrder() - execution order - GetReadyTasks() - tasks ready to run - MarkCompleted(taskID) - mark as done - MarkFailed(taskID) - mark as failed - GetDependencies(taskID) - what task depends on - GetDependents(taskID) - what depends on task - CanExecuteTask(taskID) - check if ready - GetCriticalPath() - longest path in graph Graph Properties: - Directed acyclic graph (DAG) - Cycle detection (prevents deadlocks) - Multi-dependency support (diamond dependencies) - Status tracking (pending/completed/failed) - Thread-safe (RWMutex) - Kahn's algorithm for topological sort - O(V+E) for validation and sorting Example Usage: - T0.1 Analyze (no deps) - T0.2 Implement (depends on T0.1) - T0.3 Test (depends on T0.2) - T0.4 Review (depends on T0.2, T0.3) Ready Detection: - T0.1 ready (no dependencies) - After T0.1 complete: T0.2 ready - After T0.2 complete: T0.3 ready - After T0.2, T0.3 complete: T0.4 ready Test Coverage: - 23 dependency graph tests - Cycle detection verified - Topological sort tested - Multiple dependency chains - Diamond dependency patterns - Ready task calculation - Status tracking - Critical path calculation - Complex graphs (10+ tasks) - Metadata handling - Performance benchmarks Performance: - Cycle detection: O(V+E) DFS - Topological sort: O(V+E) Kahn's algorithm - Ready tasks: O(V) scan - Add task: O(1) - Add dependency: O(1) amortized Use Cases: - Workflow orchestration (T0.1 -> T0.2 -> T0.3 -> ...) - CI/CD pipelines (build -> test -> deploy) - Milestone hierarchies (T0 milestone with sub-tasks) - Parallel tasks with merge points (diamond deps) Next: T3.4 (Human-in-the-loop gates)
20 lines
2.0 KiB
Markdown
20 lines
2.0 KiB
Markdown
# Task Board — Milestone T3: Feature Expansion
|
||
|
||
**Submilestone:** T3 (Custom plugins, workflow templates, audit, advanced features)
|
||
|
||
| ID | Scope | Status | Branch | Verification |
|
||
|----|-------|--------|--------|--------------|
|
||
| T3.1 | Custom skill plugins: load user-defined skills from plugin registry (not just pi clone) | [x] | `task/T3.1` | Custom skill plugin loads, PrepareSkillsActivity calls plugin:// URLs |
|
||
| T3.2 | Workflow templates: save/load orchestrator config as YAML templates (not CLI flags only) | [x] | `task/T3.2` | Load template `templates/golang-project.yaml` → workflow configures Planner/Judge/Implementer for Go projects |
|
||
| T3.3 | Task dependency graph: specify task order (T0.2 must complete before T0.3 can start) | [x] | `task/T3.3` | Board supports `depends_on: [T0.1]` field, orchestrator respects ordering |
|
||
| T3.4 | Human-in-the-loop gates: pause workflow, require approval before proceeding to next task | [ ] | `task/T3.4` | Workflow waits for `approve-task` signal, Judge verdict is final (can't auto-retry after user approval) |
|
||
| T3.5 | Custom Judge implementations: swap default Judge for domain-specific validator (e.g., security auditor) | [ ] | `task/T3.5` | Register custom JudgeActivity, orchestrator uses it instead of default |
|
||
| T3.6 | Immutable audit trail: all Planner/Judge/Implementer decisions written to tamper-proof log | [ ] | `task/T3.6` | Audit log signed with per-workflow key, verification prevents tampering |
|
||
| T3.7 | Workflow composition: nest OrchestratorWorkflows (one orchestrator dispatches child orchestrators) | [ ] | `task/T3.7` | Multi-level task hierarchy: T0 milestone → T0.a/T0.b sub-milestones, each with own orchestrator |
|
||
| T3.8 | Integration with external task systems: import tasks from Linear, GitHub Issues, JIRA | [ ] | `task/T3.8` | Load board from GitHub Issues API, update issues with task completion status |
|
||
|
||
---
|
||
|
||
## Submission Criteria
|
||
All T3.1–T3.8 marked `[x]` → submilestone complete → squash-merge `task/T3.*` to main.
|