shio-agent-surface
Skill3 starsChanged 8 days agoApache-2.0View on GitHub
Read before touching Shio's agent surface or MCP server. Triggers on /api/v2/agent/**, POST /mcp, the manifest, the context pack, batch/plan/apply, post.upsert/post.move/folder.move, confirm tokens, the review queue, AGENT token scope, /agent/verify, /agent/changes, /agent/diagnostics, /agent/memory, /agent/find, /agent/read, ShMcpTool, ShMcpResource, tools/list budgets, teaching errors, and the SH79 address forms.
In this repository14 other files it gives its agents.
- agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- roadkeepSkill
- shio-build-testSkill
- shio-console-reviewSkill
- shio-console-uiSkill
- shio-content-apiSkill
- shio-content-filesSkill
- shio-databaseSkill
- shio-docs-syncSkill
- shio-docs-writeSkill
- shio-rendererSkill
- shio-replication-testSkill
- shio-roadmap-docsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
every /agent/ endpoint, its projections (?include=, ?format=, ?budget=), and its conditional-read (ETag) behaviour
- Distinctive: line 31
Never loosen the agent path to match a curator's session.
- Very specific: line 32
Errors are instructions (P6): Every 4xx carries fix/allowed/ didYouMean/example.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Shio agent surface + MCP
The namespace shaped for a coding agent rather than a browser. It is a shape over the CDA + console services (P10) and holds no business logic of its own.
Read docs/agents/agent-surface.md for the endpoints, and docs/agents/mcp.md for the MCP shape over them. Between them they are authoritative on:
- every
/agent/**endpoint, its projections (?include=,?format=,?budget=), and its conditional-read (ETag) behaviour - the batch op set and which ops are the only way to do a thing —
post.moveto rename or relocate a post,folder.moveone level up ?verify=true/?digest=<n>— the run's own proof, and why adryRungets none- what bounds an agent (Block L):
AGENTscope, session identity, the publish gate, confirm tokens, the review queue - the MCP tool list (11 of a hard cap of 12), the per-tool and total token ceilings,
and error routing — a fixable failure is a tool result with
isError:true, a JSON-RPCerroris only for an unusable message
The invariants that decide most design questions here
- The agent path is never a privilege escalation — and it cuts both ways (SH201). Where the console is looser, the console is the hole, not the bar. Never loosen the agent path to match a curator's session.
- Errors are instructions (P6). Every 4xx carries
fix/allowed/didYouMean/example. A silent fallback where a value was selected is a defect — see SH320's one rule: a parameter that selects or bounds work teaches; one that only adds a section is lenient. - A new capability does not get a new endpoint by default. The MCP tool count
is capped at 12 with 11 used and
tools/listis paid every turn (P3), so a REST-only endpoint with no tool is a P1 violation. The usual answer is a projection on a read that already takes the same subject. - Trim the description before raising a ceiling. Budgets live in
shio-app/src/test/resources/token-budgets.properties; raising one is allowed and must be justified in the commit.shio_applyis the tool to watch (457/460).
Guards that already exist
ShMcpWireConformanceTest pins tools/list against a golden — regenerate with
-Dshio.mcp.golden.update=true and review the diff. ShAgentResponseBudgetTest
guards eleven canonical response sizes; ShAgentTaskBenchmarkTest and
ShAgentSourceAttributionTest guard the ratios (and both boot their own in-memory
database — ShBenchmarkIsolationLintTest enforces that). ShAgentIncidentFramesTest
is a source lint: a record(...) inside a catch that passes no frame fails the
build.
Concept and worked example: docs/specs/SH74-agent-native-cms.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

