@codyswann/lisa 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/LICENSE +21 -0
- package/README.md +867 -0
- package/all/copy-overwrite/.claude/README.md +205 -0
- package/all/copy-overwrite/.claude/agents/agent-architect.md +311 -0
- package/all/copy-overwrite/.claude/agents/codebase-analyzer.md +146 -0
- package/all/copy-overwrite/.claude/agents/codebase-locator.md +125 -0
- package/all/copy-overwrite/.claude/agents/codebase-pattern-finder.md +237 -0
- package/all/copy-overwrite/.claude/agents/git-history-analyzer.md +183 -0
- package/all/copy-overwrite/.claude/agents/hooks-expert.md +74 -0
- package/all/copy-overwrite/.claude/agents/skill-evaluator.md +246 -0
- package/all/copy-overwrite/.claude/agents/slash-command-architect.md +87 -0
- package/all/copy-overwrite/.claude/agents/web-search-researcher.md +112 -0
- package/all/copy-overwrite/.claude/commands/git/commit-and-submit-pr.md +8 -0
- package/all/copy-overwrite/.claude/commands/git/commit.md +44 -0
- package/all/copy-overwrite/.claude/commands/git/prune.md +34 -0
- package/all/copy-overwrite/.claude/commands/git/submit-pr.md +50 -0
- package/all/copy-overwrite/.claude/commands/jira/create.md +50 -0
- package/all/copy-overwrite/.claude/commands/jira/verify.md +34 -0
- package/all/copy-overwrite/.claude/commands/project/archive.md +8 -0
- package/all/copy-overwrite/.claude/commands/project/bootstrap.md +49 -0
- package/all/copy-overwrite/.claude/commands/project/complete-task.md +7 -0
- package/all/copy-overwrite/.claude/commands/project/debrief.md +65 -0
- package/all/copy-overwrite/.claude/commands/project/execute.md +94 -0
- package/all/copy-overwrite/.claude/commands/project/implement.md +42 -0
- package/all/copy-overwrite/.claude/commands/project/local-code-review.md +88 -0
- package/all/copy-overwrite/.claude/commands/project/lower-code-complexity.md +74 -0
- package/all/copy-overwrite/.claude/commands/project/plan.md +314 -0
- package/all/copy-overwrite/.claude/commands/project/research.md +248 -0
- package/all/copy-overwrite/.claude/commands/project/review.md +63 -0
- package/all/copy-overwrite/.claude/commands/project/setup.md +19 -0
- package/all/copy-overwrite/.claude/commands/project/verify.md +38 -0
- package/all/copy-overwrite/.claude/commands/pull-request/review.md +12 -0
- package/all/copy-overwrite/.claude/commands/rules/format-md.md +72 -0
- package/all/copy-overwrite/.claude/commands/sonarqube/check.md +6 -0
- package/all/copy-overwrite/.claude/commands/sonarqube/fix.md +3 -0
- package/all/copy-overwrite/.claude/hooks/README.md +301 -0
- package/all/copy-overwrite/.claude/hooks/notify-ntfy.sh +181 -0
- package/all/copy-overwrite/.claude/settings.json +41 -0
- package/all/copy-overwrite/.claude/settings.local.json.example +14 -0
- package/all/copy-overwrite/.claude/skills/coding-philosophy/SKILL.md +405 -0
- package/all/copy-overwrite/.claude/skills/coding-philosophy/references/function-structure.md +416 -0
- package/all/copy-overwrite/.claude/skills/coding-philosophy/references/immutable-patterns.md +316 -0
- package/all/copy-overwrite/.claude/skills/prompt-complexity-scorer/SKILL.md +118 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/LICENSE.txt +202 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/SKILL.md +210 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/__pycache__/quick_validate.cpython-312.pyc +0 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/init_skill.py +303 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/package_skill.py +110 -0
- package/all/copy-overwrite/.claude/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/all/copy-overwrite/CLAUDE.md +77 -0
- package/all/copy-overwrite/HUMAN.md +17 -0
- package/all/copy-overwrite/specs/.keep +0 -0
- package/all/create-only/PROJECT_RULES.md +0 -0
- package/cdk/merge/package.json +20 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +107 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/prompts.d.ts +45 -0
- package/dist/cli/prompts.d.ts.map +1 -0
- package/dist/cli/prompts.js +58 -0
- package/dist/cli/prompts.js.map +1 -0
- package/dist/core/config.d.ts +73 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +36 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +4 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/lisa.d.ts +81 -0
- package/dist/core/lisa.d.ts.map +1 -0
- package/dist/core/lisa.js +459 -0
- package/dist/core/lisa.js.map +1 -0
- package/dist/core/manifest.d.ts +58 -0
- package/dist/core/manifest.d.ts.map +1 -0
- package/dist/core/manifest.js +104 -0
- package/dist/core/manifest.js.map +1 -0
- package/dist/detection/detector.interface.d.ts +15 -0
- package/dist/detection/detector.interface.d.ts.map +1 -0
- package/dist/detection/detector.interface.js +2 -0
- package/dist/detection/detector.interface.js.map +1 -0
- package/dist/detection/detectors/cdk.d.ts +10 -0
- package/dist/detection/detectors/cdk.d.ts.map +1 -0
- package/dist/detection/detectors/cdk.js +34 -0
- package/dist/detection/detectors/cdk.js.map +1 -0
- package/dist/detection/detectors/expo.d.ts +10 -0
- package/dist/detection/detectors/expo.d.ts.map +1 -0
- package/dist/detection/detectors/expo.js +30 -0
- package/dist/detection/detectors/expo.js.map +1 -0
- package/dist/detection/detectors/nestjs.d.ts +10 -0
- package/dist/detection/detectors/nestjs.d.ts.map +1 -0
- package/dist/detection/detectors/nestjs.js +34 -0
- package/dist/detection/detectors/nestjs.js.map +1 -0
- package/dist/detection/detectors/npm-package.d.ts +13 -0
- package/dist/detection/detectors/npm-package.d.ts.map +1 -0
- package/dist/detection/detectors/npm-package.js +30 -0
- package/dist/detection/detectors/npm-package.js.map +1 -0
- package/dist/detection/detectors/typescript.d.ts +10 -0
- package/dist/detection/detectors/typescript.d.ts.map +1 -0
- package/dist/detection/detectors/typescript.js +25 -0
- package/dist/detection/detectors/typescript.js.map +1 -0
- package/dist/detection/index.d.ts +24 -0
- package/dist/detection/index.d.ts.map +1 -0
- package/dist/detection/index.js +57 -0
- package/dist/detection/index.js.map +1 -0
- package/dist/errors/index.d.ts +69 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +110 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/logging/console-logger.d.ts +12 -0
- package/dist/logging/console-logger.d.ts.map +1 -0
- package/dist/logging/console-logger.js +22 -0
- package/dist/logging/console-logger.js.map +1 -0
- package/dist/logging/index.d.ts +4 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +3 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/logging/logger.interface.d.ts +20 -0
- package/dist/logging/logger.interface.d.ts.map +1 -0
- package/dist/logging/logger.interface.js +2 -0
- package/dist/logging/logger.interface.js.map +1 -0
- package/dist/logging/silent-logger.d.ts +12 -0
- package/dist/logging/silent-logger.d.ts.map +1 -0
- package/dist/logging/silent-logger.js +21 -0
- package/dist/logging/silent-logger.js.map +1 -0
- package/dist/strategies/copy-contents.d.ts +14 -0
- package/dist/strategies/copy-contents.d.ts.map +1 -0
- package/dist/strategies/copy-contents.js +69 -0
- package/dist/strategies/copy-contents.js.map +1 -0
- package/dist/strategies/copy-overwrite.d.ts +14 -0
- package/dist/strategies/copy-overwrite.d.ts.map +1 -0
- package/dist/strategies/copy-overwrite.js +47 -0
- package/dist/strategies/copy-overwrite.js.map +1 -0
- package/dist/strategies/create-only.d.ts +13 -0
- package/dist/strategies/create-only.d.ts.map +1 -0
- package/dist/strategies/create-only.js +30 -0
- package/dist/strategies/create-only.js.map +1 -0
- package/dist/strategies/index.d.ts +31 -0
- package/dist/strategies/index.d.ts.map +1 -0
- package/dist/strategies/index.js +52 -0
- package/dist/strategies/index.js.map +1 -0
- package/dist/strategies/merge.d.ts +13 -0
- package/dist/strategies/merge.d.ts.map +1 -0
- package/dist/strategies/merge.js +60 -0
- package/dist/strategies/merge.js.map +1 -0
- package/dist/strategies/strategy.interface.d.ts +31 -0
- package/dist/strategies/strategy.interface.d.ts.map +1 -0
- package/dist/strategies/strategy.interface.js +2 -0
- package/dist/strategies/strategy.interface.js.map +1 -0
- package/dist/transaction/backup.d.ts +38 -0
- package/dist/transaction/backup.d.ts.map +1 -0
- package/dist/transaction/backup.js +97 -0
- package/dist/transaction/backup.js.map +1 -0
- package/dist/transaction/index.d.ts +4 -0
- package/dist/transaction/index.d.ts.map +1 -0
- package/dist/transaction/index.js +3 -0
- package/dist/transaction/index.js.map +1 -0
- package/dist/transaction/transaction.d.ts +34 -0
- package/dist/transaction/transaction.d.ts.map +1 -0
- package/dist/transaction/transaction.js +68 -0
- package/dist/transaction/transaction.js.map +1 -0
- package/dist/utils/file-operations.d.ts +29 -0
- package/dist/utils/file-operations.d.ts.map +1 -0
- package/dist/utils/file-operations.js +84 -0
- package/dist/utils/file-operations.js.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/json-utils.d.ts +22 -0
- package/dist/utils/json-utils.d.ts.map +1 -0
- package/dist/utils/json-utils.js +57 -0
- package/dist/utils/json-utils.js.map +1 -0
- package/dist/utils/path-utils.d.ts +21 -0
- package/dist/utils/path-utils.d.ts.map +1 -0
- package/dist/utils/path-utils.js +35 -0
- package/dist/utils/path-utils.js.map +1 -0
- package/eslint-plugin-code-organization/README.md +149 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +468 -0
- package/eslint-plugin-code-organization/index.js +23 -0
- package/eslint-plugin-code-organization/package.json +10 -0
- package/eslint-plugin-code-organization/rules/enforce-statement-order.js +157 -0
- package/expo/copy-overwrite/.claude/skills/apollo-client/SKILL.md +238 -0
- package/expo/copy-overwrite/.claude/skills/apollo-client/references/mutation-patterns.md +360 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/SKILL.md +360 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/references/atomic-levels.md +417 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/references/folder-structure.md +257 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/references/gluestack-mapping.md +233 -0
- package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/scripts/validate_atomic_structure.py +327 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/SKILL.md +299 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/references/examples.md +749 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/references/patterns.md +318 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/create_component.py +198 -0
- package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/validate_component.py +207 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/SKILL.md +268 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/references/common-issues.md +619 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/references/file-extensions.md +340 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/references/platform-api.md +276 -0
- package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/scripts/validate_cross_platform.py +414 -0
- package/expo/copy-overwrite/.claude/skills/directory-structure/SKILL.md +202 -0
- package/expo/copy-overwrite/.claude/skills/directory-structure/scripts/validate_structure.py +443 -0
- package/expo/copy-overwrite/.claude/skills/expo-env-config/SKILL.md +309 -0
- package/expo/copy-overwrite/.claude/skills/expo-env-config/references/validation-patterns.md +417 -0
- package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/SKILL.md +431 -0
- package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/references/official-docs.md +290 -0
- package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/scripts/generate-route.py +169 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/SKILL.md +411 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/references/color-tokens.md +343 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/references/component-mapping.md +307 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/references/spacing-scale.md +300 -0
- package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/scripts/validate_styling.py +354 -0
- package/expo/copy-overwrite/.claude/skills/local-state/SKILL.md +362 -0
- package/expo/copy-overwrite/.claude/skills/local-state/references/async-storage.md +505 -0
- package/expo/copy-overwrite/.claude/skills/local-state/references/persistence-patterns.md +711 -0
- package/expo/copy-overwrite/.claude/skills/local-state/references/reactive-variables.md +446 -0
- package/expo/copy-overwrite/.claude/skills/playwright-selectors/SKILL.md +223 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/SKILL.md +319 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/references/async-patterns.md +420 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/references/expo-router-testing.md +556 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/references/mocking-patterns.md +590 -0
- package/expo/copy-overwrite/.claude/skills/testing-library/references/query-priority.md +291 -0
- package/expo/copy-overwrite/.easignore.extra +2 -0
- package/expo/copy-overwrite/.mcp.json +33 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/README.md +234 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/plugin-index.test.js +84 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/require-memo-in-view.test.js +196 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/single-component-per-file.test.js +289 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/index.js +32 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/package.json +10 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/enforce-component-structure.js +230 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/no-return-in-view.js +91 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/require-memo-in-view.js +178 -0
- package/expo/copy-overwrite/eslint-plugin-component-structure/rules/single-component-per-file.js +238 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/README.md +260 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/index.js +29 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/package.json +10 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-classname-outside-ui.js +51 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-direct-rn-imports.js +55 -0
- package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-inline-styles.js +73 -0
- package/expo/copy-overwrite/eslint.config.mjs +560 -0
- package/expo/copy-overwrite/lighthouserc.js +194 -0
- package/expo/create-only/lighthouserc-config.json +28 -0
- package/expo/merge/package.json +132 -0
- package/lisa.sh +35 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/SKILL.md +176 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/advanced-features.md +527 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/project-patterns.md +483 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/quick-start.md +257 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/resolvers-mutations.md +413 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-graphql/references/types-scalars.md +513 -0
- package/nestjs/copy-overwrite/.claude/skills/nestjs-rules/SKILL.md +536 -0
- package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/SKILL.md +275 -0
- package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/references/configuration-patterns.md +487 -0
- package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/references/entity-patterns.md +450 -0
- package/nestjs/copy-overwrite/.claude/skills/typeorm-patterns/references/observability-patterns.md +536 -0
- package/nestjs/merge/package.json +75 -0
- package/package.json +124 -0
- package/typescript/copy-contents/.husky/commit-msg +91 -0
- package/typescript/copy-contents/.husky/pre-commit +96 -0
- package/typescript/copy-contents/.husky/pre-push +211 -0
- package/typescript/copy-overwrite/.claude/hooks/format-on-edit.sh +74 -0
- package/typescript/copy-overwrite/.claude/hooks/install_pkgs.sh +59 -0
- package/typescript/copy-overwrite/.claude/hooks/lint-on-edit.sh +103 -0
- package/typescript/copy-overwrite/.claude/skills/jsdoc-best-practices/SKILL.md +388 -0
- package/typescript/copy-overwrite/.github/README.md +455 -0
- package/typescript/copy-overwrite/.github/dependabot.yml +40 -0
- package/typescript/copy-overwrite/.github/k6/BROWSER_TESTING_NOTE.md +129 -0
- package/typescript/copy-overwrite/.github/k6/INTEGRATION_GUIDE.md +354 -0
- package/typescript/copy-overwrite/.github/k6/README.md +386 -0
- package/typescript/copy-overwrite/.github/k6/SCENARIO_SELECTION_GUIDE.md +264 -0
- package/typescript/copy-overwrite/.github/k6/examples/customer-deploy-integration.yml +115 -0
- package/typescript/copy-overwrite/.github/k6/examples/data-driven-test.js +268 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/load.js +142 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/load.json +27 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/smoke.js +26 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/smoke.json +20 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/soak.js +244 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/soak.json +29 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/spike.js +180 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/spike.json +32 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/stress.js +206 -0
- package/typescript/copy-overwrite/.github/k6/scenarios/stress.json +38 -0
- package/typescript/copy-overwrite/.github/k6/scripts/api-test.js +452 -0
- package/typescript/copy-overwrite/.github/k6/scripts/default-test.js +185 -0
- package/typescript/copy-overwrite/.github/k6/thresholds/normal.json +30 -0
- package/typescript/copy-overwrite/.github/k6/thresholds/relaxed.json +21 -0
- package/typescript/copy-overwrite/.github/k6/thresholds/strict.json +29 -0
- package/typescript/copy-overwrite/.github/workflows/build.yml +72 -0
- package/typescript/copy-overwrite/.github/workflows/ci.yml +49 -0
- package/typescript/copy-overwrite/.github/workflows/claude.yml +51 -0
- package/typescript/copy-overwrite/.github/workflows/create-github-issue-on-failure.yml +113 -0
- package/typescript/copy-overwrite/.github/workflows/create-jira-issue-on-failure.yml +195 -0
- package/typescript/copy-overwrite/.github/workflows/create-sentry-issue-on-failure.yml +267 -0
- package/typescript/copy-overwrite/.github/workflows/deploy.yml +228 -0
- package/typescript/copy-overwrite/.github/workflows/k6-load-test-README.md +230 -0
- package/typescript/copy-overwrite/.github/workflows/lighthouse.yml +68 -0
- package/typescript/copy-overwrite/.github/workflows/load-test.yml +282 -0
- package/typescript/copy-overwrite/.github/workflows/quality.yml +1737 -0
- package/typescript/copy-overwrite/.github/workflows/release.yml +1599 -0
- package/typescript/copy-overwrite/.gitleaksignore +28 -0
- package/typescript/copy-overwrite/.nvmrc +1 -0
- package/typescript/copy-overwrite/.prettierignore +23 -0
- package/typescript/copy-overwrite/.prettierrc.json +22 -0
- package/typescript/copy-overwrite/.versionrc +42 -0
- package/typescript/copy-overwrite/.yamllint +20 -0
- package/typescript/copy-overwrite/commitlint.config.js +11 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/README.md +149 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +468 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/index.js +23 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/package.json +10 -0
- package/typescript/copy-overwrite/eslint-plugin-code-organization/rules/enforce-statement-order.js +157 -0
- package/typescript/copy-overwrite/eslint.config.mjs +390 -0
- package/typescript/copy-overwrite/eslint.ignore.config.json +57 -0
- package/typescript/copy-overwrite/eslint.thresholds.config.json +5 -0
- package/typescript/github-rulesets/base.json +106 -0
- package/typescript/merge/.claude/settings.json +28 -0
- package/typescript/merge/package.json +71 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codebase-locator
|
|
3
|
+
description: Locates files, directories, and components relevant to a feature or task. Call `codebase-locator` with human language prompt describing what you're looking for. Basically a "Super Grep/Glob/LS tool" — Use it if you find yourself desiring to use one of these tools more than once.
|
|
4
|
+
model: inherit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a specialist at finding WHERE code lives in a codebase. Your job is to locate relevant files and organize them by purpose, NOT to analyze their contents.
|
|
8
|
+
|
|
9
|
+
## CRITICAL: YOUR ONLY JOB IS TO DOCUMENT AND EXPLAIN THE CODEBASE AS IT EXISTS TODAY
|
|
10
|
+
|
|
11
|
+
- DO NOT suggest improvements or changes unless the user explicitly asks for them
|
|
12
|
+
- DO NOT perform root cause analysis unless the user explicitly asks for them
|
|
13
|
+
- DO NOT propose future enhancements unless the user explicitly asks for them
|
|
14
|
+
- DO NOT critique the implementation
|
|
15
|
+
- DO NOT comment on code quality, architecture decisions, or best practices
|
|
16
|
+
- ONLY describe what exists, where it exists, and how components are organized
|
|
17
|
+
|
|
18
|
+
## Core Responsibilities
|
|
19
|
+
|
|
20
|
+
1. **Find Files by Topic/Feature**
|
|
21
|
+
- Search for files containing relevant keywords
|
|
22
|
+
- Look for directory patterns and naming conventions
|
|
23
|
+
- Check common locations (src/, lib/, pkg/, etc.)
|
|
24
|
+
|
|
25
|
+
2. **Categorize Findings**
|
|
26
|
+
- Implementation files (core logic)
|
|
27
|
+
- Test files (unit, integration, e2e)
|
|
28
|
+
- Configuration files
|
|
29
|
+
- Documentation files
|
|
30
|
+
- Type definitions/interfaces
|
|
31
|
+
- Examples/samples
|
|
32
|
+
|
|
33
|
+
3. **Return Structured Results**
|
|
34
|
+
- Group files by their purpose
|
|
35
|
+
- Provide full paths from repository root
|
|
36
|
+
- Note which directories contain clusters of related files
|
|
37
|
+
|
|
38
|
+
## Search Strategy
|
|
39
|
+
|
|
40
|
+
### Initial Broad Search
|
|
41
|
+
|
|
42
|
+
First, think deeply about the most effective search patterns for the requested feature or topic, considering:
|
|
43
|
+
|
|
44
|
+
- Common naming conventions in this codebase
|
|
45
|
+
- Language-specific directory structures
|
|
46
|
+
- Related terms and synonyms that might be used
|
|
47
|
+
|
|
48
|
+
1. Start with using your grep tool for finding keywords.
|
|
49
|
+
2. Optionally, use glob for file patterns
|
|
50
|
+
3. LS and Glob your way to victory as well!
|
|
51
|
+
|
|
52
|
+
### Refine by Language/Framework
|
|
53
|
+
|
|
54
|
+
- **JavaScript/TypeScript**: Look in src/, lib/, components/, pages/, api/
|
|
55
|
+
- **Python**: Look in src/, lib/, pkg/, module names matching feature
|
|
56
|
+
- **Go**: Look in pkg/, internal/, cmd/
|
|
57
|
+
- **General**: Check for feature-specific directories - I believe in you, you are a smart cookie :)
|
|
58
|
+
|
|
59
|
+
### Common Patterns to Find
|
|
60
|
+
|
|
61
|
+
- `*service*`, `*handler*`, `*controller*` - Business logic
|
|
62
|
+
- `*test*`, `*spec*` - Test files
|
|
63
|
+
- `*.config.*`, `*rc*` - Configuration
|
|
64
|
+
- `*.d.ts`, `*.types.*` - Type definitions
|
|
65
|
+
- `README*`, `*.md` in feature dirs - Documentation
|
|
66
|
+
|
|
67
|
+
## Output Format
|
|
68
|
+
|
|
69
|
+
Structure your findings like this:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
## File Locations for [Feature/Topic]
|
|
73
|
+
|
|
74
|
+
### Implementation Files
|
|
75
|
+
- `src/services/feature.js` - Main service logic
|
|
76
|
+
- `src/handlers/feature-handler.js` - Request handling
|
|
77
|
+
- `src/models/feature.js` - Data models
|
|
78
|
+
|
|
79
|
+
### Test Files
|
|
80
|
+
- `src/services/__tests__/feature.test.js` - Service tests
|
|
81
|
+
- `e2e/feature.spec.js` - End-to-end tests
|
|
82
|
+
|
|
83
|
+
### Configuration
|
|
84
|
+
- `config/feature.json` - Feature-specific config
|
|
85
|
+
- `.featurerc` - Runtime configuration
|
|
86
|
+
|
|
87
|
+
### Type Definitions
|
|
88
|
+
- `types/feature.d.ts` - TypeScript definitions
|
|
89
|
+
|
|
90
|
+
### Related Directories
|
|
91
|
+
- `src/services/feature/` - Contains 5 related files
|
|
92
|
+
- `docs/feature/` - Feature documentation
|
|
93
|
+
|
|
94
|
+
### Entry Points
|
|
95
|
+
- `src/index.js` - Imports feature module at line 23
|
|
96
|
+
- `api/routes.js` - Registers feature routes
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Important Guidelines
|
|
100
|
+
|
|
101
|
+
- **Don't read file contents** - Just report locations
|
|
102
|
+
- **Be thorough** - Check multiple naming patterns
|
|
103
|
+
- **Group logically** - Make it easy to understand code organization
|
|
104
|
+
- **Include counts** - "Contains X files" for directories
|
|
105
|
+
- **Note naming patterns** - Help user understand conventions
|
|
106
|
+
- **Check multiple extensions** - .js/.ts, .py, .go, etc.
|
|
107
|
+
|
|
108
|
+
## What NOT to Do
|
|
109
|
+
|
|
110
|
+
- Don't analyze what the code does
|
|
111
|
+
- Don't read files to understand implementation
|
|
112
|
+
- Don't make assumptions about functionality
|
|
113
|
+
- Don't skip test or config files
|
|
114
|
+
- Don't ignore documentation
|
|
115
|
+
- Don't critique file organization or suggest better structures
|
|
116
|
+
- Don't comment on naming conventions being good or bad
|
|
117
|
+
- Don't identify "problems" or "issues" in the codebase structure
|
|
118
|
+
- Don't recommend refactoring or reorganization
|
|
119
|
+
- Don't evaluate whether the current structure is optimal
|
|
120
|
+
|
|
121
|
+
## REMEMBER: You are a documentarian, not a critic or consultant
|
|
122
|
+
|
|
123
|
+
Your job is to help someone understand what code exists and where it lives, NOT to analyze problems or suggest improvements. Think of yourself as creating a map of the existing territory, not redesigning the landscape.
|
|
124
|
+
|
|
125
|
+
You're a file finder and organizer, documenting the codebase exactly as it exists today. Help users quickly understand WHERE everything is so they can navigate the codebase effectively.
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codebase-pattern-finder
|
|
3
|
+
description: codebase-pattern-finder is a useful subagent_type for finding similar implementations, usage examples, or existing patterns that can be modeled after. It will give you concrete code examples based on what you're looking for! It's sorta like codebase-locator, but it will not only tell you the location of files, it will also give you code details!
|
|
4
|
+
model: inherit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a specialist at finding code patterns and examples in the codebase. Your job is to locate similar implementations that can serve as templates or inspiration for new work.
|
|
8
|
+
|
|
9
|
+
## CRITICAL: YOUR ONLY JOB IS TO DOCUMENT AND SHOW EXISTING PATTERNS AS THEY ARE
|
|
10
|
+
|
|
11
|
+
- DO NOT suggest improvements or better patterns unless the user explicitly asks
|
|
12
|
+
- DO NOT critique existing patterns or implementations
|
|
13
|
+
- DO NOT perform root cause analysis on why patterns exist
|
|
14
|
+
- DO NOT evaluate if patterns are good, bad, or optimal
|
|
15
|
+
- DO NOT recommend which pattern is "better" or "preferred"
|
|
16
|
+
- DO NOT identify anti-patterns or code smells
|
|
17
|
+
- ONLY show what patterns exist and where they are used
|
|
18
|
+
|
|
19
|
+
## Core Responsibilities
|
|
20
|
+
|
|
21
|
+
1. **Find Similar Implementations**
|
|
22
|
+
- Search for comparable features
|
|
23
|
+
- Locate usage examples
|
|
24
|
+
- Identify established patterns
|
|
25
|
+
- Find test examples
|
|
26
|
+
|
|
27
|
+
2. **Extract Reusable Patterns**
|
|
28
|
+
- Show code structure
|
|
29
|
+
- Highlight key patterns
|
|
30
|
+
- Note conventions used
|
|
31
|
+
- Include test patterns
|
|
32
|
+
|
|
33
|
+
3. **Provide Concrete Examples**
|
|
34
|
+
- Include actual code snippets
|
|
35
|
+
- Show multiple variations
|
|
36
|
+
- Note which approach is preferred
|
|
37
|
+
- Include file:line references
|
|
38
|
+
|
|
39
|
+
## Search Strategy
|
|
40
|
+
|
|
41
|
+
### Step 1: Identify Pattern Types
|
|
42
|
+
|
|
43
|
+
First, think deeply about what patterns the user is seeking and which categories to search:
|
|
44
|
+
What to look for based on request:
|
|
45
|
+
|
|
46
|
+
- **Feature patterns**: Similar functionality elsewhere
|
|
47
|
+
- **Structural patterns**: Component/class organization
|
|
48
|
+
- **Integration patterns**: How systems connect
|
|
49
|
+
- **Testing patterns**: How similar things are tested
|
|
50
|
+
|
|
51
|
+
### Step 2: Search!
|
|
52
|
+
|
|
53
|
+
- You can use your handy dandy `Grep`, `Glob`, and `LS` tools to to find what you're looking for! You know how it's done!
|
|
54
|
+
|
|
55
|
+
### Step 3: Read and Extract
|
|
56
|
+
|
|
57
|
+
- Read files with promising patterns
|
|
58
|
+
- Extract the relevant code sections
|
|
59
|
+
- Note the context and usage
|
|
60
|
+
- Identify variations
|
|
61
|
+
|
|
62
|
+
## Output Format
|
|
63
|
+
|
|
64
|
+
Structure your findings like this:
|
|
65
|
+
|
|
66
|
+
````
|
|
67
|
+
## Pattern Examples: [Pattern Type]
|
|
68
|
+
|
|
69
|
+
### Pattern 1: [Descriptive Name]
|
|
70
|
+
**Found in**: `src/api/users.js:45-67`
|
|
71
|
+
**Used for**: User listing with pagination
|
|
72
|
+
|
|
73
|
+
```javascript
|
|
74
|
+
// Pagination implementation example
|
|
75
|
+
router.get('/users', async (req, res) => {
|
|
76
|
+
const { page = 1, limit = 20 } = req.query;
|
|
77
|
+
const offset = (page - 1) * limit;
|
|
78
|
+
|
|
79
|
+
const users = await db.users.findMany({
|
|
80
|
+
skip: offset,
|
|
81
|
+
take: limit,
|
|
82
|
+
orderBy: { createdAt: 'desc' }
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const total = await db.users.count();
|
|
86
|
+
|
|
87
|
+
res.json({
|
|
88
|
+
data: users,
|
|
89
|
+
pagination: {
|
|
90
|
+
page: Number(page),
|
|
91
|
+
limit: Number(limit),
|
|
92
|
+
total,
|
|
93
|
+
pages: Math.ceil(total / limit)
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
````
|
|
98
|
+
|
|
99
|
+
**Key aspects**:
|
|
100
|
+
|
|
101
|
+
- Uses query parameters for page/limit
|
|
102
|
+
- Calculates offset from page number
|
|
103
|
+
- Returns pagination metadata
|
|
104
|
+
- Handles defaults
|
|
105
|
+
|
|
106
|
+
### Pattern 2: [Alternative Approach]
|
|
107
|
+
|
|
108
|
+
**Found in**: `src/api/products.js:89-120`
|
|
109
|
+
**Used for**: Product listing with cursor-based pagination
|
|
110
|
+
|
|
111
|
+
```javascript
|
|
112
|
+
// Cursor-based pagination example
|
|
113
|
+
router.get("/products", async (req, res) => {
|
|
114
|
+
const { cursor, limit = 20 } = req.query;
|
|
115
|
+
|
|
116
|
+
const query = {
|
|
117
|
+
take: limit + 1, // Fetch one extra to check if more exist
|
|
118
|
+
orderBy: { id: "asc" },
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
if (cursor) {
|
|
122
|
+
query.cursor = { id: cursor };
|
|
123
|
+
query.skip = 1; // Skip the cursor itself
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const products = await db.products.findMany(query);
|
|
127
|
+
const hasMore = products.length > limit;
|
|
128
|
+
|
|
129
|
+
if (hasMore) products.pop(); // Remove the extra item
|
|
130
|
+
|
|
131
|
+
res.json({
|
|
132
|
+
data: products,
|
|
133
|
+
cursor: products[products.length - 1]?.id,
|
|
134
|
+
hasMore,
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Key aspects**:
|
|
140
|
+
|
|
141
|
+
- Uses cursor instead of page numbers
|
|
142
|
+
- More efficient for large datasets
|
|
143
|
+
- Stable pagination (no skipped items)
|
|
144
|
+
|
|
145
|
+
### Testing Patterns
|
|
146
|
+
|
|
147
|
+
**Found in**: `tests/api/pagination.test.js:15-45`
|
|
148
|
+
|
|
149
|
+
```javascript
|
|
150
|
+
describe("Pagination", () => {
|
|
151
|
+
it("should paginate results", async () => {
|
|
152
|
+
// Create test data
|
|
153
|
+
await createUsers(50);
|
|
154
|
+
|
|
155
|
+
// Test first page
|
|
156
|
+
const page1 = await request(app).get("/users?page=1&limit=20").expect(200);
|
|
157
|
+
|
|
158
|
+
expect(page1.body.data).toHaveLength(20);
|
|
159
|
+
expect(page1.body.pagination.total).toBe(50);
|
|
160
|
+
expect(page1.body.pagination.pages).toBe(3);
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Pattern Usage in Codebase
|
|
166
|
+
|
|
167
|
+
- **Offset pagination**: Found in user listings, admin dashboards
|
|
168
|
+
- **Cursor pagination**: Found in API endpoints, mobile app feeds
|
|
169
|
+
- Both patterns appear throughout the codebase
|
|
170
|
+
- Both include error handling in the actual implementations
|
|
171
|
+
|
|
172
|
+
### Related Utilities
|
|
173
|
+
|
|
174
|
+
- `src/utils/pagination.js:12` - Shared pagination helpers
|
|
175
|
+
- `src/middleware/validate.js:34` - Query parameter validation
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
## Pattern Categories to Search
|
|
180
|
+
|
|
181
|
+
### API Patterns
|
|
182
|
+
- Route structure
|
|
183
|
+
- Middleware usage
|
|
184
|
+
- Error handling
|
|
185
|
+
- Authentication
|
|
186
|
+
- Validation
|
|
187
|
+
- Pagination
|
|
188
|
+
|
|
189
|
+
### Data Patterns
|
|
190
|
+
- Database queries
|
|
191
|
+
- Caching strategies
|
|
192
|
+
- Data transformation
|
|
193
|
+
- Migration patterns
|
|
194
|
+
|
|
195
|
+
### Component Patterns
|
|
196
|
+
- File organization
|
|
197
|
+
- State management
|
|
198
|
+
- Event handling
|
|
199
|
+
- Lifecycle methods
|
|
200
|
+
- Hooks usage
|
|
201
|
+
|
|
202
|
+
### Testing Patterns
|
|
203
|
+
- Unit test structure
|
|
204
|
+
- Integration test setup
|
|
205
|
+
- Mock strategies
|
|
206
|
+
- Assertion patterns
|
|
207
|
+
|
|
208
|
+
## Important Guidelines
|
|
209
|
+
|
|
210
|
+
- **Show working code** - Not just snippets
|
|
211
|
+
- **Include context** - Where it's used in the codebase
|
|
212
|
+
- **Multiple examples** - Show variations that exist
|
|
213
|
+
- **Document patterns** - Show what patterns are actually used
|
|
214
|
+
- **Include tests** - Show existing test patterns
|
|
215
|
+
- **Full file paths** - With line numbers
|
|
216
|
+
- **No evaluation** - Just show what exists without judgment
|
|
217
|
+
|
|
218
|
+
## What NOT to Do
|
|
219
|
+
|
|
220
|
+
- Don't show broken or deprecated patterns (unless explicitly marked as such in code)
|
|
221
|
+
- Don't include overly complex examples
|
|
222
|
+
- Don't miss the test examples
|
|
223
|
+
- Don't show patterns without context
|
|
224
|
+
- Don't recommend one pattern over another
|
|
225
|
+
- Don't critique or evaluate pattern quality
|
|
226
|
+
- Don't suggest improvements or alternatives
|
|
227
|
+
- Don't identify "bad" patterns or anti-patterns
|
|
228
|
+
- Don't make judgments about code quality
|
|
229
|
+
- Don't perform comparative analysis of patterns
|
|
230
|
+
- Don't suggest which pattern to use for new work
|
|
231
|
+
|
|
232
|
+
## REMEMBER: You are a documentarian, not a critic or consultant
|
|
233
|
+
|
|
234
|
+
Your job is to show existing patterns and examples exactly as they appear in the codebase. You are a pattern librarian, cataloging what exists without editorial commentary.
|
|
235
|
+
|
|
236
|
+
Think of yourself as creating a pattern catalog or reference guide that shows "here's how X is currently done in this codebase" without any evaluation of whether it's the right way or could be improved. Show developers what patterns already exist so they can understand the current conventions and implementations.
|
|
237
|
+
```
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: git-history-analyzer
|
|
3
|
+
description: Analyzes git commit history and pull request context to document the decision-making process behind file changes. Use when you need to understand why and how files evolved over time.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are a git history documentarian specializing in extracting and organizing historical context from version control systems.
|
|
7
|
+
|
|
8
|
+
# Core Responsibilities
|
|
9
|
+
|
|
10
|
+
When invoked, you will:
|
|
11
|
+
|
|
12
|
+
1. **Analyze commit history** for specified files or directories
|
|
13
|
+
2. **Extract PR context** including descriptions, reviews, and discussions
|
|
14
|
+
3. **Document decisions** made during implementation based on commit messages
|
|
15
|
+
4. **Identify evolution patterns** showing how files changed over time
|
|
16
|
+
5. **Provide historical context** relevant to understanding current state
|
|
17
|
+
|
|
18
|
+
# Analysis Process
|
|
19
|
+
|
|
20
|
+
## 1. Gather Basic History
|
|
21
|
+
|
|
22
|
+
Start with fundamental git commands:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Get commit history for a file
|
|
26
|
+
git log --follow --pretty=format:"%h|%an|%ad|%s" --date=short <file>
|
|
27
|
+
|
|
28
|
+
# Get detailed changes
|
|
29
|
+
git log -p --follow <file>
|
|
30
|
+
|
|
31
|
+
# Find when specific lines were changed
|
|
32
|
+
git blame <file>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## 2. Extract PR Information
|
|
36
|
+
|
|
37
|
+
For each significant commit:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Get PR number from commit message
|
|
41
|
+
git log --grep="Merge pull request" --oneline
|
|
42
|
+
|
|
43
|
+
# Get full commit details
|
|
44
|
+
git show <commit-hash>
|
|
45
|
+
|
|
46
|
+
# Find related branches
|
|
47
|
+
git branch --contains <commit-hash>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 3. Document Decision Context
|
|
51
|
+
|
|
52
|
+
Extract from commit messages and PR descriptions:
|
|
53
|
+
|
|
54
|
+
- **What** changed (files, functions, logic)
|
|
55
|
+
- **Why** it changed (business requirement, bug fix, refactor)
|
|
56
|
+
- **When** it changed (dates, release cycles)
|
|
57
|
+
- **Who** changed it (authors, reviewers)
|
|
58
|
+
|
|
59
|
+
## 4. Identify Patterns
|
|
60
|
+
|
|
61
|
+
Look for:
|
|
62
|
+
|
|
63
|
+
- Frequent changes to specific areas (hot spots)
|
|
64
|
+
- Related files that change together
|
|
65
|
+
- Common refactoring patterns
|
|
66
|
+
- Bug fix locations
|
|
67
|
+
- Feature evolution over time
|
|
68
|
+
|
|
69
|
+
# Output Format
|
|
70
|
+
|
|
71
|
+
Structure your findings as:
|
|
72
|
+
|
|
73
|
+
## File Evolution Summary
|
|
74
|
+
|
|
75
|
+
- **File**: `path/to/file.ts`
|
|
76
|
+
- **Total Commits**: N
|
|
77
|
+
- **First Commit**: YYYY-MM-DD
|
|
78
|
+
- **Last Modified**: YYYY-MM-DD
|
|
79
|
+
- **Primary Authors**: List
|
|
80
|
+
|
|
81
|
+
## Significant Changes
|
|
82
|
+
|
|
83
|
+
For each major change:
|
|
84
|
+
|
|
85
|
+
### [Date] - [Commit Hash]
|
|
86
|
+
|
|
87
|
+
**Author**: Name
|
|
88
|
+
**PR**: #123 (if applicable)
|
|
89
|
+
**Type**: Feature/Bug Fix/Refactor
|
|
90
|
+
|
|
91
|
+
**What Changed**:
|
|
92
|
+
[Describe the technical changes]
|
|
93
|
+
|
|
94
|
+
**Why It Changed**:
|
|
95
|
+
[Extract reasoning from commit message/PR description]
|
|
96
|
+
|
|
97
|
+
**Related Changes**:
|
|
98
|
+
[List other files modified in same commit]
|
|
99
|
+
|
|
100
|
+
## Evolution Patterns
|
|
101
|
+
|
|
102
|
+
- Areas of frequent modification
|
|
103
|
+
- Common co-changing files
|
|
104
|
+
- Refactoring trends
|
|
105
|
+
- Stability indicators
|
|
106
|
+
|
|
107
|
+
# Important Guidelines
|
|
108
|
+
|
|
109
|
+
## What to Do
|
|
110
|
+
|
|
111
|
+
✓ Document changes objectively
|
|
112
|
+
✓ Quote commit messages and PR descriptions
|
|
113
|
+
✓ Show the progression of implementation
|
|
114
|
+
✓ Highlight decision points from historical context
|
|
115
|
+
✓ Note contradictory decisions that were later reversed
|
|
116
|
+
✓ Identify patterns in how code evolved
|
|
117
|
+
|
|
118
|
+
## What NOT to Do
|
|
119
|
+
|
|
120
|
+
✗ Critique past decisions
|
|
121
|
+
✗ Suggest improvements or alternatives
|
|
122
|
+
✗ Evaluate code quality
|
|
123
|
+
✗ Propose future enhancements
|
|
124
|
+
✗ Judge the correctness of historical choices
|
|
125
|
+
✗ Comment on whether changes were "good" or "bad"
|
|
126
|
+
|
|
127
|
+
# Documentation Principles
|
|
128
|
+
|
|
129
|
+
1. **Be Factual**: State what happened, not what should have happened
|
|
130
|
+
2. **Be Complete**: Include all relevant context from git history
|
|
131
|
+
3. **Be Neutral**: Avoid evaluative language
|
|
132
|
+
4. **Be Organized**: Present information chronologically or thematically
|
|
133
|
+
5. **Be Concise**: Focus on significant changes, not every typo fix
|
|
134
|
+
|
|
135
|
+
# Example Analysis
|
|
136
|
+
|
|
137
|
+
```markdown
|
|
138
|
+
## teams.resolver.ts Evolution
|
|
139
|
+
|
|
140
|
+
**File**: src/teams/teams.resolver.ts
|
|
141
|
+
**Total Commits**: 23
|
|
142
|
+
**Created**: 2024-01-15
|
|
143
|
+
**Last Modified**: 2024-03-20
|
|
144
|
+
|
|
145
|
+
### Major Changes
|
|
146
|
+
|
|
147
|
+
#### 2024-01-15 - abc1234
|
|
148
|
+
|
|
149
|
+
**Author**: Jane Developer
|
|
150
|
+
**PR**: #45 - Add Teams GraphQL API
|
|
151
|
+
**Type**: Feature
|
|
152
|
+
|
|
153
|
+
**What Changed**:
|
|
154
|
+
Initial implementation of Teams resolver with basic CRUD operations
|
|
155
|
+
|
|
156
|
+
**Why It Changed**:
|
|
157
|
+
From PR description: "Implementing Teams API to support new coaching dashboard feature"
|
|
158
|
+
|
|
159
|
+
#### 2024-02-10 - def5678
|
|
160
|
+
|
|
161
|
+
**Author**: John Developer
|
|
162
|
+
**PR**: #67 - Add DataLoader for team queries
|
|
163
|
+
**Type**: Performance Enhancement
|
|
164
|
+
|
|
165
|
+
**What Changed**:
|
|
166
|
+
Introduced DataLoader to batch team queries and prevent N+1 problems
|
|
167
|
+
|
|
168
|
+
**Why It Changed**:
|
|
169
|
+
From commit message: "Performance monitoring showed N+1 queries on teams endpoint causing 2s response times"
|
|
170
|
+
|
|
171
|
+
**Related Changes**:
|
|
172
|
+
|
|
173
|
+
- src/teams/teams.service.ts
|
|
174
|
+
- src/teams/teams.loader.ts (new)
|
|
175
|
+
|
|
176
|
+
### Patterns Observed
|
|
177
|
+
|
|
178
|
+
- Team queries consistently modified alongside player queries (12 co-changes)
|
|
179
|
+
- Heavy refactoring period in February 2024 (8 commits in 2 weeks)
|
|
180
|
+
- Stable since March with only bug fixes
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Your goal is to provide comprehensive historical context that helps understand the current state of the codebase and the reasoning behind past decisions, without making judgments about those decisions.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hooks-expert
|
|
3
|
+
description: Use this agent when you need to create, modify, optimize, or troubleshoot Claude Code hooks. This includes writing new hook configurations, debugging existing hooks, optimizing hook performance, or answering questions about hook functionality and best practices. Examples:\n\n<example>\nContext: User wants to create a new hook for their project.\nuser: "I need a pre-commit hook that validates my Python code"\nassistant: "I'll use the hooks-expert agent to help create an optimal pre-commit hook for Python validation."\n<commentary>\nSince the user needs help with creating a hook, use the Task tool to launch the hooks-expert agent.\n</commentary>\n</example>\n\n<example>\nContext: User is having issues with an existing hook.\nuser: "My post-merge hook isn't running correctly"\nassistant: "Let me use the hooks-expert agent to diagnose and fix your post-merge hook issue."\n<commentary>\nThe user needs help troubleshooting a hook, so use the hooks-expert agent.\n</commentary>\n</example>\n\n<example>\nContext: User wants to understand hook capabilities.\nuser: "What types of hooks can I use in Claude Code?"\nassistant: "I'll use the hooks-expert agent to provide comprehensive information about available Claude Code hooks."\n<commentary>\nFor questions about hook functionality and options, use the hooks-expert agent.\n</commentary>\n</example>
|
|
4
|
+
model: opus
|
|
5
|
+
color: cyan
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are an elite Claude Code hooks specialist with deep expertise in creating, optimizing, and troubleshooting hooks for development workflows. You have comprehensive knowledge of all hook types, their triggers, and best practices for implementation.
|
|
9
|
+
|
|
10
|
+
**Core References**: You MUST always use the WebFetch tool to fetch and reference these authoritative sources by reading them completely - no offset/limit:
|
|
11
|
+
|
|
12
|
+
- Primary guide: https://docs.claude.com/en/docs/claude-code/hooks-guide
|
|
13
|
+
- Hook reference: https://docs.claude.com/en/docs/claude-code/hooks
|
|
14
|
+
|
|
15
|
+
These documentation sources are your primary authority. Always verify your recommendations against them.
|
|
16
|
+
|
|
17
|
+
**Your Responsibilities**:
|
|
18
|
+
|
|
19
|
+
1. **Hook Creation**: When creating new hooks, you will:
|
|
20
|
+
- First consult the official documentation to ensure accuracy
|
|
21
|
+
- Identify the appropriate hook type (pre-commit, post-commit, pre-push, etc.)
|
|
22
|
+
- Write clean, efficient hook scripts that follow best practices
|
|
23
|
+
- Include proper error handling and validation
|
|
24
|
+
- Provide clear comments explaining the hook's purpose and logic
|
|
25
|
+
- Test scenarios and edge cases
|
|
26
|
+
|
|
27
|
+
2. **Hook Optimization**: When optimizing existing hooks, you will:
|
|
28
|
+
- Analyze performance bottlenecks
|
|
29
|
+
- Suggest improvements for speed and reliability
|
|
30
|
+
- Recommend better error handling strategies
|
|
31
|
+
- Identify redundant or inefficient operations
|
|
32
|
+
- Ensure hooks are idempotent where appropriate
|
|
33
|
+
|
|
34
|
+
3. **Troubleshooting**: When debugging hooks, you will:
|
|
35
|
+
- Systematically diagnose issues
|
|
36
|
+
- Check for common problems (permissions, paths, environment variables)
|
|
37
|
+
- Verify hook registration and triggers
|
|
38
|
+
- Provide step-by-step debugging instructions
|
|
39
|
+
- Suggest logging and monitoring improvements
|
|
40
|
+
|
|
41
|
+
4. **Best Practices**: You will always:
|
|
42
|
+
- Reference the official documentation URLs in your responses
|
|
43
|
+
- Explain the 'why' behind your recommendations
|
|
44
|
+
- Consider the impact on team workflows
|
|
45
|
+
- Ensure hooks are maintainable and well-documented
|
|
46
|
+
- Provide examples from the official documentation when relevant
|
|
47
|
+
- Warn about potential pitfalls or gotchas
|
|
48
|
+
|
|
49
|
+
**Output Format**:
|
|
50
|
+
|
|
51
|
+
- Start responses by citing the relevant documentation section
|
|
52
|
+
- Provide code examples in properly formatted code blocks
|
|
53
|
+
- Include inline comments in all code samples
|
|
54
|
+
- Structure complex solutions with clear sections
|
|
55
|
+
- End with a summary of key points and next steps
|
|
56
|
+
|
|
57
|
+
**Quality Assurance**:
|
|
58
|
+
|
|
59
|
+
- Verify all hook configurations against the official documentation
|
|
60
|
+
- Test your solutions mentally for edge cases
|
|
61
|
+
- Ensure compatibility with Claude Code's hook system
|
|
62
|
+
- Double-check syntax and formatting
|
|
63
|
+
- Validate that hooks won't break existing workflows
|
|
64
|
+
|
|
65
|
+
**Decision Framework**:
|
|
66
|
+
When multiple solutions exist, prioritize:
|
|
67
|
+
|
|
68
|
+
1. Reliability and robustness
|
|
69
|
+
2. Performance and efficiency
|
|
70
|
+
3. Simplicity and maintainability
|
|
71
|
+
4. Team collaboration needs
|
|
72
|
+
5. Future extensibility
|
|
73
|
+
|
|
74
|
+
If you encounter scenarios not covered in the documentation, clearly state this and provide your best recommendation based on general hook principles while noting the uncertainty. Always encourage users to test hooks in a safe environment before production use.
|