Protean Kit · protocol ingredient
One canonical JSON packet per line.
SYM-2P is a versioned message language for AI agents. Agents write messages as JSON packets, one packet per line, inside plain text files that persist.
A validator checks every packet and reports problems with codes a script can read.
protean-ops alongside; the manifest recommends it.protean-ops, not here.bash install.sh --target <dir>
bash install.sh --target <dir> --dry-run
Bash and coreutils only. Zero network calls. Every written path is printed, and no --target means no run. The dry run writes nothing.
It installs alone, resolving only its required dependencies. Optional relationships are reported, not fetched.
| Path | Contents |
|---|---|
SPEC.md | The normative specification |
skills/sym2p/ | The usage skill |
scripts/protean-sym2p/ | sym-validate.py and sym-publish.py, stdlib only |
templates/protean-sym2p/ | Canonical brief and receipt packets |
examples/protean-sym2p/ | The worked review, fix, verify, merge loop |
AUDIT/protean-sym2p/ | Evidence and provenance (never normative) |
gates/protean-sym2p/ | The leak gate and the blocklist |
A brief packet assigning work, as shipped in templates/:
{
"v": 2,
"id": "b441",
"tk": "mr1",
"prj": "sym2integration",
"f": "cos",
"t": "builder",
"a": "assign",
"s": "mr1",
"st": "proposed",
"cf": 88,
"cov": 70,
"cond": [
"scope: implement SYM-2P/1.0 sections 3-5 only",
"constraint: no existing path may be modified",
"acceptance: validator exits 0 on valid fixtures, non-zero on invalid"
],
"rq": "ack",
"base": "mr1:v1",
"exp": 40,
"ext": { "sym2p": { "rev": "1.0" } }
}
python3 scripts/protean-sym2p/sym-validate.py <packet-or-stream>
python3 scripts/protean-sym2p/sym-validate.py --state <receiver-state.json> <packets.jsonl>
python3 scripts/protean-sym2p/sym-validate.py --strict-canonical <packets.jsonl>
python3 scripts/protean-sym2p/sym-validate.py --verify-hashes --kind object <root>/objects/<id>.v2.md
python3 tests/run-tests.py
Exit code 0 means every document is valid. Exit code 1 means at least one is invalid, with a typed diagnostic. Exit code 2 means a usage, IO, or configuration error.
.jsonl is read one object per line. That is the wire carrier.
python3 scripts/protean-sym2p/sym-publish.py --root <delegation-dir> --by <role-id> draft.json
python3 scripts/protean-sym2p/sym-publish.py --root <dir> --by <role-id> --announce --to <recipient> draft.json
The publisher writes the append-only object versions the validator then checks.
tests/run-tests.py passes every valid fixture and rejects every malformed, stale, duplicate, or protected-semantic fixture with a typed diagnostic. Twenty invalid fixtures and four valid ones ship under tests/fixtures/. The suite also exercises the publisher's append-only write path end to end.gates/protean-sym2p/check-internal-names.py blocks internal names from leaking into published artifacts.Open items O-1 to O-9 stay open. Section 10 of the spec carries them. This repository closes none of them and presents none as decided.
MIT licensed. The committed LICENSE file is authoritative. Requires nothing beyond Python ≥3.9 and git. Recommends protean-ops for the record schemas that carry routing state.