Where we are: PR #11 turned this repo from a "hello world" scaffold into
trust, a working CLI and Rust library for the Trust Graph protocol. You can
create identities, sign trust ratings as W3C Verifiable Credentials, store
them, and explore them through your Agent Lens. PR #15 then made the repo
the Trust Graph monorepo, built on one pure Rust core with three thin
wrappers: the trust CLI, a WebAssembly package (browsers, Workers, Convex
queries) and a native Node module (Node, Convex Node actions). See
architecture.
What's missing: nothing is published yet, and atoms only live where you put them. The next big steps are publishing the packages so CoreNexus and others can use them, then sharing atoms between people.
This repo is the Trust Graph monorepo. Every Trust Graph project lives
here: Rust crates in crates/*, TypeScript packages in packages/* (pnpm),
with all protocol logic in one Rust core. It will be renamed to
trustgraph/trustgraph.
Next steps, in order:
- Finish the monorepo. The layout is done, and the protocol docs and
the 2017 JSON-LD schema are imported with their history. Still to do, on
GitHub: archive the old repos and rename this repo to
trustgraph/trustgraph. - Lock the data format. Publish the JSON-LD context and JSON Schema at
trustgraph.net, freeze the atom and credential shapes as v1, and add exports to other reputation formats (IETF Reputons). - Release and publish. Prebuilt
trustbinaries (cargo-dist, Homebrew), the npm packages (@trustgraph/trustgraphper-platform via napi-rs, and@trustgraph/trustgraph-wasm), and the crates. Prove the WebAssembly build inside a real Convex query. - Share over HTTPS.
trust publishwrites a signed feed you can host anywhere (GitHub Pages, any static host).trust follow <url>andtrust pullfetch other people's feeds. This gives a working network with no servers to run. - Friendlier UX. Interactive
trust rate, readable table output, andtrust lens --format dot|mermaidto draw your graph. - Harden. Revoking and updating ratings, key rotation, Sybil-resistance research for the lens, and performance beyond 100k atoms.
Decisions I need from you (details in Open decisions):
- Value range: PR #11 uses
-1..=1(negative values express distrust), but trustgraph.net and the protocol README say0..1. Confirm, and I'll update those docs. - Domain for schemas: is
https://trustgraph.net/ns/v1OK for the JSON-LD context? - Package names: OK to publish
trustgraph-coreandtrustgraph-clion crates.io, and@trustgraph/trustgraphand@trustgraph/trustgraph-wasmon npm? An unrelated AI company is also called "TrustGraph". - Public or private npm: Convex installs native packages from npm at deploy time. Public is simplest; private needs a test that Convex can install from a private registry first.
- The existing
trustgraph/trustgraphrepo: that name is taken by the protocol README repo. That README is now indoc/protocol/with its history (Phase 0), so you can rename the old repo totrustgraph-protocol-archive, archive it, then rename this one.
Everything below this line is supporting detail.
- This repo was last touched in September 2022: a clap 3 greeter plus a TODO list (Appendix A). PR #11 covers every item on that list.
- Prior art in the
trustgraphorg:trustgraph/trustgraph: the protocol README (Trust Atoms, signed claims, multihash IDs).trustgraph/js-trustgraph-cli(archived):trust claim,trust get,trust map.trustgraph/trustgraph-schema: the 2017TrustClaim.jsonldcontext.
- Early drafts #9 and #10 (2022–23) sketched
trust claimandtrust graphargument parsing. The code is superseded bytrust, but three ideas carry forward: exports to other formats (IETF Reputons, Phase 1), IPFS as a publishing target (Phase 3), and value filters plus a per-hop "falloff" view for the lens (Phase 4). - trustgraph.net and the FOSDEM 2022 talk describe Agents, the Agent Lens, the Trust Cascade, and trust rollups. All of these are now real commands.
| Area | Status |
|---|---|
Workspace: protocol library + trust binary (PR #11) |
✅ |
Trust Atoms, validation, canonical JSON (RFC 8785), Qm… content IDs |
✅ |
Values: exact decimals in -1..=1, rounded to nine significant figures |
✅ |
did:key Ed25519 identities, keystore (0600) |
✅ |
W3C VC 2.0 + eddsa-jcs-2022 sign/verify (passes the spec's test vectors) |
✅ |
| Local append-only store, verified on the way in | ✅ |
| Agent Lens / Trust Cascade, topic filters, rollups | ✅ |
| CI (3 OSes, MSRV, clippy pedantic, rustdoc), Dependabot, Apache-2.0 (PR #11) | ✅ |
Pure trustgraph-core (no I/O, enforced in CI) + shared JSON api (PR #15) |
✅ |
Monorepo: Cargo workspace (crates/*), pnpm workspace (packages/*), Rust-first language policy (PR #15) |
✅ |
Optional random feature: Keypair::generate / generateKeypair(), off in the core by default (PR #15) |
✅ |
@trustgraph/trustgraph-wasm: web and Node builds, 540 KiB (PR #15) |
✅ built and tested, not published |
@trustgraph/trustgraph: napi-rs, tested on Linux, macOS, Windows (PR #15) |
✅ built and tested, not published |
| Shared TypeScript types; one smoke test across all JS builds (PR #15) | ✅ |
lens on 100k atoms (Node 24 LTS): 0.54 s WebAssembly, 0.43 s native (PR #15) |
✅ |
| CI: purity check, WebAssembly size budget, native addon on 3 OSes, latest Node LTS plus Node 22 (PR #15) | ✅ |
Old repos imported with full history: protocol README → doc/protocol/, 2017 JSON-LD → schema/legacy-2017/ |
✅ |
- One repo, Rust first. Every Trust Graph project lives in this monorepo. Protocol logic is Rust; TypeScript is welcome where it fits (web, Convex, extensions) but always calls the core rather than re-implementing it.
- One pure core, thin wrappers. All protocol logic lives in
trustgraph-core, which does no I/O (no files, network or clock; randomness only through the opt-inrandomfeature, which the wrappers turn on). The CLI, WebAssembly and Node packages only move data in and out. Every other component (web, CoreNexus, mobile) uses the same code instead of re-implementing the protocol, and no host (Convex included) shapes the core. See architecture. - Unix pipes. JSON/NDJSON in and out, so commands compose:
trust lens --rollup | trust sign | trust add. - Standards over invention. DIDs, VC 2.0, Data Integrity, JCS, multihash. Trust Graph's own formats are conversions on top.
- Offline first, servers optional. Creating, signing, verifying and exploring never need the network. Sharing is a plug-in.
- Agent-centric. There is no global score, ever. Every result is from someone's point of view.
- Proven, not hoped. Every format has spec vectors, property tests, or cross-implementation fixtures, and CI stays green.
Each phase is a few small PRs, and is done only when its acceptance criteria pass in CI.
One repository for every Trust Graph project, so the core and everything
built on it change together, in one PR and one CI run. The layout and
language policy shipped in PR #15. The old repos' content is now
imported with its full history, so git log --follow and git blame work on
the imported files. What remains is manual, on GitHub.
| Was | Now in this repo | Still to do (owner, on GitHub) |
|---|---|---|
trustgraph/trustgraph (protocol README) |
✅ doc/protocol/, with history, marked historical. Updating it to the current formats is part of Phase 1 |
Rename the old repo to trustgraph-protocol-archive, point its README here, archive it |
trustgraph/trustgraph-schema (2017 JSON-LD, served by GitHub Pages at schema.trustgraph.io and referenced as raw.githubusercontent.com/trustgraph/trustgraph-schema/gh-pages/TrustClaim.jsonld) |
✅ schema/legacy-2017/, with history. The new v1 context goes in schema/v1/ (Phase 1) |
Archive it (archived repos keep serving GitHub Pages and raw URLs, so old links keep working), point its README here; optionally redirect schema.trustgraph.io to trustgraph.net |
trustgraph/js-trustgraph-cli |
Nothing to import: trust replaces it, and its history up to March 2017 is shared with the protocol repo, so it came in with that import |
Nothing: already archived |
This repo, trustgraph-rust-cli |
Once the protocol repo is renamed, rename this one to trustgraph/trustgraph. GitHub redirects the old URLs |
- Layout (done): Rust crates in
crates/*(one Cargo workspace), TypeScript packages inpackages/*(one pnpm workspace), docs indoc/, JSON-LD inschema/. TypeScript calls the core through the WebAssembly or native package and never re-implements protocol logic. - Acceptance: one
cargo testand one CI run cover everything in the repo; the old repos are archived and point here.
- Publish
https://trustgraph.net/ns/v1(JSON-LD context) and a JSON Schema generated from the Rust types (schemars), intrustgraph-schema. - Document the atom and credential formats in the protocol README, replacing
the 2017
TrustClaimexample, and update trustgraph.net to match the decided value range. - Add golden files of real atoms and credentials to the repo; CI fails if the bytes ever change.
trust convert --to reputon: export atoms as IETF Reputons (RFC 7071), so existing reputation systems can read them (an idea from the early drafts).- Acceptance: an off-the-shelf VC library (e.g. Digital Bazaar's
@digitalbazaar/vcwith theeddsa-jcs-2022suite) verifies a credential signed bytrust.
- CLI:
cargo-distfor prebuilt binaries and shell/PowerShell installers, plus a Homebrew tap.release-plzfor versioning and the CHANGELOG. - npm, native: add the napi-rs cross-compile matrix (the targets are
already listed in
crates/trustgraph-node/package.json) and publish@trustgraph/trustgraphwith one small package per platform, like@resvg/resvg-js. - npm, WebAssembly: publish
@trustgraph/trustgraph-wasmfromscripts/build-wasm-package.sh. - Crates: publish
trustgraph-coreandtrustgraph-clionce Phase 1 is frozen. - Convex spike: deploy a query that imports the WebAssembly package and
runs
lens; confirm bundle size and cold-start time in Convex itself. Then use the native package from a Node action viaexternalPackages. cargo deny(licenses and advisories) and coverage (cargo llvm-cov) in CI.- Later: a UniFFI wrapper for mobile, on the same core.
- Acceptance:
npm install @trustgraph/trustgraphworks on macOS, Linux and Windows without a Rust toolchain, and a Convex deployment computes a lens in a query.
trust publish [--out DIR]: write your signed atoms as a static feed (atoms.ndjsonplus a small signed index) that any static host can serve.trust follow <url>/trust unfollow/trust pull: fetch feeds and verify every atom before storing it. Use ETags so repeat pulls are cheap.- Optional discovery via
/.well-known/trust/atoms.ndjson, plusdid:webso an organization can sign with its own domain. - Next transport, if there is demand: IPFS (
trust publish --to ipfs). Atom IDs are already SHA2-256 multihashes, the same as IPFS's. - Acceptance: two machines exchange atoms through GitHub Pages, and each
sees the other in
trust lens.
trust rate: interactive prompts when stdin is a TTY (the 2022 TODO list's "prompts that enforce things"), usingdialoguer.--format tablefor humans; JSON stays the default when piped.trust lens --format dot|mermaidto draw your trust graph.trust lens --min-value / --max-valuefilters, and--explainto show how much trust each hop passed along (the "falloff" idea from the early drafts).- Named contacts (
trust contact add bob did:key:…) so you don't paste DIDs.
- Revocation and updates: a newer atom from the same source replaces an older one (the lens already prefers the latest); add explicit revocation atoms and Bitstring Status Lists for credentials.
- Key rotation:
did:keycan't rotate. Supportdid:weband/ordid:plc, with signed key-succession statements. - Lens research: compare the cascade with EigenTrust and Appleseed; study
Sybil resistance; add
criterionbenchmarks, and an incremental lens for graphs well beyond 100k atoms (today: precompute rollups natively). - Privacy: private atoms (encrypted to recipients) and selective sharing, as the protocol README calls for.
| # | Question | Recommendation |
|---|---|---|
| 1 | Value range | Keep -1..=1; 0..1 data is still valid. Update the website and protocol README |
| 2 | JSON-LD context URL | https://trustgraph.net/ns/v1 |
| 3 | Package names | crates trustgraph-core, trustgraph-cli (binary trust); npm @trustgraph/trustgraph, @trustgraph/trustgraph-wasm |
| 4 | Public or private npm | Public: Convex installs native packages from npm at deploy time |
| 5 | Copyright line in LICENSE | Currently the unfilled Apache template; e.g. "Trust Graph contributors" |
| 6 | Sharing transport | HTTPS feeds first (no servers to run); add other transports only when there is demand |
| 7 | MSRV policy | Stable minus about 6 releases; raise it on purpose, never by accident |
| 8 | The existing trustgraph/trustgraph repo |
Its README is now in doc/protocol/ (done). Rename it trustgraph-protocol-archive, archive it, then rename this repo to trustgraph/trustgraph |
From src/main.rs (September 2022):
| 2022 TODO | Status |
|---|---|
| decide on some initial use cases | ✅ rate, sign, verify, store, query, lens (PR #11) |
| make ArgGroup, make prompts that enforce things | ✅ validation in PR #11; interactive prompts in Phase 4 |
| call an API? write to trustgraph right now? | Phases 2 and 3 |
| what is the interface between CLI and backend? is there a backend? | ✅ The library is the interface; backends are optional plug-ins |
| spit out jsonld and optionally pipe to storages | ✅ VC 2.0 JSON-LD on stdout; trust add stores it |
| make separate components for cli, and pipes | ✅ pure core + CLI, WebAssembly and Node wrappers (PR #15) |