Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
1ff87cb
feat: backlog sweep wave 1 — registry, release/SDK prep, canary, sche…
macanderson Jul 29, 2026
47de5eb
docs(spec): add normative Usage reports section, fix tokenizer_ref co…
macanderson Jul 29, 2026
dfba2a3
docs(spec): sketch the deferred context/neighbors 1.x operation (#7)
macanderson Jul 29, 2026
7931622
feat(host): carry structured error codes across the transport boundar…
macanderson Jul 29, 2026
57264db
feat(host): enforce C7/C8 in the reference HTTP transport (#13)
macanderson Jul 29, 2026
d183852
feat(conformance): host-side H3 version-rejection + crash-isolation s…
macanderson Jul 30, 2026
950d5e9
feat(sdk): HTTP adapters + create-contextgraph-provider scaffold + qu…
macanderson Jul 30, 2026
7cb82d7
ci+docs: wire sdk-http/scaffold CI jobs, record the host+sdk wave in …
macanderson Jul 30, 2026
de90ed4
feat(conformance): stale-digest misbehave mode + fixture self-consist…
macanderson Jul 30, 2026
250773c
docs(registry): regenerate seed report at 13 checks after #12
macanderson Jul 30, 2026
aae056d
feat(host): pipeline the stdio transport — demux on id, shrink the mu…
macanderson Jul 30, 2026
54cacaf
docs(changelog): record #4 (stdio pipelining) and #12 (stale-digest)
macanderson Jul 30, 2026
cf23015
feat(host): reference prompt-composition module — budget, dedup, audi…
macanderson Jul 30, 2026
0f9ea55
feat: reference provider crates + MCP interop bridges (#18, #19)
macanderson Jul 30, 2026
497025b
feat(types): ratify the Context Exchange Provider lifecycle profile (…
macanderson Jul 30, 2026
11863ea
docs: apply the CGP abbreviation convention + README CI badge (#21, #…
macanderson Jul 30, 2026
af77fc0
Merge origin/main into chore/backlog-sweep-2026-07
macanderson Jul 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Bug report
description: Report a defect in an Context Graph Protocol crate or the specification
description: Report a defect in a Context Graph Protocol crate or the specification
title: "bug: "
labels: ["bug", "needs-triage"]
body:
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,22 @@ which. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1
`contextgraph-mcp-server` exposes a CGP host's fan-out as an MCP
`query_context(goal, budget, kinds)` tool returning frames, provenance,
citations, and a budget audit as structured content.
- **Context Exchange Provider profile ratified** (`contextgraph/lifecycle/1.0-draft`,
#28) — the draft skeleton becomes a normative profile
(`docs/profiles/context-exchange-provider.md`) with RFC-2119 rows and stable
anchors. Adds the discriminated `ContextRecord` JSON Schema
(`schema/contextgraph-lifecycle-record.schema.json`, `$id` on GitHub-raw per
ADR 0008) covering all 12 record kinds, `contextgraph-types::record` wire types
(zero new runtime deps), per-kind golden fixtures under `tests/fixtures/` with
an RFC 8785 JCS `record_hash` worked example, and a `contextgraph-conformance`
round-trip + hash suite. `context/resolve` is scoped to the profile (taking up
SPEC §6.4.1's reservation); reconciliation rows D1/D4/D5/D6/D7/B3/B5/C5/E3 are
resolved.
- **Docs: CGP abbreviation convention + a CI badge** (#21, buildable half of #2)
— README, CONTRIBUTING, and `docs/` now expand
"Context Graph Protocol (CGP)" on first mention and use "CGP" in body prose
(titles, link text, version strings, and crate names left intact); the
bug-report template grammar is fixed; and the README gains a CI status badge.
- **`SPEC.md` normative completeness pass** — folds every shipped wire surface
into the single normative home ahead of the freeze (#49, #50, #48, #13). Adds
§9 **Verification** (`verify`/`verified`, V1–V4), §6.3 **Frame identity**
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Context Graph Protocol

Thanks for wanting to make Context Graph Protocol better. This document is the whole game:
Thanks for wanting to make Context Graph Protocol (CGP) better. This document is the whole game:
how to set up, where your change goes, what "done" means here, and how to
get it merged. It's long because it's honest — but the short version is:

Expand Down Expand Up @@ -60,7 +60,7 @@ locally before you push):

## Issues and labels

- **[Bug report](https://github.com/macanderson/context-graph-protocol/issues/new?template=bug_report.yml)** — include the Context Graph Protocol crate name and version, OS, and a repro.
- **[Bug report](https://github.com/macanderson/context-graph-protocol/issues/new?template=bug_report.yml)** — include the CGP crate name and version, OS, and a repro.
- **[Feature request](https://github.com/macanderson/context-graph-protocol/issues/new?template=feature_request.yml)** — say what you're trying to do, not just what to add.

Labels you'll see: `area:*` routes an issue to a crate; `P0`–`P2` is priority;
Expand All @@ -69,7 +69,7 @@ a PR is waiting on its witness test.

## License

Context Graph Protocol is dual-licensed **MIT OR Apache-2.0**. By contributing, you agree your
CGP is dual-licensed **MIT OR Apache-2.0**. By contributing, you agree your
contributions are licensed under the same terms, as certified by your DCO
sign-off. No CLA, no copyright assignment.

Expand Down
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Context Graph Protocol (draft v0.1.0)

[![CI](https://github.com/macanderson/context-graph-protocol/actions/workflows/ci.yml/badge.svg)](https://github.com/macanderson/context-graph-protocol/actions/workflows/ci.yml)
[![contextgraph-types on crates.io](https://img.shields.io/crates/v/contextgraph-types.svg)](https://crates.io/crates/contextgraph-types) [![contextgraph-types docs](https://img.shields.io/docsrs/contextgraph-types)](https://docs.rs/contextgraph-types)
[![contextgraph-host on crates.io](https://img.shields.io/crates/v/contextgraph-host.svg)](https://crates.io/crates/contextgraph-host) [![contextgraph-host docs](https://img.shields.io/docsrs/contextgraph-host)](https://docs.rs/contextgraph-host)
[![contextgraph-conformance on crates.io](https://img.shields.io/crates/v/contextgraph-conformance.svg)](https://crates.io/crates/contextgraph-conformance) [![contextgraph-conformance docs](https://img.shields.io/docsrs/contextgraph-conformance)](https://docs.rs/contextgraph-conformance)
Expand All @@ -14,7 +15,7 @@ https://contextgraphprotocol.org

> If you want the deep research analysis, read [Advantages and Uniqueness](./docs/protocol-advantages.md).
> If you want to build a provider today, read [Implementing a provider](./docs/implementing-a-provider.md).
> This page is the one-read explanation of what Context Graph Protocol is, why it exists, and why
> This page is the one-read explanation of what Context Graph Protocol (CGP) is, why it exists, and why
> you would build against it.

---
Expand All @@ -39,14 +40,14 @@ account for. It works until the budget silently overflows, a provider lies about
cost, workspace content leaks to a third party, or an auditor asks "where did
this answer come from?" and there is no trail.

The Context Graph Protocol makes every one of those questions answerable.
CGP makes every one of those questions answerable.
Not by convention, but by contract.

---

## What Context Graph Protocol is, in one paragraph

Context Graph Protocol is an open wire protocol for context retrieval. It treats a piece of context
CGP is an open wire protocol for context retrieval. It treats a piece of context
as a typed, budgeted, provenance-carrying, consent-gated, and
conformance-verified unit of exchange called a **frame**. A host asks providers
for frames relevant to a goal, under a token budget. Each provider returns
Expand All @@ -63,7 +64,7 @@ conformance suite). All three are dual-licensed MIT OR Apache-2.0.

## The seven guarantees

Context Graph Protocol makes seven promises about every frame that enters a prompt. Each one is a
CGP makes seven promises about every frame that enters a prompt. Each one is a
type in `contextgraph-types` and an enforcement path in `contextgraph-host` or `contextgraph-conformance`,
not a line in a style guide.

Expand All @@ -72,15 +73,15 @@ not a line in a style guide.
| **Provenance** | Every frame carries its origin: URI, line range, cryptographic digest, method, and the agent that produced it | `ContextFrame.provenance` |
| **Budget honesty** | A provider's frames never sum above the query's `max_tokens`. A provider that lies is detected and its frames are dropped, loudly | Host budget audit + `budget-honesty` conformance check |
| **Consent enforcement** | A provider that sends data off-machine is never queried until you record named, revocable consent. The query payload is not transmitted first | `ConsentStore` gate in `contextgraph-host` |
| **Conformance** | "Context Graph Protocol conformant" is a checkable claim, not a self-attestation. The suite is adversarial and ships a mode that trips every failure on purpose | `contextgraph-conformance`, 5 checks |
| **Conformance** | "CGP conformant" is a checkable claim, not a self-attestation. The suite is adversarial and ships a mode that trips every failure on purpose | `contextgraph-conformance`, 5 checks |
| **Citation** | Every frame has a non-empty title and citation label. Raw ids are never the on-screen identifier | `frame-validity` conformance check |
| **Version stability** | The protocol evolves inside a major family. The draft-to-stable freeze needs no flag day and breaks no deployed provider | `versions_compatible` in `contextgraph-host` |
| **Temporal validity** | Facts carry `valid_from` and `valid_to` windows. A query can pin retrieval to a point in time with `as_of` | `ContextFrame` temporal fields |

The properties compose, and the combination is the point. Provenance without
budget honesty means you can trace a frame but not control its cost. Budget
honesty without consent means costs are honest but data can still leak. Remove
any one and the trust model collapses back to the blob-pipe. That is why Context Graph Protocol is
any one and the trust model collapses back to the blob-pipe. That is why CGP is
specified as one integrated protocol, not a menu of options.

---
Expand Down Expand Up @@ -151,11 +152,11 @@ separates a message body from its headers.
## How Context Graph Protocol relates to MCP

They are complementary, not competing. The Model Context Protocol (MCP) connects
**tools**: functions an agent calls to take an action. Context Graph Protocol connects **context**:
**tools**: functions an agent calls to take an action. CGP connects **context**:
typed, budgeted, cited evidence a host composes into the prompt before the agent
acts. MCP has no budget-honesty contract, no egress consent gate, no provenance
chain, and no conformance suite, because those are outside its scope, not
deficiencies in it. An agent that needs both composes them. Context Graph Protocol frames feed the
deficiencies in it. An agent that needs both composes them. CGP frames feed the
prompt. MCP tools do the work.

---
Expand All @@ -166,7 +167,7 @@ prompt. MCP tools do the work.
to writing a provider is a JSON codec and the wire table. In-process, over
stdio, or over HTTP.
- **Conformance is a test you run in CI.** Point `contextgraph-inspect` at your provider.
Green means it works with any Context Graph Protocol host. A broken provider is caught at CI time,
Green means it works with any CGP host. A broken provider is caught at CI time,
not at integration time. The suite ships a `--misbehave` mode that trips every
check on purpose, so you know the checks are real.
- **Stability you can pin.** The protocol version is `contextgraph/1.0-draft`. Two versions
Expand All @@ -178,7 +179,7 @@ prompt. MCP tools do the work.

## License

All Context Graph Protocol crates (`contextgraph-types`, `contextgraph-host`, `contextgraph-conformance`) and this repository
All CGP crates (`contextgraph-types`, `contextgraph-host`, `contextgraph-conformance`) and this repository
are dual-licensed under **MIT OR Apache-2.0**, at your option. See
[`LICENSE-MIT`](./LICENSE-MIT) and [`LICENSE-APACHE`](./LICENSE-APACHE). By
contributing you agree your contributions are licensed under the same terms.
Expand All @@ -187,7 +188,7 @@ contributing you agree your contributions are licensed under the same terms.

## Status

Context Graph Protocol is `contextgraph/1.0-draft` today. The wire types are stable enough to build against,
CGP is `contextgraph/1.0-draft` today. The wire types are stable enough to build against,
the host runtime enforces the guarantees, and the conformance suite verifies them.
The path from "open context as an idea" to "open context as a standard" is the
conformance suite: anyone can build a provider, anyone can verify it, and the
Expand Down
20 changes: 18 additions & 2 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,15 @@ to obtain the full source of a `compact` or `reference` frame.
**`context/resolve` is not defined in `contextgraph/1.0`.** There is no resolve
envelope, and a host has no protocol-defined operation that turns a `content_ref`
into bytes. Resolution is reserved for a `1.x` additive minor (§13); a design
sketch lives under [`docs/sketches/`](./docs/sketches/). This has three
consequences a 1.0 implementer **MUST** understand:
sketch lives under [`docs/sketches/`](./docs/sketches/). The **Context Exchange
Provider profile** (issue #28,
[`docs/profiles/context-exchange-provider.md`](docs/profiles/context-exchange-provider.md))
takes that reservation up: it defines `context/resolve` as a **profile-scoped**
operation layered on the `contextgraph/1` family — *outside* the frozen `1.0`
core, which still ships no resolve operation — turning `capabilities.resolve`
from a forward-declaration into a callable contract within that profile's
capability envelope. This has three consequences a 1.0 implementer **MUST**
understand:

- A provider communicating over a transport binding (stdio, HTTP) **SHOULD NOT**
return `reference` frames, because the host cannot rehydrate them over the wire
Expand Down Expand Up @@ -715,6 +722,15 @@ Together U1–U4 are the mechanism behind the one-line promise that the freeze
because the `1.0` peer ignores what it does not know, the vocabularies it does
know only ever grew, and nothing it relied on was moved out from under it.

The **Context Exchange Provider profile** (issue #28,
[`docs/profiles/context-exchange-provider.md`](docs/profiles/context-exchange-provider.md))
applies these same rules to its record layer:
[`schema/contextgraph-lifecycle-record.schema.json`](schema/contextgraph-lifecycle-record.schema.json)
is a second authoring-strict schema (`unevaluatedProperties: false`) that is a
lint, not the interop contract; `record_kind` is closed within `lifecycle/1.0`
(a new kind is a `lifecycle/1.x` addition, the U2 discipline); and record
`extensions` and `record_links.rel` follow the U3 namespacing rule.

---

## 14. Attribution
Expand Down
Loading
Loading