fix: restore delegation directive after f831fd2 regression#46
Conversation
Regression in f831fd2 removed every surface that made the main agent actually delegate: - orchestrator_stub.md was cut from 68 lines to 23, leaving one lone MUST - require_delegation.py replaced the exit-2 block with a whisper ("delegate?") - technical-adaptive.md output style primed direct-action ("after completing an edit, respond with ONE sentence") This restores soft-enforcement strength without bringing back hard blocks: - Stub gains "What counts as work" and "What you MUST NOT do" sections with explicit self-catch instruction - Nudge messages are imperative ("STOP. Abandon this step and run: ...") from the first violation - Output style clarifies the main agent is an orchestrator, not executor; completion example now describes summarizing a delegation, not an edit Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan Review Summary by QodoRestore delegation directive strength without hard blocks
WalkthroughsDescription• Restores delegation enforcement across three surfaces weakened by f831fd2
• Nudge messages now imperative ("STOP. Abandon...") from first violation
• Stub gains explicit "work" definition and self-catch directive
• Output style reframes main agent as orchestrator, not executor
Diagramflowchart LR
A["Regression f831fd2<br/>weakened delegation"] -->|Stub| B["Add work definition<br/>& self-catch"]
A -->|Nudge| C["Imperative messages<br/>from violation #1"]
A -->|Output Style| D["Reframe as<br/>orchestrator"]
B --> E["Soft enforcement<br/>restored"]
C --> E
D --> E
File Changes1. hooks/PreToolUse/require_delegation.py
|
Code Review by Qodo
1.
|
- tests/test_require_delegation.py: update assertions for new imperative nudge messages (no more "delegate?"/"nudge"/"WARNING" substrings; length-scaling relaxed to monotonic) - CLAUDE.md, README.md, CHANGELOG.md: refresh soft-enforcement ladder docs to quote the new messages (3-4 and 5+ rows collapsed into 3+) - system-prompts/orchestrator_stub.md: add /workflow-orchestrator:ask to allowed-tools list (was contradictory with routing guidance); add NotebookEdit to MUST NOT list + work-tool enumeration to match hooks/PreToolUse/require_delegation.py WORK_TOOLS Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
/agentic_review |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
system-prompts/orchestrator_stub.md) gains explicit "work" definition, MUST NOT list, and self-catch directive.hooks/PreToolUse/require_delegation.py) rewrites messages to be imperative and action-specifying from violation Enhance agents in delegate #1.output-styles/technical-adaptive.md) removes the direct-action "after completing an edit" prime and reframes the main agent as orchestrator.Test plan
/workflow-orchestrator:delegateinstead of calling Read/Edit/Bash directlyuvx ruff check --no-fix hooks/PreToolUse/require_delegation.pyclean🤖 Generated with Claude Code