chati-dev 1.4.0 → 2.0.2

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 (208) hide show
  1. package/README.md +40 -24
  2. package/framework/agents/build/dev.md +343 -0
  3. package/framework/agents/clarity/architect.md +112 -0
  4. package/framework/agents/clarity/brief.md +182 -0
  5. package/framework/agents/clarity/brownfield-wu.md +181 -0
  6. package/framework/agents/clarity/detail.md +110 -0
  7. package/framework/agents/clarity/greenfield-wu.md +153 -0
  8. package/framework/agents/clarity/ux.md +112 -0
  9. package/framework/config.yaml +3 -3
  10. package/framework/constitution.md +31 -1
  11. package/framework/context/governance.md +37 -0
  12. package/framework/context/protocols.md +34 -0
  13. package/framework/context/quality.md +27 -0
  14. package/framework/context/root.md +24 -0
  15. package/framework/data/entity-registry.yaml +1 -1
  16. package/framework/domains/agents/architect.yaml +51 -0
  17. package/framework/domains/agents/brief.yaml +47 -0
  18. package/framework/domains/agents/brownfield-wu.yaml +49 -0
  19. package/framework/domains/agents/detail.yaml +47 -0
  20. package/framework/domains/agents/dev.yaml +49 -0
  21. package/framework/domains/agents/devops.yaml +43 -0
  22. package/framework/domains/agents/greenfield-wu.yaml +47 -0
  23. package/framework/domains/agents/orchestrator.yaml +49 -0
  24. package/framework/domains/agents/phases.yaml +47 -0
  25. package/framework/domains/agents/qa-implementation.yaml +43 -0
  26. package/framework/domains/agents/qa-planning.yaml +44 -0
  27. package/framework/domains/agents/tasks.yaml +48 -0
  28. package/framework/domains/agents/ux.yaml +50 -0
  29. package/framework/domains/constitution.yaml +77 -0
  30. package/framework/domains/global.yaml +64 -0
  31. package/framework/domains/workflows/brownfield-discovery.yaml +16 -0
  32. package/framework/domains/workflows/brownfield-fullstack.yaml +26 -0
  33. package/framework/domains/workflows/brownfield-service.yaml +22 -0
  34. package/framework/domains/workflows/brownfield-ui.yaml +22 -0
  35. package/framework/domains/workflows/greenfield-fullstack.yaml +26 -0
  36. package/framework/hooks/constitution-guard.js +101 -0
  37. package/framework/hooks/mode-governance.js +92 -0
  38. package/framework/hooks/model-governance.js +76 -0
  39. package/framework/hooks/prism-engine.js +89 -0
  40. package/framework/hooks/session-digest.js +60 -0
  41. package/framework/hooks/settings.json +44 -0
  42. package/framework/i18n/en.yaml +3 -3
  43. package/framework/i18n/es.yaml +3 -3
  44. package/framework/i18n/fr.yaml +3 -3
  45. package/framework/i18n/pt.yaml +3 -3
  46. package/framework/intelligence/decision-engine.md +1 -1
  47. package/framework/migrations/v1.4-to-v2.0.yaml +167 -0
  48. package/framework/migrations/v2.0-to-v2.0.1.yaml +132 -0
  49. package/framework/orchestrator/chati.md +284 -6
  50. package/framework/tasks/architect-api-design.md +63 -0
  51. package/framework/tasks/architect-consolidate.md +47 -0
  52. package/framework/tasks/architect-db-design.md +73 -0
  53. package/framework/tasks/architect-design.md +95 -0
  54. package/framework/tasks/architect-security-review.md +62 -0
  55. package/framework/tasks/architect-stack-selection.md +53 -0
  56. package/framework/tasks/brief-consolidate.md +249 -0
  57. package/framework/tasks/brief-constraint-identify.md +277 -0
  58. package/framework/tasks/brief-extract-requirements.md +339 -0
  59. package/framework/tasks/brief-stakeholder-map.md +176 -0
  60. package/framework/tasks/brief-validate-completeness.md +121 -0
  61. package/framework/tasks/brownfield-wu-architecture-map.md +394 -0
  62. package/framework/tasks/brownfield-wu-deep-discovery.md +312 -0
  63. package/framework/tasks/brownfield-wu-dependency-scan.md +359 -0
  64. package/framework/tasks/brownfield-wu-migration-plan.md +483 -0
  65. package/framework/tasks/brownfield-wu-report.md +325 -0
  66. package/framework/tasks/brownfield-wu-risk-assess.md +424 -0
  67. package/framework/tasks/detail-acceptance-criteria.md +372 -0
  68. package/framework/tasks/detail-consolidate.md +138 -0
  69. package/framework/tasks/detail-edge-case-analysis.md +300 -0
  70. package/framework/tasks/detail-expand-prd.md +389 -0
  71. package/framework/tasks/detail-nfr-extraction.md +223 -0
  72. package/framework/tasks/dev-code-review.md +404 -0
  73. package/framework/tasks/dev-consolidate.md +543 -0
  74. package/framework/tasks/dev-debug.md +322 -0
  75. package/framework/tasks/dev-implement.md +252 -0
  76. package/framework/tasks/dev-iterate.md +411 -0
  77. package/framework/tasks/dev-pr-prepare.md +497 -0
  78. package/framework/tasks/dev-refactor.md +342 -0
  79. package/framework/tasks/dev-test-write.md +306 -0
  80. package/framework/tasks/devops-ci-setup.md +412 -0
  81. package/framework/tasks/devops-consolidate.md +712 -0
  82. package/framework/tasks/devops-deploy-config.md +598 -0
  83. package/framework/tasks/devops-monitoring-setup.md +658 -0
  84. package/framework/tasks/devops-release-prepare.md +673 -0
  85. package/framework/tasks/greenfield-wu-analyze-empty.md +169 -0
  86. package/framework/tasks/greenfield-wu-report.md +266 -0
  87. package/framework/tasks/greenfield-wu-scaffold-detection.md +203 -0
  88. package/framework/tasks/greenfield-wu-tech-stack-assess.md +255 -0
  89. package/framework/tasks/orchestrator-deviation.md +260 -0
  90. package/framework/tasks/orchestrator-escalate.md +276 -0
  91. package/framework/tasks/orchestrator-handoff.md +243 -0
  92. package/framework/tasks/orchestrator-health.md +372 -0
  93. package/framework/tasks/orchestrator-mode-switch.md +262 -0
  94. package/framework/tasks/orchestrator-resume.md +189 -0
  95. package/framework/tasks/orchestrator-route.md +169 -0
  96. package/framework/tasks/orchestrator-spawn-terminal.md +358 -0
  97. package/framework/tasks/orchestrator-status.md +260 -0
  98. package/framework/tasks/orchestrator-suggest-mode.md +372 -0
  99. package/framework/tasks/phases-breakdown.md +91 -0
  100. package/framework/tasks/phases-dependency-mapping.md +67 -0
  101. package/framework/tasks/phases-mvp-scoping.md +94 -0
  102. package/framework/tasks/qa-impl-consolidate.md +522 -0
  103. package/framework/tasks/qa-impl-performance-test.md +487 -0
  104. package/framework/tasks/qa-impl-regression-check.md +413 -0
  105. package/framework/tasks/qa-impl-sast-scan.md +402 -0
  106. package/framework/tasks/qa-impl-test-execute.md +344 -0
  107. package/framework/tasks/qa-impl-verdict.md +339 -0
  108. package/framework/tasks/qa-planning-consolidate.md +309 -0
  109. package/framework/tasks/qa-planning-coverage-plan.md +338 -0
  110. package/framework/tasks/qa-planning-gate-define.md +339 -0
  111. package/framework/tasks/qa-planning-risk-matrix.md +631 -0
  112. package/framework/tasks/qa-planning-test-strategy.md +217 -0
  113. package/framework/tasks/tasks-acceptance-write.md +75 -0
  114. package/framework/tasks/tasks-consolidate.md +57 -0
  115. package/framework/tasks/tasks-decompose.md +80 -0
  116. package/framework/tasks/tasks-estimate.md +66 -0
  117. package/framework/tasks/ux-a11y-check.md +49 -0
  118. package/framework/tasks/ux-component-map.md +55 -0
  119. package/framework/tasks/ux-consolidate.md +46 -0
  120. package/framework/tasks/ux-user-flow.md +46 -0
  121. package/framework/tasks/ux-wireframe.md +76 -0
  122. package/package.json +2 -2
  123. package/scripts/bundle-framework.js +2 -0
  124. package/scripts/changelog-generator.js +222 -0
  125. package/scripts/codebase-mapper.js +728 -0
  126. package/scripts/commit-message-generator.js +167 -0
  127. package/scripts/coverage-analyzer.js +260 -0
  128. package/scripts/dependency-analyzer.js +280 -0
  129. package/scripts/framework-analyzer.js +308 -0
  130. package/scripts/generate-constitution-domain.js +253 -0
  131. package/scripts/health-check.js +481 -0
  132. package/scripts/ide-sync.js +327 -0
  133. package/scripts/performance-analyzer.js +325 -0
  134. package/scripts/plan-tracker.js +278 -0
  135. package/scripts/populate-entity-registry.js +481 -0
  136. package/scripts/pr-review.js +317 -0
  137. package/scripts/rollback-manager.js +310 -0
  138. package/scripts/stuck-detector.js +343 -0
  139. package/scripts/test-quality-assessment.js +257 -0
  140. package/scripts/validate-agents.js +367 -0
  141. package/scripts/validate-tasks.js +465 -0
  142. package/src/autonomy/autonomous-gate.js +293 -0
  143. package/src/autonomy/index.js +51 -0
  144. package/src/autonomy/mode-manager.js +225 -0
  145. package/src/autonomy/mode-suggester.js +283 -0
  146. package/src/autonomy/progress-reporter.js +268 -0
  147. package/src/autonomy/safety-net.js +320 -0
  148. package/src/context/bracket-tracker.js +79 -0
  149. package/src/context/domain-loader.js +107 -0
  150. package/src/context/engine.js +144 -0
  151. package/src/context/formatter.js +184 -0
  152. package/src/context/index.js +4 -0
  153. package/src/context/layers/l0-constitution.js +28 -0
  154. package/src/context/layers/l1-global.js +37 -0
  155. package/src/context/layers/l2-agent.js +39 -0
  156. package/src/context/layers/l3-workflow.js +42 -0
  157. package/src/context/layers/l4-task.js +24 -0
  158. package/src/decision/analyzer.js +167 -0
  159. package/src/decision/engine.js +270 -0
  160. package/src/decision/index.js +38 -0
  161. package/src/decision/registry-healer.js +450 -0
  162. package/src/decision/registry-updater.js +330 -0
  163. package/src/gates/circuit-breaker.js +119 -0
  164. package/src/gates/g1-planning-complete.js +153 -0
  165. package/src/gates/g2-qa-planning.js +153 -0
  166. package/src/gates/g3-implementation.js +188 -0
  167. package/src/gates/g4-qa-implementation.js +207 -0
  168. package/src/gates/g5-deploy-ready.js +180 -0
  169. package/src/gates/gate-base.js +144 -0
  170. package/src/gates/index.js +46 -0
  171. package/src/installer/brownfield-upgrader.js +249 -0
  172. package/src/installer/core.js +82 -11
  173. package/src/installer/file-hasher.js +51 -0
  174. package/src/installer/manifest.js +117 -0
  175. package/src/installer/templates.js +17 -15
  176. package/src/installer/transaction.js +229 -0
  177. package/src/installer/validator.js +18 -1
  178. package/src/intelligence/registry-manager.js +2 -2
  179. package/src/memory/agent-memory.js +255 -0
  180. package/src/memory/gotchas-injector.js +72 -0
  181. package/src/memory/gotchas.js +361 -0
  182. package/src/memory/index.js +35 -0
  183. package/src/memory/search.js +233 -0
  184. package/src/memory/session-digest.js +239 -0
  185. package/src/merger/env-merger.js +112 -0
  186. package/src/merger/index.js +56 -0
  187. package/src/merger/replace-merger.js +51 -0
  188. package/src/merger/yaml-merger.js +127 -0
  189. package/src/orchestrator/agent-selector.js +285 -0
  190. package/src/orchestrator/deviation-handler.js +350 -0
  191. package/src/orchestrator/handoff-engine.js +271 -0
  192. package/src/orchestrator/index.js +67 -0
  193. package/src/orchestrator/intent-classifier.js +264 -0
  194. package/src/orchestrator/pipeline-manager.js +492 -0
  195. package/src/orchestrator/pipeline-state.js +223 -0
  196. package/src/orchestrator/session-manager.js +409 -0
  197. package/src/tasks/executor.js +195 -0
  198. package/src/tasks/handoff.js +226 -0
  199. package/src/tasks/index.js +4 -0
  200. package/src/tasks/loader.js +210 -0
  201. package/src/tasks/router.js +182 -0
  202. package/src/terminal/collector.js +216 -0
  203. package/src/terminal/index.js +30 -0
  204. package/src/terminal/isolation.js +129 -0
  205. package/src/terminal/monitor.js +277 -0
  206. package/src/terminal/spawner.js +269 -0
  207. package/src/upgrade/checker.js +1 -1
  208. package/src/wizard/i18n.js +3 -3
@@ -0,0 +1,673 @@
1
+ ---
2
+ id: devops-release-prepare
3
+ agent: devops
4
+ trigger: devops-monitoring-setup
5
+ phase: deploy
6
+ requires_input: false
7
+ parallelizable: false
8
+ outputs: [release-plan.yaml]
9
+ handoff_to: devops-consolidate
10
+ autonomous_gate: true
11
+ criteria:
12
+ - Version bumped
13
+ - Changelog updated
14
+ - Tag created
15
+ ---
16
+ # Prepare Release
17
+
18
+ ## Purpose
19
+ Prepare production release including version bumping, changelog generation, git tagging, and release notes documentation.
20
+
21
+ ## Prerequisites
22
+ - All features tested and approved
23
+ - Deployment configuration complete
24
+ - Monitoring set up
25
+ - Production environment ready
26
+ - Git repository clean
27
+
28
+ ## Steps
29
+
30
+ ### 1. Determine Release Type
31
+ Follow semantic versioning (MAJOR.MINOR.PATCH):
32
+
33
+ **MAJOR** (1.0.0 → 2.0.0):
34
+ - Breaking changes
35
+ - Major feature overhaul
36
+ - API incompatibility
37
+ - Architecture changes
38
+
39
+ **MINOR** (1.0.0 → 1.1.0):
40
+ - New features (backward compatible)
41
+ - Significant enhancements
42
+ - New functionality
43
+ - Deprecations added
44
+
45
+ **PATCH** (1.0.0 → 1.0.1):
46
+ - Bug fixes
47
+ - Security patches
48
+ - Performance improvements
49
+ - Documentation updates
50
+
51
+ ### 2. Review Changes Since Last Release
52
+ Identify what changed:
53
+
54
+ ```bash
55
+ # View commits since last tag
56
+ git log $(git describe --tags --abbrev=0)..HEAD --oneline
57
+
58
+ # View detailed changes
59
+ git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%h - %s (%an)"
60
+
61
+ # Check file changes
62
+ git diff $(git describe --tags --abbrev=0)..HEAD --stat
63
+ ```
64
+
65
+ ### 3. Update Version Number
66
+ Bump version in all relevant files:
67
+
68
+ **Use npm version** (recommended):
69
+ ```bash
70
+ # Patch release
71
+ npm version patch -m "chore: release v%s"
72
+
73
+ # Minor release
74
+ npm version minor -m "feat: release v%s"
75
+
76
+ # Major release
77
+ npm version major -m "feat!: release v%s"
78
+ ```
79
+
80
+ This automatically:
81
+ - Updates package.json version
82
+ - Creates git commit
83
+ - Creates git tag
84
+
85
+ **Manual version update**:
86
+
87
+ Update `package.json`:
88
+ ```json
89
+ {
90
+ "name": "chati-dev",
91
+ "version": "1.1.0",
92
+ "description": "..."
93
+ }
94
+ ```
95
+
96
+ Update `package-lock.json`:
97
+ ```bash
98
+ npm install
99
+ ```
100
+
101
+ If applicable, update version in:
102
+ - `src/version.ts`
103
+ - `README.md`
104
+ - `docs/CHANGELOG.md`
105
+ - Docker images
106
+ - Helm charts
107
+
108
+ ### 4. Generate Changelog
109
+ Update CHANGELOG.md following Keep a Changelog format:
110
+
111
+ **Using conventional-changelog** (automated):
112
+ ```bash
113
+ npm install -g conventional-changelog-cli
114
+ conventional-changelog -p angular -i CHANGELOG.md -s
115
+ ```
116
+
117
+ **Manual CHANGELOG.md**:
118
+ ```markdown
119
+ # Changelog
120
+
121
+ All notable changes to this project will be documented in this file.
122
+
123
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
124
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
125
+
126
+ ## [1.1.0] - 2026-02-13
127
+
128
+ ### Added
129
+ - Real-time chat messaging with WebSocket support
130
+ - Message validation and sanitization
131
+ - Comprehensive error tracking with Sentry
132
+ - Health check endpoints for monitoring
133
+
134
+ ### Changed
135
+ - Improved error messages for better UX
136
+ - Refactored message handling for better separation of concerns
137
+ - Updated deployment configuration for Railway
138
+
139
+ ### Fixed
140
+ - SQL injection vulnerability in message search
141
+ - Message length validation off-by-one error
142
+ - WebSocket error handling edge cases
143
+
144
+ ### Security
145
+ - Added input validation for all user-generated content
146
+ - Implemented HTML sanitization to prevent XSS
147
+ - Added rate limiting configuration
148
+
149
+ ### Deprecated
150
+ - (Nothing deprecated in this release)
151
+
152
+ ### Removed
153
+ - (Nothing removed in this release)
154
+
155
+ ## [1.0.0] - 2026-02-01
156
+
157
+ ### Added
158
+ - Initial release
159
+ - Basic project structure
160
+ - CLI installer
161
+ - Agent orchestration system
162
+
163
+ [1.1.0]: https://github.com/user/repo/compare/v1.0.0...v1.1.0
164
+ [1.0.0]: https://github.com/user/repo/releases/tag/v1.0.0
165
+ ```
166
+
167
+ ### 5. Create Git Tag
168
+ Tag the release:
169
+
170
+ ```bash
171
+ # Create annotated tag
172
+ git tag -a v1.1.0 -m "Release version 1.1.0
173
+
174
+ Features:
175
+ - Real-time chat messaging
176
+ - Enhanced monitoring and logging
177
+ - Improved error handling
178
+
179
+ Bug Fixes:
180
+ - Fixed SQL injection vulnerability
181
+ - Corrected message validation
182
+
183
+ See CHANGELOG.md for full details."
184
+
185
+ # Verify tag
186
+ git tag -l -n9 v1.1.0
187
+
188
+ # Push tag to remote
189
+ git push origin v1.1.0
190
+ ```
191
+
192
+ ### 6. Create Release Notes
193
+ Prepare comprehensive release notes:
194
+
195
+ **docs/releases/v1.1.0.md**:
196
+ ```markdown
197
+ # Release v1.1.0 - Real-time Chat Messaging
198
+
199
+ Released: 2026-02-13
200
+
201
+ ## 🎉 What's New
202
+
203
+ ### Real-time Chat Messaging
204
+ We've added real-time chat functionality with WebSocket support, allowing users to communicate instantly within the application.
205
+
206
+ **Key Features:**
207
+ - Send and receive messages in real-time
208
+ - Message persistence to database
209
+ - HTML sanitization for security
210
+ - Message validation (length, format)
211
+
212
+ ## 🔧 Improvements
213
+
214
+ ### Enhanced Monitoring
215
+ - Added comprehensive logging with Winston
216
+ - Integrated Sentry for error tracking
217
+ - Health check endpoints for uptime monitoring
218
+ - Performance metrics collection
219
+
220
+ ### Better Error Handling
221
+ - User-friendly error messages
222
+ - Improved error recovery
223
+ - Better error context in logs
224
+
225
+ ## 🐛 Bug Fixes
226
+
227
+ - **Security**: Fixed SQL injection vulnerability in message search
228
+ - **Validation**: Corrected message length validation (now properly enforces 1000 char limit)
229
+ - **WebSocket**: Enhanced error handling for connection failures
230
+
231
+ ## 🔒 Security
232
+
233
+ - Input validation on all user-generated content
234
+ - HTML sanitization to prevent XSS attacks
235
+ - Parameterized queries to prevent SQL injection
236
+ - No hardcoded credentials
237
+
238
+ ## 📦 Installation
239
+
240
+ ```bash
241
+ npm install chati-dev@1.1.0
242
+ ```
243
+
244
+ ## ⬆️ Upgrade Guide
245
+
246
+ ### From v1.0.x
247
+
248
+ No breaking changes! Simply update your package:
249
+
250
+ ```bash
251
+ npm update chati-dev
252
+ ```
253
+
254
+ Run database migrations:
255
+
256
+ ```bash
257
+ npm run migrate
258
+ ```
259
+
260
+ ### Environment Variables
261
+
262
+ New optional environment variables:
263
+ - `SENTRY_DSN`: For error tracking (optional)
264
+ - `LOGTAIL_TOKEN`: For log aggregation (optional)
265
+
266
+ ## 📚 Documentation
267
+
268
+ - [Chat Module Documentation](../modules/chat.md)
269
+ - [Deployment Guide](../DEPLOYMENT.md)
270
+ - [Monitoring Setup](../MONITORING.md)
271
+
272
+ ## 🙏 Contributors
273
+
274
+ Thanks to everyone who contributed to this release!
275
+
276
+ ## 📊 Stats
277
+
278
+ - 932 lines added
279
+ - 55 lines removed
280
+ - 13 files changed
281
+ - 20 tests added
282
+ - 91.5% test coverage
283
+
284
+ ## 🔗 Links
285
+
286
+ - [Full Changelog](https://github.com/user/repo/compare/v1.0.0...v1.1.0)
287
+ - [GitHub Release](https://github.com/user/repo/releases/tag/v1.1.0)
288
+ - [Issues Closed](https://github.com/user/repo/milestone/2?closed=1)
289
+ ```
290
+
291
+ ### 7. Create GitHub Release
292
+ Publish release on GitHub:
293
+
294
+ **Using GitHub CLI**:
295
+ ```bash
296
+ gh release create v1.1.0 \
297
+ --title "v1.1.0 - Real-time Chat Messaging" \
298
+ --notes-file docs/releases/v1.1.0.md \
299
+ --latest
300
+ ```
301
+
302
+ **Manual via GitHub Web**:
303
+ 1. Go to Releases page
304
+ 2. Click "Draft a new release"
305
+ 3. Choose tag v1.1.0
306
+ 4. Set title: "v1.1.0 - Real-time Chat Messaging"
307
+ 5. Paste release notes
308
+ 6. Mark as latest release
309
+ 7. Publish release
310
+
311
+ ### 8. Build Release Artifacts
312
+ Create distribution files:
313
+
314
+ ```bash
315
+ # Build for production
316
+ npm run build
317
+
318
+ # Create tarball
319
+ npm pack
320
+
321
+ # Verify contents
322
+ tar -tzf chati-dev-1.1.0.tgz
323
+ ```
324
+
325
+ For Docker:
326
+ ```bash
327
+ # Build Docker image
328
+ docker build -t chati-dev:1.1.0 .
329
+ docker build -t chati-dev:latest .
330
+
331
+ # Tag for registry
332
+ docker tag chati-dev:1.1.0 username/chati-dev:1.1.0
333
+ docker tag chati-dev:latest username/chati-dev:latest
334
+ ```
335
+
336
+ ### 9. Publish to npm (if applicable)
337
+ Release package to npm registry:
338
+
339
+ ```bash
340
+ # Login to npm
341
+ npm login
342
+
343
+ # Publish package
344
+ npm publish --access public
345
+
346
+ # Verify published
347
+ npm view chati-dev
348
+ ```
349
+
350
+ For Docker Hub:
351
+ ```bash
352
+ # Login
353
+ docker login
354
+
355
+ # Push images
356
+ docker push username/chati-dev:1.1.0
357
+ docker push username/chati-dev:latest
358
+ ```
359
+
360
+ ### 10. Update Documentation
361
+ Ensure docs reflect new version:
362
+
363
+ **README.md**:
364
+ ```markdown
365
+ ## Installation
366
+
367
+ ```bash
368
+ npm install chati-dev@latest
369
+ # or specific version
370
+ npm install chati-dev@1.1.0
371
+ ```
372
+
373
+ **Update version badges**:
374
+ ```markdown
375
+ ![Version](https://img.shields.io/npm/v/chati-dev)
376
+ ![Downloads](https://img.shields.io/npm/dm/chati-dev)
377
+ ```
378
+
379
+ ### 11. Create Migration Guide (if needed)
380
+ For breaking changes:
381
+
382
+ **docs/migrations/v1-to-v2.md**:
383
+ ```markdown
384
+ # Migration Guide: v1.x to v2.0
385
+
386
+ ## Breaking Changes
387
+
388
+ ### API Changes
389
+ - `sendMessage()` now returns a Promise
390
+ - `getMessage()` renamed to `fetchMessage()`
391
+
392
+ ### Configuration Changes
393
+ - Environment variable `API_KEY` renamed to `CHAT_API_KEY`
394
+
395
+ ## Step-by-Step Migration
396
+
397
+ 1. Update package:
398
+ ```bash
399
+ npm install chati-dev@2.0.0
400
+ ```
401
+
402
+ 2. Update API calls:
403
+ ```typescript
404
+ // Before
405
+ const msg = sendMessage(text);
406
+
407
+ // After
408
+ const msg = await sendMessage(text);
409
+ ```
410
+
411
+ 3. Update environment variables:
412
+ ```bash
413
+ # Rename in .env
414
+ CHAT_API_KEY=... # was API_KEY
415
+ ```
416
+
417
+ 4. Run tests:
418
+ ```bash
419
+ npm test
420
+ ```
421
+
422
+ ## Automatic Migration
423
+
424
+ We provide a codemod to help:
425
+ ```bash
426
+ npx @chati-dev/codemod v1-to-v2
427
+ ```
428
+ ```
429
+
430
+ ### 12. Notify Stakeholders
431
+ Communicate release:
432
+
433
+ **Internal**:
434
+ - Slack/team chat announcement
435
+ - Email to stakeholders
436
+ - Update project management tools
437
+
438
+ **External**:
439
+ - Tweet/social media
440
+ - Blog post
441
+ - Newsletter
442
+ - Documentation site
443
+
444
+ **Example Slack Message**:
445
+ ```
446
+ 🚀 Release v1.1.0 is now live!
447
+
448
+ ✨ What's new:
449
+ • Real-time chat messaging
450
+ • Enhanced monitoring & logging
451
+ • Improved error handling
452
+
453
+ 🐛 Fixes:
454
+ • SQL injection vulnerability
455
+ • Message validation bugs
456
+
457
+ 📚 Docs: https://docs.yourdomain.com/releases/v1.1.0
458
+ 🔗 Release: https://github.com/user/repo/releases/tag/v1.1.0
459
+ ```
460
+
461
+ ## Decision Points
462
+
463
+ ### When to Mark as Pre-release
464
+ Use pre-release versions when:
465
+ - Still in testing (alpha, beta, rc)
466
+ - Not production-ready
467
+ - Want early feedback
468
+ - Breaking changes not finalized
469
+
470
+ Format: `1.1.0-beta.1`, `2.0.0-rc.2`
471
+
472
+ ### When to Create Hotfix Release
473
+ Create hotfix for:
474
+ - Critical security vulnerabilities
475
+ - Data loss bugs
476
+ - Service outages
477
+ - Critical functionality broken
478
+
479
+ Process:
480
+ 1. Branch from release tag
481
+ 2. Fix issue
482
+ 3. Bump patch version
483
+ 4. Fast-track release
484
+
485
+ ### When to Rollback
486
+ Rollback if:
487
+ - Critical bugs discovered post-release
488
+ - Security vulnerability introduced
489
+ - Data integrity issues
490
+ - Widespread user impact
491
+
492
+ ## Error Handling
493
+
494
+ ### Version Conflict
495
+ If version already exists:
496
+ ```bash
497
+ # Delete local tag
498
+ git tag -d v1.1.0
499
+
500
+ # Delete remote tag (careful!)
501
+ git push --delete origin v1.1.0
502
+
503
+ # Create with new version
504
+ git tag -a v1.1.1 -m "..."
505
+ ```
506
+
507
+ ### npm Publish Fails
508
+ If publish fails:
509
+ - Check npm credentials
510
+ - Verify version not published
511
+ - Check package.json validity
512
+ - Ensure registry accessible
513
+ - Check for .npmignore issues
514
+
515
+ ### Tag Push Fails
516
+ If can't push tags:
517
+ ```bash
518
+ # Fetch latest
519
+ git fetch --tags
520
+
521
+ # Force push (be certain!)
522
+ git push --force origin v1.1.0
523
+ ```
524
+
525
+ ## Output Format
526
+
527
+ Create `.chati/artifacts/deploy/release-plan.yaml`:
528
+
529
+ ```yaml
530
+ task_id: "deploy"
531
+ agent: devops
532
+ action: release-prepare
533
+ timestamp: "2026-02-13T18:45:00Z"
534
+ duration_minutes: 40
535
+
536
+ release_info:
537
+ version: "1.1.0"
538
+ previous_version: "1.0.0"
539
+ release_type: minor
540
+ release_date: "2026-02-13"
541
+ codename: "Real-time Chat"
542
+
543
+ version_updates:
544
+ - file: package.json
545
+ old: "1.0.0"
546
+ new: "1.1.0"
547
+ - file: package-lock.json
548
+ old: "1.0.0"
549
+ new: "1.1.0"
550
+ - file: src/version.ts
551
+ old: "1.0.0"
552
+ new: "1.1.0"
553
+
554
+ changelog:
555
+ file: CHANGELOG.md
556
+ updated: true
557
+ sections:
558
+ added: 4
559
+ changed: 3
560
+ fixed: 3
561
+ security: 3
562
+
563
+ git_tags:
564
+ - tag: v1.1.0
565
+ message: "Release version 1.1.0"
566
+ commit: abc1234
567
+ pushed: true
568
+
569
+ release_notes:
570
+ file: docs/releases/v1.1.0.md
571
+ created: true
572
+ sections:
573
+ - whats_new
574
+ - improvements
575
+ - bug_fixes
576
+ - security
577
+ - installation
578
+ - upgrade_guide
579
+
580
+ github_release:
581
+ created: true
582
+ url: "https://github.com/user/repo/releases/tag/v1.1.0"
583
+ title: "v1.1.0 - Real-time Chat Messaging"
584
+ is_latest: true
585
+ is_prerelease: false
586
+
587
+ artifacts:
588
+ tarball:
589
+ file: chati-dev-1.1.0.tgz
590
+ size_kb: 245
591
+ created: true
592
+ docker_images:
593
+ - tag: "chati-dev:1.1.0"
594
+ pushed: true
595
+ - tag: "chati-dev:latest"
596
+ pushed: true
597
+
598
+ npm_publish:
599
+ published: true
600
+ package: "chati-dev"
601
+ version: "1.1.0"
602
+ registry: "https://registry.npmjs.org"
603
+ access: public
604
+ url: "https://www.npmjs.com/package/chati-dev/v/1.1.0"
605
+
606
+ documentation_updates:
607
+ - file: README.md
608
+ change: Updated installation instructions
609
+ - file: docs/MIGRATION.md
610
+ change: Added upgrade guide
611
+ - file: docs/API.md
612
+ change: Updated API documentation
613
+
614
+ stakeholder_notification:
615
+ internal:
616
+ - channel: slack
617
+ posted: true
618
+ - channel: email
619
+ sent: true
620
+ external:
621
+ - channel: github
622
+ posted: true
623
+ - channel: twitter
624
+ posted: false
625
+
626
+ breaking_changes: false
627
+ migration_guide_needed: false
628
+
629
+ release_checklist:
630
+ - item: Version bumped
631
+ status: done
632
+ - item: Changelog updated
633
+ status: done
634
+ - item: Git tag created
635
+ status: done
636
+ - item: Release notes written
637
+ status: done
638
+ - item: GitHub release published
639
+ status: done
640
+ - item: npm package published
641
+ status: done
642
+ - item: Docker images pushed
643
+ status: done
644
+ - item: Documentation updated
645
+ status: done
646
+ - item: Stakeholders notified
647
+ status: done
648
+
649
+ metrics:
650
+ commits_since_last_release: 11
651
+ files_changed: 13
652
+ lines_added: 932
653
+ lines_removed: 55
654
+ contributors: 1
655
+ issues_closed: 3
656
+
657
+ next_steps:
658
+ - "Monitor release for issues"
659
+ - "Respond to user feedback"
660
+ - "Begin planning v1.2.0"
661
+ - "Archive release artifacts"
662
+ ```
663
+
664
+ ## Success Criteria
665
+ - Version number bumped correctly
666
+ - Changelog complete and accurate
667
+ - Git tag created and pushed
668
+ - Release notes comprehensive
669
+ - GitHub release published
670
+ - Package published (if applicable)
671
+ - Documentation updated
672
+ - Stakeholders notified
673
+ - Release plan documented