mycoplan-persistence-and-agent-directed-capturelisted
Install: claude install-skill goondocks-co/myco
# Plan Persistence and Agent-Directed Capture
Myco's plan persistence architecture implements agent-directed capture through logical-key identity models, enabling deterministic deduplication across multiple capture channels. This skill covers the design patterns, implementation strategies, and integration approaches for building robust plan capture systems.
## Prerequisites
- Understanding of Myco's vault database schema and plan table structure
- Familiarity with MCP (Model Context Protocol) tool development
- Knowledge of plan content types (transcript plans, agent-generated plans, file-based plans)
- Access to plan capture codebase in `packages/myco/src/daemon/` and related modules
## Procedure 1: Logical-Key Identity Model Implementation
The logical-key identity model provides deterministic plan identification across capture channels, replacing path-based identity with content-driven keys.
### Key Type Design
Implement three logical key types using the utilities in `packages/myco/src/plans/identity.ts`:
```typescript
// path:<normalized_path> - for file-based plans
const pathKey = buildPathPlanLogicalKey(filePath);
// tag:<tag> - for session-tagged plan collections
const tagKey = buildSessionTagPlanLogicalKey(sessionId, planTag);
// key:<plan_key> - for explicit agent-provided keys
const explicitKey = `key:${agentProvidedKey}`;
```
### Normalization Rules
- **Path normalization**: Use `normalizePlanSourcePath()` to strip project root, normalize separators, r