contextos-agents 1.5.0

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 (310) hide show
  1. package/.agents/AGENTS.md +421 -0
  2. package/.agents/adapters/aider/export.js +137 -0
  3. package/.agents/adapters/claude/export.js +55 -0
  4. package/.agents/adapters/copilot/export.js +107 -0
  5. package/.agents/adapters/cursor/export.js +210 -0
  6. package/.agents/adapters/gemini/export.js +115 -0
  7. package/.agents/adapters/shared.js +119 -0
  8. package/.agents/adapters/zed/export.js +111 -0
  9. package/.agents/core/profiles/backend.yaml +47 -0
  10. package/.agents/core/profiles/enterprise.yaml +46 -0
  11. package/.agents/core/profiles/frontend.yaml +46 -0
  12. package/.agents/core/profiles/hackathon.yaml +45 -0
  13. package/.agents/core/profiles/mvp.yaml +43 -0
  14. package/.agents/core/profiles/startup.yaml +48 -0
  15. package/.agents/core/skills/adapters/EXAMPLES.md +19 -0
  16. package/.agents/core/skills/adapters/SKILL.md +105 -0
  17. package/.agents/core/skills/adapters/TROUBLESHOOTING.md +7 -0
  18. package/.agents/core/skills/adapters/VALIDATION.json +12 -0
  19. package/.agents/core/skills/adapters/skill.yaml +10 -0
  20. package/.agents/core/skills/architecture-diagrams/SKILL.md +108 -0
  21. package/.agents/core/skills/architecture-diagrams/VALIDATION.json +12 -0
  22. package/.agents/core/skills/architecture-diagrams/skill.yaml +8 -0
  23. package/.agents/core/skills/brutalist-design/SKILL.md +150 -0
  24. package/.agents/core/skills/brutalist-design/VALIDATION.json +12 -0
  25. package/.agents/core/skills/brutalist-design/skill.yaml +8 -0
  26. package/.agents/core/skills/context-manager/EXAMPLES.md +19 -0
  27. package/.agents/core/skills/context-manager/SKILL.md +126 -0
  28. package/.agents/core/skills/context-manager/TROUBLESHOOTING.md +7 -0
  29. package/.agents/core/skills/context-manager/VALIDATION.json +12 -0
  30. package/.agents/core/skills/context-manager/skill.yaml +10 -0
  31. package/.agents/core/skills/context-os/EXAMPLES.md +21 -0
  32. package/.agents/core/skills/context-os/SKILL.md +169 -0
  33. package/.agents/core/skills/context-os/TROUBLESHOOTING.md +7 -0
  34. package/.agents/core/skills/context-os/VALIDATION.json +12 -0
  35. package/.agents/core/skills/context-os/packs.yaml +59 -0
  36. package/.agents/core/skills/context-os/references/context-rules.md +68 -0
  37. package/.agents/core/skills/context-os/references/pipeline.md +119 -0
  38. package/.agents/core/skills/context-os/references/project-graph.md +103 -0
  39. package/.agents/core/skills/context-os/rules.yaml +135 -0
  40. package/.agents/core/skills/context-os/skill.yaml +10 -0
  41. package/.agents/core/skills/database/EXAMPLES.md +74 -0
  42. package/.agents/core/skills/database/SKILL.md +101 -0
  43. package/.agents/core/skills/database/TROUBLESHOOTING.md +18 -0
  44. package/.agents/core/skills/database/VALIDATION.json +11 -0
  45. package/.agents/core/skills/database/skill.yaml +25 -0
  46. package/.agents/core/skills/ddd/EXAMPLES.md +42 -0
  47. package/.agents/core/skills/ddd/SKILL.md +247 -0
  48. package/.agents/core/skills/ddd/TROUBLESHOOTING.md +19 -0
  49. package/.agents/core/skills/ddd/VALIDATION.json +12 -0
  50. package/.agents/core/skills/ddd/ddd.md +178 -0
  51. package/.agents/core/skills/ddd/skill.yaml +10 -0
  52. package/.agents/core/skills/decisions/EXAMPLES.md +35 -0
  53. package/.agents/core/skills/decisions/SKILL.md +90 -0
  54. package/.agents/core/skills/decisions/TROUBLESHOOTING.md +13 -0
  55. package/.agents/core/skills/decisions/VALIDATION.json +12 -0
  56. package/.agents/core/skills/decisions/skill.yaml +10 -0
  57. package/.agents/core/skills/docker/EXAMPLES.md +56 -0
  58. package/.agents/core/skills/docker/SKILL.md +63 -0
  59. package/.agents/core/skills/docker/TROUBLESHOOTING.md +18 -0
  60. package/.agents/core/skills/docker/VALIDATION.json +11 -0
  61. package/.agents/core/skills/docker/skill.yaml +23 -0
  62. package/.agents/core/skills/engineering-workflow/EXAMPLES.md +57 -0
  63. package/.agents/core/skills/engineering-workflow/SKILL.md +343 -0
  64. package/.agents/core/skills/engineering-workflow/TROUBLESHOOTING.md +19 -0
  65. package/.agents/core/skills/engineering-workflow/VALIDATION.json +12 -0
  66. package/.agents/core/skills/engineering-workflow/skill.yaml +13 -0
  67. package/.agents/core/skills/fastapi/EXAMPLES.md +36 -0
  68. package/.agents/core/skills/fastapi/SKILL.md +148 -0
  69. package/.agents/core/skills/fastapi/TROUBLESHOOTING.md +19 -0
  70. package/.agents/core/skills/fastapi/VALIDATION.json +12 -0
  71. package/.agents/core/skills/fastapi/fastapi.md +112 -0
  72. package/.agents/core/skills/fastapi/skill.yaml +10 -0
  73. package/.agents/core/skills/gemini-precision/SKILL.md +169 -0
  74. package/.agents/core/skills/gemini-precision/VALIDATION.json +12 -0
  75. package/.agents/core/skills/gemini-precision/skill.yaml +9 -0
  76. package/.agents/core/skills/generators/EXAMPLES.md +19 -0
  77. package/.agents/core/skills/generators/SKILL.md +112 -0
  78. package/.agents/core/skills/generators/TROUBLESHOOTING.md +7 -0
  79. package/.agents/core/skills/generators/VALIDATION.json +12 -0
  80. package/.agents/core/skills/generators/skill.yaml +10 -0
  81. package/.agents/core/skills/generators/templates/API.md +77 -0
  82. package/.agents/core/skills/generators/templates/ARCHITECTURE.md +70 -0
  83. package/.agents/core/skills/generators/templates/DATABASE.md +42 -0
  84. package/.agents/core/skills/generators/templates/DECISION.md +46 -0
  85. package/.agents/core/skills/generators/templates/PRD.md +67 -0
  86. package/.agents/core/skills/generators/templates/PROJECT_GRAPH.md +56 -0
  87. package/.agents/core/skills/generators/templates/ROADMAP.md +51 -0
  88. package/.agents/core/skills/generators/templates/TASKS.md +43 -0
  89. package/.agents/core/skills/generators/templates/UI.md +73 -0
  90. package/.agents/core/skills/graphify/EXAMPLES.md +73 -0
  91. package/.agents/core/skills/graphify/SKILL.md +130 -0
  92. package/.agents/core/skills/graphify/VALIDATION.json +12 -0
  93. package/.agents/core/skills/graphify/skill.yaml +13 -0
  94. package/.agents/core/skills/gstack-roles/EXAMPLES.md +23 -0
  95. package/.agents/core/skills/gstack-roles/SKILL.md +152 -0
  96. package/.agents/core/skills/gstack-roles/TROUBLESHOOTING.md +13 -0
  97. package/.agents/core/skills/gstack-roles/VALIDATION.json +12 -0
  98. package/.agents/core/skills/gstack-roles/skill.yaml +12 -0
  99. package/.agents/core/skills/impeccable-design/EXAMPLES.md +26 -0
  100. package/.agents/core/skills/impeccable-design/SKILL.md +201 -0
  101. package/.agents/core/skills/impeccable-design/TROUBLESHOOTING.md +19 -0
  102. package/.agents/core/skills/impeccable-design/VALIDATION.json +12 -0
  103. package/.agents/core/skills/impeccable-design/skill.yaml +14 -0
  104. package/.agents/core/skills/interview-me/SKILL.md +97 -0
  105. package/.agents/core/skills/interview-me/VALIDATION.json +12 -0
  106. package/.agents/core/skills/interview-me/skill.yaml +8 -0
  107. package/.agents/core/skills/microservices/EXAMPLES.md +38 -0
  108. package/.agents/core/skills/microservices/SKILL.md +164 -0
  109. package/.agents/core/skills/microservices/TROUBLESHOOTING.md +19 -0
  110. package/.agents/core/skills/microservices/VALIDATION.json +12 -0
  111. package/.agents/core/skills/microservices/microservices.md +119 -0
  112. package/.agents/core/skills/microservices/skill.yaml +10 -0
  113. package/.agents/core/skills/minimalist-design/SKILL.md +113 -0
  114. package/.agents/core/skills/minimalist-design/VALIDATION.json +12 -0
  115. package/.agents/core/skills/minimalist-design/skill.yaml +8 -0
  116. package/.agents/core/skills/nestjs/EXAMPLES.md +40 -0
  117. package/.agents/core/skills/nestjs/SKILL.md +139 -0
  118. package/.agents/core/skills/nestjs/TROUBLESHOOTING.md +19 -0
  119. package/.agents/core/skills/nestjs/VALIDATION.json +12 -0
  120. package/.agents/core/skills/nestjs/nestjs.md +103 -0
  121. package/.agents/core/skills/nestjs/skill.yaml +10 -0
  122. package/.agents/core/skills/nextjs/EXAMPLES.md +40 -0
  123. package/.agents/core/skills/nextjs/SKILL.md +163 -0
  124. package/.agents/core/skills/nextjs/TROUBLESHOOTING.md +19 -0
  125. package/.agents/core/skills/nextjs/VALIDATION.json +12 -0
  126. package/.agents/core/skills/nextjs/nextjs.md +67 -0
  127. package/.agents/core/skills/nextjs/skill.yaml +10 -0
  128. package/.agents/core/skills/node/EXAMPLES.md +80 -0
  129. package/.agents/core/skills/node/SKILL.md +128 -0
  130. package/.agents/core/skills/node/TROUBLESHOOTING.md +19 -0
  131. package/.agents/core/skills/node/VALIDATION.json +12 -0
  132. package/.agents/core/skills/node/node.md +87 -0
  133. package/.agents/core/skills/node/skill.yaml +10 -0
  134. package/.agents/core/skills/performance/EXAMPLES.md +30 -0
  135. package/.agents/core/skills/performance/SKILL.md +75 -0
  136. package/.agents/core/skills/performance/TROUBLESHOOTING.md +19 -0
  137. package/.agents/core/skills/performance/VALIDATION.json +12 -0
  138. package/.agents/core/skills/performance/performance.md +52 -0
  139. package/.agents/core/skills/performance/skill.yaml +10 -0
  140. package/.agents/core/skills/ponytail-mindset/EXAMPLES.md +45 -0
  141. package/.agents/core/skills/ponytail-mindset/SKILL.md +193 -0
  142. package/.agents/core/skills/ponytail-mindset/TROUBLESHOOTING.md +19 -0
  143. package/.agents/core/skills/ponytail-mindset/VALIDATION.json +12 -0
  144. package/.agents/core/skills/ponytail-mindset/skill.yaml +14 -0
  145. package/.agents/core/skills/react/EXAMPLES.md +79 -0
  146. package/.agents/core/skills/react/SKILL.md +132 -0
  147. package/.agents/core/skills/react/TROUBLESHOOTING.md +19 -0
  148. package/.agents/core/skills/react/VALIDATION.json +12 -0
  149. package/.agents/core/skills/react/react.md +93 -0
  150. package/.agents/core/skills/react/skill.yaml +10 -0
  151. package/.agents/core/skills/react-best-practices/SKILL.md +155 -0
  152. package/.agents/core/skills/react-best-practices/VALIDATION.json +12 -0
  153. package/.agents/core/skills/react-best-practices/skill.yaml +10 -0
  154. package/.agents/core/skills/redesign-audit/SKILL.md +117 -0
  155. package/.agents/core/skills/redesign-audit/VALIDATION.json +12 -0
  156. package/.agents/core/skills/redesign-audit/skill.yaml +8 -0
  157. package/.agents/core/skills/security/EXAMPLES.md +64 -0
  158. package/.agents/core/skills/security/SKILL.md +158 -0
  159. package/.agents/core/skills/security/TROUBLESHOOTING.md +19 -0
  160. package/.agents/core/skills/security/VALIDATION.json +12 -0
  161. package/.agents/core/skills/security/security.md +106 -0
  162. package/.agents/core/skills/security/skill.yaml +10 -0
  163. package/.agents/core/skills/soft-design/SKILL.md +108 -0
  164. package/.agents/core/skills/soft-design/VALIDATION.json +12 -0
  165. package/.agents/core/skills/soft-design/skill.yaml +8 -0
  166. package/.agents/core/skills/state-management/EXAMPLES.md +56 -0
  167. package/.agents/core/skills/state-management/SKILL.md +48 -0
  168. package/.agents/core/skills/state-management/TROUBLESHOOTING.md +18 -0
  169. package/.agents/core/skills/state-management/VALIDATION.json +11 -0
  170. package/.agents/core/skills/state-management/skill.yaml +22 -0
  171. package/.agents/core/skills/subagent-orchestrator/SKILL.md +100 -0
  172. package/.agents/core/skills/subagent-orchestrator/VALIDATION.json +12 -0
  173. package/.agents/core/skills/subagent-orchestrator/skill.yaml +8 -0
  174. package/.agents/core/skills/system-design/EXAMPLES.md +75 -0
  175. package/.agents/core/skills/system-design/SKILL.md +419 -0
  176. package/.agents/core/skills/system-design/TROUBLESHOOTING.md +19 -0
  177. package/.agents/core/skills/system-design/VALIDATION.json +12 -0
  178. package/.agents/core/skills/system-design/skill.yaml +13 -0
  179. package/.agents/core/skills/system-design/system-design.md +112 -0
  180. package/.agents/core/skills/testing/EXAMPLES.md +71 -0
  181. package/.agents/core/skills/testing/SKILL.md +70 -0
  182. package/.agents/core/skills/testing/TROUBLESHOOTING.md +18 -0
  183. package/.agents/core/skills/testing/VALIDATION.json +11 -0
  184. package/.agents/core/skills/testing/skill.yaml +26 -0
  185. package/.agents/core/skills/typescript/EXAMPLES.md +64 -0
  186. package/.agents/core/skills/typescript/SKILL.md +112 -0
  187. package/.agents/core/skills/typescript/TROUBLESHOOTING.md +19 -0
  188. package/.agents/core/skills/typescript/VALIDATION.json +12 -0
  189. package/.agents/core/skills/typescript/skill.yaml +10 -0
  190. package/.agents/core/skills/typescript/typescript.md +71 -0
  191. package/.agents/core/skills/ui-design/EXAMPLES.md +21 -0
  192. package/.agents/core/skills/ui-design/SKILL.md +124 -0
  193. package/.agents/core/skills/ui-design/TROUBLESHOOTING.md +19 -0
  194. package/.agents/core/skills/ui-design/VALIDATION.json +12 -0
  195. package/.agents/core/skills/ui-design/skill.yaml +10 -0
  196. package/.agents/core/skills/ui-design/ui.md +88 -0
  197. package/.agents/core/skills/ui-ux-pro/EXAMPLES.md +62 -0
  198. package/.agents/core/skills/ui-ux-pro/SKILL.md +375 -0
  199. package/.agents/core/skills/ui-ux-pro/TROUBLESHOOTING.md +19 -0
  200. package/.agents/core/skills/ui-ux-pro/VALIDATION.json +12 -0
  201. package/.agents/core/skills/ui-ux-pro/skill.yaml +13 -0
  202. package/.agents/core/skills/ux-design/EXAMPLES.md +36 -0
  203. package/.agents/core/skills/ux-design/SKILL.md +116 -0
  204. package/.agents/core/skills/ux-design/TROUBLESHOOTING.md +19 -0
  205. package/.agents/core/skills/ux-design/VALIDATION.json +12 -0
  206. package/.agents/core/skills/ux-design/skill.yaml +10 -0
  207. package/.agents/core/skills/ux-design/ux.md +80 -0
  208. package/.agents/core/skills/vercel-optimize/SKILL.md +83 -0
  209. package/.agents/core/skills/vercel-optimize/VALIDATION.json +12 -0
  210. package/.agents/core/skills/vercel-optimize/skill.yaml +10 -0
  211. package/.agents/core/skills/web-accessibility/EXAMPLES.md +39 -0
  212. package/.agents/core/skills/web-accessibility/SKILL.md +170 -0
  213. package/.agents/core/skills/web-accessibility/TROUBLESHOOTING.md +19 -0
  214. package/.agents/core/skills/web-accessibility/VALIDATION.json +12 -0
  215. package/.agents/core/skills/web-accessibility/accessibility.md +63 -0
  216. package/.agents/core/skills/web-accessibility/skill.yaml +10 -0
  217. package/.agents/ctx.js +370 -0
  218. package/.agents/generated/claude/skills/adapters/SKILL.md +126 -0
  219. package/.agents/generated/claude/skills/architecture-diagrams/SKILL.md +101 -0
  220. package/.agents/generated/claude/skills/brutalist-design/SKILL.md +145 -0
  221. package/.agents/generated/claude/skills/context-manager/SKILL.md +147 -0
  222. package/.agents/generated/claude/skills/context-os/SKILL.md +191 -0
  223. package/.agents/generated/claude/skills/database/SKILL.md +191 -0
  224. package/.agents/generated/claude/skills/ddd/SKILL.md +305 -0
  225. package/.agents/generated/claude/skills/decisions/SKILL.md +134 -0
  226. package/.agents/generated/claude/skills/docker/SKILL.md +135 -0
  227. package/.agents/generated/claude/skills/engineering-workflow/SKILL.md +414 -0
  228. package/.agents/generated/claude/skills/fastapi/SKILL.md +200 -0
  229. package/.agents/generated/claude/skills/gemini-precision/SKILL.md +161 -0
  230. package/.agents/generated/claude/skills/generators/SKILL.md +133 -0
  231. package/.agents/generated/claude/skills/graphify/SKILL.md +198 -0
  232. package/.agents/generated/claude/skills/gstack-roles/SKILL.md +184 -0
  233. package/.agents/generated/claude/skills/impeccable-design/SKILL.md +241 -0
  234. package/.agents/generated/claude/skills/interview-me/SKILL.md +90 -0
  235. package/.agents/generated/claude/skills/microservices/SKILL.md +218 -0
  236. package/.agents/generated/claude/skills/minimalist-design/SKILL.md +108 -0
  237. package/.agents/generated/claude/skills/nestjs/SKILL.md +195 -0
  238. package/.agents/generated/claude/skills/nextjs/SKILL.md +219 -0
  239. package/.agents/generated/claude/skills/node/SKILL.md +224 -0
  240. package/.agents/generated/claude/skills/performance/SKILL.md +121 -0
  241. package/.agents/generated/claude/skills/ponytail-mindset/SKILL.md +252 -0
  242. package/.agents/generated/claude/skills/react/SKILL.md +227 -0
  243. package/.agents/generated/claude/skills/react-best-practices/SKILL.md +146 -0
  244. package/.agents/generated/claude/skills/redesign-audit/SKILL.md +112 -0
  245. package/.agents/generated/claude/skills/security/SKILL.md +237 -0
  246. package/.agents/generated/claude/skills/soft-design/SKILL.md +103 -0
  247. package/.agents/generated/claude/skills/state-management/SKILL.md +120 -0
  248. package/.agents/generated/claude/skills/subagent-orchestrator/SKILL.md +93 -0
  249. package/.agents/generated/claude/skills/system-design/SKILL.md +507 -0
  250. package/.agents/generated/claude/skills/testing/SKILL.md +157 -0
  251. package/.agents/generated/claude/skills/typescript/SKILL.md +192 -0
  252. package/.agents/generated/claude/skills/ui-design/SKILL.md +161 -0
  253. package/.agents/generated/claude/skills/ui-ux-pro/SKILL.md +451 -0
  254. package/.agents/generated/claude/skills/ux-design/SKILL.md +168 -0
  255. package/.agents/generated/claude/skills/vercel-optimize/SKILL.md +76 -0
  256. package/.agents/generated/claude/skills/web-accessibility/SKILL.md +225 -0
  257. package/.agents/generated/gemini/skills/adapters/SKILL.md +135 -0
  258. package/.agents/generated/gemini/skills/architecture-diagrams/SKILL.md +107 -0
  259. package/.agents/generated/gemini/skills/brutalist-design/SKILL.md +151 -0
  260. package/.agents/generated/gemini/skills/context-manager/SKILL.md +156 -0
  261. package/.agents/generated/gemini/skills/context-os/SKILL.md +200 -0
  262. package/.agents/generated/gemini/skills/database/SKILL.md +200 -0
  263. package/.agents/generated/gemini/skills/ddd/SKILL.md +314 -0
  264. package/.agents/generated/gemini/skills/decisions/SKILL.md +143 -0
  265. package/.agents/generated/gemini/skills/docker/SKILL.md +144 -0
  266. package/.agents/generated/gemini/skills/engineering-workflow/SKILL.md +423 -0
  267. package/.agents/generated/gemini/skills/fastapi/SKILL.md +209 -0
  268. package/.agents/generated/gemini/skills/gemini-precision/SKILL.md +167 -0
  269. package/.agents/generated/gemini/skills/generators/SKILL.md +142 -0
  270. package/.agents/generated/gemini/skills/graphify/SKILL.md +205 -0
  271. package/.agents/generated/gemini/skills/gstack-roles/SKILL.md +193 -0
  272. package/.agents/generated/gemini/skills/impeccable-design/SKILL.md +250 -0
  273. package/.agents/generated/gemini/skills/interview-me/SKILL.md +96 -0
  274. package/.agents/generated/gemini/skills/microservices/SKILL.md +227 -0
  275. package/.agents/generated/gemini/skills/minimalist-design/SKILL.md +114 -0
  276. package/.agents/generated/gemini/skills/nestjs/SKILL.md +204 -0
  277. package/.agents/generated/gemini/skills/nextjs/SKILL.md +298 -0
  278. package/.agents/generated/gemini/skills/node/SKILL.md +323 -0
  279. package/.agents/generated/gemini/skills/performance/SKILL.md +185 -0
  280. package/.agents/generated/gemini/skills/ponytail-mindset/SKILL.md +261 -0
  281. package/.agents/generated/gemini/skills/react/SKILL.md +332 -0
  282. package/.agents/generated/gemini/skills/react-best-practices/SKILL.md +152 -0
  283. package/.agents/generated/gemini/skills/redesign-audit/SKILL.md +118 -0
  284. package/.agents/generated/gemini/skills/security/SKILL.md +355 -0
  285. package/.agents/generated/gemini/skills/soft-design/SKILL.md +109 -0
  286. package/.agents/generated/gemini/skills/state-management/SKILL.md +129 -0
  287. package/.agents/generated/gemini/skills/subagent-orchestrator/SKILL.md +99 -0
  288. package/.agents/generated/gemini/skills/system-design/SKILL.md +631 -0
  289. package/.agents/generated/gemini/skills/testing/SKILL.md +166 -0
  290. package/.agents/generated/gemini/skills/typescript/SKILL.md +275 -0
  291. package/.agents/generated/gemini/skills/ui-design/SKILL.md +170 -0
  292. package/.agents/generated/gemini/skills/ui-ux-pro/SKILL.md +460 -0
  293. package/.agents/generated/gemini/skills/ux-design/SKILL.md +177 -0
  294. package/.agents/generated/gemini/skills/vercel-optimize/SKILL.md +82 -0
  295. package/.agents/generated/gemini/skills/web-accessibility/SKILL.md +300 -0
  296. package/.agents/mcp/runtime.py +454 -0
  297. package/.agents/mcp/server.mjs +189373 -0
  298. package/.agents/plugins.js +574 -0
  299. package/.agents/profiles.js +267 -0
  300. package/.agents/resolver.js +336 -0
  301. package/.agents/skills-index.json +200 -0
  302. package/.agents/skills.json +6 -0
  303. package/.agents/validate.js +500 -0
  304. package/LICENSE +21 -0
  305. package/README.md +415 -0
  306. package/benchmarks/gemini-issues.js +533 -0
  307. package/bin/index.js +458 -0
  308. package/package.json +70 -0
  309. package/registry.json +53 -0
  310. package/registry.schema.json +32 -0
@@ -0,0 +1,414 @@
1
+ # engineering-workflow
2
+
3
+ ## Overview
4
+
5
+ Systematic 6-phase engineering pipeline (DEFINE → PLAN → BUILD → VERIFY → REVIEW → SHIP) enforcing role declarations, atomic task execution, quality gates, regression prevention, and structured requirements elicitation.
6
+
7
+ ## When to Use
8
+
9
+ Activate on all project tasks to orchestrate structured development, spec definition, architectural planning, and verification gates.
10
+
11
+ ## Rules & Patterns
12
+
13
+ Inspired by [addyosmani/agent-skills](https://github.com/addyosmani/agent-skills) by Addy Osmani (Google Chrome) and [obra/superpowers](https://github.com/obra/superpowers).
14
+
15
+ ### Core Principle
16
+
17
+ > **A junior writes code immediately. A senior writes a spec first.**
18
+ > You are a senior. You never write code until the spec and plan are approved.
19
+
20
+ ---
21
+
22
+ ### The 6-Phase Development Pipeline
23
+
24
+ ```
25
+ DEFINE PLAN BUILD VERIFY REVIEW SHIP
26
+ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐
27
+ │ Idea │ ───▶ │ Spec │ ───▶ │ Code │ ───▶ │ Test │ ───▶ │ QA │ ───▶ │ Go │
28
+ │Refine│ │ PRD │ │ Impl │ │Debug │ │ Gate │ │ Live │
29
+ └──────┘ └──────┘ └──────┘ └──────┘ └──────┘ └──────┘
30
+ /spec /plan /build /test /review /ship
31
+
32
+ [ROLE: Product Manager] [ROLE: Architect] [ROLE: Senior Dev] [ROLE: QA Lead] [ROLE: Staff Eng] [ROLE: Release Eng]
33
+ ```
34
+
35
+ **IRON RULE**: In interactive development, no phase can be skipped and no code is written before `/plan` is approved.
36
+ **Direct Build Exception**: When the prompt/caller explicitly requests a standalone implementation, or declares `[PHASE: Build]`, execute the BUILD phase directly and deliver the complete, self-contained production code without conversational pauses.
37
+
38
+ ---
39
+
40
+ ### Phase 1: DEFINE — /spec
41
+
42
+ **Auto-activates → `[ROLE: Product Manager]`**
43
+
44
+ Turn vague intent into a precise, executable specification.
45
+
46
+ #### Step 1.1: The Interview Protocol (`interview-me`)
47
+
48
+ Before writing the spec, if there is ambiguity, high blast radius, or multiple architectural paths, stop and ask the user **one question at a time** (or up to 2 tightly coupled questions):
49
+
50
+ 1. **Clarify Business Intent**: What user problem are we solving? What is explicitly out of scope?
51
+ 2. **Clarify Constraints**: Runtime versions, database engines, performance bounds.
52
+ 3. **Clarify Edge Cases**: What happens on offline state, empty lists, unauthorized requests?
53
+
54
+ #### Step 1.2: Spec Template
55
+
56
+ ```markdown
57
+ ## Feature Spec: [Feature Name]
58
+
59
+ ### Why (Problem)
60
+ [What pain does this solve? Who has it? How often?]
61
+
62
+ ### Scope (What's In / Out)
63
+
64
+ **In-Scope**:
65
+ - [Specific item 1]
66
+ - [Specific item 2]
67
+
68
+ **Out-of-Scope**:
69
+ - [Thing we're NOT doing and why]
70
+
71
+ ### Technical Approach
72
+ [Read the relevant code. Understand what changes where.]
73
+ Files affected:
74
+ - `src/X.js` — [what changes]
75
+ - `src/Y.js` — [what changes]
76
+
77
+ ### Acceptance Criteria
78
+ - [ ] Given [context], when [action], then [result]
79
+ - [ ] Given [context], when [action], then [result]
80
+
81
+ ### Open Questions
82
+ - [Unresolved decision 1]
83
+ - [Unresolved decision 2]
84
+ ```
85
+
86
+ ---
87
+
88
+ ### Phase 2: PLAN — /plan
89
+
90
+ **Auto-activates → `[ROLE: Architect]`**
91
+
92
+ Break the spec into atomic, independently testable tasks.
93
+
94
+ #### Thin Vertical Slices (`incremental-implementation`)
95
+
96
+ Organize tasks as **Thin Vertical Slices** rather than horizontal layers:
97
+
98
+ - **Bad (Horizontal)**: Task 1: All DB migrations. Task 2: All API routes. Task 3: All UI components. (Nothing works until step 3).
99
+ - **Good (Vertical Slices)**: Slice 1: Minimal DB table + minimal API + minimal UI button end-to-end. Verify and commit. Slice 2: Add validation + edge cases. Slice 3: Polish UI & telemetry.
100
+
101
+ #### Plan Rules
102
+
103
+ - Each task must be **completable in < 2 hours** of focused work.
104
+ - Each task must be **independently testable**.
105
+ - Tasks must be **ordered by dependency** (blocking tasks first).
106
+ - Each task gets a **test requirement** — no task without a test.
107
+
108
+ #### Plan Template
109
+
110
+ ```markdown
111
+ ## Implementation Plan: [Feature Name]
112
+
113
+ ### Tasks
114
+
115
+ **Task 1: [Slice 1 Name]** (est. 30min)
116
+ - What: [Specific implementation detail]
117
+ - Files: [file1.js, file2.js]
118
+ - Test: [How will you verify this works?]
119
+ - Blocked by: [nothing / Task N]
120
+
121
+ **Task 2: [Slice 2 Name]** (est. 45min)
122
+ - What: [Specific implementation detail]
123
+ - Files: [file3.js]
124
+ - Test: [Test description]
125
+ - Blocked by: Task 1
126
+
127
+ ### Risk Assessment
128
+ - [Risk 1]: [Mitigation]
129
+ - [Risk 2]: [Mitigation]
130
+
131
+ ### STOP — Awaiting Approval
132
+ Do not proceed to BUILD until this plan is approved.
133
+ ```
134
+
135
+ ---
136
+
137
+ ### Phase 3: BUILD — /build
138
+
139
+ **Auto-activates → `[ROLE: Senior Developer]`**
140
+
141
+ Implement one task at a time. Commit after each task.
142
+
143
+ #### Build Rules
144
+
145
+ 1. **One task per commit** — atomic, descriptive commit messages.
146
+ 2. **Write the test FIRST** (TDD — red-green-refactor).
147
+ 3. **No dead code** — if it's not tested, it's not shipped.
148
+ 4. **No TODOs in committed code** — resolve or create a tracked issue.
149
+ 5. **Read before writing** — understand the surrounding code before changing it.
150
+ 6. **Limit the blast radius** — modify ONLY the files explicitly listed in the current task's plan. Do NOT rewrite adjacent components, hooks, or utilities unless strictly required AND approved.
151
+
152
+ #### Commit Message Format
153
+
154
+ ```text
155
+ type(scope): short description (max 72 chars)
156
+
157
+ - Detail 1
158
+ - Detail 2
159
+
160
+ Refs: #issue-number
161
+ ```
162
+
163
+ Types: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`
164
+
165
+ ---
166
+
167
+ ### Phase 4: VERIFY — /test
168
+
169
+ **Auto-activates → `[ROLE: QA Lead]`**
170
+
171
+ Tests are proof, not an afterthought.
172
+
173
+ #### Test Strategy by Code Type
174
+
175
+ **Logic & Services (TDD)**:
176
+
177
+ ```text
178
+ 1. RED: Write a failing test for the next small behavior
179
+ 2. GREEN: Write the minimum code to make it pass
180
+ 3. REFACTOR: Clean up without breaking tests
181
+ 4. REPEAT
182
+ ```
183
+
184
+ **UI Components & User Flows (BDD)**:
185
+
186
+ For complex React components, prioritize testing _user behavior_ over internal state:
187
+
188
+ - Use **React Testing Library** (`userEvent`, `screen.getByRole`) — test what the user sees.
189
+ - Use **Playwright** for critical user flows (login, checkout, form submit).
190
+ - Do NOT test implementation details (internal state, private methods, component structure).
191
+ - Focus on: "When user clicks X, does Y appear?" not "Does `useState` hold the right value?"
192
+
193
+ ```tsx
194
+ // [GOOD] BDD: Test behavior
195
+ test("shows error when email is invalid", async () => {
196
+ render(<LoginForm />);
197
+ await userEvent.type(screen.getByLabelText("Email"), "not-an-email");
198
+ await userEvent.click(screen.getByRole("button", { name: /sign in/i }));
199
+ expect(screen.getByText(/invalid email/i)).toBeInTheDocument();
200
+ });
201
+ ```
202
+
203
+ #### Test Quality Gates
204
+
205
+ Before moving to Review, verify:
206
+
207
+ - [ ] All new code has tests
208
+ - [ ] Tests are meaningful (not just coverage theater)
209
+ - [ ] Edge cases are covered (null, empty, overflow, unauthorized)
210
+ - [ ] Tests fail when the implementation is broken (anti-regression)
211
+ - [ ] Test names are readable: `it("returns 404 when user not found")`
212
+
213
+ ---
214
+
215
+ ### Phase 5: REVIEW — /review
216
+
217
+ **Auto-activates → `[ROLE: Staff Engineer]` + `[ROLE: Senior Designer]` for UI tasks**
218
+
219
+ Review before merging. Always.
220
+
221
+ #### Subagent / Peer Code Review Protocol
222
+
223
+ Inspired by [obra/superpowers](https://github.com/obra/superpowers):
224
+
225
+ 1. **Self-Review First**: The implementer runs git diff and verifies against the original acceptance criteria.
226
+ 2. **Review Checklist**:
227
+ - **Correctness**: Does it do what the spec says? Are all criteria met?
228
+ - **Architecture**: Single Responsibility, DRY without premature abstraction, no business logic in API routes.
229
+ - **Security**: No secrets hardcoded, inputs validated via Zod/schemas, auth checked before data access.
230
+ - **Performance**: No N+1 queries, expensive operations cached, sets paginated.
231
+ - **Design**: If UI, passes `impeccable-design` quick audit (typography, colors, spacing, animations).
232
+
233
+ ---
234
+
235
+ ### Phase 5.5: SIMPLIFY — /simplify
236
+
237
+ **Auto-activates → `[ROLE: Staff Engineer]` (Ponytail Mindset)**
238
+
239
+ Before merging, ruthlessly simplify:
240
+
241
+ 1. Did we introduce abstractions that are only used once? (Inline them).
242
+ 2. Can 3 lines of standard JavaScript replace a 50-line custom utility?
243
+ 3. Is any configuration or generic handler premature? (YAGNI).
244
+ 4. Is the code obvious to a mid-level engineer without reading a documentation manual?
245
+
246
+ ---
247
+
248
+ ### Phase 6: SHIP — /ship
249
+
250
+ **Auto-activates → `[ROLE: Release Engineer]`**
251
+
252
+ Only ship when all gates are green.
253
+
254
+ #### Pre-Ship Checklist
255
+
256
+ - [ ] All tests pass in CI
257
+ - [ ] No lint errors
258
+ - [ ] Feature works in staging environment
259
+ - [ ] Docs updated (README, API docs, changelogs)
260
+ - [ ] Breaking changes documented
261
+ - [ ] Rollback plan exists
262
+ - [ ] Vercel Preview Deployment is successful and manually verified
263
+ - [ ] Core Web Vitals pass in preview (LCP < 2.5s, CLS < 0.1, INP < 200ms)
264
+
265
+ #### Operational Self-Improvement
266
+
267
+ Before completing a workflow, review the session for durable learnings. Write them to `.agents/learnings.md`. If no durable learning occurred, state "No durable learnings this session" in your final output.
268
+
269
+ ---
270
+
271
+ ## Code Examples
272
+
273
+ ### Vertical Slice Example
274
+
275
+ ```javascript
276
+ // Slice 1: Minimal functional endpoint
277
+ // POST /api/v1/projects -> creates project with basic validation
278
+ import { z } from 'zod';
279
+ import { projectService } from '@/services/project';
280
+
281
+ const CreateProjectSchema = z.object({
282
+ name: z.string().min(1).max(100),
283
+ description: z.string().optional()
284
+ });
285
+
286
+ export async function POST(req) {
287
+ const session = await auth();
288
+ if (!session?.userId) return Response.json({ error: 'Unauthorized' }, { status: 401 });
289
+
290
+ const body = await req.json();
291
+ const parsed = CreateProjectSchema.parse(body);
292
+ const project = await projectService.create({ ...parsed, userId: session.userId });
293
+
294
+ return Response.json(project, { status: 201 });
295
+ }
296
+ ```
297
+
298
+ ---
299
+
300
+ ## Validation Checklist
301
+
302
+ - [ ] Specification exists with clear In-Scope and Out-of-Scope boundaries.
303
+ - [ ] Implementation plan broken down into vertical tasks < 2 hours each.
304
+ - [ ] Tests written before implementation (TDD/BDD).
305
+ - [ ] Code reviewed against correctness, security, performance, and design gates.
306
+ - [ ] Simplification ladder executed before shipping.
307
+
308
+ ---
309
+
310
+ ## Common Mistakes
311
+
312
+ - **Writing code before approval**: Skipping `/spec` or `/plan` in interactive sessions.
313
+ - **Horizontal task splitting**: Building all DB models first without verifying end-to-end integration.
314
+ - **Premature refactoring**: Changing unrelated adjacent code during a feature task.
315
+ - **Ignoring non-happy paths**: Testing only 200 OK responses while ignoring 400, 401, 404, 500 scenarios.
316
+
317
+ ---
318
+
319
+ ## Integration Notes
320
+
321
+ - Integrates with `gstack-roles` for automated role switching across all 6 phases.
322
+ - Triggers `ponytail-mindset` during the BUILD and SIMPLIFY phases.
323
+ - Hands off to `impeccable-design` for UI quality review.
324
+ - Coordinates with `security` during Phase 5 for pre-merge compliance.
325
+
326
+ ---
327
+
328
+ ## Completion Status Protocol
329
+
330
+ When completing a task or workflow, you must explicitly report your final status as the last part of your output:
331
+
332
+ - **DONE** — completed with evidence.
333
+ - **DONE_WITH_CONCERNS** — completed, but list concerns.
334
+ - **BLOCKED** — cannot proceed; state blocker and what was tried.
335
+ - **NEEDS_CONTEXT** — missing info; state exactly what is needed.
336
+
337
+
338
+ # engineering-workflow Examples — Anti-patterns vs ContextOS Standard
339
+
340
+ ## Example 1: Handling a New Feature Request
341
+
342
+ ### Anti-pattern: Jumping Straight to Code
343
+
344
+ ```text
345
+ User: "Add a user referral system."
346
+ Agent: Immediately creates src/referral.js, starts writing database queries, guesses schema,
347
+ and misses requirements like rate limiting, expiry dates, and fraud prevention.
348
+ ```
349
+
350
+ ### Best practice: ContextOS Standard (DEFINE -> PLAN -> BUILD)
351
+
352
+ ```markdown
353
+ [DOMAIN: Full-Stack] [PHASE: Define] [ROLE: Product Manager]
354
+ Skills loaded: engineering-workflow, interview-me
355
+
356
+ ## Feature Spec: User Referral System
357
+ ### Why (Problem)
358
+ Increase user acquisition through organic word-of-mouth incentives.
359
+
360
+ ### Scope
361
+ In-Scope:
362
+ - Unique referral code generation per registered user
363
+ - Referral code attribution on signup
364
+ - Credit reward trigger after first completed purchase
365
+ Out-of-Scope:
366
+ - Multi-tier MLM rewards
367
+ - Cash payout integrations
368
+
369
+ ### Acceptance Criteria
370
+ - [ ] Given a registered user, when visiting /referrals, then unique code is displayed.
371
+ - [ ] Given a new user with code, when signing up, then referrer_id is stored with status 'pending'.
372
+ ```
373
+
374
+ ---
375
+
376
+ ## Example 2: Atomic Task Execution in PLAN Phase
377
+
378
+ ### Anti-pattern: Monolithic Mega-Task
379
+
380
+ ```text
381
+ Task: "Implement entire referral system end-to-end in one shot."
382
+ Result: 15 files modified simultaneously, uncompilable intermediate state, untestable diff.
383
+ ```
384
+
385
+ ### Best practice: ContextOS Standard (Atomic Tasks with Test Gate)
386
+
387
+ ```markdown
388
+ [DOMAIN: Full-Stack] [PHASE: Plan] [ROLE: Architect]
389
+ Atomic Tasks:
390
+ 1. Database migration: referrals and referral_rewards tables + indexes. (Test: Migration rollback & apply)
391
+ 2. Domain service: ReferralService.createCode() and ReferralService.claimCode(). (Test: Unit tests)
392
+ 3. API route: POST /api/referrals/claim with Zod validation. (Test: Supertest integration)
393
+ 4. UI component: <ReferralCard /> with copy button. (Test: RTL component test)
394
+ ```
395
+
396
+ # engineering-workflow Troubleshooting & Common Mistakes
397
+
398
+ ## 1. Premature Code Generation
399
+
400
+ - **Symptom**: Agent starts spitting out code blocks while the user is still clarifying requirements.
401
+ - **Root Cause**: Failure to enforce the IRON RULE of Phase 1 (DEFINE) and Phase 2 (PLAN).
402
+ - **Fix**: Halt code output immediately. Announce `[PHASE: Define]` or `[PHASE: Plan]` and provide the structured spec or task breakdown for user sign-off.
403
+
404
+ ## 2. Blast Radius Creep
405
+
406
+ - **Symptom**: A simple bugfix in one module modifies 8 unrelated configuration and styling files.
407
+ - **Root Cause**: Missing isolation boundaries and speculative cleanup.
408
+ - **Fix**: Restrict edits strictly to files explicitly declared in the current atomic task's plan.
409
+
410
+ ## 3. Unverified Claims of Completion
411
+
412
+ - **Symptom**: Agent reports "Task complete! Everything is working" without running tests or builds.
413
+ - **Root Cause**: Skipping Phase 4 (VERIFY).
414
+ - **Fix**: Always execute tests (`npm test`, validator, compiler) and quote actual terminal exit codes and outputs before declaring completion.
@@ -0,0 +1,200 @@
1
+ # FastAPI
2
+
3
+ ## Overview
4
+
5
+ High-performance Python backend engineering using FastAPI, Pydantic v2, and async SQLAlchemy/Tortoise ORM. Enforces type-driven request validation, OpenAPI contracts, and async non-blocking endpoints.
6
+
7
+ ## When to Use
8
+
9
+ Activate when building Python REST APIs, microservices, asynchronous background jobs, or integrating Python ML services into web backends.
10
+
11
+ ## Rules & Patterns
12
+ <!-- Source: fastapi.md -->
13
+
14
+ ## FastAPI — Best Practices
15
+
16
+ ## Project Structure
17
+
18
+ ```
19
+ app/
20
+ ├── main.py # App entry, CORS, middleware
21
+ ├── config.py # Settings with Pydantic BaseSettings
22
+ ├── database.py # Database session, engine
23
+ ├── models/ # SQLAlchemy models
24
+ │ ├── __init__.py
25
+ │ └── user.py
26
+ ├── schemas/ # Pydantic schemas (request/response)
27
+ │ ├── __init__.py
28
+ │ └── user.py
29
+ ├── api/ # Route handlers
30
+ │ ├── __init__.py
31
+ │ ├── deps.py # Dependency injection
32
+ │ └── v1/
33
+ │ ├── __init__.py
34
+ │ └── users.py
35
+ ├── services/ # Business logic
36
+ │ └── user_service.py
37
+ ├── repositories/ # Database access
38
+ │ └── user_repo.py
39
+ └── tests/
40
+ └── test_users.py
41
+ ```
42
+
43
+ ## Pydantic Models
44
+
45
+ ```python
46
+ from pydantic import BaseModel, EmailStr, Field
47
+
48
+ class UserCreate(BaseModel):
49
+ email: EmailStr
50
+ name: str = Field(..., min_length=1, max_length=100)
51
+
52
+ class UserResponse(BaseModel):
53
+ id: int
54
+ email: str
55
+ name: str
56
+
57
+ model_config = ConfigDict(from_attributes=True)
58
+ ```
59
+
60
+ ## Dependency Injection
61
+
62
+ ```python
63
+ from fastapi import Depends
64
+ from sqlalchemy.ext.asyncio import AsyncSession
65
+
66
+ async def get_db() -> AsyncGenerator[AsyncSession, None]:
67
+ async with async_session() as session:
68
+ yield session
69
+
70
+ async def get_current_user(
71
+ token: str = Depends(oauth2_scheme),
72
+ db: AsyncSession = Depends(get_db)
73
+ ) -> User:
74
+ # Verify token, return user
75
+ ...
76
+ ```
77
+
78
+ ## Async
79
+
80
+ - **Use async** for all I/O operations (database, HTTP calls, file I/O)
81
+ - **Never block the event loop** — no sync I/O in async endpoints
82
+ - **Use `asyncio.gather`** for parallel async operations
83
+ - **Background tasks** — `BackgroundTasks` for non-critical work
84
+
85
+ ## Error Handling
86
+
87
+ ```python
88
+ from fastapi import HTTPException
89
+
90
+ class AppException(HTTPException):
91
+ def __init__(self, status_code: int, detail: str, code: str):
92
+ super().__init__(status_code=status_code, detail=detail)
93
+ self.code = code
94
+ ```
95
+
96
+ ## Security
97
+
98
+ - **OAuth2 with JWT** — use `python-jose`
99
+ - **Password hashing** — bcrypt via `passlib`
100
+ - **CORS** — configure explicitly
101
+ - **Rate limiting** — use `slowapi`
102
+ - **Input validation** — Pydantic handles this automatically
103
+
104
+ ## Testing
105
+
106
+ ```python
107
+ import pytest
108
+ from httpx import AsyncClient
109
+
110
+ @pytest.mark.asyncio
111
+ async def test_create_user(client: AsyncClient):
112
+ response = await client.post("/api/v1/users", json={
113
+ "email": "test@example.com",
114
+ "name": "Test User"
115
+ })
116
+ assert response.status_code == 201
117
+ ```
118
+
119
+ ## Anti-Patterns
120
+
121
+ - [FAIL] Business logic in route handlers — use services
122
+ - [FAIL] Raw SQL without ORM — use SQLAlchemy
123
+ - [FAIL] Sync database calls — use async drivers
124
+ - [FAIL] Hardcoded settings — use Pydantic BaseSettings
125
+ - [FAIL] No schema validation — always use Pydantic models
126
+
127
+
128
+ ## Code Examples
129
+
130
+ See `EXAMPLES.md` for detailed code examples.
131
+
132
+ ## Validation Checklist
133
+
134
+ What to verify during the review phase before completing the task.
135
+
136
+ ## Common Mistakes
137
+
138
+ Anti-patterns and things to explicitly avoid. See `TROUBLESHOOTING.md`.
139
+
140
+ ## Integration Notes
141
+
142
+ How this skill interacts with other skills.
143
+
144
+
145
+ # fastapi Examples — Anti-patterns vs ContextOS Standard
146
+
147
+ ## Example 1: Asynchronous Route Handlers
148
+
149
+ ### Anti-pattern: Blocking I/O inside `async def`
150
+
151
+ ```python
152
+ # BAD: time.sleep or synchronous requests blocks the entire asyncio event loop!
153
+ import time
154
+ import requests
155
+
156
+ @app.get("/slow")
157
+ async def slow_route():
158
+ time.sleep(5) # BLOCKS ALL CONCURRENT USERS!
159
+ return {"status": "done"}
160
+ ```
161
+
162
+ ### Best practice: ContextOS Standard (Non-blocking Async or Def Offload)
163
+
164
+ ```python
165
+ # GOOD: Use async non-blocking client (httpx) or standard def for sync CPU work
166
+ import asyncio
167
+ import httpx
168
+
169
+ @app.get("/fast")
170
+ async def fast_route():
171
+ async with httpx.AsyncClient() as client:
172
+ response = await client.get("https://api.example.com/data")
173
+ return response.json()
174
+
175
+ # Or standard def (FastAPI automatically runs it in a background threadpool):
176
+ @app.get("/sync-worker")
177
+ def sync_worker():
178
+ time.sleep(5) # Runs in worker thread without blocking event loop
179
+ return {"status": "done"}
180
+ ```
181
+
182
+ # fastapi Troubleshooting & Common Mistakes
183
+
184
+ ## 1. Pydantic v1 vs v2 Deprecations
185
+
186
+ - **Symptom**: Warnings or crashes regarding @validator or .dict() methods.
187
+ - **Root Cause**: FastAPI projects upgrading to Pydantic v2.
188
+ - **Fix**: Use @field_validator instead of @validator, and .model_dump() instead of .dict().
189
+
190
+ ## 2. Database Session Leaks
191
+
192
+ - **Symptom**: Database pool runs out of connections after a few requests.
193
+ - **Root Cause**: Database sessions opened manually without proper try...finally or dependency injection.
194
+ - **Fix**: Always provide database sessions via Depends(get_db) with a yield block.
195
+
196
+ ## 3. Unhandled Validation Errors Returning Inconsistent JSON
197
+
198
+ - **Symptom**: Frontend receives raw 422 arrays without matching standard API error response envelope.
199
+ - **Root Cause**: Missing custom RequestValidationError handler.
200
+ - **Fix**: Register an app-level exception handler for RequestValidationError that normalizes error shapes.