t1408.3: Add lineage context to worker dispatch prompts#2989
t1408.3: Add lineage context to worker dispatch prompts#2989marcusquinn merged 6 commits intomainfrom
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
WalkthroughDocumentation updates to three dispatch guidance files that introduce structured lineage context blocks for worker prompts. When dispatching subtasks or mission features with parent/sibling relationships, prompts now include parent task descriptions, sibling task listings, and explicit rules to prevent duplication and maintain focus on the current task. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
🔍 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 05:38:12 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
This PR appears orphaned — no active worker process found and no activity for 6+ hours. Flagging for re-dispatch. If work is still in progress, remove the |
When dispatching workers for subtasks (task IDs with dots like t1408.3), dispatchers now include a structured TASK LINEAGE block in the prompt containing parent task description, sibling task descriptions, and scope-focusing rules. This prevents scope drift and duplicate work across parallel workers. Changes: - headless-dispatch.md: New 'Lineage Context for Subtask Workers' section with format spec, assembly instructions, and worker behavior rules - full-loop.md: New Step 1.7 for workers to parse and follow lineage context including stub dependency and PR body lineage sections - pulse.md: Updated dispatch templates for both regular subtasks and mission features to include lineage blocks when applicable
b0de8a2 to
48b8af2
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 17:09:41 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
The |
|
Re-ran 'Wait for AI Review Bots' check (stale failure from pre-fix workflow). PR #3006 merged the review-bot-gate rate-limit fix — this re-run uses the updated workflow on main. |
|
Re-triggering review-bot-gate after GH#3007 fix (bidirectional prefix matching for CodeRabbit status context). |
🔍 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 20:40:54 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
🔍 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 20:43:02 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
🔍 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 20:46:56 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
🔍 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 20:51:02 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
🔍 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 20:53:16 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
|
@coderabbitai review Review bots were rate-limited when this PR was created (affected: coderabbitai gemini-code-assist). Requesting a review retry. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
🧠 Learnings used✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.agents/scripts/commands/full-loop.md:
- Around line 418-427: The detection only looks for "TASK LINEAGE:" so the
helper's output ("PROJECT CONTEXT:" and the marker "<-- (this task)") is never
recognized; update the session-start detection that examines ARGUMENTS and sets
HAS_LINEAGE to accept both formats (e.g., look for "TASK LINEAGE:" OR "PROJECT
CONTEXT:" or the "<-- (this task)" marker) or else standardize the helper output
(task-decompose-helper.sh format-lineage) to emit the documented "TASK LINEAGE:"
block; modify the logic that inspects ARGUMENTS and sets HAS_LINEAGE accordingly
so downstream lineage parsing runs for either format.
In @.agents/scripts/commands/pulse.md:
- Around line 326-330: The grep/sed/cut lines that compute PARENT_DESC and
SIBLINGS currently read a bare TODO.md which uses the supervisor CWD; update
these commands to reference the target repository path (e.g., "$path/TODO.md" or
use git -C "$path" for lookups) so PARENT_ID, PARENT_DESC and SIBLINGS are built
from the dispatched repo’s TODO.md rather than the supervisor’s working
directory.
In @.agents/tools/ai-assistants/headless-dispatch.md:
- Around line 665-672: The preferred command shown (`task-decompose-helper.sh
format-lineage "$TASK_ID"`) is incorrect for the current helper (it doesn't
accept a task-id and emits "PROJECT CONTEXT:" not "TASK LINEAGE:"), so revert
this section to use the manual TODO.md assembly as the only supported path for
now (remove or replace the "Preferred" snippet that references format-lineage)
and add a short note saying the helper will be documented here once it accepts
task-id lookup and emits the "TASK LINEAGE:" block; reference the helper script
name (task-decompose-helper.sh), the nonexistent subcommand (format-lineage),
and the manual TODO.md assembly in the doc to make locating the change easy.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 08ae7616-4316-413f-bde8-d775b2eeec77
📒 Files selected for processing (3)
.agents/scripts/commands/full-loop.md.agents/scripts/commands/pulse.md.agents/tools/ai-assistants/headless-dispatch.md
| If the dispatch prompt contains a `TASK LINEAGE:` block (injected by the pulse or interactive dispatcher for subtasks), parse it at session start. This block tells you your place in a task hierarchy — what the parent task is, what sibling tasks exist, and what your specific scope is. | ||
|
|
||
| **Detection:** | ||
|
|
||
| ```bash | ||
| # Check if the dispatch arguments contain lineage context | ||
| if echo "$ARGUMENTS" | grep -q "TASK LINEAGE:"; then | ||
| HAS_LINEAGE=true | ||
| fi | ||
| ``` |
There was a problem hiding this comment.
Accept the helper’s current marker or this parser won’t fire.
Line 424 only detects TASK LINEAGE:, but the current task-decompose-helper.sh format-lineage output uses PROJECT CONTEXT: and <-- (this task). A dispatcher following the documented helper path will never set HAS_LINEAGE, so the new lineage rules are skipped entirely. Please either parse both formats here or align the helper/docs to one canonical block shape.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/scripts/commands/full-loop.md around lines 418 - 427, The detection
only looks for "TASK LINEAGE:" so the helper's output ("PROJECT CONTEXT:" and
the marker "<-- (this task)") is never recognized; update the session-start
detection that examines ARGUMENTS and sets HAS_LINEAGE to accept both formats
(e.g., look for "TASK LINEAGE:" OR "PROJECT CONTEXT:" or the "<-- (this task)"
marker) or else standardize the helper output (task-decompose-helper.sh
format-lineage) to emit the documented "TASK LINEAGE:" block; modify the logic
that inspects ARGUMENTS and sets HAS_LINEAGE accordingly so downstream lineage
parsing runs for either format.
| PARENT_ID="${TASK_ID%.*}" | ||
| PARENT_DESC=$(grep -E "^- \[.\] ${PARENT_ID} " TODO.md | head -1 \ | ||
| | sed -E 's/^- \[.\] [^ ]+ //' | sed -E 's/ #[^ ]+//g' | cut -c1-120) | ||
| SIBLINGS=$(grep -E "^ - \[.\] ${PARENT_ID}\.[0-9]+" TODO.md \ | ||
| | sed -E 's/^ - \[.\] ([^ ]+) (.*)/\1: \2/' | sed -E 's/ #[^ ]+//g') |
There was a problem hiding this comment.
Build lineage from the target repo, not the supervisor cwd.
This example runs in the pulse supervisor, which dispatches across many repos. Grepping bare TODO.md will read whichever directory the pulse happens to be in, so parent/sibling lineage can come back empty or from the wrong repo. Point the example at "$path/TODO.md" (or use git -C "$path" for the lookup) so the lineage block is assembled from the repo being dispatched.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/scripts/commands/pulse.md around lines 326 - 330, The grep/sed/cut
lines that compute PARENT_DESC and SIBLINGS currently read a bare TODO.md which
uses the supervisor CWD; update these commands to reference the target
repository path (e.g., "$path/TODO.md" or use git -C "$path" for lookups) so
PARENT_ID, PARENT_DESC and SIBLINGS are built from the dispatched repo’s TODO.md
rather than the supervisor’s working directory.
| When `task-decompose-helper.sh` (t1408.1) is available, use its `format-lineage` subcommand instead of manual assembly: | ||
|
|
||
| ```bash | ||
| # Preferred: use helper for consistent formatting | ||
| LINEAGE_BLOCK=$(task-decompose-helper.sh format-lineage "$TASK_ID") | ||
|
|
||
| # Fallback: manual assembly from TODO.md (see above) | ||
| ``` |
There was a problem hiding this comment.
Document the helper exactly as it exists today.
The “preferred” command here does not match the current helper API: task-decompose-helper.sh format-lineage "$TASK_ID" is unsupported, and the helper still emits PROJECT CONTEXT: rather than the TASK LINEAGE: block described above. As written, this path can’t produce the documented format. Please either keep the manual TODO.md assembly as the only supported path for now, or update this section after the helper accepts task-id-based lookup and emits the same block shape.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.agents/tools/ai-assistants/headless-dispatch.md around lines 665 - 672, The
preferred command shown (`task-decompose-helper.sh format-lineage "$TASK_ID"`)
is incorrect for the current helper (it doesn't accept a task-id and emits
"PROJECT CONTEXT:" not "TASK LINEAGE:"), so revert this section to use the
manual TODO.md assembly as the only supported path for now (remove or replace
the "Preferred" snippet that references format-lineage) and add a short note
saying the helper will be documented here once it accepts task-id lookup and
emits the "TASK LINEAGE:" block; reference the helper script name
(task-decompose-helper.sh), the nonexistent subcommand (format-lineage), and the
manual TODO.md assembly in the doc to make locating the change easy.
When review bots are rate-limited at PR creation time, they post quota notices instead of formal reviews. The pulse's zero-reviews gate then blocks the PR indefinitely — bots never come back to retry. Add a deterministic request-retry command that detects rate-limited bot comments, posts @coderabbitai review to trigger a retry, and is idempotent (safe to call every pulse cycle). Validated on PR #2989 which was stuck for 24+ hours due to this gap.



Summary
TASK LINEAGEblock format for worker dispatch prompts when dispatching subtasks (task IDs with dots liket1408.3)Changes
.agents/tools/ai-assistants/headless-dispatch.mdNew "Lineage Context for Subtask Workers" section with:
TASK LINEAGE:+LINEAGE RULES:)task-decompose-helper.sh format-lineage(t1408.1).agents/scripts/commands/full-loop.mdNew Step 1.7 "Parse Lineage Context" for workers to:
TASK LINEAGE:block in dispatch arguments.agents/scripts/commands/pulse.mdTask Lineage
This task is part of a decomposed parent task:
Cross-task stubs
task-decompose-helper.sh format-lineageas a future integration point (t1408.1) — documented as optional fallback, not a hard dependencyTesting
sibling tasks|lineage context|ancestor chainverified present inheadless-dispatch.mdCloses #2986
Summary by CodeRabbit