This is the repository entrypoint for coding agents and human contributors. Keep it short and route detailed work to the canonical documents below.
Psyche is the canonical orchestration protocol for OpenCoven. Preserve identity, authority, correlation, durability, and recovery across runtimes and surfaces.
Psyche Build is the first planned reference client; it is not the protocol owner. Coven, Threads, and Familiar Contract retain their own canonical domains.
- Read
README.md. - Read
docs/ROADMAP.mdand confirm the work has an owning issue. - Read
docs/PROTOCOL-OWNERSHIP.mdbefore changing a cross-repository boundary. - Read the scoped architecture/testing documents relevant to the change.
- Look up the type, table or test in
docs/CODEMAP.mdbefore searching the tree. - Run
./scripts/agent-bootstrap. - Run
./scripts/agent-check fastbefore editing and after each bounded slice. - Run
./scripts/agent-check fullbefore requesting review.
- Architecture and dependency direction:
docs/ARCHITECTURE.md - Protocol/schema inventory:
docs/SCHEMAS.md - Deterministic evidence model:
docs/TESTING.md - Code map, where each record, digest, lifecycle rule and its tests live:
docs/CODEMAP.md - Historic G2 evidence:
docs/G2-EVIDENCE.md - Current G2 scope policy, what a protected change requires, and attestation status:
docs/G2-ATTESTATION-SCOPE.md,scripts/g2-attestation-scope.json,docs/G2-SCOPE-EVIDENCE.md - CLI boundary:
docs/CLI.md - Configuration:
docs/CONFIGURATION.md - Program roadmap:
docs/ROADMAP.md - Cross-repository ownership:
docs/PROTOCOL-OWNERSHIP.md - Contribution and review contract:
CONTRIBUTING.md - Security reporting and protected data:
SECURITY.md - Machine-readable repository contract:
agent/manifest.yaml
| Path | Canonical responsibility |
|---|---|
crates/psyche-core/** |
IDs, records, validation, canonicalization, digests, errors |
crates/psyche-store/** |
durable storage, transitions, migrations, quarantine, retention |
crates/psyche-coven/** |
typed Coven adapter; never replaces core decisions |
crates/psyche-surfaces/** |
bounded surface ports |
crates/psyche-runtime/** |
runtime composition and shutdown |
crates/psyche-cli/** |
process/CLI boundary |
crates/psyche-config/** |
versioned configuration loading and validation |
crates/psyche-test-support/** |
reusable conformance evidence, not production authority |
packages/psyche-npm/** |
npm wrapper and packed distribution |
.github/**, scripts/** |
CI, evidence, release, and verification controls |
- R0: prose and examples with no contract claim.
- R1: pure implementation that cannot mutate durable state or authority.
- R2: local mutable state, migrations, or recovery helpers.
- R3: network, credentials, external systems, or user data.
- R4: canonical identity, authorization, persistence, dispatch, receipts, cancellation, recovery, evidence, and release.
Psyche is an R4 repository. Any R2–R4 change needs explicit failure, rollback, and retained-evidence criteria. Do not widen authority to simplify a test.
Never:
- derive durable identity from a tracker, process, tmux pane, path, transport, UI component, or provider session;
- treat successful decoding or dispatch as authorized completion;
- replace an unknown or ambiguous result with success;
- redispatch an indeterminate effect without the canonical reconciliation/fence rule;
- mutate append-only records or rewrite history to “repair” state;
- accept unknown major versions, enums, kinds, or widened capabilities silently;
- hand-edit generated fixtures or evidence where a canonical generator exists;
- weaken negative, crash, restart, quarantine, or structured-denial tests;
- expose secrets or unrestricted user/project content in evidence.
- Claim one issue and one bounded outcome.
- Record current behavior and the invariant being preserved.
- Add or identify focused positive and negative tests.
- Implement the smallest compatible slice.
- Run the fast gate.
- Run the relevant conformance, migration, property, or crash tests.
- Run the full gate.
- Inspect
git diff --checkand ensure generated outputs are canonical. - Open a focused PR with exact commands/results, risk, migration, rollback, affected consumers, and remaining proof gaps.
- Do not close the outcome until durable evidence is linked.
The G2 scope defaults every unlisted path to protected. Its manifest lists the exact exceptions and permitted operations. Treat these areas as requiring focused owner review:
- canonical ID prefixes and record schemas;
- canonical JSON and digest construction;
- structured error/denial vocabulary;
- migrations and persisted compatibility;
- adoption, dispatch, fencing, cancellation, receipts, and recovery;
- quarantine and retention;
- runtime shutdown/checkpoint ordering;
- conformance fixtures and evidence checker allowlists;
- CI, supply-chain, secret, and release controls.
agent/manifest.yaml lists the protected review surfaces, verification commands and required handoff evidence. Its one declared generated path is the experimental canonical vector set under crates/psyche-core/tests/fixtures/vectors/, regenerated only by the command in that directory's README. Do not edit generated artifacts manually. Use the documented generator or update the generator and artifact in the same PR.
docs/G2-EVIDENCE.md is retained evidence tied to immutable commits and runs. It is not a mutable status dashboard. New evidence must identify source SHA, command, result, and immutable artifact/run.
./scripts/agent-check fast
./scripts/agent-check fullBoth modes preserve existing staged, unstaged and untracked edits and fail if the index or nonignored working tree changes during verification. GitHub runs separate cross-platform, dependency-audit, full-history secret and G2 relationship gates.
Before changing a public contract:
- update the producer/consumer ownership map;
- identify every affected OpenCoven repository;
- define version negotiation and rollback;
- update immutable compatibility pins/canaries;
- preserve old reads until migration evidence permits removal;
- do not make Psyche Build, Cave, Coven, or Threads a hidden source of canonical truth.
A completion comment or PR must include:
- objective and non-goals;
- files intentionally changed;
- risk class and protected surfaces touched;
- exact tests and results;
- compatibility and consumer impact;
- migration and rollback;
- generated artifact provenance;
- unresolved uncertainty or unavailable platform evidence;
- exact commit SHA.