colloquy-core
A clean-room Rust implementation of the cq shared-agent-learning standard: knowledge units, the pitfall → workaround → tool-recommendation → gap-signal ladder, diversity-weighted confidence over authorising principals, and per-kind staleness decay.
Agents that work alone rediscover the same failures independently. cq is an open standard for stopping that: agents query a shared store before acting, propose what they learned, confirm what held, flag what rotted, and graduate durable knowledge upward through a human gate.
[]
= "0.1"
Pure by construction
No clock, no I/O, no network, no store. Every time-dependent function takes
now as an argument, so the crate drives a native agent runtime and a
wasm32-unknown-unknown edge worker while both compute byte-identical
confidence for the same evidence.
use ;
let t0 = parse_rfc3339.unwrap;
let mut unit = propose;
// Proposing is not confirming: an agent cannot bootstrap its own confidence.
assert_eq!;
let mut ledger = default;
ledger.confirm;
ledger.confirm;
ledger.apply;
assert_eq!;
assert_eq!;
The two rules worth knowing
Confidence follows principals, not confirmations. cq's trust model says three confirmations from three independent parties outrank eight hundred from two. Implemented over accounts, that rule is defeated by anyone who can create accounts — and in an agent estate, creating an account is a command. So every attestation is folded onto its authorising principal before it is weighed: an operator's fifty agents count once.
# use ;
# use Timestamp;
# let t = from_secs;
let swarm: =
.map
.collect;
let independent: =
.iter
.map
.collect;
let policy = default;
assert_eq!;
assert!;
A flag suppresses nothing. Flagging lowers a unit's standing and marks it
Disputed, which is still served. Only a signed decision retires a unit, so no
single member can remove knowledge from the store by objecting to it.
Relationship to cq
The wire schema is cq's, and the crate is tested against cq's own published
knowledge_unit.json example: it parses, and a round trip rewrites nothing.
Two fields are additions, and both are additive so interoperability holds:
| Addition | Why |
|---|---|
Graduation::authorising_event |
cq records an approver as a string ("human:alice@acme.dev"). An identifier for the signed decision behind the promotion makes the same claim checkable by a third party. Omitted entirely when absent, so a cq-written unit round-trips byte-identically. |
UnitStatus::Disputed |
Separates "contested" from "withdrawn", so a flag can lower standing without any one member being able to suppress knowledge. |
An implementation that does not model dispute will refuse to parse a disputed unit rather than silently read it as active — which is the correct failure.
Licence
Apache-2.0, matching cq.