agent-state
Skill1 starsChanged 31 days agoMITView on GitHub
Guidance for the upstream agent-state contract: backend-neutral lifecycle state, declared capabilities and repository-relative mutation scopes. Use before planning routing, continuation, messaging or concurrent writes; verify actual host support instead of inferring capabilities.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- zi-yue-1129/research-lab-skillstheir own version, first seen Oct 27, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- zi-yue-1129/research-lab-skills★ 9same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository114 other files it gives its agents.
- agent-cacheSkill
- agent-compressionSkill
- agent-intelSkill
- agent-overlapSkill
- ambient-hudSkill
- app-testSkill
- audit-dagSkill
- auto-distillSkill
- auto-memorySkill
- auto-routerSkill
- benchSkill
- bootstrapSkill
- botte-learnSkill
- botte-nnSkill
- botte-proxySkill
- botte-wrapSkill
- cacheSkill
- call-chainsSkill
- capabilitiesSkill
- cardinalSkill
- checkupSkill
- clarificationSkill
- clusterSkill
- code-complexitySkill
- code-duplicationSkill
- code-fingerprintSkill
- code-rulesSkill
- code-stateSkill
- code-wrappersSkill
- comfyuiSkill
- completion-proofSkill
- conductorSkill
- context-budgetSkill
- context-compressorSkill
- context-profilerSkill
- context-slicerSkill
- context-windowsSkill
- control-loopSkill
- cost-estimatorSkill
- dag-optimizerSkill
- dashboardSkill
- decision-ladderSkill
- demoSkill
- diff-languageSkill
- directives-auditSkill
- docgenSkill
- docs-stewardSkill
- dynamic-workflowsSkill
- efficiencySkill
- eventsSkill
- fallow-likeSkill
- fallowSkill
- fast-contextSkill
- fixSkill
- fleetSkill
- hailo-visionSkill
- harness-deltaSkill
- harvestSkill
- hermes-bridgeSkill
- hermes-second-brainSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 52
If Git is unavailable, the snapshot races, or the path limit is exceeded, the success remains idle.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
agent-state — explicit authority and capability negotiation
Package scope and prerequisites
This catalog ships instructions, not the executable runtime. Python modules, scripts, local services and optional tools named below must be installed separately from the upstream project. Check their availability before running commands; if they are missing, explain the prerequisite instead of claiming execution or results. The host agent may use model tokens while following these instructions.
Commands, APIs and runtime behavior described below are conditional examples for a compatible upstream installation; they are not evidence of execution in this package.
agent_state prevents an orchestrator from guessing that every provider can
resume, fork, read transcripts, send messages, switch models, or mutate a
workspace. Every envelope carries a complete capability matrix; undeclared
capabilities become unknown and therefore do not satisfy a requirement.
The contract also records backend-neutral lifecycle state, its authority, task
scope, revision, and an optional structured completion result. Authority is
ordered native > adapter > terminal > unknown. Write scopes must not overlap
between active agents.
Python API:
from skills.agent_state import build_agent_state, eligible_agents, scope_conflicts
state = build_agent_state(
agent_id="builder",
backend="codex",
task_id="task-1",
state="working",
state_source="native",
scopes=[{"path": "skills/agent_state", "access": "write"}],
capabilities={"send_message": "native", "mutate_workspace": "native"},
)The lazy MCP tool agent_state exposes create, validate, reconcile,
eligible, and conflicts. Its documented interface exchanges JSON objects. The schema is an upstream resource, docs/schemas/agent-state-v1.schema.json, not bundled in this catalog.
meta_harness persists queued/working/final observations in each session, and
conductor.execute returns the observation history beside every step result.
Both use adapter authority and opaque local identifiers. A successful legacy
subprocess becomes completed only when the local Git observer captures stable
before/after revisions, Git-visible changed paths, and a successful exit code.
If Git is unavailable, the snapshot races, or the path limit is exceeded, the
success remains idle.
Confirmed writers also acquire an atomic botte-mutation-lease-v1 in the local
temporary directory. The lease is conservative: one Botte writer per Git root,
including callers launched from different subdirectories. Conflicts become a
blocked/conflict state before the command starts. Crash-stale leases are not
silently removed.
Declared mutation scopes can additionally use a bounded filesystem snapshot to
include Git-ignored outputs. The observer allows at most 20 scopes, 1,000 files,
and 64 MiB, never follows symlinks, and never scans .git. Exceeding a bound
keeps the result out of completed. Any Git-visible change observed outside
every declared scope is reported as a scope violation and prevents completion,
even when the subprocess exits successfully. Enforcement is detection-only:
it never rolls back a dirty worktree.
For explicit scopes, a repository-wide metadata guard also watches every file outside those scopes, including ignored files. It excludes the allowed trees, is capped at 20,000 paths, and fails closed on I/O errors or snapshot races. It detects create, delete, rename, mode, size, and timestamp changes without hashing the whole repository. A same-size rewrite whose timestamp is deliberately restored remains a documented residual risk.
Controlled subprocesses use run_contained_process. On Windows, the real
command is held behind an inherited event until its bootstrap has joined a Job
Object configured with KILL_ON_JOB_CLOSE; descendants cannot outlive the
observation window. On POSIX, a new process group is terminated after the root
exits or times out. Attachment failure prevents the real command from starting.
Each result exposes structured containment evidence.
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.

