@lavralabs/lavra 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +159 -0
- package/bin/install.js +302 -0
- package/bin/plan-export.js +300 -0
- package/bin/plan-view.js +695 -0
- package/install.sh +136 -0
- package/package.json +28 -0
- package/plugins/lavra/.claude-plugin/plugin.json +22 -0
- package/plugins/lavra/.mcp.json +8 -0
- package/plugins/lavra/README.md +125 -0
- package/plugins/lavra/agents/design/design-implementation-reviewer.md +123 -0
- package/plugins/lavra/agents/design/design-iterator.md +219 -0
- package/plugins/lavra/agents/design/figma-design-sync.md +212 -0
- package/plugins/lavra/agents/docs/ankane-readme-writer.md +90 -0
- package/plugins/lavra/agents/research/best-practices-researcher.md +131 -0
- package/plugins/lavra/agents/research/framework-docs-researcher.md +111 -0
- package/plugins/lavra/agents/research/git-history-analyzer.md +73 -0
- package/plugins/lavra/agents/research/learnings-researcher.md +255 -0
- package/plugins/lavra/agents/research/repo-research-analyst.md +157 -0
- package/plugins/lavra/agents/review/agent-native-reviewer.md +274 -0
- package/plugins/lavra/agents/review/architecture-strategist.md +82 -0
- package/plugins/lavra/agents/review/code-simplicity-reviewer.md +109 -0
- package/plugins/lavra/agents/review/data-integrity-guardian.md +89 -0
- package/plugins/lavra/agents/review/data-migration-expert.md +118 -0
- package/plugins/lavra/agents/review/deployment-verification-agent.md +178 -0
- package/plugins/lavra/agents/review/dhh-rails-reviewer.md +94 -0
- package/plugins/lavra/agents/review/goal-verifier.md +109 -0
- package/plugins/lavra/agents/review/julik-frontend-races-reviewer.md +239 -0
- package/plugins/lavra/agents/review/kieran-python-reviewer.md +148 -0
- package/plugins/lavra/agents/review/kieran-rails-reviewer.md +130 -0
- package/plugins/lavra/agents/review/kieran-typescript-reviewer.md +139 -0
- package/plugins/lavra/agents/review/migration-drift-detector.md +307 -0
- package/plugins/lavra/agents/review/pattern-recognition-specialist.md +87 -0
- package/plugins/lavra/agents/review/performance-oracle.md +154 -0
- package/plugins/lavra/agents/review/security-sentinel.md +125 -0
- package/plugins/lavra/agents/workflow/bug-reproduction-validator.md +119 -0
- package/plugins/lavra/agents/workflow/every-style-editor.md +97 -0
- package/plugins/lavra/agents/workflow/lint.md +30 -0
- package/plugins/lavra/agents/workflow/pr-comment-resolver.md +95 -0
- package/plugins/lavra/agents/workflow/spec-flow-analyzer.md +156 -0
- package/plugins/lavra/commands/changelog.md +149 -0
- package/plugins/lavra/commands/heal-skill.md +130 -0
- package/plugins/lavra/commands/lavra-brainstorm.md +388 -0
- package/plugins/lavra/commands/lavra-ceo-review.md +388 -0
- package/plugins/lavra/commands/lavra-checkpoint.md +162 -0
- package/plugins/lavra/commands/lavra-design.md +621 -0
- package/plugins/lavra/commands/lavra-eng-review.md +262 -0
- package/plugins/lavra/commands/lavra-import.md +194 -0
- package/plugins/lavra/commands/lavra-learn.md +176 -0
- package/plugins/lavra/commands/lavra-plan.md +515 -0
- package/plugins/lavra/commands/lavra-qa.md +357 -0
- package/plugins/lavra/commands/lavra-quick.md +178 -0
- package/plugins/lavra/commands/lavra-recall.md +279 -0
- package/plugins/lavra/commands/lavra-research.md +267 -0
- package/plugins/lavra/commands/lavra-retro.md +400 -0
- package/plugins/lavra/commands/lavra-review.md +401 -0
- package/plugins/lavra/commands/lavra-ship.md +330 -0
- package/plugins/lavra/commands/lavra-triage.md +159 -0
- package/plugins/lavra/commands/lavra-work-ralph.md +521 -0
- package/plugins/lavra/commands/lavra-work-teams.md +504 -0
- package/plugins/lavra/commands/lavra-work.md +1019 -0
- package/plugins/lavra/commands/optional/agent-native-audit.md +282 -0
- package/plugins/lavra/commands/optional/feature-video.md +262 -0
- package/plugins/lavra/commands/optional/generate-command.md +146 -0
- package/plugins/lavra/commands/optional/reproduce-bug.md +97 -0
- package/plugins/lavra/commands/optional/xcode-test.md +287 -0
- package/plugins/lavra/commands/report-bug.md +155 -0
- package/plugins/lavra/commands/test-browser.md +305 -0
- package/plugins/lavra/cortex/agents/design/design-implementation-reviewer.md +127 -0
- package/plugins/lavra/cortex/agents/design/design-iterator.md +222 -0
- package/plugins/lavra/cortex/agents/design/figma-design-sync.md +215 -0
- package/plugins/lavra/cortex/agents/docs/ankane-readme-writer.md +93 -0
- package/plugins/lavra/cortex/agents/research/best-practices-researcher.md +135 -0
- package/plugins/lavra/cortex/agents/research/framework-docs-researcher.md +115 -0
- package/plugins/lavra/cortex/agents/research/git-history-analyzer.md +77 -0
- package/plugins/lavra/cortex/agents/research/learnings-researcher.md +259 -0
- package/plugins/lavra/cortex/agents/research/repo-research-analyst.md +161 -0
- package/plugins/lavra/cortex/agents/review/agent-native-reviewer.md +278 -0
- package/plugins/lavra/cortex/agents/review/architecture-strategist.md +86 -0
- package/plugins/lavra/cortex/agents/review/code-simplicity-reviewer.md +113 -0
- package/plugins/lavra/cortex/agents/review/data-integrity-guardian.md +93 -0
- package/plugins/lavra/cortex/agents/review/data-migration-expert.md +122 -0
- package/plugins/lavra/cortex/agents/review/deployment-verification-agent.md +182 -0
- package/plugins/lavra/cortex/agents/review/dhh-rails-reviewer.md +98 -0
- package/plugins/lavra/cortex/agents/review/goal-verifier.md +113 -0
- package/plugins/lavra/cortex/agents/review/julik-frontend-races-reviewer.md +243 -0
- package/plugins/lavra/cortex/agents/review/kieran-python-reviewer.md +152 -0
- package/plugins/lavra/cortex/agents/review/kieran-rails-reviewer.md +134 -0
- package/plugins/lavra/cortex/agents/review/kieran-typescript-reviewer.md +143 -0
- package/plugins/lavra/cortex/agents/review/migration-drift-detector.md +311 -0
- package/plugins/lavra/cortex/agents/review/pattern-recognition-specialist.md +91 -0
- package/plugins/lavra/cortex/agents/review/performance-oracle.md +158 -0
- package/plugins/lavra/cortex/agents/review/security-sentinel.md +129 -0
- package/plugins/lavra/cortex/agents/workflow/bug-reproduction-validator.md +123 -0
- package/plugins/lavra/cortex/agents/workflow/every-style-editor.md +101 -0
- package/plugins/lavra/cortex/agents/workflow/lint.md +33 -0
- package/plugins/lavra/cortex/agents/workflow/pr-comment-resolver.md +98 -0
- package/plugins/lavra/cortex/agents/workflow/spec-flow-analyzer.md +160 -0
- package/plugins/lavra/cortex/commands/agent-native-audit.md +286 -0
- package/plugins/lavra/cortex/commands/changelog.md +153 -0
- package/plugins/lavra/cortex/commands/create-agent-skill.md +21 -0
- package/plugins/lavra/cortex/commands/deploy-docs.md +69 -0
- package/plugins/lavra/cortex/commands/feature-video.md +266 -0
- package/plugins/lavra/cortex/commands/generate-command.md +150 -0
- package/plugins/lavra/cortex/commands/heal-skill.md +134 -0
- package/plugins/lavra/cortex/commands/lavra-brainstorm.md +392 -0
- package/plugins/lavra/cortex/commands/lavra-ceo-review.md +392 -0
- package/plugins/lavra/cortex/commands/lavra-checkpoint.md +166 -0
- package/plugins/lavra/cortex/commands/lavra-compound.md +168 -0
- package/plugins/lavra/cortex/commands/lavra-deepen.md +389 -0
- package/plugins/lavra/cortex/commands/lavra-design.md +625 -0
- package/plugins/lavra/cortex/commands/lavra-eng-review.md +266 -0
- package/plugins/lavra/cortex/commands/lavra-import.md +198 -0
- package/plugins/lavra/cortex/commands/lavra-learn.md +180 -0
- package/plugins/lavra/cortex/commands/lavra-parallel.md +910 -0
- package/plugins/lavra/cortex/commands/lavra-plan.md +519 -0
- package/plugins/lavra/cortex/commands/lavra-qa.md +361 -0
- package/plugins/lavra/cortex/commands/lavra-quick.md +182 -0
- package/plugins/lavra/cortex/commands/lavra-recall.md +283 -0
- package/plugins/lavra/cortex/commands/lavra-research.md +271 -0
- package/plugins/lavra/cortex/commands/lavra-retro.md +404 -0
- package/plugins/lavra/cortex/commands/lavra-review.md +405 -0
- package/plugins/lavra/cortex/commands/lavra-ship.md +334 -0
- package/plugins/lavra/cortex/commands/lavra-triage.md +163 -0
- package/plugins/lavra/cortex/commands/lavra-work-ralph.md +525 -0
- package/plugins/lavra/cortex/commands/lavra-work-teams.md +508 -0
- package/plugins/lavra/cortex/commands/lavra-work.md +1023 -0
- package/plugins/lavra/cortex/commands/lfg.md +30 -0
- package/plugins/lavra/cortex/commands/release-docs.md +148 -0
- package/plugins/lavra/cortex/commands/report-bug.md +159 -0
- package/plugins/lavra/cortex/commands/reproduce-bug.md +101 -0
- package/plugins/lavra/cortex/commands/resolve-pr-parallel.md +58 -0
- package/plugins/lavra/cortex/commands/resolve-todo-parallel.md +56 -0
- package/plugins/lavra/cortex/commands/test-browser.md +309 -0
- package/plugins/lavra/cortex/commands/xcode-test.md +291 -0
- package/plugins/lavra/cortex/skills/agent-browser/SKILL.md +227 -0
- package/plugins/lavra/cortex/skills/agent-native-architecture/SKILL.md +439 -0
- package/plugins/lavra/cortex/skills/andrew-kane-gem-writer/SKILL.md +188 -0
- package/plugins/lavra/cortex/skills/brainstorming/SKILL.md +197 -0
- package/plugins/lavra/cortex/skills/create-agent-skills/SKILL.md +304 -0
- package/plugins/lavra/cortex/skills/dhh-rails-style/SKILL.md +189 -0
- package/plugins/lavra/cortex/skills/dspy-ruby/SKILL.md +741 -0
- package/plugins/lavra/cortex/skills/every-style-editor/SKILL.md +138 -0
- package/plugins/lavra/cortex/skills/file-todos/SKILL.md +256 -0
- package/plugins/lavra/cortex/skills/frontend-design/SKILL.md +46 -0
- package/plugins/lavra/cortex/skills/gemini-imagegen/SKILL.md +242 -0
- package/plugins/lavra/cortex/skills/git-worktree/SKILL.md +307 -0
- package/plugins/lavra/cortex/skills/lavra-knowledge/SKILL.md +464 -0
- package/plugins/lavra/cortex/skills/project-setup/SKILL.md +418 -0
- package/plugins/lavra/cortex/skills/rclone/SKILL.md +155 -0
- package/plugins/lavra/docs/quickstart.md +267 -0
- package/plugins/lavra/examples/example-plan.md +197 -0
- package/plugins/lavra/gemini/agents/design/design-implementation-reviewer.md +130 -0
- package/plugins/lavra/gemini/agents/design/design-iterator.md +225 -0
- package/plugins/lavra/gemini/agents/design/figma-design-sync.md +218 -0
- package/plugins/lavra/gemini/agents/docs/ankane-readme-writer.md +96 -0
- package/plugins/lavra/gemini/agents/research/best-practices-researcher.md +138 -0
- package/plugins/lavra/gemini/agents/research/framework-docs-researcher.md +118 -0
- package/plugins/lavra/gemini/agents/research/git-history-analyzer.md +80 -0
- package/plugins/lavra/gemini/agents/research/learnings-researcher.md +262 -0
- package/plugins/lavra/gemini/agents/research/repo-research-analyst.md +164 -0
- package/plugins/lavra/gemini/agents/review/agent-native-reviewer.md +281 -0
- package/plugins/lavra/gemini/agents/review/architecture-strategist.md +89 -0
- package/plugins/lavra/gemini/agents/review/code-simplicity-reviewer.md +116 -0
- package/plugins/lavra/gemini/agents/review/data-integrity-guardian.md +96 -0
- package/plugins/lavra/gemini/agents/review/data-migration-expert.md +125 -0
- package/plugins/lavra/gemini/agents/review/deployment-verification-agent.md +185 -0
- package/plugins/lavra/gemini/agents/review/dhh-rails-reviewer.md +101 -0
- package/plugins/lavra/gemini/agents/review/goal-verifier.md +116 -0
- package/plugins/lavra/gemini/agents/review/julik-frontend-races-reviewer.md +246 -0
- package/plugins/lavra/gemini/agents/review/kieran-python-reviewer.md +155 -0
- package/plugins/lavra/gemini/agents/review/kieran-rails-reviewer.md +137 -0
- package/plugins/lavra/gemini/agents/review/kieran-typescript-reviewer.md +146 -0
- package/plugins/lavra/gemini/agents/review/migration-drift-detector.md +314 -0
- package/plugins/lavra/gemini/agents/review/pattern-recognition-specialist.md +94 -0
- package/plugins/lavra/gemini/agents/review/performance-oracle.md +161 -0
- package/plugins/lavra/gemini/agents/review/security-sentinel.md +132 -0
- package/plugins/lavra/gemini/agents/workflow/bug-reproduction-validator.md +126 -0
- package/plugins/lavra/gemini/agents/workflow/every-style-editor.md +103 -0
- package/plugins/lavra/gemini/agents/workflow/lint.md +36 -0
- package/plugins/lavra/gemini/agents/workflow/pr-comment-resolver.md +101 -0
- package/plugins/lavra/gemini/agents/workflow/spec-flow-analyzer.md +163 -0
- package/plugins/lavra/gemini/commands/agent-native-audit.toml +284 -0
- package/plugins/lavra/gemini/commands/beads-brainstorm.toml +292 -0
- package/plugins/lavra/gemini/commands/beads-checkpoint.toml +145 -0
- package/plugins/lavra/gemini/commands/beads-compound.toml +167 -0
- package/plugins/lavra/gemini/commands/beads-deepen.toml +388 -0
- package/plugins/lavra/gemini/commands/beads-design.toml +295 -0
- package/plugins/lavra/gemini/commands/beads-import.toml +197 -0
- package/plugins/lavra/gemini/commands/beads-parallel.toml +909 -0
- package/plugins/lavra/gemini/commands/beads-plan-review.toml +201 -0
- package/plugins/lavra/gemini/commands/beads-plan.toml +391 -0
- package/plugins/lavra/gemini/commands/beads-quick.toml +134 -0
- package/plugins/lavra/gemini/commands/beads-recall.toml +281 -0
- package/plugins/lavra/gemini/commands/beads-review.toml +338 -0
- package/plugins/lavra/gemini/commands/beads-triage.toml +161 -0
- package/plugins/lavra/gemini/commands/beads-work.toml +347 -0
- package/plugins/lavra/gemini/commands/changelog.toml +151 -0
- package/plugins/lavra/gemini/commands/create-agent-skill.toml +18 -0
- package/plugins/lavra/gemini/commands/deploy-docs.toml +68 -0
- package/plugins/lavra/gemini/commands/feature-video.toml +264 -0
- package/plugins/lavra/gemini/commands/generate-command.toml +148 -0
- package/plugins/lavra/gemini/commands/heal-skill.toml +131 -0
- package/plugins/lavra/gemini/commands/lavra-brainstorm.toml +391 -0
- package/plugins/lavra/gemini/commands/lavra-ceo-review.toml +391 -0
- package/plugins/lavra/gemini/commands/lavra-checkpoint.toml +165 -0
- package/plugins/lavra/gemini/commands/lavra-design.toml +624 -0
- package/plugins/lavra/gemini/commands/lavra-eng-review.toml +265 -0
- package/plugins/lavra/gemini/commands/lavra-import.toml +197 -0
- package/plugins/lavra/gemini/commands/lavra-learn.toml +179 -0
- package/plugins/lavra/gemini/commands/lavra-plan-review.toml +201 -0
- package/plugins/lavra/gemini/commands/lavra-plan.toml +518 -0
- package/plugins/lavra/gemini/commands/lavra-qa.toml +360 -0
- package/plugins/lavra/gemini/commands/lavra-quick.toml +181 -0
- package/plugins/lavra/gemini/commands/lavra-recall.toml +281 -0
- package/plugins/lavra/gemini/commands/lavra-research.toml +270 -0
- package/plugins/lavra/gemini/commands/lavra-retro.toml +403 -0
- package/plugins/lavra/gemini/commands/lavra-review.toml +404 -0
- package/plugins/lavra/gemini/commands/lavra-ship.toml +333 -0
- package/plugins/lavra/gemini/commands/lavra-triage.toml +161 -0
- package/plugins/lavra/gemini/commands/lavra-work-ralph.toml +523 -0
- package/plugins/lavra/gemini/commands/lavra-work-teams.toml +507 -0
- package/plugins/lavra/gemini/commands/lavra-work.toml +1022 -0
- package/plugins/lavra/gemini/commands/lfg.toml +28 -0
- package/plugins/lavra/gemini/commands/release-docs.toml +146 -0
- package/plugins/lavra/gemini/commands/report-bug.toml +157 -0
- package/plugins/lavra/gemini/commands/reproduce-bug.toml +99 -0
- package/plugins/lavra/gemini/commands/resolve-pr-parallel.toml +56 -0
- package/plugins/lavra/gemini/commands/resolve-todo-parallel.toml +54 -0
- package/plugins/lavra/gemini/commands/test-browser.toml +307 -0
- package/plugins/lavra/gemini/commands/xcode-test.toml +289 -0
- package/plugins/lavra/gemini/docs/MCP_SETUP.md +41 -0
- package/plugins/lavra/gemini/skills/agent-browser/SKILL.md +227 -0
- package/plugins/lavra/gemini/skills/agent-native-architecture/SKILL.md +439 -0
- package/plugins/lavra/gemini/skills/andrew-kane-gem-writer/SKILL.md +188 -0
- package/plugins/lavra/gemini/skills/beads-knowledge/SKILL.md +464 -0
- package/plugins/lavra/gemini/skills/brainstorming/SKILL.md +197 -0
- package/plugins/lavra/gemini/skills/create-agent-skills/SKILL.md +304 -0
- package/plugins/lavra/gemini/skills/dhh-rails-style/SKILL.md +189 -0
- package/plugins/lavra/gemini/skills/dspy-ruby/SKILL.md +741 -0
- package/plugins/lavra/gemini/skills/every-style-editor/SKILL.md +138 -0
- package/plugins/lavra/gemini/skills/file-todos/SKILL.md +256 -0
- package/plugins/lavra/gemini/skills/frontend-design/SKILL.md +46 -0
- package/plugins/lavra/gemini/skills/gemini-imagegen/SKILL.md +242 -0
- package/plugins/lavra/gemini/skills/git-worktree/SKILL.md +307 -0
- package/plugins/lavra/gemini/skills/lavra-knowledge/SKILL.md +464 -0
- package/plugins/lavra/gemini/skills/project-setup/SKILL.md +418 -0
- package/plugins/lavra/gemini/skills/rclone/SKILL.md +155 -0
- package/plugins/lavra/gemini-extension.json +50 -0
- package/plugins/lavra/gemini-src/settings.json +37 -0
- package/plugins/lavra/hooks/auto-recall.sh +210 -0
- package/plugins/lavra/hooks/check-memory.sh +169 -0
- package/plugins/lavra/hooks/hooks.json +47 -0
- package/plugins/lavra/hooks/knowledge-db.sh +255 -0
- package/plugins/lavra/hooks/memory-capture.sh +132 -0
- package/plugins/lavra/hooks/provision-memory.sh +144 -0
- package/plugins/lavra/hooks/recall.sh +152 -0
- package/plugins/lavra/hooks/subagent-wrapup.sh +44 -0
- package/plugins/lavra/hooks/teammate-idle-check.sh +29 -0
- package/plugins/lavra/opencode/agents/design/design-implementation-reviewer.md +127 -0
- package/plugins/lavra/opencode/agents/design/design-iterator.md +222 -0
- package/plugins/lavra/opencode/agents/design/figma-design-sync.md +215 -0
- package/plugins/lavra/opencode/agents/docs/ankane-readme-writer.md +93 -0
- package/plugins/lavra/opencode/agents/research/best-practices-researcher.md +135 -0
- package/plugins/lavra/opencode/agents/research/framework-docs-researcher.md +115 -0
- package/plugins/lavra/opencode/agents/research/git-history-analyzer.md +77 -0
- package/plugins/lavra/opencode/agents/research/learnings-researcher.md +259 -0
- package/plugins/lavra/opencode/agents/research/repo-research-analyst.md +161 -0
- package/plugins/lavra/opencode/agents/review/agent-native-reviewer.md +278 -0
- package/plugins/lavra/opencode/agents/review/architecture-strategist.md +86 -0
- package/plugins/lavra/opencode/agents/review/code-simplicity-reviewer.md +113 -0
- package/plugins/lavra/opencode/agents/review/data-integrity-guardian.md +93 -0
- package/plugins/lavra/opencode/agents/review/data-migration-expert.md +122 -0
- package/plugins/lavra/opencode/agents/review/deployment-verification-agent.md +182 -0
- package/plugins/lavra/opencode/agents/review/dhh-rails-reviewer.md +98 -0
- package/plugins/lavra/opencode/agents/review/goal-verifier.md +113 -0
- package/plugins/lavra/opencode/agents/review/julik-frontend-races-reviewer.md +243 -0
- package/plugins/lavra/opencode/agents/review/kieran-python-reviewer.md +152 -0
- package/plugins/lavra/opencode/agents/review/kieran-rails-reviewer.md +134 -0
- package/plugins/lavra/opencode/agents/review/kieran-typescript-reviewer.md +143 -0
- package/plugins/lavra/opencode/agents/review/migration-drift-detector.md +311 -0
- package/plugins/lavra/opencode/agents/review/pattern-recognition-specialist.md +91 -0
- package/plugins/lavra/opencode/agents/review/performance-oracle.md +158 -0
- package/plugins/lavra/opencode/agents/review/security-sentinel.md +129 -0
- package/plugins/lavra/opencode/agents/workflow/bug-reproduction-validator.md +123 -0
- package/plugins/lavra/opencode/agents/workflow/every-style-editor.md +100 -0
- package/plugins/lavra/opencode/agents/workflow/lint.md +33 -0
- package/plugins/lavra/opencode/agents/workflow/pr-comment-resolver.md +98 -0
- package/plugins/lavra/opencode/agents/workflow/spec-flow-analyzer.md +160 -0
- package/plugins/lavra/opencode/commands/agent-native-audit.md +286 -0
- package/plugins/lavra/opencode/commands/changelog.md +153 -0
- package/plugins/lavra/opencode/commands/create-agent-skill.md +21 -0
- package/plugins/lavra/opencode/commands/deploy-docs.md +69 -0
- package/plugins/lavra/opencode/commands/feature-video.md +266 -0
- package/plugins/lavra/opencode/commands/generate-command.md +150 -0
- package/plugins/lavra/opencode/commands/heal-skill.md +134 -0
- package/plugins/lavra/opencode/commands/lavra-brainstorm.md +392 -0
- package/plugins/lavra/opencode/commands/lavra-ceo-review.md +392 -0
- package/plugins/lavra/opencode/commands/lavra-checkpoint.md +166 -0
- package/plugins/lavra/opencode/commands/lavra-compound.md +168 -0
- package/plugins/lavra/opencode/commands/lavra-deepen.md +389 -0
- package/plugins/lavra/opencode/commands/lavra-design.md +625 -0
- package/plugins/lavra/opencode/commands/lavra-eng-review.md +266 -0
- package/plugins/lavra/opencode/commands/lavra-import.md +198 -0
- package/plugins/lavra/opencode/commands/lavra-learn.md +180 -0
- package/plugins/lavra/opencode/commands/lavra-parallel.md +910 -0
- package/plugins/lavra/opencode/commands/lavra-plan.md +519 -0
- package/plugins/lavra/opencode/commands/lavra-qa.md +361 -0
- package/plugins/lavra/opencode/commands/lavra-quick.md +182 -0
- package/plugins/lavra/opencode/commands/lavra-recall.md +283 -0
- package/plugins/lavra/opencode/commands/lavra-research.md +271 -0
- package/plugins/lavra/opencode/commands/lavra-retro.md +404 -0
- package/plugins/lavra/opencode/commands/lavra-review.md +405 -0
- package/plugins/lavra/opencode/commands/lavra-ship.md +334 -0
- package/plugins/lavra/opencode/commands/lavra-triage.md +163 -0
- package/plugins/lavra/opencode/commands/lavra-work-ralph.md +525 -0
- package/plugins/lavra/opencode/commands/lavra-work-teams.md +508 -0
- package/plugins/lavra/opencode/commands/lavra-work.md +1023 -0
- package/plugins/lavra/opencode/commands/lfg.md +30 -0
- package/plugins/lavra/opencode/commands/release-docs.md +148 -0
- package/plugins/lavra/opencode/commands/report-bug.md +159 -0
- package/plugins/lavra/opencode/commands/reproduce-bug.md +101 -0
- package/plugins/lavra/opencode/commands/resolve-pr-parallel.md +58 -0
- package/plugins/lavra/opencode/commands/resolve-todo-parallel.md +56 -0
- package/plugins/lavra/opencode/commands/test-browser.md +309 -0
- package/plugins/lavra/opencode/commands/xcode-test.md +291 -0
- package/plugins/lavra/opencode/docs/MCP_SETUP.md +48 -0
- package/plugins/lavra/opencode/skills/agent-browser/SKILL.md +227 -0
- package/plugins/lavra/opencode/skills/agent-native-architecture/SKILL.md +439 -0
- package/plugins/lavra/opencode/skills/andrew-kane-gem-writer/SKILL.md +188 -0
- package/plugins/lavra/opencode/skills/brainstorming/SKILL.md +197 -0
- package/plugins/lavra/opencode/skills/create-agent-skills/SKILL.md +304 -0
- package/plugins/lavra/opencode/skills/dhh-rails-style/SKILL.md +189 -0
- package/plugins/lavra/opencode/skills/dspy-ruby/SKILL.md +741 -0
- package/plugins/lavra/opencode/skills/every-style-editor/SKILL.md +138 -0
- package/plugins/lavra/opencode/skills/file-todos/SKILL.md +256 -0
- package/plugins/lavra/opencode/skills/frontend-design/SKILL.md +46 -0
- package/plugins/lavra/opencode/skills/gemini-imagegen/SKILL.md +242 -0
- package/plugins/lavra/opencode/skills/git-worktree/SKILL.md +307 -0
- package/plugins/lavra/opencode/skills/lavra-knowledge/SKILL.md +464 -0
- package/plugins/lavra/opencode/skills/project-setup/SKILL.md +418 -0
- package/plugins/lavra/opencode/skills/rclone/SKILL.md +155 -0
- package/plugins/lavra/opencode-src/package.json +13 -0
- package/plugins/lavra/opencode-src/plugin.ts +176 -0
- package/plugins/lavra/scripts/import-plan.sh +141 -0
- package/plugins/lavra/skills/agent-browser/SKILL.md +223 -0
- package/plugins/lavra/skills/agent-native-architecture/SKILL.md +435 -0
- package/plugins/lavra/skills/agent-native-architecture/references/action-parity-discipline.md +353 -0
- package/plugins/lavra/skills/agent-native-architecture/references/agent-execution-patterns.md +362 -0
- package/plugins/lavra/skills/agent-native-architecture/references/agent-native-testing.md +508 -0
- package/plugins/lavra/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
- package/plugins/lavra/skills/agent-native-architecture/references/dynamic-context-injection.md +281 -0
- package/plugins/lavra/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
- package/plugins/lavra/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +227 -0
- package/plugins/lavra/skills/agent-native-architecture/references/mcp-tool-design.md +427 -0
- package/plugins/lavra/skills/agent-native-architecture/references/mobile-patterns.md +410 -0
- package/plugins/lavra/skills/agent-native-architecture/references/product-implications.md +341 -0
- package/plugins/lavra/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
- package/plugins/lavra/skills/agent-native-architecture/references/self-modification.md +269 -0
- package/plugins/lavra/skills/agent-native-architecture/references/shared-workspace-architecture.md +517 -0
- package/plugins/lavra/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
- package/plugins/lavra/skills/brainstorming/SKILL.md +193 -0
- package/plugins/lavra/skills/create-agent-skills/SKILL.md +300 -0
- package/plugins/lavra/skills/create-agent-skills/references/api-security.md +60 -0
- package/plugins/lavra/skills/create-agent-skills/references/be-clear-and-direct.md +84 -0
- package/plugins/lavra/skills/create-agent-skills/references/best-practices.md +404 -0
- package/plugins/lavra/skills/create-agent-skills/references/common-patterns.md +121 -0
- package/plugins/lavra/skills/create-agent-skills/references/core-principles.md +103 -0
- package/plugins/lavra/skills/create-agent-skills/references/executable-code.md +92 -0
- package/plugins/lavra/skills/create-agent-skills/references/iteration-and-testing.md +164 -0
- package/plugins/lavra/skills/create-agent-skills/references/official-spec.md +185 -0
- package/plugins/lavra/skills/create-agent-skills/references/recommended-structure.md +168 -0
- package/plugins/lavra/skills/create-agent-skills/references/skill-structure.md +215 -0
- package/plugins/lavra/skills/create-agent-skills/references/using-scripts.md +113 -0
- package/plugins/lavra/skills/create-agent-skills/references/using-templates.md +112 -0
- package/plugins/lavra/skills/create-agent-skills/references/workflows-and-validation.md +122 -0
- package/plugins/lavra/skills/create-agent-skills/templates/router-skill.md +73 -0
- package/plugins/lavra/skills/create-agent-skills/templates/simple-skill.md +33 -0
- package/plugins/lavra/skills/create-agent-skills/workflows/add-reference.md +55 -0
- package/plugins/lavra/skills/create-agent-skills/workflows/add-script.md +59 -0
- package/plugins/lavra/skills/create-agent-skills/workflows/add-template.md +51 -0
- package/plugins/lavra/skills/create-agent-skills/workflows/add-workflow.md +54 -0
- package/plugins/lavra/skills/create-agent-skills/workflows/audit-skill.md +63 -0
- package/plugins/lavra/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +68 -0
- package/plugins/lavra/skills/create-agent-skills/workflows/create-new-skill.md +92 -0
- package/plugins/lavra/skills/create-agent-skills/workflows/get-guidance.md +70 -0
- package/plugins/lavra/skills/create-agent-skills/workflows/upgrade-to-router.md +68 -0
- package/plugins/lavra/skills/create-agent-skills/workflows/verify-skill.md +63 -0
- package/plugins/lavra/skills/file-todos/SKILL.md +252 -0
- package/plugins/lavra/skills/file-todos/assets/todo-template.md +155 -0
- package/plugins/lavra/skills/git-worktree/SKILL.md +303 -0
- package/plugins/lavra/skills/git-worktree/scripts/worktree-manager.sh +345 -0
- package/plugins/lavra/skills/lavra-knowledge/SKILL.md +460 -0
- package/plugins/lavra/skills/lavra-knowledge/references/jsonl-schema.md +104 -0
- package/plugins/lavra/skills/optional/andrew-kane-gem-writer/SKILL.md +184 -0
- package/plugins/lavra/skills/optional/andrew-kane-gem-writer/references/database-adapters.md +231 -0
- package/plugins/lavra/skills/optional/andrew-kane-gem-writer/references/module-organization.md +121 -0
- package/plugins/lavra/skills/optional/andrew-kane-gem-writer/references/rails-integration.md +183 -0
- package/plugins/lavra/skills/optional/andrew-kane-gem-writer/references/resources.md +119 -0
- package/plugins/lavra/skills/optional/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
- package/plugins/lavra/skills/optional/dhh-rails-style/SKILL.md +185 -0
- package/plugins/lavra/skills/optional/dhh-rails-style/references/architecture.md +653 -0
- package/plugins/lavra/skills/optional/dhh-rails-style/references/controllers.md +303 -0
- package/plugins/lavra/skills/optional/dhh-rails-style/references/frontend.md +510 -0
- package/plugins/lavra/skills/optional/dhh-rails-style/references/gems.md +266 -0
- package/plugins/lavra/skills/optional/dhh-rails-style/references/models.md +359 -0
- package/plugins/lavra/skills/optional/dhh-rails-style/references/testing.md +338 -0
- package/plugins/lavra/skills/optional/dspy-ruby/SKILL.md +737 -0
- package/plugins/lavra/skills/optional/dspy-ruby/assets/config-template.rb +187 -0
- package/plugins/lavra/skills/optional/dspy-ruby/assets/module-template.rb +300 -0
- package/plugins/lavra/skills/optional/dspy-ruby/assets/signature-template.rb +221 -0
- package/plugins/lavra/skills/optional/dspy-ruby/references/core-concepts.md +674 -0
- package/plugins/lavra/skills/optional/dspy-ruby/references/observability.md +366 -0
- package/plugins/lavra/skills/optional/dspy-ruby/references/optimization.md +603 -0
- package/plugins/lavra/skills/optional/dspy-ruby/references/providers.md +418 -0
- package/plugins/lavra/skills/optional/dspy-ruby/references/toolsets.md +502 -0
- package/plugins/lavra/skills/optional/every-style-editor/SKILL.md +134 -0
- package/plugins/lavra/skills/optional/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
- package/plugins/lavra/skills/optional/frontend-design/SKILL.md +42 -0
- package/plugins/lavra/skills/optional/gemini-imagegen/SKILL.md +238 -0
- package/plugins/lavra/skills/optional/gemini-imagegen/requirements.txt +2 -0
- package/plugins/lavra/skills/optional/gemini-imagegen/scripts/compose_images.py +157 -0
- package/plugins/lavra/skills/optional/gemini-imagegen/scripts/edit_image.py +144 -0
- package/plugins/lavra/skills/optional/gemini-imagegen/scripts/gemini_images.py +263 -0
- package/plugins/lavra/skills/optional/gemini-imagegen/scripts/generate_image.py +133 -0
- package/plugins/lavra/skills/optional/gemini-imagegen/scripts/multi_turn_chat.py +216 -0
- package/plugins/lavra/skills/optional/rclone/SKILL.md +151 -0
- package/plugins/lavra/skills/optional/rclone/scripts/check_setup.sh +60 -0
- package/plugins/lavra/skills/project-setup/SKILL.md +414 -0
- package/plugins/lavra/tests/build-index.sh +116 -0
- package/plugins/lavra/tests/recall-bench.sh +224 -0
- package/plugins/lavra/tests/search-fts5.sh +65 -0
- package/plugins/lavra/tests/search-grep.sh +54 -0
- package/plugins/lavra/tests/test-queries.jsonl +25 -0
- package/scripts/apply-context-optimizations.py +345 -0
- package/scripts/convert-cortex.ts +257 -0
- package/scripts/convert-gemini.ts +369 -0
- package/scripts/convert-opencode.ts +313 -0
- package/scripts/package.json +27 -0
- package/scripts/pre-release-check.sh +176 -0
- package/scripts/select-opencode-models.sh +178 -0
- package/scripts/shared/model-config.json +17 -0
- package/scripts/shared/model-mapping.ts +129 -0
- package/scripts/shared/security.ts +97 -0
- package/scripts/shared/yaml-parser.ts +55 -0
- package/scripts/sqlite-to-jsonl.py +207 -0
- package/scripts/test-compatibility.ts +539 -0
- package/scripts/test-features.sh +342 -0
- package/scripts/test-installation.sh +514 -0
- package/scripts/test-security.ts +275 -0
- package/scripts/trim-agent-descriptions.py +177 -0
- package/uninstall.sh +133 -0
package/plugins/lavra/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
<overview>
|
|
2
|
+
Start with pure primitives: bash, file operations, basic storage. This proves the architecture works and reveals what the agent actually needs. As patterns emerge, add domain-specific tools deliberately. This document covers when and how to evolve from primitives to domain tools, and when to graduate to optimized code.
|
|
3
|
+
</overview>
|
|
4
|
+
|
|
5
|
+
<start_with_primitives>
|
|
6
|
+
## Start with Pure Primitives
|
|
7
|
+
|
|
8
|
+
Begin every agent-native system with the most atomic tools possible:
|
|
9
|
+
|
|
10
|
+
- `read_file` / `write_file` / `list_files`
|
|
11
|
+
- `bash` (for everything else)
|
|
12
|
+
- Basic storage (`store_item` / `get_item`)
|
|
13
|
+
- HTTP requests (`fetch_url`)
|
|
14
|
+
|
|
15
|
+
**Why start here:**
|
|
16
|
+
|
|
17
|
+
1. **Proves the architecture** - If it works with primitives, your prompts are doing their job
|
|
18
|
+
2. **Reveals actual needs** - You'll discover what domain concepts matter
|
|
19
|
+
3. **Maximum flexibility** - Agent can do anything, not just what you anticipated
|
|
20
|
+
4. **Forces good prompts** - You can't lean on tool logic as a crutch
|
|
21
|
+
</start_with_primitives>
|
|
22
|
+
|
|
23
|
+
<when_to_add_domain_tools>
|
|
24
|
+
## When to Add Domain Tools
|
|
25
|
+
|
|
26
|
+
As patterns emerge, you'll want to add domain-specific tools. This is good—but do it deliberately.
|
|
27
|
+
|
|
28
|
+
### Vocabulary Anchoring
|
|
29
|
+
|
|
30
|
+
**Add a domain tool when:** The agent needs to understand domain concepts.
|
|
31
|
+
|
|
32
|
+
A `create_note` tool teaches the agent what "note" means in your system better than "write a file to the notes directory with this format."
|
|
33
|
+
|
|
34
|
+
### Guardrails
|
|
35
|
+
|
|
36
|
+
**Add a domain tool when:** Some operations need validation or constraints that shouldn't be left to agent judgment.
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
// publish_to_feed might enforce format requirements or content policies
|
|
40
|
+
tool("publish_to_feed", {
|
|
41
|
+
bookId: z.string(),
|
|
42
|
+
content: z.string(),
|
|
43
|
+
headline: z.string().max(100), // Enforce headline length
|
|
44
|
+
}, async ({ bookId, content, headline }) => {
|
|
45
|
+
// Validate content meets guidelines
|
|
46
|
+
if (containsProhibitedContent(content)) {
|
|
47
|
+
return { text: "Content doesn't meet guidelines", isError: true };
|
|
48
|
+
}
|
|
49
|
+
await feedService.publish({ bookId, content, headline, publishedAt: new Date() });
|
|
50
|
+
});
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Efficiency
|
|
54
|
+
|
|
55
|
+
**Add a domain tool when:** Common operations would take many primitive calls.
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
// Primitive approach: multiple calls
|
|
59
|
+
// Agent: read library.json, parse, find book, read full_text.txt, read introduction.md...
|
|
60
|
+
|
|
61
|
+
// Domain tool: one call for common operation
|
|
62
|
+
tool("get_book_with_content", { bookId: z.string() }, async ({ bookId }) => {
|
|
63
|
+
const book = await library.getBook(bookId);
|
|
64
|
+
const fullText = await readFile(`Research/${bookId}/full_text.txt`);
|
|
65
|
+
const intro = await readFile(`Research/${bookId}/introduction.md`);
|
|
66
|
+
return { text: JSON.stringify({ book, fullText, intro }) };
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
</when_to_add_domain_tools>
|
|
70
|
+
|
|
71
|
+
<the_rule>
|
|
72
|
+
## The Rule for Domain Tools
|
|
73
|
+
|
|
74
|
+
**Domain tools should represent one conceptual action from the user's perspective.**
|
|
75
|
+
|
|
76
|
+
They can include mechanical validation, but **judgment about what to do or whether to do it belongs in the prompt**.
|
|
77
|
+
|
|
78
|
+
### Wrong: Bundles Judgment
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
// WRONG - analyze_and_publish bundles judgment into the tool
|
|
82
|
+
tool("analyze_and_publish", async ({ input }) => {
|
|
83
|
+
const analysis = analyzeContent(input); // Tool decides how to analyze
|
|
84
|
+
const shouldPublish = analysis.score > 0.7; // Tool decides whether to publish
|
|
85
|
+
if (shouldPublish) {
|
|
86
|
+
await publish(analysis.summary); // Tool decides what to publish
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Right: One Action, Agent Decides
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
// RIGHT - separate tools, agent decides
|
|
95
|
+
tool("analyze_content", { content: z.string() }, ...); // Returns analysis
|
|
96
|
+
tool("publish", { content: z.string() }, ...); // Publishes what agent provides
|
|
97
|
+
|
|
98
|
+
// Prompt: "Analyze the content. If it's high quality, publish a summary."
|
|
99
|
+
// Agent decides what "high quality" means and what summary to write.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### The Test
|
|
103
|
+
|
|
104
|
+
Ask: "Who is making the decision here?"
|
|
105
|
+
|
|
106
|
+
- If the answer is "the tool code" → you've encoded judgment, refactor
|
|
107
|
+
- If the answer is "the agent based on the prompt" → good
|
|
108
|
+
</the_rule>
|
|
109
|
+
|
|
110
|
+
<keep_primitives_available>
|
|
111
|
+
## Keep Primitives Available
|
|
112
|
+
|
|
113
|
+
**Domain tools are shortcuts, not gates.**
|
|
114
|
+
|
|
115
|
+
Unless there's a specific reason to restrict access (security, data integrity), the agent should still be able to use underlying primitives for edge cases.
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
// Domain tool for common case
|
|
119
|
+
tool("create_note", { title, content }, ...);
|
|
120
|
+
|
|
121
|
+
// But primitives still available for edge cases
|
|
122
|
+
tool("read_file", { path }, ...);
|
|
123
|
+
tool("write_file", { path, content }, ...);
|
|
124
|
+
|
|
125
|
+
// Agent can use create_note normally, but for weird edge case:
|
|
126
|
+
// "Create a note in a non-standard location with custom metadata"
|
|
127
|
+
// → Agent uses write_file directly
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### When to Gate
|
|
131
|
+
|
|
132
|
+
Gating (making domain tool the only way) is appropriate for:
|
|
133
|
+
|
|
134
|
+
- **Security:** User authentication, payment processing
|
|
135
|
+
- **Data integrity:** Operations that must maintain invariants
|
|
136
|
+
- **Audit requirements:** Actions that must be logged in specific ways
|
|
137
|
+
|
|
138
|
+
**The default is open.** When you do gate something, make it a conscious decision with a clear reason.
|
|
139
|
+
</keep_primitives_available>
|
|
140
|
+
|
|
141
|
+
<graduating_to_code>
|
|
142
|
+
## Graduating to Code
|
|
143
|
+
|
|
144
|
+
Some operations will need to move from agent-orchestrated to optimized code for performance or reliability.
|
|
145
|
+
|
|
146
|
+
### The Progression
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
Stage 1: Agent uses primitives in a loop
|
|
150
|
+
→ Flexible, proves the concept
|
|
151
|
+
→ Slow, potentially expensive
|
|
152
|
+
|
|
153
|
+
Stage 2: Add domain tools for common operations
|
|
154
|
+
→ Faster, still agent-orchestrated
|
|
155
|
+
→ Agent still decides when/whether to use
|
|
156
|
+
|
|
157
|
+
Stage 3: For hot paths, implement in optimized code
|
|
158
|
+
→ Fast, deterministic
|
|
159
|
+
→ Agent can still trigger, but execution is code
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### The Caveat
|
|
163
|
+
|
|
164
|
+
**Even when an operation graduates to code, the agent should be able to:**
|
|
165
|
+
|
|
166
|
+
1. Trigger the optimized operation itself
|
|
167
|
+
2. Fall back to primitives for edge cases the optimized path doesn't handle
|
|
168
|
+
|
|
169
|
+
Graduation is about efficiency. **Parity still holds.** The agent doesn't lose capability when you optimize.
|
|
170
|
+
</graduating_to_code>
|
|
171
|
+
|
|
172
|
+
<decision_framework>
|
|
173
|
+
## Decision Framework
|
|
174
|
+
|
|
175
|
+
### Should I Add a Domain Tool?
|
|
176
|
+
|
|
177
|
+
| Question | If Yes |
|
|
178
|
+
|----------|--------|
|
|
179
|
+
| Is the agent confused about what this concept means? | Add for vocabulary anchoring |
|
|
180
|
+
| Does this operation need validation the agent shouldn't decide? | Add with guardrails |
|
|
181
|
+
| Is this a common multi-step operation? | Add for efficiency |
|
|
182
|
+
| Would changing behavior require code changes? | Keep as prompt instead |
|
|
183
|
+
|
|
184
|
+
### Should I Graduate to Code?
|
|
185
|
+
|
|
186
|
+
| Question | If Yes |
|
|
187
|
+
|----------|--------|
|
|
188
|
+
| Is this operation called very frequently? | Consider graduating |
|
|
189
|
+
| Does latency matter significantly? | Consider graduating |
|
|
190
|
+
| Are token costs problematic? | Consider graduating |
|
|
191
|
+
| Do you need deterministic behavior? | Graduate to code |
|
|
192
|
+
| Does the operation need complex state management? | Graduate to code |
|
|
193
|
+
|
|
194
|
+
### Should I Gate Access?
|
|
195
|
+
|
|
196
|
+
| Question | If Yes |
|
|
197
|
+
|----------|--------|
|
|
198
|
+
| Is there a security requirement? | Gate appropriately |
|
|
199
|
+
| Must this operation maintain data integrity? | Gate appropriately |
|
|
200
|
+
| Is there an audit/compliance requirement? | Gate appropriately |
|
|
201
|
+
| Is it just "safer" with no specific risk? | Keep primitives available |
|
|
202
|
+
</decision_framework>
|
|
203
|
+
|
|
204
|
+
<checklist>
|
|
205
|
+
## Checklist: Primitives to Domain Tools
|
|
206
|
+
|
|
207
|
+
### Starting Out
|
|
208
|
+
- [ ] Begin with pure primitives (read, write, list, bash)
|
|
209
|
+
- [ ] Write behavior in prompts, not tool logic
|
|
210
|
+
- [ ] Let patterns emerge from actual usage
|
|
211
|
+
|
|
212
|
+
### Adding Domain Tools
|
|
213
|
+
- [ ] Clear reason: vocabulary anchoring, guardrails, or efficiency
|
|
214
|
+
- [ ] Tool represents one conceptual action
|
|
215
|
+
- [ ] Judgment stays in prompts, not tool code
|
|
216
|
+
- [ ] Primitives remain available alongside domain tools
|
|
217
|
+
|
|
218
|
+
### Graduating to Code
|
|
219
|
+
- [ ] Hot path identified (frequent, latency-sensitive, or expensive)
|
|
220
|
+
- [ ] Optimized version doesn't remove agent capability
|
|
221
|
+
- [ ] Fallback to primitives for edge cases still works
|
|
222
|
+
|
|
223
|
+
### Gating Decisions
|
|
224
|
+
- [ ] Specific reason for each gate (security, integrity, audit)
|
|
225
|
+
- [ ] Default is open access
|
|
226
|
+
- [ ] Gates are conscious decisions, not defaults
|
|
227
|
+
</checklist>
|
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
<overview>
|
|
2
|
+
How to design MCP tools following prompt-native principles. Tools should be primitives that enable capability, not workflows that encode decisions.
|
|
3
|
+
|
|
4
|
+
**Core principle:** Whatever a user can do, the agent should be able to do. Don't artificially limit the agent—give it the same primitives a power user would have.
|
|
5
|
+
</overview>
|
|
6
|
+
|
|
7
|
+
<principle name="primitives-not-workflows">
|
|
8
|
+
## Tools Are Primitives, Not Workflows
|
|
9
|
+
|
|
10
|
+
**Wrong approach:** Tools that encode business logic
|
|
11
|
+
```typescript
|
|
12
|
+
tool("process_feedback", {
|
|
13
|
+
feedback: z.string(),
|
|
14
|
+
category: z.enum(["bug", "feature", "question"]),
|
|
15
|
+
priority: z.enum(["low", "medium", "high"]),
|
|
16
|
+
}, async ({ feedback, category, priority }) => {
|
|
17
|
+
// Tool decides how to process
|
|
18
|
+
const processed = categorize(feedback);
|
|
19
|
+
const stored = await saveToDatabase(processed);
|
|
20
|
+
const notification = await notify(priority);
|
|
21
|
+
return { processed, stored, notification };
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Right approach:** Primitives that enable any workflow
|
|
26
|
+
```typescript
|
|
27
|
+
tool("store_item", {
|
|
28
|
+
key: z.string(),
|
|
29
|
+
value: z.any(),
|
|
30
|
+
}, async ({ key, value }) => {
|
|
31
|
+
await db.set(key, value);
|
|
32
|
+
return { text: `Stored ${key}` };
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
tool("send_message", {
|
|
36
|
+
channel: z.string(),
|
|
37
|
+
content: z.string(),
|
|
38
|
+
}, async ({ channel, content }) => {
|
|
39
|
+
await messenger.send(channel, content);
|
|
40
|
+
return { text: "Sent" };
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The agent decides categorization, priority, and when to notify based on the system prompt.
|
|
45
|
+
</principle>
|
|
46
|
+
|
|
47
|
+
<principle name="descriptive-names">
|
|
48
|
+
## Tools Should Have Descriptive, Primitive Names
|
|
49
|
+
|
|
50
|
+
Names should describe the capability, not the use case:
|
|
51
|
+
|
|
52
|
+
| Wrong | Right |
|
|
53
|
+
|-------|-------|
|
|
54
|
+
| `process_user_feedback` | `store_item` |
|
|
55
|
+
| `create_feedback_summary` | `write_file` |
|
|
56
|
+
| `send_notification` | `send_message` |
|
|
57
|
+
| `deploy_to_production` | `git_push` |
|
|
58
|
+
|
|
59
|
+
The prompt tells the agent *when* to use primitives. The tool just provides *capability*.
|
|
60
|
+
</principle>
|
|
61
|
+
|
|
62
|
+
<principle name="simple-inputs">
|
|
63
|
+
## Inputs Should Be Simple
|
|
64
|
+
|
|
65
|
+
Tools accept data. They don't accept decisions.
|
|
66
|
+
|
|
67
|
+
**Wrong:** Tool accepts decisions
|
|
68
|
+
```typescript
|
|
69
|
+
tool("format_content", {
|
|
70
|
+
content: z.string(),
|
|
71
|
+
format: z.enum(["markdown", "html", "json"]),
|
|
72
|
+
style: z.enum(["formal", "casual", "technical"]),
|
|
73
|
+
}, ...)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Right:** Tool accepts data, agent decides format
|
|
77
|
+
```typescript
|
|
78
|
+
tool("write_file", {
|
|
79
|
+
path: z.string(),
|
|
80
|
+
content: z.string(),
|
|
81
|
+
}, ...)
|
|
82
|
+
// Agent decides to write index.html with HTML content, or data.json with JSON
|
|
83
|
+
```
|
|
84
|
+
</principle>
|
|
85
|
+
|
|
86
|
+
<principle name="rich-outputs">
|
|
87
|
+
## Outputs Should Be Rich
|
|
88
|
+
|
|
89
|
+
Return enough information for the agent to verify and iterate.
|
|
90
|
+
|
|
91
|
+
**Wrong:** Minimal output
|
|
92
|
+
```typescript
|
|
93
|
+
async ({ key }) => {
|
|
94
|
+
await db.delete(key);
|
|
95
|
+
return { text: "Deleted" };
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Right:** Rich output
|
|
100
|
+
```typescript
|
|
101
|
+
async ({ key }) => {
|
|
102
|
+
const existed = await db.has(key);
|
|
103
|
+
if (!existed) {
|
|
104
|
+
return { text: `Key ${key} did not exist` };
|
|
105
|
+
}
|
|
106
|
+
await db.delete(key);
|
|
107
|
+
return { text: `Deleted ${key}. ${await db.count()} items remaining.` };
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
</principle>
|
|
111
|
+
|
|
112
|
+
<design_template>
|
|
113
|
+
## Tool Design Template
|
|
114
|
+
|
|
115
|
+
```typescript
|
|
116
|
+
import { createSdkMcpServer, tool } from "@anthropic-ai/claude-agent-sdk";
|
|
117
|
+
import { z } from "zod";
|
|
118
|
+
|
|
119
|
+
export const serverName = createSdkMcpServer({
|
|
120
|
+
name: "server-name",
|
|
121
|
+
version: "1.0.0",
|
|
122
|
+
tools: [
|
|
123
|
+
// READ operations
|
|
124
|
+
tool(
|
|
125
|
+
"read_item",
|
|
126
|
+
"Read an item by key",
|
|
127
|
+
{ key: z.string().describe("Item key") },
|
|
128
|
+
async ({ key }) => {
|
|
129
|
+
const item = await storage.get(key);
|
|
130
|
+
return {
|
|
131
|
+
content: [{
|
|
132
|
+
type: "text",
|
|
133
|
+
text: item ? JSON.stringify(item, null, 2) : `Not found: ${key}`,
|
|
134
|
+
}],
|
|
135
|
+
isError: !item,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
|
|
140
|
+
tool(
|
|
141
|
+
"list_items",
|
|
142
|
+
"List all items, optionally filtered",
|
|
143
|
+
{
|
|
144
|
+
prefix: z.string().optional().describe("Filter by key prefix"),
|
|
145
|
+
limit: z.number().default(100).describe("Max items"),
|
|
146
|
+
},
|
|
147
|
+
async ({ prefix, limit }) => {
|
|
148
|
+
const items = await storage.list({ prefix, limit });
|
|
149
|
+
return {
|
|
150
|
+
content: [{
|
|
151
|
+
type: "text",
|
|
152
|
+
text: `Found ${items.length} items:\n${items.map(i => i.key).join("\n")}`,
|
|
153
|
+
}],
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
|
|
158
|
+
// WRITE operations
|
|
159
|
+
tool(
|
|
160
|
+
"store_item",
|
|
161
|
+
"Store an item",
|
|
162
|
+
{
|
|
163
|
+
key: z.string().describe("Item key"),
|
|
164
|
+
value: z.any().describe("Item data"),
|
|
165
|
+
},
|
|
166
|
+
async ({ key, value }) => {
|
|
167
|
+
await storage.set(key, value);
|
|
168
|
+
return {
|
|
169
|
+
content: [{ type: "text", text: `Stored ${key}` }],
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
|
|
174
|
+
tool(
|
|
175
|
+
"delete_item",
|
|
176
|
+
"Delete an item",
|
|
177
|
+
{ key: z.string().describe("Item key") },
|
|
178
|
+
async ({ key }) => {
|
|
179
|
+
const existed = await storage.delete(key);
|
|
180
|
+
return {
|
|
181
|
+
content: [{
|
|
182
|
+
type: "text",
|
|
183
|
+
text: existed ? `Deleted ${key}` : `${key} did not exist`,
|
|
184
|
+
}],
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
|
|
189
|
+
// EXTERNAL operations
|
|
190
|
+
tool(
|
|
191
|
+
"call_api",
|
|
192
|
+
"Make an HTTP request",
|
|
193
|
+
{
|
|
194
|
+
url: z.string().url(),
|
|
195
|
+
method: z.enum(["GET", "POST", "PUT", "DELETE"]).default("GET"),
|
|
196
|
+
body: z.any().optional(),
|
|
197
|
+
},
|
|
198
|
+
async ({ url, method, body }) => {
|
|
199
|
+
const response = await fetch(url, { method, body: JSON.stringify(body) });
|
|
200
|
+
const text = await response.text();
|
|
201
|
+
return {
|
|
202
|
+
content: [{
|
|
203
|
+
type: "text",
|
|
204
|
+
text: `${response.status} ${response.statusText}\n\n${text}`,
|
|
205
|
+
}],
|
|
206
|
+
isError: !response.ok,
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
),
|
|
210
|
+
],
|
|
211
|
+
});
|
|
212
|
+
```
|
|
213
|
+
</design_template>
|
|
214
|
+
|
|
215
|
+
<example name="feedback-server">
|
|
216
|
+
## Example: Feedback Storage Server
|
|
217
|
+
|
|
218
|
+
This server provides primitives for storing feedback. It does NOT decide how to categorize or organize feedback—that's the agent's job via the prompt.
|
|
219
|
+
|
|
220
|
+
```typescript
|
|
221
|
+
export const feedbackMcpServer = createSdkMcpServer({
|
|
222
|
+
name: "feedback",
|
|
223
|
+
version: "1.0.0",
|
|
224
|
+
tools: [
|
|
225
|
+
tool(
|
|
226
|
+
"store_feedback",
|
|
227
|
+
"Store a feedback item",
|
|
228
|
+
{
|
|
229
|
+
item: z.object({
|
|
230
|
+
id: z.string(),
|
|
231
|
+
author: z.string(),
|
|
232
|
+
content: z.string(),
|
|
233
|
+
importance: z.number().min(1).max(5),
|
|
234
|
+
timestamp: z.string(),
|
|
235
|
+
status: z.string().optional(),
|
|
236
|
+
urls: z.array(z.string()).optional(),
|
|
237
|
+
metadata: z.any().optional(),
|
|
238
|
+
}).describe("Feedback item"),
|
|
239
|
+
},
|
|
240
|
+
async ({ item }) => {
|
|
241
|
+
await db.feedback.insert(item);
|
|
242
|
+
return {
|
|
243
|
+
content: [{
|
|
244
|
+
type: "text",
|
|
245
|
+
text: `Stored feedback ${item.id} from ${item.author}`,
|
|
246
|
+
}],
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
),
|
|
250
|
+
|
|
251
|
+
tool(
|
|
252
|
+
"list_feedback",
|
|
253
|
+
"List feedback items",
|
|
254
|
+
{
|
|
255
|
+
limit: z.number().default(50),
|
|
256
|
+
status: z.string().optional(),
|
|
257
|
+
},
|
|
258
|
+
async ({ limit, status }) => {
|
|
259
|
+
const items = await db.feedback.list({ limit, status });
|
|
260
|
+
return {
|
|
261
|
+
content: [{
|
|
262
|
+
type: "text",
|
|
263
|
+
text: JSON.stringify(items, null, 2),
|
|
264
|
+
}],
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
),
|
|
268
|
+
|
|
269
|
+
tool(
|
|
270
|
+
"update_feedback",
|
|
271
|
+
"Update a feedback item",
|
|
272
|
+
{
|
|
273
|
+
id: z.string(),
|
|
274
|
+
updates: z.object({
|
|
275
|
+
status: z.string().optional(),
|
|
276
|
+
importance: z.number().optional(),
|
|
277
|
+
metadata: z.any().optional(),
|
|
278
|
+
}),
|
|
279
|
+
},
|
|
280
|
+
async ({ id, updates }) => {
|
|
281
|
+
await db.feedback.update(id, updates);
|
|
282
|
+
return {
|
|
283
|
+
content: [{ type: "text", text: `Updated ${id}` }],
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
),
|
|
287
|
+
],
|
|
288
|
+
});
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
The system prompt then tells the agent *how* to use these primitives:
|
|
292
|
+
|
|
293
|
+
```markdown
|
|
294
|
+
## Feedback Processing
|
|
295
|
+
|
|
296
|
+
When someone shares feedback:
|
|
297
|
+
1. Extract author, content, and any URLs
|
|
298
|
+
2. Rate importance 1-5 based on actionability
|
|
299
|
+
3. Store using feedback.store_feedback
|
|
300
|
+
4. If high importance (4-5), notify the channel
|
|
301
|
+
|
|
302
|
+
Use your judgment about importance ratings.
|
|
303
|
+
```
|
|
304
|
+
</example>
|
|
305
|
+
|
|
306
|
+
<principle name="dynamic-capability-discovery">
|
|
307
|
+
## Dynamic Capability Discovery vs Static Tool Mapping
|
|
308
|
+
|
|
309
|
+
**This pattern is specifically for agent-native apps** where you want the agent to have full access to an external API—the same access a user would have. It follows the core agent-native principle: "Whatever the user can do, the agent can do."
|
|
310
|
+
|
|
311
|
+
If you're building a constrained agent with limited capabilities, static tool mapping may be intentional. But for agent-native apps integrating with HealthKit, HomeKit, GraphQL, or similar APIs:
|
|
312
|
+
|
|
313
|
+
**Static Tool Mapping (Anti-pattern for Agent-Native):**
|
|
314
|
+
Build individual tools for each API capability. Always out of date, limits agent to only what you anticipated.
|
|
315
|
+
|
|
316
|
+
**Dynamic Capability Discovery (Preferred):**
|
|
317
|
+
Build a meta-tool that discovers what's available, and a generic tool that can access anything.
|
|
318
|
+
|
|
319
|
+
```typescript
|
|
320
|
+
// Dynamic: Agent discovers and uses any capability
|
|
321
|
+
|
|
322
|
+
// Discovery tool - returns what's available at runtime
|
|
323
|
+
tool("list_available_capabilities", async () => {
|
|
324
|
+
const quantityTypes = await healthKit.availableQuantityTypes();
|
|
325
|
+
const categoryTypes = await healthKit.availableCategoryTypes();
|
|
326
|
+
|
|
327
|
+
return {
|
|
328
|
+
text: `Available health metrics:\n` +
|
|
329
|
+
`Quantity types: ${quantityTypes.join(", ")}\n` +
|
|
330
|
+
`Category types: ${categoryTypes.join(", ")}\n` +
|
|
331
|
+
`\nUse read_health_data with any of these types.`
|
|
332
|
+
};
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
// Generic access tool - type is a string, API validates
|
|
336
|
+
tool("read_health_data", {
|
|
337
|
+
dataType: z.string(), // NOT z.enum - let HealthKit validate
|
|
338
|
+
startDate: z.string(),
|
|
339
|
+
endDate: z.string(),
|
|
340
|
+
aggregation: z.enum(["sum", "average", "samples"]).optional()
|
|
341
|
+
}, async ({ dataType, startDate, endDate, aggregation }) => {
|
|
342
|
+
// HealthKit validates the type, returns helpful error if invalid
|
|
343
|
+
const result = await healthKit.query(dataType, startDate, endDate, aggregation);
|
|
344
|
+
return { text: JSON.stringify(result, null, 2) };
|
|
345
|
+
});
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
**When to Use Each Approach:**
|
|
349
|
+
|
|
350
|
+
| Dynamic (Agent-Native) | Static (Constrained Agent) |
|
|
351
|
+
|------------------------|---------------------------|
|
|
352
|
+
| Agent should access anything user can | Agent has intentionally limited scope |
|
|
353
|
+
| External API with many endpoints (HealthKit, HomeKit, GraphQL) | Internal domain with fixed operations |
|
|
354
|
+
| API evolves independently of your code | Tightly coupled domain logic |
|
|
355
|
+
| You want full action parity | You want strict guardrails |
|
|
356
|
+
|
|
357
|
+
**The agent-native default is Dynamic.** Only use Static when you're intentionally limiting the agent's capabilities.
|
|
358
|
+
|
|
359
|
+
**Benefits:**
|
|
360
|
+
- Agent can use any API capability, including ones added after your code shipped
|
|
361
|
+
- API is the validator, not your enum definition
|
|
362
|
+
- Smaller tool surface (2-3 tools vs N tools)
|
|
363
|
+
- Agent naturally discovers capabilities by asking
|
|
364
|
+
- Works with any API that has introspection (HealthKit, GraphQL, OpenAPI)
|
|
365
|
+
</principle>
|
|
366
|
+
|
|
367
|
+
<principle name="crud-completeness">
|
|
368
|
+
## CRUD Completeness
|
|
369
|
+
|
|
370
|
+
Every data type the agent can create, it should be able to read, update, and delete. Incomplete CRUD = broken action parity.
|
|
371
|
+
|
|
372
|
+
**Anti-pattern: Create-only tools**
|
|
373
|
+
```typescript
|
|
374
|
+
// Can create but not modify or delete
|
|
375
|
+
tool("create_experiment", { hypothesis, variable, metric })
|
|
376
|
+
tool("write_journal_entry", { content, author, tags })
|
|
377
|
+
// User: "Delete that experiment" → Agent: "I can't do that"
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
**Correct: Full CRUD for each entity**
|
|
381
|
+
```typescript
|
|
382
|
+
// Complete CRUD
|
|
383
|
+
tool("create_experiment", { hypothesis, variable, metric })
|
|
384
|
+
tool("read_experiment", { id })
|
|
385
|
+
tool("update_experiment", { id, updates: { hypothesis?, status?, endDate? } })
|
|
386
|
+
tool("delete_experiment", { id })
|
|
387
|
+
|
|
388
|
+
tool("create_journal_entry", { content, author, tags })
|
|
389
|
+
tool("read_journal", { query?, dateRange?, author? })
|
|
390
|
+
tool("update_journal_entry", { id, content, tags? })
|
|
391
|
+
tool("delete_journal_entry", { id })
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
**The CRUD Audit:**
|
|
395
|
+
For each entity type in your app, verify:
|
|
396
|
+
- [ ] Create: Agent can create new instances
|
|
397
|
+
- [ ] Read: Agent can query/search/list instances
|
|
398
|
+
- [ ] Update: Agent can modify existing instances
|
|
399
|
+
- [ ] Delete: Agent can remove instances
|
|
400
|
+
|
|
401
|
+
If any operation is missing, users will eventually ask for it and the agent will fail.
|
|
402
|
+
</principle>
|
|
403
|
+
|
|
404
|
+
<checklist>
|
|
405
|
+
## MCP Tool Design Checklist
|
|
406
|
+
|
|
407
|
+
**Fundamentals:**
|
|
408
|
+
- [ ] Tool names describe capability, not use case
|
|
409
|
+
- [ ] Inputs are data, not decisions
|
|
410
|
+
- [ ] Outputs are rich (enough for agent to verify)
|
|
411
|
+
- [ ] CRUD operations are separate tools (not one mega-tool)
|
|
412
|
+
- [ ] No business logic in tool implementations
|
|
413
|
+
- [ ] Error states clearly communicated via `isError`
|
|
414
|
+
- [ ] Descriptions explain what the tool does, not when to use it
|
|
415
|
+
|
|
416
|
+
**Dynamic Capability Discovery (for agent-native apps):**
|
|
417
|
+
- [ ] For external APIs where agent should have full access, use dynamic discovery
|
|
418
|
+
- [ ] Include a `list_*` or `discover_*` tool for each API surface
|
|
419
|
+
- [ ] Use string inputs (not enums) when the API validates
|
|
420
|
+
- [ ] Inject available capabilities into system prompt at runtime
|
|
421
|
+
- [ ] Only use static tool mapping if intentionally limiting agent scope
|
|
422
|
+
|
|
423
|
+
**CRUD Completeness:**
|
|
424
|
+
- [ ] Every entity has create, read, update, delete operations
|
|
425
|
+
- [ ] Every UI action has a corresponding agent tool
|
|
426
|
+
- [ ] Test: "Can the agent undo what it just did?"
|
|
427
|
+
</checklist>
|