-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Summary
Currently, artifact capture in the recap system relies on agents manually calling add_artifact after creating comments/issues/PRs. A more deterministic approach would be to capture artifacts automatically via a PostToolUse hook.
Background
Research was done in #351 (see analysis comment) exploring this approach.
Proposed Approach
- Migrate hook to TypeScript - Move
templates/hooks/iloom-hook.jstosrc/hooks/iloom-hook.tsand compile via tsup - Add MCP client to hook - On PostToolUse for artifact-creating tools, spawn a recap-server instance and call
add_artifact - Pass config via env var - Use
ILOOM_RECAP_FILE_PATH(already set) so hook's recap-server writes to same file
Tools to Monitor
mcp__issue_management__create_comment→ artifact typecommentmcp__issue_management__update_comment→ artifact typecommentBashwithgh pr createpattern → artifact typepr
Tradeoffs
| Aspect | Hook-Based | Agent-Based (Current) |
|---|---|---|
| Determinism | High - always captures | Lower - agent may forget |
| Complexity | Higher - MCP client in hook | Lower - prompt guidance |
| Testing | Harder (needs Claude Code) | Easier (MCP unit tests) |
| Maintenance | Single hook file | 10+ template files |
Status
The current agent-based approach is working well. This issue tracks the hook-based approach as a potential future improvement if we find agents are forgetting to log artifacts.
Related
- Track artifacts in recap #351 - Track artifacts in recap (parent feature)
- Hook for phase boundary recap reminders #348 - Phase boundary hooks
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status