@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
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
<overview>
|
|
2
|
+
A structured discipline for ensuring agents can do everything users can do. Every UI action should have an equivalent agent tool. This isn't a one-time check—it's an ongoing practice integrated into your development workflow.
|
|
3
|
+
|
|
4
|
+
**Core principle:** When adding a UI feature, add the corresponding tool in the same PR.
|
|
5
|
+
</overview>
|
|
6
|
+
|
|
7
|
+
<why_parity>
|
|
8
|
+
## Why Action Parity Matters
|
|
9
|
+
|
|
10
|
+
**The failure case:**
|
|
11
|
+
```
|
|
12
|
+
User: "Write something about Catherine the Great in my reading feed"
|
|
13
|
+
Agent: "What system are you referring to? I'm not sure what reading feed means."
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The user could publish to their feed through the UI. But the agent had no `publish_to_feed` tool. The fix was simple—add the tool. But the insight is profound:
|
|
17
|
+
|
|
18
|
+
**Every action a user can take through the UI must have an equivalent tool the agent can call.**
|
|
19
|
+
|
|
20
|
+
Without this parity:
|
|
21
|
+
- Users ask agents to do things they can't do
|
|
22
|
+
- Agents ask clarifying questions about features they should understand
|
|
23
|
+
- The agent feels limited compared to direct app usage
|
|
24
|
+
- Users lose trust in the agent's capabilities
|
|
25
|
+
</why_parity>
|
|
26
|
+
|
|
27
|
+
<capability_mapping>
|
|
28
|
+
## The Capability Map
|
|
29
|
+
|
|
30
|
+
Maintain a structured map of UI actions to agent tools:
|
|
31
|
+
|
|
32
|
+
| UI Action | UI Location | Agent Tool | System Prompt Reference |
|
|
33
|
+
|-----------|-------------|------------|-------------------------|
|
|
34
|
+
| View library | Library tab | `read_library` | "View books and highlights" |
|
|
35
|
+
| Add book | Library → Add | `add_book` | "Add books to library" |
|
|
36
|
+
| Publish insight | Analysis view | `publish_to_feed` | "Create insights for Feed tab" |
|
|
37
|
+
| Start research | Book detail | `start_research` | "Research books via web search" |
|
|
38
|
+
| Edit profile | Settings | `write_file(profile.md)` | "Update reading profile" |
|
|
39
|
+
| Take screenshot | Camera | N/A (user action) | -- |
|
|
40
|
+
| Search web | Chat | `web_search` | "Search the internet" |
|
|
41
|
+
|
|
42
|
+
**Update this table whenever adding features.**
|
|
43
|
+
|
|
44
|
+
### Template for Your App
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
# Capability Map - [Your App Name]
|
|
48
|
+
|
|
49
|
+
| UI Action | UI Location | Agent Tool | System Prompt | Status |
|
|
50
|
+
|-----------|-------------|------------|---------------|--------|
|
|
51
|
+
| | | | | Missing |
|
|
52
|
+
| | | | | Done |
|
|
53
|
+
| | | | | N/A |
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Status meanings:
|
|
57
|
+
- Done: Tool exists and is documented in system prompt
|
|
58
|
+
- Missing: UI action exists but no agent equivalent
|
|
59
|
+
- N/A: User-only action (e.g., biometric auth, camera capture)
|
|
60
|
+
</capability_mapping>
|
|
61
|
+
|
|
62
|
+
<parity_workflow>
|
|
63
|
+
## The Action Parity Workflow
|
|
64
|
+
|
|
65
|
+
### When Adding a New Feature
|
|
66
|
+
|
|
67
|
+
Before merging any PR that adds UI functionality:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
1. What action is this?
|
|
71
|
+
→ "User can publish an insight to their reading feed"
|
|
72
|
+
|
|
73
|
+
2. Does an agent tool exist for this?
|
|
74
|
+
→ Check tool definitions
|
|
75
|
+
→ If NO: Create the tool
|
|
76
|
+
|
|
77
|
+
3. Is it documented in the system prompt?
|
|
78
|
+
→ Check system prompt capabilities section
|
|
79
|
+
→ If NO: Add documentation
|
|
80
|
+
|
|
81
|
+
4. Is the context available?
|
|
82
|
+
→ Does agent know what "feed" means?
|
|
83
|
+
→ Does agent see available books?
|
|
84
|
+
→ If NO: Add to context injection
|
|
85
|
+
|
|
86
|
+
5. Update the capability map
|
|
87
|
+
→ Add row to tracking document
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### PR Checklist
|
|
91
|
+
|
|
92
|
+
Add to your PR template:
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
## Agent-Native Checklist
|
|
96
|
+
|
|
97
|
+
- [ ] Every new UI action has a corresponding agent tool
|
|
98
|
+
- [ ] System prompt updated to mention new capability
|
|
99
|
+
- [ ] Agent has access to same data UI uses
|
|
100
|
+
- [ ] Capability map updated
|
|
101
|
+
- [ ] Tested with natural language request
|
|
102
|
+
```
|
|
103
|
+
</parity_workflow>
|
|
104
|
+
|
|
105
|
+
<parity_audit>
|
|
106
|
+
## The Parity Audit
|
|
107
|
+
|
|
108
|
+
Periodically audit your app for action parity gaps:
|
|
109
|
+
|
|
110
|
+
### Step 1: List All UI Actions
|
|
111
|
+
|
|
112
|
+
Walk through every screen and list what users can do:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
Library Screen:
|
|
116
|
+
- View list of books
|
|
117
|
+
- Search books
|
|
118
|
+
- Filter by category
|
|
119
|
+
- Add new book
|
|
120
|
+
- Delete book
|
|
121
|
+
- Open book detail
|
|
122
|
+
|
|
123
|
+
Book Detail Screen:
|
|
124
|
+
- View book info
|
|
125
|
+
- Start research
|
|
126
|
+
- View highlights
|
|
127
|
+
- Add highlight
|
|
128
|
+
- Share book
|
|
129
|
+
- Remove from library
|
|
130
|
+
|
|
131
|
+
Feed Screen:
|
|
132
|
+
- View insights
|
|
133
|
+
- Create new insight
|
|
134
|
+
- Edit insight
|
|
135
|
+
- Delete insight
|
|
136
|
+
- Share insight
|
|
137
|
+
|
|
138
|
+
Settings:
|
|
139
|
+
- Edit profile
|
|
140
|
+
- Change theme
|
|
141
|
+
- Export data
|
|
142
|
+
- Delete account
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Step 2: Check Tool Coverage
|
|
146
|
+
|
|
147
|
+
For each action, verify:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
View list of books → read_library
|
|
151
|
+
Search books → read_library (with query param)
|
|
152
|
+
Filter by category → MISSING (add filter param to read_library)
|
|
153
|
+
Add new book → MISSING (need add_book tool)
|
|
154
|
+
Delete book → delete_book
|
|
155
|
+
Open book detail → read_library (single book)
|
|
156
|
+
|
|
157
|
+
Start research → start_research
|
|
158
|
+
View highlights → read_library (includes highlights)
|
|
159
|
+
Add highlight → MISSING (need add_highlight tool)
|
|
160
|
+
Share book → MISSING (or N/A if sharing is UI-only)
|
|
161
|
+
|
|
162
|
+
View insights → read_library (includes feed)
|
|
163
|
+
Create new insight → publish_to_feed
|
|
164
|
+
Edit insight → MISSING (need update_feed_item tool)
|
|
165
|
+
Delete insight → MISSING (need delete_feed_item tool)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Step 3: Prioritize Gaps
|
|
169
|
+
|
|
170
|
+
Not all gaps are equal:
|
|
171
|
+
|
|
172
|
+
**High priority (users will ask for this):**
|
|
173
|
+
- Add new book
|
|
174
|
+
- Create/edit/delete content
|
|
175
|
+
- Core workflow actions
|
|
176
|
+
|
|
177
|
+
**Medium priority (occasional requests):**
|
|
178
|
+
- Filter/search variations
|
|
179
|
+
- Export functionality
|
|
180
|
+
- Sharing features
|
|
181
|
+
|
|
182
|
+
**Low priority (rarely requested via agent):**
|
|
183
|
+
- Theme changes
|
|
184
|
+
- Account deletion
|
|
185
|
+
- Settings that are UI-preference
|
|
186
|
+
</parity_audit>
|
|
187
|
+
|
|
188
|
+
<tool_design_for_parity>
|
|
189
|
+
## Designing Tools for Parity
|
|
190
|
+
|
|
191
|
+
### Match Tool Granularity to UI Granularity
|
|
192
|
+
|
|
193
|
+
If the UI has separate buttons for "Edit" and "Delete", consider separate tools:
|
|
194
|
+
|
|
195
|
+
```typescript
|
|
196
|
+
// Matches UI granularity
|
|
197
|
+
tool("update_feed_item", { id, content, headline }, ...);
|
|
198
|
+
tool("delete_feed_item", { id }, ...);
|
|
199
|
+
|
|
200
|
+
// vs. combined (harder for agent to discover)
|
|
201
|
+
tool("modify_feed_item", { id, action: "update" | "delete", ... }, ...);
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Use User Vocabulary in Tool Names
|
|
205
|
+
|
|
206
|
+
```typescript
|
|
207
|
+
// Good: Matches what users say
|
|
208
|
+
tool("publish_to_feed", ...); // "publish to my feed"
|
|
209
|
+
tool("add_book", ...); // "add this book"
|
|
210
|
+
tool("start_research", ...); // "research this"
|
|
211
|
+
|
|
212
|
+
// Bad: Technical jargon
|
|
213
|
+
tool("create_analysis_record", ...);
|
|
214
|
+
tool("insert_library_item", ...);
|
|
215
|
+
tool("initiate_web_scrape_workflow", ...);
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### Return What the UI Shows
|
|
219
|
+
|
|
220
|
+
If the UI shows a confirmation with details, the tool should too:
|
|
221
|
+
|
|
222
|
+
```typescript
|
|
223
|
+
// UI shows: "Added 'Moby Dick' to your library"
|
|
224
|
+
// Tool should return the same:
|
|
225
|
+
tool("add_book", async ({ title, author }) => {
|
|
226
|
+
const book = await library.add({ title, author });
|
|
227
|
+
return {
|
|
228
|
+
text: `Added "${book.title}" by ${book.author} to your library (id: ${book.id})`
|
|
229
|
+
};
|
|
230
|
+
});
|
|
231
|
+
```
|
|
232
|
+
</tool_design_for_parity>
|
|
233
|
+
|
|
234
|
+
<context_parity>
|
|
235
|
+
## Context Parity
|
|
236
|
+
|
|
237
|
+
Whatever the user sees, the agent should be able to access.
|
|
238
|
+
|
|
239
|
+
### The Problem
|
|
240
|
+
|
|
241
|
+
```swift
|
|
242
|
+
// UI shows recent analyses in a list
|
|
243
|
+
ForEach(analysisRecords) { record in
|
|
244
|
+
AnalysisRow(record: record)
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// But system prompt only mentions books, not analyses
|
|
248
|
+
let systemPrompt = """
|
|
249
|
+
## Available Books
|
|
250
|
+
\(books.map { $0.title })
|
|
251
|
+
// Missing: recent analyses!
|
|
252
|
+
"""
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
The user sees their reading journal. The agent doesn't. This creates a disconnect.
|
|
256
|
+
|
|
257
|
+
### The Fix
|
|
258
|
+
|
|
259
|
+
```swift
|
|
260
|
+
// System prompt includes what UI shows
|
|
261
|
+
let systemPrompt = """
|
|
262
|
+
## Available Books
|
|
263
|
+
\(books.map { "- \($0.title)" }.joined(separator: "\n"))
|
|
264
|
+
|
|
265
|
+
## Recent Reading Journal
|
|
266
|
+
\(analysisRecords.prefix(10).map { "- \($0.summary)" }.joined(separator: "\n"))
|
|
267
|
+
"""
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Context Parity Checklist
|
|
271
|
+
|
|
272
|
+
For each screen in your app:
|
|
273
|
+
- [ ] What data does this screen display?
|
|
274
|
+
- [ ] Is that data available to the agent?
|
|
275
|
+
- [ ] Can the agent access the same level of detail?
|
|
276
|
+
</context_parity>
|
|
277
|
+
|
|
278
|
+
<continuous_parity>
|
|
279
|
+
## Maintaining Parity Over Time
|
|
280
|
+
|
|
281
|
+
### Git Hooks / CI Checks
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
#!/bin/bash
|
|
285
|
+
# pre-commit hook: check for new UI actions without tools
|
|
286
|
+
|
|
287
|
+
# Find new SwiftUI Button/onTapGesture additions
|
|
288
|
+
NEW_ACTIONS=$(git diff --cached --name-only | xargs grep -l "Button\|onTapGesture")
|
|
289
|
+
|
|
290
|
+
if [ -n "$NEW_ACTIONS" ]; then
|
|
291
|
+
echo "New UI actions detected. Did you add corresponding agent tools?"
|
|
292
|
+
echo "Files: $NEW_ACTIONS"
|
|
293
|
+
echo ""
|
|
294
|
+
echo "Checklist:"
|
|
295
|
+
echo " [ ] Agent tool exists for new action"
|
|
296
|
+
echo " [ ] System prompt documents new capability"
|
|
297
|
+
echo " [ ] Capability map updated"
|
|
298
|
+
fi
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### Automated Parity Testing
|
|
302
|
+
|
|
303
|
+
```typescript
|
|
304
|
+
// parity.test.ts
|
|
305
|
+
describe('Action Parity', () => {
|
|
306
|
+
const capabilityMap = loadCapabilityMap();
|
|
307
|
+
|
|
308
|
+
for (const [action, toolName] of Object.entries(capabilityMap)) {
|
|
309
|
+
if (toolName === 'N/A') continue;
|
|
310
|
+
|
|
311
|
+
test(`${action} has agent tool: ${toolName}`, () => {
|
|
312
|
+
expect(agentTools.map(t => t.name)).toContain(toolName);
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
test(`${toolName} is documented in system prompt`, () => {
|
|
316
|
+
expect(systemPrompt).toContain(toolName);
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### Regular Audits
|
|
323
|
+
|
|
324
|
+
Schedule periodic reviews:
|
|
325
|
+
|
|
326
|
+
```markdown
|
|
327
|
+
## Monthly Parity Audit
|
|
328
|
+
|
|
329
|
+
1. Review all PRs merged this month
|
|
330
|
+
2. Check each for new UI actions
|
|
331
|
+
3. Verify tool coverage
|
|
332
|
+
4. Update capability map
|
|
333
|
+
5. Test with natural language requests
|
|
334
|
+
```
|
|
335
|
+
</continuous_parity>
|
|
336
|
+
|
|
337
|
+
<checklist>
|
|
338
|
+
## Action Parity Checklist
|
|
339
|
+
|
|
340
|
+
For every PR with UI changes:
|
|
341
|
+
- [ ] Listed all new UI actions
|
|
342
|
+
- [ ] Verified agent tool exists for each action
|
|
343
|
+
- [ ] Updated system prompt with new capabilities
|
|
344
|
+
- [ ] Added to capability map
|
|
345
|
+
- [ ] Tested with natural language request
|
|
346
|
+
|
|
347
|
+
For periodic audits:
|
|
348
|
+
- [ ] Walked through every screen
|
|
349
|
+
- [ ] Listed all possible user actions
|
|
350
|
+
- [ ] Checked tool coverage for each
|
|
351
|
+
- [ ] Prioritized gaps by likelihood of user request
|
|
352
|
+
- [ ] Created issues for high-priority gaps
|
|
353
|
+
</checklist>
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
<overview>
|
|
2
|
+
Agent execution patterns for building robust agent loops. This covers how agents signal completion, track partial progress for resume, select appropriate model tiers, and handle context limits.
|
|
3
|
+
</overview>
|
|
4
|
+
|
|
5
|
+
<completion_signals>
|
|
6
|
+
## Completion Signals
|
|
7
|
+
|
|
8
|
+
Agents need an explicit way to say "I'm done."
|
|
9
|
+
|
|
10
|
+
### Anti-Pattern: Heuristic Detection
|
|
11
|
+
|
|
12
|
+
Detecting completion through heuristics is fragile:
|
|
13
|
+
|
|
14
|
+
- Consecutive iterations without tool calls
|
|
15
|
+
- Checking for expected output files
|
|
16
|
+
- Tracking "no progress" states
|
|
17
|
+
- Time-based timeouts
|
|
18
|
+
|
|
19
|
+
These break in edge cases and create unpredictable behavior.
|
|
20
|
+
|
|
21
|
+
### Pattern: Explicit Completion Tool
|
|
22
|
+
|
|
23
|
+
Provide a `complete_task` tool that:
|
|
24
|
+
- Takes a summary of what was accomplished
|
|
25
|
+
- Returns a signal that stops the loop
|
|
26
|
+
- Works identically across all agent types
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
tool("complete_task", {
|
|
30
|
+
summary: z.string().describe("Summary of what was accomplished"),
|
|
31
|
+
status: z.enum(["success", "partial", "blocked"]).optional(),
|
|
32
|
+
}, async ({ summary, status = "success" }) => {
|
|
33
|
+
return {
|
|
34
|
+
text: summary,
|
|
35
|
+
shouldContinue: false, // Key: signals loop should stop
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### The ToolResult Pattern
|
|
41
|
+
|
|
42
|
+
Structure tool results to separate success from continuation:
|
|
43
|
+
|
|
44
|
+
```swift
|
|
45
|
+
struct ToolResult {
|
|
46
|
+
let success: Bool // Did tool succeed?
|
|
47
|
+
let output: String // What happened?
|
|
48
|
+
let shouldContinue: Bool // Should agent loop continue?
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
extension ToolResult {
|
|
52
|
+
static func success(_ output: String) -> ToolResult {
|
|
53
|
+
// Tool succeeded, keep going
|
|
54
|
+
ToolResult(success: true, output: output, shouldContinue: true)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
static func error(_ message: String) -> ToolResult {
|
|
58
|
+
// Tool failed but recoverable, agent can try something else
|
|
59
|
+
ToolResult(success: false, output: message, shouldContinue: true)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static func complete(_ summary: String) -> ToolResult {
|
|
63
|
+
// Task done, stop the loop
|
|
64
|
+
ToolResult(success: true, output: summary, shouldContinue: false)
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Key Insight
|
|
70
|
+
|
|
71
|
+
**This is different from success/failure:**
|
|
72
|
+
|
|
73
|
+
- A tool can **succeed** AND signal **stop** (task complete)
|
|
74
|
+
- A tool can **fail** AND signal **continue** (recoverable error, try something else)
|
|
75
|
+
|
|
76
|
+
### System Prompt Guidance
|
|
77
|
+
|
|
78
|
+
Tell the agent when to complete:
|
|
79
|
+
|
|
80
|
+
```markdown
|
|
81
|
+
## Completing Tasks
|
|
82
|
+
|
|
83
|
+
When you've accomplished the user's request:
|
|
84
|
+
1. Verify your work (read back files you created, check results)
|
|
85
|
+
2. Call `complete_task` with a summary of what you did
|
|
86
|
+
3. Don't keep working after the goal is achieved
|
|
87
|
+
|
|
88
|
+
If you're blocked and can't proceed:
|
|
89
|
+
- Call `complete_task` with status "blocked" and explain why
|
|
90
|
+
- Don't loop forever trying the same thing
|
|
91
|
+
```
|
|
92
|
+
</completion_signals>
|
|
93
|
+
|
|
94
|
+
<partial_completion>
|
|
95
|
+
## Partial Completion
|
|
96
|
+
|
|
97
|
+
For multi-step tasks, track progress at the task level for resume capability.
|
|
98
|
+
|
|
99
|
+
### Task State Tracking
|
|
100
|
+
|
|
101
|
+
```swift
|
|
102
|
+
enum TaskStatus {
|
|
103
|
+
case pending // Not yet started
|
|
104
|
+
case inProgress // Currently working on
|
|
105
|
+
case completed // Finished successfully
|
|
106
|
+
case failed // Couldn't complete (with reason)
|
|
107
|
+
case skipped // Intentionally not done
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
struct AgentTask {
|
|
111
|
+
let id: String
|
|
112
|
+
let description: String
|
|
113
|
+
var status: TaskStatus
|
|
114
|
+
var notes: String? // Why it failed, what was done
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
struct AgentSession {
|
|
118
|
+
var tasks: [AgentTask]
|
|
119
|
+
|
|
120
|
+
var isComplete: Bool {
|
|
121
|
+
tasks.allSatisfy { $0.status == .completed || $0.status == .skipped }
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
var progress: (completed: Int, total: Int) {
|
|
125
|
+
let done = tasks.filter { $0.status == .completed }.count
|
|
126
|
+
return (done, tasks.count)
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Partial Completion Scenarios
|
|
132
|
+
|
|
133
|
+
**Agent hits max iterations before finishing:**
|
|
134
|
+
- Some tasks completed, some pending
|
|
135
|
+
- Checkpoint saved with current state
|
|
136
|
+
- Resume continues from where it left off, not from beginning
|
|
137
|
+
|
|
138
|
+
**Agent fails on one task:**
|
|
139
|
+
- Task marked `.failed` with error in notes
|
|
140
|
+
- Other tasks may continue (agent decides)
|
|
141
|
+
- Orchestrator doesn't automatically abort entire session
|
|
142
|
+
|
|
143
|
+
**Network error mid-task:**
|
|
144
|
+
- Current iteration throws
|
|
145
|
+
- Session marked `.failed`
|
|
146
|
+
- Checkpoint preserves messages up to that point
|
|
147
|
+
- Resume possible from checkpoint
|
|
148
|
+
|
|
149
|
+
### Checkpoint Structure
|
|
150
|
+
|
|
151
|
+
```swift
|
|
152
|
+
struct AgentCheckpoint: Codable {
|
|
153
|
+
let sessionId: String
|
|
154
|
+
let agentType: String
|
|
155
|
+
let messages: [Message] // Full conversation history
|
|
156
|
+
let iterationCount: Int
|
|
157
|
+
let tasks: [AgentTask] // Task state
|
|
158
|
+
let customState: [String: Any] // Agent-specific state
|
|
159
|
+
let timestamp: Date
|
|
160
|
+
|
|
161
|
+
var isValid: Bool {
|
|
162
|
+
// Checkpoints expire (default 1 hour)
|
|
163
|
+
Date().timeIntervalSince(timestamp) < 3600
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Resume Flow
|
|
169
|
+
|
|
170
|
+
1. On app launch, scan for valid checkpoints
|
|
171
|
+
2. Show user: "You have an incomplete session. Resume?"
|
|
172
|
+
3. On resume:
|
|
173
|
+
- Restore messages to conversation
|
|
174
|
+
- Restore task states
|
|
175
|
+
- Continue agent loop from where it left off
|
|
176
|
+
4. On dismiss:
|
|
177
|
+
- Delete checkpoint
|
|
178
|
+
- Start fresh if user tries again
|
|
179
|
+
</partial_completion>
|
|
180
|
+
|
|
181
|
+
<model_tier_selection>
|
|
182
|
+
## Model Tier Selection
|
|
183
|
+
|
|
184
|
+
Different agents need different intelligence levels. Use the cheapest model that achieves the outcome.
|
|
185
|
+
|
|
186
|
+
### Tier Guidelines
|
|
187
|
+
|
|
188
|
+
| Agent Type | Recommended Tier | Reasoning |
|
|
189
|
+
|------------|-----------------|-----------|
|
|
190
|
+
| Chat/Conversation | Balanced (Sonnet) | Fast responses, good reasoning |
|
|
191
|
+
| Research | Balanced (Sonnet) | Tool loops, not ultra-complex synthesis |
|
|
192
|
+
| Content Generation | Balanced (Sonnet) | Creative but not synthesis-heavy |
|
|
193
|
+
| Complex Analysis | Powerful (Opus) | Multi-document synthesis, nuanced judgment |
|
|
194
|
+
| Profile Generation | Powerful (Opus) | Photo analysis, complex pattern recognition |
|
|
195
|
+
| Quick Queries | Fast (Haiku) | Simple lookups, quick transformations |
|
|
196
|
+
| Simple Classification | Fast (Haiku) | High volume, simple decisions |
|
|
197
|
+
|
|
198
|
+
### Cost Optimization Strategies
|
|
199
|
+
|
|
200
|
+
1. **Start with balanced, upgrade if quality insufficient**
|
|
201
|
+
2. **Use fast tier for tool-heavy loops** where each turn is simple
|
|
202
|
+
3. **Reserve powerful tier for synthesis tasks** (comparing multiple sources)
|
|
203
|
+
4. **Consider token limits per turn** to control costs
|
|
204
|
+
5. **Cache expensive operations** to avoid repeated calls
|
|
205
|
+
</model_tier_selection>
|
|
206
|
+
|
|
207
|
+
<context_limits>
|
|
208
|
+
## Context Limits
|
|
209
|
+
|
|
210
|
+
Agent sessions can extend indefinitely, but context windows don't. Design for bounded context from the start.
|
|
211
|
+
|
|
212
|
+
### The Problem
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
Turn 1: User asks question → 500 tokens
|
|
216
|
+
Turn 2: Agent reads file → 10,000 tokens
|
|
217
|
+
Turn 3: Agent reads another file → 10,000 tokens
|
|
218
|
+
Turn 4: Agent researches → 20,000 tokens
|
|
219
|
+
...
|
|
220
|
+
Turn 10: Context window exceeded
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Design Principles
|
|
224
|
+
|
|
225
|
+
**1. Tools should support iterative refinement**
|
|
226
|
+
|
|
227
|
+
Instead of all-or-nothing, design for summary → detail → full:
|
|
228
|
+
|
|
229
|
+
```typescript
|
|
230
|
+
tool("read_file", {
|
|
231
|
+
path: z.string(),
|
|
232
|
+
preview: z.boolean().default(true), // Return first 1000 chars by default
|
|
233
|
+
full: z.boolean().default(false), // Opt-in to full content
|
|
234
|
+
}, ...);
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**2. Provide consolidation tools**
|
|
238
|
+
|
|
239
|
+
Give agents a way to consolidate learnings mid-session:
|
|
240
|
+
|
|
241
|
+
```typescript
|
|
242
|
+
tool("summarize_and_continue", {
|
|
243
|
+
keyPoints: z.array(z.string()),
|
|
244
|
+
nextSteps: z.array(z.string()),
|
|
245
|
+
}, async ({ keyPoints, nextSteps }) => {
|
|
246
|
+
await saveSessionSummary({ keyPoints, nextSteps });
|
|
247
|
+
return { text: "Summary saved. Continuing with focus on: " + nextSteps.join(", ") };
|
|
248
|
+
});
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**3. Design for truncation**
|
|
252
|
+
|
|
253
|
+
Assume the orchestrator may truncate early messages. Important context should be:
|
|
254
|
+
- In the system prompt (always present)
|
|
255
|
+
- In files (can be re-read)
|
|
256
|
+
- Summarized in context.md
|
|
257
|
+
|
|
258
|
+
### System Prompt Guidance
|
|
259
|
+
|
|
260
|
+
```markdown
|
|
261
|
+
## Managing Context
|
|
262
|
+
|
|
263
|
+
For long tasks, periodically consolidate what you've learned:
|
|
264
|
+
1. If you've gathered a lot of information, summarize key points
|
|
265
|
+
2. Save important findings to files (they persist beyond context)
|
|
266
|
+
3. Use `summarize_and_continue` if the conversation is getting long
|
|
267
|
+
|
|
268
|
+
Don't try to hold everything in memory. Write it down.
|
|
269
|
+
```
|
|
270
|
+
</context_limits>
|
|
271
|
+
|
|
272
|
+
<orchestrator_pattern>
|
|
273
|
+
## Unified Agent Orchestrator
|
|
274
|
+
|
|
275
|
+
One execution engine, many agent types. All agents use the same orchestrator with different configurations.
|
|
276
|
+
|
|
277
|
+
```swift
|
|
278
|
+
class AgentOrchestrator {
|
|
279
|
+
static let shared = AgentOrchestrator()
|
|
280
|
+
|
|
281
|
+
func run(config: AgentConfig, userMessage: String) async -> AgentResult {
|
|
282
|
+
var messages: [Message] = [
|
|
283
|
+
.system(config.systemPrompt),
|
|
284
|
+
.user(userMessage)
|
|
285
|
+
]
|
|
286
|
+
|
|
287
|
+
var iteration = 0
|
|
288
|
+
|
|
289
|
+
while iteration < config.maxIterations {
|
|
290
|
+
let response = await claude.message(
|
|
291
|
+
model: config.modelTier.modelId,
|
|
292
|
+
messages: messages,
|
|
293
|
+
tools: config.tools
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
messages.append(.assistant(response))
|
|
297
|
+
|
|
298
|
+
for toolCall in response.toolCalls {
|
|
299
|
+
let result = await executeToolCall(toolCall, config: config)
|
|
300
|
+
messages.append(.toolResult(result))
|
|
301
|
+
|
|
302
|
+
if !result.shouldContinue {
|
|
303
|
+
return AgentResult(
|
|
304
|
+
status: .completed,
|
|
305
|
+
output: result.output,
|
|
306
|
+
iterations: iteration + 1
|
|
307
|
+
)
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if response.toolCalls.isEmpty {
|
|
312
|
+
break
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
iteration += 1
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
return AgentResult(
|
|
319
|
+
status: iteration >= config.maxIterations ? .maxIterations : .responded,
|
|
320
|
+
output: messages.last?.content ?? "",
|
|
321
|
+
iterations: iteration
|
|
322
|
+
)
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Benefits
|
|
328
|
+
|
|
329
|
+
- Consistent lifecycle management across all agent types
|
|
330
|
+
- Automatic checkpoint/resume (critical for mobile)
|
|
331
|
+
- Shared tool protocol
|
|
332
|
+
- Easy to add new agent types
|
|
333
|
+
- Centralized error handling and logging
|
|
334
|
+
</orchestrator_pattern>
|
|
335
|
+
|
|
336
|
+
<checklist>
|
|
337
|
+
## Agent Execution Checklist
|
|
338
|
+
|
|
339
|
+
### Completion Signals
|
|
340
|
+
- [ ] `complete_task` tool provided (explicit completion)
|
|
341
|
+
- [ ] No heuristic completion detection
|
|
342
|
+
- [ ] Tool results include `shouldContinue` flag
|
|
343
|
+
- [ ] System prompt guides when to complete
|
|
344
|
+
|
|
345
|
+
### Partial Completion
|
|
346
|
+
- [ ] Tasks tracked with status (pending, in_progress, completed, failed)
|
|
347
|
+
- [ ] Checkpoints saved for resume
|
|
348
|
+
- [ ] Progress visible to user
|
|
349
|
+
- [ ] Resume continues from where left off
|
|
350
|
+
|
|
351
|
+
### Model Tiers
|
|
352
|
+
- [ ] Tier selected based on task complexity
|
|
353
|
+
- [ ] Cost optimization considered
|
|
354
|
+
- [ ] Fast tier for simple operations
|
|
355
|
+
- [ ] Powerful tier reserved for synthesis
|
|
356
|
+
|
|
357
|
+
### Context Limits
|
|
358
|
+
- [ ] Tools support iterative refinement (preview vs full)
|
|
359
|
+
- [ ] Consolidation mechanism available
|
|
360
|
+
- [ ] Important context persisted to files
|
|
361
|
+
- [ ] Truncation strategy defined
|
|
362
|
+
</checklist>
|