Myco is a plugin for collective agent intelligence, supporting Claude Code and Cursor. This guide covers development setup and project conventions. For architecture details, see Lifecycle docs.
claude plugin marketplace add goondocks-co/myco
claude plugin install myco@myco-pluginsThen in any project:
/myco-setup
This sets up the vault, configures your LLM backend, and starts capturing session knowledge.
- Node.js 22+
- Claude Code or Cursor
- An LLM backend: Ollama (recommended) or an Anthropic API key
For Ollama, pull the recommended models:
ollama pull gpt-oss
ollama pull nomic-embed-textgit clone https://github.com/goondocks-co/myco.git
cd myco
npm installFor active development (per-session, no install needed):
claude --plugin-dir /path/to/mycoFor persistent local dev (survives across sessions):
claude plugin marketplace add /path/to/myco/.claude-plugin
claude plugin install myco/myco-setup
For dogfooding, the vault lives at ~/.myco/vaults/myco/ (configured via MYCO_VAULT_DIR in .claude/settings.json).
node dist/src/cli.js statsmake build # lint + test + tsc + copy templates
make check # lint + test only (pre-commit gate)
make watch # tsc watch mode
make clean # remove dist/Hooks pick up new code on the next invocation. The daemon must be restarted separately:
make build && node dist/src/cli.js restartmyco/
├── .claude-plugin/ # Claude Code + VS Code plugin manifest + marketplace
├── .cursor-plugin/ # Cursor plugin manifest + marketplace
├── hooks/ # Hook registration shell scripts
├── skills/ # Agent skills
├── src/
│ ├── agents/ # Agent adapters (Claude Code, Cursor) — transcript parsing + image capture
│ ├── capture/ # Event buffering + buffer-based turn fallback
│ ├── config/ # Config schema and loader
│ ├── context/ # Context injection for UserPromptSubmit hook
│ ├── daemon/ # Long-lived HTTP daemon: session lifecycle, batch processing, plan watching
│ ├── hooks/ # Hook entry points (thin — delegate to daemon)
│ ├── index/ # SQLite FTS5 + sqlite-vec vector search
│ ├── intelligence/ # LLM backends (Ollama, LM Studio, Anthropic)
│ ├── mcp/ # MCP server + tool handlers
│ ├── prompts/ # LLM prompt templates
│ └── vault/ # Reader, writer, Zod schemas for vault notes
├── tests/ # Mirrors src/ structure
├── docs/ # Lifecycle, quickstart, doc site
└── Makefile # Dev shortcuts
See docs/lifecycle.md for the full lifecycle with diagrams. Key points:
- Hooks are thin — they delegate to the daemon via HTTP. No business logic in hooks.
- The daemon is the authority — all event processing, session note writing, and observation extraction happen there.
- Transcripts are the source of truth — session conversation turns are read from the agent's native transcript file (Claude Code
.jsonl, Cursor.txt/.jsonl), not from Myco's event buffer. The buffer is the fallback when no transcript is available. - Session notes are rebuilt — on each stop event, the full conversation is re-parsed from the transcript and the session note is regenerated. Data preservation is guaranteed by the transcript being append-only.
Published as @goondocks/myco on npmjs.org.
- Push to
main— CI runs lint + tests - Tag a release (
v0.x.y) — triggers the publish workflow npm publishbuilds and pushes to npmjs.org- Users get the new version via
claude plugin update myco
- TypeScript strict mode, ES modules
tsupfor bundled builds (native depsbetter-sqlite3/sqlite-vecare external, installed at runtime)make checkmust pass before committing- Prompt templates are markdown with
{{placeholder}}syntax - Config is YAML (
myco.yaml), vault notes are markdown with YAML frontmatter - No magic literals — extract named constants
- Idempotent operations by default