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,56 @@
1
+ # Docker Examples — Anti-patterns vs ContextOS Standard
2
+
3
+ ## Example 1: Multi-Stage Build & Layer Caching
4
+
5
+ ### Anti-pattern: Anti-pattern (Fat single-stage image running as root)
6
+
7
+ ```dockerfile
8
+ # BAD: 1.2GB image, runs as root, breaks caching on every file edit
9
+ FROM node:latest
10
+ WORKDIR /app
11
+ COPY . .
12
+ RUN npm install
13
+ RUN npm run build
14
+ EXPOSE 3000
15
+ CMD ["npm", "start"]
16
+ ```
17
+
18
+ ### Best practice: ContextOS Standard (Slim multi-stage build with non-root user)
19
+
20
+ ```dockerfile
21
+ # GOOD: 95MB image, non-root user, optimized layer caching
22
+ FROM node:20.12.2-alpine3.19 AS builder
23
+ WORKDIR /app
24
+ COPY package.json package-lock.json ./
25
+ RUN npm ci
26
+ COPY . .
27
+ RUN npm run build && npm prune --production
28
+
29
+ FROM node:20.12.2-alpine3.19 AS runner
30
+ WORKDIR /app
31
+ ENV NODE_ENV=production
32
+ RUN addgroup -S -g 1001 appgroup && adduser -S -u 1001 appuser -G appgroup
33
+ COPY --from=builder --chown=appuser:appgroup /app/dist ./dist
34
+ COPY --from=builder --chown=appuser:appgroup /app/node_modules ./node_modules
35
+ USER appuser
36
+ CMD ["node", "dist/main.js"]
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Example 2: Docker Ignore File (`.dockerignore`)
42
+
43
+ ### Best practice: ContextOS Standard `.dockerignore`
44
+
45
+ ```gitignore
46
+ node_modules
47
+ npm-debug.log
48
+ .git
49
+ .gitignore
50
+ .env
51
+ .env.*
52
+ dist
53
+ coverage
54
+ .DS_Store
55
+ *.md
56
+ ```
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: docker
3
+ description: Docker containerization, multi-stage builds, non-root security, layer caching optimization, and docker-compose standards.
4
+ ---
5
+
6
+ # Docker
7
+
8
+ ## Overview
9
+
10
+ Containerization, Dockerfile architecture, security best practices, and container orchestration for production workloads.
11
+
12
+ ## When to Use
13
+
14
+ Activate when creating or optimizing Dockerfiles, docker-compose configurations, container security audits, or CI/CD container builds.
15
+
16
+ ## Rules & Patterns
17
+
18
+ ### Negative Constraints (What NOT to Do)
19
+
20
+ 1. **NEVER run containers as `root` in production**: Always create and switch to an unprivileged non-root user (e.g. `USER node` or `USER nonroot`).
21
+ 2. **NEVER use the `latest` tag**: Always pin base images to specific immutable version digests or explicit minor tags (e.g. `node:20.12.2-alpine3.19`).
22
+ 3. **NEVER copy source code before `package.json`**: Always copy lockfiles and install dependencies first to leverage Docker's layer caching.
23
+ 4. **NEVER bake secrets, API keys, or `.env` files into image layers**: Pass secrets via build-time secret mounts (`--mount=type=secret`) or runtime environment variables.
24
+ 5. **NEVER include build tools or devDependencies in the final runner image**: Always use multi-stage builds to discard compilers and package managers from production images.
25
+
26
+ ### Multi-Stage Standard Pattern
27
+
28
+ ```dockerfile
29
+ FROM node:20.12.2-alpine3.19 AS builder
30
+ WORKDIR /app
31
+ COPY package.json package-lock.json ./
32
+ RUN npm ci
33
+ COPY . .
34
+ RUN npm run build && npm prune --production
35
+
36
+ FROM node:20.12.2-alpine3.19 AS runner
37
+ WORKDIR /app
38
+ ENV NODE_ENV=production
39
+ RUN addgroup -S -g 1001 appgroup && adduser -S -u 1001 appuser -G appgroup
40
+ COPY --from=builder --chown=appuser:appgroup /app/dist ./dist
41
+ COPY --from=builder --chown=appuser:appgroup /app/node_modules ./node_modules
42
+ USER appuser
43
+ CMD ["node", "dist/index.js"]
44
+ ```
45
+
46
+ ## Code Examples
47
+
48
+ See `EXAMPLES.md` for production Dockerfiles and dockerignore patterns.
49
+
50
+ ## Validation Checklist
51
+
52
+ - [ ] Multi-stage build separates build tools from runtime
53
+ - [ ] Non-root `USER` directive active in final stage
54
+ - [ ] Base images pinned to exact versions
55
+ - [ ] `.dockerignore` file prevents leaking node_modules or secrets
56
+
57
+ ## Common Mistakes
58
+
59
+ - Copying entire workspace before `npm ci`, breaking Docker cache. See `TROUBLESHOOTING.md`.
60
+
61
+ ## Integration Notes
62
+
63
+ Interacts with `security` (container hardening) and `node` / `nextjs` / `fastapi`.
@@ -0,0 +1,18 @@
1
+ # Docker Troubleshooting Guide
2
+
3
+ ## Common Issues & Fixes
4
+
5
+ ### 1. Slow Docker builds rebuilding node_modules every time
6
+
7
+ - **Cause**: Copying the entire directory (`COPY . .`) before running `npm ci`.
8
+ - **Fix**: Copy `package.json` and `package-lock.json` separately first, run `npm ci`, and only then copy application source code.
9
+
10
+ ### 2. Permission Denied Errors with Non-Root Users
11
+
12
+ - **Cause**: Files copied from builder without changing ownership.
13
+ - **Fix**: Always use `--chown=appuser:appgroup` when copying files in Dockerfile.
14
+
15
+ ### 3. Missing native build dependencies on Alpine Linux
16
+
17
+ - **Cause**: Packages requiring C bindings (e.g. `sharp`, `bcrypt`) fail on musl libc.
18
+ - **Fix**: Add `RUN apk add --no-cache libc6-compat python3 make g++` in the builder stage.
@@ -0,0 +1,11 @@
1
+ {
2
+ "skill": "docker",
3
+ "version": "1.0.0",
4
+ "checks": [
5
+ "Multi-stage Dockerfile architecture",
6
+ "Non-root USER directive present",
7
+ "Layer caching optimization (lockfiles copied first)",
8
+ "Specific image version tags (no :latest)",
9
+ ".dockerignore excludes node_modules and secrets"
10
+ ]
11
+ }
@@ -0,0 +1,23 @@
1
+ name: docker
2
+ description: Docker containerization, multi-stage builds, non-root security, layer caching optimization, and docker-compose standards.
3
+ version: 1.0.0
4
+ category: devops
5
+ requires:
6
+ - security
7
+ triggers:
8
+ files:
9
+ - "Dockerfile"
10
+ - "Dockerfile.*"
11
+ - "docker-compose.yml"
12
+ - "docker-compose.yaml"
13
+ - "compose.yml"
14
+ - "compose.yaml"
15
+ - ".dockerignore"
16
+ keywords:
17
+ - "docker"
18
+ - "dockerfile"
19
+ - "container"
20
+ - "docker-compose"
21
+ - "image"
22
+ - "kubernetes"
23
+ - "k8s"
@@ -0,0 +1,57 @@
1
+ # engineering-workflow Examples — Anti-patterns vs ContextOS Standard
2
+
3
+ ## Example 1: Handling a New Feature Request
4
+
5
+ ### Anti-pattern: Jumping Straight to Code
6
+
7
+ ```text
8
+ User: "Add a user referral system."
9
+ Agent: Immediately creates src/referral.js, starts writing database queries, guesses schema,
10
+ and misses requirements like rate limiting, expiry dates, and fraud prevention.
11
+ ```
12
+
13
+ ### Best practice: ContextOS Standard (DEFINE -> PLAN -> BUILD)
14
+
15
+ ```markdown
16
+ [DOMAIN: Full-Stack] [PHASE: Define] [ROLE: Product Manager]
17
+ Skills loaded: engineering-workflow, interview-me
18
+
19
+ ## Feature Spec: User Referral System
20
+ ### Why (Problem)
21
+ Increase user acquisition through organic word-of-mouth incentives.
22
+
23
+ ### Scope
24
+ In-Scope:
25
+ - Unique referral code generation per registered user
26
+ - Referral code attribution on signup
27
+ - Credit reward trigger after first completed purchase
28
+ Out-of-Scope:
29
+ - Multi-tier MLM rewards
30
+ - Cash payout integrations
31
+
32
+ ### Acceptance Criteria
33
+ - [ ] Given a registered user, when visiting /referrals, then unique code is displayed.
34
+ - [ ] Given a new user with code, when signing up, then referrer_id is stored with status 'pending'.
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Example 2: Atomic Task Execution in PLAN Phase
40
+
41
+ ### Anti-pattern: Monolithic Mega-Task
42
+
43
+ ```text
44
+ Task: "Implement entire referral system end-to-end in one shot."
45
+ Result: 15 files modified simultaneously, uncompilable intermediate state, untestable diff.
46
+ ```
47
+
48
+ ### Best practice: ContextOS Standard (Atomic Tasks with Test Gate)
49
+
50
+ ```markdown
51
+ [DOMAIN: Full-Stack] [PHASE: Plan] [ROLE: Architect]
52
+ Atomic Tasks:
53
+ 1. Database migration: referrals and referral_rewards tables + indexes. (Test: Migration rollback & apply)
54
+ 2. Domain service: ReferralService.createCode() and ReferralService.claimCode(). (Test: Unit tests)
55
+ 3. API route: POST /api/referrals/claim with Zod validation. (Test: Supertest integration)
56
+ 4. UI component: <ReferralCard /> with copy button. (Test: RTL component test)
57
+ ```
@@ -0,0 +1,343 @@
1
+ ---
2
+ name: engineering-workflow
3
+ description: >
4
+ Senior engineering workflow skill. Enforces spec → plan → build → test → review → ship.
5
+ AI never writes code before a spec and plan are approved. Acts like a senior, not a junior.
6
+ Integrated with gstack-roles for automatic role activation per phase.
7
+ ---
8
+
9
+ # engineering-workflow
10
+
11
+ ## Overview
12
+
13
+ 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.
14
+
15
+ ## When to Use
16
+
17
+ Activate on all project tasks to orchestrate structured development, spec definition, architectural planning, and verification gates.
18
+
19
+ ## Rules & Patterns
20
+
21
+ Inspired by [addyosmani/agent-skills](https://github.com/addyosmani/agent-skills) by Addy Osmani (Google Chrome) and [obra/superpowers](https://github.com/obra/superpowers).
22
+
23
+ ### Core Principle
24
+
25
+ > **A junior writes code immediately. A senior writes a spec first.**
26
+ > You are a senior. You never write code until the spec and plan are approved.
27
+
28
+ ---
29
+
30
+ ### The 6-Phase Development Pipeline
31
+
32
+ ```
33
+ DEFINE PLAN BUILD VERIFY REVIEW SHIP
34
+ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐
35
+ │ Idea │ ───▶ │ Spec │ ───▶ │ Code │ ───▶ │ Test │ ───▶ │ QA │ ───▶ │ Go │
36
+ │Refine│ │ PRD │ │ Impl │ │Debug │ │ Gate │ │ Live │
37
+ └──────┘ └──────┘ └──────┘ └──────┘ └──────┘ └──────┘
38
+ /spec /plan /build /test /review /ship
39
+
40
+ [ROLE: Product Manager] [ROLE: Architect] [ROLE: Senior Dev] [ROLE: QA Lead] [ROLE: Staff Eng] [ROLE: Release Eng]
41
+ ```
42
+
43
+ **IRON RULE**: In interactive development, no phase can be skipped and no code is written before `/plan` is approved.
44
+ **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.
45
+
46
+ ---
47
+
48
+ ### Phase 1: DEFINE — /spec
49
+
50
+ **Auto-activates → `[ROLE: Product Manager]`**
51
+
52
+ Turn vague intent into a precise, executable specification.
53
+
54
+ #### Step 1.1: The Interview Protocol (`interview-me`)
55
+
56
+ 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):
57
+
58
+ 1. **Clarify Business Intent**: What user problem are we solving? What is explicitly out of scope?
59
+ 2. **Clarify Constraints**: Runtime versions, database engines, performance bounds.
60
+ 3. **Clarify Edge Cases**: What happens on offline state, empty lists, unauthorized requests?
61
+
62
+ #### Step 1.2: Spec Template
63
+
64
+ ```markdown
65
+ ## Feature Spec: [Feature Name]
66
+
67
+ ### Why (Problem)
68
+ [What pain does this solve? Who has it? How often?]
69
+
70
+ ### Scope (What's In / Out)
71
+
72
+ **In-Scope**:
73
+ - [Specific item 1]
74
+ - [Specific item 2]
75
+
76
+ **Out-of-Scope**:
77
+ - [Thing we're NOT doing and why]
78
+
79
+ ### Technical Approach
80
+ [Read the relevant code. Understand what changes where.]
81
+ Files affected:
82
+ - `src/X.js` — [what changes]
83
+ - `src/Y.js` — [what changes]
84
+
85
+ ### Acceptance Criteria
86
+ - [ ] Given [context], when [action], then [result]
87
+ - [ ] Given [context], when [action], then [result]
88
+
89
+ ### Open Questions
90
+ - [Unresolved decision 1]
91
+ - [Unresolved decision 2]
92
+ ```
93
+
94
+ ---
95
+
96
+ ### Phase 2: PLAN — /plan
97
+
98
+ **Auto-activates → `[ROLE: Architect]`**
99
+
100
+ Break the spec into atomic, independently testable tasks.
101
+
102
+ #### Thin Vertical Slices (`incremental-implementation`)
103
+
104
+ Organize tasks as **Thin Vertical Slices** rather than horizontal layers:
105
+
106
+ - **Bad (Horizontal)**: Task 1: All DB migrations. Task 2: All API routes. Task 3: All UI components. (Nothing works until step 3).
107
+ - **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.
108
+
109
+ #### Plan Rules
110
+
111
+ - Each task must be **completable in < 2 hours** of focused work.
112
+ - Each task must be **independently testable**.
113
+ - Tasks must be **ordered by dependency** (blocking tasks first).
114
+ - Each task gets a **test requirement** — no task without a test.
115
+
116
+ #### Plan Template
117
+
118
+ ```markdown
119
+ ## Implementation Plan: [Feature Name]
120
+
121
+ ### Tasks
122
+
123
+ **Task 1: [Slice 1 Name]** (est. 30min)
124
+ - What: [Specific implementation detail]
125
+ - Files: [file1.js, file2.js]
126
+ - Test: [How will you verify this works?]
127
+ - Blocked by: [nothing / Task N]
128
+
129
+ **Task 2: [Slice 2 Name]** (est. 45min)
130
+ - What: [Specific implementation detail]
131
+ - Files: [file3.js]
132
+ - Test: [Test description]
133
+ - Blocked by: Task 1
134
+
135
+ ### Risk Assessment
136
+ - [Risk 1]: [Mitigation]
137
+ - [Risk 2]: [Mitigation]
138
+
139
+ ### STOP — Awaiting Approval
140
+ Do not proceed to BUILD until this plan is approved.
141
+ ```
142
+
143
+ ---
144
+
145
+ ### Phase 3: BUILD — /build
146
+
147
+ **Auto-activates → `[ROLE: Senior Developer]`**
148
+
149
+ Implement one task at a time. Commit after each task.
150
+
151
+ #### Build Rules
152
+
153
+ 1. **One task per commit** — atomic, descriptive commit messages.
154
+ 2. **Write the test FIRST** (TDD — red-green-refactor).
155
+ 3. **No dead code** — if it's not tested, it's not shipped.
156
+ 4. **No TODOs in committed code** — resolve or create a tracked issue.
157
+ 5. **Read before writing** — understand the surrounding code before changing it.
158
+ 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.
159
+
160
+ #### Commit Message Format
161
+
162
+ ```text
163
+ type(scope): short description (max 72 chars)
164
+
165
+ - Detail 1
166
+ - Detail 2
167
+
168
+ Refs: #issue-number
169
+ ```
170
+
171
+ Types: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`
172
+
173
+ ---
174
+
175
+ ### Phase 4: VERIFY — /test
176
+
177
+ **Auto-activates → `[ROLE: QA Lead]`**
178
+
179
+ Tests are proof, not an afterthought.
180
+
181
+ #### Test Strategy by Code Type
182
+
183
+ **Logic & Services (TDD)**:
184
+
185
+ ```text
186
+ 1. RED: Write a failing test for the next small behavior
187
+ 2. GREEN: Write the minimum code to make it pass
188
+ 3. REFACTOR: Clean up without breaking tests
189
+ 4. REPEAT
190
+ ```
191
+
192
+ **UI Components & User Flows (BDD)**:
193
+
194
+ For complex React components, prioritize testing _user behavior_ over internal state:
195
+
196
+ - Use **React Testing Library** (`userEvent`, `screen.getByRole`) — test what the user sees.
197
+ - Use **Playwright** for critical user flows (login, checkout, form submit).
198
+ - Do NOT test implementation details (internal state, private methods, component structure).
199
+ - Focus on: "When user clicks X, does Y appear?" not "Does `useState` hold the right value?"
200
+
201
+ ```tsx
202
+ // [GOOD] BDD: Test behavior
203
+ test("shows error when email is invalid", async () => {
204
+ render(<LoginForm />);
205
+ await userEvent.type(screen.getByLabelText("Email"), "not-an-email");
206
+ await userEvent.click(screen.getByRole("button", { name: /sign in/i }));
207
+ expect(screen.getByText(/invalid email/i)).toBeInTheDocument();
208
+ });
209
+ ```
210
+
211
+ #### Test Quality Gates
212
+
213
+ Before moving to Review, verify:
214
+
215
+ - [ ] All new code has tests
216
+ - [ ] Tests are meaningful (not just coverage theater)
217
+ - [ ] Edge cases are covered (null, empty, overflow, unauthorized)
218
+ - [ ] Tests fail when the implementation is broken (anti-regression)
219
+ - [ ] Test names are readable: `it("returns 404 when user not found")`
220
+
221
+ ---
222
+
223
+ ### Phase 5: REVIEW — /review
224
+
225
+ **Auto-activates → `[ROLE: Staff Engineer]` + `[ROLE: Senior Designer]` for UI tasks**
226
+
227
+ Review before merging. Always.
228
+
229
+ #### Subagent / Peer Code Review Protocol
230
+
231
+ Inspired by [obra/superpowers](https://github.com/obra/superpowers):
232
+
233
+ 1. **Self-Review First**: The implementer runs git diff and verifies against the original acceptance criteria.
234
+ 2. **Review Checklist**:
235
+ - **Correctness**: Does it do what the spec says? Are all criteria met?
236
+ - **Architecture**: Single Responsibility, DRY without premature abstraction, no business logic in API routes.
237
+ - **Security**: No secrets hardcoded, inputs validated via Zod/schemas, auth checked before data access.
238
+ - **Performance**: No N+1 queries, expensive operations cached, sets paginated.
239
+ - **Design**: If UI, passes `impeccable-design` quick audit (typography, colors, spacing, animations).
240
+
241
+ ---
242
+
243
+ ### Phase 5.5: SIMPLIFY — /simplify
244
+
245
+ **Auto-activates → `[ROLE: Staff Engineer]` (Ponytail Mindset)**
246
+
247
+ Before merging, ruthlessly simplify:
248
+
249
+ 1. Did we introduce abstractions that are only used once? (Inline them).
250
+ 2. Can 3 lines of standard JavaScript replace a 50-line custom utility?
251
+ 3. Is any configuration or generic handler premature? (YAGNI).
252
+ 4. Is the code obvious to a mid-level engineer without reading a documentation manual?
253
+
254
+ ---
255
+
256
+ ### Phase 6: SHIP — /ship
257
+
258
+ **Auto-activates → `[ROLE: Release Engineer]`**
259
+
260
+ Only ship when all gates are green.
261
+
262
+ #### Pre-Ship Checklist
263
+
264
+ - [ ] All tests pass in CI
265
+ - [ ] No lint errors
266
+ - [ ] Feature works in staging environment
267
+ - [ ] Docs updated (README, API docs, changelogs)
268
+ - [ ] Breaking changes documented
269
+ - [ ] Rollback plan exists
270
+ - [ ] Vercel Preview Deployment is successful and manually verified
271
+ - [ ] Core Web Vitals pass in preview (LCP < 2.5s, CLS < 0.1, INP < 200ms)
272
+
273
+ #### Operational Self-Improvement
274
+
275
+ 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.
276
+
277
+ ---
278
+
279
+ ## Code Examples
280
+
281
+ ### Vertical Slice Example
282
+
283
+ ```javascript
284
+ // Slice 1: Minimal functional endpoint
285
+ // POST /api/v1/projects -> creates project with basic validation
286
+ import { z } from 'zod';
287
+ import { projectService } from '@/services/project';
288
+
289
+ const CreateProjectSchema = z.object({
290
+ name: z.string().min(1).max(100),
291
+ description: z.string().optional()
292
+ });
293
+
294
+ export async function POST(req) {
295
+ const session = await auth();
296
+ if (!session?.userId) return Response.json({ error: 'Unauthorized' }, { status: 401 });
297
+
298
+ const body = await req.json();
299
+ const parsed = CreateProjectSchema.parse(body);
300
+ const project = await projectService.create({ ...parsed, userId: session.userId });
301
+
302
+ return Response.json(project, { status: 201 });
303
+ }
304
+ ```
305
+
306
+ ---
307
+
308
+ ## Validation Checklist
309
+
310
+ - [ ] Specification exists with clear In-Scope and Out-of-Scope boundaries.
311
+ - [ ] Implementation plan broken down into vertical tasks < 2 hours each.
312
+ - [ ] Tests written before implementation (TDD/BDD).
313
+ - [ ] Code reviewed against correctness, security, performance, and design gates.
314
+ - [ ] Simplification ladder executed before shipping.
315
+
316
+ ---
317
+
318
+ ## Common Mistakes
319
+
320
+ - **Writing code before approval**: Skipping `/spec` or `/plan` in interactive sessions.
321
+ - **Horizontal task splitting**: Building all DB models first without verifying end-to-end integration.
322
+ - **Premature refactoring**: Changing unrelated adjacent code during a feature task.
323
+ - **Ignoring non-happy paths**: Testing only 200 OK responses while ignoring 400, 401, 404, 500 scenarios.
324
+
325
+ ---
326
+
327
+ ## Integration Notes
328
+
329
+ - Integrates with `gstack-roles` for automated role switching across all 6 phases.
330
+ - Triggers `ponytail-mindset` during the BUILD and SIMPLIFY phases.
331
+ - Hands off to `impeccable-design` for UI quality review.
332
+ - Coordinates with `security` during Phase 5 for pre-merge compliance.
333
+
334
+ ---
335
+
336
+ ## Completion Status Protocol
337
+
338
+ When completing a task or workflow, you must explicitly report your final status as the last part of your output:
339
+
340
+ - **DONE** — completed with evidence.
341
+ - **DONE_WITH_CONCERNS** — completed, but list concerns.
342
+ - **BLOCKED** — cannot proceed; state blocker and what was tried.
343
+ - **NEEDS_CONTEXT** — missing info; state exactly what is needed.
@@ -0,0 +1,19 @@
1
+ # engineering-workflow Troubleshooting & Common Mistakes
2
+
3
+ ## 1. Premature Code Generation
4
+
5
+ - **Symptom**: Agent starts spitting out code blocks while the user is still clarifying requirements.
6
+ - **Root Cause**: Failure to enforce the IRON RULE of Phase 1 (DEFINE) and Phase 2 (PLAN).
7
+ - **Fix**: Halt code output immediately. Announce `[PHASE: Define]` or `[PHASE: Plan]` and provide the structured spec or task breakdown for user sign-off.
8
+
9
+ ## 2. Blast Radius Creep
10
+
11
+ - **Symptom**: A simple bugfix in one module modifies 8 unrelated configuration and styling files.
12
+ - **Root Cause**: Missing isolation boundaries and speculative cleanup.
13
+ - **Fix**: Restrict edits strictly to files explicitly declared in the current atomic task's plan.
14
+
15
+ ## 3. Unverified Claims of Completion
16
+
17
+ - **Symptom**: Agent reports "Task complete! Everything is working" without running tests or builds.
18
+ - **Root Cause**: Skipping Phase 4 (VERIFY).
19
+ - **Fix**: Always execute tests (`npm test`, validator, compiler) and quote actual terminal exit codes and outputs before declaring completion.
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "rules_followed": {
6
+ "type": "boolean"
7
+ }
8
+ },
9
+ "required": [
10
+ "rules_followed"
11
+ ]
12
+ }
@@ -0,0 +1,13 @@
1
+ name: engineering-workflow
2
+ description: >
3
+ Senior engineering workflow skill inspired by Addy Osmani's agent-skills.
4
+ Enforces the full development lifecycle: spec → plan → build → test → review → ship.
5
+ AI must never write code before a spec and plan are approved.
6
+ tags:
7
+ - workflow
8
+ - engineering
9
+ - tdd
10
+ - planning
11
+ - review
12
+ version: 1.0.0
13
+ source: https://github.com/addyosmani/agent-skills
@@ -0,0 +1,36 @@
1
+ # fastapi Examples — Anti-patterns vs ContextOS Standard
2
+
3
+ ## Example 1: Asynchronous Route Handlers
4
+
5
+ ### Anti-pattern: Blocking I/O inside `async def`
6
+
7
+ ```python
8
+ # BAD: time.sleep or synchronous requests blocks the entire asyncio event loop!
9
+ import time
10
+ import requests
11
+
12
+ @app.get("/slow")
13
+ async def slow_route():
14
+ time.sleep(5) # BLOCKS ALL CONCURRENT USERS!
15
+ return {"status": "done"}
16
+ ```
17
+
18
+ ### Best practice: ContextOS Standard (Non-blocking Async or Def Offload)
19
+
20
+ ```python
21
+ # GOOD: Use async non-blocking client (httpx) or standard def for sync CPU work
22
+ import asyncio
23
+ import httpx
24
+
25
+ @app.get("/fast")
26
+ async def fast_route():
27
+ async with httpx.AsyncClient() as client:
28
+ response = await client.get("https://api.example.com/data")
29
+ return response.json()
30
+
31
+ # Or standard def (FastAPI automatically runs it in a background threadpool):
32
+ @app.get("/sync-worker")
33
+ def sync_worker():
34
+ time.sleep(5) # Runs in worker thread without blocking event loop
35
+ return {"status": "done"}
36
+ ```