flyee 0.1.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 (302) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +134 -0
  3. package/bin/install.js +357 -0
  4. package/bridge/bridge.py +1780 -0
  5. package/bridge/local_tracker.py +722 -0
  6. package/core/agents/backend-specialist.md +266 -0
  7. package/core/agents/code-archaeologist.md +106 -0
  8. package/core/agents/database-architect.md +226 -0
  9. package/core/agents/debugger.md +225 -0
  10. package/core/agents/devops-engineer.md +323 -0
  11. package/core/agents/documentation-writer.md +104 -0
  12. package/core/agents/explorer-agent.md +73 -0
  13. package/core/agents/frontend-specialist.md +743 -0
  14. package/core/agents/game-developer.md +162 -0
  15. package/core/agents/mobile-developer.md +377 -0
  16. package/core/agents/orchestrator.md +416 -0
  17. package/core/agents/penetration-tester.md +188 -0
  18. package/core/agents/performance-optimizer.md +187 -0
  19. package/core/agents/product-manager.md +112 -0
  20. package/core/agents/product-owner.md +95 -0
  21. package/core/agents/project-planner.md +470 -0
  22. package/core/agents/qa-automation-engineer.md +103 -0
  23. package/core/agents/security-auditor.md +170 -0
  24. package/core/agents/seo-specialist.md +111 -0
  25. package/core/agents/stitch-designer.md +190 -0
  26. package/core/agents/tdd-reviewer.md +282 -0
  27. package/core/agents/test-engineer.md +158 -0
  28. package/core/scripts/auto_preview.py +148 -0
  29. package/core/scripts/checklist.py +243 -0
  30. package/core/scripts/cost_report.py +149 -0
  31. package/core/scripts/doc-sync-check.py +461 -0
  32. package/core/scripts/parse_user_stories.py +79 -0
  33. package/core/scripts/prepare_notion_updates.py +172 -0
  34. package/core/scripts/print_create_payload.py +18 -0
  35. package/core/scripts/session_manager.py +120 -0
  36. package/core/scripts/task_complete.py +127 -0
  37. package/core/scripts/verify_all.py +327 -0
  38. package/core/skills/analytics-strategy/SKILL.md +128 -0
  39. package/core/skills/api-patterns/SKILL.md +81 -0
  40. package/core/skills/api-patterns/api-style.md +42 -0
  41. package/core/skills/api-patterns/auth.md +24 -0
  42. package/core/skills/api-patterns/documentation.md +26 -0
  43. package/core/skills/api-patterns/graphql.md +41 -0
  44. package/core/skills/api-patterns/rate-limiting.md +31 -0
  45. package/core/skills/api-patterns/response.md +37 -0
  46. package/core/skills/api-patterns/rest.md +40 -0
  47. package/core/skills/api-patterns/scripts/api_validator.py +211 -0
  48. package/core/skills/api-patterns/security-testing.md +122 -0
  49. package/core/skills/api-patterns/trpc.md +41 -0
  50. package/core/skills/api-patterns/versioning.md +22 -0
  51. package/core/skills/app-builder/SKILL.md +75 -0
  52. package/core/skills/app-builder/agent-coordination.md +71 -0
  53. package/core/skills/app-builder/feature-building.md +53 -0
  54. package/core/skills/app-builder/project-detection.md +34 -0
  55. package/core/skills/app-builder/scaffolding.md +118 -0
  56. package/core/skills/app-builder/tech-stack.md +40 -0
  57. package/core/skills/app-builder/templates/SKILL.md +39 -0
  58. package/core/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  59. package/core/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  60. package/core/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  61. package/core/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  62. package/core/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  63. package/core/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  64. package/core/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  65. package/core/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
  66. package/core/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
  67. package/core/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
  68. package/core/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
  69. package/core/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  70. package/core/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
  71. package/core/skills/architecture/SKILL.md +55 -0
  72. package/core/skills/architecture/context-discovery.md +43 -0
  73. package/core/skills/architecture/examples.md +94 -0
  74. package/core/skills/architecture/pattern-selection.md +68 -0
  75. package/core/skills/architecture/patterns-reference.md +50 -0
  76. package/core/skills/architecture/trade-off-analysis.md +77 -0
  77. package/core/skills/atomic-design/SKILL.md +282 -0
  78. package/core/skills/atomic-design/references/classification-guide.md +132 -0
  79. package/core/skills/atomic-design/references/quality-checklist.md +60 -0
  80. package/core/skills/atomic-design/references/stacks/stack-blade.md +254 -0
  81. package/core/skills/atomic-design/references/stacks/stack-nextjs.md +272 -0
  82. package/core/skills/atomic-design/references/stacks/stack-react.md +239 -0
  83. package/core/skills/atomic-design/references/stacks/stack-vue.md +224 -0
  84. package/core/skills/bash-linux/SKILL.md +199 -0
  85. package/core/skills/behavioral-modes/SKILL.md +242 -0
  86. package/core/skills/brainstorming/SKILL.md +163 -0
  87. package/core/skills/brainstorming/dynamic-questioning.md +373 -0
  88. package/core/skills/checkpointing-patterns/SKILL.md +163 -0
  89. package/core/skills/clean-code/SKILL.md +201 -0
  90. package/core/skills/code-review-checklist/SKILL.md +109 -0
  91. package/core/skills/code-truth-validation/SKILL.md +149 -0
  92. package/core/skills/component-library-discovery/SKILL.md +154 -0
  93. package/core/skills/content-strategy/SKILL.md +222 -0
  94. package/core/skills/context-budget/SKILL.md +155 -0
  95. package/core/skills/context-gathering-patterns/SKILL.md +278 -0
  96. package/core/skills/cost-tracking/SKILL.md +206 -0
  97. package/core/skills/database-design/SKILL.md +52 -0
  98. package/core/skills/database-design/database-selection.md +43 -0
  99. package/core/skills/database-design/indexing.md +39 -0
  100. package/core/skills/database-design/migrations.md +48 -0
  101. package/core/skills/database-design/optimization.md +36 -0
  102. package/core/skills/database-design/orm-selection.md +30 -0
  103. package/core/skills/database-design/schema-design.md +56 -0
  104. package/core/skills/database-design/scripts/schema_validator.py +172 -0
  105. package/core/skills/deployment-procedures/SKILL.md +295 -0
  106. package/core/skills/design-md/README.md +34 -0
  107. package/core/skills/design-md/SKILL.md +172 -0
  108. package/core/skills/design-md/examples/DESIGN.md +154 -0
  109. package/core/skills/design-system-enforcement/SKILL.md +339 -0
  110. package/core/skills/doc.md +177 -0
  111. package/core/skills/document-registry/SKILL.md +130 -0
  112. package/core/skills/documentation-publishing/SKILL.md +174 -0
  113. package/core/skills/documentation-templates/SKILL.md +194 -0
  114. package/core/skills/enhance-prompt/README.md +34 -0
  115. package/core/skills/enhance-prompt/SKILL.md +204 -0
  116. package/core/skills/enhance-prompt/references/KEYWORDS.md +114 -0
  117. package/core/skills/frontend-design/SKILL.md +430 -0
  118. package/core/skills/frontend-design/animation-guide.md +331 -0
  119. package/core/skills/frontend-design/color-system.md +311 -0
  120. package/core/skills/frontend-design/decision-trees.md +418 -0
  121. package/core/skills/frontend-design/motion-graphics.md +306 -0
  122. package/core/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  123. package/core/skills/frontend-design/scripts/ux_audit.py +722 -0
  124. package/core/skills/frontend-design/typography-system.md +345 -0
  125. package/core/skills/frontend-design/ux-psychology.md +541 -0
  126. package/core/skills/frontend-design/visual-effects.md +383 -0
  127. package/core/skills/game-development/2d-games/SKILL.md +119 -0
  128. package/core/skills/game-development/3d-games/SKILL.md +135 -0
  129. package/core/skills/game-development/SKILL.md +167 -0
  130. package/core/skills/game-development/game-art/SKILL.md +185 -0
  131. package/core/skills/game-development/game-audio/SKILL.md +190 -0
  132. package/core/skills/game-development/game-design/SKILL.md +129 -0
  133. package/core/skills/game-development/mobile-games/SKILL.md +108 -0
  134. package/core/skills/game-development/multiplayer/SKILL.md +132 -0
  135. package/core/skills/game-development/pc-games/SKILL.md +144 -0
  136. package/core/skills/game-development/vr-ar/SKILL.md +123 -0
  137. package/core/skills/game-development/web-games/SKILL.md +150 -0
  138. package/core/skills/geo-fundamentals/SKILL.md +156 -0
  139. package/core/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  140. package/core/skills/git-workflow/SKILL.md +263 -0
  141. package/core/skills/history-check-patterns/SKILL.md +125 -0
  142. package/core/skills/i18n-localization/SKILL.md +154 -0
  143. package/core/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  144. package/core/skills/integration-completeness/SKILL.md +219 -0
  145. package/core/skills/intelligent-routing/SKILL.md +370 -0
  146. package/core/skills/lint-and-validate/SKILL.md +45 -0
  147. package/core/skills/lint-and-validate/scripts/lint_runner.py +173 -0
  148. package/core/skills/lint-and-validate/scripts/type_coverage.py +173 -0
  149. package/core/skills/local-verification/SKILL.md +195 -0
  150. package/core/skills/mcp-builder/SKILL.md +176 -0
  151. package/core/skills/mobile-design/SKILL.md +394 -0
  152. package/core/skills/mobile-design/decision-trees.md +516 -0
  153. package/core/skills/mobile-design/mobile-backend.md +491 -0
  154. package/core/skills/mobile-design/mobile-color-system.md +420 -0
  155. package/core/skills/mobile-design/mobile-debugging.md +122 -0
  156. package/core/skills/mobile-design/mobile-design-thinking.md +357 -0
  157. package/core/skills/mobile-design/mobile-navigation.md +458 -0
  158. package/core/skills/mobile-design/mobile-performance.md +767 -0
  159. package/core/skills/mobile-design/mobile-testing.md +356 -0
  160. package/core/skills/mobile-design/mobile-typography.md +433 -0
  161. package/core/skills/mobile-design/platform-android.md +666 -0
  162. package/core/skills/mobile-design/platform-ios.md +561 -0
  163. package/core/skills/mobile-design/scripts/mobile_audit.py +670 -0
  164. package/core/skills/mobile-design/touch-psychology.md +537 -0
  165. package/core/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  166. package/core/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  167. package/core/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  168. package/core/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  169. package/core/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  170. package/core/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  171. package/core/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  172. package/core/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  173. package/core/skills/nextjs-react-expert/SKILL.md +267 -0
  174. package/core/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  175. package/core/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  176. package/core/skills/nodejs-best-practices/SKILL.md +333 -0
  177. package/core/skills/notion-task-patterns/SKILL.md +2529 -0
  178. package/core/skills/page-specifications/SKILL.md +367 -0
  179. package/core/skills/parallel-agents/SKILL.md +175 -0
  180. package/core/skills/performance-profiling/SKILL.md +143 -0
  181. package/core/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
  182. package/core/skills/plan-writing/SKILL.md +190 -0
  183. package/core/skills/powershell-windows/SKILL.md +167 -0
  184. package/core/skills/project-foundation/SKILL.md +117 -0
  185. package/core/skills/project-setup/SKILL.md +141 -0
  186. package/core/skills/project-tracking-patterns/SKILL.md +357 -0
  187. package/core/skills/project-type-discovery/SKILL.md +239 -0
  188. package/core/skills/python-patterns/SKILL.md +441 -0
  189. package/core/skills/qa-test-generation/SKILL.md +156 -0
  190. package/core/skills/react-components/README.md +36 -0
  191. package/core/skills/react-components/SKILL.md +47 -0
  192. package/core/skills/react-components/examples/gold-standard-card.tsx +80 -0
  193. package/core/skills/react-components/package-lock.json +231 -0
  194. package/core/skills/react-components/package.json +16 -0
  195. package/core/skills/react-components/resources/architecture-checklist.md +15 -0
  196. package/core/skills/react-components/resources/component-template.tsx +37 -0
  197. package/core/skills/react-components/resources/stitch-api-reference.md +14 -0
  198. package/core/skills/react-components/resources/style-guide.json +27 -0
  199. package/core/skills/react-components/scripts/fetch-stitch.sh +30 -0
  200. package/core/skills/react-components/scripts/validate.js +68 -0
  201. package/core/skills/red-team-tactics/SKILL.md +199 -0
  202. package/core/skills/remotion/README.md +105 -0
  203. package/core/skills/remotion/SKILL.md +393 -0
  204. package/core/skills/remotion/examples/WalkthroughComposition.tsx +78 -0
  205. package/core/skills/remotion/examples/screens.json +56 -0
  206. package/core/skills/remotion/resources/composition-checklist.md +124 -0
  207. package/core/skills/remotion/resources/screen-slide-template.tsx +123 -0
  208. package/core/skills/remotion/scripts/download-stitch-asset.sh +38 -0
  209. package/core/skills/seo-fundamentals/SKILL.md +129 -0
  210. package/core/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  211. package/core/skills/server-management/SKILL.md +161 -0
  212. package/core/skills/session-resilience/SKILL.md +199 -0
  213. package/core/skills/shadcn-ui/README.md +248 -0
  214. package/core/skills/shadcn-ui/SKILL.md +326 -0
  215. package/core/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
  216. package/core/skills/shadcn-ui/examples/data-table.tsx +313 -0
  217. package/core/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
  218. package/core/skills/shadcn-ui/resources/component-catalog.md +481 -0
  219. package/core/skills/shadcn-ui/resources/customization-guide.md +516 -0
  220. package/core/skills/shadcn-ui/resources/migration-guide.md +463 -0
  221. package/core/skills/shadcn-ui/resources/setup-guide.md +412 -0
  222. package/core/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
  223. package/core/skills/state-machine/SKILL.md +264 -0
  224. package/core/skills/stitch-loop/README.md +54 -0
  225. package/core/skills/stitch-loop/SKILL.md +203 -0
  226. package/core/skills/stitch-loop/examples/SITE.md +73 -0
  227. package/core/skills/stitch-loop/examples/next-prompt.md +25 -0
  228. package/core/skills/stitch-loop/resources/baton-schema.md +61 -0
  229. package/core/skills/stitch-loop/resources/site-template.md +104 -0
  230. package/core/skills/systematic-debugging/SKILL.md +109 -0
  231. package/core/skills/tailwind-patterns/SKILL.md +284 -0
  232. package/core/skills/tdd-validation/SKILL.md +243 -0
  233. package/core/skills/tdd-workflow/SKILL.md +284 -0
  234. package/core/skills/testing-patterns/SKILL.md +196 -0
  235. package/core/skills/testing-patterns/scripts/test_runner.py +219 -0
  236. package/core/skills/ui-ux-discovery/SKILL.md +329 -0
  237. package/core/skills/ui-validation/SKILL.md +190 -0
  238. package/core/skills/ui-validation/scripts/ui_antipattern_check.py +317 -0
  239. package/core/skills/verification-gate/SKILL.md +205 -0
  240. package/core/skills/vulnerability-scanner/SKILL.md +276 -0
  241. package/core/skills/vulnerability-scanner/checklists.md +121 -0
  242. package/core/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  243. package/core/skills/web-design-guidelines/SKILL.md +57 -0
  244. package/core/skills/webapp-testing/SKILL.md +187 -0
  245. package/core/skills/webapp-testing/scripts/playwright_runner.py +173 -0
  246. package/core/templates/ARCHITECTURE.template.md +407 -0
  247. package/core/templates/project-resources.example.json +71 -0
  248. package/core/workflows/atomic.md +182 -0
  249. package/core/workflows/brainstorm.md +134 -0
  250. package/core/workflows/check-task.md +242 -0
  251. package/core/workflows/copy-collect.md +306 -0
  252. package/core/workflows/create-agent.md +33 -0
  253. package/core/workflows/create-skill.md +39 -0
  254. package/core/workflows/create-workflow.md +33 -0
  255. package/core/workflows/create.md +92 -0
  256. package/core/workflows/debug.md +186 -0
  257. package/core/workflows/demand.md +443 -0
  258. package/core/workflows/deploy.md +260 -0
  259. package/core/workflows/discovery.md +267 -0
  260. package/core/workflows/document.md +272 -0
  261. package/core/workflows/ds-components.md +296 -0
  262. package/core/workflows/ds-init.md +58 -0
  263. package/core/workflows/ds-refactor.md +245 -0
  264. package/core/workflows/ds-references.md +197 -0
  265. package/core/workflows/ds-styleguide.md +237 -0
  266. package/core/workflows/ds-token-diff.md +103 -0
  267. package/core/workflows/ds-tokens.md +317 -0
  268. package/core/workflows/ds-validate.md +309 -0
  269. package/core/workflows/execute.md +483 -0
  270. package/core/workflows/extract-template.md +278 -0
  271. package/core/workflows/fix-failed-tests.md +160 -0
  272. package/core/workflows/init-project.md +386 -0
  273. package/core/workflows/legacy-project.md +849 -0
  274. package/core/workflows/log.md +97 -0
  275. package/core/workflows/new-project.md +610 -0
  276. package/core/workflows/new-project.md.bak +3292 -0
  277. package/core/workflows/new-task.md +404 -0
  278. package/core/workflows/orchestrate.md +237 -0
  279. package/core/workflows/page-build.md +296 -0
  280. package/core/workflows/plan.md +89 -0
  281. package/core/workflows/prd.md +255 -0
  282. package/core/workflows/preview.md +81 -0
  283. package/core/workflows/review-page.md +304 -0
  284. package/core/workflows/status.md +86 -0
  285. package/core/workflows/stitch.md +226 -0
  286. package/core/workflows/task-complete.md +473 -0
  287. package/core/workflows/task-update.md +163 -0
  288. package/core/workflows/tdd.md +344 -0
  289. package/core/workflows/test.md +251 -0
  290. package/core/workflows/ui-ux-pro-max.md +437 -0
  291. package/core/workflows/ux-mobile-optimize.md +262 -0
  292. package/core/workflows/ux-mobile-validate.md +297 -0
  293. package/engine-files/GEMINI.md +69 -0
  294. package/package.json +47 -0
  295. package/runtime-adapters/antigravity.js +26 -0
  296. package/runtime-adapters/claude.js +57 -0
  297. package/runtime-adapters/codex.js +51 -0
  298. package/runtime-adapters/copilot.js +51 -0
  299. package/runtime-adapters/cursor.js +51 -0
  300. package/runtime-adapters/gemini-cli.js +30 -0
  301. package/runtime-adapters/opencode.js +51 -0
  302. package/runtime-adapters/windsurf.js +51 -0
@@ -0,0 +1,373 @@
1
+ # Dynamic Question Generation
2
+
3
+ > **PRINCIPLE:** Questions are not about gathering data—they are about **revealing architectural consequences**.
4
+ >
5
+ > Every question must connect to a concrete implementation decision that affects cost, complexity, or timeline.
6
+
7
+ ---
8
+
9
+ ## 🧠 Core Principles
10
+
11
+ ### 1. Questions Reveal Consequences
12
+
13
+ A good question is not "What color do you want?" but:
14
+
15
+ ```markdown
16
+ ❌ BAD: "What authentication method?"
17
+ ✅ GOOD: "Should users sign up with email/password or social login?
18
+
19
+ Impact:
20
+ - Email/Pass → Need password reset, hashing, 2FA infrastructure
21
+ - Social → OAuth providers, user profile mapping, less control
22
+
23
+ Trade-off: Security vs. Development time vs. User friction"
24
+ ```
25
+
26
+ ### 2. Context Before Content
27
+
28
+ First understand **where** this request fits:
29
+
30
+ | Context | Question Focus |
31
+ |---------|----------------|
32
+ | **Greenfield** (new project) | Foundation decisions: stack, hosting, scale |
33
+ | **Feature Addition** | Integration points, existing patterns, breaking changes |
34
+ | **Refactor** | Why refactor? Performance? Maintainability? What's broken? |
35
+ | **Debug** | Symptoms → Root cause → Reproduction path |
36
+
37
+ ### 3. Minimum Viable Questions
38
+
39
+ **PRINCIPLE:** Each question must eliminate a fork in the implementation road.
40
+
41
+ ```
42
+ Before Question:
43
+ ├── Path A: Do X (5 min)
44
+ ├── Path B: Do Y (15 min)
45
+ └── Path C: Do Z (1 hour)
46
+
47
+ After Question:
48
+ └── Path Confirmed: Do X (5 min)
49
+ ```
50
+
51
+ If a question doesn't reduce implementation paths → **DELETE IT**.
52
+
53
+ ### 4. Questions Generate Data, Not Assumptions
54
+
55
+ ```markdown
56
+ ❌ ASSUMPTION: "User probably wants Stripe for payments"
57
+ ✅ QUESTION: "Which payment provider fits your needs?
58
+
59
+ Stripe → Best documentation, 2.9% + $0.30, US-centric
60
+ LemonSqueezy → Merchant of Record, 5% + $0.50, global taxes
61
+ Paddle → Complex pricing, handles EU VAT, enterprise focus"
62
+ ```
63
+
64
+ ---
65
+
66
+ ## 📋 Question Generation Algorithm
67
+
68
+ ```
69
+ INPUT: User request + Context (greenfield/feature/refactor/debug)
70
+
71
+ ├── STEP 1: Parse Request
72
+ │ ├── Extract domain (ecommerce, auth, realtime, cms, etc.)
73
+ │ ├── Extract features (explicit and implied)
74
+ │ └── Extract scale indicators (users, data volume, frequency)
75
+
76
+ ├── STEP 2: Identify Decision Points
77
+ │ ├── What MUST be decided before coding? (blocking)
78
+ │ ├── What COULD be decided later? (deferable)
79
+ │ └── What has ARCHITECTURAL impact? (high-leverage)
80
+
81
+ ├── STEP 3: Generate Questions (Priority Order)
82
+ │ ├── P0: Blocking decisions (cannot proceed without answer)
83
+ │ ├── P1: High-leverage (affects >30% of implementation)
84
+ │ ├── P2: Medium-leverage (affects specific features)
85
+ │ └── P3: Nice-to-have (edge cases, optimization)
86
+
87
+ └── STEP 4: Format Each Question
88
+ ├── What: Clear question
89
+ ├── Why: Impact on implementation
90
+ ├── Options: Trade-offs (not just A vs B)
91
+ └── Default: What happens if user doesn't answer
92
+ ```
93
+
94
+ ---
95
+
96
+ ## 🎯 Domain-Specific Question Banks
97
+
98
+ ### E-Commerce
99
+
100
+ | Question | Why It Matters | Trade-offs |
101
+ |----------|----------------|------------|
102
+ | **Single or Multi-vendor?** | Multi-vendor → Commission logic, vendor dashboards, split payments | +Revenue, -Complexity |
103
+ | **Inventory Tracking?** | Needs stock tables, reservation logic, low-stock alerts | +Accuracy, -Development time |
104
+ | **Digital or Physical Products?** | Digital → Download links, no shipping | Physical → Shipping APIs, tracking |
105
+ | **Subscription or One-time?** | Subscription → Recurring billing, dunning, proration | +Revenue, -Complexity |
106
+
107
+ ### Authentication
108
+
109
+ | Question | Why It Matters | Trade-offs |
110
+ |----------|----------------|------------|
111
+ | **Social Login Needed?** | OAuth providers vs. password reset infrastructure | +UX, -Control |
112
+ | **Role-Based Permissions?** | RBAC tables, policy enforcement, admin UI | +Security, -Development time |
113
+ | **2FA Required?** | TOTP/SMI infrastructure, backup codes, recovery flow | +Security, -UX friction |
114
+ | **Email Verification?** | Verification tokens, email service, resend logic | +Security, -Sign-up friction |
115
+
116
+ ### Real-time
117
+
118
+ | Question | Why It Matters | Trade-offs |
119
+ |----------|----------------|------------|
120
+ | **WebSocket or Polling?** | WS → Server scaling, connection management | Polling → Simpler, higher latency |
121
+ | **Expected Concurrent Users?** | <100 → Single server, >1000 → Redis pub/sub, >10k → specialized infra | +Scale, -Complexity |
122
+ | **Message Persistence?** | History tables, storage costs, pagination | +UX, -Storage |
123
+ | **Ephemeral or Durable?** | Ephemeral → In-memory, Durable → Database write before emit | +Reliability, -Latency |
124
+
125
+ ### Content/CMS
126
+
127
+ | Question | Why It Matters | Trade-offs |
128
+ |----------|----------------|------------|
129
+ | **Rich Text or Markdown?** | Rich Text → Sanitization, XSS risks | Markdown → Simple, no WYSIWYG |
130
+ | **Draft/Publish Workflow?** | Status field, scheduled jobs, versioning | +Control, -Complexity |
131
+ | **Media Handling?** | Upload endpoints, storage, optimization | +Features, -Development time |
132
+ | **Multi-language?** | i18n tables, translation UI, fallback logic | +Reach, -Complexity |
133
+
134
+ ### Infrastructure/DevOps
135
+
136
+ | Question | Why It Matters | Trade-offs |
137
+ |----------|----------------|------------|
138
+ | **Which environments needed?** | Dev/Staging/Prod → Isolation, DB separation, secrets management | +Safety, -Cost |
139
+ | **Managed or Self-hosted?** | Vercel/Railway → Simple but less control | VPS → Full control but maintenance |
140
+ | **CI/CD Strategy?** | GitHub Actions → Free, integrated | GitLab CI → More features | Manual → Error prone |
141
+ | **Secrets Management?** | Platform secrets, Vault, .env files, dotenv-vault | +Security, -Complexity |
142
+ | **Monitoring Needed?** | Logs, APM, Uptime checks, Error tracking | +Visibility, -Cost |
143
+ | **Database per Environment?** | Shared → Cheaper but risky | Isolated → Safer but more cost |
144
+ | **Rollback Strategy?** | Git revert, Previous deploy, Blue-green | +Safety, -Complexity |
145
+ | **Budget Constraints?** | Free tier limits, scaling costs, vendor lock-in | +Cost control, -Flexibility |
146
+
147
+ ### Monetization/SaaS
148
+
149
+ | Question | Why It Matters | Trade-offs |
150
+ |----------|----------------|------------|
151
+ | **Payment Provider?** | Stripe → Best docs | Paddle → MoR | LemonSqueezy → Simple | +Rev, -Fees |
152
+ | **Subscription Model?** | Monthly/Annual, tiered plans, usage-based | +Revenue, -Complexity |
153
+ | **Free Tier Exists?** | Freemium funnel, conversion tracking | +Adoption, -Revenue |
154
+ | **Feature Gating?** | Plan-based access, soft limits, hard limits | +Upsell, -Development |
155
+ | **Trial Period?** | Duration, credit card required, conversion | +Adoption, -Support |
156
+
157
+ ---
158
+
159
+ ## 📐 Dynamic Question Template
160
+
161
+ ```markdown
162
+ Based on your request for [DOMAIN] [FEATURE]:
163
+
164
+ ## 🔴 CRITICAL (Blocking Decisions)
165
+
166
+ ### 1. **[DECISION POINT]**
167
+
168
+ **Question:** [Clear, specific question]
169
+
170
+ **Why This Matters:**
171
+ - [Explain architectural consequence]
172
+ - [Affects: cost / complexity / timeline / scale]
173
+
174
+ **Options:**
175
+ | Option | Pros | Cons | Best For |
176
+ |--------|------|------|----------|
177
+ | A | [Advantage] | [Disadvantage] | [Use case] |
178
+ | B | [Advantage] | [Disadvantage] | [Use case] |
179
+
180
+ **If Not Specified:** [Default choice + rationale]
181
+
182
+ ---
183
+
184
+ ## 🟡 HIGH-LEVERAGE (Affects Implementation)
185
+
186
+ ### 2. **[DECISION POINT]**
187
+ [Same format]
188
+
189
+ ---
190
+
191
+ ## 🟢 NICE-TO-HAVE (Edge Cases)
192
+
193
+ ### 3. **[DECISION POINT]**
194
+ [Same format]
195
+ ```
196
+
197
+ ---
198
+
199
+ ## 🔄 Iterative Questioning
200
+
201
+ ### First Pass (3-5 Questions)
202
+ Focus on **blocking decisions**. Don't proceed without answers.
203
+
204
+ ### Second Pass (After Initial Implementation)
205
+ As patterns emerge, ask:
206
+ - "This feature implies [X]. Should we handle [edge case] now or defer?"
207
+ - "We're using [Pattern A]. Should [Feature B] follow the same pattern?"
208
+
209
+ ### Third Pass (Optimization)
210
+ When functionality works:
211
+ - "Performance bottleneck at [X]. Optimize now or acceptable for now?"
212
+ - "Refactor [Y] for maintainability or ship as-is?"
213
+
214
+ ---
215
+
216
+ ## 🎭 Example: Full Question Generation
217
+
218
+ ```
219
+ USER REQUEST: "Build an Instagram clone"
220
+
221
+ STEP 1: Parse
222
+ ├── Domain: Social Media
223
+ ├── Features: Photo sharing, engagement (likes/comments), user profiles
224
+ ├── Implied: Feed, following, authentication
225
+ └── Scale: Potentially high (social apps go viral)
226
+
227
+ STEP 2: Decision Points
228
+ ├── Blocking: Storage strategy, authentication method, feed type
229
+ ├── High-leverage: Real-time notifications, data model complexity
230
+ └── Deferable: Analytics, advanced search, reels/video
231
+
232
+ STEP 3: Generate Questions (Priority)
233
+
234
+ P0 (Blocking):
235
+ 1. Storage Strategy → Affects architecture, cost, speed
236
+ 2. Feed Algorithm → Affects database queries, complexity
237
+ 3. Auth Method → Affects dev time, UX, security
238
+
239
+ P1 (High-leverage):
240
+ 4. Real-time Notifications → WebSocket vs polling
241
+ 5. Media Processing → Client-side vs server-side optimization
242
+
243
+ P2 (Deferable):
244
+ 6. Story/Reels → Major feature creep, defer to v2
245
+ 7. DM/Chat → Separate subsystem, defer to v2
246
+
247
+ STEP 4: Format Output
248
+ ```
249
+
250
+ ---
251
+
252
+ ## 📊 Generated Output (Example)
253
+
254
+ ```
255
+ Based on your Instagram clone request:
256
+
257
+ ## 🔴 CRITICAL DECISIONS (Cannot Proceed Without Answers)
258
+
259
+ ### 1. **Photo Storage Strategy**
260
+
261
+ **Question:** Where will user photos be stored and served?
262
+
263
+ **Why This Matters:**
264
+ - Affects: Monthly hosting costs, page load speed, CDN complexity
265
+ - High-volume social apps: 1000 users × 10 photos × 2MB = 20GB storage
266
+
267
+ **Options:**
268
+ | Option | Cost | Speed | Complexity | Best For |
269
+ |--------|------|-------|------------|----------|
270
+ | **Cloudinary** | $89/mo (25GB) | Fast (CDN) | Low | MVP, rapid launch |
271
+ | **AWS S3 + CloudFront** | $0.023/GB | Fast (CDN) | Medium | Production, cost-optimized |
272
+ | **Supabase Storage** | Free tier 1GB | Medium | Low | Small scale, simple |
273
+ | **Local Storage** | Server cost | Slow | Low | Development only |
274
+
275
+ **If Not Specified:** Cloudinary (balanced for MVP)
276
+
277
+ ---
278
+
279
+ ### 2. **Feed Algorithm Choice**
280
+
281
+ **Question:** How should the main feed work?
282
+
283
+ **Why This Matters:**
284
+ - Affects: Database query complexity, caching strategy, development time
285
+ - Algorithmic feeds require ML infrastructure, ranking signals
286
+
287
+ **Options:**
288
+ | Option | Complexity | Database Impact | Best For |
289
+ |--------|------------|-----------------|----------|
290
+ | **Chronological** | Low | Simple query | Early stage, transparency |
291
+ | **Follow-Only** | Medium | JOIN with pagination | Most social apps |
292
+ | **Algorithmic** | High | Pre-computed feed tables | Instagram competitor |
293
+
294
+ **If Not Specified:** Follow-Only (balanced for social app)
295
+
296
+ ---
297
+
298
+ ### 3. **Authentication Approach**
299
+
300
+ **Question:** How do users sign up and login?
301
+
302
+ **Why This Matters:**
303
+ - Affects: Development time (2-5 hours), security posture, UX friction
304
+
305
+ **Options:**
306
+ | Option | Dev Time | Security | UX | Best For |
307
+ |--------|----------|----------|-----|----------|
308
+ | **Email/Password** | 4-5 hrs | High (if 2FA) | Medium | Full control needed |
309
+ | **Social Only** | 1-2 hrs | Provider-dependent | Smooth | B2C, rapid launch |
310
+ | **Magic Link** | 2-3 hrs | Medium | Very smooth | Security-focused |
311
+ | **Clerk/Auth0** | 1 hr | High | Smooth | Fastest to market |
312
+
313
+ **If Not Specified:** Clerk (fastest for MVP)
314
+
315
+ ---
316
+
317
+ ## 🟡 HIGH-LEVERAGE (Affects Architecture)
318
+
319
+ ### 4. **Real-time Notifications**
320
+
321
+ **Question:** Do users need instant notifications for likes/comments?
322
+
323
+ **Why This Matters:**
324
+ - WebSocket adds infrastructure complexity (Redis pub/sub for scaling)
325
+ - Polling is simpler but higher latency
326
+
327
+ **Options:**
328
+ | Option | Complexity | Scale Cost | Best For |
329
+ |--------|------------|------------|----------|
330
+ | **WebSocket + Redis** | High | $10+/mo | >1000 concurrent users |
331
+ | **Polling (30s)** | Low | DB queries | <1000 users |
332
+ | **No Real-time** | None | None | MVP, validate first |
333
+
334
+ **If Not Specified:** Polling for MVP (defer WebSocket until validated)
335
+
336
+ ---
337
+
338
+ ## 🟢 NICE-TO-HAVE (Defer to v2)
339
+
340
+ ### 5. **Video/Reels Support**
341
+ - Major complexity (video processing, streaming infrastructure)
342
+ - Recommendation: Launch with photos only, add video after validation
343
+
344
+ ### 6. **Direct Messaging**
345
+ - Separate subsystem (chat infrastructure different from feed)
346
+ - Recommendation: Use Pusher/Stream for real-time or defer entirely
347
+
348
+ ---
349
+
350
+ ## 📋 Summary
351
+
352
+ | Decision | Recommendation | If Changed |
353
+ |----------|----------------|------------|
354
+ | Storage | Cloudinary | +3 hrs setup |
355
+ | Feed | Follow-only | +2 hrs query optimization |
356
+ | Auth | Clerk | -3 hrs dev time |
357
+ | Real-time | Polling | +5 hrs WebSocket setup |
358
+ | Video | Defer to v2 | N/A |
359
+ | DM | Defer to v2 | N/A |
360
+
361
+ **Total Estimated MVP Time:** 15-20 hours with recommendations above
362
+ ```
363
+
364
+ ---
365
+
366
+ ## 🎯 Principles Recap
367
+
368
+ 1. **Every question = Architectural decision** → Not data gathering
369
+ 2. **Show trade-offs** → User understands consequences
370
+ 3. **Prioritize blocking decisions** → Cannot proceed without
371
+ 4. **Provide defaults** → If user doesn't answer, we proceed anyway
372
+ 5. **Domain-aware** → Ecommerce questions ≠ Auth questions ≠ Real-time questions
373
+ 6. **Iterative** → More questions as patterns emerge during implementation
@@ -0,0 +1,163 @@
1
+ ---
2
+ name: checkpointing-patterns
3
+ description: Sistema de checkpoint/resume para workflows longos. Persistência de estado, retomada de execução, gates de saída por fase.
4
+ ---
5
+
6
+ # Checkpointing Patterns
7
+
8
+ > **Single Source of Truth** para workflows que precisam persistir estado e retomar execução.
9
+
10
+ ---
11
+
12
+ ## 🎯 PROPÓSITO
13
+
14
+ Garantir que workflows longos:
15
+ 1. **Salvem progresso** a cada fase
16
+ 2. **Retomem corretamente** de onde pararam
17
+ 3. **Mantenham histórico** de ações
18
+
19
+ ---
20
+
21
+ ## 📁 ESTRUTURA DO ARQUIVO DE CHECKPOINT
22
+
23
+ **Padrão de nome:** `docs/{WORKFLOW}-PROGRESS.md`
24
+
25
+ | Workflow | Arquivo |
26
+ |----------|---------|
27
+ | `/new-task` | `docs/NEW-TASK-PROGRESS.md` |
28
+ | `/legacy-project` | `docs/LEGACY-PROGRESS.md` |
29
+ | `/new-project` | `docs/PROJECT-PROGRESS.md` |
30
+
31
+ ---
32
+
33
+ ## 📋 TEMPLATE PADRÃO
34
+
35
+ ```markdown
36
+ # {Workflow} Progress - {nome}
37
+
38
+ > Arquivo de controle para retomar workflow.
39
+ > ⚠️ NÃO EDITAR MANUALMENTE - Atualizado automaticamente.
40
+
41
+ ## 📊 Status Geral
42
+
43
+ | Campo | Valor |
44
+ |-------|-------|
45
+ | Nome | {nome} |
46
+ | Iniciado em | {data} |
47
+ | Última atualização | {data} |
48
+ | Status | 🟡 Em Progresso |
49
+ | Fase Atual | {N}/{Total} |
50
+
51
+ ---
52
+
53
+ ## 📝 Fases
54
+
55
+ ### Fase 1: {Nome} ✅
56
+ - [x] Item 1
57
+ - [x] Item 2
58
+
59
+ ### Fase 2: {Nome} 🟡
60
+ - [x] Item 1
61
+ - [ ] Item 2 ← pendente
62
+
63
+ ### Fase 3: {Nome} ⏳
64
+ - [ ] Aguardando
65
+
66
+ ---
67
+
68
+ ## 📜 Histórico de Ações
69
+
70
+ | Data | Fase | Ação |
71
+ |------|------|------|
72
+ | {data} | 1 | {ação} |
73
+ | {data} | 2 | {ação} |
74
+ ```
75
+
76
+ ---
77
+
78
+ ## 🔄 CICLO DE VIDA
79
+
80
+ ```
81
+ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
82
+ │ INICIAR │───►│ SALVAR │───►│ ATUALIZAR │
83
+ │ (Criar) │ │ (Por fase) │ │ (Loop) │
84
+ └─────────────┘ └─────────────┘ └──────┬──────┘
85
+
86
+ ┌─────────────┐ │
87
+ │ RETOMAR │◄──────────┘
88
+ │ (--resume) │
89
+ └─────────────┘
90
+ ```
91
+
92
+ ---
93
+
94
+ ## 📋 OPERAÇÕES PADRÃO
95
+
96
+ ### 1. Criar Checkpoint (Início)
97
+
98
+ ```markdown
99
+ # Ao iniciar workflow:
100
+ 1. Verificar se existe `docs/{WORKFLOW}-PROGRESS.md`
101
+ 2. Se existe:
102
+ - Perguntar: "Retomar ou reiniciar?"
103
+ 3. Se não existe:
104
+ - Criar arquivo com template padrão
105
+ - Registrar data de início
106
+ ```
107
+
108
+ ### 2. Salvar Progresso (Por Fase)
109
+
110
+ ```markdown
111
+ # Ao concluir CADA fase:
112
+ 1. Atualizar `Fase Atual` no arquivo
113
+ 2. Marcar itens como concluídos [x]
114
+ 3. Adicionar linha no Histórico
115
+ 4. Atualizar `Última atualização`
116
+ ```
117
+
118
+ ### 3. Retomar (--resume)
119
+
120
+ ```markdown
121
+ # Ao executar --resume:
122
+ 1. Carregar `docs/{WORKFLOW}-PROGRESS.md`
123
+ 2. Identificar `Fase Atual`
124
+ 3. Identificar itens pendentes na fase
125
+ 4. Continuar execução
126
+ ```
127
+
128
+ ### 4. Finalizar
129
+
130
+ ```markdown
131
+ # Ao concluir workflow:
132
+ 1. Atualizar Status para "✅ Concluído"
133
+ 2. Registrar data de conclusão
134
+ 3. Opcionalmente: arquivar ou deletar
135
+ ```
136
+
137
+ ---
138
+
139
+ ## ⚠️ GATES DE SAÍDA
140
+
141
+ > [!IMPORTANT]
142
+ > Cada fase deve ter um **Gate de Saída** - checklist que DEVE ser satisfeito antes de prosseguir.
143
+
144
+ ### Formato do Gate
145
+
146
+ ```markdown
147
+ **Gate de Saída - Fase {N}:**
148
+ - [ ] Item obrigatório 1
149
+ - [ ] Item obrigatório 2
150
+ - [ ] Item obrigatório 3
151
+
152
+ > **BLOQUEADOR:** Não prosseguir até que todos os itens estejam ✅
153
+ ```
154
+
155
+ ---
156
+
157
+ ## 🔗 WORKFLOWS QUE USAM ESTA SKILL
158
+
159
+ | Workflow | Arquivo de Checkpoint |
160
+ |----------|----------------------|
161
+ | `/new-task` | `docs/NEW-TASK-PROGRESS.md` |
162
+ | `/legacy-project` | `docs/LEGACY-PROGRESS.md` |
163
+ | `/new-project` | `docs/PROJECT-PROGRESS.md` |