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,528 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Agent Browser — Engineering Specification
|
|
3
|
+
impact: MEDIUM
|
|
4
|
+
tags: agent-browser
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agent Browser — Engineering Specification
|
|
8
|
+
|
|
9
|
+
> Production-grade specification for AI-optimized browser automation at FAANG scale.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. Overview
|
|
14
|
+
|
|
15
|
+
Agent Browser provides AI agents with browser automation through context-efficient element references (@refs). Instead of passing full DOM trees (8KB+ per snapshot), the @ref system compresses interactive elements into ~280 character handles, reducing LLM context consumption by 93%.
|
|
16
|
+
|
|
17
|
+
The skill wraps Playwright to expose a 4-phase execution lifecycle: Navigate → Snapshot → Interact → Verify. Every operation maps to one of these phases.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 2. Problem Statement
|
|
22
|
+
|
|
23
|
+
AI agents consuming browser state face three quantified problems:
|
|
24
|
+
|
|
25
|
+
| Problem | Measurement | Impact |
|
|
26
|
+
|---------|-------------|--------|
|
|
27
|
+
| Context overflow | Full DOM = 8,000–50,000 chars per page | Exceeds LLM context windows within 2–3 pages |
|
|
28
|
+
| Selector instability | CSS/XPath selectors break on 40–60% of page updates | Test flakiness, false failures |
|
|
29
|
+
| Session state loss | No persistence across agent turns | Repeated navigation, wasted execution time |
|
|
30
|
+
|
|
31
|
+
Agent Browser eliminates these by providing stable, compact element handles that survive page re-renders and persist within a browser session.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 3. Design Goals
|
|
36
|
+
|
|
37
|
+
| ID | Goal | Measurable Constraint |
|
|
38
|
+
|----|------|-----------------------|
|
|
39
|
+
| G1 | Minimize context consumption | Snapshot output ≤ 500 characters for pages with ≤ 50 interactive elements |
|
|
40
|
+
| G2 | Stable element references | @refs survive DOM mutations that preserve element identity |
|
|
41
|
+
| G3 | Deterministic command execution | Same command + same page state = same result |
|
|
42
|
+
| G4 | Session persistence | Browser state persists until explicit close or timeout |
|
|
43
|
+
| G5 | Failure transparency | Every failure returns a categorized error code, never silent |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 4. Non-Goals
|
|
48
|
+
|
|
49
|
+
| ID | Excluded | Rationale |
|
|
50
|
+
|----|----------|-----------|
|
|
51
|
+
| NG1 | Full DOM extraction | Contradicts G1; use chrome-devtools for raw DOM |
|
|
52
|
+
| NG2 | JavaScript injection | Security boundary; not permitted in multi-tenant mode |
|
|
53
|
+
| NG3 | Network interception | Out of scope; use Playwright directly for HAR capture |
|
|
54
|
+
| NG4 | Visual regression testing | Owned by e2e-automation skill |
|
|
55
|
+
| NG5 | Browser binary management | Delegated to Playwright installer (`npx playwright install`) |
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 5. System Boundaries
|
|
60
|
+
|
|
61
|
+
| Boundary | Owned | Not Owned |
|
|
62
|
+
|----------|-------|-----------|
|
|
63
|
+
| Browser lifecycle | Session create, navigate, close | Browser binary install |
|
|
64
|
+
| Element interaction | Click, fill, select, hover | Custom JS execution |
|
|
65
|
+
| State capture | @ref snapshots, screenshots | Full DOM serialization |
|
|
66
|
+
| Recording | Video start/stop | Video encoding, hosting |
|
|
67
|
+
| Error reporting | Categorized error codes | Error recovery decisions |
|
|
68
|
+
|
|
69
|
+
**Side-effect boundary:** Agent Browser modifies browser state (navigation, form fills, clicks). It does not modify the file system, network configuration, or any state outside the browser process.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 6. Integration Model
|
|
74
|
+
|
|
75
|
+
### 6.1 Agent Contract
|
|
76
|
+
|
|
77
|
+
#### Input Schema
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
Command: string # One of: open, snapshot, click, fill, screenshot, record, close
|
|
81
|
+
Target: string | null # URL for open, @ref for click/fill, path for screenshot
|
|
82
|
+
Value: string | null # Text for fill, "start"|"stop" for record
|
|
83
|
+
Options: {
|
|
84
|
+
timeout_ms: number # Default: 30000. Max: 120000.
|
|
85
|
+
interactive: boolean # Default: true. When true, snapshot returns only interactive elements.
|
|
86
|
+
wait_for: string # "load" | "domcontentloaded" | "networkidle". Default: "load".
|
|
87
|
+
}
|
|
88
|
+
contract_version: string # "2.0.0"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
#### Output Schema
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
Status: "success" | "error"
|
|
95
|
+
Data: {
|
|
96
|
+
refs: Array<{id: string, tag: string, label: string}> | null # For snapshot
|
|
97
|
+
screenshot_path: string | null # For screenshot
|
|
98
|
+
recording_path: string | null # For record stop
|
|
99
|
+
url: string # Current URL after command
|
|
100
|
+
title: string # Current page title
|
|
101
|
+
metadata: {
|
|
102
|
+
contract_version: string # "2.0.0"
|
|
103
|
+
backward_compatibility: string # "breaking"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
Error: ErrorSchema | null
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Contract Version:** 2.0.0
|
|
110
|
+
**Backward Compatibility:** breaking (first hardened version)
|
|
111
|
+
**Breaking Changes:** None — new spec for first hardening
|
|
112
|
+
|
|
113
|
+
#### Error Schema
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
Code: string # From Error Taxonomy (Section 11)
|
|
117
|
+
Message: string # Human-readable, single line
|
|
118
|
+
Phase: string # navigate | snapshot | interact | verify
|
|
119
|
+
Recoverable: boolean
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
#### Deterministic Guarantees
|
|
123
|
+
|
|
124
|
+
- `snapshot` on an unchanged page returns identical @refs in identical order.
|
|
125
|
+
- `click @ref` on a visible, enabled element triggers exactly one click event.
|
|
126
|
+
- `fill @ref "text"` clears the field, then types the text, in that order.
|
|
127
|
+
- `screenshot` captures the viewport at call time; no queuing, no batching.
|
|
128
|
+
|
|
129
|
+
#### What Agents May Assume
|
|
130
|
+
|
|
131
|
+
- @refs from the most recent `snapshot` are valid until the next navigation or DOM mutation.
|
|
132
|
+
- Commands execute sequentially in call order.
|
|
133
|
+
- A "success" status means the command completed; it does not assert business-logic correctness.
|
|
134
|
+
|
|
135
|
+
#### What Agents Must NOT Assume
|
|
136
|
+
|
|
137
|
+
- @refs from a previous `snapshot` remain valid after `click` (click may trigger navigation or DOM update).
|
|
138
|
+
- The browser process survives indefinitely; sessions time out after `session_timeout_ms`.
|
|
139
|
+
- Commands issued to a closed session will succeed; they return `ERR_SESSION_CLOSED`.
|
|
140
|
+
- Screenshot paths are permanent; they are written to a temp directory subject to OS cleanup.
|
|
141
|
+
|
|
142
|
+
#### Side-Effect Boundaries
|
|
143
|
+
|
|
144
|
+
| Command | Side Effects |
|
|
145
|
+
|---------|-------------|
|
|
146
|
+
| `open` | Navigates browser, may trigger network requests, sets cookies |
|
|
147
|
+
| `click` | Fires click event, may trigger navigation, may mutate DOM |
|
|
148
|
+
| `fill` | Clears field, types text, fires input/change events |
|
|
149
|
+
| `screenshot` | Writes file to disk at specified or temp path |
|
|
150
|
+
| `record start` | Begins writing video buffer to temp directory |
|
|
151
|
+
| `record stop` | Finalizes video file, releases buffer |
|
|
152
|
+
| `snapshot` | Read-only; no side effects |
|
|
153
|
+
| `close` | Terminates browser process, releases all resources |
|
|
154
|
+
|
|
155
|
+
### 6.2 Workflow Contract
|
|
156
|
+
|
|
157
|
+
#### Invocation Pattern
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
1. open <url> # Required first command
|
|
161
|
+
2. snapshot -i # Get @refs
|
|
162
|
+
3. [interact commands] # click, fill using @refs
|
|
163
|
+
4. snapshot -i # Verify state change
|
|
164
|
+
5. close # Release resources (or auto-close on timeout)
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Workflows invoke commands sequentially. Parallel command invocation on the same session is undefined behavior (see Section 16).
|
|
168
|
+
|
|
169
|
+
#### Execution Guarantees
|
|
170
|
+
|
|
171
|
+
- Commands within a session execute in FIFO order.
|
|
172
|
+
- Each command completes (success or error) before the next begins.
|
|
173
|
+
- No command is silently dropped or reordered.
|
|
174
|
+
|
|
175
|
+
#### Failure Propagation Model
|
|
176
|
+
|
|
177
|
+
| Failure Severity | Propagation | Workflow Action |
|
|
178
|
+
|-----------------|-------------|-----------------|
|
|
179
|
+
| Recoverable (element not found, timeout) | Return error to caller | Caller decides: retry, re-snapshot, or abort |
|
|
180
|
+
| Non-recoverable (browser crash, session closed) | Return error to caller | Caller must create new session |
|
|
181
|
+
| Infrastructure (no browser binary) | Return error to caller | Caller must install prerequisites |
|
|
182
|
+
|
|
183
|
+
Failures do not propagate across sessions. A crashed session does not affect other sessions.
|
|
184
|
+
|
|
185
|
+
#### Retry Boundaries
|
|
186
|
+
|
|
187
|
+
- Agent Browser does not retry internally. All retry decisions belong to the caller.
|
|
188
|
+
- Callers should re-snapshot after any failed interaction before retrying with @refs.
|
|
189
|
+
- Maximum recommended caller-side retries: 3 per command, with snapshot refresh between retries.
|
|
190
|
+
|
|
191
|
+
#### Isolation Model
|
|
192
|
+
|
|
193
|
+
- Each `open` command creates an isolated browser context (separate cookies, storage, cache).
|
|
194
|
+
- Sessions do not share state. Two concurrent sessions on the same URL operate independently.
|
|
195
|
+
- Browser contexts are destroyed on `close` or session timeout.
|
|
196
|
+
|
|
197
|
+
#### Idempotency Expectations
|
|
198
|
+
|
|
199
|
+
| Command | Idempotent | Notes |
|
|
200
|
+
|---------|-----------|-------|
|
|
201
|
+
| `open` | Yes | Re-navigates to same URL; page state resets |
|
|
202
|
+
| `snapshot` | Yes | Returns current state; no mutation |
|
|
203
|
+
| `click` | No | Each call fires a new click event |
|
|
204
|
+
| `fill` | No | Clears and re-types; prior text is lost |
|
|
205
|
+
| `screenshot` | Yes | Captures current viewport state |
|
|
206
|
+
| `record start` | No | Second call returns `ERR_RECORDING_ACTIVE` |
|
|
207
|
+
| `record stop` | No | Second call returns `ERR_NO_RECORDING` |
|
|
208
|
+
| `close` | Yes | Second call returns `ERR_SESSION_CLOSED` |
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## 7. Execution Model
|
|
213
|
+
|
|
214
|
+
### 4-Phase Lifecycle
|
|
215
|
+
|
|
216
|
+
| Phase | Commands | State Transition |
|
|
217
|
+
|-------|----------|------------------|
|
|
218
|
+
| **Navigate** | `open <url>` | NO_SESSION → SESSION_ACTIVE |
|
|
219
|
+
| **Snapshot** | `snapshot -i` | SESSION_ACTIVE → SESSION_ACTIVE (refs populated) |
|
|
220
|
+
| **Interact** | `click`, `fill` | SESSION_ACTIVE → SESSION_ACTIVE (refs invalidated) |
|
|
221
|
+
| **Verify** | `snapshot`, `screenshot` | SESSION_ACTIVE → SESSION_ACTIVE (refs refreshed) |
|
|
222
|
+
|
|
223
|
+
**State Diagram:**
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
NO_SESSION → [open] → SESSION_ACTIVE → [close/timeout] → SESSION_CLOSED
|
|
227
|
+
↑ ↓
|
|
228
|
+
[snapshot/interact/verify cycle]
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Commands issued in `NO_SESSION` or `SESSION_CLOSED` state return `ERR_SESSION_CLOSED`.
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
## 8. Deterministic Design Principles
|
|
236
|
+
|
|
237
|
+
| Principle | Enforcement |
|
|
238
|
+
|-----------|-------------|
|
|
239
|
+
| No implicit waits beyond configured timeout | `wait_for` parameter controls page load strategy; no hidden sleep |
|
|
240
|
+
| No automatic retries | Failure returns immediately; caller controls retry |
|
|
241
|
+
| No background polling | Snapshot captures point-in-time state; no observers |
|
|
242
|
+
| No ambient state | Each command operates on explicit inputs only |
|
|
243
|
+
| Ordered execution | Commands execute in call order; no reordering |
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## 9. State & Idempotency Model
|
|
248
|
+
|
|
249
|
+
### Session State Machine
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
States: NO_SESSION, SESSION_ACTIVE, SESSION_CLOSED
|
|
253
|
+
Transitions:
|
|
254
|
+
NO_SESSION + open → SESSION_ACTIVE
|
|
255
|
+
SESSION_ACTIVE + close → SESSION_CLOSED
|
|
256
|
+
SESSION_ACTIVE + timeout → SESSION_CLOSED
|
|
257
|
+
SESSION_ACTIVE + crash → SESSION_CLOSED
|
|
258
|
+
SESSION_CLOSED + any → ERR_SESSION_CLOSED
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### @ref Lifecycle
|
|
262
|
+
|
|
263
|
+
1. @refs are generated by `snapshot` and associated with DOM elements at snapshot time.
|
|
264
|
+
2. @refs are valid until the next `snapshot`, navigation event, or session close.
|
|
265
|
+
3. Using an expired @ref returns `ERR_REF_STALE` (never silently fails).
|
|
266
|
+
4. @ref IDs are sequential within a snapshot (`@e1`, `@e2`, ...) and reset on each new snapshot.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## 10. Failure Handling Strategy
|
|
271
|
+
|
|
272
|
+
| Failure Class | Behavior | Caller Recovery |
|
|
273
|
+
|---------------|----------|-----------------|
|
|
274
|
+
| Element not found | Return `ERR_REF_NOT_FOUND` | Re-snapshot, obtain new @refs |
|
|
275
|
+
| Element not interactable | Return `ERR_NOT_INTERACTABLE` | Wait, re-snapshot, retry |
|
|
276
|
+
| Navigation timeout | Return `ERR_TIMEOUT` | Check URL, increase timeout, retry |
|
|
277
|
+
| Browser crash | Return `ERR_BROWSER_CRASH` | Create new session |
|
|
278
|
+
| Session expired | Return `ERR_SESSION_CLOSED` | Create new session |
|
|
279
|
+
| Invalid command | Return `ERR_INVALID_COMMAND` | Fix command syntax |
|
|
280
|
+
| Recording conflict | Return `ERR_RECORDING_ACTIVE` or `ERR_NO_RECORDING` | Check recording state |
|
|
281
|
+
|
|
282
|
+
**Invariant:** Every failure returns a structured error. No command fails silently.
|
|
283
|
+
|
|
284
|
+
**Auto-Recovery Protocol (Self-Healing):**
|
|
285
|
+
Agents MUST implement deterministic self-healing when encountering `ERR_REF_STALE` or `ERR_REF_NOT_FOUND`:
|
|
286
|
+
1. **Never** fail immediately or prompt the user for help on stale refs.
|
|
287
|
+
2. **Auto-Recover**: The agent must automatically trigger `snapshot -i` to force the `session_manager` to evaluate the new DOM layout and retrieve fresh `@refs`.
|
|
288
|
+
3. Retry the intended action with the newly mapped `@ref`.
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## 11. Error Taxonomy
|
|
293
|
+
|
|
294
|
+
| Code | Category | Phase | Recoverable | Description |
|
|
295
|
+
|------|----------|-------|-------------|-------------|
|
|
296
|
+
| `ERR_SESSION_CLOSED` | Session | Any | No | Session does not exist or was closed |
|
|
297
|
+
| `ERR_BROWSER_CRASH` | Infrastructure | Any | No | Browser process terminated unexpectedly |
|
|
298
|
+
| `ERR_NO_BROWSER` | Infrastructure | Navigate | No | Playwright or browser binary not installed |
|
|
299
|
+
| `ERR_TIMEOUT` | Network | Navigate | Yes | Page did not reach `wait_for` state within `timeout_ms` |
|
|
300
|
+
| `ERR_INVALID_URL` | Validation | Navigate | No | URL is malformed or uses disallowed protocol |
|
|
301
|
+
| `ERR_REF_NOT_FOUND` | Interaction | Interact | Yes | @ref does not map to a current DOM element |
|
|
302
|
+
| `ERR_REF_STALE` | Interaction | Interact | Yes | @ref was from a previous snapshot and is expired |
|
|
303
|
+
| `ERR_NOT_INTERACTABLE` | Interaction | Interact | Yes | Element exists but is hidden, disabled, or obscured |
|
|
304
|
+
| `ERR_INVALID_COMMAND` | Validation | Any | No | Command name or arguments are malformed |
|
|
305
|
+
| `ERR_RECORDING_ACTIVE` | State | Any | No | `record start` called while recording is in progress |
|
|
306
|
+
| `ERR_NO_RECORDING` | State | Any | No | `record stop` called with no active recording |
|
|
307
|
+
| `ERR_SCREENSHOT_WRITE` | IO | Verify | Yes | Failed to write screenshot to disk (permissions, disk space) |
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## 12. Timeout & Retry Policy
|
|
312
|
+
|
|
313
|
+
| Parameter | Default | Min | Max | Unit |
|
|
314
|
+
|-----------|---------|-----|-----|------|
|
|
315
|
+
| `page_load_timeout` | 30,000 | 1,000 | 120,000 | ms |
|
|
316
|
+
| `element_wait_timeout` | 5,000 | 500 | 30,000 | ms |
|
|
317
|
+
| `session_timeout` | 300,000 | 30,000 | 1,800,000 | ms |
|
|
318
|
+
| `screenshot_timeout` | 10,000 | 1,000 | 30,000 | ms |
|
|
319
|
+
|
|
320
|
+
**Retry policy:** Zero internal retries. All retry logic is the caller's responsibility. This is a deliberate design decision to prevent hidden execution loops and maintain deterministic behavior.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## 13. Observability & Logging Schema
|
|
325
|
+
|
|
326
|
+
### OpenTelemetry Integration (MANDATORY)
|
|
327
|
+
|
|
328
|
+
Agent Browser MUST coordinate with `@[skills/observability]` to emit distributed traces for all operations.
|
|
329
|
+
- **Span Naming**: `browser/{command}` (e.g., `browser/open`, `browser/click`).
|
|
330
|
+
- **Context Propagation**: The `trace_id` and `session_id` MUST be injected into all log entries and traces.
|
|
331
|
+
- **Span Attributes**: All fields in the 'Log Entry Format' must be attached as span attributes.
|
|
332
|
+
|
|
333
|
+
### Log Entry Format
|
|
334
|
+
|
|
335
|
+
```json
|
|
336
|
+
{
|
|
337
|
+
"trace_id": "uuid",
|
|
338
|
+
"skill_name": "agent-browser",
|
|
339
|
+
"contract_version": "2.0.0",
|
|
340
|
+
"execution_id": "uuid",
|
|
341
|
+
"timestamp": "ISO-8601",
|
|
342
|
+
"session_id": "uuid",
|
|
343
|
+
"command": "string",
|
|
344
|
+
"phase": "navigate|snapshot|interact|verify",
|
|
345
|
+
"target": "string|null",
|
|
346
|
+
"duration_ms": "number",
|
|
347
|
+
"status": "success|error",
|
|
348
|
+
"error_code": "string|null",
|
|
349
|
+
"refs_count": "number|null",
|
|
350
|
+
"url": "string"
|
|
351
|
+
}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### Required Log Points
|
|
355
|
+
|
|
356
|
+
| Event | Log Level | Fields |
|
|
357
|
+
|-------|-----------|--------|
|
|
358
|
+
| Session created | INFO | session_id, url, timestamp |
|
|
359
|
+
| Command executed | INFO | All fields |
|
|
360
|
+
| Command failed | ERROR | All fields + error_code |
|
|
361
|
+
| Session closed | INFO | session_id, reason (explicit, timeout, crash), total_commands |
|
|
362
|
+
| @ref stale access | WARN | session_id, ref_id, snapshot_age_ms |
|
|
363
|
+
|
|
364
|
+
### Metrics
|
|
365
|
+
|
|
366
|
+
| Metric | Type | Unit |
|
|
367
|
+
|--------|------|------|
|
|
368
|
+
| `browser.session.duration` | Histogram | ms |
|
|
369
|
+
| `browser.command.duration` | Histogram | ms |
|
|
370
|
+
| `browser.command.error_rate` | Counter | per error_code |
|
|
371
|
+
| `browser.snapshot.ref_count` | Gauge | count |
|
|
372
|
+
| `browser.snapshot.char_count` | Gauge | characters |
|
|
373
|
+
| `browser.session.active` | Gauge | count |
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## 14. Security & Trust Model
|
|
378
|
+
|
|
379
|
+
### URL Allowlist
|
|
380
|
+
|
|
381
|
+
| Allowed | Blocked |
|
|
382
|
+
|---------|---------|
|
|
383
|
+
| `http://` | `file://` |
|
|
384
|
+
| `https://` | `javascript:` |
|
|
385
|
+
| `localhost` | `data:` (configurable) |
|
|
386
|
+
|
|
387
|
+
Blocked protocols return `ERR_INVALID_URL`.
|
|
388
|
+
|
|
389
|
+
### Credential Handling
|
|
390
|
+
|
|
391
|
+
- Agent Browser does not store credentials. `fill` commands pass values transiently.
|
|
392
|
+
- Values passed to `fill` are logged as `[REDACTED]` in all log outputs.
|
|
393
|
+
- Screenshots and recordings may contain sensitive data; callers are responsible for access control on output files.
|
|
394
|
+
|
|
395
|
+
### Browser Context Isolation
|
|
396
|
+
|
|
397
|
+
- Each session uses an isolated browser context (no shared cookies, localStorage, or cache between sessions).
|
|
398
|
+
- Browser contexts run with Playwright's default sandboxing.
|
|
399
|
+
- No browser extensions are loaded.
|
|
400
|
+
|
|
401
|
+
### Multi-Tenant Boundaries
|
|
402
|
+
|
|
403
|
+
- Sessions are identified by `session_id`. No session can access another session's browser context.
|
|
404
|
+
- Session IDs are UUIDs; they are not guessable or sequential.
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## 15. Scalability Model
|
|
409
|
+
|
|
410
|
+
| Dimension | Constraint | Mitigation |
|
|
411
|
+
|-----------|-----------|------------|
|
|
412
|
+
| Concurrent sessions | Bound by available memory (each Chromium context ≈ 50–150 MB) | Enforce max_concurrent_sessions per node |
|
|
413
|
+
| Session throughput | Sequential command execution within session | Parallelism across sessions, not within |
|
|
414
|
+
| Snapshot size | Proportional to interactive element count | Cap at 200 elements per snapshot; truncate with warning |
|
|
415
|
+
| Storage (screenshots/recordings) | Disk I/O bound | Write to configurable output directory; caller manages cleanup |
|
|
416
|
+
|
|
417
|
+
### Capacity Planning
|
|
418
|
+
|
|
419
|
+
| Metric | Per Session | Per Node (16 GB RAM) |
|
|
420
|
+
|--------|-------------|---------------------|
|
|
421
|
+
| Memory | 50–150 MB | ~100 concurrent sessions |
|
|
422
|
+
| CPU | 1 core per active session | Bound by core count |
|
|
423
|
+
| Disk | ~2 MB/screenshot, ~5 MB/min recording | Caller-managed cleanup |
|
|
424
|
+
|
|
425
|
+
---
|
|
426
|
+
|
|
427
|
+
## 16. Concurrency Model
|
|
428
|
+
|
|
429
|
+
| Scope | Model | Behavior |
|
|
430
|
+
|-------|-------|----------|
|
|
431
|
+
| Within session | Sequential | Commands execute in FIFO order; concurrent calls are undefined behavior |
|
|
432
|
+
| Across sessions | Parallel | Independent sessions run concurrently with no shared state |
|
|
433
|
+
| Recording | Exclusive | One active recording per session; second `record start` returns error |
|
|
434
|
+
|
|
435
|
+
**Undefined behavior:** Sending commands to the same session from multiple agents concurrently. The skill does not queue or serialize concurrent calls to the same session. Callers must serialize access.
|
|
436
|
+
|
|
437
|
+
---
|
|
438
|
+
|
|
439
|
+
## 17. Resource Lifecycle Management
|
|
440
|
+
|
|
441
|
+
| Resource | Created By | Destroyed By | Max Lifetime |
|
|
442
|
+
|----------|-----------|-------------|--------------|
|
|
443
|
+
| Browser context | `open` | `close`, timeout, or crash | `session_timeout` (default: 5 min) |
|
|
444
|
+
| @ref bindings | `snapshot` | Next `snapshot`, navigation, or session close | Until next snapshot |
|
|
445
|
+
| Screenshot files | `screenshot` | Caller (manual cleanup) | Indefinite until deleted |
|
|
446
|
+
| Recording files | `record stop` | Caller (manual cleanup) | Indefinite until deleted |
|
|
447
|
+
| Temp buffers | `record start` | `record stop` or session close | Session lifetime |
|
|
448
|
+
|
|
449
|
+
**Leak prevention:**
|
|
450
|
+
- Sessions that exceed `session_timeout` without commands are closed automatically.
|
|
451
|
+
- Active recordings are finalized on session close (timeout or explicit).
|
|
452
|
+
- Browser processes orphaned by crashes are detected and killed on next session creation.
|
|
453
|
+
|
|
454
|
+
---
|
|
455
|
+
|
|
456
|
+
## 18. Performance Constraints
|
|
457
|
+
|
|
458
|
+
| Operation | P50 Target | P99 Target | Hard Limit |
|
|
459
|
+
|-----------|-----------|-----------|------------|
|
|
460
|
+
| `open` (cached page) | < 2,000 ms | < 5,000 ms | `page_load_timeout` |
|
|
461
|
+
| `snapshot` (50 elements) | < 200 ms | < 500 ms | `element_wait_timeout` |
|
|
462
|
+
| `click` | < 100 ms | < 500 ms | `element_wait_timeout` |
|
|
463
|
+
| `fill` (100 chars) | < 200 ms | < 1,000 ms | `element_wait_timeout` |
|
|
464
|
+
| `screenshot` (1920x1080) | < 500 ms | < 2,000 ms | `screenshot_timeout` |
|
|
465
|
+
| Snapshot output size | ≤ 280 chars | ≤ 500 chars | 2,000 chars |
|
|
466
|
+
|
|
467
|
+
---
|
|
468
|
+
|
|
469
|
+
## 19. Operational Risks
|
|
470
|
+
|
|
471
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
472
|
+
|------|-----------|--------|------------|
|
|
473
|
+
| Browser memory leak | Medium | Session degradation | `session_timeout` auto-close; max session lifetime |
|
|
474
|
+
| Stale @ref usage | High | Command failure | `ERR_REF_STALE` error; callers must re-snapshot |
|
|
475
|
+
| Playwright version incompatibility | Low | Skill non-functional | Pin Playwright version in prerequisites |
|
|
476
|
+
| Disk full (screenshots/recordings) | Medium | Write failure | `ERR_SCREENSHOT_WRITE`; caller monitors disk |
|
|
477
|
+
| Headless mode detection by sites | Medium | Navigation failure | Caller responsibility; out of skill scope |
|
|
478
|
+
| Session timeout during long flows | Medium | Work loss | Increase `session_timeout`; checkpoint with screenshots |
|
|
479
|
+
|
|
480
|
+
---
|
|
481
|
+
|
|
482
|
+
## 20. Compliance with skill-design-guide.md
|
|
483
|
+
|
|
484
|
+
| Requirement | Status | Evidence |
|
|
485
|
+
|-------------|--------|----------|
|
|
486
|
+
| YAML frontmatter complete | ✅ | name, description, metadata with category, version, triggers, coordinates_with, success_metrics |
|
|
487
|
+
| SKILL.md < 200 lines | ✅ | Entry point SKILL.md under 200 lines; details in rules/ |
|
|
488
|
+
| Prerequisites documented | ✅ | Node.js 18+, Playwright, optional Browserbase |
|
|
489
|
+
| When to Use section | ✅ | Decision matrix vs chrome-devtools |
|
|
490
|
+
| Quick Reference with commands | ✅ | 4-step workflow with copy-paste commands |
|
|
491
|
+
| Core content matches skill type | ✅ | Automation type: commands table, @ref system, execution model |
|
|
492
|
+
| Troubleshooting section | ✅ | Problem/solution table |
|
|
493
|
+
| Related section | ✅ | Cross-links to e2e-automation, chrome-devtools, test-architect |
|
|
494
|
+
| Content Map for multi-file | ✅ | Links to rules/engineering-spec.md |
|
|
495
|
+
| Contract versioning | ✅ | contract_version, backward_compatibility, breaking_changes |
|
|
496
|
+
| Compliance matrix structured | ✅ | This table with ✅/❌ + evidence |
|
|
497
|
+
|
|
498
|
+
---
|
|
499
|
+
|
|
500
|
+
## 21. Production Readiness Checklist
|
|
501
|
+
|
|
502
|
+
| Category | Check | Status |
|
|
503
|
+
|----------|-------|--------|
|
|
504
|
+
| **Functionality** | All 7 commands (open, snapshot, click, fill, screenshot, record, close) specified | ✅ |
|
|
505
|
+
| **Functionality** | @ref lifecycle defined with explicit invalidation rules | ✅ |
|
|
506
|
+
| **Contracts** | Input/output/error schemas defined | ✅ |
|
|
507
|
+
| **Contracts** | Agent assumptions and non-assumptions documented | ✅ |
|
|
508
|
+
| **Contracts** | Workflow invocation pattern specified | ✅ |
|
|
509
|
+
| **Failure** | Error taxonomy with 12 categorized error codes | ✅ |
|
|
510
|
+
| **Failure** | No silent failures; every error returns structured response | ✅ |
|
|
511
|
+
| **Failure** | Retry policy: zero internal retries, caller-owned | ✅ |
|
|
512
|
+
| **Timeouts** | 4 timeout parameters with defaults, min, max bounds | ✅ |
|
|
513
|
+
| **Security** | URL allowlist with blocked protocols | ✅ |
|
|
514
|
+
| **Security** | Credential redaction in logs | ✅ |
|
|
515
|
+
| **Security** | Session isolation with UUID identifiers | ✅ |
|
|
516
|
+
| **Observability** | Structured log schema with 5 log points | ✅ |
|
|
517
|
+
| **Observability** | 6 metrics defined with types and units | ✅ |
|
|
518
|
+
| **Performance** | P50/P99 targets for all operations | ✅ |
|
|
519
|
+
| **Scalability** | Capacity planning per session and per node | ✅ |
|
|
520
|
+
| **Concurrency** | Sequential within session, parallel across sessions | ✅ |
|
|
521
|
+
| **Resources** | Lifecycle for 5 resource types with destruction triggers | ✅ |
|
|
522
|
+
| **Idempotency** | Per-command idempotency classification | ✅ |
|
|
523
|
+
| **Determinism** | 5 deterministic design principles enforced | ✅ |
|
|
524
|
+
| **Compliance** | All skill-design-guide.md sections present | ✅ |
|
|
525
|
+
|
|
526
|
+
---
|
|
527
|
+
|
|
528
|
+
⚡ PikaKit v3.9.134
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { SessionManager } from './session_manager.ts';
|
|
3
|
+
|
|
4
|
+
async function main() {
|
|
5
|
+
const [, , command, arg1, arg2] = process.argv;
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8
|
+
let result: any;
|
|
9
|
+
switch (command) {
|
|
10
|
+
case 'open':
|
|
11
|
+
if (!arg1) {
|
|
12
|
+
result = { status: 'error', error: { code: 'ERR_INVALID_COMMAND', message: 'Missing URL', phase: 'navigate', recoverable: false } };
|
|
13
|
+
break;
|
|
14
|
+
}
|
|
15
|
+
result = await SessionManager.open(arg1);
|
|
16
|
+
break;
|
|
17
|
+
case 'snapshot':
|
|
18
|
+
result = await SessionManager.snapshot(arg1 !== '-all');
|
|
19
|
+
if (result.status === 'success') {
|
|
20
|
+
const out = result.data?.refs?.map((r: { id: string; tag: string; label: string }) => `${r.id}=${r.tag}[${r.label}]`).join(' ');
|
|
21
|
+
console.log(`Snapshot output:\n${out || 'No interactive elements found'}`);
|
|
22
|
+
}
|
|
23
|
+
break;
|
|
24
|
+
case 'click':
|
|
25
|
+
if (!arg1) {
|
|
26
|
+
result = { status: 'error', error: { code: 'ERR_INVALID_COMMAND', message: 'Missing @ref', phase: 'interact', recoverable: false } };
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
result = await SessionManager.interact('click', arg1);
|
|
30
|
+
break;
|
|
31
|
+
case 'fill':
|
|
32
|
+
if (!arg1 || !arg2) {
|
|
33
|
+
result = { status: 'error', error: { code: 'ERR_INVALID_COMMAND', message: 'Missing @ref or text', phase: 'interact', recoverable: false } };
|
|
34
|
+
break;
|
|
35
|
+
}
|
|
36
|
+
result = await SessionManager.interact('fill', arg1, arg2);
|
|
37
|
+
break;
|
|
38
|
+
case 'close':
|
|
39
|
+
result = await SessionManager.close();
|
|
40
|
+
break;
|
|
41
|
+
default:
|
|
42
|
+
result = { status: 'error', error: { code: 'ERR_INVALID_COMMAND', message: `Unknown command: ${command}`, phase: 'any', recoverable: false } };
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
console.log(JSON.stringify(result, null, 2));
|
|
46
|
+
process.exit(result.status === 'success' ? 0 : 1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
main().catch((e: unknown) => {
|
|
50
|
+
console.error(JSON.stringify({ status: 'error', error: { code: 'ERR_UNKNOWN', message: e instanceof Error ? e.message : String(e), phase: 'any', recoverable: false } }));
|
|
51
|
+
process.exit(1);
|
|
52
|
+
});
|