opencode-agent-kit 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +796 -0
- package/bin/commands/init.mjs +221 -0
- package/bin/init.mjs +21 -0
- package/package.json +22 -0
- package/template/.opencode/agent-docs/backend/README.md +0 -0
- package/template/.opencode/agent-docs/backend/node/BACKEND_PATTERNS.md +82 -0
- package/template/.opencode/agent-docs/backend/node/BACKEND_QUICK_START.md +49 -0
- package/template/.opencode/agent-docs/frontend/next/README.md +0 -0
- package/template/.opencode/agent-docs/frontend/nuxt/API_PATTERNS.md +807 -0
- package/template/.opencode/agent-docs/frontend/nuxt/CHEATSHEET.md +676 -0
- package/template/.opencode/agent-docs/frontend/nuxt/COMPLETION_REPORT.md +613 -0
- package/template/.opencode/agent-docs/frontend/nuxt/EXAMPLES.md +956 -0
- package/template/.opencode/agent-docs/frontend/nuxt/INDEX.md +596 -0
- package/template/.opencode/agent-docs/frontend/nuxt/MCP_GUIDE.md +881 -0
- package/template/.opencode/agent-docs/frontend/nuxt/MENTOR_CURRICULUM_30_DAYS.md +256 -0
- package/template/.opencode/agent-docs/frontend/nuxt/MENTOR_CURRICULUM_CHECKLIST.md +156 -0
- package/template/.opencode/agent-docs/frontend/nuxt/MENTOR_WEEKLY_ASSIGNMENTS.md +191 -0
- package/template/.opencode/agent-docs/frontend/nuxt/QUICK_START.md +509 -0
- package/template/.opencode/agent-docs/frontend/nuxt/README.md +506 -0
- package/template/.opencode/agent-docs/frontend/nuxt/README_AGENTS.md +140 -0
- package/template/.opencode/agent-docs/frontend/nuxt/README_DOCS.md +65 -0
- package/template/.opencode/agent-docs/frontend/nuxt/SUMMARY.md +474 -0
- package/template/.opencode/agent-docs/frontend/nuxt/TEAM_OPERATING_GUIDE.md +54 -0
- package/template/.opencode/agent-docs/frontend/nuxt/TESTING_GUIDE.md +904 -0
- package/template/.opencode/agent-docs/frontend/nuxt/WORKFLOWS.md +758 -0
- package/template/.opencode/agent-docs/frontend/react/API_PATTERNS.md +187 -0
- package/template/.opencode/agent-docs/frontend/react/CHEATSHEET.md +87 -0
- package/template/.opencode/agent-docs/frontend/react/INDEX.md +45 -0
- package/template/.opencode/agent-docs/frontend/react/QUICK_START.md +43 -0
- package/template/.opencode/agent-docs/frontend/react/README.md +159 -0
- package/template/.opencode/agent-docs/frontend/vue/README.md +0 -0
- package/template/.opencode/agent-docs/mobile/android/README.md +45 -0
- package/template/.opencode/agent-docs/mobile/flutter/README.md +44 -0
- package/template/.opencode/agents/android-developer.md +418 -0
- package/template/.opencode/agents/code-igniter-3-fullstack.md +345 -0
- package/template/.opencode/agents/code-reviewer.md +517 -0
- package/template/.opencode/agents/database-specialist.md +455 -0
- package/template/.opencode/agents/devops-specialist.md +562 -0
- package/template/.opencode/agents/flutter-developer.md +556 -0
- package/template/.opencode/agents/it-leader.md +911 -0
- package/template/.opencode/agents/laravel-advanced.md +691 -0
- package/template/.opencode/agents/node-backend-developer.md +343 -0
- package/template/.opencode/agents/nuxt-frontend-developer-mentor.md +402 -0
- package/template/.opencode/agents/nuxt-frontend-developer.md +1573 -0
- package/template/.opencode/agents/react-frontend-developer.md +1017 -0
- package/template/.opencode/agents/seo-specialist.md +681 -0
- package/template/.opencode/agents/ui-ux-designer.md +783 -0
- package/template/.opencode/commands/android-build/command.md +25 -0
- package/template/.opencode/commands/android-test/command.md +23 -0
- package/template/.opencode/commands/build-fix.md +29 -0
- package/template/.opencode/commands/checkpoint.md +74 -0
- package/template/.opencode/commands/code-review.md +40 -0
- package/template/.opencode/commands/e2e.md +363 -0
- package/template/.opencode/commands/eval.md +120 -0
- package/template/.opencode/commands/evolve.md +193 -0
- package/template/.opencode/commands/flutter-build/command.md +25 -0
- package/template/.opencode/commands/flutter-test/command.md +24 -0
- package/template/.opencode/commands/go-build.md +183 -0
- package/template/.opencode/commands/go-review.md +148 -0
- package/template/.opencode/commands/go-test.md +268 -0
- package/template/.opencode/commands/gpc-release/command.md +30 -0
- package/template/.opencode/commands/instinct-export.md +91 -0
- package/template/.opencode/commands/instinct-import.md +142 -0
- package/template/.opencode/commands/instinct-status.md +86 -0
- package/template/.opencode/commands/learn.md +70 -0
- package/template/.opencode/commands/multi-backend.md +158 -0
- package/template/.opencode/commands/multi-execute.md +310 -0
- package/template/.opencode/commands/multi-frontend.md +158 -0
- package/template/.opencode/commands/multi-plan.md +261 -0
- package/template/.opencode/commands/multi-workflow.md +183 -0
- package/template/.opencode/commands/orchestrate.md +172 -0
- package/template/.opencode/commands/plan.md +113 -0
- package/template/.opencode/commands/pm2.md +271 -0
- package/template/.opencode/commands/python-review.md +297 -0
- package/template/.opencode/commands/refactor-clean.md +28 -0
- package/template/.opencode/commands/sessions.md +305 -0
- package/template/.opencode/commands/setup-pm.md +80 -0
- package/template/.opencode/commands/skill-create.md +174 -0
- package/template/.opencode/commands/tdd.md +326 -0
- package/template/.opencode/commands/test-coverage.md +27 -0
- package/template/.opencode/commands/update-codemaps.md +17 -0
- package/template/.opencode/commands/update-docs.md +31 -0
- package/template/.opencode/commands/verify.md +59 -0
- package/template/.opencode/config.example.json +309 -0
- package/template/.opencode/config.json +341 -0
- package/template/.opencode/contexts/dev.md +20 -0
- package/template/.opencode/contexts/research.md +26 -0
- package/template/.opencode/contexts/review.md +22 -0
- package/template/.opencode/hooks/hooks.json +169 -0
- package/template/.opencode/instructions/INSTRUCTIONS.md +388 -0
- package/template/.opencode/package.json +5 -0
- package/template/.opencode/rules/README.md +82 -0
- package/template/.opencode/rules/android/gradle.md +62 -0
- package/template/.opencode/rules/android/testing.md +27 -0
- package/template/.opencode/rules/common/agents.md +49 -0
- package/template/.opencode/rules/common/coding-style.md +48 -0
- package/template/.opencode/rules/common/git-workflow.md +45 -0
- package/template/.opencode/rules/common/hooks.md +30 -0
- package/template/.opencode/rules/common/patterns.md +31 -0
- package/template/.opencode/rules/common/performance.md +55 -0
- package/template/.opencode/rules/common/security.md +29 -0
- package/template/.opencode/rules/common/testing.md +29 -0
- package/template/.opencode/rules/flutter/state-management.md +57 -0
- package/template/.opencode/rules/flutter/testing.md +42 -0
- package/template/.opencode/rules/golang/coding-style.md +26 -0
- package/template/.opencode/rules/golang/hooks.md +11 -0
- package/template/.opencode/rules/golang/patterns.md +39 -0
- package/template/.opencode/rules/golang/security.md +28 -0
- package/template/.opencode/rules/golang/testing.md +25 -0
- package/template/.opencode/rules/mobile/performance.md +36 -0
- package/template/.opencode/rules/python/coding-style.md +37 -0
- package/template/.opencode/rules/python/hooks.md +14 -0
- package/template/.opencode/rules/python/patterns.md +34 -0
- package/template/.opencode/rules/python/security.md +25 -0
- package/template/.opencode/rules/python/testing.md +33 -0
- package/template/.opencode/rules/typescript/coding-style.md +58 -0
- package/template/.opencode/rules/typescript/hooks.md +15 -0
- package/template/.opencode/rules/typescript/patterns.md +45 -0
- package/template/.opencode/rules/typescript/security.md +21 -0
- package/template/.opencode/rules/typescript/testing.md +11 -0
- package/template/.opencode/skills/api-documentation/SKILL.md +188 -0
- package/template/.opencode/skills/backend-patterns/SKILL.md +587 -0
- package/template/.opencode/skills/building-components/SKILL.md +37 -0
- package/template/.opencode/skills/building-components/references/accessibility.mdx +819 -0
- package/template/.opencode/skills/building-components/references/as-child.mdx +324 -0
- package/template/.opencode/skills/building-components/references/composition.mdx +239 -0
- package/template/.opencode/skills/building-components/references/data-attributes.mdx +413 -0
- package/template/.opencode/skills/building-components/references/definitions.mdx +258 -0
- package/template/.opencode/skills/building-components/references/design-tokens.mdx +57 -0
- package/template/.opencode/skills/building-components/references/docs.mdx +155 -0
- package/template/.opencode/skills/building-components/references/marketplaces.mdx +144 -0
- package/template/.opencode/skills/building-components/references/npm.mdx +166 -0
- package/template/.opencode/skills/building-components/references/polymorphism.mdx +583 -0
- package/template/.opencode/skills/building-components/references/principles.mdx +61 -0
- package/template/.opencode/skills/building-components/references/registry.mdx +169 -0
- package/template/.opencode/skills/building-components/references/state.mdx +99 -0
- package/template/.opencode/skills/building-components/references/styling.mdx +286 -0
- package/template/.opencode/skills/building-components/references/types.mdx +191 -0
- package/template/.opencode/skills/clickhouse-io/SKILL.md +429 -0
- package/template/.opencode/skills/coding-standards/SKILL.md +520 -0
- package/template/.opencode/skills/configure-ecc/SKILL.md +298 -0
- package/template/.opencode/skills/continuous-learning/SKILL.md +110 -0
- package/template/.opencode/skills/continuous-learning/config.json +18 -0
- package/template/.opencode/skills/continuous-learning/evaluate-session.sh +60 -0
- package/template/.opencode/skills/continuous-learning-v2/SKILL.md +284 -0
- package/template/.opencode/skills/continuous-learning-v2/agents/observer.md +137 -0
- package/template/.opencode/skills/continuous-learning-v2/agents/start-observer.sh +134 -0
- package/template/.opencode/skills/continuous-learning-v2/config.json +41 -0
- package/template/.opencode/skills/continuous-learning-v2/hooks/observe.sh +153 -0
- package/template/.opencode/skills/continuous-learning-v2/scripts/instinct-cli.py +489 -0
- package/template/.opencode/skills/continuous-learning-v2/scripts/test_parse_instinct.py +82 -0
- package/template/.opencode/skills/dart-add-unit-test/SKILL.md +122 -0
- package/template/.opencode/skills/dart-build-cli-app/SKILL.md +185 -0
- package/template/.opencode/skills/dart-collect-coverage/SKILL.md +141 -0
- package/template/.opencode/skills/dart-fix-runtime-errors/SKILL.md +166 -0
- package/template/.opencode/skills/dart-generate-test-mocks/SKILL.md +155 -0
- package/template/.opencode/skills/dart-migrate-to-checks-package/SKILL.md +126 -0
- package/template/.opencode/skills/dart-resolve-package-conflicts/SKILL.md +116 -0
- package/template/.opencode/skills/dart-run-static-analysis/SKILL.md +104 -0
- package/template/.opencode/skills/dart-use-pattern-matching/SKILL.md +146 -0
- package/template/.opencode/skills/django-patterns/SKILL.md +733 -0
- package/template/.opencode/skills/django-security/SKILL.md +592 -0
- package/template/.opencode/skills/django-tdd/SKILL.md +728 -0
- package/template/.opencode/skills/django-verification/SKILL.md +460 -0
- package/template/.opencode/skills/eval-harness/SKILL.md +227 -0
- package/template/.opencode/skills/firebase-basics/SKILL.md +103 -0
- package/template/.opencode/skills/firebase-basics/references/additional-skills.md +113 -0
- package/template/.opencode/skills/firebase-basics/references/cli-usage.md +31 -0
- package/template/.opencode/skills/firebase-basics/references/client-library-usage.md +45 -0
- package/template/.opencode/skills/firebase-basics/references/core-concepts.md +61 -0
- package/template/.opencode/skills/firebase-basics/references/iac-usage.md +40 -0
- package/template/.opencode/skills/firebase-basics/references/iam-security.md +74 -0
- package/template/.opencode/skills/firebase-basics/references/mcp-usage.md +63 -0
- package/template/.opencode/skills/flutter/SKILL.md +292 -0
- package/template/.opencode/skills/flutter-add-integration-test/SKILL.md +163 -0
- package/template/.opencode/skills/flutter-add-widget-preview/SKILL.md +145 -0
- package/template/.opencode/skills/flutter-add-widget-test/SKILL.md +154 -0
- package/template/.opencode/skills/flutter-apply-architecture-best-practices/SKILL.md +162 -0
- package/template/.opencode/skills/flutter-build-responsive-layout/SKILL.md +139 -0
- package/template/.opencode/skills/flutter-fix-layout-issues/SKILL.md +130 -0
- package/template/.opencode/skills/flutter-implement-json-serialization/SKILL.md +153 -0
- package/template/.opencode/skills/flutter-setup-declarative-routing/SKILL.md +255 -0
- package/template/.opencode/skills/flutter-setup-localization/SKILL.md +210 -0
- package/template/.opencode/skills/flutter-use-http-package/SKILL.md +174 -0
- package/template/.opencode/skills/frontend-design/SKILL.md +89 -0
- package/template/.opencode/skills/frontend-patterns/SKILL.md +631 -0
- package/template/.opencode/skills/golang-patterns/SKILL.md +673 -0
- package/template/.opencode/skills/golang-testing/SKILL.md +719 -0
- package/template/.opencode/skills/impeccable/SKILL.md +165 -0
- package/template/.opencode/skills/impeccable/agents/impeccable-asset-producer.md +101 -0
- package/template/.opencode/skills/impeccable/reference/adapt.md +190 -0
- package/template/.opencode/skills/impeccable/reference/animate.md +175 -0
- package/template/.opencode/skills/impeccable/reference/audit.md +133 -0
- package/template/.opencode/skills/impeccable/reference/bolder.md +113 -0
- package/template/.opencode/skills/impeccable/reference/brand.md +118 -0
- package/template/.opencode/skills/impeccable/reference/clarify.md +174 -0
- package/template/.opencode/skills/impeccable/reference/codex.md +105 -0
- package/template/.opencode/skills/impeccable/reference/cognitive-load.md +106 -0
- package/template/.opencode/skills/impeccable/reference/color-and-contrast.md +105 -0
- package/template/.opencode/skills/impeccable/reference/colorize.md +154 -0
- package/template/.opencode/skills/impeccable/reference/craft.md +123 -0
- package/template/.opencode/skills/impeccable/reference/critique.md +273 -0
- package/template/.opencode/skills/impeccable/reference/delight.md +302 -0
- package/template/.opencode/skills/impeccable/reference/distill.md +111 -0
- package/template/.opencode/skills/impeccable/reference/document.md +427 -0
- package/template/.opencode/skills/impeccable/reference/extract.md +69 -0
- package/template/.opencode/skills/impeccable/reference/harden.md +347 -0
- package/template/.opencode/skills/impeccable/reference/heuristics-scoring.md +234 -0
- package/template/.opencode/skills/impeccable/reference/interaction-design.md +195 -0
- package/template/.opencode/skills/impeccable/reference/layout.md +141 -0
- package/template/.opencode/skills/impeccable/reference/live.md +622 -0
- package/template/.opencode/skills/impeccable/reference/motion-design.md +109 -0
- package/template/.opencode/skills/impeccable/reference/onboard.md +234 -0
- package/template/.opencode/skills/impeccable/reference/optimize.md +258 -0
- package/template/.opencode/skills/impeccable/reference/overdrive.md +130 -0
- package/template/.opencode/skills/impeccable/reference/personas.md +179 -0
- package/template/.opencode/skills/impeccable/reference/polish.md +242 -0
- package/template/.opencode/skills/impeccable/reference/product.md +62 -0
- package/template/.opencode/skills/impeccable/reference/quieter.md +99 -0
- package/template/.opencode/skills/impeccable/reference/responsive-design.md +114 -0
- package/template/.opencode/skills/impeccable/reference/shape.md +165 -0
- package/template/.opencode/skills/impeccable/reference/spatial-design.md +100 -0
- package/template/.opencode/skills/impeccable/reference/teach.md +156 -0
- package/template/.opencode/skills/impeccable/reference/typeset.md +124 -0
- package/template/.opencode/skills/impeccable/reference/typography.md +159 -0
- package/template/.opencode/skills/impeccable/reference/ux-writing.md +107 -0
- package/template/.opencode/skills/impeccable/scripts/cleanup-deprecated.mjs +284 -0
- package/template/.opencode/skills/impeccable/scripts/command-metadata.json +94 -0
- package/template/.opencode/skills/impeccable/scripts/critique-storage.mjs +242 -0
- package/template/.opencode/skills/impeccable/scripts/design-parser.mjs +820 -0
- package/template/.opencode/skills/impeccable/scripts/detect-csp.mjs +198 -0
- package/template/.opencode/skills/impeccable/scripts/detect.mjs +21 -0
- package/template/.opencode/skills/impeccable/scripts/impeccable-paths.mjs +110 -0
- package/template/.opencode/skills/impeccable/scripts/is-generated.mjs +69 -0
- package/template/.opencode/skills/impeccable/scripts/live-accept.mjs +595 -0
- package/template/.opencode/skills/impeccable/scripts/live-browser-session.js +123 -0
- package/template/.opencode/skills/impeccable/scripts/live-browser.js +4860 -0
- package/template/.opencode/skills/impeccable/scripts/live-complete.mjs +75 -0
- package/template/.opencode/skills/impeccable/scripts/live-completion.mjs +18 -0
- package/template/.opencode/skills/impeccable/scripts/live-inject.mjs +446 -0
- package/template/.opencode/skills/impeccable/scripts/live-poll.mjs +200 -0
- package/template/.opencode/skills/impeccable/scripts/live-resume.mjs +48 -0
- package/template/.opencode/skills/impeccable/scripts/live-server.mjs +838 -0
- package/template/.opencode/skills/impeccable/scripts/live-session-store.mjs +254 -0
- package/template/.opencode/skills/impeccable/scripts/live-status.mjs +47 -0
- package/template/.opencode/skills/impeccable/scripts/live-wrap.mjs +632 -0
- package/template/.opencode/skills/impeccable/scripts/live.mjs +247 -0
- package/template/.opencode/skills/impeccable/scripts/load-context.mjs +141 -0
- package/template/.opencode/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/template/.opencode/skills/impeccable/scripts/pin.mjs +214 -0
- package/template/.opencode/skills/iterative-retrieval/SKILL.md +202 -0
- package/template/.opencode/skills/java-coding-standards/SKILL.md +138 -0
- package/template/.opencode/skills/jetpack-compose/.skillfish.json +10 -0
- package/template/.opencode/skills/jetpack-compose/SKILL.md +420 -0
- package/template/.opencode/skills/jpa-patterns/SKILL.md +141 -0
- package/template/.opencode/skills/nutrient-document-processing/SKILL.md +165 -0
- package/template/.opencode/skills/nuxt-ui/SKILL.md +334 -0
- package/template/.opencode/skills/nuxt-ui/references/components.md +377 -0
- package/template/.opencode/skills/nuxt-ui/references/composables.md +127 -0
- package/template/.opencode/skills/nuxt-ui/references/layouts/chat.md +266 -0
- package/template/.opencode/skills/nuxt-ui/references/layouts/dashboard.md +220 -0
- package/template/.opencode/skills/nuxt-ui/references/layouts/docs.md +141 -0
- package/template/.opencode/skills/nuxt-ui/references/layouts/editor.md +168 -0
- package/template/.opencode/skills/nuxt-ui/references/layouts/page.md +260 -0
- package/template/.opencode/skills/nuxt-ui/references/theming.md +427 -0
- package/template/.opencode/skills/postgres-patterns/SKILL.md +146 -0
- package/template/.opencode/skills/project-guidelines-example/SKILL.md +345 -0
- package/template/.opencode/skills/python-patterns/SKILL.md +749 -0
- package/template/.opencode/skills/python-testing/SKILL.md +815 -0
- package/template/.opencode/skills/security-review/SKILL.md +494 -0
- package/template/.opencode/skills/security-review/cloud-infrastructure-security.md +361 -0
- package/template/.opencode/skills/shadcn-ui/README.md +248 -0
- package/template/.opencode/skills/shadcn-ui/SKILL.md +326 -0
- package/template/.opencode/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
- package/template/.opencode/skills/shadcn-ui/examples/data-table.tsx +313 -0
- package/template/.opencode/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
- package/template/.opencode/skills/shadcn-ui/resources/component-catalog.md +481 -0
- package/template/.opencode/skills/shadcn-ui/resources/customization-guide.md +516 -0
- package/template/.opencode/skills/shadcn-ui/resources/migration-guide.md +463 -0
- package/template/.opencode/skills/shadcn-ui/resources/setup-guide.md +412 -0
- package/template/.opencode/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
- package/template/.opencode/skills/springboot-patterns/SKILL.md +304 -0
- package/template/.opencode/skills/springboot-security/SKILL.md +119 -0
- package/template/.opencode/skills/springboot-tdd/SKILL.md +157 -0
- package/template/.opencode/skills/springboot-verification/SKILL.md +100 -0
- package/template/.opencode/skills/strategic-compact/SKILL.md +63 -0
- package/template/.opencode/skills/strategic-compact/suggest-compact.sh +52 -0
- package/template/.opencode/skills/tdd-workflow/SKILL.md +409 -0
- package/template/.opencode/skills/vercel-composition-patterns/AGENTS.md +946 -0
- package/template/.opencode/skills/vercel-composition-patterns/SKILL.md +89 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/architecture-compound-components.md +112 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/patterns-children-over-render-props.md +87 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/patterns-explicit-variants.md +100 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/react19-no-forwardref.md +42 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/state-context-interface.md +191 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/state-decouple-implementation.md +113 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/state-lift-state.md +125 -0
- package/template/.opencode/skills/vercel-react-best-practices/AGENTS.md +2934 -0
- package/template/.opencode/skills/vercel-react-best-practices/SKILL.md +136 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
- package/template/.opencode/skills/verification-loop/SKILL.md +120 -0
- package/template/.opencode/skills/web-design-guidelines/SKILL.md +39 -0
- package/template/AGENTS.md +32 -0
- package/template/opencode.json +354 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Enforce TDD workflow for Go. Write table-driven tests first, then implement. Verify 80%+ coverage with go test -cover.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Go TDD Command
|
|
6
|
+
|
|
7
|
+
This command enforces test-driven development methodology for Go code using idiomatic Go testing patterns.
|
|
8
|
+
|
|
9
|
+
## What This Command Does
|
|
10
|
+
|
|
11
|
+
1. **Define Types/Interfaces**: Scaffold function signatures first
|
|
12
|
+
2. **Write Table-Driven Tests**: Create comprehensive test cases (RED)
|
|
13
|
+
3. **Run Tests**: Verify tests fail for the right reason
|
|
14
|
+
4. **Implement Code**: Write minimal code to pass (GREEN)
|
|
15
|
+
5. **Refactor**: Improve while keeping tests green
|
|
16
|
+
6. **Check Coverage**: Ensure 80%+ coverage
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
|
|
20
|
+
Use `/go-test` when:
|
|
21
|
+
- Implementing new Go functions
|
|
22
|
+
- Adding test coverage to existing code
|
|
23
|
+
- Fixing bugs (write failing test first)
|
|
24
|
+
- Building critical business logic
|
|
25
|
+
- Learning TDD workflow in Go
|
|
26
|
+
|
|
27
|
+
## TDD Cycle
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
RED → Write failing table-driven test
|
|
31
|
+
GREEN → Implement minimal code to pass
|
|
32
|
+
REFACTOR → Improve code, tests stay green
|
|
33
|
+
REPEAT → Next test case
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Example Session
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
User: /go-test I need a function to validate email addresses
|
|
40
|
+
|
|
41
|
+
Agent:
|
|
42
|
+
# TDD Session: Email Validator
|
|
43
|
+
|
|
44
|
+
## Step 1: Define Interface
|
|
45
|
+
|
|
46
|
+
```go
|
|
47
|
+
// validator/email.go
|
|
48
|
+
package validator
|
|
49
|
+
|
|
50
|
+
// ValidateEmail checks if the given string is a valid email address.
|
|
51
|
+
// Returns nil if valid, error describing the issue otherwise.
|
|
52
|
+
func ValidateEmail(email string) error {
|
|
53
|
+
panic("not implemented")
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Step 2: Write Table-Driven Tests (RED)
|
|
58
|
+
|
|
59
|
+
```go
|
|
60
|
+
// validator/email_test.go
|
|
61
|
+
package validator
|
|
62
|
+
|
|
63
|
+
import (
|
|
64
|
+
"testing"
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
func TestValidateEmail(t *testing.T) {
|
|
68
|
+
tests := []struct {
|
|
69
|
+
name string
|
|
70
|
+
email string
|
|
71
|
+
wantErr bool
|
|
72
|
+
}{
|
|
73
|
+
// Valid emails
|
|
74
|
+
{"simple email", "user@example.com", false},
|
|
75
|
+
{"with subdomain", "user@mail.example.com", false},
|
|
76
|
+
{"with plus", "user+tag@example.com", false},
|
|
77
|
+
{"with dots", "first.last@example.com", false},
|
|
78
|
+
|
|
79
|
+
// Invalid emails
|
|
80
|
+
{"empty string", "", true},
|
|
81
|
+
{"no at sign", "userexample.com", true},
|
|
82
|
+
{"no domain", "user@", true},
|
|
83
|
+
{"no local part", "@example.com", true},
|
|
84
|
+
{"double at", "user@@example.com", true},
|
|
85
|
+
{"spaces", "user @example.com", true},
|
|
86
|
+
{"no tld", "user@example", true},
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
for _, tt := range tests {
|
|
90
|
+
t.Run(tt.name, func(t *testing.T) {
|
|
91
|
+
err := ValidateEmail(tt.email)
|
|
92
|
+
if tt.wantErr && err == nil {
|
|
93
|
+
t.Errorf("ValidateEmail(%q) = nil; want error", tt.email)
|
|
94
|
+
}
|
|
95
|
+
if !tt.wantErr && err != nil {
|
|
96
|
+
t.Errorf("ValidateEmail(%q) = %v; want nil", tt.email, err)
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Step 3: Run Tests - Verify FAIL
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
$ go test ./validator/...
|
|
107
|
+
|
|
108
|
+
--- FAIL: TestValidateEmail (0.00s)
|
|
109
|
+
--- FAIL: TestValidateEmail/simple_email (0.00s)
|
|
110
|
+
panic: not implemented
|
|
111
|
+
|
|
112
|
+
FAIL
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
✓ Tests fail as expected (panic).
|
|
116
|
+
|
|
117
|
+
## Step 4: Implement Minimal Code (GREEN)
|
|
118
|
+
|
|
119
|
+
```go
|
|
120
|
+
// validator/email.go
|
|
121
|
+
package validator
|
|
122
|
+
|
|
123
|
+
import (
|
|
124
|
+
"errors"
|
|
125
|
+
"regexp"
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
var emailRegex = regexp.MustCompile(`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`)
|
|
129
|
+
|
|
130
|
+
var (
|
|
131
|
+
ErrEmailEmpty = errors.New("email cannot be empty")
|
|
132
|
+
ErrEmailInvalid = errors.New("email format is invalid")
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
func ValidateEmail(email string) error {
|
|
136
|
+
if email == "" {
|
|
137
|
+
return ErrEmailEmpty
|
|
138
|
+
}
|
|
139
|
+
if !emailRegex.MatchString(email) {
|
|
140
|
+
return ErrEmailInvalid
|
|
141
|
+
}
|
|
142
|
+
return nil
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Step 5: Run Tests - Verify PASS
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
$ go test ./validator/...
|
|
150
|
+
|
|
151
|
+
PASS
|
|
152
|
+
ok project/validator 0.003s
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
✓ All tests passing!
|
|
156
|
+
|
|
157
|
+
## Step 6: Check Coverage
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
$ go test -cover ./validator/...
|
|
161
|
+
|
|
162
|
+
PASS
|
|
163
|
+
coverage: 100.0% of statements
|
|
164
|
+
ok project/validator 0.003s
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
✓ Coverage: 100%
|
|
168
|
+
|
|
169
|
+
## TDD Complete!
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Test Patterns
|
|
173
|
+
|
|
174
|
+
### Table-Driven Tests
|
|
175
|
+
```go
|
|
176
|
+
tests := []struct {
|
|
177
|
+
name string
|
|
178
|
+
input InputType
|
|
179
|
+
want OutputType
|
|
180
|
+
wantErr bool
|
|
181
|
+
}{
|
|
182
|
+
{"case 1", input1, want1, false},
|
|
183
|
+
{"case 2", input2, want2, true},
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
for _, tt := range tests {
|
|
187
|
+
t.Run(tt.name, func(t *testing.T) {
|
|
188
|
+
got, err := Function(tt.input)
|
|
189
|
+
// assertions
|
|
190
|
+
})
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Parallel Tests
|
|
195
|
+
```go
|
|
196
|
+
for _, tt := range tests {
|
|
197
|
+
tt := tt // Capture
|
|
198
|
+
t.Run(tt.name, func(t *testing.T) {
|
|
199
|
+
t.Parallel()
|
|
200
|
+
// test body
|
|
201
|
+
})
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Test Helpers
|
|
206
|
+
```go
|
|
207
|
+
func setupTestDB(t *testing.T) *sql.DB {
|
|
208
|
+
t.Helper()
|
|
209
|
+
db := createDB()
|
|
210
|
+
t.Cleanup(func() { db.Close() })
|
|
211
|
+
return db
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
## Coverage Commands
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# Basic coverage
|
|
219
|
+
go test -cover ./...
|
|
220
|
+
|
|
221
|
+
# Coverage profile
|
|
222
|
+
go test -coverprofile=coverage.out ./...
|
|
223
|
+
|
|
224
|
+
# View in browser
|
|
225
|
+
go tool cover -html=coverage.out
|
|
226
|
+
|
|
227
|
+
# Coverage by function
|
|
228
|
+
go tool cover -func=coverage.out
|
|
229
|
+
|
|
230
|
+
# With race detection
|
|
231
|
+
go test -race -cover ./...
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
## Coverage Targets
|
|
235
|
+
|
|
236
|
+
| Code Type | Target |
|
|
237
|
+
|-----------|--------|
|
|
238
|
+
| Critical business logic | 100% |
|
|
239
|
+
| Public APIs | 90%+ |
|
|
240
|
+
| General code | 80%+ |
|
|
241
|
+
| Generated code | Exclude |
|
|
242
|
+
|
|
243
|
+
## TDD Best Practices
|
|
244
|
+
|
|
245
|
+
**DO:**
|
|
246
|
+
- Write test FIRST, before any implementation
|
|
247
|
+
- Run tests after each change
|
|
248
|
+
- Use table-driven tests for comprehensive coverage
|
|
249
|
+
- Test behavior, not implementation details
|
|
250
|
+
- Include edge cases (empty, nil, max values)
|
|
251
|
+
|
|
252
|
+
**DON'T:**
|
|
253
|
+
- Write implementation before tests
|
|
254
|
+
- Skip the RED phase
|
|
255
|
+
- Test private functions directly
|
|
256
|
+
- Use `time.Sleep` in tests
|
|
257
|
+
- Ignore flaky tests
|
|
258
|
+
|
|
259
|
+
## Related Commands
|
|
260
|
+
|
|
261
|
+
- `/go-build` - Fix build errors
|
|
262
|
+
- `/go-review` - Review code after implementation
|
|
263
|
+
- `/verify` - Run full verification loop
|
|
264
|
+
|
|
265
|
+
## Related
|
|
266
|
+
|
|
267
|
+
- Skill: `skills/golang-testing/`
|
|
268
|
+
- Skill: `skills/tdd-workflow/`
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Google Play Release Command
|
|
2
|
+
|
|
3
|
+
Publish Android app to Google Play Console via GPC.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
```
|
|
7
|
+
/gpc-release [track=internal]
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Track Options
|
|
11
|
+
- `internal` — Internal testing (default)
|
|
12
|
+
- `alpha` — Closed alpha testing
|
|
13
|
+
- `beta` — Open beta testing
|
|
14
|
+
- `production` — Production rollout
|
|
15
|
+
|
|
16
|
+
## Pre-flight
|
|
17
|
+
1. Run `gpc preflight` — check AAB/APK compliance
|
|
18
|
+
2. Verify signing key consistency
|
|
19
|
+
3. Check version code is incremented
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
1. Build AAB: `flutter build appbundle` or `./gradlew bundleRelease`
|
|
23
|
+
2. Preflight: `gpc preflight build/app/outputs/bundle/release/app-release.aab`
|
|
24
|
+
3. Upload: `gpc publish --track {track}`
|
|
25
|
+
4. Release: `gpc release promote --from internal --to alpha` (if promoting)
|
|
26
|
+
|
|
27
|
+
## Verification
|
|
28
|
+
- Upload successful with correct version code
|
|
29
|
+
- Release notes populated
|
|
30
|
+
- Rollout percentage confirmed
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: instinct-export
|
|
3
|
+
description: Export instincts for sharing with teammates or other projects
|
|
4
|
+
command: /instinct-export
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Instinct Export Command
|
|
8
|
+
|
|
9
|
+
Exports instincts to a shareable format. Perfect for:
|
|
10
|
+
- Sharing with teammates
|
|
11
|
+
- Transferring to a new machine
|
|
12
|
+
- Contributing to project conventions
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
/instinct-export # Export all personal instincts
|
|
18
|
+
/instinct-export --domain testing # Export only testing instincts
|
|
19
|
+
/instinct-export --min-confidence 0.7 # Only export high-confidence instincts
|
|
20
|
+
/instinct-export --output team-instincts.yaml
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## What to Do
|
|
24
|
+
|
|
25
|
+
1. Read instincts from `~/.claude/homunculus/instincts/personal/`
|
|
26
|
+
2. Filter based on flags
|
|
27
|
+
3. Strip sensitive information:
|
|
28
|
+
- Remove session IDs
|
|
29
|
+
- Remove file paths (keep only patterns)
|
|
30
|
+
- Remove timestamps older than "last week"
|
|
31
|
+
4. Generate export file
|
|
32
|
+
|
|
33
|
+
## Output Format
|
|
34
|
+
|
|
35
|
+
Creates a YAML file:
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
# Instincts Export
|
|
39
|
+
# Generated: 2025-01-22
|
|
40
|
+
# Source: personal
|
|
41
|
+
# Count: 12 instincts
|
|
42
|
+
|
|
43
|
+
version: "2.0"
|
|
44
|
+
exported_by: "continuous-learning-v2"
|
|
45
|
+
export_date: "2025-01-22T10:30:00Z"
|
|
46
|
+
|
|
47
|
+
instincts:
|
|
48
|
+
- id: prefer-functional-style
|
|
49
|
+
trigger: "when writing new functions"
|
|
50
|
+
action: "Use functional patterns over classes"
|
|
51
|
+
confidence: 0.8
|
|
52
|
+
domain: code-style
|
|
53
|
+
observations: 8
|
|
54
|
+
|
|
55
|
+
- id: test-first-workflow
|
|
56
|
+
trigger: "when adding new functionality"
|
|
57
|
+
action: "Write test first, then implementation"
|
|
58
|
+
confidence: 0.9
|
|
59
|
+
domain: testing
|
|
60
|
+
observations: 12
|
|
61
|
+
|
|
62
|
+
- id: grep-before-edit
|
|
63
|
+
trigger: "when modifying code"
|
|
64
|
+
action: "Search with Grep, confirm with Read, then Edit"
|
|
65
|
+
confidence: 0.7
|
|
66
|
+
domain: workflow
|
|
67
|
+
observations: 6
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Privacy Considerations
|
|
71
|
+
|
|
72
|
+
Exports include:
|
|
73
|
+
- ✅ Trigger patterns
|
|
74
|
+
- ✅ Actions
|
|
75
|
+
- ✅ Confidence scores
|
|
76
|
+
- ✅ Domains
|
|
77
|
+
- ✅ Observation counts
|
|
78
|
+
|
|
79
|
+
Exports do NOT include:
|
|
80
|
+
- ❌ Actual code snippets
|
|
81
|
+
- ❌ File paths
|
|
82
|
+
- ❌ Session transcripts
|
|
83
|
+
- ❌ Personal identifiers
|
|
84
|
+
|
|
85
|
+
## Flags
|
|
86
|
+
|
|
87
|
+
- `--domain <name>`: Export only specified domain
|
|
88
|
+
- `--min-confidence <n>`: Minimum confidence threshold (default: 0.3)
|
|
89
|
+
- `--output <file>`: Output file path (default: instincts-export-YYYYMMDD.yaml)
|
|
90
|
+
- `--format <yaml|json|md>`: Output format (default: yaml)
|
|
91
|
+
- `--include-evidence`: Include evidence text (default: excluded)
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: instinct-import
|
|
3
|
+
description: Import instincts from teammates, Skill Creator, or other sources
|
|
4
|
+
command: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Instinct Import Command
|
|
8
|
+
|
|
9
|
+
## Implementation
|
|
10
|
+
|
|
11
|
+
Run the instinct CLI using the plugin root path:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/scripts/instinct-cli.py" import <file-or-url> [--dry-run] [--force] [--min-confidence 0.7]
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or if `CLAUDE_PLUGIN_ROOT` is not set (manual installation):
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py import <file-or-url>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Import instincts from:
|
|
24
|
+
- Teammates' exports
|
|
25
|
+
- Skill Creator (repo analysis)
|
|
26
|
+
- Community collections
|
|
27
|
+
- Previous machine backups
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
/instinct-import team-instincts.yaml
|
|
33
|
+
/instinct-import https://github.com/org/repo/instincts.yaml
|
|
34
|
+
/instinct-import --from-skill-creator acme/webapp
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## What to Do
|
|
38
|
+
|
|
39
|
+
1. Fetch the instinct file (local path or URL)
|
|
40
|
+
2. Parse and validate the format
|
|
41
|
+
3. Check for duplicates with existing instincts
|
|
42
|
+
4. Merge or add new instincts
|
|
43
|
+
5. Save to `~/.claude/homunculus/instincts/inherited/`
|
|
44
|
+
|
|
45
|
+
## Import Process
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
📥 Importing instincts from: team-instincts.yaml
|
|
49
|
+
================================================
|
|
50
|
+
|
|
51
|
+
Found 12 instincts to import.
|
|
52
|
+
|
|
53
|
+
Analyzing conflicts...
|
|
54
|
+
|
|
55
|
+
## New Instincts (8)
|
|
56
|
+
These will be added:
|
|
57
|
+
✓ use-zod-validation (confidence: 0.7)
|
|
58
|
+
✓ prefer-named-exports (confidence: 0.65)
|
|
59
|
+
✓ test-async-functions (confidence: 0.8)
|
|
60
|
+
...
|
|
61
|
+
|
|
62
|
+
## Duplicate Instincts (3)
|
|
63
|
+
Already have similar instincts:
|
|
64
|
+
⚠️ prefer-functional-style
|
|
65
|
+
Local: 0.8 confidence, 12 observations
|
|
66
|
+
Import: 0.7 confidence
|
|
67
|
+
→ Keep local (higher confidence)
|
|
68
|
+
|
|
69
|
+
⚠️ test-first-workflow
|
|
70
|
+
Local: 0.75 confidence
|
|
71
|
+
Import: 0.9 confidence
|
|
72
|
+
→ Update to import (higher confidence)
|
|
73
|
+
|
|
74
|
+
## Conflicting Instincts (1)
|
|
75
|
+
These contradict local instincts:
|
|
76
|
+
❌ use-classes-for-services
|
|
77
|
+
Conflicts with: avoid-classes
|
|
78
|
+
→ Skip (requires manual resolution)
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
Import 8 new, update 1, skip 3?
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Merge Strategies
|
|
85
|
+
|
|
86
|
+
### For Duplicates
|
|
87
|
+
When importing an instinct that matches an existing one:
|
|
88
|
+
- **Higher confidence wins**: Keep the one with higher confidence
|
|
89
|
+
- **Merge evidence**: Combine observation counts
|
|
90
|
+
- **Update timestamp**: Mark as recently validated
|
|
91
|
+
|
|
92
|
+
### For Conflicts
|
|
93
|
+
When importing an instinct that contradicts an existing one:
|
|
94
|
+
- **Skip by default**: Don't import conflicting instincts
|
|
95
|
+
- **Flag for review**: Mark both as needing attention
|
|
96
|
+
- **Manual resolution**: User decides which to keep
|
|
97
|
+
|
|
98
|
+
## Source Tracking
|
|
99
|
+
|
|
100
|
+
Imported instincts are marked with:
|
|
101
|
+
```yaml
|
|
102
|
+
source: "inherited"
|
|
103
|
+
imported_from: "team-instincts.yaml"
|
|
104
|
+
imported_at: "2025-01-22T10:30:00Z"
|
|
105
|
+
original_source: "session-observation" # or "repo-analysis"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Skill Creator Integration
|
|
109
|
+
|
|
110
|
+
When importing from Skill Creator:
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
/instinct-import --from-skill-creator acme/webapp
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
This fetches instincts generated from repo analysis:
|
|
117
|
+
- Source: `repo-analysis`
|
|
118
|
+
- Higher initial confidence (0.7+)
|
|
119
|
+
- Linked to source repository
|
|
120
|
+
|
|
121
|
+
## Flags
|
|
122
|
+
|
|
123
|
+
- `--dry-run`: Preview without importing
|
|
124
|
+
- `--force`: Import even if conflicts exist
|
|
125
|
+
- `--merge-strategy <higher|local|import>`: How to handle duplicates
|
|
126
|
+
- `--from-skill-creator <owner/repo>`: Import from Skill Creator analysis
|
|
127
|
+
- `--min-confidence <n>`: Only import instincts above threshold
|
|
128
|
+
|
|
129
|
+
## Output
|
|
130
|
+
|
|
131
|
+
After import:
|
|
132
|
+
```
|
|
133
|
+
✅ Import complete!
|
|
134
|
+
|
|
135
|
+
Added: 8 instincts
|
|
136
|
+
Updated: 1 instinct
|
|
137
|
+
Skipped: 3 instincts (2 duplicates, 1 conflict)
|
|
138
|
+
|
|
139
|
+
New instincts saved to: ~/.claude/homunculus/instincts/inherited/
|
|
140
|
+
|
|
141
|
+
Run /instinct-status to see all instincts.
|
|
142
|
+
```
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: instinct-status
|
|
3
|
+
description: Show all learned instincts with their confidence levels
|
|
4
|
+
command: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Instinct Status Command
|
|
8
|
+
|
|
9
|
+
Shows all learned instincts with their confidence scores, grouped by domain.
|
|
10
|
+
|
|
11
|
+
## Implementation
|
|
12
|
+
|
|
13
|
+
Run the instinct CLI using the plugin root path:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
python3 "${CLAUDE_PLUGIN_ROOT}/skills/continuous-learning-v2/scripts/instinct-cli.py" status
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Or if `CLAUDE_PLUGIN_ROOT` is not set (manual installation), use:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
python3 ~/.claude/skills/continuous-learning-v2/scripts/instinct-cli.py status
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
/instinct-status
|
|
29
|
+
/instinct-status --domain code-style
|
|
30
|
+
/instinct-status --low-confidence
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## What to Do
|
|
34
|
+
|
|
35
|
+
1. Read all instinct files from `~/.claude/homunculus/instincts/personal/`
|
|
36
|
+
2. Read inherited instincts from `~/.claude/homunculus/instincts/inherited/`
|
|
37
|
+
3. Display them grouped by domain with confidence bars
|
|
38
|
+
|
|
39
|
+
## Output Format
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
📊 Instinct Status
|
|
43
|
+
==================
|
|
44
|
+
|
|
45
|
+
## Code Style (4 instincts)
|
|
46
|
+
|
|
47
|
+
### prefer-functional-style
|
|
48
|
+
Trigger: when writing new functions
|
|
49
|
+
Action: Use functional patterns over classes
|
|
50
|
+
Confidence: ████████░░ 80%
|
|
51
|
+
Source: session-observation | Last updated: 2025-01-22
|
|
52
|
+
|
|
53
|
+
### use-path-aliases
|
|
54
|
+
Trigger: when importing modules
|
|
55
|
+
Action: Use @/ path aliases instead of relative imports
|
|
56
|
+
Confidence: ██████░░░░ 60%
|
|
57
|
+
Source: repo-analysis (github.com/acme/webapp)
|
|
58
|
+
|
|
59
|
+
## Testing (2 instincts)
|
|
60
|
+
|
|
61
|
+
### test-first-workflow
|
|
62
|
+
Trigger: when adding new functionality
|
|
63
|
+
Action: Write test first, then implementation
|
|
64
|
+
Confidence: █████████░ 90%
|
|
65
|
+
Source: session-observation
|
|
66
|
+
|
|
67
|
+
## Workflow (3 instincts)
|
|
68
|
+
|
|
69
|
+
### grep-before-edit
|
|
70
|
+
Trigger: when modifying code
|
|
71
|
+
Action: Search with Grep, confirm with Read, then Edit
|
|
72
|
+
Confidence: ███████░░░ 70%
|
|
73
|
+
Source: session-observation
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
Total: 9 instincts (4 personal, 5 inherited)
|
|
77
|
+
Observer: Running (last analysis: 5 min ago)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Flags
|
|
81
|
+
|
|
82
|
+
- `--domain <name>`: Filter by domain (code-style, testing, git, etc.)
|
|
83
|
+
- `--low-confidence`: Show only instincts with confidence < 0.5
|
|
84
|
+
- `--high-confidence`: Show only instincts with confidence >= 0.7
|
|
85
|
+
- `--source <type>`: Filter by source (session-observation, repo-analysis, inherited)
|
|
86
|
+
- `--json`: Output as JSON for programmatic use
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# /learn - Extract Reusable Patterns
|
|
2
|
+
|
|
3
|
+
Analyze the current session and extract any patterns worth saving as skills.
|
|
4
|
+
|
|
5
|
+
## Trigger
|
|
6
|
+
|
|
7
|
+
Run `/learn` at any point during a session when you've solved a non-trivial problem.
|
|
8
|
+
|
|
9
|
+
## What to Extract
|
|
10
|
+
|
|
11
|
+
Look for:
|
|
12
|
+
|
|
13
|
+
1. **Error Resolution Patterns**
|
|
14
|
+
- What error occurred?
|
|
15
|
+
- What was the root cause?
|
|
16
|
+
- What fixed it?
|
|
17
|
+
- Is this reusable for similar errors?
|
|
18
|
+
|
|
19
|
+
2. **Debugging Techniques**
|
|
20
|
+
- Non-obvious debugging steps
|
|
21
|
+
- Tool combinations that worked
|
|
22
|
+
- Diagnostic patterns
|
|
23
|
+
|
|
24
|
+
3. **Workarounds**
|
|
25
|
+
- Library quirks
|
|
26
|
+
- API limitations
|
|
27
|
+
- Version-specific fixes
|
|
28
|
+
|
|
29
|
+
4. **Project-Specific Patterns**
|
|
30
|
+
- Codebase conventions discovered
|
|
31
|
+
- Architecture decisions made
|
|
32
|
+
- Integration patterns
|
|
33
|
+
|
|
34
|
+
## Output Format
|
|
35
|
+
|
|
36
|
+
Create a skill file at `~/.claude/skills/learned/[pattern-name].md`:
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
# [Descriptive Pattern Name]
|
|
40
|
+
|
|
41
|
+
**Extracted:** [Date]
|
|
42
|
+
**Context:** [Brief description of when this applies]
|
|
43
|
+
|
|
44
|
+
## Problem
|
|
45
|
+
[What problem this solves - be specific]
|
|
46
|
+
|
|
47
|
+
## Solution
|
|
48
|
+
[The pattern/technique/workaround]
|
|
49
|
+
|
|
50
|
+
## Example
|
|
51
|
+
[Code example if applicable]
|
|
52
|
+
|
|
53
|
+
## When to Use
|
|
54
|
+
[Trigger conditions - what should activate this skill]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Process
|
|
58
|
+
|
|
59
|
+
1. Review the session for extractable patterns
|
|
60
|
+
2. Identify the most valuable/reusable insight
|
|
61
|
+
3. Draft the skill file
|
|
62
|
+
4. Ask user to confirm before saving
|
|
63
|
+
5. Save to `~/.claude/skills/learned/`
|
|
64
|
+
|
|
65
|
+
## Notes
|
|
66
|
+
|
|
67
|
+
- Don't extract trivial fixes (typos, simple syntax errors)
|
|
68
|
+
- Don't extract one-time issues (specific API outages, etc.)
|
|
69
|
+
- Focus on patterns that will save time in future sessions
|
|
70
|
+
- Keep skills focused - one pattern per skill
|