Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(agents-orchestration): subagent tool-scoping + optional review gates - #5

Closed
meshin-dev wants to merge 1 commit into
feat/pr-review-watch-disciplinefrom
feat/subagent-review-gates
Closed

feat(agents-orchestration): subagent tool-scoping + optional review gates#5
meshin-dev wants to merge 1 commit into
feat/pr-review-watch-disciplinefrom
feat/subagent-review-gates

Conversation

@meshin-dev

Copy link
Copy Markdown
Contributor

Summary

  • agents-orchestration.md: NEW "Subagent tool scoping (keep fan-out alive)" section (always-on) explaining the top-level oneOf/allOf/anyOf failure mode (whole subagent-init request fails -> all fan-out dies silently) and the rule that read-only fan-out agents declare a least-privilege tools: allowlist (no MCP connectors); plus NEW "Optional review gates" section (inline-gated by subagent_review): Gate 1 plan-review before confirmation, Gate 2 conformance-review at merge-prep, both opt-in and foreground.
  • New feature flag subagent_review (requires agents_orchestration) wired into scripts/lib/config.mjs FEATURE_NAMES, the Features tables (local-config.md, templates/config.local.md), the preset matrix, and the 12 -> 13 counts (local-config.md, index.md, README.md).
  • Cross-links from parallel-validation.md (issue-tree specialization), pr-loop.md (conformance gate at merge-prep), plan-to-issues.md (plan-review before migration).
  • Companion scoped agents ctxr-explore / ctxr-plan-reviewer / ctxr-conformance-reviewer ship as Claude Code project agents (.claude/agents/) with Read, Grep, Glob, Bash (+ Web for the plan reviewer) allowlists, immune to a bad connector schema by construction.

Notes

Test plan

  • node --check scripts/lib/config.mjs; FEATURE_NAMES length 13 incl. subagent_review
  • Feature-count consistent (13) across local-config.md / index.md / README.md; preset matrix updated
  • Dash-clean authored lines (perl -CSD)
  • On reload, confirm the scoped .claude/agents/* register and advertise only their allowlist (no mcp__*)

Closes #4

…al review gates (subagent_review flag)

Add an always-on subagent tool-scoping resilience rule to agents-orchestration.md:
the Anthropic tool-use API rejects top-level oneOf/allOf/anyOf in a tool's
input_schema, and a subagent's init advertises its whole tool surface in one
request, so a single bad tool kills every subagent type at once and silently.
Read-only fan-out agents (explore / plan / review) must declare a least-privilege
tools allowlist (Read, Grep, Glob, Bash; WebFetch/WebSearch only for docs) so no
connector schema reaches their init request; for owned MCP servers, strip
top-level combinators from the advertised schema while keeping call-time
validation (the mcp-github pattern); disable third-party connectors you cannot edit.

Add two OPT-IN parallel-subagent review gates, gated by a new feature flag
subagent_review: Gate 1 offers a plan-review before a non-trivial plan is
confirmed; Gate 2 offers a conformance-review of the built work against the plan
at merge-prep. Both ask the user each time and use the scoped ctxr-* agents; the
foreground-only polling discipline is unchanged. Cross-link parallel-validation.md
as the issue-tree specialization, and reference the gates from pr-loop.md and
plan-to-issues.md.

Wire the new subagent_review flag everywhere the existing flags appear (12 -> 13):
FEATURE_NAMES in scripts/lib/config.mjs, the schema + flag-table + preset matrix
in local-config.md, templates/config.local.md, index.md, and README.md. The flag
conceptually requires agents_orchestration (stated in the flag-table row); it is
on for single-issue and full, off for pr-only. No frontmatter requires.config is
added; agents-orchestration.md keeps feature: agents_orchestration and gates the
new section with an inline Skip callout.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings May 24, 2026 04:33

Copilot AI 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.

Pull request overview

This PR adds subagent_review as a new optional methodology feature and documents scoped subagent usage for more resilient fan-out workflows.

Changes:

  • Adds subagent_review to config parsing, templates, feature counts, and preset documentation.
  • Extends agents-orchestration.md with subagent tool-scoping guidance and optional plan/conformance review gates.
  • Adds cross-links from PR loop, plan migration, and parallel validation docs to the new review-gate workflow.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/lib/config.mjs Registers the new subagent_review feature flag.
templates/config.local.md Adds the new flag to the default local config template.
local-config.md Updates feature counts, feature table, and preset matrix.
README.md Updates feature count and install instructions for the new flag.
agents-orchestration.md Documents scoped subagent allowlists and optional review gates.
pr-loop.md Links merge-prep to the optional conformance-review gate.
plan-to-issues.md Links plan confirmation to the optional plan-review gate.
parallel-validation.md Frames issue-tree validation as a specialization of conformance review.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agents-orchestration.md

**MCP servers you own vs. connectors you do not.** For an MCP server you control, strip top-level combinators from the ADVERTISED schema while keeping call-time validation intact, so the public surface is flat but every call is still checked. That is the pattern `mcp-github` uses (`src/registry.ts` plus `src/validation/advertise.ts`): advertise a flattened schema, enforce the full schema when the tool runs. For a third-party connector you cannot edit, disable the unused ones rather than exposing them to fan-out agents.

**Scoped agents already exist for this.** The read-only project agents `ctxr-explore`, `ctxr-plan-reviewer`, and `ctxr-conformance-reviewer` (Claude Code project agents under `.claude/agents/`) are scoped to exactly such an allowlist. Use them for fan-out; they are the durable, immune-by-construction path.
Comment thread README.md
@@ -157,7 +157,7 @@ Works with any agent that can run shell and edit files. **Copy this prompt and p
> > - **`single-issue`** - `pr-only` + issue lifecycle + canonical issue schema. Still no project board.
@meshin-dev
meshin-dev deleted the branch feat/pr-review-watch-discipline May 24, 2026 07:56
@meshin-dev meshin-dev closed this May 24, 2026
@meshin-dev

Copy link
Copy Markdown
Contributor Author

Superseded by #6 (same commit rebased onto main; this PR was auto-closed when its stacked base branch was deleted on the #3 merge). Tracked by #4, merged via #6.

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.

2 participants