metagit-sharing-state
Skill4 starsChanged 12 days agoMITView on GitHub
Configure shared coordination state (objectives, handoffs, approvals, events) across multiple agents and machines via METAGIT_STATE_URL, optional DynamoDB / MongoDB DocumentStore backends, and the ops HTTP path. Use when Hermes subagents, CI runners, or humans must see the same objective queue without Syncthing JSON files.
In this repository62 other files it gives its agents.
- agentsAGENTS.md
- docs/agents.mdAGENTS.md
- agentsAGENTS.md
- agentsCopilot instructions
- .cursor/rules/github-cli.mdcCursor rule
- .cursor/rules/project-level.mdcCursor rule
- llms.txtllms.txt
- gitnexus-cliSkill
- gitnexus-debuggingSkill
- gitnexus-exploringSkill
- gitnexus-guideSkill
- gitnexus-impact-analysisSkill
- gitnexus-refactoringSkill
- humanizerSkill
- metagit-agent-accessSkill
- metagit-agent-coordinationSkill
- metagit-aosSkill
- metagit-bootstrapSkill
- metagit-campaignSkill
- metagit-cliSkill
- metagit-config-refreshSkill
- metagit-context-packSkill
- metagit-control-centerSkill
- metagit-gatingSkill
- metagit-gitnexusSkill
- metagit-graph-maintainSkill
- metagit-mcp-resourcesSkill
- metagit-multi-repoSkill
- metagit-projectsSkill
- metagit-release-auditSkill
- metagit-repo-impactSkill
- metagit-rewrite-campaignSkill
- metagit-sharing-stateSkill
- metagit-stampSkill
- metagit-upstream-scanSkill
- metagit-upstream-triageSkill
- metagit-workspace-scopeSkill
- metagit-workspace-syncSkill
- metagit-agent-accessSkill
- metagit-agent-coordinationSkill
- metagit-aosSkill
- metagit-bootstrapSkill
- metagit-campaignSkill
- metagit-cliSkill
- metagit-cliSkill
- metagit-config-refreshSkill
- metagit-context-packSkill
- metagit-control-centerSkill
- metagit-gatingSkill
- metagit-gitnexusSkill
- metagit-graph-maintainSkill
- metagit-mcp-resourcesSkill
- metagit-multi-repoSkill
- metagit-projectsSkill
- metagit-release-auditSkill
- metagit-repo-impactSkill
- metagit-rewrite-campaignSkill
- metagit-stampSkill
- metagit-upstream-scanSkill
- metagit-upstream-triageSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are 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.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Use when more than one agent or machine must read/write the same objectives, handoffs, approvals, and event feed — without syncing …
- Very specific: line 28
Prefer shared state (HTTP or cloud DocumentStore) over Syncthing for coordination JSON when agents run on separate machines.
- Very specific: line 118
If backend is local but you expected remote/cloud, the MCP host is missing env/config.
- Very specific: line 129
All use resolve_backend() — no separate remote MCP tools.
≈ “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
Metagit shared coordination state
Use when more than one agent or machine must read/write the same objectives,
handoffs, approvals, and event feed — without syncing .metagit/sessions/*.json
via Syncthing.
Full references:
- docs/reference/sharing-state.md — HTTP ops contract
- docs/reference/central-state-plane.md — plane backends, extras, org/workspace ids, Dynamo bootstrap
When to use
- Hermes controller + subagents on different hosts
- Human on Metagit Web + agents on MCP/CLI
- CI runner updating objectives while developers use Cursor MCP
- Org-scale coordination on DynamoDB / MongoDB (RFC-0015)
Prefer shared state (HTTP or cloud DocumentStore) over Syncthing for
coordination JSON when agents run on separate machines. Keep Syncthing (or git)
for .metagit.yml catalog edits only.
Backends
| Backend | Extra | Typical use |
local | — | Single machine default |
http | — | Agents → metagit web serve via METAGIT_STATE_URL |
memory | — | Tests only |
dynamodb | metagit-cli[state-dynamodb] | Direct cloud or ops-server-hosted |
mongodb | metagit-cli[state-mongodb] | Direct cloud or ops-server-hosted |
uv tool install 'metagit-cli[state-dynamodb]'
uv tool install 'metagit-cli[state-mongodb]'Coordinator setup (HTTP / deployment B)
On one host with the workspace manifest (local JSON or cloud DocumentStore on the server):
metagit web serve --host 127.0.0.1 --port 8787
# production: TLS reverse proxy + bearer token in front
# optional: METAGIT_STATE_BACKEND=dynamodb + table/region on this host onlyAgents keep METAGIT_STATE_URL — they do not need cloud extras when the
coordinator hosts Dynamo/Mongo.
Client setup (CLI, MCP, every agent host)
App config (~/.config/metagit/config.yml):
config:
state:
backend: http
url: https://coordinator.example.com:8787
token: your-bearer-token
conflict_retries: 1
org_id: "" # optional plane partition
workspace_id: ""Or environment (overrides file — must be set on the MCP server process):
export METAGIT_AGENT_MODE=true
export METAGIT_STATE_URL=https://coordinator.example.com:8787
export METAGIT_STATE_TOKEN='…'
# optional plane identity:
# export METAGIT_STATE_ORG_ID=acme
# export METAGIT_STATE_WORKSPACE_ID=platform-wsDeployment A (agents → cloud directly)
uv tool install 'metagit-cli[state-dynamodb]'
export METAGIT_STATE_BACKEND=dynamodb
export METAGIT_STATE_ORG_ID=acme
export METAGIT_STATE_WORKSPACE_ID=platform-ws
export METAGIT_STATE_DDB_TABLE=metagit-state
export METAGIT_STATE_DDB_REGION=us-east-1
# AWS credentials via IAM/env — never commitRestart MCP after changing env (metagit mcp serve inherits the shell env).
Verify backend (MCP)
resources/read → metagit://gate/statusCheck state_backend:
| Field | Meaning |
backend | local | http | dynamodb | mongodb | memory |
org_id / workspace_id | Plane partitions |
url | Remote ops base when http |
token_configured | Bearer token present (not the secret) |
extras | Whether dynamodb/mongodb extras are importable |
env_overrides | Which METAGIT_STATE_* vars are set |
If backend is local but you expected remote/cloud, the MCP host is missing env/config.
MCP tools (unchanged names — remote-aware)
| Coordination | MCP tool | Resource |
| Objectives | metagit_objective_list, metagit_objective_upsert, metagit_objective_edit | metagit://objectives |
| Approvals | metagit_approval_request, metagit_approval_list, metagit_approval_resolve | metagit://approvals/pending |
| Handoffs | metagit_handoff_list, metagit_handoff_create, metagit_handoff_claim, metagit_handoff_complete | metagit://handoffs/open |
| Events poll | metagit_events | metagit://events/recent?since= |
All use resolve_backend() — no separate remote MCP tools.
CLI parity
metagit context objective list --json
metagit context handoff list --json
metagit context approval list --jsonAnti-patterns
- Mixed backends (some agents local, some remote/cloud) — objectives diverge silently
- Syncthing
.metagit/sessions/objectives.jsonand remote/cloud state on the same fleet - Forgetting to export
METAGIT_STATE_*in the MCP launcher JSON (Cursor/Claude Desktop) - Committing AWS keys, Mongo URIs, or bearer tokens into git or
.metagit.yml
Related skills
metagit-context-pack— session bootstrap + objective/approval CLI/MCP tablemetagit-mcp-resources— resource read ladder including events pollmetagit-control-center— ongoing multi-repo coordinationmetagit-agent-coordination— git isolation (branches/leases/worktrees); orthogonal to shared state JSON
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.

