Skip to content

delegate-kit: compact policy, explicit native/external workers, other-family review with fallback - #2

Merged
tomastaker merged 2 commits into
mainfrom
rework/policy-plus-external
Aug 30, 2026
Merged

delegate-kit: compact policy, explicit native/external workers, other-family review with fallback#2
tomastaker merged 2 commits into
mainfrom
rework/policy-plus-external

Conversation

@tomastaker

Copy link
Copy Markdown
Owner

Problem

SKILL.md on main had grown into a CLI manual: run states, delivery hooks, timeouts and lock mechanics sat in the file the coordinator loads every time, burying the decision steps. PR #1 fixed that by removing the runtime entirely — and with it the one thing no host provides natively: a worker from the other model family. It also treated a cross-vendor worker as if it could be a native subagent.

Solution

Progressive disclosure instead of amputation:

  • SKILL.md (6.7 KB, steps only) — shape triage with numeric thresholds (DIRECT / SCOUT / PLAN / SINGLE / PARALLEL / SEQUENTIAL, vocabulary kept from PR refactor: make Delegate Kit a universal orchestration policy #1), spec + preset, route, brief, worktree, review, integrate/report, worker contract. Positive phrasing, checkable completion criteria.
  • references/hosts.md (new) — native dispatch per host (Claude Code / T3, Codex, Pi/OpenCode, no fan-out → serial); what native gives up; git with parallel writers.
  • references/external.md (replaces dispatch.md) — the other family as a headless CLI session, named as such: preflight, starting/collecting (--detach, --on-finish, run states, timeouts), the Codex-host yield_time_ms gotcha, presets, limits and safety.
  • Review rule — the other family is the preference, a fresh same-family worker the floor. agent-run route now checks the other CLI is installed; when it is not, the reviewer/verifier falls back to a fresh native worker with independent: false and a note to report it. route output also carries author and independence. review.md, roles.md, dk-reviewer/dk-verifier descriptions and the help text updated to match.
  • README rewritten around coordinator / native / external and the shapes.
  • CI — existing checks kept; adds an 8 KB cap on SKILL.md.

Checks

  • node --check scripts/agent-run, bash -n on hooks and agent-wt, schema JSON valid.
  • tests/delivery.sh: 25 passed, 0 failed.
  • agent-run route exercised manually: other CLI present → external Codex reviewer, independent: true; other CLI absent (PATH trimmed) → native dk-reviewer, independent: false, note present; panel composition follows the same fallback; implementer with missing CLI gets an install/--backend hint instead of a silent switch.
  • shellcheck not run locally (not installed); CI runs it.

Not covered

🤖 Generated with Claude Code

…ом семействе с фолбэком

SKILL.md сжат до шагов и шести форм (DIRECT/SCOUT/PLAN/SINGLE/PARALLEL/
SEQUENTIAL); runtime-детали раскрыты в references/external.md и hosts.md.
Внешний воркер другого семейства назван внешним, а не субагентом.
Ревью: другое семейство при установленном CLI, иначе свежий native-ревьюер
своего семейства — agent-run route делает фолбэк сам и помечает
independent:false. CI ограничивает размер SKILL.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T22:52:29.545388Z 0ccb196 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d48d648f-58b9-4866-a6a1-8a6161fe66b9


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.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ccb19684c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const reviewers = reviewComposition(depth, author, kind).map((r) => {
const rr = resolveRoute({ ...argv, role: "reviewer", backend: r.backend, depth: undefined, diff: undefined });
return { ...r, model: rr.model, effort: rr.effort, dispatch: rr.dispatch, invoke: rr.invoke };
const rr = resolveRoute({ ...argv, role: "reviewer", backend: r.backend, _composed: true, depth: undefined, diff: undefined });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve explicitly pinned reviewer backends

When the requested reviewer CLI is unavailable, _composed: true causes resolveRoute to disregard that the user supplied --backend, so a command such as route --role reviewer --parent claude --author-backend claude --backend codex silently returns a native Claude reviewer instead of preserving the Codex route and reporting that installation is required. This violates the explicit backend selection and may run a same-family review the caller specifically excluded.

Useful? React with 👍 / 👎.

Comment on lines +502 to +504
if (parent && ["reviewer", "verifier"].includes(role) && !userPinned) {
why.push(`the ${backend} CLI is not installed, so the ${role} falls back to a fresh native ${parent} worker — say so in the report`);
backend = parent; dispatch = "native"; fellBack = true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reset incompatible model overrides during fallback

When the other-family CLI is missing and the caller supplied a model for that family, changing only backend preserves the incompatible opts.model. For example, --parent claude --author-backend claude --model gpt-5.6-sol produces a native Claude Agent invocation whose model is gpt-5.6-sol, so the advertised fallback cannot start. Either treat a family-specific model as a pin that prevents fallback or select the fallback family's default model.

Useful? React with 👍 / 👎.

Description ловит то, что видно в момент запроса (фича/рефакторинг в прозе,
несколько модулей, вопрос-вердикт, ключевые слова), а не число файлов,
которое известно лишь после триажа. README перестроен: почему, как работает,
формы, ревью, установка, использование; роли, скрипты и layout свёрнуты.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tomastaker
tomastaker merged commit f707e2b into main Aug 30, 2026
@tomastaker
tomastaker deleted the rework/policy-plus-external branch August 30, 2026 12:30
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