shadowgraph_record_fact
Record an observed project fact by key with claimed provenance and optional validity window, superseding the active value and preserving history for decision rules.
Instructions
Record one observed fact as a project and key, with a claimed provenance class and optional validity window. Use for the fact keys reopenWhen rules name; shadowgraph_remember stores durable memory that is not an observation. Supersedes the previous active fact, keeping it as history. No input can make a fact verified. Each call commits a revision.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"key": "<key>",
"value": "<value>"
},
"name": "shadowgraph_record_fact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Fact name, unique per project among active facts. Required and non-empty. Use the same key that a decision’s reopenWhen rules refer to. | |
| tags | No | Free-form labels stored with the fact. Searchable content. | |
| actor | No | Who performed this write, such as an agent or person name. Stored for audit; never used to grant trust. | |
| value | Yes | Any lossless JSON value: string, finite number, boolean, null, array, or object. | |
| client | No | Which client software performed this write, such as the host application name. | |
| reason | No | Explanation or rationale for observing, updating, or superseding this fact. | |
| source | No | Legacy alias for sourceClass. An unknown label downgrades to agent_claimed with the raw label kept in sourceRaw. | |
| project | No | Owning project; required unless originId is set, else the write is refused. | |
| validTo | No | ISO 8601 instant after which this fact stopped being true, or null. | |
| backfill | No | Alias for allowHistorical to insert a fact into past validity intervals. | |
| originId | No | Capture-origin ID for unattributed records when project is omitted. | |
| expiresAt | No | ISO 8601 instant after which shadowgraph_maintain expires this fact. Combined with validTo, the earlier boundary wins. | |
| sessionId | No | Caller-owned identifier that groups related writes in the audit trail. | |
| validFrom | No | ISO 8601 instant from which this fact became true in the modeled world. | |
| confidence | No | How much the caller trusts this observation, 0-1. Defaults to 0.5. It does not verify anything. | |
| observedAt | No | ISO 8601 timestamp when this fact was observed or measured. Defaults to now. | |
| visibility | No | Visibility scope for cross-project recall and context: project (default) or global. | |
| sourceClass | No | Claimed origin, never proof: agent_claimed (the default), tool_observed, human_confirmed, or production_verified. It weights confidence only. An unrecognised label downgrades to agent_claimed, kept verbatim in sourceRaw. | |
| changeSummary | No | Summary of what changed from the previous value of this fact. | |
| idempotencyKey | No | Retry identity within the project or origin and operation (also scope/type/key for memory). Reuse it to recover the original canonical ID; this key is never an entity ID. | |
| allowHistorical | No | Permit recording a historical fact with validFrom earlier than current active facts. | |
| verificationStatus | No | Only "contradicted" may be set by a caller, because it lowers trust. "verified" and "expired" are rejected: verification is not self-assertable and expiry is owned by shadowgraph_maintain. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Stable entity identifier. | |
| key | Yes | Fact name, unique per project among active facts. | |
| kind | No | Entity kind: decision, attempt, memory, fact, relation, review, or alternative. | |
| tags | No | Labels or extracted keywords stored with the fact. | |
| actor | No | Who performed the write. | |
| value | No | The observed value, any lossless JSON value. | |
| client | No | Which client performed the write. | |
| source | No | Legacy alias of sourceClass, retained for compatibility. | |
| status | No | active, superseded, or expired. | |
| project | No | Project namespace; null for an unattributed record or one imported from before projects. | |
| temporal | No | Bi-temporal window: validFrom, validTo, recordedAt, invalidatedAt. | |
| createdAt | No | ISO 8601 creation time. | |
| expiresAt | No | Caller-declared expiry instant, or null. | |
| sessionId | No | Session identifier recorded with the write. | |
| sourceRaw | No | The original origin label when it differed from sourceClass. Audit only; never evidence. | |
| updatedAt | No | ISO 8601 time of the last change. | |
| confidence | No | Caller-declared confidence in the observation, 0-1. | |
| observedAt | No | ISO 8601 time the fact was observed. | |
| visibility | No | Visibility boundary: project or global. | |
| sourceClass | No | Claimed origin class recorded with the write. A claim, never proof. | |
| verification | No | Present only on a signed verification: the attestation this build checked. | |
| changeSummary | No | Summary of modifications compared to superseded versions. | |
| schemaVersion | No | Storage schema version this entity was written under. A value above the build’s own version is preserved rather than downgraded. | |
| validityPolicy | No | Declared expiry inputs and the effective expiration boundary derived from them. | |
| verificationStatus | No | unverified, contradicted, expired, or verified. Only the separately configured signed-evidence verifier can produce verified. |