Files
gps-denied-onboard/.claude/commands/implement/references/batching-algorithm.md
T
Oleksandr Bezdieniezhnykh 3b27b69cc0 refactor(implement): update SKILL and batching algorithm for sequential task execution
- Changed the implementation strategy to execute tasks sequentially instead of in parallel, enhancing clarity and control.
- Updated documentation to reflect the new execution model, emphasizing dependency-aware batching and integrated code review.
- Revised the batching algorithm to ensure tasks are grouped for review while maintaining sequential execution within each batch.
- Removed references to parallel subagents and adjusted task ownership checks accordingly.

This refactor aims to streamline the implementation process and improve the overall workflow.
2026-04-21 20:32:47 +03:00

1.3 KiB

Batching Algorithm Reference

Topological Sort with Batch Grouping

The /implement skill uses a topological sort to determine execution order, then groups tasks into batches for code review and commit. Execution within a batch is sequential — no subagents, no parallelism.

Algorithm

  1. Build adjacency list from _dependencies_table.md
  2. Compute in-degree for each task node
  3. Initialize the ready set with all nodes that have in-degree 0
  4. For each batch: a. Select up to 4 tasks from the ready set (default batch size cap) b. Implement the selected tasks one at a time in topological order c. When all tasks in the batch complete, remove them from the graph and decrement in-degrees of dependents d. Add newly zero-in-degree nodes to the ready set
  5. Repeat until the graph is empty

Ordering Inside a Batch

Tasks inside a batch are executed in topological order — a task is only started after every task it depends on (inside the batch or in a previous batch) is done. When two tasks have the same topological rank, prefer the lower-numbered (more foundational) task first.

Complexity Budget

Each batch should not exceed 20 total complexity points. If it does, split the batch and let the user choose which tasks to include. The budget exists to keep the per-batch code review scope reviewable.