docs(skills): agentfield-use — batch dispatch by default, canary-validate after node reconfig - #827
Merged
Merged
Conversation
…-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>
1 task
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Strengthens the
agentfield-useskill's concurrency guidance in two directions:af secrets set+ restart), send ONE representative call and confirm it did real work — nonzero cost/duration, plausible output, not justsucceeded— 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
succeededwith 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
skills/agentfield-use/SKILL.md); no code paths affected🤖 Generated with Claude Code