Manifest reference¶
The manifest is the single place where you declare who may know what. Everything else reads it.
Example¶
modules:
reader: { role: quarantined, tools: [read_drive], can_call: [] }
planner: { role: privileged, tools: [], can_call: [reader, sender] }
sender: { role: gated, tools: [send_email], approve: policy }
flows:
reader -> planner: { schema: EmailSummary }
planner -> sender: { require_provenance: [user, reader] }
audit:
retain: 90d
modules¶
| Field | Type | Meaning |
|---|---|---|
role |
privileged | quarantined | gated |
See roles |
tools |
list of tool names | Tools this module may invoke |
can_call |
list of module names | Modules this one may delegate to |
approve |
always | policy |
Gated only. always asks a human on every call; policy asks only when the tool's policy returns ask |
flows¶
Keys are src -> dst. Values:
| Field | Meaning |
|---|---|
schema |
Required for quarantined → privileged. Name of a registered strict schema the output must match |
require_provenance |
For privileged → gated. Every argument's sources must be a subset of what these names produce: user, or a module name (expands to that module's tools) |
Validation rules¶
treering validate rejects a manifest unless all of these hold:
- Exactly one
privilegedmodule. privilegedhas notools— least knowledge.quarantinedhas nocan_calland at least one tool.gatedhasapproveand nocan_call.- Every
can_calltarget and every flow endpoint exists. - Every schema name is registered.
- If the planner can call a quarantined module, a flow back to the planner with a schema is declared.
- If the planner can call a gated module, the flow planner → gated is declared — default-deny.
Registering schemas¶
Schemas are Pydantic models with extra="forbid" and strict mode:
from pydantic import Field
from treering import schemas
class TicketSummary(schemas.StrictSchema):
ticket_id: str = Field(pattern=r"^[A-Z]+-\d+$")
priority: int = Field(ge=1, le=4)
schemas.register("TicketSummary", TicketSummary)
Design fields so that free text cannot fit. Regex-constrained strings, enums, bounded ints and emails leave no room for an injected sentence.
CLI¶
treering validate path/to/manifest.yaml # exit 0 if valid, 1 with reasons if not
treering verify path/to/rings.jsonl # exit 0 if chain intact, 1 with the first broken ring
treering demo # run the meeting-notes scenario