add-an-adapter
Skill2 starsChanged 2 months agoMITView on GitHub
Add a provider adapter with runtime capability checks while preserving shared lifecycle ownership and versioned evidence interpretation.
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-integrationSkill
- delegate-upgradeSkill
- delegation-architectSkill
- docs-updaterSkill
- go-concurrencySkill
- go-implementerSkill
- go-reviewerSkill
- go-test-writerSkill
- live-e2eSkill
- supervisor-architectSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
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
- Distinctive: line 10
Use this skill for a new provider adapter or a repair to an adapter contract, profile, interpreter, registration, fixture, or acceptance …
- Distinctive: line 14
Use the provider guide for current profiles and load lifecycle or native guidance only when the change affects those boundaries.
- Very specific: line 79
Add deterministic fixtures for valid and malformed envelopes, blank answers, refusal/error/timeout markers, exit conflicts, identity …
- Very specific: line 83
Put Python driver regressions beside the existing driver tests under scripts/acceptance/provider_drivers/tests/test_<provider>_driver.py.
- Distinctive: line 88
Run the provider through the shipped dispatcher/runner with isolated pueue, existing authentication, and the exact plan budgets.
- Distinctive: line 105
Follow the product boundary for installed providers and retain their native configuration and sessions.
- Distinctive: line 107
Keep raw private evidence outside the repository and let Root integrate contributor guidance.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Add a provider adapter
Trigger
Use this skill for a new provider adapter or a repair to an adapter contract, profile, interpreter, registration, fixture, or acceptance gate. Read the launch boundary and evidence interpretation rules. Use the provider guide for current profiles and load lifecycle or native guidance only when the change affects those boundaries.
Inputs
- the immutable provider ID, supported request options, runtime capability profile, executable/help compatibility, and output-predicate revision;
- the exact owned package, catalog, fixture, harness, and documentation files;
- the provider's configuration precedence, identity/session semantics, native envelope, usage fields, and failure markers; and
- the plan's unit, supervisor, containment, continuation, refusal/timeout, and replay scenarios.
Workflow
- Define the smallest supported profile and validate the controls requested by the task. Reject escalation, arbitrary executable loading, and unsupported or ineffective requested options before admission. Treat native configuration, authentication, MCP servers, hooks, plugins, unrelated provider policy, and OS/version/build identity as provider-owned observations: record or report them, but do not reject them as adapter-owned policy drift. Preserve existing IDs and native login flows.
- Implement provider-owned preparation, native argv/configuration and identity
handling, and a versioned interpreter over sealed evidence. The adapter only
prepares a plan and interprets evidence: it does not own pipes, capture,
sealing, processes, stopping, deadlines, collection, or publication.
For small non-secret UTF-8 configuration files, declare
Plan.InputFileswith a safe lowercase name, exact content and an empty reserved argv slot. Thestage.prefix is reserved for core durability and scavenging. For optional native output files, declarePlan.OutputArtifactsand theOutputWriterContractin both the plan and adapter declaration. The core binds declarations to immutable metadata, supplies paths, materializes input files, and imports completed outputs into sealed raw evidence. Never write protocol records or expose a raw-writer handle from provider code. Interpret named output throughpredicate.NamedEvidence;predicate.ErrEvidenceAbsentmeans optional absence, while other read faults must not be treated as fallback. Present empty or contradictory output is evidence. Verify writer completion at process exit and stream EOF; a stable file alone is insufficient. For finite profiles with continuation, supplyPreparedProfile.Identityusing the boundedexecution.IdentityObserverinterface. Non-interactive machine channels usePreparedProfile.Protocol; explicit native user interaction usesPreparedProfile.Interaction. Follow the canonical transport selection rules: a machine Protocol cannot be combined with Identity or Interaction. The selected native protocol is the sole stdout observer. Each selected path reports validated session identity through its runner-owned callback so the core persists the session reference. Returning a session from the sealed-evidence interpreter alone does not create that reference. Test chunked observation, identity mismatch, parser bounds and callback errors, then prove fresh-to-resume dispatch with the compiled CLI. - Register the adapter once in the explicit catalog.
Registration.Prepareaccepts the sharedPrepareCandidatehook. For an ordinary finite profile factory, useprovider.ReadyCandidate(Prepare); no inspection implementation is needed. A provider that requires native metadata declares aProfileCandidatewith static placement, anInspectionDefinition, and a pure finalizer over nonsecret facts. Read the architecture guide for that conditional path and its current integration status. Core owns inspection execution; never hide native commands in a preparation or finalizer callback. Catalog finalization retains capability and artifact checks and refuses changes to the candidate's workspace or writable roots. The compatibilityCatalog.Preparemethod refuses inspection candidates. Reuse shared task, execution, predicate, usage, lifecycle, and acceptance mechanics; do not add provider-specific core branches. - Add deterministic fixtures for valid and malformed envelopes, blank answers,
refusal/error/timeout markers, exit conflicts, identity mismatch, policy
drift, usage scope, and historical predicate revisions. Collection must stay
observational and must never retry paid work.
Put Python driver regressions beside the existing driver tests under
scripts/acceptance/provider_drivers/tests/test_<provider>_driver.py. Follow module organization for the complete feature and its consumers. Usemake test-native-harnessas a focused target;make test-pythonalready includes these tests. - Run the provider through the shipped dispatcher/runner with isolated pueue, existing authentication, and the exact plan budgets. Finite profiles receive the brief on stdin followed by EOF. Machine Protocol and native Interaction profiles exchange core-owned frames until native completion closes stdin. Inspect sealed raw evidence and filesystem effects directly; do not use direct signals, shell wrappers, or global configuration changes.
- Match filesystem controls to the advertised native mode. Unattended write
modes must prove creation, editing, and shell execution from filesystem and
sealed evidence; they do not promise outside-workspace denial. Preserve
applicable native read-only and sandbox controls. A rejected task is valid
when the canonical
outcome.jsonauthority publishes its rejected verdict with sealed evidence; its rejection payload may be present and non-empty. This is distinct from rejecting a success-shaped result that fails the success predicate. Missing prerequisites and inconclusive controls areBLOCKED, never pass. - Record sanitized platform/profile/predicate/configuration, task and session identities, timings, commands, observations and Delegate-owned evidence. Follow the product boundary for installed providers and retain their native configuration and sessions. Keep raw private evidence outside the repository and let Root integrate contributor guidance.
Deliverables
- provider package, catalog registration, and focused deterministic fixtures;
- a profile and interpretation record with compatibility and failure behavior;
- acceptance receipt covering positive, denial, continuation, timeout/refusal, and replay scenarios; and
- a bounded handoff naming changed files, commands, results, and blocked cases.
Exit criteria
- Provider behavior is contained behind a real narrow boundary; shared lifecycle, capture, sealing, and publication code is reused without exceptions.
- Committed success requires valid versioned sealed evidence, matching
identities, a non-whitespace answer and a satisfied success predicate.
A valid sealed rejected interpretation may publish a rejected
outcome.jsonand rejection payload. Unsealed evidence or evidence/identity validation errors prevent publication. - Unit/fault tests and required supervisor/live acceptance pass with sanitized
evidence, or a missing prerequisite is recorded as
BLOCKED. - Historical collection remains available without the current executable, and no paid retry or automatic fallback was introduced.
Report affected guidance and diagram changes under the project documentation completion rule.
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.

