@paulojalowyj/openkit 0.1.1

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 (281) hide show
  1. package/.opencode/ARCHITECTURE.md +150 -0
  2. package/.opencode/LICENSE +21 -0
  3. package/.opencode/bin/cli.js +213 -0
  4. package/.opencode/commands/README.md +273 -0
  5. package/.opencode/commands/analyze.md +64 -0
  6. package/.opencode/commands/brainstorm.md +186 -0
  7. package/.opencode/commands/checklist.md +62 -0
  8. package/.opencode/commands/clarify.md +40 -0
  9. package/.opencode/commands/context.md +68 -0
  10. package/.opencode/commands/create.md +70 -0
  11. package/.opencode/commands/debug.md +160 -0
  12. package/.opencode/commands/deploy.md +244 -0
  13. package/.opencode/commands/doc.md +45 -0
  14. package/.opencode/commands/engineer.md +483 -0
  15. package/.opencode/commands/impl.md +242 -0
  16. package/.opencode/commands/plan.md +250 -0
  17. package/.opencode/commands/preview.md +87 -0
  18. package/.opencode/commands/specify.md +66 -0
  19. package/.opencode/commands/status.md +103 -0
  20. package/.opencode/commands/tasks.md +58 -0
  21. package/.opencode/commands/test.md +104 -0
  22. package/.opencode/commands/ui-ux.md +216 -0
  23. package/.opencode/prompts/backend-specialist.md +315 -0
  24. package/.opencode/prompts/chat.md +36 -0
  25. package/.opencode/prompts/database-architect.md +244 -0
  26. package/.opencode/prompts/debugger.md +244 -0
  27. package/.opencode/prompts/devops-engineer.md +259 -0
  28. package/.opencode/prompts/documentation-writer.md +121 -0
  29. package/.opencode/prompts/explorer-agent.md +92 -0
  30. package/.opencode/prompts/frontend-specialist.md +608 -0
  31. package/.opencode/prompts/mobile-developer.md +393 -0
  32. package/.opencode/prompts/orchestrator.md +472 -0
  33. package/.opencode/prompts/penetration-tester.md +205 -0
  34. package/.opencode/prompts/performance-optimizer.md +204 -0
  35. package/.opencode/prompts/product-owner.md +113 -0
  36. package/.opencode/prompts/project-planner.md +413 -0
  37. package/.opencode/prompts/security-auditor.md +187 -0
  38. package/.opencode/prompts/seo-specialist.md +128 -0
  39. package/.opencode/prompts/test-engineer.md +190 -0
  40. package/.opencode/rules/AGENT_TEMPLATE.md +391 -0
  41. package/.opencode/rules/MASTER.md +272 -0
  42. package/.opencode/rules/README.md +266 -0
  43. package/.opencode/rules/TODOLIST_EXAMPLES.md +675 -0
  44. package/.opencode/rules/TODOLIST_PROTOCOL.md +495 -0
  45. package/.opencode/rules/TOOL_USAGE.md +731 -0
  46. package/.opencode/scripts/auto_preview.py +100 -0
  47. package/.opencode/scripts/checklist.py +217 -0
  48. package/.opencode/scripts/session_manager.py +225 -0
  49. package/.opencode/scripts/verify_all.py +403 -0
  50. package/.opencode/skills/api-patterns/SKILL.md +80 -0
  51. package/.opencode/skills/api-patterns/api-style.md +42 -0
  52. package/.opencode/skills/api-patterns/auth.md +24 -0
  53. package/.opencode/skills/api-patterns/documentation.md +26 -0
  54. package/.opencode/skills/api-patterns/graphql.md +41 -0
  55. package/.opencode/skills/api-patterns/rate-limiting.md +31 -0
  56. package/.opencode/skills/api-patterns/response.md +37 -0
  57. package/.opencode/skills/api-patterns/rest.md +40 -0
  58. package/.opencode/skills/api-patterns/scripts/api_validator.py +211 -0
  59. package/.opencode/skills/api-patterns/security-testing.md +122 -0
  60. package/.opencode/skills/api-patterns/trpc.md +41 -0
  61. package/.opencode/skills/api-patterns/versioning.md +22 -0
  62. package/.opencode/skills/app-builder/SKILL.md +101 -0
  63. package/.opencode/skills/app-builder/agent-coordination.md +71 -0
  64. package/.opencode/skills/app-builder/feature-building.md +53 -0
  65. package/.opencode/skills/app-builder/project-detection.md +34 -0
  66. package/.opencode/skills/app-builder/scaffolding.md +116 -0
  67. package/.opencode/skills/app-builder/tech-stack.md +40 -0
  68. package/.opencode/skills/app-builder/templates/SKILL.md +39 -0
  69. package/.opencode/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  70. package/.opencode/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  71. package/.opencode/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  72. package/.opencode/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  73. package/.opencode/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  74. package/.opencode/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  75. package/.opencode/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  76. package/.opencode/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +81 -0
  77. package/.opencode/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
  78. package/.opencode/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
  79. package/.opencode/skills/app-builder/templates/nuxt-app/TEMPLATE.md +100 -0
  80. package/.opencode/skills/app-builder/templates/python-fastapi/TEMPLATE.md +82 -0
  81. package/.opencode/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
  82. package/.opencode/skills/architecture/SKILL.md +55 -0
  83. package/.opencode/skills/architecture/context-discovery.md +43 -0
  84. package/.opencode/skills/architecture/examples.md +94 -0
  85. package/.opencode/skills/architecture/pattern-selection.md +68 -0
  86. package/.opencode/skills/architecture/patterns-reference.md +50 -0
  87. package/.opencode/skills/architecture/trade-off-analysis.md +77 -0
  88. package/.opencode/skills/bash-linux/SKILL.md +199 -0
  89. package/.opencode/skills/behavioral-modes/SKILL.md +242 -0
  90. package/.opencode/skills/brainstorming/SKILL.md +163 -0
  91. package/.opencode/skills/brainstorming/dynamic-questioning.md +350 -0
  92. package/.opencode/skills/clean-code/SKILL.md +201 -0
  93. package/.opencode/skills/code-review-checklist/SKILL.md +109 -0
  94. package/.opencode/skills/database-design/SKILL.md +73 -0
  95. package/.opencode/skills/database-design/database-selection.md +43 -0
  96. package/.opencode/skills/database-design/indexing.md +39 -0
  97. package/.opencode/skills/database-design/migrations.md +48 -0
  98. package/.opencode/skills/database-design/optimization.md +36 -0
  99. package/.opencode/skills/database-design/orm-selection.md +30 -0
  100. package/.opencode/skills/database-design/schema-design.md +56 -0
  101. package/.opencode/skills/database-design/scripts/schema_validator.py +172 -0
  102. package/.opencode/skills/deployment-procedures/SKILL.md +241 -0
  103. package/.opencode/skills/documentation-templates/SKILL.md +279 -0
  104. package/.opencode/skills/frontend-design/SKILL.md +446 -0
  105. package/.opencode/skills/frontend-design/animation-guide.md +331 -0
  106. package/.opencode/skills/frontend-design/color-system.md +311 -0
  107. package/.opencode/skills/frontend-design/data/charts.csv +26 -0
  108. package/.opencode/skills/frontend-design/data/colors.csv +97 -0
  109. package/.opencode/skills/frontend-design/data/icons.csv +101 -0
  110. package/.opencode/skills/frontend-design/data/landing.csv +31 -0
  111. package/.opencode/skills/frontend-design/data/products.csv +97 -0
  112. package/.opencode/skills/frontend-design/data/prompts.csv +24 -0
  113. package/.opencode/skills/frontend-design/data/react-performance.csv +45 -0
  114. package/.opencode/skills/frontend-design/data/stacks/flutter.csv +53 -0
  115. package/.opencode/skills/frontend-design/data/stacks/html-tailwind.csv +56 -0
  116. package/.opencode/skills/frontend-design/data/stacks/jetpack-compose.csv +53 -0
  117. package/.opencode/skills/frontend-design/data/stacks/nextjs.csv +53 -0
  118. package/.opencode/skills/frontend-design/data/stacks/nuxt-ui.csv +51 -0
  119. package/.opencode/skills/frontend-design/data/stacks/nuxtjs.csv +59 -0
  120. package/.opencode/skills/frontend-design/data/stacks/react-native.csv +52 -0
  121. package/.opencode/skills/frontend-design/data/stacks/react.csv +54 -0
  122. package/.opencode/skills/frontend-design/data/stacks/shadcn.csv +61 -0
  123. package/.opencode/skills/frontend-design/data/stacks/svelte.csv +54 -0
  124. package/.opencode/skills/frontend-design/data/stacks/swiftui.csv +51 -0
  125. package/.opencode/skills/frontend-design/data/stacks/vue.csv +50 -0
  126. package/.opencode/skills/frontend-design/data/styles.csv +59 -0
  127. package/.opencode/skills/frontend-design/data/typography.csv +58 -0
  128. package/.opencode/skills/frontend-design/data/ui-reasoning.csv +101 -0
  129. package/.opencode/skills/frontend-design/data/ux-guidelines.csv +100 -0
  130. package/.opencode/skills/frontend-design/data/web-interface.csv +31 -0
  131. package/.opencode/skills/frontend-design/decision-trees.md +418 -0
  132. package/.opencode/skills/frontend-design/motion-graphics.md +306 -0
  133. package/.opencode/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  134. package/.opencode/skills/frontend-design/scripts/core.py +258 -0
  135. package/.opencode/skills/frontend-design/scripts/design_system.py +1067 -0
  136. package/.opencode/skills/frontend-design/scripts/search.py +106 -0
  137. package/.opencode/skills/frontend-design/scripts/ux_audit.py +735 -0
  138. package/.opencode/skills/frontend-design/typography-system.md +345 -0
  139. package/.opencode/skills/frontend-design/ux-psychology.md +541 -0
  140. package/.opencode/skills/frontend-design/visual-effects.md +383 -0
  141. package/.opencode/skills/geo-fundamentals/SKILL.md +156 -0
  142. package/.opencode/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  143. package/.opencode/skills/i18n-localization/SKILL.md +154 -0
  144. package/.opencode/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  145. package/.opencode/skills/intelligent-routing/SKILL.md +335 -0
  146. package/.opencode/skills/lint-and-validate/SKILL.md +45 -0
  147. package/.opencode/skills/lint-and-validate/scripts/lint_runner.py +172 -0
  148. package/.opencode/skills/lint-and-validate/scripts/type_coverage.py +173 -0
  149. package/.opencode/skills/mobile-design/SKILL.md +394 -0
  150. package/.opencode/skills/mobile-design/decision-trees.md +516 -0
  151. package/.opencode/skills/mobile-design/mobile-backend.md +491 -0
  152. package/.opencode/skills/mobile-design/mobile-color-system.md +420 -0
  153. package/.opencode/skills/mobile-design/mobile-debugging.md +122 -0
  154. package/.opencode/skills/mobile-design/mobile-design-thinking.md +357 -0
  155. package/.opencode/skills/mobile-design/mobile-navigation.md +458 -0
  156. package/.opencode/skills/mobile-design/mobile-performance.md +767 -0
  157. package/.opencode/skills/mobile-design/mobile-testing.md +356 -0
  158. package/.opencode/skills/mobile-design/mobile-typography.md +433 -0
  159. package/.opencode/skills/mobile-design/platform-android.md +666 -0
  160. package/.opencode/skills/mobile-design/platform-ios.md +561 -0
  161. package/.opencode/skills/mobile-design/scripts/mobile_audit.py +670 -0
  162. package/.opencode/skills/mobile-design/touch-psychology.md +537 -0
  163. package/.opencode/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  164. package/.opencode/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  165. package/.opencode/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  166. package/.opencode/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  167. package/.opencode/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  168. package/.opencode/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  169. package/.opencode/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  170. package/.opencode/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  171. package/.opencode/skills/nextjs-react-expert/SKILL.md +267 -0
  172. package/.opencode/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  173. package/.opencode/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  174. package/.opencode/skills/parallel-agents/SKILL.md +175 -0
  175. package/.opencode/skills/performance-profiling/SKILL.md +143 -0
  176. package/.opencode/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
  177. package/.opencode/skills/plan-writing/SKILL.md +176 -0
  178. package/.opencode/skills/python-patterns/SKILL.md +462 -0
  179. package/.opencode/skills/red-team-tactics/SKILL.md +199 -0
  180. package/.opencode/skills/seo-fundamentals/SKILL.md +129 -0
  181. package/.opencode/skills/seo-fundamentals/scripts/seo_checker.py +222 -0
  182. package/.opencode/skills/server-management/SKILL.md +161 -0
  183. package/.opencode/skills/stack-selection/SKILL.md +448 -0
  184. package/.opencode/skills/systematic-debugging/SKILL.md +109 -0
  185. package/.opencode/skills/tailwind-patterns/SKILL.md +269 -0
  186. package/.opencode/skills/tdd-workflow/SKILL.md +149 -0
  187. package/.opencode/skills/testing-patterns/SKILL.md +178 -0
  188. package/.opencode/skills/testing-patterns/scripts/test_runner.py +219 -0
  189. package/.opencode/skills/vulnerability-scanner/SKILL.md +276 -0
  190. package/.opencode/skills/vulnerability-scanner/checklists.md +121 -0
  191. package/.opencode/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  192. package/.opencode/skills/web-design-guidelines/SKILL.md +57 -0
  193. package/.opencode/skills/webapp-testing/SKILL.md +187 -0
  194. package/.opencode/skills/webapp-testing/scripts/playwright_runner.py +173 -0
  195. package/.opencode/templates/DOCS-ACTION_ITEMS.md +5 -0
  196. package/.opencode/templates/DOCS-API.md +11 -0
  197. package/.opencode/templates/DOCS-BACKEND.md +10 -0
  198. package/.opencode/templates/DOCS-CONTEXT.md +25 -0
  199. package/.opencode/templates/DOCS-DATABASE.md +10 -0
  200. package/.opencode/templates/DOCS-FRONTEND.md +11 -0
  201. package/.opencode/templates/DOCS-QUALITY_GATES.md +20 -0
  202. package/.opencode/templates/DOCS-SECURITY.md +17 -0
  203. package/.opencode/templates/SDD-AcceptanceCriteria.md +21 -0
  204. package/.opencode/templates/SDD-Checklist.md +27 -0
  205. package/.opencode/templates/SDD-Contracts.md +21 -0
  206. package/.opencode/templates/SDD-Plan.md +45 -0
  207. package/.opencode/templates/SDD-ProblemStatement.md +25 -0
  208. package/.opencode/templates/SDD-Quickstart.md +23 -0
  209. package/.opencode/templates/SDD-Research.md +24 -0
  210. package/.opencode/templates/SDD-Risks.md +16 -0
  211. package/.opencode/templates/SDD-Tasks.md +41 -0
  212. package/.opencode/templates/SDD-UserStories.md +45 -0
  213. package/.opencode/templates/TechStack.md +111 -0
  214. package/LICENSE +21 -0
  215. package/PACKAGE_STATUS.md +97 -0
  216. package/README.md +251 -0
  217. package/README.pt-BR.md +192 -0
  218. package/bin/cli.js +505 -0
  219. package/blueprints/fullstack/.env.example +15 -0
  220. package/blueprints/fullstack/AGENTS.md +3 -0
  221. package/blueprints/fullstack/README.md +65 -0
  222. package/blueprints/fullstack/backend/.dockerignore +10 -0
  223. package/blueprints/fullstack/backend/.python-version +1 -0
  224. package/blueprints/fullstack/backend/Dockerfile +33 -0
  225. package/blueprints/fullstack/backend/alembic.ini +40 -0
  226. package/blueprints/fullstack/backend/app/__init__.py +0 -0
  227. package/blueprints/fullstack/backend/app/api/README.md +3 -0
  228. package/blueprints/fullstack/backend/app/api/__init__.py +0 -0
  229. package/blueprints/fullstack/backend/app/celery_app.py +5 -0
  230. package/blueprints/fullstack/backend/app/core/README.md +3 -0
  231. package/blueprints/fullstack/backend/app/core/__init__.py +0 -0
  232. package/blueprints/fullstack/backend/app/database.py +14 -0
  233. package/blueprints/fullstack/backend/app/main.py +16 -0
  234. package/blueprints/fullstack/backend/app/models/README.md +3 -0
  235. package/blueprints/fullstack/backend/app/models/__init__.py +3 -0
  236. package/blueprints/fullstack/backend/app/models/item.py +10 -0
  237. package/blueprints/fullstack/backend/app/routers/__init__.py +0 -0
  238. package/blueprints/fullstack/backend/app/routers/items.py +20 -0
  239. package/blueprints/fullstack/backend/app/schemas/README.md +3 -0
  240. package/blueprints/fullstack/backend/app/schemas/__init__.py +0 -0
  241. package/blueprints/fullstack/backend/app/schemas/item.py +15 -0
  242. package/blueprints/fullstack/backend/app/services/item_service.py +23 -0
  243. package/blueprints/fullstack/backend/app/settings.py +36 -0
  244. package/blueprints/fullstack/backend/app/tasks/README.md +3 -0
  245. package/blueprints/fullstack/backend/app/tasks/__init__.py +0 -0
  246. package/blueprints/fullstack/backend/migrations/env.py +47 -0
  247. package/blueprints/fullstack/backend/migrations/versions/0001_initial_sample_data.py +31 -0
  248. package/blueprints/fullstack/backend/pyproject.toml +45 -0
  249. package/blueprints/fullstack/docker-compose.dev.yml +114 -0
  250. package/blueprints/fullstack/docker-compose.prod.yml +90 -0
  251. package/blueprints/fullstack/docs/README.md +29 -0
  252. package/blueprints/fullstack/docs/engineering/api/README.md +3 -0
  253. package/blueprints/fullstack/docs/engineering/architecture/README.md +3 -0
  254. package/blueprints/fullstack/docs/engineering/backend/README.md +3 -0
  255. package/blueprints/fullstack/docs/engineering/frontend/README.md +3 -0
  256. package/blueprints/fullstack/docs/engineering/security/README.md +3 -0
  257. package/blueprints/fullstack/docs/engineering/standards/README.md +3 -0
  258. package/blueprints/fullstack/frontend/.dockerignore +4 -0
  259. package/blueprints/fullstack/frontend/Dockerfile +23 -0
  260. package/blueprints/fullstack/frontend/components.json +17 -0
  261. package/blueprints/fullstack/frontend/index.html +12 -0
  262. package/blueprints/fullstack/frontend/package.json +28 -0
  263. package/blueprints/fullstack/frontend/src/components/README.md +3 -0
  264. package/blueprints/fullstack/frontend/src/components/ui/.keep +4 -0
  265. package/blueprints/fullstack/frontend/src/index.css +57 -0
  266. package/blueprints/fullstack/frontend/src/lib/README.md +3 -0
  267. package/blueprints/fullstack/frontend/src/lib/api.ts +1 -0
  268. package/blueprints/fullstack/frontend/src/lib/utils.ts +6 -0
  269. package/blueprints/fullstack/frontend/src/main.tsx +66 -0
  270. package/blueprints/fullstack/frontend/src/routes/README.md +3 -0
  271. package/blueprints/fullstack/frontend/src/routes/root.tsx +7 -0
  272. package/blueprints/fullstack/frontend/src/vite-env.d.ts +1 -0
  273. package/blueprints/fullstack/frontend/tailwind.config.ts +12 -0
  274. package/blueprints/fullstack/frontend/tsconfig.json +13 -0
  275. package/blueprints/fullstack/frontend/tsconfig.node.json +12 -0
  276. package/blueprints/fullstack/frontend/vite.config.ts +12 -0
  277. package/index.js +14 -0
  278. package/opencode.json +306 -0
  279. package/package.json +57 -0
  280. package/scripts/prepare.js +65 -0
  281. package/scripts/update-version.js +29 -0
@@ -0,0 +1,241 @@
1
+ ---
2
+ name: deployment-procedures
3
+ description: Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.
4
+ allowed-tools: Read, Glob, Grep, Bash
5
+ ---
6
+
7
+ # Deployment Procedures
8
+
9
+ > Deployment principles and decision-making for safe production releases.
10
+ > **Learn to THINK, not memorize scripts.**
11
+
12
+ ---
13
+
14
+ ## How to Use This Skill
15
+
16
+ This skill teaches **deployment principles**, not bash scripts to copy.
17
+
18
+ - Every deployment is unique
19
+ - Understand the WHY behind each step
20
+ - Adapt procedures to your platform
21
+
22
+ ---
23
+
24
+ ## 1. Platform Selection
25
+
26
+ ### Decision Tree
27
+
28
+ ```
29
+ What are you deploying?
30
+
31
+ ├── Static site / JAMstack
32
+ │ └── Vercel, Netlify, Cloudflare Pages
33
+
34
+ ├── Simple web app
35
+ │ ├── Managed → Railway, Render, Fly.io
36
+ │ └── Control → VPS + PM2/Docker
37
+
38
+ ├── Microservices
39
+ │ └── Container orchestration
40
+
41
+ └── Serverless
42
+ └── Edge functions, Lambda
43
+ ```
44
+
45
+ ### Each Platform Has Different Procedures
46
+
47
+ | Platform | Deployment Method |
48
+ |----------|------------------|
49
+ | **Vercel/Netlify** | Git push, auto-deploy |
50
+ | **Railway/Render** | Git push or CLI |
51
+ | **VPS + PM2** | SSH + manual steps |
52
+ | **Docker** | Image push + orchestration |
53
+ | **Kubernetes** | kubectl apply |
54
+
55
+ ---
56
+
57
+ ## 2. Pre-Deployment Principles
58
+
59
+ ### The 4 Verification Categories
60
+
61
+ | Category | What to Check |
62
+ |----------|--------------|
63
+ | **Code Quality** | Tests passing, linting clean, reviewed |
64
+ | **Build** | Production build works, no warnings |
65
+ | **Environment** | Env vars set, secrets current |
66
+ | **Safety** | Backup done, rollback plan ready |
67
+
68
+ ### Pre-Deployment Checklist
69
+
70
+ - [ ] All tests passing
71
+ - [ ] Code reviewed and approved
72
+ - [ ] Production build successful
73
+ - [ ] Environment variables verified
74
+ - [ ] Database migrations ready (if any)
75
+ - [ ] Rollback plan documented
76
+ - [ ] Team notified
77
+ - [ ] Monitoring ready
78
+
79
+ ---
80
+
81
+ ## 3. Deployment Workflow Principles
82
+
83
+ ### The 5-Phase Process
84
+
85
+ ```
86
+ 1. PREPARE
87
+ └── Verify code, build, env vars
88
+
89
+ 2. BACKUP
90
+ └── Save current state before changing
91
+
92
+ 3. DEPLOY
93
+ └── Execute with monitoring open
94
+
95
+ 4. VERIFY
96
+ └── Health check, logs, key flows
97
+
98
+ 5. CONFIRM or ROLLBACK
99
+ └── All good? Confirm. Issues? Rollback.
100
+ ```
101
+
102
+ ### Phase Principles
103
+
104
+ | Phase | Principle |
105
+ |-------|-----------|
106
+ | **Prepare** | Never deploy untested code |
107
+ | **Backup** | Can't rollback without backup |
108
+ | **Deploy** | Watch it happen, don't walk away |
109
+ | **Verify** | Trust but verify |
110
+ | **Confirm** | Have rollback trigger ready |
111
+
112
+ ---
113
+
114
+ ## 4. Post-Deployment Verification
115
+
116
+ ### What to Verify
117
+
118
+ | Check | Why |
119
+ |-------|-----|
120
+ | **Health endpoint** | Service is running |
121
+ | **Error logs** | No new errors |
122
+ | **Key user flows** | Critical features work |
123
+ | **Performance** | Response times acceptable |
124
+
125
+ ### Verification Window
126
+
127
+ - **First 5 minutes**: Active monitoring
128
+ - **15 minutes**: Confirm stable
129
+ - **1 hour**: Final verification
130
+ - **Next day**: Review metrics
131
+
132
+ ---
133
+
134
+ ## 5. Rollback Principles
135
+
136
+ ### When to Rollback
137
+
138
+ | Symptom | Action |
139
+ |---------|--------|
140
+ | Service down | Rollback immediately |
141
+ | Critical errors | Rollback |
142
+ | Performance >50% degraded | Consider rollback |
143
+ | Minor issues | Fix forward if quick |
144
+
145
+ ### Rollback Strategy by Platform
146
+
147
+ | Platform | Rollback Method |
148
+ |----------|----------------|
149
+ | **Vercel/Netlify** | Redeploy previous commit |
150
+ | **Railway/Render** | Rollback in dashboard |
151
+ | **VPS + PM2** | Restore backup, restart |
152
+ | **Docker** | Previous image tag |
153
+ | **K8s** | kubectl rollout undo |
154
+
155
+ ### Rollback Principles
156
+
157
+ 1. **Speed over perfection**: Rollback first, debug later
158
+ 2. **Don't compound errors**: One rollback, not multiple changes
159
+ 3. **Communicate**: Tell team what happened
160
+ 4. **Post-mortem**: Understand why after stable
161
+
162
+ ---
163
+
164
+ ## 6. Zero-Downtime Deployment
165
+
166
+ ### Strategies
167
+
168
+ | Strategy | How It Works |
169
+ |----------|--------------|
170
+ | **Rolling** | Replace instances one by one |
171
+ | **Blue-Green** | Switch traffic between environments |
172
+ | **Canary** | Gradual traffic shift |
173
+
174
+ ### Selection Principles
175
+
176
+ | Scenario | Strategy |
177
+ |----------|----------|
178
+ | Standard release | Rolling |
179
+ | High-risk change | Blue-green (easy rollback) |
180
+ | Need validation | Canary (test with real traffic) |
181
+
182
+ ---
183
+
184
+ ## 7. Emergency Procedures
185
+
186
+ ### Service Down Priority
187
+
188
+ 1. **Assess**: What's the symptom?
189
+ 2. **Quick fix**: Restart if unclear
190
+ 3. **Rollback**: If restart doesn't help
191
+ 4. **Investigate**: After stable
192
+
193
+ ### Investigation Order
194
+
195
+ | Check | Common Issues |
196
+ |-------|--------------|
197
+ | **Logs** | Errors, exceptions |
198
+ | **Resources** | Disk full, memory |
199
+ | **Network** | DNS, firewall |
200
+ | **Dependencies** | Database, APIs |
201
+
202
+ ---
203
+
204
+ ## 8. Anti-Patterns
205
+
206
+ | Don't | Do |
207
+ |----------|-------|
208
+ | Deploy on Friday | Deploy early in week |
209
+ | Rush deployment | Follow the process |
210
+ | Skip staging | Always test first |
211
+ | Deploy without backup | Backup before deploy |
212
+ | Walk away after deploy | Monitor for 15+ min |
213
+ | Multiple changes at once | One change at a time |
214
+
215
+ ---
216
+
217
+ ## 9. Decision Checklist
218
+
219
+ Before deploying:
220
+
221
+ - [ ] **Platform-appropriate procedure?**
222
+ - [ ] **Backup strategy ready?**
223
+ - [ ] **Rollback plan documented?**
224
+ - [ ] **Monitoring configured?**
225
+ - [ ] **Team notified?**
226
+ - [ ] **Time to monitor after?**
227
+
228
+ ---
229
+
230
+ ## 10. Best Practices
231
+
232
+ 1. **Small, frequent deploys** over big releases
233
+ 2. **Feature flags** for risky changes
234
+ 3. **Automate** repetitive steps
235
+ 4. **Document** every deployment
236
+ 5. **Review** what went wrong after issues
237
+ 6. **Test rollback** before you need it
238
+
239
+ ---
240
+
241
+ > **Remember:** Every deployment is a risk. Minimize risk through preparation, not speed.
@@ -0,0 +1,279 @@
1
+ ---
2
+ name: documentation-templates
3
+ description: Documentation templates and structure guidelines. README, API docs, code comments, and AI-friendly documentation.
4
+ allowed-tools: Read, Glob, Grep
5
+ ---
6
+
7
+ # Documentation Templates
8
+
9
+ > Templates and structure guidelines for common documentation types.
10
+
11
+ ---
12
+
13
+ ## 1. README Structure
14
+
15
+ ### Essential Sections (Priority Order)
16
+
17
+ | Section | Purpose |
18
+ |---------|---------|
19
+ | **Title + One-liner** | What is this? |
20
+ | **Quick Start** | Running in <5 min |
21
+ | **Features** | What can I do? |
22
+ | **Configuration** | How to customize |
23
+ | **API Reference** | Link to detailed docs |
24
+ | **Contributing** | How to help |
25
+ | **License** | Legal |
26
+
27
+ ### README Template
28
+
29
+ ```markdown
30
+ # Project Name
31
+
32
+ Brief one-line description.
33
+
34
+ ## Quick Start
35
+
36
+ [Minimum steps to run]
37
+
38
+ ## Features
39
+
40
+ - Feature 1
41
+ - Feature 2
42
+
43
+ ## Configuration
44
+
45
+ | Variable | Description | Default |
46
+ |----------|-------------|---------|
47
+ | PORT | Server port | 3000 |
48
+
49
+ ## Documentation
50
+
51
+ - [API Reference](./docs/API.md)
52
+ - [Architecture](./docs/ARCHITECTURE.md)
53
+
54
+ ## License
55
+
56
+ MIT
57
+ ```
58
+
59
+ ---
60
+
61
+ ## 2. API Documentation Structure
62
+
63
+ ### Per-Endpoint Template
64
+
65
+ ```markdown
66
+ ## GET /users/:id
67
+
68
+ Get a user by ID.
69
+
70
+ **Parameters:**
71
+ | Name | Type | Required | Description |
72
+ |------|------|----------|-------------|
73
+ | id | string | Yes | User ID |
74
+
75
+ **Response:**
76
+ - 200: User object
77
+ - 404: User not found
78
+
79
+ **Example:**
80
+ [Request and response example]
81
+ ```
82
+
83
+ ---
84
+
85
+ ## 3. Code Comment Guidelines
86
+
87
+ ### JSDoc/TSDoc Template
88
+
89
+ ```typescript
90
+ /**
91
+ * Brief description of what the function does.
92
+ *
93
+ * @param paramName - Description of parameter
94
+ * @returns Description of return value
95
+ * @throws ErrorType - When this error occurs
96
+ *
97
+ * @example
98
+ * const result = functionName(input);
99
+ */
100
+ ```
101
+
102
+ ### When to Comment
103
+
104
+ | Comment | Don't Comment |
105
+ |-----------|-----------------|
106
+ | Why (business logic) | What (obvious) |
107
+ | Complex algorithms | Every line |
108
+ | Non-obvious behavior | Self-explanatory code |
109
+ | API contracts | Implementation details |
110
+
111
+ ---
112
+
113
+ ## 4. Changelog Template (Keep a Changelog)
114
+
115
+ ```markdown
116
+ # Changelog
117
+
118
+ ## [Unreleased]
119
+ ### Added
120
+ - New feature
121
+
122
+ ## [1.0.0] - 2025-01-01
123
+ ### Added
124
+ - Initial release
125
+ ### Changed
126
+ - Updated dependency
127
+ ### Fixed
128
+ - Bug fix
129
+ ```
130
+
131
+ ---
132
+
133
+ ## 5. Architecture Decision Record (ADR)
134
+
135
+ ```markdown
136
+ # ADR-001: [Title]
137
+
138
+ ## Status
139
+ Accepted / Deprecated / Superseded
140
+
141
+ ## Context
142
+ Why are we making this decision?
143
+
144
+ ## Decision
145
+ What did we decide?
146
+
147
+ ## Consequences
148
+ What are the trade-offs?
149
+ ```
150
+
151
+ ---
152
+
153
+ ## 6. AI-Friendly Documentation (2025)
154
+
155
+ ### llms.txt Template
156
+
157
+ For AI crawlers and agents:
158
+
159
+ ```markdown
160
+ # Project Name
161
+ > One-line objective.
162
+
163
+ ## Core Files
164
+ - [src/index.ts]: Main entry
165
+ - [src/api/]: API routes
166
+ - [docs/]: Documentation
167
+
168
+ ## Key Concepts
169
+ - Concept 1: Brief explanation
170
+ - Concept 2: Brief explanation
171
+ ```
172
+
173
+ ### MCP-Ready Documentation
174
+
175
+ For RAG indexing:
176
+ - Clear H1-H3 hierarchy
177
+ - JSON/YAML examples for data structures
178
+ - Mermaid diagrams for flows
179
+ - Self-contained sections
180
+
181
+ ---
182
+
183
+ ## 7. Planning Artifacts in docs/
184
+
185
+ ### Requirements (docs/requirements/<feature>/)
186
+
187
+ ```markdown
188
+ # Problem Statement — [Feature]
189
+
190
+ ## The Problem
191
+ [Context and user pain]
192
+
193
+ ## The Objective
194
+ [Measurable objective]
195
+
196
+ ## Scope
197
+
198
+ ### In-Scope
199
+ - [ ] Item
200
+
201
+ ### Out-of-Scope
202
+ - [ ] Item
203
+
204
+ ## Success Criteria (KPIs)
205
+ - [ ] Indicator
206
+ ```
207
+
208
+ ```markdown
209
+ # User Stories — [Feature]
210
+
211
+ | ID | Persona | I want... (Action) | So that... (Value) | Priority |
212
+ |----|---------|--------------------|-------------------|----------|
213
+ ```
214
+
215
+ ```markdown
216
+ # Acceptance Criteria (Gherkin)
217
+
218
+ ## US-01: [Title]
219
+ ```gherkin
220
+ Scenario: [Nome]
221
+ Given ...
222
+ When ...
223
+ Then ...
224
+ ```
225
+ ```
226
+
227
+ ```markdown
228
+ # Data Contracts — [Feature]
229
+
230
+ ## Entities
231
+ | Field | Type | Required | Description |
232
+ |-------|------|----------|-------------|
233
+ ```
234
+
235
+ ```markdown
236
+ # Risks — [Feature]
237
+
238
+ | Risk | Probability | Impact | Mitigation |
239
+ |------|-------------|--------|------------|
240
+ ```
241
+
242
+ ### Sprint Planning (docs/sprint/Sprint-XX/)
243
+
244
+ ```markdown
245
+ # Sprint XX Goal
246
+
247
+ ## Objective
248
+ [Sprint objective]
249
+
250
+ ## Key Deliverables
251
+ 1. [Deliverable]
252
+ ```
253
+
254
+ ```markdown
255
+ # Sprint XX Backlog
256
+
257
+ | ID | Story | Epic | Priority | Points | Dependencies | Owner | Status |
258
+ |----|-------|------|----------|--------|--------------|-------|--------|
259
+ ```
260
+
261
+ ```markdown
262
+ ## SXX-001: [Title]
263
+ Owner: [owner]
264
+
265
+ - [ ] Task
266
+ ```
267
+
268
+ ## 8. Structure Principles
269
+
270
+ | Principle | Why |
271
+ |-----------|-----|
272
+ | **Scannable** | Headers, lists, tables |
273
+ | **Examples first** | Show, don't just tell |
274
+ | **Progressive detail** | Simple → Complex |
275
+ | **Up to date** | Outdated = misleading |
276
+
277
+ ---
278
+
279
+ > **Remember:** Templates are starting points. Adapt to your project's needs.