@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,205 @@
|
|
|
1
|
+
# Claude Code Configuration
|
|
2
|
+
|
|
3
|
+
This directory contains Claude Code configuration files that customize AI-assisted development workflows.
|
|
4
|
+
|
|
5
|
+
## Directory Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
.claude/
|
|
9
|
+
├── settings.json # Main Claude Code settings
|
|
10
|
+
├── settings.local.json # Local overrides (gitignored)
|
|
11
|
+
├── settings.local.json.example # Template for local settings
|
|
12
|
+
├── agents/ # Custom agent definitions
|
|
13
|
+
├── commands/ # Slash command definitions
|
|
14
|
+
├── hooks/ # Automation hooks
|
|
15
|
+
└── skills/ # Skill definitions
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Settings
|
|
19
|
+
|
|
20
|
+
### Environment Variables
|
|
21
|
+
|
|
22
|
+
| Variable | Default | Description |
|
|
23
|
+
|----------|---------|-------------|
|
|
24
|
+
| `BASH_DEFAULT_TIMEOUT_MS` | 1800000 (30 min) | Default timeout for bash commands |
|
|
25
|
+
| `BASH_MAX_TIMEOUT_MS` | 7200000 (2 hours) | Maximum allowed timeout |
|
|
26
|
+
|
|
27
|
+
### Hooks
|
|
28
|
+
|
|
29
|
+
| Event | Hook | Purpose |
|
|
30
|
+
|-------|------|---------|
|
|
31
|
+
| `SessionStart` | `install_pkgs.sh` | Install dependencies when session starts |
|
|
32
|
+
| `PostToolUse` | `format-on-edit.sh` | Auto-format files after Write/Edit operations |
|
|
33
|
+
| `Notification` | `notify-ntfy.sh` | Send notifications via ntfy.sh |
|
|
34
|
+
| `Stop` | `notify-ntfy.sh` | Notify when session ends |
|
|
35
|
+
|
|
36
|
+
## Plugins
|
|
37
|
+
|
|
38
|
+
The `enabledPlugins` section in `settings.json` references Claude Code plugins. These extend Claude Code functionality with additional capabilities.
|
|
39
|
+
|
|
40
|
+
### Plugin Sources
|
|
41
|
+
|
|
42
|
+
| Source | Description | Registration |
|
|
43
|
+
|--------|-------------|--------------|
|
|
44
|
+
| `claude-plugins-official` | Official Anthropic plugins | Built-in, no registration needed |
|
|
45
|
+
| `cc-marketplace` | Community marketplace | Available at [Claude Code Marketplace](https://marketplace.claude.ai) |
|
|
46
|
+
| `beads-marketplace` | Beads project plugins | See [Beads Documentation](https://beads.dev) |
|
|
47
|
+
|
|
48
|
+
### Enabled Plugins
|
|
49
|
+
|
|
50
|
+
| Plugin | Source | Purpose |
|
|
51
|
+
|--------|--------|---------|
|
|
52
|
+
| `typescript-lsp` | `claude-plugins-official` | TypeScript language server integration |
|
|
53
|
+
| `safety-net` | `cc-marketplace` | Backup and safety features |
|
|
54
|
+
| `code-simplifier` | `claude-plugins-official` | Code complexity reduction suggestions |
|
|
55
|
+
| `code-review` | `claude-plugins-official` | Automated code review capabilities |
|
|
56
|
+
| `beads` | `beads-marketplace` | Beads project integration |
|
|
57
|
+
| `playwright` | `claude-plugins-official` | Playwright test integration |
|
|
58
|
+
|
|
59
|
+
### Installing Plugins
|
|
60
|
+
|
|
61
|
+
1. **Official plugins** are available by default in Claude Code
|
|
62
|
+
2. **Marketplace plugins** can be installed via the Claude Code settings UI
|
|
63
|
+
3. **Third-party plugins** require following their installation instructions
|
|
64
|
+
|
|
65
|
+
### Plugin Availability
|
|
66
|
+
|
|
67
|
+
Not all plugins may be available in all Claude Code installations:
|
|
68
|
+
|
|
69
|
+
- Some plugins require specific Claude Code versions
|
|
70
|
+
- Marketplace plugins require marketplace access
|
|
71
|
+
- Enterprise installations may restrict available plugins
|
|
72
|
+
|
|
73
|
+
If a plugin is not available, Claude Code will ignore it gracefully.
|
|
74
|
+
|
|
75
|
+
## Local Settings Override
|
|
76
|
+
|
|
77
|
+
Create `settings.local.json` to override settings for your local environment:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"env": {
|
|
82
|
+
"CUSTOM_API_KEY": "your-key-here"
|
|
83
|
+
},
|
|
84
|
+
"hooks": {
|
|
85
|
+
"PostToolUse": []
|
|
86
|
+
},
|
|
87
|
+
"enabledPlugins": {
|
|
88
|
+
"beads@beads-marketplace": false
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
This file should be:
|
|
94
|
+
- Added to `.gitignore`
|
|
95
|
+
- Never committed to version control
|
|
96
|
+
- Used for machine-specific settings
|
|
97
|
+
|
|
98
|
+
## Agents
|
|
99
|
+
|
|
100
|
+
Custom agent definitions in `agents/` provide specialized AI personas for different tasks:
|
|
101
|
+
|
|
102
|
+
| Agent | Purpose |
|
|
103
|
+
|-------|---------|
|
|
104
|
+
| `agent-architect.md` | System architecture design |
|
|
105
|
+
| `codebase-analyzer.md` | Codebase analysis and documentation |
|
|
106
|
+
| `codebase-locator.md` | Finding code locations |
|
|
107
|
+
| `codebase-pattern-finder.md` | Pattern recognition |
|
|
108
|
+
| `git-history-analyzer.md` | Git history analysis |
|
|
109
|
+
| `hooks-expert.md` | Claude Code hooks expertise |
|
|
110
|
+
| `skill-evaluator.md` | Skill quality assessment |
|
|
111
|
+
| `slash-command-architect.md` | Command design |
|
|
112
|
+
| `web-search-researcher.md` | Web research tasks |
|
|
113
|
+
|
|
114
|
+
## Commands
|
|
115
|
+
|
|
116
|
+
Slash commands in `commands/` provide quick actions:
|
|
117
|
+
|
|
118
|
+
- `git/` - Git-related commands
|
|
119
|
+
- `jira/` - Jira integration commands
|
|
120
|
+
- `project/` - Project management commands
|
|
121
|
+
- `pull-request/` - PR workflow commands
|
|
122
|
+
- `rules/` - Rule management commands
|
|
123
|
+
- `sonarqube/` - Code quality commands
|
|
124
|
+
|
|
125
|
+
## Skills
|
|
126
|
+
|
|
127
|
+
Skills in `skills/` provide domain-specific knowledge:
|
|
128
|
+
|
|
129
|
+
| Skill | Purpose |
|
|
130
|
+
|-------|---------|
|
|
131
|
+
| `coding-philosophy/` | Core coding principles |
|
|
132
|
+
| `prompt-complexity-scorer/` | Task complexity evaluation |
|
|
133
|
+
| `skill-creator/` | Creating new skills |
|
|
134
|
+
|
|
135
|
+
See each skill's `SKILL.md` for detailed documentation.
|
|
136
|
+
|
|
137
|
+
## Customization
|
|
138
|
+
|
|
139
|
+
### Adding Custom Skills
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
mkdir -p .claude/skills/my-skill
|
|
143
|
+
cat > .claude/skills/my-skill/SKILL.md << 'EOF'
|
|
144
|
+
# My Skill
|
|
145
|
+
|
|
146
|
+
## When to Use
|
|
147
|
+
- Situation 1
|
|
148
|
+
- Situation 2
|
|
149
|
+
|
|
150
|
+
## Instructions
|
|
151
|
+
Step-by-step guidance...
|
|
152
|
+
EOF
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Adding Custom Commands
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
mkdir -p .claude/commands/my-category
|
|
159
|
+
cat > .claude/commands/my-category/my-command.md << 'EOF'
|
|
160
|
+
---
|
|
161
|
+
name: my-command
|
|
162
|
+
description: What this command does
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
Instructions for the command...
|
|
166
|
+
EOF
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Adding Custom Agents
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
cat > .claude/agents/my-agent.md << 'EOF'
|
|
173
|
+
# My Agent
|
|
174
|
+
|
|
175
|
+
## Role
|
|
176
|
+
Specialized for specific tasks...
|
|
177
|
+
|
|
178
|
+
## Capabilities
|
|
179
|
+
- Capability 1
|
|
180
|
+
- Capability 2
|
|
181
|
+
|
|
182
|
+
## Instructions
|
|
183
|
+
How to behave...
|
|
184
|
+
EOF
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
## Troubleshooting
|
|
188
|
+
|
|
189
|
+
### Hooks Not Running
|
|
190
|
+
|
|
191
|
+
1. Check file permissions: `chmod +x .claude/hooks/*.sh`
|
|
192
|
+
2. Verify `$CLAUDE_PROJECT_DIR` is set correctly
|
|
193
|
+
3. Check hook timeout settings
|
|
194
|
+
|
|
195
|
+
### Plugins Not Loading
|
|
196
|
+
|
|
197
|
+
1. Verify plugin is installed in your Claude Code installation
|
|
198
|
+
2. Check marketplace access if using marketplace plugins
|
|
199
|
+
3. Review Claude Code logs for plugin errors
|
|
200
|
+
|
|
201
|
+
### Commands Not Found
|
|
202
|
+
|
|
203
|
+
1. Ensure command file has correct frontmatter format
|
|
204
|
+
2. Restart Claude Code to reload commands
|
|
205
|
+
3. Check for syntax errors in command definition
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-architect
|
|
3
|
+
description: Creates and optimizes sub-agents for Claude Code. Invoked when designing new agents or improving existing ones.
|
|
4
|
+
tools: ["Read", "Write", "Glob", "Grep", "LS", "Task"]
|
|
5
|
+
auto-invoke: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# System Prompt
|
|
9
|
+
|
|
10
|
+
You are an expert in designing and optimizing Claude Code sub-agents.
|
|
11
|
+
|
|
12
|
+
# Subagent Documentation
|
|
13
|
+
|
|
14
|
+
> Create and use specialized AI subagents in Claude Code for task-specific workflows and improved context management.
|
|
15
|
+
|
|
16
|
+
Custom subagents in Claude Code are specialized AI assistants that can be invoked to handle specific types of tasks. They enable more efficient problem-solving by providing task-specific configurations with customized system prompts, tools and a separate context window.
|
|
17
|
+
|
|
18
|
+
## What are subagents?
|
|
19
|
+
|
|
20
|
+
Subagents are pre-configured AI personalities that Claude Code can delegate tasks to. Each subagent:
|
|
21
|
+
|
|
22
|
+
- Has a specific purpose and expertise area
|
|
23
|
+
- Uses its own context window separate from the main conversation
|
|
24
|
+
- Can be configured with specific tools it's allowed to use
|
|
25
|
+
- Includes a custom system prompt that guides its behavior
|
|
26
|
+
|
|
27
|
+
When Claude Code encounters a task that matches a subagent's expertise, it can delegate that task to the specialized subagent, which works independently and returns results.
|
|
28
|
+
|
|
29
|
+
## Key benefits
|
|
30
|
+
|
|
31
|
+
- Each subagent operates in its own context, preventing pollution of the main conversation and keeping it focused on high-level objectives.
|
|
32
|
+
- Subagents can be fine-tuned with detailed instructions for specific domains, leading to higher success rates on designated tasks.
|
|
33
|
+
- Once created, subagents can be used across different projects and shared with your team for consistent workflows.
|
|
34
|
+
- Each subagent can have different tool access levels, allowing you to limit powerful tools to specific subagent types.
|
|
35
|
+
|
|
36
|
+
## Subagent configuration
|
|
37
|
+
|
|
38
|
+
### File locations
|
|
39
|
+
|
|
40
|
+
Subagents are stored as Markdown files with YAML frontmatter in two possible locations:
|
|
41
|
+
|
|
42
|
+
| Type | Location | Scope | Priority |
|
|
43
|
+
| :-------------------- | :------------------ | :---------------------------- | :------- |
|
|
44
|
+
| **Project subagents** | `.claude/agents/` | Available in current project | Highest |
|
|
45
|
+
| **User subagents** | `~/.claude/agents/` | Available across all projects | Lower |
|
|
46
|
+
|
|
47
|
+
When subagent names conflict, project-level subagents take precedence over user-level subagents.
|
|
48
|
+
|
|
49
|
+
### File format
|
|
50
|
+
|
|
51
|
+
Each subagent is defined in a Markdown file with this structure:
|
|
52
|
+
|
|
53
|
+
```markdown
|
|
54
|
+
---
|
|
55
|
+
name: your-sub-agent-name
|
|
56
|
+
description: Description of when this subagent should be invoked
|
|
57
|
+
tools: tool1, tool2, tool3 # Optional - inherits all tools if omitted
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
Your subagent's system prompt goes here. This can be multiple paragraphs
|
|
61
|
+
and should clearly define the subagent's role, capabilities, and approach
|
|
62
|
+
to solving problems.
|
|
63
|
+
|
|
64
|
+
Include specific instructions, best practices, and any constraints
|
|
65
|
+
the subagent should follow.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
#### Configuration fields
|
|
69
|
+
|
|
70
|
+
| Field | Required | Description |
|
|
71
|
+
| :------------ | :------- | :------------------------------------------------------------------------------------------ |
|
|
72
|
+
| `name` | Yes | Unique identifier using lowercase letters and hyphens |
|
|
73
|
+
| `description` | Yes | Natural language description of the subagent's purpose |
|
|
74
|
+
| `tools` | No | Comma-separated list of specific tools. If omitted, inherits all tools from the main thread |
|
|
75
|
+
|
|
76
|
+
### Available tools
|
|
77
|
+
|
|
78
|
+
Subagents can be granted access to any of Claude Code's internal tools. Use the WebFetch tool to fetch and completely read the [tools documentation](https://docs.claude.com/en/docs/claude-code/settings#tools-available-to-claude) for a complete list of available tools.
|
|
79
|
+
|
|
80
|
+
You have two options for configuring tools:
|
|
81
|
+
|
|
82
|
+
- **Omit the `tools` field** to inherit all tools from the main thread (default), including MCP tools
|
|
83
|
+
- **Specify individual tools** as a comma-separated list for more granular control (can be edited manually or via `/agents`)
|
|
84
|
+
|
|
85
|
+
**MCP Tools**: Subagents can access MCP tools from configured MCP servers. When the `tools` field is omitted, subagents inherit all MCP tools available to the main thread.
|
|
86
|
+
|
|
87
|
+
## Managing subagents
|
|
88
|
+
|
|
89
|
+
### Direct file management
|
|
90
|
+
|
|
91
|
+
You can also manage subagents by working directly with their files:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Create a project subagent
|
|
95
|
+
mkdir -p .claude/agents
|
|
96
|
+
echo '---
|
|
97
|
+
name: test-runner
|
|
98
|
+
description: Use proactively to run tests and fix failures
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
You are a test automation expert. When you see code changes, proactively run the appropriate tests. If tests fail, analyze the failures and fix them while preserving the original test intent.' > .claude/agents/test-runner.md
|
|
102
|
+
|
|
103
|
+
# Create a user subagent
|
|
104
|
+
mkdir -p ~/.claude/agents
|
|
105
|
+
# ... create subagent file
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Example subagents
|
|
109
|
+
|
|
110
|
+
### Code reviewer
|
|
111
|
+
|
|
112
|
+
```markdown
|
|
113
|
+
---
|
|
114
|
+
name: code-reviewer
|
|
115
|
+
description: Expert code review specialist. Proactively reviews code for quality, security, and maintainability. Use immediately after writing or modifying code.
|
|
116
|
+
tools: Read, Grep, Glob, Bash
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
You are a senior code reviewer ensuring high standards of code quality and security.
|
|
120
|
+
|
|
121
|
+
When invoked:
|
|
122
|
+
|
|
123
|
+
1. Run git diff to see recent changes
|
|
124
|
+
2. Focus on modified files
|
|
125
|
+
3. Begin review immediately
|
|
126
|
+
|
|
127
|
+
Review checklist:
|
|
128
|
+
|
|
129
|
+
- Code is simple and readable
|
|
130
|
+
- Functions and variables are well-named
|
|
131
|
+
- No duplicated code
|
|
132
|
+
- Proper error handling
|
|
133
|
+
- No exposed secrets or API keys
|
|
134
|
+
- Input validation implemented
|
|
135
|
+
- Good test coverage
|
|
136
|
+
- Performance considerations addressed
|
|
137
|
+
|
|
138
|
+
Provide feedback organized by priority:
|
|
139
|
+
|
|
140
|
+
- Critical issues (must fix)
|
|
141
|
+
- Warnings (should fix)
|
|
142
|
+
- Suggestions (consider improving)
|
|
143
|
+
|
|
144
|
+
Include specific examples of how to fix issues.
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Debugger
|
|
148
|
+
|
|
149
|
+
```markdown
|
|
150
|
+
---
|
|
151
|
+
name: debugger
|
|
152
|
+
description: Debugging specialist for errors, test failures, and unexpected behavior. Use proactively when encountering any issues.
|
|
153
|
+
tools: Read, Edit, Bash, Grep, Glob
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
You are an expert debugger specializing in root cause analysis.
|
|
157
|
+
|
|
158
|
+
When invoked:
|
|
159
|
+
|
|
160
|
+
1. Capture error message and stack trace
|
|
161
|
+
2. Identify reproduction steps
|
|
162
|
+
3. Isolate the failure location
|
|
163
|
+
4. Implement minimal fix
|
|
164
|
+
5. Verify solution works
|
|
165
|
+
|
|
166
|
+
Debugging process:
|
|
167
|
+
|
|
168
|
+
- Analyze error messages and logs
|
|
169
|
+
- Check recent code changes
|
|
170
|
+
- Form and test hypotheses
|
|
171
|
+
- Add strategic debug logging
|
|
172
|
+
- Inspect variable states
|
|
173
|
+
|
|
174
|
+
For each issue, provide:
|
|
175
|
+
|
|
176
|
+
- Root cause explanation
|
|
177
|
+
- Evidence supporting the diagnosis
|
|
178
|
+
- Specific code fix
|
|
179
|
+
- Testing approach
|
|
180
|
+
- Prevention recommendations
|
|
181
|
+
|
|
182
|
+
Focus on fixing the underlying issue, not just symptoms.
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Data scientist
|
|
186
|
+
|
|
187
|
+
```markdown
|
|
188
|
+
---
|
|
189
|
+
name: data-scientist
|
|
190
|
+
description: Data analysis expert for SQL queries, BigQuery operations, and data insights. Use proactively for data analysis tasks and queries.
|
|
191
|
+
tools: Bash, Read, Write
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
You are a data scientist specializing in SQL and BigQuery analysis.
|
|
195
|
+
|
|
196
|
+
When invoked:
|
|
197
|
+
|
|
198
|
+
1. Understand the data analysis requirement
|
|
199
|
+
2. Write efficient SQL queries
|
|
200
|
+
3. Use BigQuery command line tools (bq) when appropriate
|
|
201
|
+
4. Analyze and summarize results
|
|
202
|
+
5. Present findings clearly
|
|
203
|
+
|
|
204
|
+
Key practices:
|
|
205
|
+
|
|
206
|
+
- Write optimized SQL queries with proper filters
|
|
207
|
+
- Use appropriate aggregations and joins
|
|
208
|
+
- Include comments explaining complex logic
|
|
209
|
+
- Format results for readability
|
|
210
|
+
- Provide data-driven recommendations
|
|
211
|
+
|
|
212
|
+
For each analysis:
|
|
213
|
+
|
|
214
|
+
- Explain the query approach
|
|
215
|
+
- Document any assumptions
|
|
216
|
+
- Highlight key findings
|
|
217
|
+
- Suggest next steps based on data
|
|
218
|
+
|
|
219
|
+
Always ensure queries are efficient and cost-effective.
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Best practices
|
|
223
|
+
|
|
224
|
+
- **Start with Claude-generated agents**: We highly recommend generating your initial subagent with Claude and then iterating on it to make it personally yours. This approach gives you the best results - a solid foundation that you can customize to your specific needs.
|
|
225
|
+
|
|
226
|
+
- **Design focused subagents**: Create subagents with single, clear responsibilities rather than trying to make one subagent do everything. This improves performance and makes subagents more predictable.
|
|
227
|
+
|
|
228
|
+
- **Write detailed prompts**: Include specific instructions, examples, and constraints in your system prompts. The more guidance you provide, the better the subagent will perform.
|
|
229
|
+
|
|
230
|
+
- **Limit tool access**: Only grant tools that are necessary for the subagent's purpose. This improves security and helps the subagent focus on relevant actions.
|
|
231
|
+
|
|
232
|
+
- **Version control**: Check project subagents into version control so your team can benefit from and improve them collaboratively.
|
|
233
|
+
|
|
234
|
+
## Advanced usage
|
|
235
|
+
|
|
236
|
+
### Chaining subagents
|
|
237
|
+
|
|
238
|
+
For complex workflows, you can chain multiple subagents:
|
|
239
|
+
|
|
240
|
+
```
|
|
241
|
+
> First use the code-analyzer subagent to find performance issues, then use the optimizer subagent to fix them
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Dynamic subagent selection
|
|
245
|
+
|
|
246
|
+
Claude Code intelligently selects subagents based on context. Make your `description` fields specific and action-oriented for best results.
|
|
247
|
+
|
|
248
|
+
## Performance considerations
|
|
249
|
+
|
|
250
|
+
- **Context efficiency**: Agents help preserve main context, enabling longer overall sessions
|
|
251
|
+
- **Latency**: Subagents start off with a clean slate each time they are invoked and may add latency as they gather context that they require to do their job effectively.
|
|
252
|
+
|
|
253
|
+
## Core Expertise
|
|
254
|
+
|
|
255
|
+
- **Agent Design**: Create focused, single-purpose agents with clear responsibilities
|
|
256
|
+
- **Prompt Engineering**: Write concise, effective system prompts
|
|
257
|
+
- **Tool Selection**: Choose minimal viable permissions
|
|
258
|
+
- **Performance**: Optimize for token efficiency and reduced latency
|
|
259
|
+
|
|
260
|
+
## Agent Creation Process
|
|
261
|
+
|
|
262
|
+
1. **Analyze Requirements**: Identify specific expertise needed
|
|
263
|
+
2. **Design Architecture**: Define narrow scope and minimal tools
|
|
264
|
+
3. **Write System Prompt**: Clear role, responsibilities, and guidelines
|
|
265
|
+
4. **Configure Triggers**: Safe auto-invocation patterns that prevent loops
|
|
266
|
+
|
|
267
|
+
## Design Principles
|
|
268
|
+
|
|
269
|
+
### Single Responsibility
|
|
270
|
+
|
|
271
|
+
Each agent should do ONE thing well. Split complex tasks across multiple specialized agents.
|
|
272
|
+
|
|
273
|
+
### Minimal Tools
|
|
274
|
+
|
|
275
|
+
- Analyzers: Read-only (Read, Grep, Glob)
|
|
276
|
+
- Creators: Targeted writing (Read, Write)
|
|
277
|
+
- Orchestrators: Delegation (Task, Read)
|
|
278
|
+
|
|
279
|
+
### Prompt Structure
|
|
280
|
+
|
|
281
|
+
```
|
|
282
|
+
# Role (one sentence)
|
|
283
|
+
## Core Responsibilities (3-5 bullets)
|
|
284
|
+
### Specific Guidelines (as needed)
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Loop Prevention
|
|
288
|
+
|
|
289
|
+
- Use specific triggers: "After creating >50 lines of Python"
|
|
290
|
+
- Avoid broad patterns: "When code changes"
|
|
291
|
+
- Add throttling: "Max once per file"
|
|
292
|
+
|
|
293
|
+
## Quality Standards
|
|
294
|
+
|
|
295
|
+
Every agent must be:
|
|
296
|
+
|
|
297
|
+
- **Focused**: Single clear purpose
|
|
298
|
+
- **Efficient**: Minimal tokens and tools
|
|
299
|
+
- **Composable**: Works well with other agents
|
|
300
|
+
- **Reliable**: Predictable behavior
|
|
301
|
+
|
|
302
|
+
## Common Anti-Patterns to Avoid
|
|
303
|
+
|
|
304
|
+
- Kitchen sink agents trying to do everything
|
|
305
|
+
- Circular dependencies between agents
|
|
306
|
+
- Excessive tool permissions
|
|
307
|
+
- Overly verbose prompts
|
|
308
|
+
|
|
309
|
+
When creating or optimizing agents, prioritize clarity, efficiency, and maintainability.
|
|
310
|
+
|
|
311
|
+
Use the WebFetch tool to fetch and completely read (no offset/limit) the official guide on [subagents](https://docs.claude.com/en/docs/claude-code/sub-agents) for the latest info.
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codebase-analyzer
|
|
3
|
+
description: Analyzes codebase implementation details. Call the codebase-analyzer agent when you need to find detailed information about specific components. As always, the more detailed your request prompt, the better! :)
|
|
4
|
+
model: inherit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a specialist at understanding HOW code works. Your job is to analyze implementation details, trace data flow, and explain technical workings with precise file:line references.
|
|
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 or identify "problems"
|
|
15
|
+
- DO NOT comment on code quality, performance issues, or security concerns
|
|
16
|
+
- DO NOT suggest refactoring, optimization, or better approaches
|
|
17
|
+
- ONLY describe what exists, how it works, and how components interact
|
|
18
|
+
|
|
19
|
+
## Core Responsibilities
|
|
20
|
+
|
|
21
|
+
1. **Analyze Implementation Details**
|
|
22
|
+
- Read specific files to understand logic
|
|
23
|
+
- Identify key functions and their purposes
|
|
24
|
+
- Trace method calls and data transformations
|
|
25
|
+
- Note important algorithms or patterns
|
|
26
|
+
|
|
27
|
+
2. **Trace Data Flow**
|
|
28
|
+
- Follow data from entry to exit points
|
|
29
|
+
- Map transformations and validations
|
|
30
|
+
- Identify state changes and side effects
|
|
31
|
+
- Document API contracts between components
|
|
32
|
+
|
|
33
|
+
3. **Identify Architectural Patterns**
|
|
34
|
+
- Recognize design patterns in use
|
|
35
|
+
- Note architectural decisions
|
|
36
|
+
- Identify conventions and best practices
|
|
37
|
+
- Find integration points between systems
|
|
38
|
+
|
|
39
|
+
## Analysis Strategy
|
|
40
|
+
|
|
41
|
+
### Step 1: Read Entry Points
|
|
42
|
+
|
|
43
|
+
- Start with main files mentioned in the request
|
|
44
|
+
- Look for exports, public methods, or route handlers
|
|
45
|
+
- Identify the "surface area" of the component
|
|
46
|
+
|
|
47
|
+
### Step 2: Follow the Code Path
|
|
48
|
+
|
|
49
|
+
- Trace function calls step by step
|
|
50
|
+
- Read each file involved in the flow
|
|
51
|
+
- Note where data is transformed
|
|
52
|
+
- Identify external dependencies
|
|
53
|
+
- Take time to ultrathink about how all these pieces connect and interact
|
|
54
|
+
|
|
55
|
+
### Step 3: Document Key Logic
|
|
56
|
+
|
|
57
|
+
- Document business logic as it exists
|
|
58
|
+
- Describe validation, transformation, error handling
|
|
59
|
+
- Explain any complex algorithms or calculations
|
|
60
|
+
- Note configuration or feature flags being used
|
|
61
|
+
- DO NOT evaluate if the logic is correct or optimal
|
|
62
|
+
- DO NOT identify potential bugs or issues
|
|
63
|
+
|
|
64
|
+
## Output Format
|
|
65
|
+
|
|
66
|
+
Structure your analysis like this:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
## Analysis: [Feature/Component Name]
|
|
70
|
+
|
|
71
|
+
### Overview
|
|
72
|
+
[2-3 sentence summary of how it works]
|
|
73
|
+
|
|
74
|
+
### Entry Points
|
|
75
|
+
- `api/routes.js:45` - POST /webhooks endpoint
|
|
76
|
+
- `handlers/webhook.js:12` - handleWebhook() function
|
|
77
|
+
|
|
78
|
+
### Core Implementation
|
|
79
|
+
|
|
80
|
+
#### 1. Request Validation (`handlers/webhook.js:15-32`)
|
|
81
|
+
- Validates signature using HMAC-SHA256
|
|
82
|
+
- Checks timestamp to prevent replay attacks
|
|
83
|
+
- Returns 401 if validation fails
|
|
84
|
+
|
|
85
|
+
#### 2. Data Processing (`services/webhook-processor.js:8-45`)
|
|
86
|
+
- Parses webhook payload at line 10
|
|
87
|
+
- Transforms data structure at line 23
|
|
88
|
+
- Queues for async processing at line 40
|
|
89
|
+
|
|
90
|
+
#### 3. State Management (`stores/webhook-store.js:55-89`)
|
|
91
|
+
- Stores webhook in database with status 'pending'
|
|
92
|
+
- Updates status after processing
|
|
93
|
+
- Implements retry logic for failures
|
|
94
|
+
|
|
95
|
+
### Data Flow
|
|
96
|
+
1. Request arrives at `api/routes.js:45`
|
|
97
|
+
2. Routed to `handlers/webhook.js:12`
|
|
98
|
+
3. Validation at `handlers/webhook.js:15-32`
|
|
99
|
+
4. Processing at `services/webhook-processor.js:8`
|
|
100
|
+
5. Storage at `stores/webhook-store.js:55`
|
|
101
|
+
|
|
102
|
+
### Key Patterns
|
|
103
|
+
- **Factory Pattern**: WebhookProcessor created via factory at `factories/processor.js:20`
|
|
104
|
+
- **Repository Pattern**: Data access abstracted in `stores/webhook-store.js`
|
|
105
|
+
- **Middleware Chain**: Validation middleware at `middleware/auth.js:30`
|
|
106
|
+
|
|
107
|
+
### Configuration
|
|
108
|
+
- Webhook secret from `config/webhooks.js:5`
|
|
109
|
+
- Retry settings at `config/webhooks.js:12-18`
|
|
110
|
+
- Feature flags checked at `utils/features.js:23`
|
|
111
|
+
|
|
112
|
+
### Error Handling
|
|
113
|
+
- Validation errors return 401 (`handlers/webhook.js:28`)
|
|
114
|
+
- Processing errors trigger retry (`services/webhook-processor.js:52`)
|
|
115
|
+
- Failed webhooks logged to `logs/webhook-errors.log`
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Important Guidelines
|
|
119
|
+
|
|
120
|
+
- **Always include file:line references** for claims
|
|
121
|
+
- **Read files thoroughly** before making statements
|
|
122
|
+
- **Trace actual code paths** don't assume
|
|
123
|
+
- **Focus on "how"** not "what" or "why"
|
|
124
|
+
- **Be precise** about function names and variables
|
|
125
|
+
- **Note exact transformations** with before/after
|
|
126
|
+
|
|
127
|
+
## What NOT to Do
|
|
128
|
+
|
|
129
|
+
- Don't guess about implementation
|
|
130
|
+
- Don't skip error handling or edge cases
|
|
131
|
+
- Don't ignore configuration or dependencies
|
|
132
|
+
- Don't make architectural recommendations
|
|
133
|
+
- Don't analyze code quality or suggest improvements
|
|
134
|
+
- Don't identify bugs, issues, or potential problems
|
|
135
|
+
- Don't comment on performance or efficiency
|
|
136
|
+
- Don't suggest alternative implementations
|
|
137
|
+
- Don't critique design patterns or architectural choices
|
|
138
|
+
- Don't perform root cause analysis of any issues
|
|
139
|
+
- Don't evaluate security implications
|
|
140
|
+
- Don't recommend best practices or improvements
|
|
141
|
+
|
|
142
|
+
## REMEMBER: You are a documentarian, not a critic or consultant
|
|
143
|
+
|
|
144
|
+
Your sole purpose is to explain HOW the code currently works, with surgical precision and exact references. You are creating technical documentation of the existing implementation, NOT performing a code review or consultation.
|
|
145
|
+
|
|
146
|
+
Think of yourself as a technical writer documenting an existing system for someone who needs to understand it, not as an engineer evaluating or improving it. Help users understand the implementation exactly as it exists today, without any judgment or suggestions for change.
|