Skip to content

docs: add delegation-ladder rule doc (RIQAPP-1100) - #68

Merged
zaridan merged 2 commits into
mainfrom
docs/delegation-ladder
Jul 18, 2026
Merged

docs: add delegation-ladder rule doc (RIQAPP-1100)#68
zaridan merged 2 commits into
mainfrom
docs/delegation-ladder

Conversation

@zaridan

@zaridan zaridan commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Copies .claude/rules/delegation-ladder.md verbatim from the canonical source in the resonantiq repo (branch claude/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

  • Documentation
    • Added a “Delegation ladder” rule document covering tiered delegation across AI models and a human review tier.
    • Documented core delegation principles, escalation and retry behavior, and review/verification expectations.
    • Included guidance for sub-agent spawning, parallelization on non-overlapping work, evidence-first approaches, dry-run validation, and clearer agent/task labeling.

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>
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4c534c55-1b3d-4e26-be77-3b17d3ed8c54

📥 Commits

Reviewing files that changed from the base of the PR and between e9b53c9 and ef39ab8.

📒 Files selected for processing (1)
  • CLAUDE.md

📝 Walkthrough

Walkthrough

Adds delegation-ladder guidance covering model tiers, lead-agent selection, escalation, verification, sub-agent execution patterns, and repository-wide rule loading.

Changes

Delegation guidance

Layer / File(s) Summary
Delegation ladder rules and mechanics
.claude/rules/delegation-ladder.md, CLAUDE.md
Defines model-tier responsibilities, lead selection and escalation rules, no-upward delegation, sub-agent execution patterns, and imports the shared rule for repository sessions.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 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 summarizes the main change: adding the delegation-ladder rule document and related docs import.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/delegation-ladder

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 150e1f6 and e9b53c9.

📒 Files selected for processing (1)
  • .claude/rules/delegation-ladder.md

Comment on lines +1 to +5
# 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 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.)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 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.

Suggested 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.)
- **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>
@zaridan
zaridan merged commit ff0308d into main Jul 18, 2026
5 checks passed
@zaridan
zaridan deleted the docs/delegation-ladder branch July 18, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant