coc_add
Add a tamper-evident entry to a Chain of Consciousness chain, cryptographically linking each event to the previous via SHA-256 hashing for an append-only audit trail.
Instructions
Add an entry to an existing Chain of Consciousness chain.
Each entry is cryptographically linked to the previous via SHA-256 hashing,
creating a tamper-evident append-only log.
Args:
event_type: Type of event. One of: learn, decide, create, error, note,
milestone, session_start, session_end, boot, rotate, anchor,
compaction, governance
data: Description of what happened (free-form text)
agent: Name/ID of the agent adding this entry (default: anonymous)
commitment: For session_end only — SHA-256 hash of expected bootstrap state
for the next session (forward commitment)
verification: For session_start only — SHA-256 hash of actual bootstrap state
to verify against previous session's commitment
Returns:
JSON with the new entry details (sequence number, hash, timestamp)Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_type | Yes | ||
| data | Yes | ||
| agent | No | anonymous | |
| commitment | No | ||
| verification | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |