capture_event
Records AI coding agent lifecycle events via hook scripts, returning context packs, reindexing files, and consolidating memory to maintain codebase cognition.
Instructions
Capture a lifecycle event — called by hook scripts, not intended for direct use. session_start/prompt_submit return context packs; file_save reindexes and may return rules governing the edited file; session_end runs consolidation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Absolute path to the project root containing `.cogz/`. | |
| prompt | No | Prompt text (for prompt_submit). | |
| file_path | No | Saved file path, relative to repo root (for file_save). | |
| tool_name | No | Tool name (for pre_tool_use, post_tool_use). | |
| event_type | Yes | Event type: session_start, prompt_submit, pre_tool_use, post_tool_use, file_save, session_end. | |
| tool_result | No | Tool result summary (for post_tool_use). |