Date: 2026-04-30
Owner: Jonah / Brian
Goal: Restructure /opt/agent/data/capabilities.md (3,065 entries, flat text) and /cap-refresh into an Autogenesis-Protocol-compliant registry, ready to publish on GitHub as a public spec + reference implementation.
Autogenesis: A Self-Evolving Agent Protocol
Wentao Zhang, Zhe Zhao, Haibin Wen, Yingcheng Wu, Ming Yin, Bo An, Mengdi Wang
arXiv:2604.15034v2 (Apr 2026) — https://arxiv.org/abs/2604.15034
Reference impl: https://github.com/DVampire/Autogenesis
| Layer | Concern | What it specifies |
|---|---|---|
| RSPL — Resource Substrate Protocol Layer | "What evolves" | Prompts, agents, tools, environments, memory all modeled as protocol-registered resources with explicit state, lifecycle, and versioned interfaces |
| SEPL — Self Evolution Protocol Layer | "How evolution occurs" | Closed-loop operator interface: propose → assess → commit — every change carries auditable lineage + rollback hook |
The AGP critique of A2A and MCP — "under-specifies cross-entity lifecycle/context, version tracking, and safe-update interfaces, encouraging monolithic compositions and brittle glue code" — describes our capabilities.md exactly. We have 3,065 CAP_IDs across 38 layers in a single flat markdown file, regenerated wholesale by /cap-refresh --full. No lifecycle, no version, no rollback, no propose/assess/commit boundary. AGP gives us the formal spine to fix that without inventing one.
/opt/agent/data/capabilities.md (21,919 lines, ~1.4 MB)### header per entrylayer, source, what, account, status, HARD (optional)caps_mcp.md, caps_cc.md, caps_oc.md, caps_delegates.md, caps_server.md, caps_infra.md, caps_access.md/cap-refresh — re-runs schema validator + deadpath scanner, re-seeds recent "I-can't" incidents, reports drift/cap-refresh --full — regenerates the whole file via 7-agent parallel enumeration/cap-refresh --weekly — grep-checks transcripts for tool calls in trigger scope without a preceding plan blockusing-capabilities skill forces <capability-plan> block above first tool call| AGP requirement | Today | Gap |
|---|---|---|
Resource has state |
only flat status field |
no state-machine; can't tell "registered-but-unverified" from "active-degraded" |
Resource has lifecycle |
none | no propose / register / verify / activate / deprecate / archive transitions |
Resource has versioned interface |
none | a CAP_ID either exists or doesn't; no semver, no breaking-change marker |
| Closed-loop propose | implicit (gap-patch passes) | not auditable; no PR-style review |
| Closed-loop assess | none | no validator runs against the proposed delta |
| Closed-loop commit with lineage | none | full-file regenerate erases attribution |
| Rollback | git revert only | no resource-level rollback; partial regen is impossible |
| Tracing across runs | session-scoped only | no per-CAP usage trace, no failure→amend feedback |
cap-protocol-v1/opt/agent/data/cap-registry/
resources/
<CAP_ID>.yaml # one file per capability
manifests/
<layer>.yaml # index per layer (cc-native, mcp, skill, ...)
events/
<YYYY-MM>/ # append-only event log
<ISO-timestamp>_<CAP_ID>_<event>.yaml
schema/
resource.schema.json # JSON Schema for resources/*.yaml
event.schema.json # JSON Schema for events/*.yaml
HEAD # current registry version (semver)
CHANGELOG.md # human-readable lineage
### CAP_IDcap_id: tool_read
schema_version: 1
layer: cc-native
source: Read
what: Read files from local filesystem (text, PDF, images, notebooks)
account: N/A
state:
current: active # one of: proposed, registered, verified, active, degraded, deprecated, archived
since: 2026-04-20T00:00:00Z
health: green # green | yellow | red
last_verified: 2026-04-30T07:42:00Z
verifier: cap-refresh-v1.4.0
lifecycle:
proposed_by: jonah
proposed_at: 2025-09-15T00:00:00Z
registered_at: 2025-09-15T00:00:00Z
verified_at: 2025-09-15T00:00:00Z
activated_at: 2025-09-15T00:00:00Z
deprecated_at: null
archived_at: null
version: 1.0.0 # semver — bump on interface or behavior change
interface:
inputs: { file_path: string, limit?: int, offset?: int, pages?: string }
outputs: file_contents | error
side_effects: none
constraints:
HARD: null
rate_limit: null
account_lock: null
provenance:
added_by: cap-refresh --full (run 2025-09-15)
evidence: /opt/agent/data/cap-evidence/tool_read.txt
related:
composes_with: [tool_edit, tool_write, tool_bash]
superseded_by: null
supersedes: null
event_id: 2026-04-30T07:42:00Z_tool_read_verify
cap_id: tool_read
operator: cap-refresh
phase: assess # propose | assess | commit | rollback
result: pass # pass | fail | warn
delta:
before: { state.health: green, last_verified: 2026-04-23T... }
after: { state.health: green, last_verified: 2026-04-30T... }
trace:
validator_run_id: cr-20260430-074200
evidence_files: [validator_log.txt, deadpath_scan.json]
auditable: true
rollback_to: 2026-04-23T... (previous event_id)
/cap-refresh --propose # diffs reality against registry, writes proposals/<run-id>/
/cap-refresh --assess <run-id> # runs validator against the proposal, not the live registry
/cap-refresh --commit <run-id> # writes resource files + event log + bumps HEAD
/cap-refresh --rollback <event-id> # restores resource to pre-event state, logs counter-event
The current /cap-refresh --full becomes propose + assess + commit chained — but each phase is now separable and each step is auditable.
proposed ──verify──▶ registered ──verify──▶ verified ──activate──▶ active
│ │
▼ ▼
rejected degraded
│
┌────┼────┐
▼ ▼
recovered deprecated
│
▼
archived
proposed — a --propose run found it; not yet validatedregistered — schema validates; source resolves; not yet behavior-checkedverified — behavior check (one successful invocation or witness trace) passedactive — currently usable; default state for healthy CAP_IDsdegraded — fails health check but not removed (e.g., MCP server returning 503)deprecated — superseded; still callable; will be archived after grace windowarchived — removed from active surface; kept for historical lineage onlyversion: field<capability-plan> block stays exactly as today — the user-facing planning contract is independent of registry structure/cap-refresh --weekly transcript audit unchangedusing-capabilities skill unchanged| Step | Action | Reversible | Owner |
|---|---|---|---|
| 1 | Author schema/resource.schema.json + schema/event.schema.json |
yes | Brian |
| 2 | Write cap-migrate-v1.py — splits flat file into per-resource YAMLs, infers state.current from status, infers version: 1.0.0 everywhere |
yes (keeps flat file) | Brian |
| 3 | Run migration in /tmp/cap-registry-staged/, validate all 3,065 records against schema |
yes | Brian |
| 4 | Side-by-side soak — /cap-refresh writes to BOTH old flat file AND new per-resource for 7 days |
yes | Brian |
| 5 | Switch using-capabilities skill to read from new registry; flat file becomes read-only mirror |
yes (one-line revert) | Brian |
| 6 | After 14 days clean, archive flat file under cap-registry/legacy/ |
yes (git history) | Brian |
| 7 | Implement --propose / --assess / --commit / --rollback phases |
yes | Brian |
| 8 | Write protocol-spec.md — public-facing AGP-aligned spec |
n/a | Brian |
| 9 | Open-source repo: webspot/cap-protocol |
n/a | Jonah approval needed |
Time estimate: Steps 1–3 fit in one focused Brian session (~2 hours). Steps 4–6 are passive (calendar). Steps 7–9 are a follow-up session each.
webspot/cap-protocol/
README.md # the pitch + 30-second example
SPEC.md # the protocol — RSPL fields, SEPL phases, lifecycle FSM
schema/
resource.schema.json
event.schema.json
reference-impl/
python/ # cap-protocol Python package
cap_protocol/
models.py # Pydantic Resource + Event
validator.py
operator.py # propose/assess/commit/rollback
cli.py # `cap` CLI: cap propose / cap assess / cap commit
tests/
examples/
brian-registry/ # sanitized excerpt of /opt/agent/data/cap-registry/
docs/
motivation.md # why flat capability lists break down
comparison-with-mcp.md # how cap-protocol layers atop MCP
comparison-with-agp.md # what we kept, what we simplified, what we changed
case-study-brian.md # real numbers from 3,065 CAP_IDs
LICENSE # MIT
webspot/cap-protocol, brianserves/cap-protocol, or new org caprotocol?| Risk | Mitigation |
|---|---|
Migration corrupts capabilities.md mid-run |
Step 3 stages in /tmp/, step 4 dual-writes — flat file is the source of truth until step 6 |
<capability-plan> skill breaks because schema differs |
Skill reads via thin adapter; adapter swaps in one line at step 5 |
| Open-sourcing exposes private CAP_IDs | Step 8 sanitization pass; only ship layer names + counts + a synthetic example |
| AGP authors object to spec resemblance | Cite paper, frame as "implementation-focused subset"; AGP is CC-BY-4.0 so no legal blocker |
| Repo gets zero traction | Pre-launch: one HN post + Matt Pocock-style newsletter mention; if no traction in 14 days, fold spec into Webspot internal docs |
Step 1 + 2 + 3 in one Brian session: author the two JSON schemas, write the migration script, run it staged. Output is a /tmp/cap-registry-staged/ tree with 3,065 validated YAML files — reversible, no production impact. Schedule a /loop review of the staged tree before promoting to step 4.
Sources
- arXiv:2604.15034v2 — Autogenesis paper (abstract + README)
- github.com/DVampire/Autogenesis — reference architecture, repo layout, optimizer list
- /opt/agent/data/capabilities.md — current registry (3,065 entries, 38 layers)
- /root/.claude/skills/using-capabilities/SKILL.md — current planning contract
- /root/.claude/commands/cap-refresh.md — current refresh skill