@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,439 @@
1
+ # Commit Conventions
2
+
3
+ ## Conventional Commits
4
+
5
+ ### Specification
6
+
7
+ ```
8
+ <type>[optional scope]: <description>
9
+
10
+ [optional body]
11
+
12
+ [optional footer(s)]
13
+ ```
14
+
15
+ ### Commit Types
16
+
17
+ | Type | Description | Version Bump |
18
+ |------|-------------|--------------|
19
+ | `feat` | New feature | MINOR |
20
+ | `fix` | Bug fix | PATCH |
21
+ | `docs` | Documentation only | - |
22
+ | `style` | Code style (formatting) | - |
23
+ | `refactor` | Code refactoring | - |
24
+ | `perf` | Performance improvement | PATCH |
25
+ | `test` | Adding/updating tests | - |
26
+ | `build` | Build system changes | - |
27
+ | `ci` | CI configuration | - |
28
+ | `chore` | Maintenance tasks | - |
29
+ | `revert` | Reverting changes | - |
30
+
31
+ ### Examples
32
+
33
+ ```bash
34
+ # Simple feature
35
+ feat: add user authentication
36
+
37
+ # Feature with scope
38
+ feat(auth): add OAuth2 login support
39
+
40
+ # Bug fix
41
+ fix: resolve null pointer in user service
42
+
43
+ # Bug fix with issue reference
44
+ fix(api): handle empty response from external service
45
+
46
+ Fixes #123
47
+
48
+ # Breaking change
49
+ feat!: remove deprecated v1 API endpoints
50
+
51
+ BREAKING CHANGE: The /api/v1/* endpoints have been removed.
52
+ Migrate to /api/v2/* before upgrading.
53
+
54
+ # Multiple footers
55
+ fix(security): patch XSS vulnerability in comment parser
56
+
57
+ Reviewed-by: John Doe
58
+ Refs: #456
59
+ ```
60
+
61
+ ### Scope Guidelines
62
+
63
+ Scopes should be consistent across the project:
64
+
65
+ ```bash
66
+ # By feature area
67
+ feat(auth): ...
68
+ feat(payment): ...
69
+ feat(notification): ...
70
+
71
+ # By layer
72
+ fix(api): ...
73
+ fix(db): ...
74
+ fix(ui): ...
75
+
76
+ # By component
77
+ style(button): ...
78
+ refactor(modal): ...
79
+ ```
80
+
81
+ ## Commit Message Best Practices
82
+
83
+ ### Subject Line
84
+
85
+ ```bash
86
+ # ✅ Good: Imperative mood, present tense
87
+ feat: add password reset functionality
88
+ fix: prevent duplicate form submissions
89
+
90
+ # ❌ Bad: Past tense, not imperative
91
+ feat: added password reset functionality
92
+ fix: fixed duplicate form submissions
93
+
94
+ # ✅ Good: Specific and concise
95
+ feat: implement rate limiting for API endpoints
96
+
97
+ # ❌ Bad: Vague
98
+ feat: improve API
99
+
100
+ # ✅ Good: Under 72 characters
101
+ fix: resolve race condition in cache invalidation
102
+
103
+ # ❌ Bad: Too long
104
+ fix: resolve the race condition that was occurring in the cache invalidation process when multiple users were accessing the same resource simultaneously
105
+ ```
106
+
107
+ ### Body
108
+
109
+ ```bash
110
+ # When to include a body:
111
+ # - Complex changes needing explanation
112
+ # - Non-obvious implementation choices
113
+ # - Context for future readers
114
+
115
+ fix: prevent race condition in order processing
116
+
117
+ The previous implementation allowed concurrent modifications to the
118
+ same order, leading to inconsistent state.
119
+
120
+ This change introduces optimistic locking using version numbers.
121
+ When a conflict is detected, the operation is retried with fresh data.
122
+
123
+ The retry limit is set to 3 attempts to prevent infinite loops.
124
+ ```
125
+
126
+ ### Footer
127
+
128
+ ```bash
129
+ # Issue references
130
+ fix: resolve login timeout
131
+
132
+ Fixes #123
133
+ Closes #456
134
+
135
+ # Breaking changes
136
+ feat!: update authentication API
137
+
138
+ BREAKING CHANGE: The `authenticate()` method now returns a Promise
139
+ instead of using callbacks. Update all call sites to use async/await.
140
+
141
+ # Co-authors
142
+ feat: implement new dashboard
143
+
144
+ Co-authored-by: Jane Doe <jane@example.com>
145
+ Co-authored-by: John Smith <john@example.com>
146
+
147
+ # Review references
148
+ fix: patch security vulnerability
149
+
150
+ Reviewed-by: Security Team
151
+ Approved-by: @security-lead
152
+ ```
153
+
154
+ ## Atomic Commits
155
+
156
+ ### Principles
157
+
158
+ 1. **One logical change per commit**
159
+ 2. **Each commit should compile/pass tests**
160
+ 3. **Related changes grouped together**
161
+ 4. **Unrelated changes in separate commits**
162
+
163
+ ### Examples
164
+
165
+ ```bash
166
+ # ❌ Bad: Multiple unrelated changes
167
+ git add .
168
+ git commit -m "feat: add login page and fix typo in readme and update deps"
169
+
170
+ # ✅ Good: Separate commits
171
+ git add src/pages/Login.tsx src/components/LoginForm.tsx
172
+ git commit -m "feat(auth): add login page with form validation"
173
+
174
+ git add README.md
175
+ git commit -m "docs: fix typo in installation instructions"
176
+
177
+ git add package.json package-lock.json
178
+ git commit -m "build: update dependencies to latest versions"
179
+ ```
180
+
181
+ ### Interactive Staging
182
+
183
+ ```bash
184
+ # Stage specific hunks
185
+ git add -p
186
+
187
+ # Options:
188
+ # y - stage this hunk
189
+ # n - skip this hunk
190
+ # s - split into smaller hunks
191
+ # e - manually edit hunk
192
+ # q - quit
193
+
194
+ # Stage specific files
195
+ git add src/feature/
196
+ git commit -m "feat: add feature files"
197
+
198
+ git add tests/feature/
199
+ git commit -m "test: add tests for feature"
200
+ ```
201
+
202
+ ## Commit Templates
203
+
204
+ ### Setup
205
+
206
+ ```bash
207
+ # Create template file
208
+ cat > ~/.gitmessage << 'EOF'
209
+ # <type>(<scope>): <subject>
210
+ # |<---- Using a Maximum Of 50 Characters ---->|
211
+
212
+ # Explain why this change is being made
213
+ # |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
214
+
215
+ # Provide links or keys to any relevant tickets, articles or other resources
216
+ # Example: Fixes #23
217
+
218
+ # --- COMMIT END ---
219
+ # Type can be:
220
+ # feat (new feature)
221
+ # fix (bug fix)
222
+ # docs (changes to documentation)
223
+ # style (formatting, missing semi colons, etc; no code change)
224
+ # refactor (refactoring production code)
225
+ # test (adding missing tests, refactoring tests; no production code change)
226
+ # chore (updating grunt tasks etc; no production code change)
227
+ # perf (performance improvements)
228
+ # ci (CI configuration)
229
+ # build (build system changes)
230
+ # --------------------
231
+ EOF
232
+
233
+ # Configure git to use template
234
+ git config --global commit.template ~/.gitmessage
235
+ ```
236
+
237
+ ### Project-Specific Template
238
+
239
+ ```bash
240
+ # .gitmessage in project root
241
+ # <type>(<scope>): <subject>
242
+
243
+ # Body: Explain the motivation for the change
244
+
245
+ # Footer:
246
+ # Fixes #issue
247
+ # BREAKING CHANGE: description
248
+
249
+ # ---
250
+ # Remember:
251
+ # - Use present tense ("add" not "added")
252
+ # - Use imperative mood ("move" not "moves")
253
+ # - First line max 50 chars, body wrap at 72
254
+ # - Reference issues and PRs at the bottom
255
+ ```
256
+
257
+ ## Commit Message Validation
258
+
259
+ ### Git Hook (commit-msg)
260
+
261
+ ```bash
262
+ #!/bin/bash
263
+ # .git/hooks/commit-msg
264
+
265
+ commit_msg_file=$1
266
+ commit_msg=$(cat "$commit_msg_file")
267
+
268
+ # Skip merge commits
269
+ if echo "$commit_msg" | grep -qE "^Merge"; then
270
+ exit 0
271
+ fi
272
+
273
+ # Conventional commit pattern
274
+ pattern="^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\([a-z0-9-]+\))?(!)?: .{1,50}"
275
+
276
+ if ! echo "$commit_msg" | head -1 | grep -qE "$pattern"; then
277
+ echo "ERROR: Invalid commit message format"
278
+ echo ""
279
+ echo "Expected: <type>(<scope>): <subject>"
280
+ echo " type: feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert"
281
+ echo " scope: optional, lowercase with hyphens"
282
+ echo " subject: max 50 chars, imperative mood"
283
+ echo ""
284
+ echo "Your message:"
285
+ echo " $(head -1 "$commit_msg_file")"
286
+ exit 1
287
+ fi
288
+
289
+ # Check subject line length
290
+ subject=$(echo "$commit_msg" | head -1)
291
+ if [ ${#subject} -gt 72 ]; then
292
+ echo "ERROR: Subject line too long (${#subject} > 72 chars)"
293
+ exit 1
294
+ fi
295
+
296
+ # Check for trailing period
297
+ if echo "$subject" | grep -qE "\.$"; then
298
+ echo "ERROR: Subject line should not end with a period"
299
+ exit 1
300
+ fi
301
+
302
+ exit 0
303
+ ```
304
+
305
+ ### commitlint Configuration
306
+
307
+ ```javascript
308
+ // commitlint.config.js
309
+ module.exports = {
310
+ extends: ['@commitlint/config-conventional'],
311
+ rules: {
312
+ 'type-enum': [2, 'always', [
313
+ 'feat', 'fix', 'docs', 'style', 'refactor',
314
+ 'perf', 'test', 'build', 'ci', 'chore', 'revert'
315
+ ]],
316
+ 'scope-case': [2, 'always', 'kebab-case'],
317
+ 'subject-case': [2, 'always', 'lower-case'],
318
+ 'subject-max-length': [2, 'always', 72],
319
+ 'body-max-line-length': [2, 'always', 100],
320
+ },
321
+ };
322
+ ```
323
+
324
+ ```json
325
+ // package.json
326
+ {
327
+ "husky": {
328
+ "hooks": {
329
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
330
+ }
331
+ }
332
+ }
333
+ ```
334
+
335
+ ## Semantic Release Integration
336
+
337
+ ### Configuration
338
+
339
+ ```json
340
+ // .releaserc
341
+ {
342
+ "branches": ["main"],
343
+ "plugins": [
344
+ ["@semantic-release/commit-analyzer", {
345
+ "preset": "conventionalcommits",
346
+ "releaseRules": [
347
+ {"type": "feat", "release": "minor"},
348
+ {"type": "fix", "release": "patch"},
349
+ {"type": "perf", "release": "patch"},
350
+ {"type": "revert", "release": "patch"},
351
+ {"breaking": true, "release": "major"}
352
+ ]
353
+ }],
354
+ ["@semantic-release/release-notes-generator", {
355
+ "preset": "conventionalcommits"
356
+ }],
357
+ "@semantic-release/changelog",
358
+ "@semantic-release/npm",
359
+ "@semantic-release/github"
360
+ ]
361
+ }
362
+ ```
363
+
364
+ ### Version Bumping
365
+
366
+ ```bash
367
+ # These commits determine version bumps:
368
+
369
+ # PATCH (1.0.x)
370
+ fix: correct typo in error message
371
+ perf: optimize database query
372
+
373
+ # MINOR (1.x.0)
374
+ feat: add user profile page
375
+ feat(api): implement caching layer
376
+
377
+ # MAJOR (x.0.0)
378
+ feat!: redesign authentication system
379
+ fix!: change API response format
380
+
381
+ BREAKING CHANGE: Response format changed from XML to JSON
382
+ ```
383
+
384
+ ## Rewriting History
385
+
386
+ ### Amending Commits
387
+
388
+ ```bash
389
+ # Fix last commit message
390
+ git commit --amend -m "feat: correct commit message"
391
+
392
+ # Add files to last commit
393
+ git add forgotten-file.js
394
+ git commit --amend --no-edit
395
+
396
+ # Change author
397
+ git commit --amend --author="Name <email@example.com>"
398
+ ```
399
+
400
+ ### Interactive Rebase
401
+
402
+ ```bash
403
+ # Rewrite last 5 commits
404
+ git rebase -i HEAD~5
405
+
406
+ # Commands in editor:
407
+ # pick - use commit
408
+ # reword - edit message
409
+ # edit - stop and amend
410
+ # squash - combine with previous
411
+ # fixup - combine, discard message
412
+ # drop - remove commit
413
+
414
+ # Example: Squash fixup commits
415
+ pick abc1234 feat: add user API
416
+ fixup def5678 fixup! feat: add user API
417
+ pick ghi9012 feat: add admin API
418
+ ```
419
+
420
+ ### Fixup Commits
421
+
422
+ ```bash
423
+ # Create fixup commit
424
+ git add .
425
+ git commit --fixup=abc1234
426
+
427
+ # Auto-squash during rebase
428
+ git rebase -i --autosquash main
429
+ ```
430
+
431
+ ## Best Practices Summary
432
+
433
+ 1. **Write meaningful messages**: Future you will thank present you
434
+ 2. **Use conventional commits**: Enable automated versioning
435
+ 3. **Keep commits atomic**: One logical change per commit
436
+ 4. **Reference issues**: Link commits to project management
437
+ 5. **Use scopes consistently**: Help with changelog generation
438
+ 6. **Don't include generated files**: Keep commits focused on source changes
439
+ 7. **Sign commits** (optional): Verify authorship with GPG
@@ -0,0 +1,288 @@
1
+ # GitHub Releases Reference
2
+
3
+ **Purpose:** Document GitHub release management, immutable releases security feature, and release sequence patterns.
4
+
5
+ ---
6
+
7
+ ## Immutable Releases Security Feature
8
+
9
+ ### Overview
10
+
11
+ **GitHub Immutable Releases** (GA October 2024) is a permanent security feature that prevents tag name reuse after a release is deleted.
12
+
13
+ **Security Purpose:** Prevents supply chain attacks where an attacker could:
14
+ 1. Delete a legitimate release
15
+ 2. Create a new release with the same version containing malicious code
16
+ 3. Users downloading "v1.2.3" would get the malicious version
17
+
18
+ ### Behavior
19
+
20
+ | Action | Result |
21
+ |--------|--------|
22
+ | Create release v1.2.3 | ✅ Success |
23
+ | Delete release v1.2.3 | ✅ Allowed |
24
+ | Create NEW release v1.2.3 | ❌ PERMANENTLY BLOCKED |
25
+ | Create release v1.2.4 | ✅ Success (new version) |
26
+
27
+ ### Key Facts
28
+
29
+ - **Cannot be disabled:** No repository setting, API call, or GitHub support request can bypass this
30
+ - **Permanent:** Once blocked, a tag name stays blocked forever
31
+ - **Per-repository:** Each repository has its own blocked tag list
32
+ - **Applies to:** Published releases only (not draft releases)
33
+
34
+ ### Detection
35
+
36
+ ```bash
37
+ # Attempt to create release - if blocked, you'll see:
38
+ # "tag_name was used by an immutable release"
39
+ gh release create v1.2.3 --notes "test" 2>&1 | grep -i "immutable"
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Release Sequence Patterns
45
+
46
+ ### TYPO3 Extension Release
47
+
48
+ **Correct Sequence:**
49
+ ```bash
50
+ # 1. Create release branch
51
+ git checkout -b release/v1.2.3
52
+
53
+ # 2. Update version in source files
54
+ # ext_emconf.php
55
+ sed -i "s/'version' => '.*'/'version' => '1.2.3'/" ext_emconf.php
56
+
57
+ # CHANGELOG.md - add new version section
58
+
59
+ # 3. Commit version bump
60
+ git add ext_emconf.php CHANGELOG.md
61
+ git commit -m "chore: bump version to 1.2.3"
62
+
63
+ # 4. Create PR and merge
64
+ git push -u origin release/v1.2.3
65
+ gh pr create --title "chore: bump version to 1.2.3"
66
+ # Wait for CI to pass
67
+ gh pr merge --squash
68
+
69
+ # 5. Switch to main and verify
70
+ git checkout main && git pull
71
+ grep "'version'" ext_emconf.php # MUST show 1.2.3
72
+
73
+ # 6. Create release ONLY after verification
74
+ gh release create v1.2.3 \
75
+ --title "v1.2.3" \
76
+ --notes "Release notes here"
77
+ ```
78
+
79
+ **Common Mistakes:**
80
+ | Mistake | Consequence |
81
+ |---------|-------------|
82
+ | Create release before updating version | Version mismatch, TER/npm publish fails |
83
+ | Create release before merging PR | Tag points to wrong commit |
84
+ | Delete release to "fix" something | Tag name permanently blocked |
85
+ | Rush without verification | Multiple blocked versions |
86
+
87
+ ### NPM Package Release
88
+
89
+ ```bash
90
+ # 1. Update package.json version
91
+ npm version patch # or minor/major
92
+
93
+ # 2. Verify version
94
+ grep '"version"' package.json
95
+
96
+ # 3. Push changes
97
+ git push && git push --tags
98
+
99
+ # 4. Create GitHub release (if using GitHub releases)
100
+ gh release create v$(node -p "require('./package.json').version")
101
+ ```
102
+
103
+ ### Python Package Release
104
+
105
+ ```bash
106
+ # 1. Update version in pyproject.toml or setup.py
107
+ # 2. Update CHANGELOG
108
+
109
+ # 3. Commit and push
110
+ git add pyproject.toml CHANGELOG.md
111
+ git commit -m "chore: bump version to 1.2.3"
112
+ git push
113
+
114
+ # 4. Create and push tag
115
+ git tag v1.2.3
116
+ git push --tags
117
+
118
+ # 5. Create release
119
+ gh release create v1.2.3
120
+ ```
121
+
122
+ ---
123
+
124
+ ## Pre-Release Validation
125
+
126
+ ### Automated Checks
127
+
128
+ Add to CI workflow:
129
+ ```yaml
130
+ - name: Version Consistency Check
131
+ run: |
132
+ # Extract versions from different sources
133
+ EMCONF_VERSION=$(grep -oP "'version' => '\K[0-9]+\.[0-9]+\.[0-9]+" ext_emconf.php)
134
+
135
+ # For tagged builds, verify tag matches
136
+ if [[ "${GITHUB_REF}" =~ ^refs/tags/v ]]; then
137
+ TAG_VERSION="${GITHUB_REF#refs/tags/v}"
138
+ if [[ "${TAG_VERSION}" != "${EMCONF_VERSION}" ]]; then
139
+ echo "::error::Version mismatch! Tag: ${TAG_VERSION}, ext_emconf.php: ${EMCONF_VERSION}"
140
+ exit 1
141
+ fi
142
+ fi
143
+ echo "Version check passed: ${EMCONF_VERSION}"
144
+ ```
145
+
146
+ ### Manual Checklist
147
+
148
+ Before creating ANY release:
149
+ ```
150
+ [ ] All code changes merged to main/master
151
+ [ ] CI pipeline passes on main branch
152
+ [ ] Version updated in ALL source files:
153
+ [ ] ext_emconf.php (TYPO3)
154
+ [ ] package.json (Node)
155
+ [ ] pyproject.toml / setup.py (Python)
156
+ [ ] composer.json (if version is tracked there)
157
+ [ ] CHANGELOG.md updated with new version
158
+ [ ] Local main is up to date: git pull origin main
159
+ [ ] Version verification: grep -r "version" | grep "1.2.3"
160
+ [ ] READY - No second chances after release creation!
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Recovery Procedures
166
+
167
+ ### Scenario: TER/npm/PyPI Publish Failed After Release
168
+
169
+ **DO NOT DELETE THE RELEASE!**
170
+
171
+ Instead:
172
+ 1. Identify the root cause of publish failure
173
+ 2. Fix the issue in a new commit
174
+ 3. Update version to NEXT number (skipping the broken version)
175
+ 4. Create new release with new version
176
+
177
+ Example:
178
+ ```bash
179
+ # v1.2.3 release created but TER publish failed
180
+ # DO NOT: gh release delete v1.2.3
181
+
182
+ # Fix the issue
183
+ vim ext_emconf.php # remove strict_types or fix other issues
184
+
185
+ # Bump to NEXT version
186
+ sed -i "s/'version' => '1.2.3'/'version' => '1.2.4'/" ext_emconf.php
187
+
188
+ # Update CHANGELOG
189
+ cat >> CHANGELOG.md << 'EOF'
190
+ ## [1.2.4] - 2025-01-15
191
+
192
+ ### Fixed
193
+ - Fixed TER publishing issue (strict_types in ext_emconf.php)
194
+
195
+ Note: v1.2.3 was skipped due to publish failure.
196
+ EOF
197
+
198
+ # Commit, merge, then create new release
199
+ git add -A && git commit -m "fix: resolve TER publish issue, bump to 1.2.4"
200
+ git push && gh pr create && gh pr merge
201
+ gh release create v1.2.4 --notes "..."
202
+ ```
203
+
204
+ ### Scenario: Multiple Versions Blocked
205
+
206
+ If you've blocked v1.2.3, v1.2.4, v1.2.5 through repeated failures:
207
+
208
+ 1. **Stop and think** - don't create more releases
209
+ 2. List what went wrong each time
210
+ 3. Fix ALL issues before next attempt
211
+ 4. Use next available version (v1.2.6)
212
+ 5. Document skipped versions in CHANGELOG
213
+
214
+ ```markdown
215
+ ## [1.2.6] - 2025-01-15
216
+
217
+ Note: Versions 1.2.3-1.2.5 are unavailable due to GitHub's immutable
218
+ releases feature. These versions were blocked after release deletion
219
+ attempts during troubleshooting.
220
+
221
+ ### Fixed
222
+ - Resolved TER compatibility issue with ext_emconf.php
223
+ ```
224
+
225
+ ---
226
+
227
+ ## Multi-Branch Releases ("Latest" Badge)
228
+
229
+ ### Problem
230
+
231
+ GitHub assigns the **"Latest"** badge by **creation timestamp**, NOT by semantic version. Creating a `v11.0.17` release *after* `v13.5.0` will steal the "Latest" badge from v13.5.0.
232
+
233
+ ### Rule
234
+
235
+ **ALWAYS use `--latest=false`** when releasing from non-default branches (maintenance, LTS, hotfix):
236
+
237
+ ```bash
238
+ # Releasing from a maintenance branch (e.g., TYPO3_12, TYPO3_11)
239
+ gh release create v12.0.5 --latest=false --title "v12.0.5" --notes "..."
240
+
241
+ # Releasing from the default branch (e.g., main) — omit the flag
242
+ gh release create v13.6.0 --title "v13.6.0" --notes "..."
243
+ ```
244
+
245
+ ### When to use `--latest=false`
246
+
247
+ | Scenario | Flag |
248
+ |----------|------|
249
+ | Release from `main` / default branch | Omit (default: `--latest=true`) |
250
+ | Release from LTS/maintenance branch | `--latest=false` |
251
+ | Hotfix for older version | `--latest=false` |
252
+ | Pre-release (alpha, beta, rc) | `--prerelease` (auto-excludes from Latest) |
253
+
254
+ ### Recovery
255
+
256
+ If a maintenance release accidentally became "Latest":
257
+ ```bash
258
+ # Manually reassign the "Latest" badge to the correct release
259
+ gh release edit v13.5.0 --latest
260
+ ```
261
+
262
+ ---
263
+
264
+ ## Best Practices
265
+
266
+ ### Do
267
+ - ✅ Update version files BEFORE creating release
268
+ - ✅ Verify version with grep before release
269
+ - ✅ Use CI checks for version consistency
270
+ - ✅ Keep releases - never delete published releases
271
+ - ✅ Test publish process in staging first (if possible)
272
+ - ✅ Use `--latest=false` for non-default branch releases
273
+
274
+ ### Don't
275
+ - ❌ Create release before version is updated in source
276
+ - ❌ Delete releases to "fix" issues
277
+ - ❌ Rush releases without verification
278
+ - ❌ Assume you can recreate a deleted release
279
+ - ❌ Create multiple releases hoping one will work
280
+ - ❌ Omit `--latest=false` when releasing from maintenance branches
281
+
282
+ ---
283
+
284
+ ## Resources
285
+
286
+ - **GitHub Blog:** Immutable Releases announcement
287
+ - **GitHub Docs:** Managing releases in a repository
288
+ - **TYPO3 TER:** Extension publishing requirements