@jakkrichm/create-nexus-devflow 2.0.19 → 2.0.21

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 (253) hide show
  1. package/dist/lib/update.js +19 -8
  2. package/dist/lib/update.js.map +1 -1
  3. package/package.json +1 -1
  4. package/template/.agents/skills/00-discover/SKILL.md +28 -116
  5. package/template/.agents/skills/40-execute/SKILL.md +1 -1
  6. package/template/.agents/skills/50-verify/SKILL.md +28 -161
  7. package/template/.agents/skills/60-report/SKILL.md +19 -92
  8. package/template/.agents/skills/70-release/SKILL.md +36 -11
  9. package/template/.agents/skills/check/SKILL.md +19 -7
  10. package/template/.agents/skills/complete/SKILL.md +21 -10
  11. package/template/.claude/skills/00-discover/SKILL.md +28 -116
  12. package/template/.claude/skills/40-execute/SKILL.md +1 -1
  13. package/template/.claude/skills/50-verify/SKILL.md +28 -161
  14. package/template/.claude/skills/60-report/SKILL.md +19 -92
  15. package/template/.claude/skills/70-release/SKILL.md +36 -11
  16. package/template/.claude/skills/check/SKILL.md +19 -7
  17. package/template/.claude/skills/complete/SKILL.md +21 -10
  18. package/template/AGENTS.md +1 -1
  19. package/template/devflow/context/coding-standards.md +40 -29
  20. package/template/.agents/skills/agent/SKILL.md +0 -165
  21. package/template/.agents/skills/api-and-interface-design/SKILL.md +0 -294
  22. package/template/.agents/skills/app-builder/SKILL.md +0 -75
  23. package/template/.agents/skills/app-builder/agent-coordination.md +0 -71
  24. package/template/.agents/skills/app-builder/feature-building.md +0 -53
  25. package/template/.agents/skills/app-builder/project-detection.md +0 -34
  26. package/template/.agents/skills/app-builder/scaffolding.md +0 -118
  27. package/template/.agents/skills/app-builder/tech-stack.md +0 -40
  28. package/template/.agents/skills/app-builder/templates/SKILL.md +0 -39
  29. package/template/.agents/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  30. package/template/.agents/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  31. package/template/.agents/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  32. package/template/.agents/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  33. package/template/.agents/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  34. package/template/.agents/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  35. package/template/.agents/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  36. package/template/.agents/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
  37. package/template/.agents/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
  38. package/template/.agents/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
  39. package/template/.agents/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
  40. package/template/.agents/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  41. package/template/.agents/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
  42. package/template/.agents/skills/architecture/SKILL.md +0 -55
  43. package/template/.agents/skills/architecture/context-discovery.md +0 -43
  44. package/template/.agents/skills/architecture/examples.md +0 -94
  45. package/template/.agents/skills/architecture/pattern-selection.md +0 -68
  46. package/template/.agents/skills/architecture/patterns-reference.md +0 -50
  47. package/template/.agents/skills/architecture/trade-off-analysis.md +0 -77
  48. package/template/.agents/skills/bash-linux/SKILL.md +0 -199
  49. package/template/.agents/skills/behavioral-modes/SKILL.md +0 -242
  50. package/template/.agents/skills/brainstorm/SKILL.md +0 -168
  51. package/template/.agents/skills/changelog/SKILL.md +0 -109
  52. package/template/.agents/skills/codebase-design/DEEPENING.md +0 -24
  53. package/template/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +0 -28
  54. package/template/.agents/skills/codebase-design/SKILL.md +0 -58
  55. package/template/.agents/skills/commit/SKILL.md +0 -59
  56. package/template/.agents/skills/competitor-analysis/SKILL.md +0 -66
  57. package/template/.agents/skills/context-engineering/SKILL.md +0 -290
  58. package/template/.agents/skills/database-design/SKILL.md +0 -52
  59. package/template/.agents/skills/database-design/database-selection.md +0 -43
  60. package/template/.agents/skills/database-design/indexing.md +0 -39
  61. package/template/.agents/skills/database-design/migrations.md +0 -48
  62. package/template/.agents/skills/database-design/optimization.md +0 -36
  63. package/template/.agents/skills/database-design/orm-selection.md +0 -30
  64. package/template/.agents/skills/database-design/schema-design.md +0 -56
  65. package/template/.agents/skills/database-design/scripts/schema_validator.py +0 -172
  66. package/template/.agents/skills/deploy/SKILL.md +0 -63
  67. package/template/.agents/skills/documentation-and-adrs/SKILL.md +0 -278
  68. package/template/.agents/skills/domain-modeling/ADR-FORMAT.md +0 -47
  69. package/template/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
  70. package/template/.agents/skills/domain-modeling/SKILL.md +0 -74
  71. package/template/.agents/skills/followup/SKILL.md +0 -83
  72. package/template/.agents/skills/frontend-ui-engineering/SKILL.md +0 -326
  73. package/template/.agents/skills/frontend-ui-engineering/accessibility-checklist.md +0 -159
  74. package/template/.agents/skills/goal/SKILL.md +0 -148
  75. package/template/.agents/skills/handoff/SKILL.md +0 -46
  76. package/template/.agents/skills/help/SKILL.md +0 -253
  77. package/template/.agents/skills/i18n-localization/SKILL.md +0 -154
  78. package/template/.agents/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  79. package/template/.agents/skills/insight/SKILL.md +0 -42
  80. package/template/.agents/skills/issue-triage/SKILL.md +0 -115
  81. package/template/.agents/skills/lint-and-validate/SKILL.md +0 -45
  82. package/template/.agents/skills/lint-and-validate/scripts/lint_runner.py +0 -184
  83. package/template/.agents/skills/lint-and-validate/scripts/type_coverage.py +0 -173
  84. package/template/.agents/skills/mcp-builder/SKILL.md +0 -176
  85. package/template/.agents/skills/merge/SKILL.md +0 -76
  86. package/template/.agents/skills/mobile-design/SKILL.md +0 -394
  87. package/template/.agents/skills/mobile-design/decision-trees.md +0 -516
  88. package/template/.agents/skills/mobile-design/mobile-backend.md +0 -491
  89. package/template/.agents/skills/mobile-design/mobile-color-system.md +0 -420
  90. package/template/.agents/skills/mobile-design/mobile-debugging.md +0 -122
  91. package/template/.agents/skills/mobile-design/mobile-design-thinking.md +0 -357
  92. package/template/.agents/skills/mobile-design/mobile-navigation.md +0 -458
  93. package/template/.agents/skills/mobile-design/mobile-performance.md +0 -767
  94. package/template/.agents/skills/mobile-design/mobile-testing.md +0 -356
  95. package/template/.agents/skills/mobile-design/mobile-typography.md +0 -433
  96. package/template/.agents/skills/mobile-design/platform-android.md +0 -666
  97. package/template/.agents/skills/mobile-design/platform-ios.md +0 -561
  98. package/template/.agents/skills/mobile-design/scripts/mobile_audit.py +0 -670
  99. package/template/.agents/skills/mobile-design/touch-psychology.md +0 -537
  100. package/template/.agents/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  101. package/template/.agents/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  102. package/template/.agents/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  103. package/template/.agents/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  104. package/template/.agents/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  105. package/template/.agents/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  106. package/template/.agents/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  107. package/template/.agents/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  108. package/template/.agents/skills/nextjs-react-expert/SKILL.md +0 -286
  109. package/template/.agents/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
  110. package/template/.agents/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
  111. package/template/.agents/skills/nodejs-best-practices/SKILL.md +0 -333
  112. package/template/.agents/skills/package-json-generator/SKILL.md +0 -60
  113. package/template/.agents/skills/package-json-generator/scripts/generate.js +0 -120
  114. package/template/.agents/skills/package-json-generator/scripts/run.sh +0 -19
  115. package/template/.agents/skills/parallel-agents/SKILL.md +0 -144
  116. package/template/.agents/skills/performance-optimization/SKILL.md +0 -299
  117. package/template/.agents/skills/performance-optimization/performance-checklist.md +0 -113
  118. package/template/.agents/skills/powershell-windows/SKILL.md +0 -167
  119. package/template/.agents/skills/pr/SKILL.md +0 -93
  120. package/template/.agents/skills/prd/SKILL.md +0 -127
  121. package/template/.agents/skills/preview/SKILL.md +0 -42
  122. package/template/.agents/skills/python-patterns/SKILL.md +0 -441
  123. package/template/.agents/skills/research/SKILL.md +0 -143
  124. package/template/.agents/skills/review/SKILL.md +0 -71
  125. package/template/.agents/skills/roadmap-strategy/SKILL.md +0 -94
  126. package/template/.agents/skills/security-review/SKILL.md +0 -63
  127. package/template/.agents/skills/seo-fundamentals/SKILL.md +0 -129
  128. package/template/.agents/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
  129. package/template/.agents/skills/server-management/SKILL.md +0 -161
  130. package/template/.agents/skills/simplify/SKILL.md +0 -70
  131. package/template/.agents/skills/skill-development/SKILL.md +0 -86
  132. package/template/.agents/skills/spec/SKILL.md +0 -39
  133. package/template/.agents/skills/spec-driven-development/SKILL.md +0 -207
  134. package/template/.agents/skills/tailwind-patterns/SKILL.md +0 -269
  135. package/template/.agents/skills/type-design/SKILL.md +0 -84
  136. package/template/.agents/skills/ui-ux-pro-max/SKILL.md +0 -75
  137. package/template/.claude/skills/agent/SKILL.md +0 -165
  138. package/template/.claude/skills/api-and-interface-design/SKILL.md +0 -294
  139. package/template/.claude/skills/app-builder/SKILL.md +0 -75
  140. package/template/.claude/skills/app-builder/agent-coordination.md +0 -71
  141. package/template/.claude/skills/app-builder/feature-building.md +0 -53
  142. package/template/.claude/skills/app-builder/project-detection.md +0 -34
  143. package/template/.claude/skills/app-builder/scaffolding.md +0 -118
  144. package/template/.claude/skills/app-builder/tech-stack.md +0 -40
  145. package/template/.claude/skills/app-builder/templates/SKILL.md +0 -39
  146. package/template/.claude/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  147. package/template/.claude/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  148. package/template/.claude/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  149. package/template/.claude/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  150. package/template/.claude/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  151. package/template/.claude/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  152. package/template/.claude/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  153. package/template/.claude/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
  154. package/template/.claude/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
  155. package/template/.claude/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
  156. package/template/.claude/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
  157. package/template/.claude/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  158. package/template/.claude/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
  159. package/template/.claude/skills/architecture/SKILL.md +0 -55
  160. package/template/.claude/skills/architecture/context-discovery.md +0 -43
  161. package/template/.claude/skills/architecture/examples.md +0 -94
  162. package/template/.claude/skills/architecture/pattern-selection.md +0 -68
  163. package/template/.claude/skills/architecture/patterns-reference.md +0 -50
  164. package/template/.claude/skills/architecture/trade-off-analysis.md +0 -77
  165. package/template/.claude/skills/bash-linux/SKILL.md +0 -199
  166. package/template/.claude/skills/behavioral-modes/SKILL.md +0 -242
  167. package/template/.claude/skills/brainstorm/SKILL.md +0 -168
  168. package/template/.claude/skills/changelog/SKILL.md +0 -109
  169. package/template/.claude/skills/codebase-design/DEEPENING.md +0 -24
  170. package/template/.claude/skills/codebase-design/DESIGN-IT-TWICE.md +0 -28
  171. package/template/.claude/skills/codebase-design/SKILL.md +0 -58
  172. package/template/.claude/skills/commit/SKILL.md +0 -59
  173. package/template/.claude/skills/competitor-analysis/SKILL.md +0 -66
  174. package/template/.claude/skills/context-engineering/SKILL.md +0 -290
  175. package/template/.claude/skills/database-design/SKILL.md +0 -52
  176. package/template/.claude/skills/database-design/database-selection.md +0 -43
  177. package/template/.claude/skills/database-design/indexing.md +0 -39
  178. package/template/.claude/skills/database-design/migrations.md +0 -48
  179. package/template/.claude/skills/database-design/optimization.md +0 -36
  180. package/template/.claude/skills/database-design/orm-selection.md +0 -30
  181. package/template/.claude/skills/database-design/schema-design.md +0 -56
  182. package/template/.claude/skills/database-design/scripts/schema_validator.py +0 -172
  183. package/template/.claude/skills/deploy/SKILL.md +0 -63
  184. package/template/.claude/skills/documentation-and-adrs/SKILL.md +0 -278
  185. package/template/.claude/skills/domain-modeling/ADR-FORMAT.md +0 -47
  186. package/template/.claude/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
  187. package/template/.claude/skills/domain-modeling/SKILL.md +0 -74
  188. package/template/.claude/skills/followup/SKILL.md +0 -83
  189. package/template/.claude/skills/frontend-ui-engineering/SKILL.md +0 -326
  190. package/template/.claude/skills/frontend-ui-engineering/accessibility-checklist.md +0 -159
  191. package/template/.claude/skills/goal/SKILL.md +0 -148
  192. package/template/.claude/skills/handoff/SKILL.md +0 -46
  193. package/template/.claude/skills/help/SKILL.md +0 -253
  194. package/template/.claude/skills/i18n-localization/SKILL.md +0 -154
  195. package/template/.claude/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  196. package/template/.claude/skills/insight/SKILL.md +0 -42
  197. package/template/.claude/skills/issue-triage/SKILL.md +0 -115
  198. package/template/.claude/skills/lint-and-validate/SKILL.md +0 -45
  199. package/template/.claude/skills/lint-and-validate/scripts/lint_runner.py +0 -184
  200. package/template/.claude/skills/lint-and-validate/scripts/type_coverage.py +0 -173
  201. package/template/.claude/skills/mcp-builder/SKILL.md +0 -176
  202. package/template/.claude/skills/merge/SKILL.md +0 -76
  203. package/template/.claude/skills/mobile-design/SKILL.md +0 -394
  204. package/template/.claude/skills/mobile-design/decision-trees.md +0 -516
  205. package/template/.claude/skills/mobile-design/mobile-backend.md +0 -491
  206. package/template/.claude/skills/mobile-design/mobile-color-system.md +0 -420
  207. package/template/.claude/skills/mobile-design/mobile-debugging.md +0 -122
  208. package/template/.claude/skills/mobile-design/mobile-design-thinking.md +0 -357
  209. package/template/.claude/skills/mobile-design/mobile-navigation.md +0 -458
  210. package/template/.claude/skills/mobile-design/mobile-performance.md +0 -767
  211. package/template/.claude/skills/mobile-design/mobile-testing.md +0 -356
  212. package/template/.claude/skills/mobile-design/mobile-typography.md +0 -433
  213. package/template/.claude/skills/mobile-design/platform-android.md +0 -666
  214. package/template/.claude/skills/mobile-design/platform-ios.md +0 -561
  215. package/template/.claude/skills/mobile-design/scripts/mobile_audit.py +0 -670
  216. package/template/.claude/skills/mobile-design/touch-psychology.md +0 -537
  217. package/template/.claude/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  218. package/template/.claude/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  219. package/template/.claude/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  220. package/template/.claude/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  221. package/template/.claude/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  222. package/template/.claude/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  223. package/template/.claude/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  224. package/template/.claude/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  225. package/template/.claude/skills/nextjs-react-expert/SKILL.md +0 -286
  226. package/template/.claude/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
  227. package/template/.claude/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
  228. package/template/.claude/skills/nodejs-best-practices/SKILL.md +0 -333
  229. package/template/.claude/skills/package-json-generator/SKILL.md +0 -60
  230. package/template/.claude/skills/package-json-generator/scripts/generate.js +0 -120
  231. package/template/.claude/skills/package-json-generator/scripts/run.sh +0 -19
  232. package/template/.claude/skills/parallel-agents/SKILL.md +0 -144
  233. package/template/.claude/skills/performance-optimization/SKILL.md +0 -299
  234. package/template/.claude/skills/performance-optimization/performance-checklist.md +0 -113
  235. package/template/.claude/skills/powershell-windows/SKILL.md +0 -167
  236. package/template/.claude/skills/pr/SKILL.md +0 -93
  237. package/template/.claude/skills/prd/SKILL.md +0 -127
  238. package/template/.claude/skills/preview/SKILL.md +0 -42
  239. package/template/.claude/skills/python-patterns/SKILL.md +0 -441
  240. package/template/.claude/skills/research/SKILL.md +0 -143
  241. package/template/.claude/skills/review/SKILL.md +0 -71
  242. package/template/.claude/skills/roadmap-strategy/SKILL.md +0 -94
  243. package/template/.claude/skills/security-review/SKILL.md +0 -63
  244. package/template/.claude/skills/seo-fundamentals/SKILL.md +0 -129
  245. package/template/.claude/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
  246. package/template/.claude/skills/server-management/SKILL.md +0 -161
  247. package/template/.claude/skills/simplify/SKILL.md +0 -70
  248. package/template/.claude/skills/skill-development/SKILL.md +0 -86
  249. package/template/.claude/skills/spec/SKILL.md +0 -39
  250. package/template/.claude/skills/spec-driven-development/SKILL.md +0 -207
  251. package/template/.claude/skills/tailwind-patterns/SKILL.md +0 -269
  252. package/template/.claude/skills/type-design/SKILL.md +0 -84
  253. package/template/.claude/skills/ui-ux-pro-max/SKILL.md +0 -75
@@ -1,441 +0,0 @@
1
- ---
2
- name: python-patterns
3
- description: "[Devflow] Python development principles and decision-making. Framework selection, async patterns, type hints, project structure. Teaches thinking, not copying."
4
- allowed-tools: Read, Write, Edit, Glob, Grep
5
- ---
6
-
7
- # Python Patterns
8
-
9
- > Python development principles and decision-making for 2025.
10
- > **Learn to THINK, not memorize patterns.**
11
-
12
- ---
13
-
14
- ## ⚠️ How to Use This Skill
15
-
16
- This skill teaches **decision-making principles**, not fixed code to copy.
17
-
18
- - ASK user for framework preference when unclear
19
- - Choose async vs sync based on CONTEXT
20
- - Don't default to same framework every time
21
-
22
- ---
23
-
24
- ## 1. Framework Selection (2025)
25
-
26
- ### Decision Tree
27
-
28
- ```
29
- What are you building?
30
-
31
- ├── API-first / Microservices
32
- │ └── FastAPI (async, modern, fast)
33
-
34
- ├── Full-stack web / CMS / Admin
35
- │ └── Django (batteries-included)
36
-
37
- ├── Simple / Script / Learning
38
- │ └── Flask (minimal, flexible)
39
-
40
- ├── AI/ML API serving
41
- │ └── FastAPI (Pydantic, async, uvicorn)
42
-
43
- └── Background workers
44
- └── Celery + any framework
45
- ```
46
-
47
- ### Comparison Principles
48
-
49
- | Factor | FastAPI | Django | Flask |
50
- |--------|---------|--------|-------|
51
- | **Best for** | APIs, microservices | Full-stack, CMS | Simple, learning |
52
- | **Async** | Native | Django 5.0+ | Via extensions |
53
- | **Admin** | Manual | Built-in | Via extensions |
54
- | **ORM** | Choose your own | Django ORM | Choose your own |
55
- | **Learning curve** | Low | Medium | Low |
56
-
57
- ### Selection Questions to Ask:
58
- 1. Is this API-only or full-stack?
59
- 2. Need admin interface?
60
- 3. Team familiar with async?
61
- 4. Existing infrastructure?
62
-
63
- ---
64
-
65
- ## 2. Async vs Sync Decision
66
-
67
- ### When to Use Async
68
-
69
- ```
70
- async def is better when:
71
- ├── I/O-bound operations (database, HTTP, file)
72
- ├── Many concurrent connections
73
- ├── Real-time features
74
- ├── Microservices communication
75
- └── FastAPI/Starlette/Django ASGI
76
-
77
- def (sync) is better when:
78
- ├── CPU-bound operations
79
- ├── Simple scripts
80
- ├── Legacy codebase
81
- ├── Team unfamiliar with async
82
- └── Blocking libraries (no async version)
83
- ```
84
-
85
- ### The Golden Rule
86
-
87
- ```
88
- I/O-bound → async (waiting for external)
89
- CPU-bound → sync + multiprocessing (computing)
90
-
91
- Don't:
92
- ├── Mix sync and async carelessly
93
- ├── Use sync libraries in async code
94
- └── Force async for CPU work
95
- ```
96
-
97
- ### Async Library Selection
98
-
99
- | Need | Async Library |
100
- |------|---------------|
101
- | HTTP client | httpx |
102
- | PostgreSQL | asyncpg |
103
- | Redis | aioredis / redis-py async |
104
- | File I/O | aiofiles |
105
- | Database ORM | SQLAlchemy 2.0 async, Tortoise |
106
-
107
- ---
108
-
109
- ## 3. Type Hints Strategy
110
-
111
- ### When to Type
112
-
113
- ```
114
- Always type:
115
- ├── Function parameters
116
- ├── Return types
117
- ├── Class attributes
118
- ├── Public APIs
119
-
120
- Can skip:
121
- ├── Local variables (let inference work)
122
- ├── One-off scripts
123
- ├── Tests (usually)
124
- ```
125
-
126
- ### Common Type Patterns
127
-
128
- ```python
129
- # These are patterns, understand them:
130
-
131
- # Optional → might be None
132
- from typing import Optional
133
- def find_user(id: int) -> Optional[User]: ...
134
-
135
- # Union → one of multiple types
136
- def process(data: str | dict) -> None: ...
137
-
138
- # Generic collections
139
- def get_items() -> list[Item]: ...
140
- def get_mapping() -> dict[str, int]: ...
141
-
142
- # Callable
143
- from typing import Callable
144
- def apply(fn: Callable[[int], str]) -> str: ...
145
- ```
146
-
147
- ### Pydantic for Validation
148
-
149
- ```
150
- When to use Pydantic:
151
- ├── API request/response models
152
- ├── Configuration/settings
153
- ├── Data validation
154
- ├── Serialization
155
-
156
- Benefits:
157
- ├── Runtime validation
158
- ├── Auto-generated JSON schema
159
- ├── Works with FastAPI natively
160
- └── Clear error messages
161
- ```
162
-
163
- ---
164
-
165
- ## 4. Project Structure Principles
166
-
167
- ### Structure Selection
168
-
169
- ```
170
- Small project / Script:
171
- ├── main.py
172
- ├── utils.py
173
- └── requirements.txt
174
-
175
- Medium API:
176
- ├── app/
177
- │ ├── __init__.py
178
- │ ├── main.py
179
- │ ├── models/
180
- │ ├── routes/
181
- │ ├── services/
182
- │ └── schemas/
183
- ├── tests/
184
- └── pyproject.toml
185
-
186
- Large application:
187
- ├── src/
188
- │ └── myapp/
189
- │ ├── core/
190
- │ ├── api/
191
- │ ├── services/
192
- │ ├── models/
193
- │ └── ...
194
- ├── tests/
195
- └── pyproject.toml
196
- ```
197
-
198
- ### FastAPI Structure Principles
199
-
200
- ```
201
- Organize by feature or layer:
202
-
203
- By layer:
204
- ├── routes/ (API endpoints)
205
- ├── services/ (business logic)
206
- ├── models/ (database models)
207
- ├── schemas/ (Pydantic models)
208
- └── dependencies/ (shared deps)
209
-
210
- By feature:
211
- ├── users/
212
- │ ├── routes.py
213
- │ ├── service.py
214
- │ └── schemas.py
215
- └── products/
216
- └── ...
217
- ```
218
-
219
- ---
220
-
221
- ## 5. Django Principles (2025)
222
-
223
- ### Django Async (Django 5.0+)
224
-
225
- ```
226
- Django supports async:
227
- ├── Async views
228
- ├── Async middleware
229
- ├── Async ORM (limited)
230
- └── ASGI deployment
231
-
232
- When to use async in Django:
233
- ├── External API calls
234
- ├── WebSocket (Channels)
235
- ├── High-concurrency views
236
- └── Background task triggering
237
- ```
238
-
239
- ### Django Best Practices
240
-
241
- ```
242
- Model design:
243
- ├── Fat models, thin views
244
- ├── Use managers for common queries
245
- ├── Abstract base classes for shared fields
246
-
247
- Views:
248
- ├── Class-based for complex CRUD
249
- ├── Function-based for simple endpoints
250
- ├── Use viewsets with DRF
251
-
252
- Queries:
253
- ├── select_related() for FKs
254
- ├── prefetch_related() for M2M
255
- ├── Avoid N+1 queries
256
- └── Use .only() for specific fields
257
- ```
258
-
259
- ---
260
-
261
- ## 6. FastAPI Principles
262
-
263
- ### async def vs def in FastAPI
264
-
265
- ```
266
- Use async def when:
267
- ├── Using async database drivers
268
- ├── Making async HTTP calls
269
- ├── I/O-bound operations
270
- └── Want to handle concurrency
271
-
272
- Use def when:
273
- ├── Blocking operations
274
- ├── Sync database drivers
275
- ├── CPU-bound work
276
- └── FastAPI runs in threadpool automatically
277
- ```
278
-
279
- ### Dependency Injection
280
-
281
- ```
282
- Use dependencies for:
283
- ├── Database sessions
284
- ├── Current user / Auth
285
- ├── Configuration
286
- ├── Shared resources
287
-
288
- Benefits:
289
- ├── Testability (mock dependencies)
290
- ├── Clean separation
291
- ├── Automatic cleanup (yield)
292
- ```
293
-
294
- ### Pydantic v2 Integration
295
-
296
- ```python
297
- # FastAPI + Pydantic are tightly integrated:
298
-
299
- # Request validation
300
- @app.post("/users")
301
- async def create(user: UserCreate) -> UserResponse:
302
- # user is already validated
303
- ...
304
-
305
- # Response serialization
306
- # Return type becomes response schema
307
- ```
308
-
309
- ---
310
-
311
- ## 7. Background Tasks
312
-
313
- ### Selection Guide
314
-
315
- | Solution | Best For |
316
- |----------|----------|
317
- | **BackgroundTasks** | Simple, in-process tasks |
318
- | **Celery** | Distributed, complex workflows |
319
- | **ARQ** | Async, Redis-based |
320
- | **RQ** | Simple Redis queue |
321
- | **Dramatiq** | Actor-based, simpler than Celery |
322
-
323
- ### When to Use Each
324
-
325
- ```
326
- FastAPI BackgroundTasks:
327
- ├── Quick operations
328
- ├── No persistence needed
329
- ├── Fire-and-forget
330
- └── Same process
331
-
332
- Celery/ARQ:
333
- ├── Long-running tasks
334
- ├── Need retry logic
335
- ├── Distributed workers
336
- ├── Persistent queue
337
- └── Complex workflows
338
- ```
339
-
340
- ---
341
-
342
- ## 8. Error Handling Principles
343
-
344
- ### Exception Strategy
345
-
346
- ```
347
- In FastAPI:
348
- ├── Create custom exception classes
349
- ├── Register exception handlers
350
- ├── Return consistent error format
351
- └── Log without exposing internals
352
-
353
- Pattern:
354
- ├── Raise domain exceptions in services
355
- ├── Catch and transform in handlers
356
- └── Client gets clean error response
357
- ```
358
-
359
- ### Error Response Philosophy
360
-
361
- ```
362
- Include:
363
- ├── Error code (programmatic)
364
- ├── Message (human readable)
365
- ├── Details (field-level when applicable)
366
- └── NOT stack traces (security)
367
- ```
368
-
369
- ---
370
-
371
- ## 9. Testing Principles
372
-
373
- ### Testing Strategy
374
-
375
- | Type | Purpose | Tools |
376
- |------|---------|-------|
377
- | **Unit** | Business logic | pytest |
378
- | **Integration** | API endpoints | pytest + httpx/TestClient |
379
- | **E2E** | Full workflows | pytest + DB |
380
-
381
- ### Async Testing
382
-
383
- ```python
384
- # Use pytest-asyncio for async tests
385
-
386
- import pytest
387
- from httpx import AsyncClient
388
-
389
- @pytest.mark.asyncio
390
- async def test_endpoint():
391
- async with AsyncClient(app=app, base_url="http://test") as client:
392
- response = await client.get("/users")
393
- assert response.status_code == 200
394
- ```
395
-
396
- ### Fixtures Strategy
397
-
398
- ```
399
- Common fixtures:
400
- ├── db_session → Database connection
401
- ├── client → Test client
402
- ├── authenticated_user → User with token
403
- └── sample_data → Test data setup
404
- ```
405
-
406
- ---
407
-
408
- ## 10. Decision Checklist
409
-
410
- Before implementing:
411
-
412
- - [ ] **Asked user about framework preference?**
413
- - [ ] **Chosen framework for THIS context?** (not just default)
414
- - [ ] **Decided async vs sync?**
415
- - [ ] **Planned type hint strategy?**
416
- - [ ] **Defined project structure?**
417
- - [ ] **Planned error handling?**
418
- - [ ] **Considered background tasks?**
419
-
420
- ---
421
-
422
- ## 11. Anti-Patterns to Avoid
423
-
424
- ### ❌ DON'T:
425
- - Default to Django for simple APIs (FastAPI may be better)
426
- - Use sync libraries in async code
427
- - Skip type hints for public APIs
428
- - Put business logic in routes/views
429
- - Ignore N+1 queries
430
- - Mix async and sync carelessly
431
-
432
- ### ✅ DO:
433
- - Choose framework based on context
434
- - Ask about async requirements
435
- - Use Pydantic for validation
436
- - Separate concerns (routes → services → repos)
437
- - Test critical paths
438
-
439
- ---
440
-
441
- > **Remember**: Python patterns are about decision-making for YOUR specific context. Don't copy code—think about what serves your application best.
@@ -1,143 +0,0 @@
1
- ---
2
- name: research
3
- description: "[Devflow] Deep codebase or web research with source-backed citations to support discovery and spec stages."
4
- ---
5
-
6
- ---
7
- description: Codebase and evidence research. Transitional compatibility path for the Research companion command in DevFlow 2.0.
8
- ---
9
-
10
- # Research - Codebase And Evidence Exploration
11
-
12
- ## Topic: $ARGUMENTS
13
-
14
- This file keeps its old numeric path for migration compatibility.
15
-
16
- In DevFlow 2.0, `Research` is a companion command, not a numbered mainline workflow. The operational behavior remains detailed so it can still function like the original research workflow.
17
-
18
- ## Purpose
19
-
20
- Use `Research` to answer complex questions with code evidence, source material, and structured findings.
21
-
22
- Use it when:
23
-
24
- - facts are missing
25
- - source material must be collected
26
- - the codebase or external docs need deeper investigation
27
- - Discover, Define, or Spec cannot proceed confidently without evidence
28
-
29
- Use `prototype` when the fastest reliable evidence is a runnable throwaway experiment rather than more reading.
30
-
31
- Preferred DevFlow 2.0 pairing:
32
-
33
- - from `00-discover`
34
- - from `10-define`
35
- - from `20-spec`
36
- - from `50-verify` when validating a claim or implementation choice
37
-
38
- When invoked with a Discovery ID, link the research report to that discovery and return to `00-discover {discovery_id}` so Discover can synthesize the evidence and make the decision. Research must not allocate a Running ID.
39
-
40
- ---
41
-
42
- ## Internal Process
43
-
44
- You are an orchestrator. Your goal is to perform deep technical or evidence research while preserving the richer research UX from the original workflow.
45
-
46
- Apply prompt addon patterns when the topic matches:
47
-
48
- | Topic | Addon pattern | Output |
49
- | :--- | :--- | :--- |
50
- | External libraries, APIs, SDKs, services | `spec_researcher` | validated integration notes with sources and implementation constraints |
51
- | Competitors, alternatives, market gaps | `competitor_analysis` | competitor list, pain points, differentiator opportunities |
52
- | Completed implementation lessons | `insight_extractor` | reusable patterns, gotchas, file insights, recommendations |
53
- | API/database/browser validation | `mcp_tools/*` | available validation steps for the current IDE/tooling |
54
-
55
- ### Phase 1: Query Decomposition
56
-
57
- - clarify the research question
58
- - classify whether the work is mainly codebase research, external research, or both
59
- - identify the evidence needed to answer it
60
-
61
- ### Phase 2: Exploration
62
-
63
- - locate relevant code with file and line references
64
- - trace data flows, architecture, and integration points
65
- - gather external documentation and source material when needed
66
- - prioritize "what is" over "what should be"
67
-
68
- ### Phase 3: Synthesis And Documentation
69
-
70
- - summarize key findings
71
- - separate facts from inference
72
- - record constraints, risks, and unanswered questions
73
- - save the durable research note to disk
74
-
75
- ### Phase 4: Knowledge Management
76
-
77
- - if significant patterns or durable lessons are discovered, recommend recording them in `devflow/lessons.md` or `Wiki`
78
-
79
- ## Output Format
80
-
81
- Save the full research note to `devflow/research/{date}-{slug}.md`.
82
-
83
- Before generating the report:
84
-
85
- 1. Inspect `.agent/resources/schemas/research.template.md`
86
- 2. Preserve its required headings and tables
87
- 3. Replace placeholder text with concrete evidence
88
- 4. Re-check the output against `research.template.md`, ensure required headings remain, and remove all placeholders before completion
89
-
90
- Return a concise chat summary plus a persistent report with:
91
-
92
- ```markdown
93
- ## Research Summary: [Topic]
94
-
95
- ### Question
96
- [What needed to be answered]
97
-
98
- ### Findings
99
- - [Finding 1]
100
- - [Finding 2]
101
-
102
- ### Evidence
103
- - [file:line, source, or doc link]
104
-
105
- ### Constraints And Risks
106
- - [Constraint]
107
-
108
- ### Open Questions
109
- - [Question still unanswered]
110
-
111
- ### Recommended Next Step
112
- - [What to do with this research]
113
- ```
114
-
115
- ## Examples
116
-
117
- ```text
118
- Research auth patterns in the current codebase
119
- Research Stripe webhook handling constraints
120
- Research competitor onboarding flows
121
- Research whether this API version is compatible
122
- ```
123
-
124
- ## Relationship To DevFlow 2.0
125
-
126
- - Classification: Companion command
127
- - Mainline status: Not a numbered stage
128
- - Typical entry points: `00-discover`, `10-define`, `20-spec`, `30-plan`
129
- - Typical handoff targets: return to the stage that asked for the evidence
130
-
131
- ## Sources
132
-
133
- - `AGENTS.md`
134
- - `.agent/resources/schemas/research.template.md`
135
- - Related commands: `00-discover`, `10-define`, `20-spec`, `30-plan`, `Spec-Research`, `Agent`
136
- - Support skills: `prototype`, `spec-research`, `competitor-analysis`, `insight-capture`
137
-
138
- ## Next Workflow Recommendation
139
-
140
- - Default: return to the stage that asked for evidence; for discovery-owned research this is `00-discover {discovery_id}`
141
- - Common routes: `10-define`, `20-spec`, `30-plan`, or `50-verify`
142
- - Alternate: `Brainstorm` if the research opens multiple strategic options
143
-
@@ -1,71 +0,0 @@
1
- ---
2
- name: review
3
- description: "[Devflow] Multi-axis code and PR review. Reviews diffs against standards, specs, correctness, security, performance, and 9arm scrutinize discipline."
4
- ---
5
-
6
- # Code Review, Quality & PR Analysis
7
-
8
- ## Overview
9
-
10
- This is the comprehensive review master skill for Nexus-DevFlow. It evaluates code modifications, local diffs, branches, and pull requests across multiple dimensions before merging or releasing. Every change gets reviewed before merge — no exceptions.
11
-
12
- **The approval standard**: Approve a change when it definitely improves overall code health and satisfies the specification, even if it isn't perfect.
13
-
14
- ---
15
-
16
- ## 1. The Scrutinize Discipline (9arm Review Pattern)
17
-
18
- Before jumping into line-by-line comments, apply the 4-step Scrutiny check:
19
- 1. **Intent Check**: What problem is this change truly trying to solve? Is this the right problem?
20
- 2. **Safer / Smaller Alternative**: Could this be achieved with fewer lines, zero new dependencies, or less complexity?
21
- 3. **Runtime Path Trace**: Trace the execution path through inputs, error handling, async boundaries, and state mutations.
22
- 4. **Precision & Evidence**: Does the code contain unproven assumptions or missing test evidence?
23
-
24
- ---
25
-
26
- ## 2. The Five-Axis Review Framework
27
-
28
- Every review evaluates code across these 5 core axes:
29
-
30
- ```text
31
- ┌──────────────────────────────────────────────────────────┐
32
- │ FIVE-AXIS CODE REVIEW │
33
- ├──────────────┬───────────────────────────────────────────┤
34
- │ 1. Correctness│ Logic, edge cases, error paths, races │
35
- │ 2. Simplicity │ Readable, concise, no dead code, DAMP/DRY │
36
- │ 3. Architecture│ Boundaries, dependencies, design patterns │
37
- │ 4. Security │ Input validation, auth, no secrets/XSS │
38
- │ 5. Performance│ No N+1 queries, async I/O, memoization │
39
- └──────────────┴───────────────────────────────────────────┘
40
- ```
41
-
42
- ---
43
-
44
- ## 3. Review Lenses & Finding Severities
45
-
46
- Categorize all findings into actionable severities:
47
-
48
- - **P0 (Critical Blocker)**: Security vulnerability, data loss, runtime crash, broken main functionality. (Blocks `70-release`)
49
- - **P1 (Major Blocker)**: Spec mismatch, broken error handling, severe regression risk. (Blocks `70-release`)
50
- - **P2 (Normal Improvement)**: Readability, missing edge-case test, minor performance optimization.
51
- - **P3 (Nit / Suggestion)**: Naming polish, optional refactor, comment clarity.
52
-
53
- ---
54
-
55
- ## 4. PR Review Process
56
-
57
- 1. **Load Context**: Pin fixed point (merge-base with `main`), read spec (`20-spec.md`) and coding standards.
58
- 2. **Review Standards vs. Spec**: Check adherence to project instructions (`AGENTS.md`) and acceptance criteria.
59
- 3. **Validate Findings**: Ensure every finding is reproducible and points to specific files and line numbers.
60
- 4. **Generate Report**: Save substantial review reports under:
61
- ```text
62
- devflow/runs/{ID}-{slug}/pr_review.md
63
- ```
64
-
65
- ---
66
-
67
- ## Relationship To DevFlow 2.0
68
-
69
- - **Classification**: Companion command & Verification support
70
- - **Mainline stages**: `50-verify` (QA & Code Review lane), `70-release` (Pre-merge review)
71
- - **Handoff**: `40-execute` (for fixes), `50-verify`, `70-release`