← ClaudeAtlas

mycocanopy-manifest-driven-tool-resolutionlisted

Implement manifest-driven tool resolution for Canopy read-tool detection across symbionts. Covers adding canopyReadTools discriminated union declarations to symbiont manifests (structured vs shell-pattern modes), implementing symbiont-agnostic resolvers, unifying pre/post tool-use hooks, and updating database queries to respect manifest declarations. Use when adding new symbionts that need Canopy integration, extending tool resolution capabilities, or debugging read-tool detection issues, even if the user doesn't explicitly ask for manifest-driven architecture.
goondocks-co/myco · ★ 13 · AI & Automation · score 79
Install: claude install-skill goondocks-co/myco
# Canopy Manifest-Driven Tool Resolution Architecture Canopy's manifest-driven tool resolution provides a single source of truth for determining which symbiont tools constitute file reads, enabling consistent path extraction across hooks, database queries, and analytics. This architecture eliminates hardcoded per-symbiont assumptions and makes adding new symbionts require only manifest declarations, not code changes. ## Prerequisites - Understanding of symbiont manifest structure in `packages/myco/src/symbionts/manifests/` - Familiarity with Canopy's pre/post tool-use hooks in `packages/myco/src/hooks/` - Knowledge of the activity database schema and drilldown query patterns - Access to test infrastructure for validating tool resolution changes ## Procedure A: Add canopyReadTools to Symbiont Manifest Define which tools constitute file reads using the `capabilities.canopyReadTools` discriminated union in the symbiont's YAML manifest. ### For Structured Tools (e.g., Claude Code) When the symbiont exposes named tools with structured arguments: ```yaml # packages/myco/src/symbionts/manifests/claude-code.yaml capabilities: canopyReadTools: mode: structured tool: Read filePath: file ``` - **mode: structured** - Tool has named fields for arguments - **tool** - Exact tool name that triggers Canopy injection - **filePath** - Field name containing the file path ### For Shell-Pattern Tools (e.g., Codex) When the symbiont uses shell commands with regex-based pa