| 1 | # notify_user.py DOX |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | - Own the `notify_user.py` agent tool. |
| 6 | - This module sends a user-facing notification from the agent. |
| 7 | - Keep this file-level DOX profile synchronized with `notify_user.py` because this directory is intentionally flat. |
| 8 | |
| 9 | ## Ownership |
| 10 | |
| 11 | - `notify_user.py` owns the runtime implementation. |
| 12 | - `notify_user.py.dox.md` owns durable notes about responsibilities, contracts, side effects, and verification for that implementation. |
| 13 | - Classes: |
| 14 | - `NotifyUserTool` (`Tool`) |
| 15 | - `async execute(self, **kwargs)` |
| 16 | |
| 17 | ## Runtime Contracts |
| 18 | |
| 19 | - Tool modules must define `helpers.tool.Tool` subclasses and return `helpers.tool.Response` from `execute(...)`. |
| 20 | - Update this file whenever tool arguments, output shape, `break_loop` behavior, intervention handling, prompt instructions, or side effects change. |
| 21 | - `NotifyUserTool` is a `Tool`. |
| 22 | - `NotifyUserTool` defines `execute(...)`. |
| 23 | - Imported dependency areas include: `agent`, `helpers.notification`, `helpers.tool`. |
| 24 | |
| 25 | ## Key Concepts |
| 26 | |
| 27 | - Important called helpers/classes observed in the source: `AgentContext.get_notification_manager.add_notification`, `Response`, `NotificationType`, `NotificationPriority`, `AgentContext.get_notification_manager`, `self.agent.read_prompt`. |
| 28 | - Keep request/response, tool, or helper semantics documented here at the same time as source changes. |
| 29 | |
| 30 | ## Work Guidance |
| 31 | |
| 32 | - Keep tool output concise, model-readable, and safe for history persistence. |
| 33 | - Coordinate argument or behavior changes with prompt tool instructions and skill guidance. |
| 34 | - Respect intervention flow for long-running, external, or user-visible operations. |
| 35 | |
| 36 | ## Verification |
| 37 | |
| 38 | - Run targeted tool and prompt-contract tests for changed behavior; smoke-test agent execution when no focused test exists. |
| 39 | - Related tests observed by source search: |
| 40 | - `tests/test_tool_action_contracts.py` |
| 41 | |
| 42 | ## Child DOX Index |
| 43 | |
| 44 | No child DOX files. |