delete_episode
Delete one episode by ID when recorded content must not exist, such as accidental PII, sensitive data, or wrong recordings. Cascades associations, logs an audit entry, and is irreversible.
Instructions
Delete a single episode by ID. Use this for content that should not exist: accidentally recorded PII, sensitive data, or fundamentally wrong recordings. Do NOT use for factual corrections — record a new episode with the correction instead and let compression resolve it. Deletion cascades: all Hebbian associations involving the episode are removed, and the deletion is logged in the audit trail. The text is removed from the episodes table and overwritten in the database file (secure_delete); the WAL is emptied after the delete, or at the store's next delete or close if another connection is reading at that moment. By default, a tombstone is preserved as an existence proof for audit integrity: episode ID, original timestamp, episode type, and a content hash keyed by a per-store salt; a new episode's id is keyed by it too. The salt is kept in the database, never in the audit trail, so a guess at deleted content cannot be checked against the audit trail alone; whoever holds the database file can still guess short content from the tombstone. Disable tombstones at Store construction (keep_tombstones=False) if no hash should stay in the database. Episodes recorded before the store was upgraded, and team-imported episodes, carry an unsalted hash and id, which can be guessed for short content. The audit trail keeps each event's source, time and type in clear. Not reached: backups, the migration's .bak copy, other copies of the file, and text already consolidated into continuity or a pattern's stored explanations. The hash chain remains verifiable either way. This action is irreversible.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| episode_id | Yes | The 8-character hex ID of the episode to delete. Use recall or prepare_wrap to find episode IDs. |