t1408.2: Wire task decomposition into dispatch pipeline#2997
t1408.2: Wire task decomposition into dispatch pipeline#2997marcusquinn merged 1 commit intomainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a robust system for pre-dispatch task decomposition, ensuring that overly large tasks are automatically broken down into manageable subtasks. By integrating a classification and decomposition helper script across various task dispatch mechanisms, the system aims to improve worker efficiency and prevent failures due to task over-scoping. This change streamlines the workflow by proactively managing task complexity before execution. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Fri Mar 6 15:51:20 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request integrates task decomposition into various dispatch pipelines, updating documentation in full-loop.md, new-task.md, pulse.md, headless-dispatch.md, and mission-orchestrator.md. The changes are well-documented and align with the PR's goal. My feedback focuses on improving the shell script examples in the documentation to align with the repository's guidelines on error handling, specifically by removing 2>/dev/null to improve debuggability. All original comments were kept as they do not contradict any provided rules.
Note: Security Review has been skipped due to the limited scope of the PR.
| DECOMPOSE_HELPER="$HOME/.aidevops/agents/scripts/task-decompose-helper.sh" | ||
|
|
||
| # Only run if the helper exists (t1408.1 must be merged) | ||
| if [[ -x "$DECOMPOSE_HELPER" && -n "$TASK_ID" ]]; then | ||
| # Check if subtasks already exist | ||
| EXISTING=$(/bin/bash "$DECOMPOSE_HELPER" classify --task-id "$TASK_ID" --repo-path "$(git rev-parse --show-toplevel)" --quiet 2>/dev/null) || EXISTING="" | ||
| EXISTING_KIND=$(echo "$EXISTING" | jq -r '.kind // "atomic"' 2>/dev/null || echo "atomic") | ||
|
|
||
| if [[ "$EXISTING_KIND" == "composite" ]]; then | ||
| EXISTING_SUBS=$(echo "$EXISTING" | jq -r '.existing_subtasks // empty' 2>/dev/null || echo "") | ||
| if [[ -n "$EXISTING_SUBS" && "$EXISTING_SUBS" != "[]" ]]; then | ||
| # Subtasks already exist — skip decomposition | ||
| echo "[t1408.2] Task $TASK_ID already has subtasks — proceeding with implementation" | ||
| fi | ||
| fi | ||
|
|
||
| # If no existing subtasks, classify the task description | ||
| if [[ -z "$EXISTING_SUBS" || "$EXISTING_SUBS" == "[]" ]]; then | ||
| CLASSIFY=$(/bin/bash "$DECOMPOSE_HELPER" classify --task "$TASK_DESC" --task-id "$TASK_ID" --repo-path "$(git rev-parse --show-toplevel)" --quiet 2>/dev/null) || CLASSIFY="" | ||
| TASK_KIND=$(echo "$CLASSIFY" | jq -r '.kind // "atomic"' 2>/dev/null || echo "atomic") | ||
| fi | ||
| fi |
There was a problem hiding this comment.
The bash example in this section uses 2>/dev/null to suppress errors from classify and jq commands. This practice hides valuable debugging information, such as API failures, malformed JSON, or missing dependencies, which goes against the repository's general rules. The || construct already handles command failures gracefully. Removing 2>/dev/null will make this example script more robust and easier to debug without changing its behavior on success.
DECOMPOSE_HELPER="$HOME/.aidevops/agents/scripts/task-decompose-helper.sh"
# Only run if the helper exists (t1408.1 must be merged)
if [[ -x "$DECOMPOSE_HELPER" && -n "$TASK_ID" ]]; then
# Check if subtasks already exist
EXISTING=$(/bin/bash "$DECOMPOSE_HELPER" classify --task-id "$TASK_ID" --repo-path "$(git rev-parse --show-toplevel)" --quiet) || EXISTING=""
EXISTING_KIND=$(echo "$EXISTING" | jq -r '.kind // "atomic"' || echo "atomic")
if [[ "$EXISTING_KIND" == "composite" ]]; then
EXISTING_SUBS=$(echo "$EXISTING" | jq -r '.existing_subtasks // empty' || echo "")
if [[ -n "$EXISTING_SUBS" && "$EXISTING_SUBS" != "[]" ]]; then
# Subtasks already exist — skip decomposition
echo "[t1408.2] Task $TASK_ID already has subtasks — proceeding with implementation"
fi
fi
# If no existing subtasks, classify the task description
if [[ -z "$EXISTING_SUBS" || "$EXISTING_SUBS" == "[]" ]]; then
CLASSIFY=$(/bin/bash "$DECOMPOSE_HELPER" classify --task "$TASK_DESC" --task-id "$TASK_ID" --repo-path "$(git rev-parse --show-toplevel)" --quiet) || CLASSIFY=""
TASK_KIND=$(echo "$CLASSIFY" | jq -r '.kind // "atomic"' || echo "atomic")
fi
fiReferences
- Avoid blanket error suppression with
2>/dev/nullin shell scripts. The||construct handles command failures, and leaving stderr visible is crucial for debugging issues like authentication failures, syntax errors, or missing dependencies.
| DECOMPOSE=$(/bin/bash "$DECOMPOSE_HELPER" decompose --task "$TASK_DESC" --task-id "$TASK_ID" --repo-path "$(git rev-parse --show-toplevel)" --quiet 2>/dev/null) | ||
| SUBTASK_COUNT=$(echo "$DECOMPOSE" | jq '.subtasks | length' 2>/dev/null || echo 0) |
There was a problem hiding this comment.
The bash example in this section uses 2>/dev/null to suppress errors. This practice hides valuable debugging information, which goes against the repository's general rules. The || construct can handle command failures gracefully. Removing 2>/dev/null will make this example script more robust and easier to debug. I've also added || DECOMPOSE="" to the first command to make it safer if set -e is active.
| DECOMPOSE=$(/bin/bash "$DECOMPOSE_HELPER" decompose --task "$TASK_DESC" --task-id "$TASK_ID" --repo-path "$(git rev-parse --show-toplevel)" --quiet 2>/dev/null) | |
| SUBTASK_COUNT=$(echo "$DECOMPOSE" | jq '.subtasks | length' 2>/dev/null || echo 0) | |
| DECOMPOSE=$(/bin/bash "$DECOMPOSE_HELPER" decompose --task "$TASK_DESC" --task-id "$TASK_ID" --repo-path "$(git rev-parse --show-toplevel)" --quiet) || DECOMPOSE="" | |
| SUBTASK_COUNT=$(echo "$DECOMPOSE" | jq '.subtasks | length' || echo 0) |
References
- Avoid blanket error suppression with
2>/dev/nullin shell scripts. The||construct handles command failures, and leaving stderr visible is crucial for debugging issues like authentication failures, syntax errors, or missing dependencies.
| CLASSIFY=$(/bin/bash "$DECOMPOSE_HELPER" classify --task "{title}" --quiet 2>/dev/null) || CLASSIFY="" | ||
| TASK_KIND=$(echo "$CLASSIFY" | jq -r '.kind // "atomic"' 2>/dev/null || echo "atomic") |
There was a problem hiding this comment.
The bash example in this section uses 2>/dev/null to suppress errors. This practice hides valuable debugging information, which goes against the repository's general rules. The || construct already handles command failures gracefully. Removing 2>/dev/null will make this example script more robust and easier to debug.
| CLASSIFY=$(/bin/bash "$DECOMPOSE_HELPER" classify --task "{title}" --quiet 2>/dev/null) || CLASSIFY="" | |
| TASK_KIND=$(echo "$CLASSIFY" | jq -r '.kind // "atomic"' 2>/dev/null || echo "atomic") | |
| CLASSIFY=$(/bin/bash "$DECOMPOSE_HELPER" classify --task "{title}" --quiet) || CLASSIFY="" | |
| TASK_KIND=$(echo "$CLASSIFY" | jq -r '.kind // "atomic"' || echo "atomic") |
References
- Avoid blanket error suppression with
2>/dev/nullin shell scripts. The||construct handles command failures, and leaving stderr visible is crucial for debugging issues like authentication failures, syntax errors, or missing dependencies.
| CLASSIFY_RESULT=$(/bin/bash ~/.aidevops/agents/scripts/task-decompose-helper.sh classify \ | ||
| --task "$TASK_DESC" --repo-path "$path" --quiet 2>/dev/null) || CLASSIFY_RESULT="" | ||
|
|
||
| # Parse result | ||
| TASK_KIND=$(echo "$CLASSIFY_RESULT" | jq -r '.kind // "atomic"' 2>/dev/null || echo "atomic") |
There was a problem hiding this comment.
The bash example in this section uses 2>/dev/null to suppress errors. This practice hides valuable debugging information, which goes against the repository's general rules. The || construct already handles command failures gracefully. Removing 2>/dev/null will make this example script more robust and easier to debug.
| CLASSIFY_RESULT=$(/bin/bash ~/.aidevops/agents/scripts/task-decompose-helper.sh classify \ | |
| --task "$TASK_DESC" --repo-path "$path" --quiet 2>/dev/null) || CLASSIFY_RESULT="" | |
| # Parse result | |
| TASK_KIND=$(echo "$CLASSIFY_RESULT" | jq -r '.kind // "atomic"' 2>/dev/null || echo "atomic") | |
| CLASSIFY_RESULT=$(/bin/bash ~/.aidevops/agents/scripts/task-decompose-helper.sh classify \ | |
| --task "$TASK_DESC" --repo-path "$path" --quiet) || CLASSIFY_RESULT="" | |
| # Parse result | |
| TASK_KIND=$(echo "$CLASSIFY_RESULT" | jq -r '.kind // "atomic"' || echo "atomic") |
References
- Avoid blanket error suppression with
2>/dev/nullin shell scripts. The||construct handles command failures, and leaving stderr visible is crucial for debugging issues like authentication failures, syntax errors, or missing dependencies.
| DECOMPOSE_RESULT=$(/bin/bash ~/.aidevops/agents/scripts/task-decompose-helper.sh decompose \ | ||
| --task "$TASK_DESC" --repo-path "$path" \ | ||
| --depth 0 --max-depth "${DECOMPOSE_MAX_DEPTH:-3}" --quiet 2>/dev/null) || DECOMPOSE_RESULT="" | ||
|
|
||
| SUBTASK_COUNT=$(echo "$DECOMPOSE_RESULT" | jq '.subtasks | length' 2>/dev/null || echo 0) |
There was a problem hiding this comment.
The bash example in this section uses 2>/dev/null to suppress errors. This practice hides valuable debugging information, which goes against the repository's general rules. The || construct already handles command failures gracefully. Removing 2>/dev/null will make this example script more robust and easier to debug.
| DECOMPOSE_RESULT=$(/bin/bash ~/.aidevops/agents/scripts/task-decompose-helper.sh decompose \ | |
| --task "$TASK_DESC" --repo-path "$path" \ | |
| --depth 0 --max-depth "${DECOMPOSE_MAX_DEPTH:-3}" --quiet 2>/dev/null) || DECOMPOSE_RESULT="" | |
| SUBTASK_COUNT=$(echo "$DECOMPOSE_RESULT" | jq '.subtasks | length' 2>/dev/null || echo 0) | |
| DECOMPOSE_RESULT=$(/bin/bash ~/.aidevops/agents/scripts/task-decompose-helper.sh decompose \ | |
| --task "$TASK_DESC" --repo-path "$path" \ | |
| --depth 0 --max-depth "${DECOMPOSE_MAX_DEPTH:-3}" --quiet) || DECOMPOSE_RESULT="" | |
| SUBTASK_COUNT=$(echo "$DECOMPOSE_RESULT" | jq '.subtasks | length' || echo 0) |
References
- Avoid blanket error suppression with
2>/dev/nullin shell scripts. The||construct handles command failures, and leaving stderr visible is crucial for debugging issues like authentication failures, syntax errors, or missing dependencies.
| for i in $(seq 0 $((SUBTASK_COUNT - 1))); do | ||
| SUB_DESC=$(echo "$DECOMPOSE_RESULT" | jq -r ".subtasks[$i].description") | ||
| SUB_ESTIMATE=$(echo "$DECOMPOSE_RESULT" | jq -r ".subtasks[$i].estimate // \"~2h\"") | ||
| SUB_DEPS=$(echo "$DECOMPOSE_RESULT" | jq -r ".subtasks[$i].depends_on | map(\"blocked-by:${TASK_ID}.\" + tostring) | join(\" \")" 2>/dev/null || echo "") |
There was a problem hiding this comment.
Suppressing stderr with 2>/dev/null hides valuable debugging information from jq, such as malformed JSON. The || construct already handles command failure gracefully. Please remove 2>/dev/null to align with repository guidelines and improve debuggability.
| SUB_DEPS=$(echo "$DECOMPOSE_RESULT" | jq -r ".subtasks[$i].depends_on | map(\"blocked-by:${TASK_ID}.\" + tostring) | join(\" \")" 2>/dev/null || echo "") | |
| SUB_DEPS=$(echo "$DECOMPOSE_RESULT" | jq -r ".subtasks[$i].depends_on | map(\"blocked-by:${TASK_ID}.\" + tostring) | join(\" \")" || echo "") |
References
- Avoid blanket error suppression with
2>/dev/nullin shell scripts. The||construct handles command failures, and leaving stderr visible is crucial for debugging issues like authentication failures, syntax errors, or missing dependencies.
|
PR has merge conflicts (DIRTY state). Needs rebase against main before it can be merged. Flagging for worker to rebase. |
|
Merge conflict detected after recent merges to main. Dispatching worker to rebase and resolve conflicts. |
Integrate the classify/decompose helper (from t1408.1) into the dispatch flow so large tasks are automatically decomposed before dispatch. Integration points: - pulse.md: Auto-classify before dispatch, create child tasks for composites - full-loop.md: Step 0.45 interactive/headless decomposition check - new-task.md: Step 5.5 classify at task creation time - headless-dispatch.md: Document pre-dispatch decomposition pattern - mission-orchestrator.md: Use same pipeline for feature decomposition The pipeline classifies tasks as atomic (dispatch directly) or composite (split into 2-5 subtasks with dependency edges), using haiku-tier LLM calls at ~$0.001/call. Catches over-scoped tasks before they waste worker slots.
39cdb68 to
c661e14
Compare
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Fri Mar 6 16:43:50 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
The || construct already handles command failures gracefully. Suppressing stderr with 2>/dev/null hides valuable debugging information (API failures, malformed JSON, missing dependencies) without changing success behavior. Addresses PR #2997 review feedback from Gemini Code Assist across all three dispatch entry points: full-loop, new-task, and pulse.
The || construct already handles command failures gracefully. Suppressing stderr with 2>/dev/null hides valuable debugging information (API failures, malformed JSON, missing dependencies) without changing success behavior. Addresses PR #2997 review feedback from Gemini Code Assist across all three dispatch entry points: full-loop, new-task, and pulse.



Summary
task-decompose-helper.sh(from t1408.1) into the dispatch flow so large tasks are automatically classified and decomposed before dispatchChanges
pulse.md— Auto-decomposition before dispatchfull-loop.md— Interactive decomposition (Step 0.45)DECOMPOSE_MAX_DEPTHenv var (default: 3)new-task.md— Decomposition at creation time (Step 5.5)blocked-by:edgesheadless-dispatch.md— Documentationmission-orchestrator.md— Same pipeline for missionsArchitecture
Blocked by
task-decompose-helper.shscript this PR integratesCloses #2985