v0.2-draft · experimental protocol · open specification and reference implementation
Context Layer is a protocol for moving the minimum useful context across applications, models, and agents while keeping authority with the user. Every exchange begins with a declared purpose, passes through policy, produces a recipient-bound scoped bundle, and leaves a minimized receipt.
This is the canonical public repository for both the protocol and its published documentation experience. It contains the specification, schemas, reference runtime, local-core proof, threat model, test vectors, executable tests, and the source served at sierracatalina.com/context-layer.
- Draft technical specification
- Implementation and interoperability guide
- Architecture diagram
- JSON Schemas
- Dependency-free reference runtime
- Experimental local core
- Threat model
- Executable v0.2 vectors
purpose-bound request
-> policy decision
-> minimum approved bundle
-> capability-bound action
-> minimized receipt
-> reviewable memory proposal
The protocol preserves seven core boundaries:
- Purpose is declared before access.
- Policy can allow, reduce, require approval, or deny.
- Raw-vault material never enters a scoped bundle.
- Bundles are bound to a recipient, expiry, and single-use rule.
- Consumers receive explicit capabilities rather than ambient authority.
- Sensitive operations produce payload-minimized receipts.
- New memory enters through a proposal and review path.
The v0.2 draft includes:
- Closed JSON Schemas for requests, decisions, bundles, receipts, and memory proposals
- A dependency-free reference validator and deterministic policy/bundle flow
- An encrypted single-user local vault
- Four-state policy evaluation
- Authenticated scoped-bundle envelopes
- An append-only receipt log with an authenticated anchor
- One root-confined UTF-8 files adapter
- One capability-bound local-agent consumer
- Synthetic fixtures, executable vectors, and an end-to-end demo
The proof is experimental and is not an adopted standard or a production security certification.
Requirements:
- Node.js 22.13 or later
- npm
npm ci
npm run lint
npm test
npm run demo:local-corenpm test runs the repository-boundary, public-contract, local-core, receipt-hardening, demo, and proof-vector suites. All fixtures and demos are synthetic.
| Path | Purpose |
|---|---|
| protocol/spec/ | Draft specification, implementation guide, architecture, and technical essay |
| protocol/schemas/ | Portable JSON Schemas |
| protocol/fixtures/ | Valid and invalid synthetic contract fixtures |
| protocol/reference/ | Dependency-free reference runtime |
| packages/local-core/ | Experimental vault, policy, bundle, receipt, adapter, and consumer modules |
| docs/ | Threat model and interoperability drafts |
| test-vectors/v0.2/ | SHA-bound deterministic protocol/security vectors |
| examples/ | Minimized executable local-core demonstration |
| site/context-layer/ | Canonical source for the published Context Layer dossier and its routes |
| site/vercel.json | Standalone route map for previewing or deploying the public documentation experience |
| tests/ | Contract, boundary, local-core, receipt, demo, and vector verification |
The website is a documentation surface, and its complete public source is versioned in site/context-layer/. The protocol objects under protocol/ remain authoritative for technical behavior and versioned proof artifacts.
The site/ directory is independently deployable and preserves the production URL structure, including /context-layer, /context-layer/architecture, and /signal/the-context-layer.
npx vercel dev siteThe repository test suite verifies that all published routes and their required assets remain present. Changes to public copy or design should be made here first so the repository and live documentation cannot silently diverge.
Report vulnerabilities through GitHub private vulnerability reporting; do not post exploit details in a public issue.
Software, schemas, fixtures, tests, and executable examples are licensed under Apache License 2.0. Specifications, prose documentation, and diagrams are licensed under Creative Commons Attribution 4.0 International. See LICENSING.md for the exact boundary.