@codyswann/lisa 1.0.0 → 1.0.5

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.
Files changed (280) hide show
  1. package/README.md +244 -36
  2. package/all/copy-overwrite/.claude/README.md +1 -3
  3. package/all/copy-overwrite/.claude/REFERENCE.md +519 -0
  4. package/all/copy-overwrite/.claude/agents/skill-evaluator.md +7 -7
  5. package/all/copy-overwrite/.claude/agents/test-coverage-agent.md +17 -0
  6. package/all/copy-overwrite/.claude/commands/git/commit.md +9 -5
  7. package/all/copy-overwrite/.claude/commands/git/submit-pr.md +1 -1
  8. package/all/copy-overwrite/.claude/commands/lisa/review-implementation.md +209 -0
  9. package/all/copy-overwrite/.claude/commands/project/add-test-coverage.md +58 -0
  10. package/all/copy-overwrite/.claude/commands/project/archive.md +1 -1
  11. package/all/copy-overwrite/.claude/commands/project/complete-task.md +53 -1
  12. package/all/copy-overwrite/.claude/commands/project/debrief.md +12 -23
  13. package/all/copy-overwrite/.claude/commands/project/execute.md +33 -77
  14. package/all/copy-overwrite/.claude/commands/project/fix-linter-error.md +87 -0
  15. package/all/copy-overwrite/.claude/commands/project/implement.md +24 -28
  16. package/all/copy-overwrite/.claude/commands/project/lower-code-complexity.md +30 -55
  17. package/all/copy-overwrite/.claude/commands/project/plan.md +87 -242
  18. package/all/copy-overwrite/.claude/commands/project/reduce-max-lines-per-function.md +76 -0
  19. package/all/copy-overwrite/.claude/commands/project/reduce-max-lines.md +75 -0
  20. package/all/copy-overwrite/.claude/commands/project/research.md +86 -188
  21. package/all/copy-overwrite/.claude/commands/project/review.md +19 -38
  22. package/all/copy-overwrite/.claude/commands/project/setup.md +1 -1
  23. package/all/copy-overwrite/.claude/commands/project/verify.md +62 -25
  24. package/all/copy-overwrite/.claude/commands/pull-request/review.md +25 -7
  25. package/all/copy-overwrite/.claude/commands/tasks/load.md +63 -0
  26. package/all/copy-overwrite/.claude/commands/tasks/sync.md +84 -0
  27. package/all/copy-overwrite/.claude/hooks/README.md +75 -0
  28. package/all/copy-overwrite/.claude/hooks/check-tired-boss.sh +61 -0
  29. package/all/copy-overwrite/.claude/hooks/debug-hook.sh +47 -0
  30. package/all/copy-overwrite/.claude/hooks/notify-ntfy.sh +2 -0
  31. package/all/copy-overwrite/.claude/hooks/sync-tasks.sh +95 -0
  32. package/all/copy-overwrite/.claude/{skills/coding-philosophy/SKILL.md → rules/coding-philosophy.md} +93 -70
  33. package/all/copy-overwrite/.claude/settings.json +35 -14
  34. package/all/copy-overwrite/.claude/skills/prompt-complexity-scorer/SKILL.md +41 -9
  35. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/init_skill.py +2 -0
  36. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/package_skill.py +2 -0
  37. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/quick_validate.py +2 -0
  38. package/all/copy-overwrite/.safety-net.json +25 -0
  39. package/all/copy-overwrite/CLAUDE.md +8 -30
  40. package/all/copy-overwrite/HUMAN.md +517 -17
  41. package/all/create-only/.claude/rules/PROJECT_RULES.md +9 -0
  42. package/all/create-only/scripts/setup-deploy-key.sh +190 -0
  43. package/all/deletions.json +5 -0
  44. package/cdk/copy-overwrite/.github/workflows/ci.yml +142 -0
  45. package/cdk/copy-overwrite/.github/workflows/deploy.yml +59 -0
  46. package/cdk/copy-overwrite/eslint.cdk.ts +175 -0
  47. package/cdk/copy-overwrite/eslint.config.ts +51 -0
  48. package/cdk/copy-overwrite/eslint.slow.config.ts +80 -0
  49. package/cdk/copy-overwrite/knip.json +53 -0
  50. package/cdk/copy-overwrite/tsconfig.eslint.json +11 -0
  51. package/cdk/merge/package.json +17 -1
  52. package/dist/cli/index.d.ts +3 -2
  53. package/dist/cli/index.d.ts.map +1 -1
  54. package/dist/cli/index.js +83 -64
  55. package/dist/cli/index.js.map +1 -1
  56. package/dist/cli/prompts.d.ts +17 -3
  57. package/dist/cli/prompts.d.ts.map +1 -1
  58. package/dist/cli/prompts.js +52 -16
  59. package/dist/cli/prompts.js.map +1 -1
  60. package/dist/core/config.d.ts +13 -4
  61. package/dist/core/config.d.ts.map +1 -1
  62. package/dist/core/config.js +17 -9
  63. package/dist/core/config.js.map +1 -1
  64. package/dist/core/git-service.d.ts +40 -0
  65. package/dist/core/git-service.d.ts.map +1 -0
  66. package/dist/core/git-service.js +52 -0
  67. package/dist/core/git-service.js.map +1 -0
  68. package/dist/core/index.d.ts +3 -3
  69. package/dist/core/index.js +3 -3
  70. package/dist/core/lisa.d.ts +124 -7
  71. package/dist/core/lisa.d.ts.map +1 -1
  72. package/dist/core/lisa.js +423 -221
  73. package/dist/core/lisa.js.map +1 -1
  74. package/dist/core/manifest.d.ts +5 -1
  75. package/dist/core/manifest.d.ts.map +1 -1
  76. package/dist/core/manifest.js +22 -16
  77. package/dist/core/manifest.js.map +1 -1
  78. package/dist/detection/detector.interface.d.ts +1 -1
  79. package/dist/detection/detectors/cdk.d.ts +6 -1
  80. package/dist/detection/detectors/cdk.d.ts.map +1 -1
  81. package/dist/detection/detectors/cdk.js +16 -8
  82. package/dist/detection/detectors/cdk.js.map +1 -1
  83. package/dist/detection/detectors/expo.d.ts +6 -1
  84. package/dist/detection/detectors/expo.d.ts.map +1 -1
  85. package/dist/detection/detectors/expo.js +13 -8
  86. package/dist/detection/detectors/expo.js.map +1 -1
  87. package/dist/detection/detectors/nestjs.d.ts +7 -2
  88. package/dist/detection/detectors/nestjs.d.ts.map +1 -1
  89. package/dist/detection/detectors/nestjs.js +17 -9
  90. package/dist/detection/detectors/nestjs.js.map +1 -1
  91. package/dist/detection/detectors/npm-package.d.ts +6 -1
  92. package/dist/detection/detectors/npm-package.d.ts.map +1 -1
  93. package/dist/detection/detectors/npm-package.js +9 -4
  94. package/dist/detection/detectors/npm-package.js.map +1 -1
  95. package/dist/detection/detectors/typescript.d.ts +6 -1
  96. package/dist/detection/detectors/typescript.d.ts.map +1 -1
  97. package/dist/detection/detectors/typescript.js +12 -7
  98. package/dist/detection/detectors/typescript.js.map +1 -1
  99. package/dist/detection/index.d.ts +13 -3
  100. package/dist/detection/index.d.ts.map +1 -1
  101. package/dist/detection/index.js +17 -7
  102. package/dist/detection/index.js.map +1 -1
  103. package/dist/errors/index.d.ts +66 -2
  104. package/dist/errors/index.d.ts.map +1 -1
  105. package/dist/errors/index.js +89 -17
  106. package/dist/errors/index.js.map +1 -1
  107. package/dist/index.js +3 -3
  108. package/dist/index.js.map +1 -1
  109. package/dist/logging/console-logger.d.ts +21 -1
  110. package/dist/logging/console-logger.d.ts.map +1 -1
  111. package/dist/logging/console-logger.js +26 -6
  112. package/dist/logging/console-logger.js.map +1 -1
  113. package/dist/logging/index.d.ts +3 -3
  114. package/dist/logging/index.js +2 -2
  115. package/dist/logging/logger.interface.d.ts +1 -1
  116. package/dist/logging/silent-logger.d.ts +21 -1
  117. package/dist/logging/silent-logger.d.ts.map +1 -1
  118. package/dist/logging/silent-logger.js +20 -0
  119. package/dist/logging/silent-logger.js.map +1 -1
  120. package/dist/strategies/copy-contents.d.ts +47 -6
  121. package/dist/strategies/copy-contents.d.ts.map +1 -1
  122. package/dist/strategies/copy-contents.js +99 -49
  123. package/dist/strategies/copy-contents.js.map +1 -1
  124. package/dist/strategies/copy-overwrite.d.ts +10 -2
  125. package/dist/strategies/copy-overwrite.d.ts.map +1 -1
  126. package/dist/strategies/copy-overwrite.js +17 -9
  127. package/dist/strategies/copy-overwrite.js.map +1 -1
  128. package/dist/strategies/create-only.d.ts +10 -2
  129. package/dist/strategies/create-only.d.ts.map +1 -1
  130. package/dist/strategies/create-only.js +14 -6
  131. package/dist/strategies/create-only.js.map +1 -1
  132. package/dist/strategies/index.d.ts +17 -7
  133. package/dist/strategies/index.d.ts.map +1 -1
  134. package/dist/strategies/index.js +19 -9
  135. package/dist/strategies/index.js.map +1 -1
  136. package/dist/strategies/merge.d.ts +10 -2
  137. package/dist/strategies/merge.d.ts.map +1 -1
  138. package/dist/strategies/merge.js +21 -21
  139. package/dist/strategies/merge.js.map +1 -1
  140. package/dist/strategies/strategy.interface.d.ts +1 -1
  141. package/dist/strategies/strategy.interface.d.ts.map +1 -1
  142. package/dist/transaction/backup.d.ts +15 -1
  143. package/dist/transaction/backup.d.ts.map +1 -1
  144. package/dist/transaction/backup.js +47 -12
  145. package/dist/transaction/backup.js.map +1 -1
  146. package/dist/transaction/index.d.ts +3 -3
  147. package/dist/transaction/index.js +2 -2
  148. package/dist/transaction/transaction.d.ts +25 -2
  149. package/dist/transaction/transaction.d.ts.map +1 -1
  150. package/dist/transaction/transaction.js +25 -2
  151. package/dist/transaction/transaction.js.map +1 -1
  152. package/dist/utils/file-operations.d.ts +21 -0
  153. package/dist/utils/file-operations.d.ts.map +1 -1
  154. package/dist/utils/file-operations.js +48 -12
  155. package/dist/utils/file-operations.js.map +1 -1
  156. package/dist/utils/index.d.ts +3 -3
  157. package/dist/utils/index.js +3 -3
  158. package/dist/utils/json-utils.d.ts +12 -0
  159. package/dist/utils/json-utils.d.ts.map +1 -1
  160. package/dist/utils/json-utils.js +17 -5
  161. package/dist/utils/json-utils.js.map +1 -1
  162. package/dist/utils/path-utils.d.ts +11 -0
  163. package/dist/utils/path-utils.d.ts.map +1 -1
  164. package/dist/utils/path-utils.js +12 -1
  165. package/dist/utils/path-utils.js.map +1 -1
  166. package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +5 -0
  167. package/eslint-plugin-code-organization/index.js +5 -0
  168. package/eslint-plugin-code-organization/rules/enforce-statement-order.js +5 -0
  169. package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/scripts/validate_atomic_structure.py +2 -0
  170. package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/create_component.py +2 -0
  171. package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/validate_component.py +2 -0
  172. package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/scripts/validate_cross_platform.py +2 -0
  173. package/expo/copy-overwrite/.claude/skills/directory-structure/scripts/validate_structure.py +2 -0
  174. package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/scripts/generate-route.py +2 -0
  175. package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/scripts/validate_styling.py +2 -41
  176. package/{typescript → expo}/copy-overwrite/.github/workflows/build.yml +3 -0
  177. package/expo/copy-overwrite/.github/workflows/ci.yml +36 -0
  178. package/{typescript → expo}/copy-overwrite/.github/workflows/deploy.yml +22 -26
  179. package/{typescript → expo}/copy-overwrite/.github/workflows/lighthouse.yml +4 -1
  180. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/plugin-index.test.js +5 -0
  181. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/require-memo-in-view.test.js +5 -0
  182. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/single-component-per-file.test.js +5 -0
  183. package/expo/copy-overwrite/eslint-plugin-component-structure/index.js +5 -0
  184. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/enforce-component-structure.js +5 -0
  185. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/no-return-in-view.js +6 -1
  186. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/require-memo-in-view.js +5 -0
  187. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/single-component-per-file.js +5 -0
  188. package/expo/copy-overwrite/eslint-plugin-ui-standards/README.md +0 -68
  189. package/expo/copy-overwrite/eslint-plugin-ui-standards/index.js +5 -3
  190. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-classname-outside-ui.js +5 -0
  191. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-direct-rn-imports.js +5 -0
  192. package/expo/copy-overwrite/eslint.config.ts +53 -0
  193. package/expo/copy-overwrite/eslint.expo.ts +330 -0
  194. package/expo/copy-overwrite/eslint.slow.config.ts +86 -0
  195. package/expo/copy-overwrite/knip.json +132 -0
  196. package/expo/copy-overwrite/lighthouserc.js +27 -0
  197. package/expo/copy-overwrite/tsconfig.eslint.json +25 -0
  198. package/expo/create-only/lighthouserc-config.json +6 -1
  199. package/expo/merge/package.json +16 -3
  200. package/nestjs/copy-overwrite/.claude/skills/nestjs-rules/SKILL.md +1 -1
  201. package/{typescript → nestjs}/copy-overwrite/.github/k6/README.md +2 -2
  202. package/{typescript → nestjs}/copy-overwrite/.github/k6/examples/customer-deploy-integration.yml +3 -0
  203. package/{typescript → nestjs}/copy-overwrite/.github/k6/examples/data-driven-test.js +5 -0
  204. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/load.js +6 -2
  205. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/smoke.js +5 -0
  206. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/soak.js +5 -0
  207. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/spike.js +5 -0
  208. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/stress.js +5 -0
  209. package/{typescript → nestjs}/copy-overwrite/.github/k6/scripts/api-test.js +5 -0
  210. package/{typescript → nestjs}/copy-overwrite/.github/k6/scripts/default-test.js +5 -0
  211. package/nestjs/copy-overwrite/.github/workflows/ci.yml +29 -0
  212. package/nestjs/copy-overwrite/.github/workflows/deploy.yml +291 -0
  213. package/{typescript → nestjs}/copy-overwrite/.github/workflows/load-test.yml +3 -0
  214. package/nestjs/copy-overwrite/eslint.config.ts +53 -0
  215. package/nestjs/copy-overwrite/eslint.nestjs.ts +178 -0
  216. package/nestjs/merge/package.json +11 -3
  217. package/package.json +34 -40
  218. package/typescript/copy-contents/.husky/pre-commit +1 -1
  219. package/typescript/copy-contents/.husky/pre-push +99 -118
  220. package/typescript/copy-overwrite/.claude/hooks/format-on-edit.sh +2 -0
  221. package/typescript/copy-overwrite/.claude/hooks/install_pkgs.sh +3 -11
  222. package/typescript/copy-overwrite/.claude/hooks/lint-on-edit.sh +2 -0
  223. package/typescript/copy-overwrite/.claude/hooks/sg-scan-on-edit.sh +68 -0
  224. package/typescript/copy-overwrite/.claude/settings.json +79 -0
  225. package/typescript/copy-overwrite/.claude/skills/jsdoc-best-practices/SKILL.md +44 -0
  226. package/typescript/copy-overwrite/.github/README.md +49 -1
  227. package/typescript/copy-overwrite/.github/dependabot.yml +3 -0
  228. package/typescript/copy-overwrite/.github/workflows/ci.yml +7 -29
  229. package/typescript/copy-overwrite/.github/workflows/claude.yml +3 -0
  230. package/typescript/copy-overwrite/.github/workflows/create-github-issue-on-failure.yml +6 -4
  231. package/typescript/copy-overwrite/.github/workflows/create-issue-on-failure.yml +176 -0
  232. package/typescript/copy-overwrite/.github/workflows/create-jira-issue-on-failure.yml +3 -1
  233. package/typescript/copy-overwrite/.github/workflows/create-sentry-issue-on-failure.yml +3 -1
  234. package/typescript/copy-overwrite/.github/workflows/lint-slow.yml +40 -0
  235. package/typescript/copy-overwrite/.github/workflows/quality.yml +151 -38
  236. package/typescript/copy-overwrite/.github/workflows/release.yml +3 -0
  237. package/typescript/copy-overwrite/.gitleaksignore +3 -0
  238. package/typescript/copy-overwrite/.lintstagedrc.json +6 -0
  239. package/typescript/copy-overwrite/.prettierignore +2 -1
  240. package/typescript/copy-overwrite/.yamllint +2 -0
  241. package/typescript/copy-overwrite/ast-grep/rule-tests/.gitkeep +3 -0
  242. package/typescript/copy-overwrite/ast-grep/rules/.gitkeep +3 -0
  243. package/typescript/copy-overwrite/ast-grep/utils/.gitkeep +3 -0
  244. package/typescript/copy-overwrite/{commitlint.config.js → commitlint.config.cjs} +5 -0
  245. package/typescript/copy-overwrite/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +5 -0
  246. package/typescript/copy-overwrite/eslint-plugin-code-organization/index.js +5 -0
  247. package/typescript/copy-overwrite/eslint-plugin-code-organization/rules/enforce-statement-order.js +5 -0
  248. package/typescript/copy-overwrite/eslint.base.ts +430 -0
  249. package/typescript/copy-overwrite/eslint.config.ts +52 -0
  250. package/typescript/copy-overwrite/eslint.ignore.config.json +19 -2
  251. package/typescript/copy-overwrite/eslint.slow.config.ts +69 -0
  252. package/typescript/copy-overwrite/eslint.typescript.ts +142 -0
  253. package/typescript/copy-overwrite/knip.json +64 -0
  254. package/typescript/copy-overwrite/sgconfig.yml +11 -0
  255. package/typescript/copy-overwrite/tsconfig.eslint.json +9 -0
  256. package/typescript/create-only/eslint.config.local.ts +24 -0
  257. package/typescript/{copy-overwrite/eslint.thresholds.config.json → create-only/eslint.thresholds.json} +1 -1
  258. package/typescript/github-rulesets/base.json +2 -75
  259. package/typescript/merge/.claude/settings.json +160 -0
  260. package/typescript/merge/package.json +35 -34
  261. package/all/copy-overwrite/.claude/commands/rules/format-md.md +0 -72
  262. package/all/copy-overwrite/.claude/skills/coding-philosophy/references/function-structure.md +0 -416
  263. package/all/copy-overwrite/.claude/skills/coding-philosophy/references/immutable-patterns.md +0 -316
  264. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-inline-styles.js +0 -73
  265. package/expo/copy-overwrite/eslint.config.mjs +0 -560
  266. package/lisa.sh +0 -35
  267. package/typescript/copy-overwrite/eslint.config.mjs +0 -390
  268. /package/{all/create-only/PROJECT_RULES.md → cdk/copy-overwrite/.github/workflows/.keep} +0 -0
  269. /package/{typescript → nestjs}/copy-overwrite/.github/k6/BROWSER_TESTING_NOTE.md +0 -0
  270. /package/{typescript → nestjs}/copy-overwrite/.github/k6/INTEGRATION_GUIDE.md +0 -0
  271. /package/{typescript → nestjs}/copy-overwrite/.github/k6/SCENARIO_SELECTION_GUIDE.md +0 -0
  272. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/load.json +0 -0
  273. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/smoke.json +0 -0
  274. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/soak.json +0 -0
  275. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/spike.json +0 -0
  276. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/stress.json +0 -0
  277. /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/normal.json +0 -0
  278. /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/relaxed.json +0 -0
  279. /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/strict.json +0 -0
  280. /package/{typescript → nestjs}/copy-overwrite/.github/workflows/k6-load-test-README.md +0 -0
@@ -0,0 +1,519 @@
1
+ # Claude Code Hooks & Settings Reference
2
+
3
+ Complete expert reference for Claude Code hooks and `.claude/settings.json` configuration.
4
+
5
+ ---
6
+
7
+ ## Hook Event Types (13 total)
8
+
9
+ | Event | Trigger | Matcher Support |
10
+ |-------|---------|-----------------|
11
+ | `SessionStart` | Session begins/resumes | `startup`, `resume`, `clear`, `compact` |
12
+ | `SessionEnd` | Session terminates | `clear`, `logout`, `prompt_input_exit`, `other` |
13
+ | `Setup` | `--init`, `--init-only`, `--maintenance` flags | `init`, `maintenance` |
14
+ | `PreToolUse` | Before tool call processes | Tool names (regex supported) |
15
+ | `PostToolUse` | After tool succeeds | Tool names (regex supported) |
16
+ | `PostToolUseFailure` | After tool fails | Tool names (regex supported) |
17
+ | `PermissionRequest` | Permission dialog appears | Tool names |
18
+ | `SubagentStart` | Subagent spawns | N/A |
19
+ | `SubagentStop` | Subagent finishes | N/A |
20
+ | `Stop` | Main agent finishes (not interrupted) | N/A |
21
+ | `UserPromptSubmit` | User submits prompt | N/A |
22
+ | `Notification` | Notifications sent | `permission_prompt`, `idle_prompt`, `auth_success`, `elicitation_dialog` |
23
+ | `PreCompact` | Before context compaction | `manual`, `auto` |
24
+
25
+ ---
26
+
27
+ ## Complete settings.json Schema
28
+
29
+ ```json
30
+ {
31
+ "permissions": {
32
+ "allow": ["Bash(npm run:*)", "Read"],
33
+ "ask": ["Bash(git push:*)"],
34
+ "deny": ["Bash(rm -rf:*)", "Read(./.env.*)"],
35
+ "additionalDirectories": ["../docs/"],
36
+ "defaultMode": "default | acceptEdits | plan | bypassPermissions | dontAsk",
37
+ "disableBypassPermissionsMode": "disable | warn"
38
+ },
39
+
40
+ "hooks": {},
41
+ "disableAllHooks": false,
42
+ "allowManagedHooksOnly": false,
43
+
44
+ "env": {
45
+ "ANTHROPIC_API_KEY": "sk-...",
46
+ "BASH_DEFAULT_TIMEOUT_MS": "30000",
47
+ "BASH_MAX_TIMEOUT_MS": "7200000",
48
+ "CLAUDE_CODE_ENABLE_TELEMETRY": "1",
49
+ "CLAUDE_CODE_MAX_OUTPUT_TOKENS": "32000",
50
+ "MAX_THINKING_TOKENS": "31999",
51
+ "OTEL_METRICS_EXPORTER": "otlp",
52
+ "OTEL_EXPORTER_OTLP_ENDPOINT": "...",
53
+ "CUSTOM_VAR": "value"
54
+ },
55
+
56
+ "model": "string",
57
+ "alwaysThinkingEnabled": false,
58
+
59
+ "statusLine": { "type": "command", "command": "<HOME>/.claude/statusline.sh" },
60
+ "outputStyle": "string",
61
+ "language": "string",
62
+ "spinnerTipsEnabled": true,
63
+ "terminalProgressBarEnabled": true,
64
+ "showTurnDuration": true,
65
+
66
+ "attribution": {
67
+ "commit": "🤖 Generated with Claude Code\n\nCo-Authored-By: ...",
68
+ "pr": "🤖 Generated with Claude Code"
69
+ },
70
+ "includeCoAuthoredBy": false,
71
+
72
+ "forceLoginMethod": "claudeai | console",
73
+ "forceLoginOrgUUID": "string",
74
+ "apiKeyHelper": "string",
75
+ "awsAuthRefresh": "string",
76
+ "awsCredentialExport": "string",
77
+ "otelHeadersHelper": "string",
78
+
79
+ "enableAllProjectMcpServers": false,
80
+ "enabledMcpjsonServers": [],
81
+ "disabledMcpjsonServers": [],
82
+ "allowedMcpServers": [],
83
+ "deniedMcpServers": [],
84
+
85
+ "enabledPlugins": { "plugin-name@marketplace": true },
86
+ "extraKnownMarketplaces": {},
87
+ "strictKnownMarketplaces": [],
88
+
89
+ "respectGitignore": true,
90
+ "fileSuggestion": { "type": "command", "command": "..." },
91
+ "additionalDirectories": [],
92
+
93
+ "sandbox": {
94
+ "enabled": true,
95
+ "autoAllowBashIfSandboxed": true,
96
+ "excludedCommands": ["git", "docker"],
97
+ "allowUnsandboxedCommands": true,
98
+ "network": {
99
+ "allowUnixSockets": ["<HOME>/.ssh/agent-socket"],
100
+ "allowLocalBinding": true,
101
+ "httpProxyPort": 8080,
102
+ "socksProxyPort": 8081
103
+ },
104
+ "enableWeakerNestedSandbox": false
105
+ },
106
+
107
+ "cleanupPeriodDays": 30,
108
+ "autoUpdatesChannel": "stable | latest",
109
+ "plansDirectory": "string",
110
+ "companyAnnouncements": []
111
+ }
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Hook Configuration Structure
117
+
118
+ ```json
119
+ {
120
+ "hooks": {
121
+ "EventName": [
122
+ {
123
+ "matcher": "ToolPattern",
124
+ "hooks": [
125
+ {
126
+ "type": "command",
127
+ "command": "bash-cmd",
128
+ "timeout": 60
129
+ }
130
+ ]
131
+ }
132
+ ]
133
+ }
134
+ }
135
+ ```
136
+
137
+ ### Hook Types
138
+
139
+ | Type | Description |
140
+ |------|-------------|
141
+ | `command` | Executes bash command synchronously |
142
+ | `prompt` | Sends JSON input to LLM (Haiku) for decision |
143
+
144
+ **Prompt-based hooks** only support: `Stop`, `SubagentStop`, `UserPromptSubmit`, `PreToolUse`, `PermissionRequest`
145
+
146
+ Prompt hooks must return JSON: `{"ok": true|false, "reason": "explanation"}`
147
+
148
+ ---
149
+
150
+ ## Environment Variables Available to Hooks
151
+
152
+ | Variable | Description | Availability |
153
+ |----------|-------------|--------------|
154
+ | `CLAUDE_PROJECT_DIR` | Absolute path to project root | Always |
155
+ | `CLAUDE_CODE_REMOTE` | `"true"` if web environment | Always |
156
+ | `CLAUDE_ENV_FILE` | File path to persist env vars | SessionStart/Setup only |
157
+ | `CLAUDE_PLUGIN_ROOT` | Plugin directory path | Plugin hooks only |
158
+
159
+ ---
160
+
161
+ ## Exit Code Behavior
162
+
163
+ | Exit Code | Behavior |
164
+ |-----------|----------|
165
+ | **0** | Success - stdout processed for JSON or added as context |
166
+ | **2** | Blocking error - prevents action, stderr shown to Claude |
167
+ | **Other** | Non-blocking error - stderr shown in verbose mode |
168
+
169
+ ---
170
+
171
+ ## Blocking vs Non-Blocking Hooks
172
+
173
+ ### Blocking Hooks (Exit Code 2)
174
+
175
+ | Event | Effect |
176
+ |-------|--------|
177
+ | `PreToolUse` | Blocks tool call, shows stderr to Claude |
178
+ | `PermissionRequest` | Denies permission, shows stderr to Claude |
179
+ | `PostToolUse` | Shows stderr to Claude (tool already ran) |
180
+ | `UserPromptSubmit` | Erases submitted prompt, shows stderr to user only |
181
+ | `Stop`/`SubagentStop` | Blocks stoppage, shows stderr to Claude |
182
+ | `Setup`/`SessionStart`/`SessionEnd`/`PreCompact`/`Notification` | Shows stderr to user only |
183
+
184
+ ---
185
+
186
+ ## Matcher Patterns
187
+
188
+ | Pattern | Matches |
189
+ |---------|---------|
190
+ | `Write` | Exact match only |
191
+ | `Edit\|Write` | Either tool (regex OR) |
192
+ | `npm run:*` | Prefix + word boundary (`npm run lint` yes, `npm runtest` no) |
193
+ | `ls*` | Glob anywhere (`ls -la`, `lsof`) |
194
+ | `Notebook.*` | Regex pattern (all Notebook tools) |
195
+ | `mcp__server__.*` | All MCP server tools |
196
+ | `""` or omit | All tools/events |
197
+
198
+ ### Common Tool Names for Matching
199
+
200
+ **Core Tools:**
201
+ `Bash`, `Write`, `Edit`, `Read`, `Glob`, `Grep`, `WebFetch`, `WebSearch`
202
+
203
+ **Notebook Tools:**
204
+ `Notebook`, `NotebookEdit`
205
+
206
+ **Agent & Task Tools:**
207
+ `Task`, `TaskCreate`, `TaskUpdate`, `TaskList`, `TaskGet`
208
+
209
+ **Skill & Planning Tools:**
210
+ `Skill`, `EnterPlanMode`, `ExitPlanMode`, `AskUserQuestion`
211
+
212
+ **Advanced Tools:**
213
+ `LSP`, `Computer`, `ToolSearch`, `TeammateTool`
214
+
215
+ **MCP Tools Pattern:**
216
+ `mcp__<server>__<tool>` (e.g., `mcp__memory__create_entities`)
217
+
218
+ ---
219
+
220
+ ## Settings File Locations & Precedence
221
+
222
+ | Scope | Location | Shared | Precedence |
223
+ |-------|----------|--------|------------|
224
+ | Managed | System-level `managed-settings.json` | Yes (IT deployed) | Highest (cannot override) |
225
+ | User | `<HOME>/.claude/settings.json` | No | Normal |
226
+ | Project | `.claude/settings.json` | Yes (in git) | Normal |
227
+ | Local | `.claude/settings.local.json` | No (gitignored) | Normal |
228
+
229
+ ### Managed Settings Locations
230
+
231
+ | OS | Path |
232
+ |----|------|
233
+ | macOS | `<SYSTEM_CONFIG>/ClaudeCode/` |
234
+ | Linux/WSL | `<SYSTEM_CONFIG>/claude-code/` |
235
+ | Windows | `<SYSTEM_CONFIG>\ClaudeCode\` |
236
+
237
+ ---
238
+
239
+ ## Hook Output Handling by Event
240
+
241
+ | Event | stdout | stderr |
242
+ |-------|--------|--------|
243
+ | PreToolUse/PostToolUse/Stop/SubagentStop | Shown in verbose mode, JSON parsed for control | Shown in verbose mode |
244
+ | Notification/SessionEnd | Logged to debug only (`--debug`) | Logged to debug only |
245
+ | UserPromptSubmit/SessionStart/Setup | **Added to Claude's context** | Shown to user in verbose mode |
246
+
247
+ ---
248
+
249
+ ## Hook Input Schema (Common Fields)
250
+
251
+ All hook inputs include:
252
+
253
+ ```json
254
+ {
255
+ "session_id": "abc123",
256
+ "transcript_path": "/path/to/transcript.jsonl",
257
+ "cwd": "/current/working/directory",
258
+ "permission_mode": "default | plan | acceptEdits | dontAsk | bypassPermissions",
259
+ "hook_event_name": "EventName"
260
+ }
261
+ ```
262
+
263
+ ### PreToolUse Input
264
+
265
+ ```json
266
+ {
267
+ "tool_name": "Bash | Write | Edit | Read | Glob | Grep | WebFetch | WebSearch | Task",
268
+ "tool_input": {
269
+ "command": "...",
270
+ "description": "...",
271
+ "timeout": 120000,
272
+ "run_in_background": false
273
+ },
274
+ "tool_use_id": "toolu_01ABC123..."
275
+ }
276
+ ```
277
+
278
+ ### PostToolUse Input
279
+
280
+ ```json
281
+ {
282
+ "tool_name": "...",
283
+ "tool_input": {},
284
+ "tool_response": {},
285
+ "tool_use_id": "toolu_01ABC123..."
286
+ }
287
+ ```
288
+
289
+ ### Notification Input
290
+
291
+ ```json
292
+ {
293
+ "message": "Claude needs your permission to use Bash",
294
+ "notification_type": "permission_prompt | idle_prompt | auth_success | elicitation_dialog"
295
+ }
296
+ ```
297
+
298
+ ### UserPromptSubmit Input
299
+
300
+ ```json
301
+ {
302
+ "prompt": "User's prompt text"
303
+ }
304
+ ```
305
+
306
+ ### Stop Input
307
+
308
+ ```json
309
+ {
310
+ "stop_hook_active": false
311
+ }
312
+ ```
313
+
314
+ ### SubagentStop Input
315
+
316
+ ```json
317
+ {
318
+ "stop_hook_active": false,
319
+ "agent_id": "def456",
320
+ "agent_transcript_path": "/path/to/subagent/transcript.jsonl"
321
+ }
322
+ ```
323
+
324
+ ### SubagentStart Input
325
+
326
+ ```json
327
+ {
328
+ "agent_id": "agent-abc123",
329
+ "agent_type": "Explore | Bash | Plan | CustomAgentName"
330
+ }
331
+ ```
332
+
333
+ ### SessionStart Input
334
+
335
+ ```json
336
+ {
337
+ "source": "startup | resume | clear | compact",
338
+ "model": "claude-sonnet-4-20250514",
339
+ "agent_type": "AgentName"
340
+ }
341
+ ```
342
+
343
+ ### SessionEnd Input
344
+
345
+ ```json
346
+ {
347
+ "reason": "exit | clear | logout | prompt_input_exit | other"
348
+ }
349
+ ```
350
+
351
+ ### Setup Input
352
+
353
+ ```json
354
+ {
355
+ "trigger": "init | maintenance"
356
+ }
357
+ ```
358
+
359
+ ### PreCompact Input
360
+
361
+ ```json
362
+ {
363
+ "trigger": "manual | auto",
364
+ "custom_instructions": ""
365
+ }
366
+ ```
367
+
368
+ ---
369
+
370
+ ## Hook-Specific Output Schemas
371
+
372
+ ### PreToolUse Output
373
+
374
+ ```json
375
+ {
376
+ "hookSpecificOutput": {
377
+ "hookEventName": "PreToolUse",
378
+ "permissionDecision": "allow | deny | ask",
379
+ "permissionDecisionReason": "Optional explanation",
380
+ "updatedInput": {
381
+ "field_name": "new_value"
382
+ },
383
+ "additionalContext": "Additional context for Claude"
384
+ }
385
+ }
386
+ ```
387
+
388
+ ### PermissionRequest Output
389
+
390
+ ```json
391
+ {
392
+ "hookSpecificOutput": {
393
+ "hookEventName": "PermissionRequest",
394
+ "decision": {
395
+ "behavior": "allow | deny",
396
+ "message": "Why denied",
397
+ "interrupt": true,
398
+ "updatedInput": {}
399
+ }
400
+ }
401
+ }
402
+ ```
403
+
404
+ ### PostToolUse Output
405
+
406
+ ```json
407
+ {
408
+ "hookSpecificOutput": {
409
+ "hookEventName": "PostToolUse",
410
+ "additionalContext": "Feedback for Claude"
411
+ },
412
+ "decision": "block | undefined",
413
+ "reason": "Why blocked (if decision=block)"
414
+ }
415
+ ```
416
+
417
+ ### UserPromptSubmit Output
418
+
419
+ ```json
420
+ {
421
+ "hookSpecificOutput": {
422
+ "hookEventName": "UserPromptSubmit",
423
+ "additionalContext": "Additional context to add"
424
+ },
425
+ "decision": "block | undefined",
426
+ "reason": "Why blocked"
427
+ }
428
+ ```
429
+
430
+ ### Stop/SubagentStop Output
431
+
432
+ ```json
433
+ {
434
+ "decision": "block | undefined",
435
+ "reason": "Why blocked (required when blocked)"
436
+ }
437
+ ```
438
+
439
+ ### SessionStart/Setup Output
440
+
441
+ ```json
442
+ {
443
+ "hookSpecificOutput": {
444
+ "hookEventName": "SessionStart | Setup",
445
+ "additionalContext": "Context to inject"
446
+ }
447
+ }
448
+ ```
449
+
450
+ ---
451
+
452
+ ## Permission Evaluation Order
453
+
454
+ First match wins:
455
+
456
+ 1. **Deny rules** (highest priority)
457
+ 2. **Ask rules**
458
+ 3. **Allow rules** (lowest priority)
459
+
460
+ ---
461
+
462
+ ## Wildcard Patterns in Permissions
463
+
464
+ | Pattern | Description |
465
+ |---------|-------------|
466
+ | `:*` | Prefix matching with word boundary |
467
+ | `*` | Glob matching anywhere |
468
+ | `**` | Recursive glob |
469
+
470
+ Examples:
471
+ - `Bash(npm run:*)` - matches "npm run lint" but NOT "npm runtest"
472
+ - `Bash(ls*)` - matches both "ls -la" and "lsof"
473
+ - `Read(./secrets/**)` - matches all files under ./secrets/
474
+
475
+ ---
476
+
477
+ ## Best Practices
478
+
479
+ 1. **Blocking behavior for enforcement**: When creating hooks for linting, code quality, or static analysis, use blocking behavior (exit 2) so Claude receives feedback and can fix errors.
480
+
481
+ 2. **Notification hooks**: Notification-only hooks should exit 0 since they don't require Claude to take action.
482
+
483
+ 3. **JSON parsing**: Never parse JSON in shell scripts using grep/sed/cut/awk—always use `jq` for robust JSON handling.
484
+
485
+ 4. **Environment persistence**: Use `CLAUDE_ENV_FILE` in SessionStart/Setup hooks to persist environment variables across subsequent bash commands:
486
+ ```bash
487
+ echo 'export VAR=value' >> "$CLAUDE_ENV_FILE"
488
+ ```
489
+
490
+ 5. **Timeout configuration**: Default is 60 seconds per hook. Configure per-hook with `"timeout"` field (in seconds).
491
+
492
+ ---
493
+
494
+ ---
495
+
496
+ ## Claude Code System Prompts Reference
497
+
498
+ Comprehensive catalog of all 110+ system prompts used by Claude Code v2.1.19+. Maintained by Piebald AI and updated within minutes of each Claude Code release.
499
+
500
+ **What It Contains:**
501
+ - Main system prompt and ~40 system reminders
502
+ - 18+ tool descriptions (Bash, Write, Edit, Read, WebFetch, WebSearch, etc.)
503
+ - Specialized agent prompts (Explore, Plan, Task execution)
504
+ - Creation assistants (Agent architect, CLAUDE.md generator, status line setup)
505
+ - Slash command implementations (/security-review, /review-pr, /pr-comments)
506
+ - Utility functions (summarization, session management, security analysis)
507
+
508
+ **Why It's Useful:**
509
+ Understand exactly how Claude Code is instructed to operate across different scenarios. Reference for customization via tweakcc tool.
510
+
511
+ **Repository:** [Piebald-AI/claude-code-system-prompts](https://github.com/Piebald-AI/claude-code-system-prompts)
512
+
513
+ ---
514
+
515
+ ## Sources
516
+
517
+ - [Claude Code Hooks Reference](https://docs.anthropic.com/en/docs/claude-code/hooks)
518
+ - [Claude Code Settings Documentation](https://docs.anthropic.com/en/docs/claude-code/settings)
519
+ - [Claude Code System Prompts Repository](https://github.com/Piebald-AI/claude-code-system-prompts)
@@ -80,13 +80,13 @@ Examples:
80
80
  #### Criterion 5: Non-Redundancy (Does it already exist?)
81
81
 
82
82
  **PASS**: Not already covered by existing skills or project documentation
83
- **FAIL**: Duplicates existing skills or belongs in CLAUDE.md/PROJECT_RULES.md
83
+ **FAIL**: Duplicates existing skills or belongs in CLAUDE.md/.claude/rules/PROJECT_RULES.md
84
84
 
85
85
  Before recommending skill creation, always check:
86
86
 
87
87
  1. Existing skills in `.claude/skills/`
88
88
  2. CLAUDE.md for project-level instructions
89
- 3. PROJECT_RULES.md for project rules
89
+ 3. .claude/rules/PROJECT_RULES.md for project rules
90
90
 
91
91
  ### Step 3: Make the Decision
92
92
 
@@ -101,7 +101,7 @@ Before recommending skill creation, always check:
101
101
  **DO NOT CREATE SKILL** if any criterion fails. Instead:
102
102
 
103
103
  - If **redundant** → **OMIT ENTIRELY** - reference the existing documentation instead
104
- - If too simple → Suggest adding to CLAUDE.md or PROJECT_RULES.md
104
+ - If too simple → Suggest adding to CLAUDE.md or .claude/rules/PROJECT_RULES.md
105
105
  - If too narrow → Just apply the knowledge directly, no documentation needed
106
106
  - If temporary → Document as a code comment or temporary note
107
107
 
@@ -111,7 +111,7 @@ Before evaluating other criteria, check if the content already exists:
111
111
 
112
112
  1. **Existing skill covers it** → OMIT - just invoke the existing skill
113
113
  2. **Already in CLAUDE.md** → OMIT - it's already enforced
114
- 3. **Already in PROJECT_RULES.md** → OMIT - it's already documented
114
+ 3. **Already in .claude/rules/PROJECT_RULES.md** → OMIT - it's already documented
115
115
 
116
116
  If redundant, stop evaluation and report: "This is already covered by [source]. No action needed."
117
117
 
@@ -190,9 +190,9 @@ When evaluating content, provide this assessment:
190
190
  - Reusability: ✅ Ongoing rule
191
191
  - Complexity: ❌ Single rule, easily remembered
192
192
  - Stability: ✅ Established pattern
193
- - Non-Redundancy: ✅ Not in PROJECT_RULES.md
193
+ - Non-Redundancy: ✅ Not in .claude/rules/PROJECT_RULES.md
194
194
 
195
- **Decision**: ADD TO RULES → Add to PROJECT_RULES.md instead
195
+ **Decision**: ADD TO RULES → Add to .claude/rules/PROJECT_RULES.md instead
196
196
 
197
197
  ### Example 4: Should OMIT ENTIRELY (Already Covered)
198
198
 
@@ -227,7 +227,7 @@ When evaluating content, provide this assessment:
227
227
  1. **Check for redundancy FIRST** - Before any other evaluation, verify it's not already covered
228
228
  2. **Default to NOT creating skills** - Skills should be rare
229
229
  3. **OMIT is a valid decision** - If it exists elsewhere, don't duplicate it
230
- 4. **Simple rules go in CLAUDE.md or PROJECT_RULES.md** - Not every rule needs a skill
230
+ 4. **Simple rules go in CLAUDE.md or .claude/rules/PROJECT_RULES.md** - Not every rule needs a skill
231
231
  5. **When in doubt, don't create a skill** - It's better to have fewer, high-quality skills
232
232
  6. **Skills are for Claude, not humans** - Focus on what would help another Claude instance
233
233
 
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: test-coverage-agent
3
+ description: Adds comprehensive test coverage to source files. Use for writing meaningful unit and integration tests.
4
+ tools: Read, Write, Edit, Bash, Grep, Glob
5
+ model: opus
6
+ auto-invoke: true
7
+ ---
8
+
9
+ You are a test coverage specialist. When given a file:
10
+
11
+ 1. Analyze the source file to understand its functionality
12
+ 2. Identify untested code paths, edge cases, and error conditions
13
+ 3. Write comprehensive, meaningful tests (not just coverage padding)
14
+ 4. Follow the project's existing test patterns and conventions
15
+ 5. Ensure tests are readable and maintainable
16
+
17
+ Focus on testing behavior, not implementation details.
@@ -18,9 +18,10 @@ Create conventional commits for current changes. Optional hint: $ARGUMENTS
18
18
  ### Apply these requirements
19
19
 
20
20
  1. **Branch Check**: If on `dev`, `staging`, or `main`, create a feature branch named after the changes
21
- 2. **Commit Strategy**: Group related changes into conventional commits (feat, fix, chore, docs, etc.)
22
- 3. **Commit Creation**: Stage and commit changes in logical batches with clear messages
23
- 4. **Verification**: Ensure all changes are committed
21
+ 2. **Commit Strategy**: Group related changes into logical conventional commits (feat, fix, chore, docs, etc.)
22
+ 3. **Commit ALL Files**: Every file must be assigned to a commit group - no file gets left out or unstaged
23
+ 4. **Commit Creation**: Stage and commit each group with clear messages
24
+ 5. **Verification**: Run `git status` to confirm working directory is clean - must show "nothing to commit"
24
25
 
25
26
  ### Use conventional commit format
26
27
 
@@ -34,10 +35,13 @@ Create conventional commits for current changes. Optional hint: $ARGUMENTS
34
35
 
35
36
  ### Never
36
37
 
37
- - use `--no-verify` or `--no-verify` flags
38
+ - use `--no-verify` flag
38
39
  - attempt to bypass tests or quality checks
39
40
  - skip tests or quality checks
40
- - stash changes
41
+ - stash changes - ALL changes must be committed
42
+ - skip or exclude any files from the commit
43
+ - leave uncommitted changes in the working directory
44
+ - ask the user which files to commit - commit everything
41
45
 
42
46
  ## Execute
43
47
 
@@ -25,7 +25,7 @@ Push current branch and create or update a pull request. Optional hint: $ARGUMEN
25
25
 
26
26
  1. **Branch Check**: Verify not on `dev`, `staging`, or `main` (cannot create PR from protected branches)
27
27
  2. **Commit Check**: Ensure all changes are committed before pushing
28
- 3. **Push**: Push current branch to remote with `-u` flag
28
+ 3. **Push**: Push current branch to remote with `-u` flag and the following environment variable - GIT_SSH_COMMAND="ssh -o ServerAliveInterval=30 -o ServerAliveCountMax=5"
29
29
  4. **PR Management**:
30
30
  - Check for existing PR on this branch
31
31
  - If exists: Update description with latest changes