KeiSeiKit-1.0/docs
Parfii-bot 372bbc8320 docs(agent-substrate): v1 schema DRAFT — capability triplet + role + task spec + runtime contract
Sibling SSoT to SUBSTRATE-SCHEMA.md (atom substrate). This one decomposes
agent invocations rather than code primitives.

Core contribution — the capability TRIPLET, not just text:
- text.md      — what agent reads (prompt fragment)
- gate.sh      — PreToolUse hook (runtime enforcement)
- verify.sh    — on-return predicate run from main repo (not worktree)

Motivation from substrate v1 orchestration audit:
- 40% prompt boilerplate across 7 spawns (git-ban + constructor-pattern +
  report format etc. copy-pasted each time)
- Self-reported green tests broke at integration (E1 jsonschema
  regression — agent claimed PASS from worktree but main workspace
  failed; caught only by integration test)
- Scope violations (E1 touched invoke.rs when E3 was supposed to own it;
  surfaced only at merge)

Triplet closes all three gaps: capabilities aren't promises agents make
in prose, they're enforced by gate hooks pre-exec and verified by
predicates on return from main branch clean state.

Schema specifies:
- Capability atom layout: _capabilities/<category>/<slug>/
- capability.toml frontmatter shape
- text.md / gate.sh / verify.sh contracts
- Role = bundle of capabilities (5 roles: read-only, explorer, edit-local,
  edit-shared, git-ops)
- task.toml shape (orchestrator-written per spawn; parameterizes roles)
- kei-agent-runtime crate contract: compose + spawn + verify + run
- Initial 10-capability inventory for phase 1
- 6-question decision log with defaults
- 5-phase parallel build plan (phases 1-4 parallel, ~5-7 days wall time)

Open questions flagged at bottom for review before AGENT-SCHEMA-LOCKED.md.

Once locked: sibling SSoTs (atoms + agents) evolve symmetrically — agents
compose atoms, atoms compose agents (ultimate goal).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 01:39:23 +08:00
..
AGENT-SUBSTRATE-SCHEMA.md docs(agent-substrate): v1 schema DRAFT — capability triplet + role + task spec + runtime contract 2026-04-23 01:39:23 +08:00
ARCHITECTURE.md docs(readme): split 89 KB monolith into hero-pitch + 6 docs/ files 2026-04-22 22:20:22 +08:00
INSTALL.md docs(readme): split 89 KB monolith into hero-pitch + 6 docs/ files 2026-04-22 22:20:22 +08:00
REFERENCE.md docs(readme): split 89 KB monolith into hero-pitch + 6 docs/ files 2026-04-22 22:20:22 +08:00
SCHEMA-LOCKED.md feat(substrate): LOCK schema — 6-week parallel Stream A/B/C/D window opens 2026-04-23 00:00:33 +08:00
SECURITY.md docs(readme): split 89 KB monolith into hero-pitch + 6 docs/ files 2026-04-22 22:20:22 +08:00
SLEEP-LAYER.md docs(readme): split 89 KB monolith into hero-pitch + 6 docs/ files 2026-04-22 22:20:22 +08:00
SUBSTRATE-SCHEMA.md fix(substrate): amendment A-1 (input/output required all kinds) + integration test + jsonschema 0.18 relative-$id bug 2026-04-23 00:56:27 +08:00
USB-BRAIN-GUIDE-linux.md feat(v0.22): FS warn + battle-test matrix + USB docs platform split (Track C) 2026-04-22 20:56:42 +08:00
USB-BRAIN-GUIDE-macos.md feat(v0.22): FS warn + battle-test matrix + USB docs platform split (Track C) 2026-04-22 20:56:42 +08:00
USB-BRAIN-GUIDE-windows.md feat(v0.22): FS warn + battle-test matrix + USB docs platform split (Track C) 2026-04-22 20:56:42 +08:00
USB-BRAIN-GUIDE.md feat(v0.22): FS warn + battle-test matrix + USB docs platform split (Track C) 2026-04-22 20:56:42 +08:00
WHY.md docs(readme): split 89 KB monolith into hero-pitch + 6 docs/ files 2026-04-22 22:20:22 +08:00