Skip to content

t1418: Deduplicate claim-task-id.sh guidance (3x → 1x canonical)#3925

Merged
marcusquinn merged 3 commits intomarcusquinn:mainfrom
johnwaldo:chore/t1418-dedup-agents
Mar 9, 2026
Merged

t1418: Deduplicate claim-task-id.sh guidance (3x → 1x canonical)#3925
marcusquinn merged 3 commits intomarcusquinn:mainfrom
johnwaldo:chore/t1418-dedup-agents

Conversation

@johnwaldo
Copy link
Contributor

@johnwaldo johnwaldo commented Mar 8, 2026

Summary

  • Replaces duplicated claim-task-id.sh + gh issue create dedup logic in two locations with back-references to the single canonical "Cross-repo task creation" workflow
  • AGENTS.md line 60 (Self-Improvement → Framework-level routing): compressed from full workflow to "Follow the Cross-repo task creation workflow below"
  • build.txt line 248 (Self-improvement repo routing): compressed from full workflow to "Follow the Cross-repo task creation workflow above"

Before

The same claim-task-id.sh usage pattern with gh issue create dedup guard was written out in full 3 times:

  1. .agents/AGENTS.md line 60 (Self-Improvement section)
  2. .agents/AGENTS.md lines 162-167 (Cross-repo task creation — canonical)
  3. .agents/prompts/build.txt line 248 (Self-improvement repo routing)

Plus prompts/build.txt line 242 has its own canonical copy.

After

  • Location 1 → back-reference: "Follow the 'Cross-repo task creation' workflow below"
  • Location 3 → back-reference: "Follow the 'Cross-repo task creation' workflow above"
  • Locations 2 and build.txt:242 remain as the canonical definitions (one per file)

Verification

  • rg "Cross-repo task creation" confirms all back-references resolve to existing headings
  • No functional change — same guidance, single source of truth

Closes #3913

Summary by CodeRabbit

  • Documentation

    • Condensed task-routing guidance and clarified the cross-repo task creation workflow (claim ID → commit → issue).
    • Shortened self‑improvement routing notes and emphasized where to find the full routing heuristic.
  • Chores

    • Streamlined internal task routing documentation to reduce duplication and improve discoverability.

Replace duplicated claim-task-id.sh + gh-issue-create dedup logic in
Self-Improvement (AGENTS.md:60) and Self-improvement repo routing
(build.txt:248) with back-references to the canonical Cross-repo task
creation workflow.

Closes marcusquinn#3913
@johnwaldo
Copy link
Contributor Author

@coderabbitai review

@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 refactors the documentation related to creating self-improvement tasks and routing them to the correct repository. By replacing redundant, verbose instructions with concise back-references to a canonical workflow, it significantly improves the clarity, consistency, and maintainability of the guidance. The change ensures that all relevant documentation points to a single source of truth for the task creation process, reducing the likelihood of outdated or conflicting information.

Highlights

  • Guidance Deduplication: Replaced duplicated claim-task-id.sh and gh issue create logic in two locations with back-references to a single canonical 'Cross-repo task creation' workflow.
  • Documentation Streamlining: Compressed detailed workflow descriptions in .agents/AGENTS.md and .agents/prompts/build.txt into concise references, improving maintainability and consistency.
  • Single Source of Truth: Ensured that the claim-task-id.sh usage pattern and gh issue create dedup guard are defined canonically in only two locations (one per file), eliminating redundancy.
Changelog
  • .agents/AGENTS.md
    • Updated the 'Framework-level' routing guidance to reference the 'Cross-repo task creation' workflow instead of detailing the claim-task-id.sh and gh issue create steps.
  • .agents/prompts/build.txt
    • Modified the 'Self-improvement repo routing' section to refer to the 'Cross-repo task creation' workflow, removing the duplicated claim-task-id.sh and gh issue create instructions.
Activity
  • No human activity (comments, reviews) has been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 8, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • no-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b4131636-96b7-4fba-81b9-968ec37390c0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Consolidated agent guidance: replaced duplicated, detailed self-improvement and routing instructions with a short reference to the "Cross-repo task creation" workflow (claim ID → commit → issue) in framework docs and build prompts. No code or public API signatures changed.

Changes

Cohort / File(s) Summary
Agent guidance files
​.agents/AGENTS.md, ​.agents/prompts/build.txt
Replaced repeated/detailed routing and self-improvement workflow text with a concise pointer to the canonical "Cross-repo task creation" workflow (claim ID → commit → issue); deduplicated guidance and updated routing note for framework tasks.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

documentation

Poem

✨ Small edits, tidy and bright,
Docs converged into one clear light.
Claim an ID, commit with care,
Open an issue — workflow fair.
🎉 One guide now shows the way.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: deduplication of claim-task-id.sh guidance from 3 locations to 1 canonical reference.
Linked Issues check ✅ Passed The PR changes directly fulfill issue #3913 by replacing duplicated guidance with back-references to a canonical 'Cross-repo task creation' workflow in both AGENTS.md and build.txt.
Out of Scope Changes check ✅ Passed All changes are scoped to deduplication of claim-task-id.sh guidance; no extraneous modifications are present outside the stated objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 8, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively deduplicates the guidance for claim-task-id.sh by consolidating the instructions into a canonical location and using references in other places. The changes in .agents/AGENTS.md and .agents/prompts/build.txt improve maintainability by establishing a single source of truth. I have one suggestion for the change in .agents/AGENTS.md to improve clarity and consistency with the change in build.txt, specifically regarding the formatting of operational details for better agent understanding.

Note: Security Review has been skipped due to the limited scope of the PR.

**Route to the correct repo.** Not every improvement belongs in the current project. Before creating a self-improvement task, determine whether the problem is project-specific or framework-level:

- **Framework-level** — route to the aidevops repo. Indicators: the observation references files under `~/.aidevops/`, framework scripts (`ai-actions.sh`, `ai-lifecycle.sh`, `supervisor/`, `dispatch.sh`, `pre-edit-check.sh`, helper scripts), agent prompt behaviour, supervisor/pulse logic, or cross-repo orchestration. Use `claim-task-id.sh --repo-path <aidevops-repo-path> --title "description"` (resolve the slug from `~/.config/aidevops/repos.json`). Only run `gh issue create --repo <aidevops-slug>` if `claim-task-id.sh` was invoked with `--no-issue` or its output did not include a `ref=GH#` (or `ref=GL#` for GitLab) token — otherwise the issue already exists and a second `gh issue create` would produce a duplicate. The fix belongs in the framework, not in the project that happened to trigger it.
- **Framework-level** — route to the aidevops repo. Indicators: the observation references files under `~/.aidevops/`, framework scripts (`ai-actions.sh`, `ai-lifecycle.sh`, `supervisor/`, `dispatch.sh`, `pre-edit-check.sh`, helper scripts), agent prompt behaviour, supervisor/pulse logic, or cross-repo orchestration. Follow the "Cross-repo task creation" workflow below (claim ID → commit → issue). The fix belongs in the framework, not in the project that happened to trigger it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This instruction clarifies the 'Cross-repo task creation' workflow for the agent. Formatting this important operational detail as a bullet point, as suggested, significantly improves clarity and readability, ensuring the agent understands the context and proper routing. This aligns with the guideline to present critical operational information in an explicit and easily digestible format.

Suggested change
- **Framework-level** — route to the aidevops repo. Indicators: the observation references files under `~/.aidevops/`, framework scripts (`ai-actions.sh`, `ai-lifecycle.sh`, `supervisor/`, `dispatch.sh`, `pre-edit-check.sh`, helper scripts), agent prompt behaviour, supervisor/pulse logic, or cross-repo orchestration. Follow the "Cross-repo task creation" workflow below (claim ID → commit → issue). The fix belongs in the framework, not in the project that happened to trigger it.
- **Framework-level** — route to the aidevops repo. Indicators: the observation references files under `~/.aidevops/`, framework scripts (`ai-actions.sh`, `ai-lifecycle.sh`, `supervisor/`, `dispatch.sh`, `pre-edit-check.sh`, helper scripts), agent prompt behaviour, supervisor/pulse logic, or cross-repo orchestration. Follow the "Cross-repo task creation" workflow below (claim ID → commit → issue), targeting the aidevops repo path. The fix belongs in the framework, not in the project that happened to trigger it.
References
  1. For important operational details like task claiming, format them as bullet points for clarity and readability.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in 7f390ee. Added ", targeting the aidevops repo path" to make the routing target explicit. Good catch.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
.agents/prompts/build.txt (1)

248-248: Avoid keeping a second canonical workflow in build.txt.

This back-reference now depends on an in-file copy of the same workflow that already exists in .agents/AGENTS.md:162-167, so the two docs can still drift. If build.txt must stay self-contained, consider generating this block from AGENTS.md; otherwise, point to AGENTS.md directly.

Based on learnings: All instructions, documentation, and operational guidance should be maintained in AGENTS.md as the single source of truth

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.agents/prompts/build.txt at line 248, The "Self-improvement repo routing"
block in .agents/prompts/build.txt duplicates guidance already maintained in
.agents/AGENTS.md (around the "Self-Improvement" section) and risks drift;
remove the duplicate block from build.txt and either replace it with a
single-line pointer to .agents/AGENTS.md ("See AGENTS.md 'Self-Improvement'") or
make build.txt generate that section programmatically from AGENTS.md so
AGENTS.md remains the single source of truth; update any references to the
"Self-improvement repo routing" paragraph in build.txt to point to AGENTS.md and
ensure the cross-repo task creation heuristic (claim ID → commit → issue
targeting aidevops repo) is described only in AGENTS.md.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.agents/prompts/build.txt:
- Line 248: The "Self-improvement repo routing" block in
.agents/prompts/build.txt duplicates guidance already maintained in
.agents/AGENTS.md (around the "Self-Improvement" section) and risks drift;
remove the duplicate block from build.txt and either replace it with a
single-line pointer to .agents/AGENTS.md ("See AGENTS.md 'Self-Improvement'") or
make build.txt generate that section programmatically from AGENTS.md so
AGENTS.md remains the single source of truth; update any references to the
"Self-improvement repo routing" paragraph in build.txt to point to AGENTS.md and
ensure the cross-repo task creation heuristic (claim ID → commit → issue
targeting aidevops repo) is described only in AGENTS.md.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4dabc329-e925-4c43-8ef0-39d9517dbdf7

📥 Commits

Reviewing files that changed from the base of the PR and between f4a502c and 0e13d0f.

📒 Files selected for processing (2)
  • .agents/AGENTS.md
  • .agents/prompts/build.txt

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 8, 2026

Warning

Rate limit exceeded

@johnwaldo has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 15 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 52541b74-1e2c-4db7-876c-cff403f19b8c

📥 Commits

Reviewing files that changed from the base of the PR and between f4a502c and 0e13d0f.

📒 Files selected for processing (2)
  • .agents/AGENTS.md
  • .agents/prompts/build.txt
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@marcusquinn
Copy link
Owner

Dispatching fix worker to address 1 unresolved bot review suggestion.

  • Model: sonnet (anthropic/claude-sonnet-4-6)
  • Branch: chore/t1418-dedup-agents
  • Scope: Address 1 unresolved inline suggestion from coderabbit
  • Attempt: 1 of 3

…d pointer

Address CodeRabbit review: build.txt line 248 duplicated the full
framework-vs-project routing indicator list from AGENTS.md, risking
drift. Replace with a cross-reference to AGENTS.md 'Route to the
correct repo' while keeping the core principle and procedural
back-reference in-context.
@marcusquinn
Copy link
Owner

CodeRabbit nitpick addressed (build.txt line 248):

Replaced the duplicated routing heuristic (framework-vs-project indicator list) with a cross-reference to AGENTS.md "Route to the correct repo". The core principle and procedural back-reference remain in-context since build.txt is the system prompt and must be functional without AGENTS.md loaded.

What changed: The full indicator list (~/.aidevops/, framework scripts, agent prompt behaviour, supervisor/pulse logic) is now maintained only in AGENTS.md. build.txt points there for the detailed heuristic.

What was kept: The routing principle ("route to the correct repo"), the procedural reference ("use Cross-repo task creation workflow above"), and the warning about framework tasks in project repos — these are needed in-context for the system prompt to function.

Commit: f66f95b

@marcusquinn
Copy link
Owner

This PR is from an external contributor (@johnwaldo). Auto-merge is disabled for external PRs — a maintainer must review and merge manually.

@marcusquinn
Copy link
Owner

CodeRabbit nitpick (build.txt line 248) — dismissed, by design.

build.txt is the system prompt — it's loaded independently and must be self-contained enough to function without AGENTS.md in context. The "Cross-repo task creation" workflow exists in both files intentionally: each file is a standalone entry point for different agent contexts.

The previous commit (f66f95b8) already addressed the actionable part of this nitpick by replacing the duplicated routing heuristic (framework-vs-project indicator list) with a cross-reference to AGENTS.md. The procedural workflow (claim ID → commit → issue) remains in both files because both are loaded as system prompts independently.

Generating build.txt from AGENTS.md would add build complexity for a docs-only file with no runtime consumers — not worth the trade-off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor PR from external contributor, requires maintainer review needs-review-fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t1418: Deduplicate claim-task-id.sh guidance in .agents/AGENTS.md (3x → 1x)

2 participants