feat(skill): the harness doctrine as a worked implementation — Pi; v0.9.0 - #5
Merged
Conversation
Every other reference in agent-harness states a rule. Pi is small enough to read and complete enough to have made each of those decisions in public — so two references read it end to end and match each mechanism to the rule it instantiates. Where Pi disagrees with this pack, that is said rather than smoothed over. pi.md: four run modes; sessions as a JSONL tree matched to time-travel and forking; compaction with the real formula and defaults, matched to the ladder, with what the ladder adds that Pi leaves to you; settings that merge rather than replace; skills, prompts, packages; and the deliberate absence of a sandbox, quoted — which for an audit changes the finding, since "no permission model" there is a delegation rather than a defect. pi-sdk.md: createAgentSession, ModelRuntime, SessionManager, defineTool; the RPC command groups, event lifecycle and the \n-only JSONL framing warning; JSON mode's delta-only records; the ExtensionAPI; and the eight seams — tool_call can block, tool_result is a middleware chain, context rewrites before the provider call — each matched to the doctrine it lets you implement. Read from pi.dev/docs/latest on 2026-08-15: sixteen pages plus the package source, all sixteen verified reachable. Pi discovers skills from ~/.agents/skills, which is this machine's hub — recorded as a fact about the path and the front matter, NOT as an observed load, because Pi is not installed here. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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.
What
Two references in
agent-harness:pi.mdandpi-sdk.md.Every other file in that skill states a rule. Pi is small enough to read and complete enough to have made each of those decisions in public — so these read it end to end and match each mechanism to the rule it instantiates. That second half is the point; without it this would be a stale copy of
pi.dev.pi.md— the harnessid,parentId, v3,BranchSummaryEntry)agent-orchestrator/references/runtime.mdcontextTokens > contextWindow - reserveTokens, defaults 16,384 / 20,000layers.md's delegation thesis, stated by the project itselfThe sandbox section quotes Pi directly:
For an audit this changes the finding — "no permission model" here is a delegation, not a defect, so you audit what surrounds the process. The three containerization patterns are compared by where credentials end up, which is the question that actually decides between them.
pi-sdk.md— the programmable halfcreateAgentSession(),ModelRuntime,SessionManager,defineTool(),DefaultResourceLoader; RPC command groups and the full event lifecycle; JSON mode's delta-only records and why; theExtensionAPIsurface.The eight seams are the reason this file exists — the places a real harness lets you implement doctrine the rest of the pack only describes:
tool_callcan block → the per-hop permission gate; called out as the most important one for an audit, because it is where a per-tool, per-caller policy can actually livetool_resultis a middleware chain → tool-output offload and token efficiencycontext→ rewrite messages before the provider callPlus the traps that bite once each: waiting on
agent_endinstead ofagent_settled; ignoringextension_ui_requestand hanging the agent; splitting JSONL on anything but\n(Pi's own warning); reusing actxafter session replacement.Evidence
200. The only non-resolving URLs in either file are the two deliberate placeholders inside custom-provider examples (api.my-llm.com,proxy.example.com) — stated rather than rounded to "all green"python3 test/validate.py→OK: agent-stack structurally valid (10 checks, 4 skill(s), v0.9.0)The repository's own front-matter gate earned its keep here: a first draft of the description landed at 1066 chars and the
repo-gatehook refused the write before it could reach CI.One claim, with its limit stated
Pi discovers skills from
~/.agents/skills/— this machine's ssheleg hub, 72 entries, every family skill carrying thenameanddescriptionfront matter Pi requires. Recorded as a fact about the path and the front matter, not as an observed load: Pi is not installed here.The reference also names Pi's documented divergence from the Agent Skills standard (a skill name may differ from its directory) and warns that
make-skill's validator enforces the strict rule — so a skill built to Pi's leniency fails the family gate.🤖 Generated with Claude Code