Essence Compact Surface Design (WS-D)
Design for reducing the default Essence tool surface from 52 tools to 6 core tools, part of the Essence Hardening program.
Motivation
The current Essence plugin registers 52 tools across 4 toolsets at ~15,500 schema bytes. Most sessions use only 5-6 tools regularly. The rest bloat context windows, increase schema load, and create audit noise.
Design Target
| Aspect | Before | After |
|---|---|---|
| Default tools | 52 | 6 |
| Schema bytes (default set) | ~15,500 | ~3,200 |
| Startup ritual | 5 separate calls | 1 compact read |
| Proposal tools | 11 separate | 1 typed surface |
| Toolsets | 4 | 3 (core, optional, governance) |
| Context tokens saved | — | ~200-400/turn |
Compact Default Surface
essence_compact_read — One-call context read (state, bond, cooldowns, budget, public cards)
essence_state_update — Unified mood/energy/mode in one typed call
essence_bond_react — Unified bond event (merges react+adjust, ±5 cap)
essence_propose — One typed proposal surface (replaces 11 specific propose tools)
essence_proposal_status — Proposal lifecycle read
essence_memory_candidate — Memory pipeline: propose→review→list
Optional Toolsets
essence_optional_photo_gacha(11 tools) — photo gate configs, asset catalogs, pipeline status, gacha pulls, group bond eventsessence_optional_diagnostics(4 tools) — microthought, dream context, distill context, expression status
Governance-Only Tools
essence_expression_propose— too loose for ungoverned useessence_proposewithdraft_linear_update,draft_discord_message,review_cardtypes — external system drafts need governanceessence_memory_review_commit— per WS-B: sister tools must not claim governance identity for Mnemosyne writes
Key Design Decisions
Five-call startup → one compact read. A single
essence_compact_readcall returns state + bond + cooldowns + budget + public card in one shot (~800 tokens max). Reduces mandatory startup from 2000 schema bytes to ~500.Single typed proposal surface. 11 specific proposal tools replaced by one
essence_proposetool with aproposal_typeenum. Each type defines its own metadata schema.Bond react absorbed bond adjust. Unified ±5 cap with a
manualflag to select between 5-min (reactive) and 15-min (manual) cooldown. Eliminates a separate tool for marginal delta difference.Inline gate checks. The old
essence_proposal_gate_checkandessence_proposal_approval_dry_runare removed — gate results are returned inline fromessence_propose.Decision dry-run removed.
essence_decision_dry_runandessence_local_mind_dry_runhave no proven call path. Weighted fallback handles evaluation; the dry-run tools were dead code.
Migration
All old tools follow a staging plan:
- Phase 0: Create new schemas and handlers (additive, safe)
- Phase 1: Dual registration — old and new coexist
- Phase 2: Profile config switch to new toolsets
- Phase 3: Old tools return deprecation errors with replacement hints
- Phase 4: Remove deprecated code
Each deprecated tool returns a structured error:
{"ok": false, "error": "deprecated: Use essence_propose with proposal_type='dream'"}
A/B Evaluation
7-day A/B cycle comparing baseline (SOUL + memory, no Essence) vs compact Essence:
| Metric | Pass Threshold |
|---|---|
| Identity consistency | 60% fewer corrections |
| Continuity accuracy | 2x cross-session recall |
| Useful proactivity | 2x user-thanks rate |
| Tool calls per turn | 35% reduction |
| Schema token cost | 75% reduction |
| Audit noise | No increase |
Automatic revert triggers: latency >2x baseline, 5+ corrections in one session, or identity inconsistency >1 per 10 messages in 24h.
Related Pages
- Essence Runtime Reference — current runtime architecture being simplified
- Governance Stack Reference — governance surface for external-draft tools
- Essence Hardening Spec — parent specification with WS-B/C/D/E workstreams
- Essence Phase 4+5 Design Notes — consolidated legacy-to-essence mapping
Cost Estimate
- Implementation effort: ~10-12 hours (Tai)
- Files changed: 5 (adapter.py, 4× config.yaml)
- New dependencies: None
- Rollback: Config revert for Phase 2, git revert for Phase 4