@vetala/vetala 0.1.0-beta

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.

Potentially problematic release.


This version of @vetala/vetala might be problematic. Click here for more details.

Files changed (271) hide show
  1. package/CONTRIBUTING.md +77 -0
  2. package/LICENSE +184 -0
  3. package/README.md +136 -0
  4. package/THIRD_PARTY_LICENSES.md +17 -0
  5. package/dist/src/agent.d.ts +30 -0
  6. package/dist/src/agent.js +216 -0
  7. package/dist/src/agent.js.map +1 -0
  8. package/dist/src/approvals.d.ts +18 -0
  9. package/dist/src/approvals.js +81 -0
  10. package/dist/src/approvals.js.map +1 -0
  11. package/dist/src/cli.d.ts +2 -0
  12. package/dist/src/cli.js +87 -0
  13. package/dist/src/cli.js.map +1 -0
  14. package/dist/src/config.d.ts +12 -0
  15. package/dist/src/config.js +183 -0
  16. package/dist/src/config.js.map +1 -0
  17. package/dist/src/context-memory.d.ts +7 -0
  18. package/dist/src/context-memory.js +96 -0
  19. package/dist/src/context-memory.js.map +1 -0
  20. package/dist/src/ink/command-suggestions.d.ts +7 -0
  21. package/dist/src/ink/command-suggestions.js +179 -0
  22. package/dist/src/ink/command-suggestions.js.map +1 -0
  23. package/dist/src/ink/ink-terminal-ui.d.ts +36 -0
  24. package/dist/src/ink/ink-terminal-ui.js +79 -0
  25. package/dist/src/ink/ink-terminal-ui.js.map +1 -0
  26. package/dist/src/ink/repl-app.d.ts +9 -0
  27. package/dist/src/ink/repl-app.js +789 -0
  28. package/dist/src/ink/repl-app.js.map +1 -0
  29. package/dist/src/ink/transcript-cards.d.ts +6 -0
  30. package/dist/src/ink/transcript-cards.js +24 -0
  31. package/dist/src/ink/transcript-cards.js.map +1 -0
  32. package/dist/src/path-policy.d.ts +11 -0
  33. package/dist/src/path-policy.js +67 -0
  34. package/dist/src/path-policy.js.map +1 -0
  35. package/dist/src/process-utils.d.ts +13 -0
  36. package/dist/src/process-utils.js +52 -0
  37. package/dist/src/process-utils.js.map +1 -0
  38. package/dist/src/repl.d.ts +9 -0
  39. package/dist/src/repl.js +13 -0
  40. package/dist/src/repl.js.map +1 -0
  41. package/dist/src/sarvam/client.d.ts +15 -0
  42. package/dist/src/sarvam/client.js +208 -0
  43. package/dist/src/sarvam/client.js.map +1 -0
  44. package/dist/src/sarvam/models.d.ts +2 -0
  45. package/dist/src/sarvam/models.js +7 -0
  46. package/dist/src/sarvam/models.js.map +1 -0
  47. package/dist/src/search-provider.d.ts +6 -0
  48. package/dist/src/search-provider.js +8 -0
  49. package/dist/src/search-provider.js.map +1 -0
  50. package/dist/src/session-store.d.ts +19 -0
  51. package/dist/src/session-store.js +318 -0
  52. package/dist/src/session-store.js.map +1 -0
  53. package/dist/src/skills/runtime.d.ts +26 -0
  54. package/dist/src/skills/runtime.js +317 -0
  55. package/dist/src/skills/runtime.js.map +1 -0
  56. package/dist/src/skills/types.d.ts +25 -0
  57. package/dist/src/skills/types.js +2 -0
  58. package/dist/src/skills/types.js.map +1 -0
  59. package/dist/src/terminal-ui.d.ts +29 -0
  60. package/dist/src/terminal-ui.js +236 -0
  61. package/dist/src/terminal-ui.js.map +1 -0
  62. package/dist/src/tools/filesystem.d.ts +2 -0
  63. package/dist/src/tools/filesystem.js +622 -0
  64. package/dist/src/tools/filesystem.js.map +1 -0
  65. package/dist/src/tools/git.d.ts +2 -0
  66. package/dist/src/tools/git.js +326 -0
  67. package/dist/src/tools/git.js.map +1 -0
  68. package/dist/src/tools/index.d.ts +6 -0
  69. package/dist/src/tools/index.js +21 -0
  70. package/dist/src/tools/index.js.map +1 -0
  71. package/dist/src/tools/registry.d.ts +15 -0
  72. package/dist/src/tools/registry.js +59 -0
  73. package/dist/src/tools/registry.js.map +1 -0
  74. package/dist/src/tools/shell.d.ts +2 -0
  75. package/dist/src/tools/shell.js +97 -0
  76. package/dist/src/tools/shell.js.map +1 -0
  77. package/dist/src/tools/skill.d.ts +3 -0
  78. package/dist/src/tools/skill.js +130 -0
  79. package/dist/src/tools/skill.js.map +1 -0
  80. package/dist/src/tools/web.d.ts +3 -0
  81. package/dist/src/tools/web.js +144 -0
  82. package/dist/src/tools/web.js.map +1 -0
  83. package/dist/src/types.d.ts +236 -0
  84. package/dist/src/types.js +2 -0
  85. package/dist/src/types.js.map +1 -0
  86. package/dist/src/workspace-trust.d.ts +3 -0
  87. package/dist/src/workspace-trust.js +31 -0
  88. package/dist/src/workspace-trust.js.map +1 -0
  89. package/dist/src/xdg.d.ts +9 -0
  90. package/dist/src/xdg.js +77 -0
  91. package/dist/src/xdg.js.map +1 -0
  92. package/package.json +57 -0
  93. package/skill/agents-md-generator/SKILL.md +75 -0
  94. package/skill/agents-md-generator/references/agents_md_template.md +160 -0
  95. package/skill/agents-md-generator/references/loc_measurement.md +67 -0
  96. package/skill/agents-md-generator/references/monorepo_detection.md +78 -0
  97. package/skill/agents-md-generator/references/monorepo_strategy.md +60 -0
  98. package/skill/agents-md-generator/references/read_only_commands.md +151 -0
  99. package/skill/agents-md-generator/references/update_strategy.md +160 -0
  100. package/skill/agents-md-generator/references/working_agreements.md +53 -0
  101. package/skill/biz-opportunity-scout/SKILL.md +53 -0
  102. package/skill/biz-opportunity-scout/references/competitive_analysis.md +84 -0
  103. package/skill/biz-opportunity-scout/references/market_sizing.md +68 -0
  104. package/skill/biz-opportunity-scout/references/pmf_indicators.md +94 -0
  105. package/skill/biz-opportunity-scout/references/report_template.md +243 -0
  106. package/skill/biz-opportunity-scout/references/unit_economics.md +97 -0
  107. package/skill/code-review/SKILL.md +86 -0
  108. package/skill/code-review/references/change_analysis.md +116 -0
  109. package/skill/code-review/references/git_operations.md +115 -0
  110. package/skill/code-review/references/impact_detection.md +149 -0
  111. package/skill/code-review/references/output_format.md +137 -0
  112. package/skill/code-review/references/severity_criteria.md +100 -0
  113. package/skill/code-security-audit/SKILL.md +123 -0
  114. package/skill/code-security-audit/references/audit_process.md +277 -0
  115. package/skill/code-security-audit/references/remediation_patterns.md +599 -0
  116. package/skill/code-security-audit/references/report_format.md +391 -0
  117. package/skill/code-security-audit/references/security_domains.md +830 -0
  118. package/skill/code-security-audit/references/vulnerability_patterns.md +813 -0
  119. package/skill/composition-patterns/SKILL.md +83 -0
  120. package/skill/composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
  121. package/skill/composition-patterns/rules/architecture-compound-components.md +112 -0
  122. package/skill/composition-patterns/rules/patterns-children-over-render-props.md +87 -0
  123. package/skill/composition-patterns/rules/patterns-explicit-variants.md +100 -0
  124. package/skill/composition-patterns/rules/react19-no-forwardref.md +42 -0
  125. package/skill/composition-patterns/rules/state-context-interface.md +191 -0
  126. package/skill/composition-patterns/rules/state-decouple-implementation.md +113 -0
  127. package/skill/composition-patterns/rules/state-lift-state.md +125 -0
  128. package/skill/deploy-to-vercel/SKILL.md +293 -0
  129. package/skill/deploy-to-vercel/resources/deploy-sandbox.sh +301 -0
  130. package/skill/deploy-to-vercel/resources/deploy.sh +301 -0
  131. package/skill/doc/SKILL_GUIDELINES.md +138 -0
  132. package/skill/git-workflow/SKILL.md +94 -0
  133. package/skill/git-workflow/references/advanced-git.md +632 -0
  134. package/skill/git-workflow/references/branching-strategies.md +344 -0
  135. package/skill/git-workflow/references/ci-cd-integration.md +683 -0
  136. package/skill/git-workflow/references/code-quality-tools.md +351 -0
  137. package/skill/git-workflow/references/commit-conventions.md +439 -0
  138. package/skill/git-workflow/references/github-releases.md +288 -0
  139. package/skill/git-workflow/references/pull-request-workflow.md +773 -0
  140. package/skill/git-workflow/scripts/verify-git-workflow.sh +263 -0
  141. package/skill/jetbrains-vmoptions/SKILL.md +51 -0
  142. package/skill/jetbrains-vmoptions/references/common-options.md +357 -0
  143. package/skill/jetbrains-vmoptions/references/gc-options.md +350 -0
  144. package/skill/jetbrains-vmoptions/references/memory-options.md +339 -0
  145. package/skill/jetbrains-vmoptions/references/prerequisite-check.md +65 -0
  146. package/skill/kysely-converter/SKILL.md +62 -0
  147. package/skill/kysely-converter/references/delete.md +323 -0
  148. package/skill/kysely-converter/references/insert.md +386 -0
  149. package/skill/kysely-converter/references/operators.md +331 -0
  150. package/skill/kysely-converter/references/select.md +1000 -0
  151. package/skill/kysely-converter/references/update.md +349 -0
  152. package/skill/kysely-converter/references/window_function.md +537 -0
  153. package/skill/react-best-practices/SKILL.md +131 -0
  154. package/skill/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  155. package/skill/react-best-practices/rules/advanced-init-once.md +42 -0
  156. package/skill/react-best-practices/rules/advanced-use-latest.md +39 -0
  157. package/skill/react-best-practices/rules/async-api-routes.md +38 -0
  158. package/skill/react-best-practices/rules/async-defer-await.md +80 -0
  159. package/skill/react-best-practices/rules/async-dependencies.md +51 -0
  160. package/skill/react-best-practices/rules/async-parallel.md +28 -0
  161. package/skill/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  162. package/skill/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  163. package/skill/react-best-practices/rules/bundle-conditional.md +31 -0
  164. package/skill/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  165. package/skill/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  166. package/skill/react-best-practices/rules/bundle-preload.md +50 -0
  167. package/skill/react-best-practices/rules/client-event-listeners.md +74 -0
  168. package/skill/react-best-practices/rules/client-localstorage-schema.md +71 -0
  169. package/skill/react-best-practices/rules/client-passive-event-listeners.md +48 -0
  170. package/skill/react-best-practices/rules/client-swr-dedup.md +56 -0
  171. package/skill/react-best-practices/rules/js-batch-dom-css.md +107 -0
  172. package/skill/react-best-practices/rules/js-cache-function-results.md +80 -0
  173. package/skill/react-best-practices/rules/js-cache-property-access.md +28 -0
  174. package/skill/react-best-practices/rules/js-cache-storage.md +70 -0
  175. package/skill/react-best-practices/rules/js-combine-iterations.md +32 -0
  176. package/skill/react-best-practices/rules/js-early-exit.md +50 -0
  177. package/skill/react-best-practices/rules/js-hoist-regexp.md +45 -0
  178. package/skill/react-best-practices/rules/js-index-maps.md +37 -0
  179. package/skill/react-best-practices/rules/js-length-check-first.md +49 -0
  180. package/skill/react-best-practices/rules/js-min-max-loop.md +82 -0
  181. package/skill/react-best-practices/rules/js-set-map-lookups.md +24 -0
  182. package/skill/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  183. package/skill/react-best-practices/rules/rendering-activity.md +26 -0
  184. package/skill/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  185. package/skill/react-best-practices/rules/rendering-conditional-render.md +40 -0
  186. package/skill/react-best-practices/rules/rendering-content-visibility.md +38 -0
  187. package/skill/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  188. package/skill/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  189. package/skill/react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
  190. package/skill/react-best-practices/rules/rendering-svg-precision.md +28 -0
  191. package/skill/react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  192. package/skill/react-best-practices/rules/rerender-defer-reads.md +39 -0
  193. package/skill/react-best-practices/rules/rerender-dependencies.md +45 -0
  194. package/skill/react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  195. package/skill/react-best-practices/rules/rerender-derived-state.md +29 -0
  196. package/skill/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  197. package/skill/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  198. package/skill/react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
  199. package/skill/react-best-practices/rules/rerender-memo.md +44 -0
  200. package/skill/react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  201. package/skill/react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  202. package/skill/react-best-practices/rules/rerender-transitions.md +40 -0
  203. package/skill/react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  204. package/skill/react-best-practices/rules/server-after-nonblocking.md +73 -0
  205. package/skill/react-best-practices/rules/server-auth-actions.md +96 -0
  206. package/skill/react-best-practices/rules/server-cache-lru.md +41 -0
  207. package/skill/react-best-practices/rules/server-cache-react.md +76 -0
  208. package/skill/react-best-practices/rules/server-dedup-props.md +65 -0
  209. package/skill/react-best-practices/rules/server-hoist-static-io.md +142 -0
  210. package/skill/react-best-practices/rules/server-parallel-fetching.md +83 -0
  211. package/skill/react-best-practices/rules/server-serialization.md +38 -0
  212. package/skill/react-native-skills/SKILL.md +115 -0
  213. package/skill/react-native-skills/rules/animation-derived-value.md +53 -0
  214. package/skill/react-native-skills/rules/animation-gesture-detector-press.md +95 -0
  215. package/skill/react-native-skills/rules/animation-gpu-properties.md +65 -0
  216. package/skill/react-native-skills/rules/design-system-compound-components.md +66 -0
  217. package/skill/react-native-skills/rules/fonts-config-plugin.md +71 -0
  218. package/skill/react-native-skills/rules/imports-design-system-folder.md +68 -0
  219. package/skill/react-native-skills/rules/js-hoist-intl.md +61 -0
  220. package/skill/react-native-skills/rules/list-performance-callbacks.md +44 -0
  221. package/skill/react-native-skills/rules/list-performance-function-references.md +132 -0
  222. package/skill/react-native-skills/rules/list-performance-images.md +53 -0
  223. package/skill/react-native-skills/rules/list-performance-inline-objects.md +97 -0
  224. package/skill/react-native-skills/rules/list-performance-item-expensive.md +94 -0
  225. package/skill/react-native-skills/rules/list-performance-item-memo.md +82 -0
  226. package/skill/react-native-skills/rules/list-performance-item-types.md +104 -0
  227. package/skill/react-native-skills/rules/list-performance-virtualize.md +67 -0
  228. package/skill/react-native-skills/rules/monorepo-native-deps-in-app.md +46 -0
  229. package/skill/react-native-skills/rules/monorepo-single-dependency-versions.md +63 -0
  230. package/skill/react-native-skills/rules/navigation-native-navigators.md +188 -0
  231. package/skill/react-native-skills/rules/react-compiler-destructure-functions.md +50 -0
  232. package/skill/react-native-skills/rules/react-compiler-reanimated-shared-values.md +48 -0
  233. package/skill/react-native-skills/rules/react-state-dispatcher.md +91 -0
  234. package/skill/react-native-skills/rules/react-state-fallback.md +56 -0
  235. package/skill/react-native-skills/rules/react-state-minimize.md +65 -0
  236. package/skill/react-native-skills/rules/rendering-no-falsy-and.md +74 -0
  237. package/skill/react-native-skills/rules/rendering-text-in-text-component.md +36 -0
  238. package/skill/react-native-skills/rules/scroll-position-no-state.md +82 -0
  239. package/skill/react-native-skills/rules/state-ground-truth.md +80 -0
  240. package/skill/react-native-skills/rules/ui-expo-image.md +66 -0
  241. package/skill/react-native-skills/rules/ui-image-gallery.md +104 -0
  242. package/skill/react-native-skills/rules/ui-measure-views.md +78 -0
  243. package/skill/react-native-skills/rules/ui-menus.md +174 -0
  244. package/skill/react-native-skills/rules/ui-native-modals.md +77 -0
  245. package/skill/react-native-skills/rules/ui-pressable.md +61 -0
  246. package/skill/react-native-skills/rules/ui-safe-area-scroll.md +65 -0
  247. package/skill/react-native-skills/rules/ui-scrollview-content-inset.md +45 -0
  248. package/skill/react-native-skills/rules/ui-styling.md +87 -0
  249. package/skill/react-vite-guide/SKILL.md +101 -0
  250. package/skill/react-vite-guide/references/composition-patterns.md +709 -0
  251. package/skill/react-vite-guide/references/performance-optimization.md +1222 -0
  252. package/skill/react-vite-guide/references/vite-specific.md +385 -0
  253. package/skill/react-vite-guide/references/web-interface.md +146 -0
  254. package/skill/skill-maker/SKILL.md +52 -0
  255. package/skill/skill-maker/references/content_spec.md +67 -0
  256. package/skill/skill-maker/references/frontmatter_spec.md +96 -0
  257. package/skill/skill-maker/references/input_validation.md +90 -0
  258. package/skill/skill-maker/references/skill_structure.md +74 -0
  259. package/skill/system-prompt-creator/SKILL.md +50 -0
  260. package/skill/system-prompt-creator/references/data_format_selection.md +135 -0
  261. package/skill/system-prompt-creator/references/multi_prompt_architecture.md +386 -0
  262. package/skill/system-prompt-creator/references/prompt_structure.md +140 -0
  263. package/skill/system-prompt-creator/references/quality_criteria.md +83 -0
  264. package/skill/typst-creator/SKILL.md +51 -0
  265. package/skill/typst-creator/references/layout.md +401 -0
  266. package/skill/typst-creator/references/math.md +297 -0
  267. package/skill/typst-creator/references/scripting.md +237 -0
  268. package/skill/typst-creator/references/styling.md +217 -0
  269. package/skill/typst-creator/references/syntax.md +234 -0
  270. package/skill/web-design-guidelines/SKILL.md +35 -0
  271. package/terminal.png +0 -0
@@ -0,0 +1,263 @@
1
+ #!/bin/bash
2
+ # Git Workflow Verification Script
3
+ # Checks repository for git workflow best practices
4
+
5
+ set -e
6
+
7
+ REPO_DIR="${1:-.}"
8
+ ERRORS=0
9
+ WARNINGS=0
10
+
11
+ echo "=== Git Workflow Verification ==="
12
+ echo "Repository: $REPO_DIR"
13
+ echo ""
14
+
15
+ # Change to repo directory
16
+ cd "$REPO_DIR"
17
+
18
+ # Check if it's a git repository
19
+ if [[ ! -d ".git" ]]; then
20
+ echo "❌ Not a git repository"
21
+ exit 1
22
+ fi
23
+
24
+ # Check branch naming
25
+ echo "=== Branch Naming Convention ==="
26
+ BRANCHES=$(git branch -a 2>/dev/null | sed 's/^[* ]*//' | grep -v "HEAD" | sed 's/remotes\/origin\///' | sort -u)
27
+
28
+ VALID_PATTERN="^(main|master|develop|feature\/|fix\/|bugfix\/|hotfix\/|release\/|chore\/|docs\/|test\/|refactor\/)"
29
+ INVALID_BRANCHES=""
30
+
31
+ for branch in $BRANCHES; do
32
+ if ! echo "$branch" | grep -qE "$VALID_PATTERN"; then
33
+ INVALID_BRANCHES="$INVALID_BRANCHES $branch"
34
+ fi
35
+ done
36
+
37
+ if [[ -n "$INVALID_BRANCHES" ]]; then
38
+ echo "⚠️ Non-standard branch names found:"
39
+ echo " $INVALID_BRANCHES"
40
+ echo " Expected: main, develop, feature/*, fix/*, release/*, hotfix/*"
41
+ ((WARNINGS++))
42
+ else
43
+ echo "✅ All branch names follow conventions"
44
+ fi
45
+
46
+ # Check commit message format
47
+ echo ""
48
+ echo "=== Commit Message Format ==="
49
+ RECENT_COMMITS=$(git log --oneline -20 2>/dev/null | head -20)
50
+
51
+ CONV_PATTERN="^[a-f0-9]+ (feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?(!)?: .+"
52
+ INVALID_COMMITS=0
53
+ VALID_COMMITS=0
54
+
55
+ while IFS= read -r commit; do
56
+ if echo "$commit" | grep -qE "$CONV_PATTERN"; then
57
+ ((VALID_COMMITS++))
58
+ else
59
+ # Allow merge commits
60
+ if ! echo "$commit" | grep -qE "^[a-f0-9]+ Merge"; then
61
+ ((INVALID_COMMITS++))
62
+ fi
63
+ fi
64
+ done <<< "$RECENT_COMMITS"
65
+
66
+ TOTAL_COMMITS=$((VALID_COMMITS + INVALID_COMMITS))
67
+ if [[ $TOTAL_COMMITS -gt 0 ]]; then
68
+ PERCENT=$((VALID_COMMITS * 100 / TOTAL_COMMITS))
69
+ if [[ $PERCENT -ge 80 ]]; then
70
+ echo "✅ $PERCENT% of commits follow Conventional Commits format"
71
+ elif [[ $PERCENT -ge 50 ]]; then
72
+ echo "⚠️ $PERCENT% of commits follow Conventional Commits format"
73
+ ((WARNINGS++))
74
+ else
75
+ echo "⚠️ Only $PERCENT% of commits follow Conventional Commits format"
76
+ ((WARNINGS++))
77
+ fi
78
+ fi
79
+
80
+ # Check for .gitignore
81
+ echo ""
82
+ echo "=== .gitignore Check ==="
83
+ if [[ -f ".gitignore" ]]; then
84
+ echo "✅ .gitignore exists"
85
+
86
+ # Check for common patterns
87
+ COMMON_IGNORES=("node_modules" ".env" "*.log" "dist" "build" ".DS_Store")
88
+ MISSING_IGNORES=""
89
+
90
+ for pattern in "${COMMON_IGNORES[@]}"; do
91
+ if ! grep -q "$pattern" .gitignore 2>/dev/null; then
92
+ MISSING_IGNORES="$MISSING_IGNORES $pattern"
93
+ fi
94
+ done
95
+
96
+ if [[ -n "$MISSING_IGNORES" ]]; then
97
+ echo " ℹ️ Consider adding:$MISSING_IGNORES"
98
+ fi
99
+ else
100
+ echo "⚠️ No .gitignore file found"
101
+ ((WARNINGS++))
102
+ fi
103
+
104
+ # Check for hooks
105
+ echo ""
106
+ echo "=== Git Hooks ==="
107
+ if [[ -d ".git/hooks" ]]; then
108
+ ACTIVE_HOOKS=$(find .git/hooks -type f ! -name "*.sample" 2>/dev/null | wc -l)
109
+ if [[ $ACTIVE_HOOKS -gt 0 ]]; then
110
+ echo "✅ Found $ACTIVE_HOOKS active hook(s)"
111
+ find .git/hooks -type f ! -name "*.sample" -exec basename {} \; 2>/dev/null | sed 's/^/ /'
112
+ else
113
+ echo "ℹ️ No active git hooks"
114
+ fi
115
+ fi
116
+
117
+ # Check for husky
118
+ if [[ -d ".husky" ]]; then
119
+ echo "✅ Husky hooks directory found"
120
+ fi
121
+
122
+ # Check for commitlint
123
+ if [[ -f "commitlint.config.js" ]] || [[ -f ".commitlintrc" ]] || [[ -f ".commitlintrc.json" ]]; then
124
+ echo "✅ Commitlint configuration found"
125
+ fi
126
+
127
+ # Check for branch protection (via CODEOWNERS)
128
+ echo ""
129
+ echo "=== Code Ownership ==="
130
+ if [[ -f "CODEOWNERS" ]] || [[ -f ".github/CODEOWNERS" ]] || [[ -f "docs/CODEOWNERS" ]]; then
131
+ echo "✅ CODEOWNERS file found"
132
+ else
133
+ echo "ℹ️ No CODEOWNERS file (optional)"
134
+ fi
135
+
136
+ # Check for PR template
137
+ echo ""
138
+ echo "=== PR Templates ==="
139
+ if [[ -f ".github/PULL_REQUEST_TEMPLATE.md" ]] || [[ -d ".github/PULL_REQUEST_TEMPLATE" ]]; then
140
+ echo "✅ PR template(s) found"
141
+ else
142
+ echo "ℹ️ No PR template (recommended)"
143
+ fi
144
+
145
+ # Check for CI/CD configuration
146
+ echo ""
147
+ echo "=== CI/CD Configuration ==="
148
+ CI_FOUND=false
149
+
150
+ if [[ -d ".github/workflows" ]]; then
151
+ WORKFLOW_COUNT=$(find .github/workflows -name "*.yml" -o -name "*.yaml" 2>/dev/null | wc -l)
152
+ if [[ $WORKFLOW_COUNT -gt 0 ]]; then
153
+ echo "✅ GitHub Actions: $WORKFLOW_COUNT workflow(s)"
154
+ CI_FOUND=true
155
+ fi
156
+ fi
157
+
158
+ if [[ -f ".gitlab-ci.yml" ]]; then
159
+ echo "✅ GitLab CI configuration found"
160
+ CI_FOUND=true
161
+ fi
162
+
163
+ if [[ -f "Jenkinsfile" ]]; then
164
+ echo "✅ Jenkinsfile found"
165
+ CI_FOUND=true
166
+ fi
167
+
168
+ if [[ -f ".circleci/config.yml" ]]; then
169
+ echo "✅ CircleCI configuration found"
170
+ CI_FOUND=true
171
+ fi
172
+
173
+ if [[ -f "azure-pipelines.yml" ]]; then
174
+ echo "✅ Azure Pipelines configuration found"
175
+ CI_FOUND=true
176
+ fi
177
+
178
+ if [[ "$CI_FOUND" == "false" ]]; then
179
+ echo "⚠️ No CI/CD configuration found"
180
+ ((WARNINGS++))
181
+ fi
182
+
183
+ # Check for semantic release
184
+ echo ""
185
+ echo "=== Release Configuration ==="
186
+ if [[ -f ".releaserc" ]] || [[ -f ".releaserc.json" ]] || [[ -f ".releaserc.yml" ]] || [[ -f "release.config.js" ]]; then
187
+ echo "✅ Semantic release configuration found"
188
+ fi
189
+
190
+ # Check for CHANGELOG
191
+ if [[ -f "CHANGELOG.md" ]] || [[ -f "CHANGELOG" ]]; then
192
+ echo "✅ CHANGELOG found"
193
+ else
194
+ echo "ℹ️ No CHANGELOG (recommended for releases)"
195
+ fi
196
+
197
+ # Check for versioning
198
+ if [[ -f "package.json" ]]; then
199
+ VERSION=$(grep '"version"' package.json | head -1 | sed 's/.*: *"\([^"]*\)".*/\1/')
200
+ if [[ -n "$VERSION" ]]; then
201
+ echo "✅ Package version: $VERSION"
202
+ fi
203
+ fi
204
+
205
+ # Check current branch
206
+ echo ""
207
+ echo "=== Current State ==="
208
+ CURRENT_BRANCH=$(git branch --show-current 2>/dev/null)
209
+ echo "Current branch: $CURRENT_BRANCH"
210
+
211
+ # Check for uncommitted changes
212
+ if git diff --quiet 2>/dev/null && git diff --cached --quiet 2>/dev/null; then
213
+ echo "✅ Working directory clean"
214
+ else
215
+ CHANGES=$(git status --porcelain 2>/dev/null | wc -l)
216
+ echo "⚠️ $CHANGES uncommitted change(s)"
217
+ fi
218
+
219
+ # Check if up to date with remote
220
+ if git remote | grep -q "origin" 2>/dev/null; then
221
+ git fetch origin --quiet 2>/dev/null || true
222
+ LOCAL=$(git rev-parse "$CURRENT_BRANCH" 2>/dev/null)
223
+ REMOTE=$(git rev-parse "origin/$CURRENT_BRANCH" 2>/dev/null) || true
224
+
225
+ if [[ -n "$REMOTE" ]]; then
226
+ if [[ "$LOCAL" == "$REMOTE" ]]; then
227
+ echo "✅ Up to date with origin/$CURRENT_BRANCH"
228
+ else
229
+ BEHIND=$(git rev-list --count "$LOCAL..$REMOTE" 2>/dev/null)
230
+ AHEAD=$(git rev-list --count "$REMOTE..$LOCAL" 2>/dev/null)
231
+ echo "ℹ️ Branch is $AHEAD ahead, $BEHIND behind origin/$CURRENT_BRANCH"
232
+ fi
233
+ fi
234
+ fi
235
+
236
+ # Check for merge conflicts markers
237
+ echo ""
238
+ echo "=== Conflict Markers ==="
239
+ CONFLICT_FILES=$(grep -rln "<<<<<<< \|======= \|>>>>>>> " --include="*.js" --include="*.ts" --include="*.php" --include="*.py" . 2>/dev/null | grep -v node_modules | grep -v vendor | head -5)
240
+ if [[ -n "$CONFLICT_FILES" ]]; then
241
+ echo "❌ Conflict markers found in files:"
242
+ echo "$CONFLICT_FILES" | sed 's/^/ /'
243
+ ((ERRORS++))
244
+ else
245
+ echo "✅ No conflict markers found"
246
+ fi
247
+
248
+ # Summary
249
+ echo ""
250
+ echo "=== Summary ==="
251
+ echo "Errors: $ERRORS"
252
+ echo "Warnings: $WARNINGS"
253
+
254
+ if [[ $ERRORS -gt 0 ]]; then
255
+ echo "❌ Verification FAILED"
256
+ exit 1
257
+ elif [[ $WARNINGS -gt 3 ]]; then
258
+ echo "⚠️ Verification completed with warnings"
259
+ exit 0
260
+ else
261
+ echo "✅ Verification PASSED"
262
+ exit 0
263
+ fi
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: jetbrains-vmoptions
3
+ description: Provides JetBrains IDE VM options knowledge for version-specific GC selection and memory/performance tuning (JDK 17/21, IDE 222+). Cross-platform only.
4
+ ---
5
+
6
+ # JetBrains IDE VM Options Capabilities
7
+
8
+ Provides reference knowledge to compose `.vmoptions` sets for JetBrains IDEs.
9
+ Output format: Markdown with code blocks containing `.vmoptions` lines (no file generation).
10
+
11
+ ## Process Flow
12
+
13
+ ```
14
+ Step 1: Collect Requirements
15
+ │ └── Read [prerequisite-check.md] → Validate IDE version
16
+
17
+
18
+ Step 2: Research Options
19
+ │ └── Read [gc-options.md], [memory-options.md], [common-options.md]
20
+ │ based on user's goals
21
+
22
+
23
+ Step 3: Draft Output
24
+ │ └── Generate preliminary vmoptions
25
+
26
+
27
+ Step 4: Self-Review
28
+ │ └── Verify each option matches user's requirements
29
+ │ Remove irrelevant or conflicting options
30
+
31
+
32
+ Step 5: Share & Review
33
+ └── Present final vmoptions to user with explanations
34
+ ```
35
+
36
+ ## Scope
37
+
38
+ - IDE version ranges: 222-242 (JDK 17), 243+ (JDK 21)
39
+ - Cross-platform JVM options only (`.vmoptions`, one option per line, `#` comments)
40
+ - GC selection/tuning: Generational ZGC, ZGC, G1GC, Shenandoah, Parallel, Serial
41
+ - Memory/Code cache/Metaspace/Reference processing flags
42
+ - Compiler/runtime performance options commonly used for IDE tuning
43
+
44
+ ## References
45
+
46
+ | File | Content |
47
+ |------|---------|
48
+ | [prerequisite-check.md](references/prerequisite-check.md) | **Required input validation logic (read first)** |
49
+ | [gc-options.md](references/gc-options.md) | Detailed GC flags and tuning parameters |
50
+ | [memory-options.md](references/memory-options.md) | Memory management options |
51
+ | [common-options.md](references/common-options.md) | Commonly used performance flags |
@@ -0,0 +1,357 @@
1
+ # Common Options Reference
2
+
3
+ Performance-focused VM options commonly used in JetBrains IDEs.
4
+
5
+ ## Table of Contents
6
+
7
+ 1. [Compiler Options](#compiler-options)
8
+ 2. [String Optimization](#string-optimization)
9
+ 3. [Diagnostics](#diagnostics)
10
+ 4. [Tiered Compilation](#tiered-compilation)
11
+ 5. [Thread Options](#thread-options)
12
+ 6. [Example Configurations](#example-configurations)
13
+ 7. [Example Output (Markdown)](#example-output-markdown)
14
+
15
+ ---
16
+
17
+ ## Compiler Options
18
+
19
+ JIT compiler-related options.
20
+
21
+ Behavior: Controls compilation concurrency and thresholds.
22
+ When it helps: Balancing startup responsiveness vs peak throughput.
23
+
24
+ ### Core Flags
25
+
26
+ | Flag | Default | Description |
27
+ |------|---------|-------------|
28
+ | `-XX:CICompilerCount=<n>` | LP64 ergo (default when CICompilerCountPerCPU=true): max(log2(n) * log2(max(log2(n), 1)) * 3 / 2, 2), capped by code cache buffers; 32-bit default: 3 | Number of compiler threads |
29
+ | `-XX:CompileThreshold=<n>` | 10000 | Invocations before compilation |
30
+ | `-XX:+BackgroundCompilation` | true | Compile in background |
31
+ | `-XX:+UseCompilerSafepoints` | true | Use safepoints in compiled code |
32
+
33
+ Notes: `n` is `os::active_processor_count()` and `log2` is integer log2.
34
+
35
+ Usage Notes:
36
+ - `-XX:CICompilerCount`: Helps when compilation queues grow or CPU contention affects UI responsiveness.
37
+ - `-XX:CompileThreshold`: Lower values front-load compilation for faster warmup; higher values favor interpreted execution.
38
+ - `-XX:+BackgroundCompilation`: Reduces foreground stalls by compiling off the main path.
39
+ - `-XX:+UseCompilerSafepoints`: Improves safepoint responsiveness during long-running compiled code.
40
+
41
+ ### Example Configuration
42
+
43
+ ```
44
+ -XX:CICompilerCount=2
45
+ ```
46
+
47
+ Typical scaling by CPU cores:
48
+ - 4 cores: `CICompilerCount=2`
49
+ - 8+ cores: `CICompilerCount=3-4`
50
+
51
+ ---
52
+
53
+ ## String Optimization
54
+
55
+ String processing optimizations.
56
+
57
+ Behavior: Reduces duplicate String storage and optimizes concatenation.
58
+ When it helps: Large projects with heavy String churn or memory pressure.
59
+
60
+ ### Flags
61
+
62
+ | Flag | Default | Description |
63
+ |------|---------|-------------|
64
+ | `-XX:+UseStringDeduplication` | false | Deduplicate String objects (G1GC, ZGC) |
65
+ | `-XX:+OptimizeStringConcat` | true | Optimize string concatenation |
66
+ | `-XX:+CompactStrings` | true | Use compact strings (Latin-1) |
67
+
68
+ Usage Notes:
69
+ - `-XX:+UseStringDeduplication`: Helps when many duplicate Strings inflate heap usage (G1GC/ZGC only).
70
+ - `-XX:+OptimizeStringConcat`: Reduces temporary allocations in heavy concatenation paths.
71
+ - `-XX:+CompactStrings`: Saves memory when most Strings are Latin-1.
72
+
73
+ ### Example Configuration
74
+
75
+ ```
76
+ -XX:+UseStringDeduplication
77
+ -XX:+OptimizeStringConcat
78
+ -XX:+CompactStrings
79
+ ```
80
+
81
+ **Note**: `UseStringDeduplication` requires G1GC or ZGC.
82
+
83
+ ---
84
+
85
+ ## Diagnostics
86
+
87
+ Diagnostics and debugging options.
88
+
89
+ Behavior: Emits logs and dumps to help analyze crashes and GC behavior.
90
+ When it helps: Investigating OOMs, GC pauses, or JVM crashes.
91
+
92
+ ### Heap Dump
93
+
94
+ | Flag | Default | Description |
95
+ |------|---------|-------------|
96
+ | `-XX:+HeapDumpOnOutOfMemoryError` | false | Dump heap on OOM |
97
+ | `-XX:HeapDumpPath=<path>` | working dir | Heap dump location |
98
+
99
+ Usage Notes:
100
+ - `-XX:+HeapDumpOnOutOfMemoryError`: Captures heap state for post-mortem analysis.
101
+ - `-XX:HeapDumpPath=<path>`: Use a writable location with sufficient disk space.
102
+
103
+ ### GC Logging (JDK 9+ Unified Logging)
104
+
105
+ | Flag | Description |
106
+ |------|-------------|
107
+ | `-Xlog:gc` | Basic GC logging |
108
+ | `-Xlog:gc*` | Detailed GC logging |
109
+ | `-Xlog:gc*:file=gc.log` | Log to file |
110
+ | `-Xlog:gc*:file=gc.log:time,uptime` | With timestamps |
111
+ | `-Xlog:gc*:file=gc.log:time,uptime:filecount=5,filesize=10m` | Rotating logs |
112
+
113
+ Usage Notes:
114
+ - `-Xlog:gc`: Basic GC health signal during tuning.
115
+ - `-Xlog:gc*`: Adds detailed event fields for deeper analysis.
116
+ - `-Xlog:gc*:file=gc.log`: Redirects logs to a file for later review.
117
+ - `-Xlog:gc*:file=gc.log:time,uptime`: Adds time context for correlating with UI pauses.
118
+ - `-Xlog:gc*:file=gc.log:time,uptime:filecount=5,filesize=10m`: Limits disk usage with rotation.
119
+
120
+ ### GC Logging Patterns
121
+
122
+ | Pattern | Description |
123
+ |---------|-------------|
124
+ | `-Xlog:gc` | GC events only |
125
+ | `-Xlog:gc+heap=debug` | GC + heap details |
126
+ | `-Xlog:gc+phases=debug` | GC phase timings |
127
+ | `-Xlog:gc*=debug:file=gc.log` | All GC debug info to file |
128
+ | `-Xlog:gc+age=trace` | Object age distribution |
129
+
130
+ Usage Notes:
131
+ - `-Xlog:gc`: Lightweight overview when looking for long pauses.
132
+ - `-Xlog:gc+heap=debug`: Helps diagnose heap sizing and promotion behavior.
133
+ - `-Xlog:gc+phases=debug`: Breaks down phase timings to spot bottlenecks.
134
+ - `-Xlog:gc*=debug:file=gc.log`: Captures full detail for offline analysis.
135
+ - `-Xlog:gc+age=trace`: Useful when tuning tenuring behavior.
136
+
137
+ ### System.gc() Behavior
138
+
139
+ | Flag | Default | Description |
140
+ |------|---------|-------------|
141
+ | `-XX:+ExplicitGCInvokesConcurrent` | false | System.gc() triggers concurrent GC |
142
+ | `-XX:+DisableExplicitGC` | false | Ignore System.gc() calls |
143
+
144
+ Usage Notes:
145
+ - `-XX:+ExplicitGCInvokesConcurrent`: Reduces stop-the-world impact of explicit GCs.
146
+ - `-XX:+DisableExplicitGC`: Helps when libraries trigger costly explicit GCs.
147
+
148
+ ### Error Handling
149
+
150
+ | Flag | Default | Description |
151
+ |------|---------|-------------|
152
+ | `-XX:ErrorFile=<path>` | `hs_err_pid%p.log` in current working directory (unless ErrorFileToStdout/ErrorFileToStderr) | Error log location |
153
+ | `-XX:+ShowMessageBoxOnError` | false | Show dialog on crash |
154
+
155
+ Usage Notes:
156
+ - `-XX:ErrorFile=<path>`: Redirects crash logs to a known location for collection.
157
+ - `-XX:+ShowMessageBoxOnError`: Useful for interactive debugging on desktop setups.
158
+
159
+ ### Example Configuration
160
+
161
+ ```
162
+ -XX:+HeapDumpOnOutOfMemoryError
163
+ -XX:HeapDumpPath=${user.home}/jetbrains_heap_dump.hprof
164
+ ```
165
+
166
+ ---
167
+
168
+ ## Tiered Compilation
169
+
170
+ Tiered compilation settings.
171
+
172
+ Behavior: Trades startup speed for peak performance via tiered JIT levels.
173
+ When it helps: Choosing faster startup vs sustained throughput.
174
+
175
+ ### Flags
176
+
177
+ | Flag | Default | Description |
178
+ |------|---------|-------------|
179
+ | `-XX:+TieredCompilation` | true | Enable tiered compilation |
180
+ | `-XX:TieredStopAtLevel=<n>` | 4 | Max compilation level (1-4) |
181
+
182
+ Usage Notes:
183
+ - `-XX:+TieredCompilation`: Balances startup and peak performance with multi-level JIT.
184
+ - `-XX:TieredStopAtLevel=<n>`: Lower levels favor faster startup; level 4 maximizes optimization.
185
+
186
+ ### Compilation Levels
187
+
188
+ | Level | Description |
189
+ |-------|-------------|
190
+ | 0 | Interpreter |
191
+ | 1 | C1 without profiling |
192
+ | 2 | C1 with limited profiling |
193
+ | 3 | C1 with full profiling |
194
+ | 4 | C2 (full optimization) |
195
+
196
+ ### Example: Fast Startup (less optimization)
197
+
198
+ ```
199
+ -XX:TieredStopAtLevel=1
200
+ ```
201
+
202
+ ### Example: Full Optimization (default behavior)
203
+
204
+ ```
205
+ -XX:+TieredCompilation
206
+ -XX:TieredStopAtLevel=4
207
+ ```
208
+
209
+ ---
210
+
211
+ ## Thread Options
212
+
213
+ Thread-related options.
214
+
215
+ Behavior: Controls thread stack size and GC thread counts.
216
+ When it helps: Deep recursion, constrained memory, or GC thread tuning.
217
+
218
+ ### Stack Size
219
+
220
+ | Flag | Default | Description |
221
+ |------|---------|-------------|
222
+ | `-Xss<size>` | Platform constant in `globals_<os>_<arch>.hpp` (KB); 0 means OS default (e.g., linux_x86_64=1024, bsd_x86_64=1024, linux_aarch64=2040, windows_*=0) | Thread stack size |
223
+ | `-XX:ThreadStackSize=<size>` | Platform constant in `globals_<os>_<arch>.hpp` (KB); 0 means OS default (e.g., linux_x86_64=1024, bsd_x86_64=1024, linux_aarch64=2040, windows_*=0) | Thread stack size (KB) |
224
+
225
+ Usage Notes:
226
+ - `-Xss<size>` / `-XX:ThreadStackSize=<size>`: Increase for deep recursion; reduce for many threads under memory pressure.
227
+
228
+ ### Typical Values
229
+
230
+ | Use Case | Stack Size |
231
+ |----------|------------|
232
+ | Default | 1m |
233
+ | Deep recursion | 2m |
234
+ | Memory-constrained | 512k |
235
+
236
+ ### Thread Pool
237
+
238
+ | Flag | Default | Description |
239
+ |------|---------|-------------|
240
+ | `-XX:ParallelGCThreads=<n>` | auto | Parallel GC thread count |
241
+ | `-XX:ConcGCThreads=<n>` | auto | Concurrent GC thread count |
242
+
243
+ Usage Notes:
244
+ - `-XX:ParallelGCThreads=<n>`: Tune when GC phases over- or under-utilize CPU.
245
+ - `-XX:ConcGCThreads=<n>`: Adjust when concurrent phases impact UI responsiveness.
246
+
247
+ ---
248
+
249
+ ## Example Configurations
250
+
251
+ ### Example: Standard IDE Setup
252
+
253
+ ```
254
+ # Compiler
255
+ -XX:CICompilerCount=2
256
+
257
+ # String Optimization
258
+ -XX:+UseStringDeduplication
259
+ -XX:+OptimizeStringConcat
260
+ -XX:+CompactStrings
261
+
262
+ # Diagnostics
263
+ -XX:+HeapDumpOnOutOfMemoryError
264
+
265
+ # Tiered Compilation
266
+ -XX:+TieredCompilation
267
+ ```
268
+
269
+ ### Example: Performance-Focused
270
+
271
+ ```
272
+ # Compiler
273
+ -XX:CICompilerCount=4
274
+
275
+ # String Optimization
276
+ -XX:+UseStringDeduplication
277
+ -XX:+OptimizeStringConcat
278
+ -XX:+CompactStrings
279
+
280
+ # Aggressive Compilation
281
+ -XX:+TieredCompilation
282
+ -XX:CompileThreshold=5000
283
+
284
+ # Pre-touch for predictable performance
285
+ -XX:+AlwaysPreTouch
286
+
287
+ # Diagnostics
288
+ -XX:+HeapDumpOnOutOfMemoryError
289
+ ```
290
+
291
+ ### Example: Minimal/Fast Startup
292
+
293
+ ```
294
+ # Reduced compiler threads
295
+ -XX:CICompilerCount=1
296
+
297
+ # Stop at C1 level
298
+ -XX:TieredStopAtLevel=1
299
+
300
+ # Smaller stack
301
+ -Xss512k
302
+ ```
303
+
304
+ ---
305
+
306
+ ## Example Output (Markdown)
307
+
308
+ Behavior: Outputs a Markdown snippet that includes `.vmoptions` lines in a code block.
309
+ When it helps: Sharing a ready-to-use baseline without generating files.
310
+
311
+ ### Version 243+ with Generational ZGC (4GB)
312
+
313
+ ```
314
+ # JetBrains IDE VM Options
315
+ # Generated for version 243+ (JDK 21)
316
+
317
+ # Memory
318
+ -Xms2g
319
+ -Xmx4g
320
+
321
+ # Garbage Collector: Generational ZGC
322
+ -XX:+UseZGC
323
+ -XX:+ZGenerational
324
+
325
+ # Performance
326
+ -XX:ReservedCodeCacheSize=512m
327
+ -XX:+UseStringDeduplication
328
+ -XX:SoftRefLRUPolicyMSPerMB=50
329
+
330
+ # Miscellaneous
331
+ -XX:+HeapDumpOnOutOfMemoryError
332
+ -XX:CICompilerCount=2
333
+ ```
334
+
335
+ ### Version 242 with G1GC (6GB)
336
+
337
+ ```
338
+ # JetBrains IDE VM Options
339
+ # Generated for version 222-242 (JDK 17)
340
+
341
+ # Memory
342
+ -Xms2g
343
+ -Xmx6g
344
+
345
+ # Garbage Collector: G1GC
346
+ -XX:+UseG1GC
347
+ -XX:MaxGCPauseMillis=200
348
+
349
+ # Performance
350
+ -XX:ReservedCodeCacheSize=512m
351
+ -XX:+UseStringDeduplication
352
+ -XX:SoftRefLRUPolicyMSPerMB=50
353
+
354
+ # Miscellaneous
355
+ -XX:+HeapDumpOnOutOfMemoryError
356
+ -XX:CICompilerCount=2
357
+ ```