agent-skill-kit 3.9.135
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/.agent/global.d.ts +80 -0
- package/.agent/rules/GEMINI.md +210 -0
- package/.agent/rules/autopilot.md +287 -0
- package/.agent/rules/code-rules.md +227 -0
- package/.agent/scripts/audit_workflows.ts +23 -0
- package/.agent/scripts/auto_preview.ts +170 -0
- package/.agent/scripts/checklist.ts +180 -0
- package/.agent/scripts/compile-agents.ts +237 -0
- package/.agent/scripts/fix_skills.ts +49 -0
- package/.agent/scripts/session_manager.ts +222 -0
- package/.agent/scripts/skill-audit.ts +255 -0
- package/.agent/scripts/sync_workflows.ts +54 -0
- package/.agent/scripts/utils/colors.ts +58 -0
- package/.agent/scripts/utils/process-manager.ts +131 -0
- package/.agent/scripts/utils/reporter.ts +192 -0
- package/.agent/scripts/utils/runner.ts +128 -0
- package/.agent/scripts/verify_all.ts +243 -0
- package/.agent/scripts/version-sync.ts +256 -0
- package/.agent/skills/SKILL_INDEX.md +129 -0
- package/.agent/skills/agent-browser/AGENTS.md +728 -0
- package/.agent/skills/agent-browser/SKILL.md +193 -0
- package/.agent/skills/agent-browser/rules/_sections.md +15 -0
- package/.agent/skills/agent-browser/rules/_template.md +32 -0
- package/.agent/skills/agent-browser/rules/engineering-spec.md +528 -0
- package/.agent/skills/agent-browser/scripts/browser_cli.ts +52 -0
- package/.agent/skills/agent-browser/scripts/session_manager.ts +166 -0
- package/.agent/skills/ai-artist/AGENTS.md +1082 -0
- package/.agent/skills/ai-artist/SKILL.md +186 -0
- package/.agent/skills/ai-artist/rules/_sections.md +30 -0
- package/.agent/skills/ai-artist/rules/_template.md +32 -0
- package/.agent/skills/ai-artist/rules/domain-code.md +118 -0
- package/.agent/skills/ai-artist/rules/domain-marketing.md +105 -0
- package/.agent/skills/ai-artist/rules/engineering-spec.md +519 -0
- package/.agent/skills/ai-artist/rules/image-prompts.md +195 -0
- package/.agent/skills/ai-artist/rules/model-syntax.md +115 -0
- package/.agent/skills/ai-artist/scripts/prompt_compiler.ts +72 -0
- package/.agent/skills/ai-artist/templates/image-core.txt +1 -0
- package/.agent/skills/ai-artist/templates/llm-core.txt +6 -0
- package/.agent/skills/api-architect/AGENTS.md +1896 -0
- package/.agent/skills/api-architect/SKILL.md +173 -0
- package/.agent/skills/api-architect/rules/_sections.md +35 -0
- package/.agent/skills/api-architect/rules/_template.md +32 -0
- package/.agent/skills/api-architect/rules/api-style.md +115 -0
- package/.agent/skills/api-architect/rules/auth.md +134 -0
- package/.agent/skills/api-architect/rules/documentation.md +131 -0
- package/.agent/skills/api-architect/rules/engineering-spec.md +505 -0
- package/.agent/skills/api-architect/rules/graphql.md +154 -0
- package/.agent/skills/api-architect/rules/rate-limiting.md +76 -0
- package/.agent/skills/api-architect/rules/response.md +138 -0
- package/.agent/skills/api-architect/rules/rest.md +113 -0
- package/.agent/skills/api-architect/rules/security-testing.md +146 -0
- package/.agent/skills/api-architect/rules/trpc.md +129 -0
- package/.agent/skills/api-architect/rules/versioning.md +100 -0
- package/.agent/skills/api-architect/scripts/api_validator.ts +413 -0
- package/.agent/skills/auth-patterns/AGENTS.md +1830 -0
- package/.agent/skills/auth-patterns/SKILL.md +163 -0
- package/.agent/skills/auth-patterns/rules/_sections.md +30 -0
- package/.agent/skills/auth-patterns/rules/_template.md +32 -0
- package/.agent/skills/auth-patterns/rules/engineering-spec.md +515 -0
- package/.agent/skills/auth-patterns/rules/jwt-deep.md +196 -0
- package/.agent/skills/auth-patterns/rules/mfa.md +174 -0
- package/.agent/skills/auth-patterns/rules/oauth2.md +134 -0
- package/.agent/skills/auth-patterns/rules/passkey.md +243 -0
- package/.agent/skills/auth-patterns/rules/rbac-abac.md +206 -0
- package/.agent/skills/auth-patterns/rules/session.md +183 -0
- package/.agent/skills/auth-patterns/scripts/auth_validator.ts +121 -0
- package/.agent/skills/chrome-devtools/AGENTS.md +952 -0
- package/.agent/skills/chrome-devtools/SKILL.md +160 -0
- package/.agent/skills/chrome-devtools/rules/_sections.md +25 -0
- package/.agent/skills/chrome-devtools/rules/_template.md +32 -0
- package/.agent/skills/chrome-devtools/rules/aria-snapshot.md +95 -0
- package/.agent/skills/chrome-devtools/rules/engineering-spec.md +510 -0
- package/.agent/skills/chrome-devtools/rules/scripts-guide.md +174 -0
- package/.agent/skills/chrome-devtools/scripts/aria-snapshot.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/click.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/console.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/core_cli.ts +79 -0
- package/.agent/skills/chrome-devtools/scripts/evaluate.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/fill.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/navigate.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/network.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/performance.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/screenshot.ts +3 -0
- package/.agent/skills/chrome-devtools/scripts/select-ref.ts +3 -0
- package/.agent/skills/cicd-pipeline/AGENTS.md +809 -0
- package/.agent/skills/cicd-pipeline/SKILL.md +164 -0
- package/.agent/skills/cicd-pipeline/rules/_sections.md +15 -0
- package/.agent/skills/cicd-pipeline/rules/_template.md +32 -0
- package/.agent/skills/cicd-pipeline/rules/engineering-spec.md +477 -0
- package/.agent/skills/cicd-pipeline/scripts/flag-manager.ts +253 -0
- package/.agent/skills/cicd-pipeline/scripts/pipeline_validator.ts +133 -0
- package/.agent/skills/code-constitution/AGENTS.md +597 -0
- package/.agent/skills/code-constitution/CHANGELOG.md +216 -0
- package/.agent/skills/code-constitution/SKILL.md +191 -0
- package/.agent/skills/code-constitution/VERSION +3 -0
- package/.agent/skills/code-constitution/examples/violation-backend-mutation/after.tsx +59 -0
- package/.agent/skills/code-constitution/examples/violation-backend-mutation/before.tsx +42 -0
- package/.agent/skills/code-constitution/examples/violation-backend-mutation/explanation.md +91 -0
- package/.agent/skills/code-constitution/examples/violation-chart-injection/after.tsx +99 -0
- package/.agent/skills/code-constitution/examples/violation-chart-injection/before.tsx +57 -0
- package/.agent/skills/code-constitution/examples/violation-chart-injection/explanation.md +120 -0
- package/.agent/skills/code-constitution/knowledge/lessons-learned.yaml +3 -0
- package/.agent/skills/code-constitution/metadata/precedence.yaml +117 -0
- package/.agent/skills/code-constitution/metadata/scope-map.yaml +156 -0
- package/.agent/skills/code-constitution/proposals/v1.1-change-proposal-template.md +201 -0
- package/.agent/skills/code-constitution/resources/AUTHORITY_MODEL.md +115 -0
- package/.agent/skills/code-constitution/resources/ENFORCEMENT_GUIDE.md +246 -0
- package/.agent/skills/code-constitution/resources/LOAD_ORDER.md +86 -0
- package/.agent/skills/code-constitution/rules/_sections.md +15 -0
- package/.agent/skills/code-constitution/rules/_template.md +32 -0
- package/.agent/skills/code-constitution/rules/constitution/master-constitution.md +210 -0
- package/.agent/skills/code-constitution/rules/doctrines/architecture/architecture-doctrine.md +188 -0
- package/.agent/skills/code-constitution/rules/doctrines/backend/backend-data-engine-doctrine.md +218 -0
- package/.agent/skills/code-constitution/rules/doctrines/commercial/commercial-guardrails-doctrine.md +196 -0
- package/.agent/skills/code-constitution/rules/doctrines/data/data-integrity-doctrine.md +202 -0
- package/.agent/skills/code-constitution/rules/doctrines/frontend/frontend-mobile-doctrine.md +169 -0
- package/.agent/skills/code-constitution/rules/doctrines/frontend/interaction-patterns-doctrine.md +176 -0
- package/.agent/skills/code-constitution/rules/doctrines/learning/learning-engine-doctrine.md +192 -0
- package/.agent/skills/code-constitution/rules/doctrines/performance/performance-doctrine.md +180 -0
- package/.agent/skills/code-constitution/rules/doctrines/review/code-review-doctrine.md +174 -0
- package/.agent/skills/code-constitution/rules/enforcement/agents/agent-enforcement-protocol.md +218 -0
- package/.agent/skills/code-constitution/rules/enforcement/agents/agent-system-prompt.md +196 -0
- package/.agent/skills/code-constitution/rules/enforcement/checklists/backend-api-review-checklist.md +131 -0
- package/.agent/skills/code-constitution/rules/enforcement/checklists/chart-component-review-checklist.md +147 -0
- package/.agent/skills/code-constitution/rules/enforcement/checklists/frontend-review-checklist.md +194 -0
- package/.agent/skills/code-constitution/rules/enforcement/playbooks/doctrine-violation-playbook.md +236 -0
- package/.agent/skills/code-constitution/rules/engineering-spec.md +561 -0
- package/.agent/skills/code-constitution/scripts/audit_pr.ts +219 -0
- package/.agent/skills/code-constitution/scripts/check_boundaries.ts +134 -0
- package/.agent/skills/code-constitution/scripts/learn.ts +202 -0
- package/.agent/skills/code-constitution/scripts/validate_doctrine.ts +287 -0
- package/.agent/skills/code-craft/AGENTS.md +803 -0
- package/.agent/skills/code-craft/SKILL.md +170 -0
- package/.agent/skills/code-craft/rules/_sections.md +20 -0
- package/.agent/skills/code-craft/rules/_template.md +32 -0
- package/.agent/skills/code-craft/rules/engineering-spec.md +447 -0
- package/.agent/skills/code-craft/rules/verification-scripts.md +83 -0
- package/.agent/skills/code-craft/scripts/code_quality_checker.ts +193 -0
- package/.agent/skills/code-review/AGENTS.md +1664 -0
- package/.agent/skills/code-review/SKILL.md +152 -0
- package/.agent/skills/code-review/rules/_sections.md +15 -0
- package/.agent/skills/code-review/rules/_template.md +32 -0
- package/.agent/skills/code-review/rules/engineering-spec.md +466 -0
- package/.agent/skills/code-review/scripts/lint_runner.ts +213 -0
- package/.agent/skills/code-review/scripts/type_coverage.ts +118 -0
- package/.agent/skills/context-engineering/AGENTS.md +499 -0
- package/.agent/skills/context-engineering/SKILL.md +147 -0
- package/.agent/skills/context-engineering/rules/_sections.md +15 -0
- package/.agent/skills/context-engineering/rules/_template.md +32 -0
- package/.agent/skills/context-engineering/rules/engineering-spec.md +463 -0
- package/.agent/skills/context-engineering/scripts/context_analyzer.ts +127 -0
- package/.agent/skills/copywriting/AGENTS.md +501 -0
- package/.agent/skills/copywriting/SKILL.md +188 -0
- package/.agent/skills/copywriting/rules/_sections.md +15 -0
- package/.agent/skills/copywriting/rules/_template.md +32 -0
- package/.agent/skills/copywriting/rules/engineering-spec.md +465 -0
- package/.agent/skills/copywriting/scripts/copy_validator.ts +185 -0
- package/.agent/skills/data-modeler/AGENTS.md +814 -0
- package/.agent/skills/data-modeler/SKILL.md +195 -0
- package/.agent/skills/data-modeler/rules/_sections.md +15 -0
- package/.agent/skills/data-modeler/rules/_template.md +32 -0
- package/.agent/skills/data-modeler/rules/database-selection.md +124 -0
- package/.agent/skills/data-modeler/rules/engineering-spec.md +479 -0
- package/.agent/skills/data-modeler/rules/indexing.md +166 -0
- package/.agent/skills/data-modeler/rules/migrations.md +176 -0
- package/.agent/skills/data-modeler/rules/optimization.md +161 -0
- package/.agent/skills/data-modeler/rules/orm-selection.md +155 -0
- package/.agent/skills/data-modeler/rules/schema-design.md +162 -0
- package/.agent/skills/data-modeler/scripts/schema_validator.ts +357 -0
- package/.agent/skills/debug-pro/AGENTS.md +798 -0
- package/.agent/skills/debug-pro/SKILL.md +193 -0
- package/.agent/skills/debug-pro/defense-in-depth/SKILL.md +148 -0
- package/.agent/skills/debug-pro/root-cause-tracing/SKILL.md +196 -0
- package/.agent/skills/debug-pro/root-cause-tracing/find-polluter.sh +63 -0
- package/.agent/skills/debug-pro/rules/_sections.md +15 -0
- package/.agent/skills/debug-pro/rules/_template.md +32 -0
- package/.agent/skills/debug-pro/rules/engineering-spec.md +491 -0
- package/.agent/skills/debug-pro/scripts/debug_verifier.ts +148 -0
- package/.agent/skills/debug-pro/verification-before-completion/SKILL.md +160 -0
- package/.agent/skills/design-system/AGENTS.md +4216 -0
- package/.agent/skills/design-system/SKILL.md +186 -0
- package/.agent/skills/design-system/rules/_sections.md +65 -0
- package/.agent/skills/design-system/rules/_template.md +32 -0
- package/.agent/skills/design-system/rules/animation-guide.md +355 -0
- package/.agent/skills/design-system/rules/color-system.md +335 -0
- package/.agent/skills/design-system/rules/color-systems.md +133 -0
- package/.agent/skills/design-system/rules/decision-trees.md +442 -0
- package/.agent/skills/design-system/rules/design-extraction.md +152 -0
- package/.agent/skills/design-system/rules/engineering-spec.md +484 -0
- package/.agent/skills/design-system/rules/motion-design.md +161 -0
- package/.agent/skills/design-system/rules/motion-graphics.md +330 -0
- package/.agent/skills/design-system/rules/spatial-composition.md +184 -0
- package/.agent/skills/design-system/rules/typography-system.md +369 -0
- package/.agent/skills/design-system/rules/typography.md +124 -0
- package/.agent/skills/design-system/rules/ux-psychology.md +565 -0
- package/.agent/skills/design-system/rules/visual-effects.md +407 -0
- package/.agent/skills/design-system/scripts/accessibility_checker.ts +292 -0
- package/.agent/skills/design-system/scripts/ux_audit.ts +356 -0
- package/.agent/skills/doc-templates/AGENTS.md +820 -0
- package/.agent/skills/doc-templates/SKILL.md +260 -0
- package/.agent/skills/doc-templates/rules/_sections.md +20 -0
- package/.agent/skills/doc-templates/rules/_template.md +32 -0
- package/.agent/skills/doc-templates/rules/doc.md +355 -0
- package/.agent/skills/doc-templates/rules/engineering-spec.md +422 -0
- package/.agent/skills/doc-templates/scripts/editor-server.ts +162 -0
- package/.agent/skills/doc-templates/scripts/inject_otel.ts +22 -0
- package/.agent/skills/doc-templates/scripts/kanban-server.ts +171 -0
- package/.agent/skills/doc-templates/scripts/markdown-server.ts +185 -0
- package/.agent/skills/e2e-automation/AGENTS.md +882 -0
- package/.agent/skills/e2e-automation/SKILL.md +175 -0
- package/.agent/skills/e2e-automation/rules/_sections.md +20 -0
- package/.agent/skills/e2e-automation/rules/_template.md +32 -0
- package/.agent/skills/e2e-automation/rules/aria-snapshot.md +185 -0
- package/.agent/skills/e2e-automation/rules/engineering-spec.md +501 -0
- package/.agent/skills/e2e-automation/scripts/playwright_runner.ts +208 -0
- package/.agent/skills/execution-reporter/AGENTS.md +419 -0
- package/.agent/skills/execution-reporter/SKILL.md +152 -0
- package/.agent/skills/execution-reporter/rules/_sections.md +15 -0
- package/.agent/skills/execution-reporter/rules/_template.md +32 -0
- package/.agent/skills/execution-reporter/rules/engineering-spec.md +389 -0
- package/.agent/skills/game-development/2d-games/SKILL.md +140 -0
- package/.agent/skills/game-development/3d-games/SKILL.md +156 -0
- package/.agent/skills/game-development/AGENTS.md +783 -0
- package/.agent/skills/game-development/SKILL.md +178 -0
- package/.agent/skills/game-development/game-art/SKILL.md +207 -0
- package/.agent/skills/game-development/game-audio/SKILL.md +211 -0
- package/.agent/skills/game-development/game-design/SKILL.md +151 -0
- package/.agent/skills/game-development/mobile-games/SKILL.md +130 -0
- package/.agent/skills/game-development/multiplayer/SKILL.md +154 -0
- package/.agent/skills/game-development/pc-games/SKILL.md +167 -0
- package/.agent/skills/game-development/rules/_sections.md +15 -0
- package/.agent/skills/game-development/rules/_template.md +32 -0
- package/.agent/skills/game-development/rules/engineering-spec.md +480 -0
- package/.agent/skills/game-development/vr-ar/SKILL.md +144 -0
- package/.agent/skills/game-development/web-games/SKILL.md +173 -0
- package/.agent/skills/git-workflow/AGENTS.md +554 -0
- package/.agent/skills/git-workflow/SKILL.md +181 -0
- package/.agent/skills/git-workflow/rules/_sections.md +15 -0
- package/.agent/skills/git-workflow/rules/_template.md +32 -0
- package/.agent/skills/git-workflow/rules/engineering-spec.md +518 -0
- package/.agent/skills/gitops/AGENTS.md +921 -0
- package/.agent/skills/gitops/SKILL.md +163 -0
- package/.agent/skills/gitops/rules/_sections.md +25 -0
- package/.agent/skills/gitops/rules/_template.md +32 -0
- package/.agent/skills/gitops/rules/argocd-setup.md +148 -0
- package/.agent/skills/gitops/rules/engineering-spec.md +450 -0
- package/.agent/skills/gitops/rules/sync-policies.md +145 -0
- package/.agent/skills/google-adk-python/AGENTS.md +1054 -0
- package/.agent/skills/google-adk-python/SKILL.md +168 -0
- package/.agent/skills/google-adk-python/rules/_sections.md +25 -0
- package/.agent/skills/google-adk-python/rules/_template.md +32 -0
- package/.agent/skills/google-adk-python/rules/deployment.md +138 -0
- package/.agent/skills/google-adk-python/rules/engineering-spec.md +451 -0
- package/.agent/skills/google-adk-python/rules/multi-agent.md +146 -0
- package/.agent/skills/google-adk-python/rules/tools.md +131 -0
- package/.agent/skills/idea-storm/AGENTS.md +995 -0
- package/.agent/skills/idea-storm/SKILL.md +160 -0
- package/.agent/skills/idea-storm/rules/_sections.md +25 -0
- package/.agent/skills/idea-storm/rules/_template.md +32 -0
- package/.agent/skills/idea-storm/rules/architecture-debate.md +122 -0
- package/.agent/skills/idea-storm/rules/dynamic-questioning.md +374 -0
- package/.agent/skills/idea-storm/rules/engineering-spec.md +466 -0
- package/.agent/skills/knowledge-compiler/SKILL.md +320 -0
- package/.agent/skills/knowledge-graph/AGENTS.md +762 -0
- package/.agent/skills/knowledge-graph/SKILL.md +157 -0
- package/.agent/skills/knowledge-graph/rules/_sections.md +15 -0
- package/.agent/skills/knowledge-graph/rules/_template.md +32 -0
- package/.agent/skills/knowledge-graph/rules/engineering-spec.md +439 -0
- package/.agent/skills/knowledge-linter/SKILL.md +217 -0
- package/.agent/skills/lifecycle-orchestrator/AGENTS.md +989 -0
- package/.agent/skills/lifecycle-orchestrator/SKILL.md +169 -0
- package/.agent/skills/lifecycle-orchestrator/rules/_sections.md +15 -0
- package/.agent/skills/lifecycle-orchestrator/rules/_template.md +32 -0
- package/.agent/skills/lifecycle-orchestrator/rules/engineering-spec.md +525 -0
- package/.agent/skills/lifecycle-orchestrator/scripts/state_manager.ts +189 -0
- package/.agent/skills/mcp-builder/AGENTS.md +1653 -0
- package/.agent/skills/mcp-builder/SKILL.md +166 -0
- package/.agent/skills/mcp-builder/rules/_sections.md +40 -0
- package/.agent/skills/mcp-builder/rules/_template.md +32 -0
- package/.agent/skills/mcp-builder/rules/best-practices.md +157 -0
- package/.agent/skills/mcp-builder/rules/design-principles.md +105 -0
- package/.agent/skills/mcp-builder/rules/engineering-spec.md +473 -0
- package/.agent/skills/mcp-builder/rules/evaluation.md +103 -0
- package/.agent/skills/mcp-builder/rules/python-implementation.md +249 -0
- package/.agent/skills/mcp-builder/rules/quickstart.md +111 -0
- package/.agent/skills/mcp-builder/rules/typescript-implementation.md +280 -0
- package/.agent/skills/mcp-management/AGENTS.md +837 -0
- package/.agent/skills/mcp-management/SKILL.md +164 -0
- package/.agent/skills/mcp-management/rules/_sections.md +25 -0
- package/.agent/skills/mcp-management/rules/_template.md +32 -0
- package/.agent/skills/mcp-management/rules/cli-usage.md +146 -0
- package/.agent/skills/mcp-management/rules/engineering-spec.md +501 -0
- package/.agent/skills/mcp-management/rules/protocol.md +159 -0
- package/.agent/skills/media-processing/AGENTS.md +479 -0
- package/.agent/skills/media-processing/SKILL.md +176 -0
- package/.agent/skills/media-processing/rules/_sections.md +15 -0
- package/.agent/skills/media-processing/rules/_template.md +32 -0
- package/.agent/skills/media-processing/rules/engineering-spec.md +452 -0
- package/.agent/skills/media-processing/scripts/convert-video.ts +155 -0
- package/.agent/skills/media-processing/scripts/optimize-image.ts +127 -0
- package/.agent/skills/mobile-design/AGENTS.md +6531 -0
- package/.agent/skills/mobile-design/SKILL.md +165 -0
- package/.agent/skills/mobile-design/rules/_sections.md +45 -0
- package/.agent/skills/mobile-design/rules/_template.md +32 -0
- package/.agent/skills/mobile-design/rules/decision-trees.md +540 -0
- package/.agent/skills/mobile-design/rules/engineering-spec.md +467 -0
- package/.agent/skills/mobile-design/rules/mobile-backend.md +516 -0
- package/.agent/skills/mobile-design/rules/mobile-color-system.md +436 -0
- package/.agent/skills/mobile-design/rules/mobile-debugging.md +146 -0
- package/.agent/skills/mobile-design/rules/mobile-design-thinking.md +381 -0
- package/.agent/skills/mobile-design/rules/mobile-navigation.md +474 -0
- package/.agent/skills/mobile-design/rules/mobile-performance.md +783 -0
- package/.agent/skills/mobile-design/rules/mobile-testing.md +380 -0
- package/.agent/skills/mobile-design/rules/mobile-typography.md +449 -0
- package/.agent/skills/mobile-design/rules/platform-android.md +682 -0
- package/.agent/skills/mobile-design/rules/platform-ios.md +577 -0
- package/.agent/skills/mobile-design/rules/touch-psychology.md +553 -0
- package/.agent/skills/mobile-design/scripts/mobile_audit.ts +309 -0
- package/.agent/skills/mobile-developer/AGENTS.md +904 -0
- package/.agent/skills/mobile-developer/SKILL.md +194 -0
- package/.agent/skills/mobile-developer/rules/_sections.md +75 -0
- package/.agent/skills/mobile-developer/rules/_template.md +32 -0
- package/.agent/skills/mobile-developer/rules/anti-patterns.md +70 -0
- package/.agent/skills/mobile-developer/rules/app-store-optimization.md +319 -0
- package/.agent/skills/mobile-developer/rules/decision-trees.md +545 -0
- package/.agent/skills/mobile-developer/rules/deep-linking.md +441 -0
- package/.agent/skills/mobile-developer/rules/engineering-spec.md +477 -0
- package/.agent/skills/mobile-developer/rules/flutter.md +475 -0
- package/.agent/skills/mobile-developer/rules/mobile-backend.md +516 -0
- package/.agent/skills/mobile-developer/rules/mobile-color-system.md +444 -0
- package/.agent/skills/mobile-developer/rules/mobile-debugging.md +428 -0
- package/.agent/skills/mobile-developer/rules/mobile-design-thinking.md +367 -0
- package/.agent/skills/mobile-developer/rules/mobile-navigation.md +483 -0
- package/.agent/skills/mobile-developer/rules/mobile-performance.md +778 -0
- package/.agent/skills/mobile-developer/rules/mobile-testing.md +382 -0
- package/.agent/skills/mobile-developer/rules/mobile-typography.md +457 -0
- package/.agent/skills/mobile-developer/rules/native.md +572 -0
- package/.agent/skills/mobile-developer/rules/platform-android.md +676 -0
- package/.agent/skills/mobile-developer/rules/platform-ios.md +571 -0
- package/.agent/skills/mobile-developer/rules/push-notifications.md +599 -0
- package/.agent/skills/mobile-developer/rules/react-native.md +422 -0
- package/.agent/skills/mobile-developer/rules/touch-psychology.md +547 -0
- package/.agent/skills/mobile-developer/scripts/mobile_audit.ts +701 -0
- package/.agent/skills/nextjs-pro/AGENTS.md +3932 -0
- package/.agent/skills/nextjs-pro/SKILL.md +171 -0
- package/.agent/skills/nextjs-pro/rules/_sections.md +50 -0
- package/.agent/skills/nextjs-pro/rules/_template.md +32 -0
- package/.agent/skills/nextjs-pro/rules/advanced-event-handler-refs.md +59 -0
- package/.agent/skills/nextjs-pro/rules/advanced-init-once.md +46 -0
- package/.agent/skills/nextjs-pro/rules/advanced-use-latest.md +43 -0
- package/.agent/skills/nextjs-pro/rules/async-api-routes.md +42 -0
- package/.agent/skills/nextjs-pro/rules/async-defer-await.md +84 -0
- package/.agent/skills/nextjs-pro/rules/async-dependencies.md +55 -0
- package/.agent/skills/nextjs-pro/rules/async-parallel.md +32 -0
- package/.agent/skills/nextjs-pro/rules/async-suspense-boundaries.md +103 -0
- package/.agent/skills/nextjs-pro/rules/bundle-barrel-imports.md +63 -0
- package/.agent/skills/nextjs-pro/rules/bundle-conditional.md +35 -0
- package/.agent/skills/nextjs-pro/rules/bundle-defer-third-party.md +53 -0
- package/.agent/skills/nextjs-pro/rules/bundle-dynamic-imports.md +39 -0
- package/.agent/skills/nextjs-pro/rules/bundle-preload.md +54 -0
- package/.agent/skills/nextjs-pro/rules/client-event-listeners.md +78 -0
- package/.agent/skills/nextjs-pro/rules/client-localstorage-schema.md +75 -0
- package/.agent/skills/nextjs-pro/rules/client-passive-event-listeners.md +52 -0
- package/.agent/skills/nextjs-pro/rules/client-swr-dedup.md +60 -0
- package/.agent/skills/nextjs-pro/rules/engineering-spec.md +440 -0
- package/.agent/skills/nextjs-pro/rules/js-batch-dom-css.md +111 -0
- package/.agent/skills/nextjs-pro/rules/js-cache-function-results.md +84 -0
- package/.agent/skills/nextjs-pro/rules/js-cache-property-access.md +32 -0
- package/.agent/skills/nextjs-pro/rules/js-cache-storage.md +74 -0
- package/.agent/skills/nextjs-pro/rules/js-combine-iterations.md +36 -0
- package/.agent/skills/nextjs-pro/rules/js-early-exit.md +54 -0
- package/.agent/skills/nextjs-pro/rules/js-hoist-regexp.md +49 -0
- package/.agent/skills/nextjs-pro/rules/js-index-maps.md +41 -0
- package/.agent/skills/nextjs-pro/rules/js-length-check-first.md +53 -0
- package/.agent/skills/nextjs-pro/rules/js-min-max-loop.md +86 -0
- package/.agent/skills/nextjs-pro/rules/js-set-map-lookups.md +28 -0
- package/.agent/skills/nextjs-pro/rules/js-tosorted-immutable.md +61 -0
- package/.agent/skills/nextjs-pro/rules/rendering-activity.md +30 -0
- package/.agent/skills/nextjs-pro/rules/rendering-animate-svg-wrapper.md +51 -0
- package/.agent/skills/nextjs-pro/rules/rendering-conditional-render.md +44 -0
- package/.agent/skills/nextjs-pro/rules/rendering-content-visibility.md +42 -0
- package/.agent/skills/nextjs-pro/rules/rendering-hoist-jsx.md +50 -0
- package/.agent/skills/nextjs-pro/rules/rendering-hydration-no-flicker.md +86 -0
- package/.agent/skills/nextjs-pro/rules/rendering-hydration-suppress-warning.md +34 -0
- package/.agent/skills/nextjs-pro/rules/rendering-svg-precision.md +32 -0
- package/.agent/skills/nextjs-pro/rules/rendering-usetransition-loading.md +79 -0
- package/.agent/skills/nextjs-pro/rules/rerender-defer-reads.md +43 -0
- package/.agent/skills/nextjs-pro/rules/rerender-dependencies.md +49 -0
- package/.agent/skills/nextjs-pro/rules/rerender-derived-state-no-effect.md +44 -0
- package/.agent/skills/nextjs-pro/rules/rerender-derived-state.md +33 -0
- package/.agent/skills/nextjs-pro/rules/rerender-functional-setstate.md +78 -0
- package/.agent/skills/nextjs-pro/rules/rerender-lazy-state-init.md +62 -0
- package/.agent/skills/nextjs-pro/rules/rerender-memo-with-default-value.md +42 -0
- package/.agent/skills/nextjs-pro/rules/rerender-memo.md +48 -0
- package/.agent/skills/nextjs-pro/rules/rerender-move-effect-to-event.md +49 -0
- package/.agent/skills/nextjs-pro/rules/rerender-simple-expression-in-memo.md +39 -0
- package/.agent/skills/nextjs-pro/rules/rerender-transitions.md +44 -0
- package/.agent/skills/nextjs-pro/rules/rerender-use-ref-transient-values.md +77 -0
- package/.agent/skills/nextjs-pro/rules/schema.json +34 -0
- package/.agent/skills/nextjs-pro/rules/server-after-nonblocking.md +77 -0
- package/.agent/skills/nextjs-pro/rules/server-auth-actions.md +100 -0
- package/.agent/skills/nextjs-pro/rules/server-cache-lru.md +45 -0
- package/.agent/skills/nextjs-pro/rules/server-cache-react.md +80 -0
- package/.agent/skills/nextjs-pro/rules/server-dedup-props.md +69 -0
- package/.agent/skills/nextjs-pro/rules/server-parallel-fetching.md +87 -0
- package/.agent/skills/nextjs-pro/rules/server-serialization.md +42 -0
- package/.agent/skills/nodejs-pro/AGENTS.md +866 -0
- package/.agent/skills/nodejs-pro/SKILL.md +172 -0
- package/.agent/skills/nodejs-pro/rules/_sections.md +50 -0
- package/.agent/skills/nodejs-pro/rules/_template.md +32 -0
- package/.agent/skills/nodejs-pro/rules/architecture-patterns.md +229 -0
- package/.agent/skills/nodejs-pro/rules/async-patterns.md +246 -0
- package/.agent/skills/nodejs-pro/rules/engineering-spec.md +438 -0
- package/.agent/skills/nodejs-pro/rules/error-handling.md +257 -0
- package/.agent/skills/nodejs-pro/rules/framework-selection.md +220 -0
- package/.agent/skills/nodejs-pro/rules/runtime-modules.md +176 -0
- package/.agent/skills/nodejs-pro/rules/testing-strategy.md +266 -0
- package/.agent/skills/nodejs-pro/rules/validation-security.md +205 -0
- package/.agent/skills/observability/AGENTS.md +607 -0
- package/.agent/skills/observability/SKILL.md +178 -0
- package/.agent/skills/observability/rules/_sections.md +15 -0
- package/.agent/skills/observability/rules/_template.md +32 -0
- package/.agent/skills/observability/rules/engineering-spec.md +440 -0
- package/.agent/skills/offensive-sec/AGENTS.md +849 -0
- package/.agent/skills/offensive-sec/SKILL.md +191 -0
- package/.agent/skills/offensive-sec/rules/_sections.md +15 -0
- package/.agent/skills/offensive-sec/rules/_template.md +32 -0
- package/.agent/skills/offensive-sec/rules/engineering-spec.md +470 -0
- package/.agent/skills/perf-optimizer/AGENTS.md +870 -0
- package/.agent/skills/perf-optimizer/SKILL.md +189 -0
- package/.agent/skills/perf-optimizer/rules/_sections.md +15 -0
- package/.agent/skills/perf-optimizer/rules/_template.md +32 -0
- package/.agent/skills/perf-optimizer/rules/backend-patterns.md +312 -0
- package/.agent/skills/perf-optimizer/rules/engineering-spec.md +428 -0
- package/.agent/skills/perf-optimizer/scripts/lighthouse_audit.ts +201 -0
- package/.agent/skills/problem-checker/AGENTS.md +519 -0
- package/.agent/skills/problem-checker/SKILL.md +189 -0
- package/.agent/skills/problem-checker/rules/_sections.md +15 -0
- package/.agent/skills/problem-checker/rules/_template.md +32 -0
- package/.agent/skills/problem-checker/rules/engineering-spec.md +483 -0
- package/.agent/skills/problem-checker/scripts/check_problems.ts +396 -0
- package/.agent/skills/project-planner/AGENTS.md +2698 -0
- package/.agent/skills/project-planner/SKILL.md +166 -0
- package/.agent/skills/project-planner/rules/_sections.md +15 -0
- package/.agent/skills/project-planner/rules/_template.md +32 -0
- package/.agent/skills/project-planner/rules/engineering-spec.md +420 -0
- package/.agent/skills/python-pro/AGENTS.md +1871 -0
- package/.agent/skills/python-pro/SKILL.md +182 -0
- package/.agent/skills/python-pro/rules/_sections.md +50 -0
- package/.agent/skills/python-pro/rules/_template.md +32 -0
- package/.agent/skills/python-pro/rules/async-patterns.md +168 -0
- package/.agent/skills/python-pro/rules/django-patterns.md +194 -0
- package/.agent/skills/python-pro/rules/engineering-spec.md +442 -0
- package/.agent/skills/python-pro/rules/fastapi-patterns.md +179 -0
- package/.agent/skills/python-pro/rules/framework-selection.md +167 -0
- package/.agent/skills/python-pro/rules/project-structure.md +181 -0
- package/.agent/skills/python-pro/rules/testing-patterns.md +212 -0
- package/.agent/skills/python-pro/rules/type-hints.md +159 -0
- package/.agent/skills/react-pro/AGENTS.md +963 -0
- package/.agent/skills/react-pro/SKILL.md +232 -0
- package/.agent/skills/react-pro/rules/_sections.md +40 -0
- package/.agent/skills/react-pro/rules/_template.md +32 -0
- package/.agent/skills/react-pro/rules/component-patterns.md +145 -0
- package/.agent/skills/react-pro/rules/composition-compound.md +82 -0
- package/.agent/skills/react-pro/rules/data-fetching.md +133 -0
- package/.agent/skills/react-pro/rules/engineering-spec.md +453 -0
- package/.agent/skills/react-pro/rules/error-boundary.md +61 -0
- package/.agent/skills/react-pro/rules/file-organization.md +158 -0
- package/.agent/skills/react-pro/rules/hooks-custom.md +61 -0
- package/.agent/skills/react-pro/rules/mui-styling.md +138 -0
- package/.agent/skills/react-pro/rules/patterns.md +24 -0
- package/.agent/skills/react-pro/rules/performance-optimization.md +65 -0
- package/.agent/skills/react-pro/rules/performance.md +137 -0
- package/.agent/skills/react-pro/rules/react19-hooks.md +85 -0
- package/.agent/skills/react-pro/rules/state-management.md +90 -0
- package/.agent/skills/react-pro/rules/testing-patterns.md +52 -0
- package/.agent/skills/registry.json +1251 -0
- package/.agent/skills/security-scanner/AGENTS.md +851 -0
- package/.agent/skills/security-scanner/SKILL.md +182 -0
- package/.agent/skills/security-scanner/rules/_sections.md +15 -0
- package/.agent/skills/security-scanner/rules/_template.md +32 -0
- package/.agent/skills/security-scanner/rules/auth-patterns.md +281 -0
- package/.agent/skills/security-scanner/rules/checklists.md +186 -0
- package/.agent/skills/security-scanner/rules/engineering-spec.md +440 -0
- package/.agent/skills/security-scanner/scripts/security_scan.ts +513 -0
- package/.agent/skills/seo-optimizer/AGENTS.md +839 -0
- package/.agent/skills/seo-optimizer/SKILL.md +180 -0
- package/.agent/skills/seo-optimizer/rules/_sections.md +15 -0
- package/.agent/skills/seo-optimizer/rules/_template.md +32 -0
- package/.agent/skills/seo-optimizer/rules/engineering-spec.md +433 -0
- package/.agent/skills/seo-optimizer/scripts/geo_checker.ts +109 -0
- package/.agent/skills/seo-optimizer/scripts/seo_checker.ts +308 -0
- package/.agent/skills/server-ops/AGENTS.md +643 -0
- package/.agent/skills/server-ops/SKILL.md +194 -0
- package/.agent/skills/server-ops/rules/_sections.md +15 -0
- package/.agent/skills/server-ops/rules/_template.md +32 -0
- package/.agent/skills/server-ops/rules/engineering-spec.md +450 -0
- package/.agent/skills/shell-script/AGENTS.md +499 -0
- package/.agent/skills/shell-script/SKILL.md +205 -0
- package/.agent/skills/shell-script/rules/_sections.md +15 -0
- package/.agent/skills/shell-script/rules/_template.md +32 -0
- package/.agent/skills/shell-script/rules/engineering-spec.md +463 -0
- package/.agent/skills/skill-generator/SKILL.md +147 -0
- package/.agent/skills/smart-router/SKILL.md +95 -0
- package/.agent/skills/studio/AGENTS.md +636 -0
- package/.agent/skills/studio/SKILL.md +178 -0
- package/.agent/skills/studio/data/charts.csv +26 -0
- package/.agent/skills/studio/data/colors.csv +97 -0
- package/.agent/skills/studio/data/icons.csv +101 -0
- package/.agent/skills/studio/data/landing.csv +31 -0
- package/.agent/skills/studio/data/products.csv +97 -0
- package/.agent/skills/studio/data/prompts.csv +24 -0
- package/.agent/skills/studio/data/react-performance.csv +45 -0
- package/.agent/skills/studio/data/stacks/flutter.csv +52 -0
- package/.agent/skills/studio/data/stacks/html-tailwind.csv +56 -0
- package/.agent/skills/studio/data/stacks/jetpack-compose.csv +53 -0
- package/.agent/skills/studio/data/stacks/nextjs.csv +53 -0
- package/.agent/skills/studio/data/stacks/nuxt-ui.csv +51 -0
- package/.agent/skills/studio/data/stacks/nuxtjs.csv +59 -0
- package/.agent/skills/studio/data/stacks/react-native.csv +52 -0
- package/.agent/skills/studio/data/stacks/react.csv +54 -0
- package/.agent/skills/studio/data/stacks/shadcn.csv +61 -0
- package/.agent/skills/studio/data/stacks/svelte.csv +54 -0
- package/.agent/skills/studio/data/stacks/swiftui.csv +51 -0
- package/.agent/skills/studio/data/stacks/vue.csv +50 -0
- package/.agent/skills/studio/data/styles.csv +59 -0
- package/.agent/skills/studio/data/typography.csv +58 -0
- package/.agent/skills/studio/data/ui-reasoning.csv +101 -0
- package/.agent/skills/studio/data/ux-guidelines.csv +100 -0
- package/.agent/skills/studio/data/web-interface.csv +31 -0
- package/.agent/skills/studio/rules/_sections.md +15 -0
- package/.agent/skills/studio/rules/_template.md +32 -0
- package/.agent/skills/studio/rules/engineering-spec.md +455 -0
- package/.agent/skills/studio/scripts/core.ts +345 -0
- package/.agent/skills/studio/scripts/design_system.ts +953 -0
- package/.agent/skills/studio/scripts/search.ts +197 -0
- package/.agent/skills/studio/scripts/types.ts +147 -0
- package/.agent/skills/studio/scripts/utils/component-specs.ts +154 -0
- package/.agent/skills/studio/scripts/utils/config-loader.ts +165 -0
- package/.agent/skills/studio/scripts/utils/css-templates.ts +169 -0
- package/.agent/skills/studio/scripts/utils/css-validator.ts +95 -0
- package/.agent/skills/studio/scripts/utils/csv-loader.ts +52 -0
- package/.agent/skills/studio/scripts/utils/intelligent-overrides.ts +129 -0
- package/.agent/skills/studio/scripts/utils/page-override-formatter.ts +143 -0
- package/.agent/skills/studio/scripts/utils/page-type-detector.ts +124 -0
- package/.agent/skills/studio/scripts/utils/search-cache.ts +165 -0
- package/.agent/skills/studio/scripts/utils/text-utils.ts +44 -0
- package/.agent/skills/system-design/AGENTS.md +597 -0
- package/.agent/skills/system-design/SKILL.md +153 -0
- package/.agent/skills/system-design/rules/_sections.md +15 -0
- package/.agent/skills/system-design/rules/_template.md +32 -0
- package/.agent/skills/system-design/rules/context-discovery.md +117 -0
- package/.agent/skills/system-design/rules/engineering-spec.md +437 -0
- package/.agent/skills/system-design/rules/examples.md +180 -0
- package/.agent/skills/system-design/rules/pattern-selection.md +130 -0
- package/.agent/skills/system-design/rules/patterns-reference.md +110 -0
- package/.agent/skills/system-design/rules/trade-off-analysis.md +169 -0
- package/.agent/skills/tailwind-kit/AGENTS.md +1135 -0
- package/.agent/skills/tailwind-kit/SKILL.md +171 -0
- package/.agent/skills/tailwind-kit/rules/_sections.md +20 -0
- package/.agent/skills/tailwind-kit/rules/_template.md +32 -0
- package/.agent/skills/tailwind-kit/rules/components.md +232 -0
- package/.agent/skills/tailwind-kit/rules/engineering-spec.md +435 -0
- package/.agent/skills/tailwind-kit/rules/responsive.md +221 -0
- package/.agent/skills/tailwind-kit/rules/v4-config.md +72 -0
- package/.agent/skills/test-architect/AGENTS.md +851 -0
- package/.agent/skills/test-architect/SKILL.md +176 -0
- package/.agent/skills/test-architect/rules/_sections.md +15 -0
- package/.agent/skills/test-architect/rules/_template.md +32 -0
- package/.agent/skills/test-architect/rules/engineering-spec.md +434 -0
- package/.agent/skills/test-architect/scripts/test_runner.ts +265 -0
- package/.agent/skills/typescript-expert/AGENTS.md +1045 -0
- package/.agent/skills/typescript-expert/SKILL.md +200 -0
- package/.agent/skills/typescript-expert/rules/_sections.md +20 -0
- package/.agent/skills/typescript-expert/rules/_template.md +32 -0
- package/.agent/skills/typescript-expert/rules/engineering-spec.md +433 -0
- package/.agent/skills/typescript-expert/rules/tsconfig-strict.json +92 -0
- package/.agent/skills/typescript-expert/rules/typescript-cheatsheet.md +407 -0
- package/.agent/skills/typescript-expert/rules/utility-types.ts +264 -0
- package/.agent/skills/typescript-expert/scripts/ts_diagnostic.ts +321 -0
- package/.agent/skills/vercel-deploy/AGENTS.md +490 -0
- package/.agent/skills/vercel-deploy/SKILL.md +175 -0
- package/.agent/skills/vercel-deploy/rules/_sections.md +15 -0
- package/.agent/skills/vercel-deploy/rules/_template.md +32 -0
- package/.agent/skills/vercel-deploy/rules/engineering-spec.md +463 -0
- package/.agent/skills/vercel-deploy/scripts/deploy.sh +310 -0
- package/.agent/workflows/api.md +377 -0
- package/.agent/workflows/autopilot.md +344 -0
- package/.agent/workflows/build.md +338 -0
- package/.agent/workflows/chronicle.md +279 -0
- package/.agent/workflows/cook.md +217 -0
- package/.agent/workflows/diagnose.md +302 -0
- package/.agent/workflows/fix.md +253 -0
- package/.agent/workflows/game.md +329 -0
- package/.agent/workflows/inspect.md +276 -0
- package/.agent/workflows/knowledge.md +212 -0
- package/.agent/workflows/launch.md +345 -0
- package/.agent/workflows/mobile.md +354 -0
- package/.agent/workflows/monitor.md +239 -0
- package/.agent/workflows/optimize.md +269 -0
- package/.agent/workflows/plan.md +278 -0
- package/.agent/workflows/stage.md +286 -0
- package/.agent/workflows/studio.md +276 -0
- package/.agent/workflows/think.md +262 -0
- package/.agent/workflows/validate.md +289 -0
- package/.agentignore +161 -0
- package/.gitattributes +16 -0
- package/CHANGELOG.md +198 -0
- package/LICENSE +40 -0
- package/README.md +173 -0
- package/docs/SKILL_DESIGN_GUIDE.md +561 -0
- package/docs/The-Complete-Guide-to-Building-Skills-for-Claude.md +1207 -0
- package/docs/WORKFLOW_DESIGN_GUIDE.md +325 -0
- package/package.json +33 -0
- package/tsconfig.json +28 -0
|
@@ -0,0 +1,1054 @@
|
|
|
1
|
+
# google-adk-python
|
|
2
|
+
|
|
3
|
+
**Version 1.0.0**
|
|
4
|
+
Engineering
|
|
5
|
+
March 2026
|
|
6
|
+
|
|
7
|
+
> **Note:**
|
|
8
|
+
> This document is for agents and LLMs to follow when working on google-adk-python domain.
|
|
9
|
+
> Optimized for automation and consistency by AI-assisted workflows.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Google ADK Python — AI Agent Development
|
|
14
|
+
|
|
15
|
+
> Code-first. ≤ 5 tools per agent. Typed functions. Deterministic type selection.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Prerequisites
|
|
20
|
+
|
|
21
|
+
**Required:** `pip install google-adk`. Set `GEMINI_API_KEY` or `GOOGLE_CLOUD_PROJECT` + `GOOGLE_CLOUD_LOCATION`.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## When to Use
|
|
26
|
+
|
|
27
|
+
| Situation | Action |
|
|
28
|
+
|-----------|--------|
|
|
29
|
+
| Single agent with tools | Follow quick start + agent type table |
|
|
30
|
+
| Multi-agent coordination | Read `rules/multi-agent.md` |
|
|
31
|
+
| Custom tool creation | Read `rules/tools.md` |
|
|
32
|
+
| Deployment patterns | Read `rules/deployment.md` |
|
|
33
|
+
| Architecture review | Read `rules/engineering-spec.md` |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## System Boundaries
|
|
38
|
+
|
|
39
|
+
| Owned by This Skill | NOT Owned |
|
|
40
|
+
|---------------------|-----------|
|
|
41
|
+
| Agent type selection (4 types) | Python project setup (→ python-pro) |
|
|
42
|
+
| Model selection (3 tiers) | API architecture (→ api-architect) |
|
|
43
|
+
| Tool creation patterns | Prompt engineering (→ ai-artist) |
|
|
44
|
+
| Multi-agent composition | Cloud project config |
|
|
45
|
+
| Deployment guidance | Model hosting |
|
|
46
|
+
|
|
47
|
+
**Expert decision skill:** Produces agent architecture decisions and code patterns. No execution.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Agent Type Selection (Deterministic)
|
|
52
|
+
|
|
53
|
+
| Task Type | Agent Type | When |
|
|
54
|
+
|-----------|-----------|------|
|
|
55
|
+
| Conversational | `LlmAgent` | Unpredictable inputs, dialogue |
|
|
56
|
+
| Pipeline | `SequentialAgent` | Ordered step execution |
|
|
57
|
+
| Fan-out | `ParallelAgent` | Concurrent independent tasks |
|
|
58
|
+
| Iterative | `LoopAgent` | Repeat until condition met |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Model Selection (Cost-Based)
|
|
63
|
+
|
|
64
|
+
| Complexity | Model | Tier |
|
|
65
|
+
|-----------|-------|------|
|
|
66
|
+
| Simple | `gemini-3-flash` | Fast, low cost |
|
|
67
|
+
| Balanced | `gemini-3-pro-low` | Moderate reasoning |
|
|
68
|
+
| Complex | `gemini-3-pro-high` | Deep reasoning |
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Quick Start
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
from google.adk.agents import LlmAgent
|
|
76
|
+
|
|
77
|
+
agent = LlmAgent(
|
|
78
|
+
name="assistant",
|
|
79
|
+
model="gemini-3-flash",
|
|
80
|
+
instruction="You are a helpful assistant."
|
|
81
|
+
)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Tool Creation (Mandatory Contract)
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
def calculate_roi(revenue: float, cost: float) -> float:
|
|
90
|
+
"""Calculate return on investment."""
|
|
91
|
+
return ((revenue - cost) / cost) * 100
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Rules:** Typed parameters + docstring + return type annotation. Always.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Multi-Agent Rules
|
|
99
|
+
|
|
100
|
+
| Rule | Limit |
|
|
101
|
+
|------|-------|
|
|
102
|
+
| Max tools per agent | 5 |
|
|
103
|
+
| Max sub-agents per coordinator | 5 |
|
|
104
|
+
| Tool count > 5 | Split into sub-agents |
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
coordinator = LlmAgent(
|
|
108
|
+
name="Coordinator",
|
|
109
|
+
instruction="Delegate to specialists.",
|
|
110
|
+
sub_agents=[researcher, writer] # ≤ 5
|
|
111
|
+
)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Error Taxonomy
|
|
117
|
+
|
|
118
|
+
| Code | Recoverable | Trigger |
|
|
119
|
+
|------|-------------|---------|
|
|
120
|
+
| `ERR_INVALID_REQUEST_TYPE` | No | Request type not supported |
|
|
121
|
+
| `ERR_MISSING_TASK_TYPE` | Yes | Task type not provided |
|
|
122
|
+
| `ERR_INVALID_COMPLEXITY` | Yes | Not simple/balanced/complex |
|
|
123
|
+
| `ERR_REFERENCE_NOT_FOUND` | No | Reference file missing |
|
|
124
|
+
| `ERR_PACKAGE_MISSING` | Yes | google-adk not installed |
|
|
125
|
+
| `WARN_TOOL_LIMIT` | Yes | Tool count exceeds 20 |
|
|
126
|
+
|
|
127
|
+
**Zero internal retries.** Deterministic; same context = same pattern.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Anti-Patterns
|
|
132
|
+
|
|
133
|
+
| ❌ Don't | ✅ Do |
|
|
134
|
+
|---------|-------|
|
|
135
|
+
| Use pro-high for simple tasks | Match complexity to model tier |
|
|
136
|
+
| Put > 5 tools on one agent | Split into coordinator + specialists |
|
|
137
|
+
| Skip type annotations on tools | Typed params + docstring + return type |
|
|
138
|
+
| Use LlmAgent for pipelines | SequentialAgent for ordered steps |
|
|
139
|
+
| Hardcode API keys | Use environment variables |
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 📑 Content Map
|
|
144
|
+
|
|
145
|
+
| File | Description | When to Read |
|
|
146
|
+
|------|-------------|--------------|
|
|
147
|
+
| [multi-agent.md](rules/multi-agent.md) | Multi-agent patterns | Agent composition |
|
|
148
|
+
| [tools.md](rules/tools.md) | Tool integration | Custom tools |
|
|
149
|
+
| [deployment.md](rules/deployment.md) | Production deploy | Deployment |
|
|
150
|
+
| [engineering-spec.md](rules/engineering-spec.md) | Full engineering spec | Architecture review |
|
|
151
|
+
|
|
152
|
+
**Selective reading:** Read ONLY files relevant to the request.
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## 🔗 Related
|
|
157
|
+
|
|
158
|
+
| Item | Type | Purpose |
|
|
159
|
+
|------|------|---------|
|
|
160
|
+
| `python-pro` | Skill | Python patterns |
|
|
161
|
+
| `api-architect` | Skill | API design |
|
|
162
|
+
| `ai-artist` | Skill | Prompt engineering |
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Detailed Rules
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
### Rule: deployment
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
title: Deployment Patterns
|
|
179
|
+
impact: MEDIUM
|
|
180
|
+
tags: google-adk-python
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
# Deployment Patterns
|
|
184
|
+
|
|
185
|
+
> Deploy agents to Cloud Run, Vertex AI, or custom infrastructure.
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Cloud Run
|
|
190
|
+
|
|
191
|
+
```dockerfile
|
|
192
|
+
# Dockerfile
|
|
193
|
+
FROM python:3.11-slim
|
|
194
|
+
WORKDIR /app
|
|
195
|
+
COPY requirements.txt .
|
|
196
|
+
RUN pip install -r requirements.txt
|
|
197
|
+
COPY . .
|
|
198
|
+
CMD ["python", "agent_server.py"]
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
```python
|
|
202
|
+
# agent_server.py
|
|
203
|
+
from fastapi import FastAPI
|
|
204
|
+
from google.adk.agents import LlmAgent
|
|
205
|
+
|
|
206
|
+
app = FastAPI()
|
|
207
|
+
|
|
208
|
+
agent = LlmAgent(
|
|
209
|
+
name="api_agent",
|
|
210
|
+
model="gemini-3-flash",
|
|
211
|
+
instruction="Helpful assistant."
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
@app.post("/chat")
|
|
215
|
+
async def chat(message: str):
|
|
216
|
+
return {"response": agent.run(message)}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Deploy
|
|
221
|
+
docker build -t my-agent .
|
|
222
|
+
gcloud run deploy my-agent \
|
|
223
|
+
--image my-agent \
|
|
224
|
+
--region us-central1 \
|
|
225
|
+
--set-env-vars GEMINI_API_KEY=$GEMINI_API_KEY
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Vertex AI Agent Engine
|
|
231
|
+
|
|
232
|
+
```python
|
|
233
|
+
# Managed infrastructure with:
|
|
234
|
+
# - Scalable hosting
|
|
235
|
+
# - Monitoring and logging
|
|
236
|
+
# - Version management
|
|
237
|
+
# - Production-ready infra
|
|
238
|
+
|
|
239
|
+
from google.cloud import aiplatform
|
|
240
|
+
|
|
241
|
+
aiplatform.init(project="my-project", location="us-central1")
|
|
242
|
+
|
|
243
|
+
# Deploy agent to Vertex AI
|
|
244
|
+
# (Follow Vertex AI Agent Builder docs)
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Local Development
|
|
250
|
+
|
|
251
|
+
```python
|
|
252
|
+
if __name__ == "__main__":
|
|
253
|
+
agent = LlmAgent(
|
|
254
|
+
name="dev_agent",
|
|
255
|
+
model="gemini-3-flash",
|
|
256
|
+
instruction="Development assistant."
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
# Interactive loop
|
|
260
|
+
while True:
|
|
261
|
+
user_input = input("You: ")
|
|
262
|
+
if user_input.lower() == "quit":
|
|
263
|
+
break
|
|
264
|
+
response = agent.run(user_input)
|
|
265
|
+
print(f"Agent: {response}")
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Environment Variables
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
# Required
|
|
274
|
+
GEMINI_API_KEY=your_api_key
|
|
275
|
+
|
|
276
|
+
# OR for Vertex AI
|
|
277
|
+
GOOGLE_CLOUD_PROJECT=your_project
|
|
278
|
+
GOOGLE_CLOUD_LOCATION=us-central1
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Health Check
|
|
284
|
+
|
|
285
|
+
```python
|
|
286
|
+
@app.get("/health")
|
|
287
|
+
async def health():
|
|
288
|
+
return {"status": "healthy"}
|
|
289
|
+
|
|
290
|
+
@app.get("/ready")
|
|
291
|
+
async def ready():
|
|
292
|
+
# Check agent is ready
|
|
293
|
+
try:
|
|
294
|
+
agent.run("test")
|
|
295
|
+
return {"status": "ready"}
|
|
296
|
+
except Exception as e:
|
|
297
|
+
return {"status": "not ready", "error": str(e)}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
## Best Practices
|
|
303
|
+
|
|
304
|
+
| Practice | Application |
|
|
305
|
+
|----------|-------------|
|
|
306
|
+
| **Health checks** | Implement /health and /ready |
|
|
307
|
+
| **Env vars** | Never hardcode API keys |
|
|
308
|
+
| **Logging** | Log agent requests/responses |
|
|
309
|
+
| **Monitoring** | Track latency, errors, usage |
|
|
310
|
+
| **Scaling** | Use Cloud Run auto-scaling |
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
318
|
+
### Rule: engineering-spec
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
title: Google ADK Python — Engineering Specification
|
|
322
|
+
impact: MEDIUM
|
|
323
|
+
tags: google-adk-python
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
# Google ADK Python — Engineering Specification
|
|
327
|
+
|
|
328
|
+
> Production-grade specification for building AI agents with Google's Agent Development Kit at FAANG scale.
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## 1. Overview
|
|
333
|
+
|
|
334
|
+
Google ADK Python provides structured decision frameworks for building, composing, and deploying AI agents using Google's Agent Development Kit: agent type selection (4 types), model selection (3 tiers), tool integration (built-in + custom), multi-agent orchestration (delegation + sub-agents), and deployment patterns. The skill operates as an expert knowledge base with 3 reference files — it produces agent architecture decisions and code patterns. It does not execute agents, configure cloud projects, or manage API keys.
|
|
335
|
+
|
|
336
|
+
**Contract Version:** 2.0.0
|
|
337
|
+
**Backward Compatibility:** breaking (first hardened version)
|
|
338
|
+
**Breaking Changes:** None — new spec for first hardening
|
|
339
|
+
|
|
340
|
+
---
|
|
341
|
+
|
|
342
|
+
## 2. Problem Statement
|
|
343
|
+
|
|
344
|
+
AI agent development at scale faces four quantified problems:
|
|
345
|
+
|
|
346
|
+
| Problem | Measurement | Impact |
|
|
347
|
+
|---------|-------------|--------|
|
|
348
|
+
| Wrong agent type selection | 40% of multi-step workflows use LlmAgent instead of SequentialAgent | Unreliable execution order |
|
|
349
|
+
| Over-powered model choice | 55% of simple tasks use pro-high when flash suffices | 10x cost increase |
|
|
350
|
+
| Monolithic agent design | 45% of agents combine all responsibilities | Cannot scale or test independently |
|
|
351
|
+
| Missing tool type hints | 50% of custom tools lack proper signatures | LLM cannot infer parameters |
|
|
352
|
+
|
|
353
|
+
Google ADK Python eliminates these with deterministic agent type selection, cost-based model routing, modular multi-agent patterns, and strict tool function contracts.
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## 3. Design Goals
|
|
358
|
+
|
|
359
|
+
| ID | Goal | Measurable Constraint |
|
|
360
|
+
|----|------|-----------------------|
|
|
361
|
+
| G1 | Agent type selection | Task type → agent type (4 types, deterministic mapping) |
|
|
362
|
+
| G2 | Model cost routing | Complexity → model tier (3 tiers, fixed rules) |
|
|
363
|
+
| G3 | Modular agent design | Max 5 tools per agent; delegate for more |
|
|
364
|
+
| G4 | Tool function contracts | Typed parameters, docstring, return type mandatory |
|
|
365
|
+
| G5 | Multi-agent composition | Coordinator + specialist pattern with ≤ 5 sub-agents |
|
|
366
|
+
| G6 | Code-first definition | All agents defined in Python; no JSON/YAML config |
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
## 4. Non-Goals
|
|
371
|
+
|
|
372
|
+
| ID | Excluded | Rationale |
|
|
373
|
+
|----|----------|-----------|
|
|
374
|
+
| NG1 | Python project setup | Owned by `python-pro` skill |
|
|
375
|
+
| NG2 | API architecture | Owned by `api-architect` skill |
|
|
376
|
+
| NG3 | Google Cloud project configuration | Infrastructure concern |
|
|
377
|
+
| NG4 | LLM prompt engineering | Owned by `ai-artist` skill |
|
|
378
|
+
| NG5 | Agent hosting/serving | Deployment infrastructure |
|
|
379
|
+
| NG6 | Fine-tuning models | ML engineering concern |
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## 5. System Boundaries
|
|
384
|
+
|
|
385
|
+
| Boundary | Owned | Not Owned |
|
|
386
|
+
|----------|-------|-----------|
|
|
387
|
+
| Agent type selection (4 types) | Decision criteria | Agent execution runtime |
|
|
388
|
+
| Model selection (3 tiers) | Cost/complexity routing | Model hosting |
|
|
389
|
+
| Tool integration (built-in + custom) | Tool creation patterns | Tool implementation logic |
|
|
390
|
+
| Multi-agent orchestration | Composition patterns | Agent communication infrastructure |
|
|
391
|
+
| Deployment patterns | Architecture guidance | Cloud deployment execution |
|
|
392
|
+
| Quick start templates | Code patterns | Package installation |
|
|
393
|
+
|
|
394
|
+
**Side-effect boundary:** Google ADK Python produces agent architecture decisions and code patterns. It does not execute agents, install packages, or configure cloud services.
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## 6. Integration Model
|
|
399
|
+
|
|
400
|
+
### 6.1 Agent Contract
|
|
401
|
+
|
|
402
|
+
#### Input Schema
|
|
403
|
+
|
|
404
|
+
```
|
|
405
|
+
Request_Type: string # "agent-type" | "model-select" | "tool-create" |
|
|
406
|
+
# "multi-agent" | "deployment" | "quick-start" | "full-guide"
|
|
407
|
+
Context: {
|
|
408
|
+
task_type: string # "conversational" | "pipeline" | "fan-out" | "iterative"
|
|
409
|
+
complexity: string # "simple" | "balanced" | "complex"
|
|
410
|
+
tool_count: number # Number of tools needed
|
|
411
|
+
needs_sub_agents: boolean # Whether multi-agent is needed
|
|
412
|
+
target_environment: string | null # "local" | "cloud-run" | "vertex-ai"
|
|
413
|
+
}
|
|
414
|
+
contract_version: string # "2.0.0"
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
#### Output Schema
|
|
418
|
+
|
|
419
|
+
```
|
|
420
|
+
Status: "success" | "error"
|
|
421
|
+
Data: {
|
|
422
|
+
agent_type: {
|
|
423
|
+
type: string # "LlmAgent" | "SequentialAgent" | "ParallelAgent" | "LoopAgent"
|
|
424
|
+
rationale: string
|
|
425
|
+
code_template: string # Python code snippet
|
|
426
|
+
} | null
|
|
427
|
+
model: {
|
|
428
|
+
name: string # "gemini-3-flash" | "gemini-3-pro-low" | "gemini-3-pro-high"
|
|
429
|
+
tier: string # "fast" | "balanced" | "reasoning"
|
|
430
|
+
rationale: string
|
|
431
|
+
} | null
|
|
432
|
+
tool: {
|
|
433
|
+
pattern: string # "function" | "built-in" | "mcp"
|
|
434
|
+
code_template: string
|
|
435
|
+
requirements: Array<string> # typed params, docstring, return type
|
|
436
|
+
} | null
|
|
437
|
+
multi_agent: {
|
|
438
|
+
pattern: string # "coordinator-specialist" | "sequential-pipeline" | "parallel-fan-out"
|
|
439
|
+
max_sub_agents: number # Always ≤ 5
|
|
440
|
+
code_template: string
|
|
441
|
+
} | null
|
|
442
|
+
deployment: {
|
|
443
|
+
target: string
|
|
444
|
+
steps: Array<string>
|
|
445
|
+
} | null
|
|
446
|
+
reference_file: string | null
|
|
447
|
+
metadata: {
|
|
448
|
+
contract_version: string
|
|
449
|
+
backward_compatibility: string
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
Error: ErrorSchema | null
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
#### Error Schema
|
|
456
|
+
|
|
457
|
+
```
|
|
458
|
+
Code: string # From Error Taxonomy (Section 11)
|
|
459
|
+
Message: string
|
|
460
|
+
Request_Type: string
|
|
461
|
+
Recoverable: boolean
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
#### Deterministic Guarantees
|
|
465
|
+
|
|
466
|
+
- Agent type selection is deterministic: conversational → LlmAgent, pipeline → SequentialAgent, fan-out → ParallelAgent, iterative → LoopAgent.
|
|
467
|
+
- Model selection is deterministic: simple → gemini-3-flash, balanced → gemini-3-pro-low, complex → gemini-3-pro-high.
|
|
468
|
+
- Tool count > 5 → multi-agent with delegation.
|
|
469
|
+
- Sub-agent count ≤ 5 per coordinator.
|
|
470
|
+
- Custom tools always require: typed parameters, docstring, return type annotation.
|
|
471
|
+
- Code patterns always use `from google.adk.agents import` (never raw API).
|
|
472
|
+
|
|
473
|
+
#### What Agents May Assume
|
|
474
|
+
|
|
475
|
+
- Agent type maps directly from task type.
|
|
476
|
+
- Model tier maps directly from complexity.
|
|
477
|
+
- Code templates are syntactically valid Python.
|
|
478
|
+
- Tool patterns follow Google ADK conventions.
|
|
479
|
+
|
|
480
|
+
#### What Agents Must NOT Assume
|
|
481
|
+
|
|
482
|
+
- `google-adk` package is installed.
|
|
483
|
+
- API keys or cloud credentials are configured.
|
|
484
|
+
- Agents will execute successfully (depends on model availability).
|
|
485
|
+
- Custom tools will produce correct results (logic is caller's responsibility).
|
|
486
|
+
|
|
487
|
+
#### Side-Effect Boundaries
|
|
488
|
+
|
|
489
|
+
| Operation | Side Effects |
|
|
490
|
+
|-----------|-------------|
|
|
491
|
+
| Agent type select | None; decision output |
|
|
492
|
+
| Model select | None; recommendation |
|
|
493
|
+
| Tool create | None; code template |
|
|
494
|
+
| Multi-agent | None; composition pattern |
|
|
495
|
+
| Quick start | None; code template |
|
|
496
|
+
| Deployment | None; architecture guidance |
|
|
497
|
+
|
|
498
|
+
### 6.2 Workflow Contract
|
|
499
|
+
|
|
500
|
+
#### Invocation Pattern
|
|
501
|
+
|
|
502
|
+
```
|
|
503
|
+
1. Define task type, complexity, tool count
|
|
504
|
+
2. Invoke agent-type for agent selection
|
|
505
|
+
3. Invoke model-select for cost-appropriate model
|
|
506
|
+
4. Invoke tool-create for custom tools (if needed)
|
|
507
|
+
5. Invoke multi-agent for composition (if tool_count > 5 or needs_sub_agents)
|
|
508
|
+
6. Invoke deployment for production architecture
|
|
509
|
+
7. Implement agent (caller's responsibility)
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
#### Execution Guarantees
|
|
513
|
+
|
|
514
|
+
- Each invocation produces a complete recommendation with code template.
|
|
515
|
+
- No dependencies between request types (can invoke any individually).
|
|
516
|
+
|
|
517
|
+
#### Failure Propagation Model
|
|
518
|
+
|
|
519
|
+
| Failure Severity | Propagation | Workflow Action |
|
|
520
|
+
|-----------------|-------------|-----------------|
|
|
521
|
+
| Invalid request type | Return error to caller | Use supported type |
|
|
522
|
+
| Missing task type | Return error to caller | Supply task type |
|
|
523
|
+
| Invalid complexity | Return error to caller | Use simple/balanced/complex |
|
|
524
|
+
| Tool count > 20 | Return warning | Split into sub-agents |
|
|
525
|
+
|
|
526
|
+
#### Retry Boundaries
|
|
527
|
+
|
|
528
|
+
- Zero internal retries. Deterministic output.
|
|
529
|
+
|
|
530
|
+
#### Isolation Model
|
|
531
|
+
|
|
532
|
+
- Each invocation is stateless and independent.
|
|
533
|
+
|
|
534
|
+
#### Idempotency Expectations
|
|
535
|
+
|
|
536
|
+
| Operation | Idempotent | Notes |
|
|
537
|
+
|-----------|-----------|-------|
|
|
538
|
+
| Agent type | Yes | Same task_type = same agent |
|
|
539
|
+
| Model select | Yes | Same complexity = same model |
|
|
540
|
+
| Tool create | Yes | Same input = same template |
|
|
541
|
+
| Multi-agent | Yes | Same context = same pattern |
|
|
542
|
+
| Deployment | Yes | Same target = same steps |
|
|
543
|
+
|
|
544
|
+
---
|
|
545
|
+
|
|
546
|
+
## 7. Execution Model
|
|
547
|
+
|
|
548
|
+
### 2-Phase Lifecycle
|
|
549
|
+
|
|
550
|
+
| Phase | Action | Output |
|
|
551
|
+
|-------|--------|--------|
|
|
552
|
+
| **Parse** | Validate request type, task type, complexity | Validated input or error |
|
|
553
|
+
| **Emit** | Generate pattern recommendation with code template | Complete output schema |
|
|
554
|
+
|
|
555
|
+
All phases synchronous. No async pipeline.
|
|
556
|
+
|
|
557
|
+
---
|
|
558
|
+
|
|
559
|
+
## 8. Deterministic Design Principles
|
|
560
|
+
|
|
561
|
+
| Principle | Enforcement |
|
|
562
|
+
|-----------|-------------|
|
|
563
|
+
| Fixed agent type mapping | conversational → LlmAgent, pipeline → Sequential, fan-out → Parallel, iterative → Loop |
|
|
564
|
+
| Fixed model routing | simple → flash, balanced → pro-low, complex → pro-high |
|
|
565
|
+
| Fixed tool limit | ≤ 5 tools per agent; > 5 → multi-agent delegation |
|
|
566
|
+
| Fixed sub-agent limit | ≤ 5 sub-agents per coordinator |
|
|
567
|
+
| Mandatory tool contract | Typed params + docstring + return type |
|
|
568
|
+
| Code-first | Python definitions; no JSON/YAML agent config |
|
|
569
|
+
| ADK imports only | `from google.adk.agents import`; never raw REST API |
|
|
570
|
+
|
|
571
|
+
---
|
|
572
|
+
|
|
573
|
+
## 9. State & Idempotency Model
|
|
574
|
+
|
|
575
|
+
Stateless. Fully idempotent. No persistent state.
|
|
576
|
+
|
|
577
|
+
---
|
|
578
|
+
|
|
579
|
+
## 10. Failure Handling Strategy
|
|
580
|
+
|
|
581
|
+
| Failure Class | Behavior | Caller Recovery |
|
|
582
|
+
|---------------|----------|-----------------|
|
|
583
|
+
| Unknown request type | Return `ERR_INVALID_REQUEST_TYPE` | Use supported type |
|
|
584
|
+
| Missing task type | Return `ERR_MISSING_TASK_TYPE` | Supply task type |
|
|
585
|
+
| Invalid complexity | Return `ERR_INVALID_COMPLEXITY` | Use simple/balanced/complex |
|
|
586
|
+
| Tool count exceeds 20 | Return `WARN_TOOL_LIMIT` | Split into sub-agents |
|
|
587
|
+
| Reference file missing | Return `ERR_REFERENCE_NOT_FOUND` | Verify installation |
|
|
588
|
+
| Package not installed | Return `ERR_PACKAGE_MISSING` | `pip install google-adk` |
|
|
589
|
+
|
|
590
|
+
**Invariant:** Every failure returns a structured error. No partial code templates.
|
|
591
|
+
|
|
592
|
+
---
|
|
593
|
+
|
|
594
|
+
## 11. Error Taxonomy
|
|
595
|
+
|
|
596
|
+
| Code | Category | Recoverable | Description |
|
|
597
|
+
|------|----------|-------------|-------------|
|
|
598
|
+
| `ERR_INVALID_REQUEST_TYPE` | Validation | No | Request type not supported |
|
|
599
|
+
| `ERR_MISSING_TASK_TYPE` | Validation | Yes | Task type not provided |
|
|
600
|
+
| `ERR_INVALID_COMPLEXITY` | Validation | Yes | Complexity not simple/balanced/complex |
|
|
601
|
+
| `ERR_REFERENCE_NOT_FOUND` | Infrastructure | No | Reference file missing |
|
|
602
|
+
| `ERR_PACKAGE_MISSING` | Infrastructure | Yes | google-adk not installed |
|
|
603
|
+
| `WARN_TOOL_LIMIT` | Advisory | Yes | Tool count exceeds 20 |
|
|
604
|
+
|
|
605
|
+
---
|
|
606
|
+
|
|
607
|
+
## 12. Timeout & Retry Policy
|
|
608
|
+
|
|
609
|
+
| Parameter | Default | Maximum | Rationale |
|
|
610
|
+
|-----------|---------|---------|-----------|
|
|
611
|
+
| Decision timeout | N/A | N/A | Synchronous; < 50ms |
|
|
612
|
+
| Internal retries | Zero | Zero | Deterministic output |
|
|
613
|
+
|
|
614
|
+
---
|
|
615
|
+
|
|
616
|
+
## 13. Observability & Logging Schema
|
|
617
|
+
|
|
618
|
+
### Log Entry Format
|
|
619
|
+
|
|
620
|
+
```json
|
|
621
|
+
{
|
|
622
|
+
"trace_id": "uuid",
|
|
623
|
+
"skill_name": "google-adk-python",
|
|
624
|
+
"contract_version": "2.0.0",
|
|
625
|
+
"execution_id": "uuid",
|
|
626
|
+
"timestamp": "ISO-8601",
|
|
627
|
+
"request_type": "string",
|
|
628
|
+
"task_type": "string|null",
|
|
629
|
+
"complexity": "string|null",
|
|
630
|
+
"agent_type_selected": "string|null",
|
|
631
|
+
"model_selected": "string|null",
|
|
632
|
+
"tool_count": "number|null",
|
|
633
|
+
"status": "success|error",
|
|
634
|
+
"error_code": "string|null",
|
|
635
|
+
"duration_ms": "number"
|
|
636
|
+
}
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
### Required Log Points
|
|
640
|
+
|
|
641
|
+
| Event | Log Level | Fields |
|
|
642
|
+
|-------|-----------|--------|
|
|
643
|
+
| Agent type selected | INFO | agent_type_selected, task_type |
|
|
644
|
+
| Model selected | INFO | model_selected, complexity |
|
|
645
|
+
| Tool limit warning | WARN | tool_count |
|
|
646
|
+
| Decision failed | ERROR | error_code, message |
|
|
647
|
+
|
|
648
|
+
### Metrics
|
|
649
|
+
|
|
650
|
+
| Metric | Type | Unit |
|
|
651
|
+
|--------|------|------|
|
|
652
|
+
| `googleadk.decision.duration` | Histogram | ms |
|
|
653
|
+
| `googleadk.agent_type.distribution` | Counter | per type |
|
|
654
|
+
| `googleadk.model.distribution` | Counter | per model |
|
|
655
|
+
| `googleadk.tool_count.distribution` | Histogram | per invocation |
|
|
656
|
+
|
|
657
|
+
---
|
|
658
|
+
|
|
659
|
+
## 14. Security & Trust Model
|
|
660
|
+
|
|
661
|
+
### Data Handling
|
|
662
|
+
|
|
663
|
+
- Google ADK Python does not access API keys, credentials, or cloud projects.
|
|
664
|
+
- Code templates contain no secrets; API key configuration is caller's responsibility.
|
|
665
|
+
- Model names are public identifiers.
|
|
666
|
+
|
|
667
|
+
### Credential Safety
|
|
668
|
+
|
|
669
|
+
| Rule | Enforcement |
|
|
670
|
+
|------|-------------|
|
|
671
|
+
| No API keys in code templates | Templates use env vars: `GEMINI_API_KEY` |
|
|
672
|
+
| No cloud project IDs in templates | Templates use env vars: `GOOGLE_CLOUD_PROJECT` |
|
|
673
|
+
|
|
674
|
+
---
|
|
675
|
+
|
|
676
|
+
## 15. Scalability Model
|
|
677
|
+
|
|
678
|
+
| Dimension | Constraint | Mitigation |
|
|
679
|
+
|-----------|-----------|------------|
|
|
680
|
+
| Throughput | CPU-bound decision tree | < 50ms; scales linearly |
|
|
681
|
+
| Concurrency | Stateless invocations | Unlimited parallel |
|
|
682
|
+
| Reference storage | 3 files (~10 KB total) | Static; no growth |
|
|
683
|
+
| Memory per invocation | < 1 MB | No accumulation |
|
|
684
|
+
| Network | Zero network calls | No external dependency |
|
|
685
|
+
|
|
686
|
+
---
|
|
687
|
+
|
|
688
|
+
## 16. Concurrency Model
|
|
689
|
+
|
|
690
|
+
Fully parallel. No shared state. No coordination required.
|
|
691
|
+
|
|
692
|
+
---
|
|
693
|
+
|
|
694
|
+
## 17. Resource Lifecycle Management
|
|
695
|
+
|
|
696
|
+
All resources scoped to invocation. No persistent handles.
|
|
697
|
+
|
|
698
|
+
---
|
|
699
|
+
|
|
700
|
+
## 18. Performance Constraints
|
|
701
|
+
|
|
702
|
+
| Operation | P50 Target | P99 Target | Hard Limit |
|
|
703
|
+
|-----------|-----------|-----------|------------|
|
|
704
|
+
| Agent type selection | < 2 ms | < 5 ms | 20 ms |
|
|
705
|
+
| Full guide | < 10 ms | < 30 ms | 50 ms |
|
|
706
|
+
| Code template | ≤ 500 chars | ≤ 2,000 chars | 3,000 chars |
|
|
707
|
+
| Output size | ≤ 1,000 chars | ≤ 3,000 chars | 5,000 chars |
|
|
708
|
+
|
|
709
|
+
---
|
|
710
|
+
|
|
711
|
+
## 19. Operational Risks
|
|
712
|
+
|
|
713
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
714
|
+
|------|-----------|--------|------------|
|
|
715
|
+
| ADK API breaking changes | Medium | Templates incompatible | Version-pinned import patterns |
|
|
716
|
+
| Model name deprecation | Medium | Template fails | Fixed model tier mapping |
|
|
717
|
+
| Over-scoped agents | Medium | Poor performance | ≤ 5 tools/agent rule |
|
|
718
|
+
| Missing tool annotations | High | LLM cannot call tool | Mandatory typed params + docstring |
|
|
719
|
+
| Cloud auth misconfiguration | Medium | Agent fails to start | Templates use env vars only |
|
|
720
|
+
|
|
721
|
+
---
|
|
722
|
+
|
|
723
|
+
## 20. Compliance with skill-design-guide.md
|
|
724
|
+
|
|
725
|
+
| Requirement | Status | Evidence |
|
|
726
|
+
|-------------|--------|----------|
|
|
727
|
+
| YAML frontmatter complete | ✅ | name, description, metadata with category, version, triggers, coordinates_with, success_metrics |
|
|
728
|
+
| SKILL.md < 200 lines | ✅ | Entry point under 200 lines |
|
|
729
|
+
| Prerequisites documented | ✅ | google-adk, API key or Cloud credentials |
|
|
730
|
+
| When to Use section | ✅ | Situation-based routing table |
|
|
731
|
+
| Core content matches skill type | ✅ | Expert type: decision trees, code patterns |
|
|
732
|
+
| Troubleshooting section | ✅ | Anti-patterns table |
|
|
733
|
+
| Related section | ✅ | Cross-links to python-pro, api-architect |
|
|
734
|
+
| Content Map for multi-file | ✅ | Links to 3 reference files + engineering-spec.md |
|
|
735
|
+
| Contract versioning | ✅ | contract_version, backward_compatibility, breaking_changes |
|
|
736
|
+
| Compliance matrix structured | ✅ | This table with ✅/❌ + evidence |
|
|
737
|
+
|
|
738
|
+
---
|
|
739
|
+
|
|
740
|
+
## 21. Production Readiness Checklist
|
|
741
|
+
|
|
742
|
+
| Category | Check | Status |
|
|
743
|
+
|----------|-------|--------|
|
|
744
|
+
| **Functionality** | 4 agent types with deterministic selection | ✅ |
|
|
745
|
+
| **Functionality** | 3 model tiers with cost-based routing | ✅ |
|
|
746
|
+
| **Functionality** | Tool creation patterns (function + built-in) | ✅ |
|
|
747
|
+
| **Functionality** | Multi-agent composition (≤ 5 sub-agents) | ✅ |
|
|
748
|
+
| **Functionality** | Deployment guidance (local/cloud-run/vertex-ai) | ✅ |
|
|
749
|
+
| **Functionality** | Quick start code template | ✅ |
|
|
750
|
+
| **Contracts** | Input/output/error schemas in pseudo-schema format | ✅ |
|
|
751
|
+
| **Contracts** | Contract versioning with semver | ✅ |
|
|
752
|
+
| **Failure** | Error taxonomy with 6 categorized codes | ✅ |
|
|
753
|
+
| **Failure** | No partial code templates on error | ✅ |
|
|
754
|
+
| **Failure** | Zero internal retries | ✅ |
|
|
755
|
+
| **Determinism** | Fixed type mapping, fixed model routing, fixed tool limits | ✅ |
|
|
756
|
+
| **Security** | No credentials in templates | ✅ |
|
|
757
|
+
| **Observability** | Structured log schema with 5 mandatory fields | ✅ |
|
|
758
|
+
| **Observability** | 4 metrics defined | ✅ |
|
|
759
|
+
| **Performance** | P50/P99 targets for all operations | ✅ |
|
|
760
|
+
| **Scalability** | Stateless; unlimited parallel | ✅ |
|
|
761
|
+
| **Compliance** | All skill-design-guide.md sections mapped with evidence | ✅ |
|
|
762
|
+
|
|
763
|
+
---
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
---
|
|
768
|
+
|
|
769
|
+
### Rule: multi-agent
|
|
770
|
+
|
|
771
|
+
---
|
|
772
|
+
title: Multi-Agent Orchestration
|
|
773
|
+
impact: MEDIUM
|
|
774
|
+
tags: google-adk-python
|
|
775
|
+
---
|
|
776
|
+
|
|
777
|
+
# Multi-Agent Orchestration
|
|
778
|
+
|
|
779
|
+
> Coordinate specialized agents for complex tasks.
|
|
780
|
+
|
|
781
|
+
---
|
|
782
|
+
|
|
783
|
+
## Coordinator Pattern
|
|
784
|
+
|
|
785
|
+
```python
|
|
786
|
+
from google.adk.agents import LlmAgent
|
|
787
|
+
from google.adk.tools import google_search
|
|
788
|
+
|
|
789
|
+
# Specialized agents
|
|
790
|
+
researcher = LlmAgent(
|
|
791
|
+
name="Researcher",
|
|
792
|
+
model="gemini-3-flash",
|
|
793
|
+
instruction="Research topics thoroughly. Provide detailed summaries with sources.",
|
|
794
|
+
tools=[google_search]
|
|
795
|
+
)
|
|
796
|
+
|
|
797
|
+
writer = LlmAgent(
|
|
798
|
+
name="Writer",
|
|
799
|
+
model="gemini-3-flash",
|
|
800
|
+
instruction="Write clear, engaging content."
|
|
801
|
+
)
|
|
802
|
+
|
|
803
|
+
editor = LlmAgent(
|
|
804
|
+
name="Editor",
|
|
805
|
+
model="gemini-3-flash",
|
|
806
|
+
instruction="Review and improve writing quality."
|
|
807
|
+
)
|
|
808
|
+
|
|
809
|
+
# Coordinator delegates to specialists
|
|
810
|
+
coordinator = LlmAgent(
|
|
811
|
+
name="Coordinator",
|
|
812
|
+
model="gemini-3-flash",
|
|
813
|
+
instruction="""You coordinate a content team:
|
|
814
|
+
1. Delegate research to Researcher
|
|
815
|
+
2. Send findings to Writer
|
|
816
|
+
3. Have Editor review final output""",
|
|
817
|
+
sub_agents=[researcher, writer, editor]
|
|
818
|
+
)
|
|
819
|
+
```
|
|
820
|
+
|
|
821
|
+
---
|
|
822
|
+
|
|
823
|
+
## Sequential Workflow
|
|
824
|
+
|
|
825
|
+
```python
|
|
826
|
+
from google.adk.agents import SequentialAgent
|
|
827
|
+
|
|
828
|
+
# Pipeline: each agent processes output from previous
|
|
829
|
+
pipeline = SequentialAgent(
|
|
830
|
+
name="content_pipeline",
|
|
831
|
+
agents=[researcher, writer, editor]
|
|
832
|
+
)
|
|
833
|
+
|
|
834
|
+
result = pipeline.run("Create article about AI agents")
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
**Use when:** Order matters, each stage depends on previous.
|
|
838
|
+
|
|
839
|
+
---
|
|
840
|
+
|
|
841
|
+
## Parallel Execution
|
|
842
|
+
|
|
843
|
+
```python
|
|
844
|
+
from google.adk.agents import ParallelAgent
|
|
845
|
+
|
|
846
|
+
# All agents run simultaneously
|
|
847
|
+
parallel = ParallelAgent(
|
|
848
|
+
name="parallel_research",
|
|
849
|
+
agents=[web_researcher, paper_researcher, expert_researcher]
|
|
850
|
+
)
|
|
851
|
+
|
|
852
|
+
results = parallel.run("Gather data on quantum computing")
|
|
853
|
+
```
|
|
854
|
+
|
|
855
|
+
**Use when:** Tasks are independent, reduce latency.
|
|
856
|
+
|
|
857
|
+
---
|
|
858
|
+
|
|
859
|
+
## Loop Agent
|
|
860
|
+
|
|
861
|
+
```python
|
|
862
|
+
from google.adk.agents import LoopAgent
|
|
863
|
+
|
|
864
|
+
# Repeat until condition met
|
|
865
|
+
refiner = LoopAgent(
|
|
866
|
+
name="quality_refiner",
|
|
867
|
+
agent=editor,
|
|
868
|
+
max_iterations=3,
|
|
869
|
+
stop_condition="Quality score > 0.9"
|
|
870
|
+
)
|
|
871
|
+
```
|
|
872
|
+
|
|
873
|
+
**Use when:** Iterative improvement needed.
|
|
874
|
+
|
|
875
|
+
---
|
|
876
|
+
|
|
877
|
+
## Customer Support Router
|
|
878
|
+
|
|
879
|
+
```python
|
|
880
|
+
billing_agent = LlmAgent(
|
|
881
|
+
name="BillingAgent",
|
|
882
|
+
instruction="Handle billing, refunds, payments.",
|
|
883
|
+
tools=[check_invoice, process_refund]
|
|
884
|
+
)
|
|
885
|
+
|
|
886
|
+
technical_agent = LlmAgent(
|
|
887
|
+
name="TechnicalAgent",
|
|
888
|
+
instruction="Troubleshoot technical issues.",
|
|
889
|
+
tools=[check_status, create_ticket]
|
|
890
|
+
)
|
|
891
|
+
|
|
892
|
+
router = LlmAgent(
|
|
893
|
+
name="SupportRouter",
|
|
894
|
+
instruction="Route queries to appropriate specialist.",
|
|
895
|
+
sub_agents=[billing_agent, technical_agent]
|
|
896
|
+
)
|
|
897
|
+
|
|
898
|
+
# Router auto-delegates based on query
|
|
899
|
+
response = router.run("I was charged twice")
|
|
900
|
+
# → Routes to billing_agent
|
|
901
|
+
```
|
|
902
|
+
|
|
903
|
+
---
|
|
904
|
+
|
|
905
|
+
## Best Practices
|
|
906
|
+
|
|
907
|
+
| Practice | Application |
|
|
908
|
+
|----------|-------------|
|
|
909
|
+
| Named agents | Use descriptive names in instructions |
|
|
910
|
+
| Clear delegation | Explicit routing in coordinator |
|
|
911
|
+
| Error handling | Handle agent failures gracefully |
|
|
912
|
+
| State management | Pass context between agents |
|
|
913
|
+
|
|
914
|
+
---
|
|
915
|
+
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
---
|
|
919
|
+
|
|
920
|
+
### Rule: tools
|
|
921
|
+
|
|
922
|
+
---
|
|
923
|
+
title: Custom Tools
|
|
924
|
+
impact: MEDIUM
|
|
925
|
+
tags: google-adk-python
|
|
926
|
+
---
|
|
927
|
+
|
|
928
|
+
# Custom Tools
|
|
929
|
+
|
|
930
|
+
> Extend agents with domain-specific capabilities.
|
|
931
|
+
|
|
932
|
+
---
|
|
933
|
+
|
|
934
|
+
## From Python Function
|
|
935
|
+
|
|
936
|
+
```python
|
|
937
|
+
from google.adk.tools import Tool
|
|
938
|
+
|
|
939
|
+
def calculate_roi(revenue: float, cost: float) -> float:
|
|
940
|
+
"""Calculate return on investment percentage.
|
|
941
|
+
|
|
942
|
+
Args:
|
|
943
|
+
revenue: Total revenue from investment
|
|
944
|
+
cost: Total cost of investment
|
|
945
|
+
|
|
946
|
+
Returns:
|
|
947
|
+
ROI as percentage
|
|
948
|
+
"""
|
|
949
|
+
if cost == 0:
|
|
950
|
+
return 0.0
|
|
951
|
+
return ((revenue - cost) / cost) * 100
|
|
952
|
+
|
|
953
|
+
# Convert to tool
|
|
954
|
+
roi_tool = Tool.from_function(calculate_roi)
|
|
955
|
+
```
|
|
956
|
+
|
|
957
|
+
**Key:** Include docstring with Args and Returns for LLM understanding.
|
|
958
|
+
|
|
959
|
+
---
|
|
960
|
+
|
|
961
|
+
## With Agent
|
|
962
|
+
|
|
963
|
+
```python
|
|
964
|
+
agent = LlmAgent(
|
|
965
|
+
name="business_analyst",
|
|
966
|
+
model="gemini-3-flash",
|
|
967
|
+
instruction="Analyze business metrics.",
|
|
968
|
+
tools=[roi_tool, revenue_tool, cost_tool]
|
|
969
|
+
)
|
|
970
|
+
```
|
|
971
|
+
|
|
972
|
+
---
|
|
973
|
+
|
|
974
|
+
## Database Tool
|
|
975
|
+
|
|
976
|
+
```python
|
|
977
|
+
import sqlite3
|
|
978
|
+
|
|
979
|
+
def query_customers(status: str) -> list:
|
|
980
|
+
"""Get customers by status.
|
|
981
|
+
|
|
982
|
+
Args:
|
|
983
|
+
status: Customer status (active, inactive, pending)
|
|
984
|
+
|
|
985
|
+
Returns:
|
|
986
|
+
List of customer records
|
|
987
|
+
"""
|
|
988
|
+
conn = sqlite3.connect("customers.db")
|
|
989
|
+
cursor = conn.execute(
|
|
990
|
+
"SELECT * FROM customers WHERE status = ?", (status,)
|
|
991
|
+
)
|
|
992
|
+
return cursor.fetchall()
|
|
993
|
+
|
|
994
|
+
customer_tool = Tool.from_function(query_customers)
|
|
995
|
+
```
|
|
996
|
+
|
|
997
|
+
---
|
|
998
|
+
|
|
999
|
+
## API Integration Tool
|
|
1000
|
+
|
|
1001
|
+
```python
|
|
1002
|
+
import requests
|
|
1003
|
+
|
|
1004
|
+
def get_weather(city: str) -> dict:
|
|
1005
|
+
"""Get current weather for a city.
|
|
1006
|
+
|
|
1007
|
+
Args:
|
|
1008
|
+
city: City name
|
|
1009
|
+
|
|
1010
|
+
Returns:
|
|
1011
|
+
Weather data including temperature and conditions
|
|
1012
|
+
"""
|
|
1013
|
+
response = requests.get(
|
|
1014
|
+
f"https://api.weather.com/current?city={city}",
|
|
1015
|
+
headers={"Authorization": f"Bearer {API_KEY}"}
|
|
1016
|
+
)
|
|
1017
|
+
return response.json()
|
|
1018
|
+
|
|
1019
|
+
weather_tool = Tool.from_function(get_weather)
|
|
1020
|
+
```
|
|
1021
|
+
|
|
1022
|
+
---
|
|
1023
|
+
|
|
1024
|
+
## Human-in-the-Loop
|
|
1025
|
+
|
|
1026
|
+
```python
|
|
1027
|
+
agent = LlmAgent(
|
|
1028
|
+
name="careful_agent",
|
|
1029
|
+
tools=[sensitive_tool],
|
|
1030
|
+
tool_confirmation=True # Requires approval
|
|
1031
|
+
)
|
|
1032
|
+
|
|
1033
|
+
# Agent pauses for each tool execution
|
|
1034
|
+
response = agent.run("Process customer refund")
|
|
1035
|
+
# Prompt: "Approve process_refund? (y/n)"
|
|
1036
|
+
```
|
|
1037
|
+
|
|
1038
|
+
---
|
|
1039
|
+
|
|
1040
|
+
## Best Practices
|
|
1041
|
+
|
|
1042
|
+
| Practice | Application |
|
|
1043
|
+
|----------|-------------|
|
|
1044
|
+
| **Docstrings** | Always include for LLM understanding |
|
|
1045
|
+
| **Type hints** | Use Python type hints |
|
|
1046
|
+
| **Error handling** | Return meaningful error messages |
|
|
1047
|
+
| **Validation** | Validate inputs before processing |
|
|
1048
|
+
| **Confirmation** | Use for sensitive operations |
|
|
1049
|
+
|
|
1050
|
+
---
|
|
1051
|
+
|
|
1052
|
+
---
|
|
1053
|
+
|
|
1054
|
+
⚡ PikaKit v3.9.134
|