Proposal: parameterized code-review dispatch to reduce prompt duplication
Hi , I would like to ask for your advice on a possible improvement to requesting-code-review.
Current Pattern
- The main agent reads the review template and fills placeholders.
- The subagent then receives the fully expanded template content again.
Potential Issue
- This duplicates prompt/context payload across both main agent and subagent.
- It may increase token usage unnecessarily.
Proposal
Use a lightweight parameterized dispatch contract from the main agent, passing only:
- what_was_implemented
- plan_reference
- base_sha
- head_sha
- description
Then add one explicit instruction for the subagent:
- Read code-reviewer.md
- Replace placeholders with provided values
- Fail fast if any required placeholder remains unresolved
Related Consistency Note
There is naming drift between:
- PLAN_OR_REQUIREMENTS in SKILL.md
- PLAN_REFERENCE in code-reviewer.md
Unifying names would make this contract safer.
Thanks for this. The naming drift is fixed — both SKILL.md and code-reviewer.md have used PLAN_OR_REQUIREMENTS since v5.1.0. We're not planning to change this skill's dispatch contract: the template is small and sent once per review, and single-dispatch prompt duplication hasn't shown up as a meaningful cost in our token profiling — broader token-efficiency work is tracked in #1152.