Skip to content

docs(skills): agentfield-use — batch dispatch by default, canary-validate after node reconfig - #827

Merged
AbirAbbas merged 1 commit into
mainfrom
feat/skill-canary-guidance
Jul 24, 2026
Merged

docs(skills): agentfield-use — batch dispatch by default, canary-validate after node reconfig#827
AbirAbbas merged 1 commit into
mainfrom
feat/skill-canary-guidance

Conversation

@AbirAbbas

Copy link
Copy Markdown
Contributor

Summary

Strengthens the agentfield-use skill's concurrency guidance in two directions:

  • Batch dispatch is the default. When a batch of independent jobs arrives (ten PRs to review, five repos to scan), the skill now says explicitly: dispatch the whole batch up front and poll as a group, not one-at-a-time. Coding agents following the skill were still serializing mass work.
  • Canary after reconfiguration. The one legitimate exception: immediately after changing a node's runtime config (provider / model / bin path via af secrets set + restart), send ONE representative call and confirm it did real work — nonzero cost/duration, plausible output, not just succeeded — before fanning out.

Why

Found in practice today: after switching a review agent's harness provider, the harness CLI crashed instantly on every dimension, but each run still reported succeeded with zero findings in seconds — and posted a "Looks Good — Safe to merge" review to a real GitHub PR under the operator's identity. Had eight reviews been dispatched at once (as the skill rightly encourages for steady-state work), all eight PRs would have received false-green reviews. A single canary call caught it at the cost of one bogus review instead of eight.

The new paragraph is scoped as a gate on the first call after a config change — it explicitly does not license serializing steady-state work.

Test Plan

  • Docs-only change (skills/agentfield-use/SKILL.md); no code paths affected

🤖 Generated with Claude Code

…-validate after node reconfig

Two additions to the concurrency guidance:

- Make the batch default explicit: when N independent jobs arrive, dispatch
  all of them up front and poll as a group, rather than one-at-a-time.

- Add the one exception: right after a node's runtime config changes
  (provider/model/bin path via af secrets set + restart), send ONE
  representative call and verify it did real work (nonzero cost/duration,
  plausible output) before fanning out. A misconfigured harness can crash
  instantly while the run still reports succeeded-with-empty-results, and
  an agent that posts externally (e.g. GitHub reviews) publishes that
  garbage under the user's identity once per dispatched call.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@AbirAbbas
AbirAbbas requested a review from a team as a code owner July 24, 2026 14:31
@AbirAbbas
AbirAbbas merged commit 613138b into main Jul 24, 2026
17 checks passed
@AbirAbbas
AbirAbbas deleted the feat/skill-canary-guidance branch July 24, 2026 15:02
AbirAbbas added a commit that referenced this pull request Jul 24, 2026
Branch-local drift: this PR merged main (incl. #827's skill edit) while
carrying its own mirror copy; sync-embedded-skills.sh realigns them so the
skillkit drift tests pass regardless of #828.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
AbirAbbas added a commit that referenced this pull request Jul 24, 2026
Branch-local drift: this PR merged main (incl. #827's skill edit) while
carrying its own mirror copy; sync-embedded-skills.sh realigns them so the
skillkit drift tests pass regardless of #828.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
AbirAbbas added a commit that referenced this pull request Jul 24, 2026
…integration) (#817)

* feat(control-plane): add AGENTFIELD_MCP_ENABLED config toggle

Introduce MCPConfig under features with an IsEnabled() default of true so
the embedded MCP server ships on by default. AGENTFIELD_MCP_ENABLED=false
flips it off via the existing env-override precedence path.

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

* feat(control-plane): embedded MCP server handler and tools

Add a stateless streamable-HTTP JSON-RPC 2.0 handler that exposes AgentField
discovery and execution as MCP tools, calling the existing service layer
directly (no loopback HTTP). Supports initialize, notifications, ping,
tools/list and tools/call; rejects batch arrays; unknown methods return
-32601.

Five tools: discover_agents, get_reasoner_schema, execute_reasoner (starts an
async run), get_run, and wait_run (server-side poll with a hard timeout cap so
a tool call can never hang a harness). Results are single compact-JSON text
content blocks; validation/business failures come back as isError tool
results rather than transport errors.

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

* feat(control-plane): serve MCP at /mcp on the control-plane port

Register the embedded MCP server on the same Gin router as the REST API:
POST /mcp (JSON-RPC), GET /mcp -> 405, OPTIONS /mcp -> 204. The route is
gated by AGENTFIELD_MCP_ENABLED and simply not registered (so /mcp 404s) when
disabled. It lives behind the same global API-key auth and trust domain as
/api/v1 — no extra process, no extra setup; harnesses connect with one
command.

Thread the build version through server.SetBuildVersion so the MCP
serverInfo reports the real control-plane version.

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

* feat(skills): document zero-setup MCP in agentfield-use

Add an "MCP (zero-setup)" section near the top of the agentfield-use skill
(both the repo copy and the embedded skill_data copy, kept identical): the
control plane serves MCP at <server>/mcp, with the one-liner claude mcp add
command and a generic streamable-HTTP note for other clients. The CLI/REST
flow remains the documented full-power path. Bump the skill version to 0.4.0.

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

* docs: MCP integration guide

Add docs/mcp-integration.md covering the endpoint, the five tools, the
security posture (same trust domain and API-key auth as the REST API), the
disable flag, and an example tool-call flow. Link it from the README feature
table.

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

* fix: enforce MCP execution authorization

* chore(skills): sync embedded agentfield-use mirror on branch

Branch-local drift: this PR merged main (incl. #827's skill edit) while
carrying its own mirror copy; sync-embedded-skills.sh realigns them so the
skillkit drift tests pass regardless of #828.

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

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
AbirAbbas added a commit that referenced this pull request Jul 28, 2026
#827 updated the canonical skills/agentfield-use/SKILL.md without running
scripts/sync-embedded-skills.sh, so TestEmbeddedSkillSyncCheck now fails on
main and leaks a red coverage gate into every PR that merges main.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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