⸻
1. What LESS Is LESS is a shared memory synapse for Verdict’s PAS hierarchy that connects:• LightRAG (repo/artifacts truth)
• SAM (episodic decisions + continuity)
• PAS (parent→child instruction, child→parent distillation)
…through a single contract:
Agents never copy context; they exchange tiny Engrams + canonical pointers.Full content is pulled only via budgeted dereference enforced by the gateway.
LESS is “Engram-like” at the _system_ level: fast candidate recall + gating + deterministic addressing, but implemented as a skill that works with any model vendor.
⸻
2. Why LESS Exists 2.1 The problem Multi-agent systems die by:• context bloat (everyone re-sends everything)
• hallucinated shared state (“I thought you saw that file”)
• inconsistent truth sources (RAG summary vs raw file vs memory)
2.2 The promise LESS makes shared state:• addressable (pointers)
• minimal (micro-engrams)
• auditable (provenance + digests)
• budgeted (hard caps, deterministic enforcement)
Result: massive prompt shrink with higher correctness because claims anchor to sources.
⸻
3. Non-Negotiables⸻
4. LESS as a Verdict Skill 4.1 Packaging LESS ships as a Skill Pack entry (local + cloud-distributable):• skills/less/manifest.json
• skills/less/schemas/.json
• skills/less/runtime/ (engram store + pointer resolver adapters)
• skills/less/tests/*
4.2 Invocation Model LESS is invoked implicitly by PAS orchestration hooks, and explicitly via tool calls: Implicit hooks• on_child_response() → extract Engrams, validate, store
• on_parent_broadcast() → attach SharedBriefMicro + pointer packs + budgets
• on_rag_result() → convert to pointer-first + optional excerpt under budget
• on_sam_read() → pointer-first, TTL, scope
Explicit tools• less.put_engram
• less.query_engrams
• less.request_deref
• less.deref_pointer
• less.issue_grant (parent-only)
4.3 Permissions & Scopes (Skill Gating) LESS must respect Verdict’s security model:• Scopes: run | project | org | global
• Visibility: per agent role + project membership
• Write permissions: children can write run/project (configurable), only parent can promote to org/global
• Deref permissions: budgeted + grant-token validated
⸻
5. Core Data Types 5.1 Pointer An address, not content:• repo:
• artifact:
• sam:
• diff:
• max 12 pointers
• max 500 chars claim
• must include TTL, scope, confidence
• must include provenance and at least one pointer
5.3 SharedBriefMicro (Parent Output) A tiny distillation, max ~30 lines, containing:• “what matters now”
• constraints
• top risks
• pointer bundle per child role
• budgets + grants
⸻
6. Hard Budgeting (The 5% Rule) LESS defines two budgets: 6.1 Inline budget (message size)• MAX_INLINE_TOKENS (e.g. 800)
• MAX_ENGRAMS (e.g. 10–12)
• MAX_INLINE_CODE (default 0, only via grant)
6.2 Deref budget (content pulls)• MAX_REPO_SPANS (e.g. 3)
• MAX_ARTIFACT_SECTIONS (e.g. 2)
• MAX_SAM_ITEMS (e.g. 2)
• MAX_DEREF_TOKENS_TOTAL (e.g. 1200)
6.3 Enforcement Implemented as a gateway middleware (deterministic):• Reject oversize messages: LESS_BUDGET_EXCEEDED
• Reject ungranted deref: LESS_DEREF_DENIED
• Require resend in compliant Engram+Pointer format
This is critical: LESS is not “prompt etiquette,” it’s “wire protocol + enforcement.”
⸻
7. PAS Integration Contract 7.1 Child → Parent (Compression) Child must output:• Top-K Engrams (K small)
• PointerPack
• Optional deref requests (reasons + intended use)
Child must NOT output:
• long summaries
• pasted code
• large file sections
(unless explicitly granted)
7.2 Parent → Child (Attention Allocation) Parent outputs:• SharedBriefMicro
• budgets
• targeted pointer packs per role
• deref grants (tokens)
Parent is the allocator of attention.
⸻
8. How LESS Connects LightRAG + SAM 8.1 LightRAG mode under LESS RAG results are returned as:• pointer-first
• “episodic engrams” with longer TTL and clear scope
• promotion path (run→project→org) controlled by parent
8.3 The “glue” LESS stores both as Engrams in a unified index, but keeps provenance:• source = rag | sam | agent | tool
⸻
9. Indexing and Retrieval LESS supports two-stage retrieval: 9.1 Deterministic recall (Engram-like)• generate hash_keys from normalized n-grams / identifiers / tags
• O(1-ish) lookup in KV index
• returns candidates fast
9.2 Optional semantic gating (rerank)• embedding similarity rerank of the candidate set
• returns top-K Engrams
• stable tie-breakers: scope match → recency → confidence → pointer overlap
This keeps the “Engram vibe” while staying vendor-agnostic.
⸻
10. Use Cases UC1: Large repo refactor with PAS Goal: refactor module boundaries across many files LESS benefit: every agent shares “what changed / what matters” via pointers, not pasted code Flow: Programmer requests 2–3 derefs; parent grants; children emit risks + diffs as Engrams. UC2: Spec/PRD contradiction hunting Goal: ensure implementation aligns with SPEC + pricing + security invariants LESS benefit: contradictions become first-class Engrams with pointers to both conflicting sources Output: “Risk Engrams” that can gate merges or require explicit override. UC3: Multi-agent code review + test impact Goal: review PR with minimal context usage LESS benefit: reviewers exchange only:• “Issue Engrams”
• pointers to exact spans
• recommended patch pointers
Parent composes SharedBriefMicro: top issues + deref grants.
UC4: “Follow what other agents know” without sharing prompts Goal: let any agent query “what did others learn?” LESS benefit: query returns Engrams + pointers; user/agent derefs only what matters.⸻
11. UI Touchpoints (VerdictIDE + HMI) LESS should surface as:• “Shared Brief (LESS)” panel: live SharedBriefMicro + budgets + grants
• “Engram Feed”: stream of top Engrams (filter by role/scope/kind)
• Pointer click-through: open file at span, open artifact section, open SAM entry
• Budget meter: inline tokens used, derefs used, remaining grants
This makes the “5% rule” visible and self-correcting.
⸻
12. Observability & Telemetry LESS emits structured events:• less.engram.put
• less.engram.query
• less.deref.request
• less.deref.grant
• less.budget.reject
Metrics:
• avg inline tokens/turn by role
• derefs/turn by role
• top Engram kinds
• contradiction rate (risk engrams referencing ≥2 conflicting pointers)
• “resend rate” after budget rejection (should trend down)
⸻
13. Safety, Integrity, and Trust 13.1 Pointer integrity Pointer deref returns content_digest (hash). Engrams referencing deref’d content should record digest to prevent “phantom reads.” 13.2 Anti-spam Engram rate limiting:• max Engrams per agent per minute
• TTL eviction
• confidence floor for promotion beyond run scope
13.3 Privacy boundaries Scope enforcement prevents cross-project bleed:• project scope cannot be queried from another project
• org/global require explicit admin enablement
⸻
14. Schemas (v0.1) Note: These are the same core schemas as before, but now explicitly owned by the LESS skill and governed by budgets/scopes.{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "verdict://skills/less/schemas/engram.v0.1.json",
"type": "object",
"required": ["id","kind","claim","pointers","confidence","ttl","scope","provenance"],
"properties": {
"id": { "type": "string" },
"kind": { "type": "string", "enum": ["fact","decision","risk","todo","constraint","diff","test","perf","policy"] },
"claim": { "type": "string", "maxLength": 500 },
"pointers": {
"type": "array", "minItems": 1, "maxItems": 12,
"items": { "$ref": "verdict://skills/less/schemas/pointer.v0.1.json" }
},
"confidence": { "type": "number", "minimum": 0.0, "maximum": 1.0 },
"ttl": { "type": "string", "description": "ISO-8601 duration (PT6H, P7D, etc.)" },
"scope": { "type": "string", "enum": ["run","project","org","global"] },
"tags": { "type": "array", "maxItems": 12, "items": { "type": "string", "maxLength": 40 } },
"hash_keys": { "type": "array", "maxItems": 32, "items": { "type": "string", "maxLength": 80 } },
"provenance": {
"type": "object",
"required": ["created_at","created_by","source"],
"properties": {
"created_at": { "type": "string", "format": "date-time" },
"created_by": { "type": "string" },
"source": { "type": "string", "enum": ["rag","sam","agent","tool"] }
},
"additionalProperties": false
}
},
"additionalProperties": false
}
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "verdict://skills/less/schemas/pointer.v0.1.json",
"type": "object",
"required": ["type","ref"],
"properties": {
"type": { "type": "string", "enum": ["repo","artifact","sam","diff","url","test"] },
"ref": { "type": "string", "maxLength": 300 },
"span": { "type": "string", "maxLength": 80 },
"digest": { "type": "string" }
},
"additionalProperties": false
}
⸻
15. Acceptance Criteria Functional• PAS run completes with ≤800 inline tokens typical per agent turn.
• Every decision/risk Engram includes pointers.
• Deref attempts beyond budget are blocked unless granted.
Correctness• Deref’d content is traceable via content_digest.
• Contradictions can be represented as a single risk Engram referencing both sources.
UX• “Shared Brief (LESS)” panel shows:
• current micro-brief
• budgets + remaining derefs
• top Engrams + click-to-open pointers
⸻
16. Rollout Plan Phase 0 — Deterministic Core (ship first)• schemas + validation
• Engram store (hash-key recall)
• pointer resolver (repo/artifact/SAM)
• gateway budget enforcer + reject/resend loop
• PAS templates enforced
Phase 1 — Quality & Scaling• embedding rerank (optional)
• promotion workflow (run→project) via parent approval
• UI panels + telemetry dashboards
Phase 2 — Optimization• prefetch pointer packs (parent-driven)
• caching strategies / offload
• contradiction-based “merge gates” (optional)
⸻
17. Out-of-Scope (v0.1)• Cross-org global memory sharing by default
• Auto-promotion to org/global without human/admin policy
• Full graph memory / learned relationship model (LRM) — can integrate later
⸻
If you want the next step, I’ll generate the repo-ready implementation plan (files/paths/interfaces/tests) in the style you like: deterministic gates first, then optional embedding rerank, with exact middleware hooks in Gateway + PAS message contracts + a unit-test matrix.