docs: add delegation-ladder rule doc (RIQAPP-1100) - #68
Conversation
Copy .claude/rules/delegation-ladder.md verbatim from the resonantiq canonical source so this repo shares the same delegation guidance. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds delegation-ladder guidance covering model tiers, lead-agent selection, escalation, verification, sub-agent execution patterns, and repository-wide rule loading. ChangesDelegation guidance
Estimated code review effort: 1 (Trivial) | ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.claude/rules/delegation-ladder.md:
- Around line 1-5: Restore the RIQAPP-1100 ticket reference in the “Delegation
ladder” document if this PR is expected to satisfy that traceability contract;
otherwise update the related objective or canonical copy to remove the
requirement. Keep the reference aligned with the project’s established
ticket-linking format.
- Line 35: Update the “Don’t-delegate floor” guidance and the “investigate
before editing” requirement in the delegation ladder to explicitly exempt
trivial changes the lead can verify directly. Preserve the
evidence-gathering-agent requirement for assumption-based changes that are not
trivial, while allowing the lead to proceed without delegation when direct
verification is sufficient.
- Line 51: Update the “Parallelize on disjoint write-sets” guidance in
delegation-ladder.md to remove the claim that worktrees guarantee disjoint
write-sets. Clarify that worktrees isolate checkout and branch state only, while
shared tickets, external services, and other side effects still require
sequencing; preserve the explicit disjoint-write-set requirement.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 04baaea0-9f40-493b-b63e-b90daf4a88af
📒 Files selected for processing (1)
.claude/rules/delegation-ladder.md
| # Delegation ladder | ||
|
|
||
| **Pick the cheapest tier that is reliable for the task.** | ||
|
|
||
| The ladder, principles, and patterns apply on every surface (Code, Chat, Cowork, Design). The Mechanics section applies only where the surface can spawn sub-agents (currently Code and Cowork); elsewhere, apply the principles to whatever decomposition the surface allows. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Restore the RIQAPP-1100 reference if it is part of this PR’s contract.
The PR objective says this document references RIQAPP-1100, but the supplied file contains no ticket reference. Add it or update the objective/canonical copy so the intended traceability requirement is met.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.claude/rules/delegation-ladder.md around lines 1 - 5, Restore the
RIQAPP-1100 ticket reference in the “Delegation ladder” document if this PR is
expected to satisfy that traceability contract; otherwise update the related
objective or canonical copy to remove the requirement. Keep the reference
aligned with the project’s established ticket-linking format.
|
|
||
| - **Review invariant.** Reviewer ≠ author, and reviewer tier ≥ author tier. When the lead authors an artifact itself, the reviewer is a *parallel* agent at the lead's own tier — a Fable lead gets a parallel Fable reviewer, an Opus lead a parallel Opus reviewer — so the review is independent of the author's context. | ||
| - **Verification vs. review litmus.** If the checklist can be written in advance, it's verification — Haiku runs it. If the reviewer has to generate the checklist, it's review — it goes up-ladder. | ||
| - **Don't-delegate floor.** If writing a self-contained spec costs more than doing the task, the lead does it directly. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Qualify the “investigate before editing” requirement.
Line 50 requires launching an evidence-gathering agent before any assumption-based change, while line 35 says not to delegate when specification cost exceeds task cost. Add an exception for trivial work the lead can verify directly.
Suggested wording
- Investigate before editing. Launch an evidence-gathering agent before changing anything based on an assumption — including the user's stated assumption.
+ Investigate before editing. Verify assumptions before changing anything, launching an evidence-gathering agent when the task is above the don't-delegate floor.Also applies to: 50-50
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.claude/rules/delegation-ladder.md at line 35, Update the “Don’t-delegate
floor” guidance and the “investigate before editing” requirement in the
delegation ladder to explicitly exempt trivial changes the lead can verify
directly. Preserve the evidence-gathering-agent requirement for assumption-based
changes that are not trivial, while allowing the lead to proceed without
delegation when direct verification is sufficient.
| ## Patterns that work | ||
|
|
||
| - **Investigate before editing.** Launch an evidence-gathering agent before changing anything based on an assumption — including the user's stated assumption. Surface contradictions with evidence instead of encoding them into the change. | ||
| - **Parallelize on disjoint write-sets.** Independent agents go in a single message so they run concurrently; sequence only when one agent's output feeds another's prompt. "Independent" means disjoint write-sets — no shared files, branches, or tickets — not merely unrelated prompts. Anything sharing a write target gets sequenced. (In Code, worktrees give you disjoint write-sets by construction.) |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
Do not claim that worktrees guarantee disjoint write-sets.
Worktrees isolate checkout/branch state, but not shared tickets, external services, or other side effects. Keep the independent-write-set requirement explicit.
Suggested wording
- (In Code, worktrees give you disjoint write-sets by construction.)
+ (In Code, worktrees can isolate checkout write-sets; still verify shared tickets and external side effects.)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - **Parallelize on disjoint write-sets.** Independent agents go in a single message so they run concurrently; sequence only when one agent's output feeds another's prompt. "Independent" means disjoint write-sets — no shared files, branches, or tickets — not merely unrelated prompts. Anything sharing a write target gets sequenced. (In Code, worktrees give you disjoint write-sets by construction.) | |
| - **Parallelize on disjoint write-sets.** Independent agents go in a single message so they run concurrently; sequence only when one agent's output feeds another's prompt. "Independent" means disjoint write-sets — no shared files, branches, or tickets — not merely unrelated prompts. Anything sharing a write target gets sequenced. (In Code, worktrees can isolate checkout write-sets; still verify shared tickets and external side effects.) |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.claude/rules/delegation-ladder.md at line 51, Update the “Parallelize on
disjoint write-sets” guidance in delegation-ladder.md to remove the claim that
worktrees guarantee disjoint write-sets. Clarify that worktrees isolate checkout
and branch state only, while shared tickets, external services, and other side
effects still require sequencing; preserve the explicit disjoint-write-set
requirement.
Import .claude/rules/delegation-ladder.md from the repo's root CLAUDE.md so the rule is actually loaded (not just present) on any surface that reads this repo — Claude Code, Cowork, Claude Design. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copies
.claude/rules/delegation-ladder.mdverbatim from the canonical source in the resonantiq repo (branchclaude/delegation-ladder-install-acdfv7, PR #1367) so this repo shares the same delegation-ladder guidance across surfaces.Refs RIQAPP-1100.
🤖 Generated with Claude Code
Summary by CodeRabbit