@mrtrinhvn/ag-kit 1.0.11 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +31 -0
  2. package/bin/cli.js +72 -0
  3. package/package.json +7 -1
  4. package/template/.agent/knowledge/orchestrator_v3_protocol.md +60 -0
  5. package/template/.agent/knowledge/self_healing_logs.md +22 -0
  6. package/{.agent → template/.agent}/skills/telegram-agentic-gateway/SKILL.md +0 -0
  7. package/template/.agent/skills/vfs-assistant/SKILL.md +39 -0
  8. package/.agent/agents/backend-specialist.md +0 -263
  9. package/.agent/agents/code-archaeologist.md +0 -106
  10. package/.agent/agents/database-architect.md +0 -226
  11. package/.agent/agents/debugger.md +0 -225
  12. package/.agent/agents/devops-engineer.md +0 -242
  13. package/.agent/agents/documentation-writer.md +0 -104
  14. package/.agent/agents/explorer-agent.md +0 -73
  15. package/.agent/agents/frontend-specialist.md +0 -556
  16. package/.agent/agents/game-developer.md +0 -162
  17. package/.agent/agents/mobile-developer.md +0 -377
  18. package/.agent/agents/orchestrator.md +0 -416
  19. package/.agent/agents/penetration-tester.md +0 -188
  20. package/.agent/agents/performance-optimizer.md +0 -187
  21. package/.agent/agents/product-manager.md +0 -112
  22. package/.agent/agents/product-owner.md +0 -95
  23. package/.agent/agents/project-planner.md +0 -406
  24. package/.agent/agents/qa-automation-engineer.md +0 -103
  25. package/.agent/agents/quant-architect.md +0 -31
  26. package/.agent/agents/security-auditor.md +0 -170
  27. package/.agent/agents/seo-specialist.md +0 -111
  28. package/.agent/agents/test-engineer.md +0 -158
  29. package/.agent/rules/GEMINI.md +0 -280
  30. package/.agent/scripts/auto_preview.py +0 -148
  31. package/.agent/scripts/checklist.py +0 -217
  32. package/.agent/scripts/session_manager.py +0 -120
  33. package/.agent/scripts/verify_all.py +0 -327
  34. package/.agent/skills/api-patterns/SKILL.md +0 -81
  35. package/.agent/skills/api-patterns/api-style.md +0 -42
  36. package/.agent/skills/api-patterns/auth.md +0 -24
  37. package/.agent/skills/api-patterns/documentation.md +0 -26
  38. package/.agent/skills/api-patterns/graphql.md +0 -41
  39. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  40. package/.agent/skills/api-patterns/response.md +0 -37
  41. package/.agent/skills/api-patterns/rest.md +0 -40
  42. package/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
  43. package/.agent/skills/api-patterns/security-testing.md +0 -122
  44. package/.agent/skills/api-patterns/trpc.md +0 -41
  45. package/.agent/skills/api-patterns/versioning.md +0 -22
  46. package/.agent/skills/app-builder/SKILL.md +0 -75
  47. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  48. package/.agent/skills/app-builder/feature-building.md +0 -53
  49. package/.agent/skills/app-builder/project-detection.md +0 -34
  50. package/.agent/skills/app-builder/scaffolding.md +0 -118
  51. package/.agent/skills/app-builder/tech-stack.md +0 -40
  52. package/.agent/skills/app-builder/templates/SKILL.md +0 -39
  53. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  54. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  55. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  56. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  57. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  58. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  59. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  60. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -82
  61. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -100
  62. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -106
  63. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -101
  64. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  65. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -93
  66. package/.agent/skills/architecture/SKILL.md +0 -55
  67. package/.agent/skills/architecture/context-discovery.md +0 -43
  68. package/.agent/skills/architecture/examples.md +0 -94
  69. package/.agent/skills/architecture/pattern-selection.md +0 -68
  70. package/.agent/skills/architecture/patterns-reference.md +0 -50
  71. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  72. package/.agent/skills/bash-linux/SKILL.md +0 -199
  73. package/.agent/skills/behavioral-modes/SKILL.md +0 -242
  74. package/.agent/skills/brainstorming/SKILL.md +0 -168
  75. package/.agent/skills/brainstorming/dynamic-questioning.md +0 -350
  76. package/.agent/skills/business-ops/SKILL.md +0 -26
  77. package/.agent/skills/clean-code/SKILL.md +0 -202
  78. package/.agent/skills/cli-generator/SKILL.md +0 -48
  79. package/.agent/skills/code-review-checklist/SKILL.md +0 -109
  80. package/.agent/skills/cognitive-session/SKILL.md +0 -28
  81. package/.agent/skills/data-science/SKILL.md +0 -28
  82. package/.agent/skills/database-design/SKILL.md +0 -52
  83. package/.agent/skills/database-design/database-selection.md +0 -43
  84. package/.agent/skills/database-design/indexing.md +0 -39
  85. package/.agent/skills/database-design/migrations.md +0 -48
  86. package/.agent/skills/database-design/optimization.md +0 -36
  87. package/.agent/skills/database-design/orm-selection.md +0 -30
  88. package/.agent/skills/database-design/schema-design.md +0 -56
  89. package/.agent/skills/database-design/scripts/schema_validator.py +0 -172
  90. package/.agent/skills/deployment-procedures/SKILL.md +0 -241
  91. package/.agent/skills/doc.md +0 -177
  92. package/.agent/skills/documentation-templates/SKILL.md +0 -194
  93. package/.agent/skills/frontend-design/SKILL.md +0 -418
  94. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  95. package/.agent/skills/frontend-design/color-system.md +0 -311
  96. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  97. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  98. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +0 -183
  99. package/.agent/skills/frontend-design/scripts/ux_audit.py +0 -722
  100. package/.agent/skills/frontend-design/typography-system.md +0 -345
  101. package/.agent/skills/frontend-design/ux-psychology.md +0 -541
  102. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  103. package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
  104. package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
  105. package/.agent/skills/game-development/SKILL.md +0 -167
  106. package/.agent/skills/game-development/game-art/SKILL.md +0 -185
  107. package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
  108. package/.agent/skills/game-development/game-design/SKILL.md +0 -129
  109. package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
  110. package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
  111. package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
  112. package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
  113. package/.agent/skills/game-development/web-games/SKILL.md +0 -150
  114. package/.agent/skills/geo-fundamentals/SKILL.md +0 -156
  115. package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +0 -289
  116. package/.agent/skills/i18n-localization/SKILL.md +0 -154
  117. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  118. package/.agent/skills/intelligent-routing/SKILL.md +0 -335
  119. package/.agent/skills/knowledge-management/SKILL.md +0 -66
  120. package/.agent/skills/lint-and-validate/SKILL.md +0 -45
  121. package/.agent/skills/lint-and-validate/scripts/lint_runner.py +0 -172
  122. package/.agent/skills/lint-and-validate/scripts/type_coverage.py +0 -173
  123. package/.agent/skills/llm-routing-quirks/SKILL.md +0 -41
  124. package/.agent/skills/mcp-builder/SKILL.md +0 -176
  125. package/.agent/skills/memory-architecture/SKILL.md +0 -107
  126. package/.agent/skills/mini-antigravity-injection/SKILL.md +0 -66
  127. package/.agent/skills/mobile-design/SKILL.md +0 -394
  128. package/.agent/skills/mobile-design/decision-trees.md +0 -516
  129. package/.agent/skills/mobile-design/mobile-backend.md +0 -491
  130. package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
  131. package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
  132. package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
  133. package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
  134. package/.agent/skills/mobile-design/mobile-performance.md +0 -767
  135. package/.agent/skills/mobile-design/mobile-testing.md +0 -356
  136. package/.agent/skills/mobile-design/mobile-typography.md +0 -433
  137. package/.agent/skills/mobile-design/platform-android.md +0 -666
  138. package/.agent/skills/mobile-design/platform-ios.md +0 -561
  139. package/.agent/skills/mobile-design/scripts/mobile_audit.py +0 -670
  140. package/.agent/skills/mobile-design/touch-psychology.md +0 -537
  141. package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  142. package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  143. package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  144. package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  145. package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  146. package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  147. package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  148. package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  149. package/.agent/skills/nextjs-react-expert/SKILL.md +0 -267
  150. package/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
  151. package/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
  152. package/.agent/skills/nodejs-best-practices/SKILL.md +0 -333
  153. package/.agent/skills/parallel-agents/SKILL.md +0 -175
  154. package/.agent/skills/performance-profiling/SKILL.md +0 -143
  155. package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
  156. package/.agent/skills/plan-writing/SKILL.md +0 -153
  157. package/.agent/skills/powershell-windows/SKILL.md +0 -167
  158. package/.agent/skills/product-management/SKILL.md +0 -30
  159. package/.agent/skills/python-patterns/SKILL.md +0 -441
  160. package/.agent/skills/red-team-tactics/SKILL.md +0 -199
  161. package/.agent/skills/seo-fundamentals/SKILL.md +0 -129
  162. package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
  163. package/.agent/skills/server-management/SKILL.md +0 -161
  164. package/.agent/skills/systematic-debugging/SKILL.md +0 -120
  165. package/.agent/skills/tailwind-patterns/SKILL.md +0 -269
  166. package/.agent/skills/tdd-workflow/SKILL.md +0 -148
  167. package/.agent/skills/testing-patterns/SKILL.md +0 -178
  168. package/.agent/skills/testing-patterns/scripts/test_runner.py +0 -219
  169. package/.agent/skills/vulnerability-scanner/SKILL.md +0 -276
  170. package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
  171. package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  172. package/.agent/skills/web-design-guidelines/SKILL.md +0 -57
  173. package/.agent/skills/webapp-testing/SKILL.md +0 -187
  174. package/.agent/skills/webapp-testing/scripts/playwright_runner.py +0 -173
  175. package/.agent/workflows/brainstorm.md +0 -113
  176. package/.agent/workflows/create.md +0 -59
  177. package/.agent/workflows/debug.md +0 -103
  178. package/.agent/workflows/deploy.md +0 -176
  179. package/.agent/workflows/enhance.md +0 -63
  180. package/.agent/workflows/orchestrate.md +0 -237
  181. package/.agent/workflows/plan.md +0 -89
  182. package/.agent/workflows/preview.md +0 -81
  183. package/.agent/workflows/status.md +0 -86
  184. package/.agent/workflows/test.md +0 -144
  185. package/.agent/workflows/ui-ux-pro-max.md +0 -296
  186. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/charts.csv +0 -0
  187. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/colors.csv +0 -0
  188. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/icons.csv +0 -0
  189. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/landing.csv +0 -0
  190. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/products.csv +0 -0
  191. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/prompts.csv +0 -0
  192. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/react-performance.csv +0 -0
  193. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/stacks/flutter.csv +0 -0
  194. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -0
  195. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -0
  196. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +0 -0
  197. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -0
  198. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -0
  199. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/stacks/react-native.csv +0 -0
  200. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/stacks/react.csv +0 -0
  201. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +0 -0
  202. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/stacks/svelte.csv +0 -0
  203. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +0 -0
  204. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/stacks/vue.csv +0 -0
  205. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/styles.csv +0 -0
  206. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/typography.csv +0 -0
  207. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/ui-reasoning.csv +0 -0
  208. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/ux-guidelines.csv +0 -0
  209. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/data/web-interface.csv +0 -0
  210. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  211. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  212. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/scripts/core.py +0 -0
  213. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/scripts/design_system.py +0 -0
  214. /package/{.agent → template/.agent}/.shared/ui-ux-pro-max/scripts/search.py +0 -0
  215. /package/{.agent → template/.agent}/ARCHITECTURE.md +0 -0
  216. /package/{.agent → template/.agent}/mcp_config.json +0 -0
  217. /package/{.agent → template/.agent}/skills/nextjs-react-expert/9-cache-components.md +0 -0
  218. /package/{.agent → template/.agent}/skills/rust-pro/SKILL.md +0 -0
@@ -1,350 +0,0 @@
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
- ---
135
-
136
- ## 📐 Dynamic Question Template
137
-
138
- ```markdown
139
- Based on your request for [DOMAIN] [FEATURE]:
140
-
141
- ## 🔴 CRITICAL (Blocking Decisions)
142
-
143
- ### 1. **[DECISION POINT]**
144
-
145
- **Question:** [Clear, specific question]
146
-
147
- **Why This Matters:**
148
- - [Explain architectural consequence]
149
- - [Affects: cost / complexity / timeline / scale]
150
-
151
- **Options:**
152
- | Option | Pros | Cons | Best For |
153
- |--------|------|------|----------|
154
- | A | [Advantage] | [Disadvantage] | [Use case] |
155
- | B | [Advantage] | [Disadvantage] | [Use case] |
156
-
157
- **If Not Specified:** [Default choice + rationale]
158
-
159
- ---
160
-
161
- ## 🟡 HIGH-LEVERAGE (Affects Implementation)
162
-
163
- ### 2. **[DECISION POINT]**
164
- [Same format]
165
-
166
- ---
167
-
168
- ## 🟢 NICE-TO-HAVE (Edge Cases)
169
-
170
- ### 3. **[DECISION POINT]**
171
- [Same format]
172
- ```
173
-
174
- ---
175
-
176
- ## 🔄 Iterative Questioning
177
-
178
- ### First Pass (3-5 Questions)
179
- Focus on **blocking decisions**. Don't proceed without answers.
180
-
181
- ### Second Pass (After Initial Implementation)
182
- As patterns emerge, ask:
183
- - "This feature implies [X]. Should we handle [edge case] now or defer?"
184
- - "We're using [Pattern A]. Should [Feature B] follow the same pattern?"
185
-
186
- ### Third Pass (Optimization)
187
- When functionality works:
188
- - "Performance bottleneck at [X]. Optimize now or acceptable for now?"
189
- - "Refactor [Y] for maintainability or ship as-is?"
190
-
191
- ---
192
-
193
- ## 🎭 Example: Full Question Generation
194
-
195
- ```
196
- USER REQUEST: "Build an Instagram clone"
197
-
198
- STEP 1: Parse
199
- ├── Domain: Social Media
200
- ├── Features: Photo sharing, engagement (likes/comments), user profiles
201
- ├── Implied: Feed, following, authentication
202
- └── Scale: Potentially high (social apps go viral)
203
-
204
- STEP 2: Decision Points
205
- ├── Blocking: Storage strategy, authentication method, feed type
206
- ├── High-leverage: Real-time notifications, data model complexity
207
- └── Deferable: Analytics, advanced search, reels/video
208
-
209
- STEP 3: Generate Questions (Priority)
210
-
211
- P0 (Blocking):
212
- 1. Storage Strategy → Affects architecture, cost, speed
213
- 2. Feed Algorithm → Affects database queries, complexity
214
- 3. Auth Method → Affects dev time, UX, security
215
-
216
- P1 (High-leverage):
217
- 4. Real-time Notifications → WebSocket vs polling
218
- 5. Media Processing → Client-side vs server-side optimization
219
-
220
- P2 (Deferable):
221
- 6. Story/Reels → Major feature creep, defer to v2
222
- 7. DM/Chat → Separate subsystem, defer to v2
223
-
224
- STEP 4: Format Output
225
- ```
226
-
227
- ---
228
-
229
- ## 📊 Generated Output (Example)
230
-
231
- ```
232
- Based on your Instagram clone request:
233
-
234
- ## 🔴 CRITICAL DECISIONS (Cannot Proceed Without Answers)
235
-
236
- ### 1. **Photo Storage Strategy**
237
-
238
- **Question:** Where will user photos be stored and served?
239
-
240
- **Why This Matters:**
241
- - Affects: Monthly hosting costs, page load speed, CDN complexity
242
- - High-volume social apps: 1000 users × 10 photos × 2MB = 20GB storage
243
-
244
- **Options:**
245
- | Option | Cost | Speed | Complexity | Best For |
246
- |--------|------|-------|------------|----------|
247
- | **Cloudinary** | $89/mo (25GB) | Fast (CDN) | Low | MVP, rapid launch |
248
- | **AWS S3 + CloudFront** | $0.023/GB | Fast (CDN) | Medium | Production, cost-optimized |
249
- | **Supabase Storage** | Free tier 1GB | Medium | Low | Small scale, simple |
250
- | **Local Storage** | Server cost | Slow | Low | Development only |
251
-
252
- **If Not Specified:** Cloudinary (balanced for MVP)
253
-
254
- ---
255
-
256
- ### 2. **Feed Algorithm Choice**
257
-
258
- **Question:** How should the main feed work?
259
-
260
- **Why This Matters:**
261
- - Affects: Database query complexity, caching strategy, development time
262
- - Algorithmic feeds require ML infrastructure, ranking signals
263
-
264
- **Options:**
265
- | Option | Complexity | Database Impact | Best For |
266
- |--------|------------|-----------------|----------|
267
- | **Chronological** | Low | Simple query | Early stage, transparency |
268
- | **Follow-Only** | Medium | JOIN with pagination | Most social apps |
269
- | **Algorithmic** | High | Pre-computed feed tables | Instagram competitor |
270
-
271
- **If Not Specified:** Follow-Only (balanced for social app)
272
-
273
- ---
274
-
275
- ### 3. **Authentication Approach**
276
-
277
- **Question:** How do users sign up and login?
278
-
279
- **Why This Matters:**
280
- - Affects: Development time (2-5 hours), security posture, UX friction
281
-
282
- **Options:**
283
- | Option | Dev Time | Security | UX | Best For |
284
- |--------|----------|----------|-----|----------|
285
- | **Email/Password** | 4-5 hrs | High (if 2FA) | Medium | Full control needed |
286
- | **Social Only** | 1-2 hrs | Provider-dependent | Smooth | B2C, rapid launch |
287
- | **Magic Link** | 2-3 hrs | Medium | Very smooth | Security-focused |
288
- | **Clerk/Auth0** | 1 hr | High | Smooth | Fastest to market |
289
-
290
- **If Not Specified:** Clerk (fastest for MVP)
291
-
292
- ---
293
-
294
- ## 🟡 HIGH-LEVERAGE (Affects Architecture)
295
-
296
- ### 4. **Real-time Notifications**
297
-
298
- **Question:** Do users need instant notifications for likes/comments?
299
-
300
- **Why This Matters:**
301
- - WebSocket adds infrastructure complexity (Redis pub/sub for scaling)
302
- - Polling is simpler but higher latency
303
-
304
- **Options:**
305
- | Option | Complexity | Scale Cost | Best For |
306
- |--------|------------|------------|----------|
307
- | **WebSocket + Redis** | High | $10+/mo | >1000 concurrent users |
308
- | **Polling (30s)** | Low | DB queries | <1000 users |
309
- | **No Real-time** | None | None | MVP, validate first |
310
-
311
- **If Not Specified:** Polling for MVP (defer WebSocket until validated)
312
-
313
- ---
314
-
315
- ## 🟢 NICE-TO-HAVE (Defer to v2)
316
-
317
- ### 5. **Video/Reels Support**
318
- - Major complexity (video processing, streaming infrastructure)
319
- - Recommendation: Launch with photos only, add video after validation
320
-
321
- ### 6. **Direct Messaging**
322
- - Separate subsystem (chat infrastructure different from feed)
323
- - Recommendation: Use Pusher/Stream for real-time or defer entirely
324
-
325
- ---
326
-
327
- ## 📋 Summary
328
-
329
- | Decision | Recommendation | If Changed |
330
- |----------|----------------|------------|
331
- | Storage | Cloudinary | +3 hrs setup |
332
- | Feed | Follow-only | +2 hrs query optimization |
333
- | Auth | Clerk | -3 hrs dev time |
334
- | Real-time | Polling | +5 hrs WebSocket setup |
335
- | Video | Defer to v2 | N/A |
336
- | DM | Defer to v2 | N/A |
337
-
338
- **Total Estimated MVP Time:** 15-20 hours with recommendations above
339
- ```
340
-
341
- ---
342
-
343
- ## 🎯 Principles Recap
344
-
345
- 1. **Every question = Architectural decision** → Not data gathering
346
- 2. **Show trade-offs** → User understands consequences
347
- 3. **Prioritize blocking decisions** → Cannot proceed without
348
- 4. **Provide defaults** → If user doesn't answer, we proceed anyway
349
- 5. **Domain-aware** → Ecommerce questions ≠ Auth questions ≠ Real-time questions
350
- 6. **Iterative** → More questions as patterns emerge during implementation
@@ -1,26 +0,0 @@
1
- ---
2
- name: business-ops
3
- description: Skill Quản trị Vận Hành. Đọc soát Hợp đồng (Legal), Phân tích Kế toán (Finance), và Quản lý Tuyển dụng (HR).
4
- allowed-tools: Read, Bash
5
- version: 1.0
6
- priority: MODERATE
7
- ---
8
-
9
- # Kỹ năng Vận Hành Doanh Nghiệp (Business Operations)
10
-
11
- > **MỤC TIÊU:** Hỗ trợ Giám đốc xử lý các mảng "Back-Office" ngoài luồng lập trình để Tiết kiệm thời gian quản trị.
12
-
13
- Các phân hệ Vận hành cụ thể:
14
-
15
- ## 1. Finance Ops (Nghiệp vụ Tài chính - Kế toán)
16
- * Kiểm tra Bảng giá API các dịch vụ Sub (AWS, Supabase, Vercel) xem code có vi phạm rủi ro "Tràn hóa đơn" (Billing Attack) không?
17
- * Gợi ý giải pháp tiết kiệm Cost Token khi gọi LLM Agent.
18
-
19
- ## 2. Legal & Compliance (Pháp lý - Hợp đồng)
20
- * Đọc hiểu Terms of Service (TOS) của các Provider (như DNSE, Yuanta, SSI).
21
- * Cảnh báo rủi ro về Privacy (Lưu Mật khẩu User dạng Plain text là vi phạm GDPR).
22
- * Quét Compliance: Đảm bảo không lộ Key, không vi phạm quy chuẩn chia sẻ dữ liệu chứng khoán.
23
-
24
- ## 3. HR & Ops (Tuyển mộ - Quy trình)
25
- * User có thể yêu cầu: "Viết giúp JD để tuyển 3 ông lính ReactJS". Hệ thống sẽ dùng kiến thức Codebase hiện tại để sinh ra 1 bản Yêu cầu Công việc sát thực tế nhất 100%. (Bắt buộc phải biết Redux? Hook? Tailwind? Hệ thống tự đọc Code của dự án và sinh ra luật).
26
- * Tạo Quy trình làm việc (Standard Operating Procedure - SOP) cho Developer mới Onboard.
@@ -1,202 +0,0 @@
1
- ---
2
- name: clean-code
3
- description: Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments
4
- allowed-tools: Read, Write, Edit
5
- version: 2.0
6
- priority: CRITICAL
7
- ---
8
-
9
- # Clean Code - Pragmatic AI Coding Standards
10
-
11
- > **CRITICAL SKILL** - Be **concise, direct, and solution-focused**.
12
-
13
- ---
14
-
15
- ## Core Principles
16
-
17
- | Principle | Rule |
18
- |-----------|------|
19
- | **SRP** | Single Responsibility - each function/class does ONE thing |
20
- | **DRY** | Don't Repeat Yourself - extract duplicates, reuse |
21
- | **KISS** | Keep It Simple - simplest solution that works |
22
- | **YAGNI** | You Aren't Gonna Need It - don't build unused features |
23
- | **Boy Scout** | Leave code cleaner than you found it |
24
-
25
- ---
26
-
27
- ## Naming Rules
28
-
29
- | Element | Convention |
30
- |---------|------------|
31
- | **Variables** | Reveal intent: `userCount` not `n` |
32
- | **Functions** | Verb + noun: `getUserById()` not `user()` |
33
- | **Booleans** | Question form: `isActive`, `hasPermission`, `canEdit` |
34
- | **Constants** | SCREAMING_SNAKE: `MAX_RETRY_COUNT` |
35
-
36
- > **Rule:** If you need a comment to explain a name, rename it.
37
-
38
- ---
39
-
40
- ## Function Rules
41
-
42
- | Rule | Description |
43
- |------|-------------|
44
- | **Small** | Max 20 lines, ideally 5-10 |
45
- | **One Thing** | Does one thing, does it well |
46
- | **One Level** | One level of abstraction per function |
47
- | **Few Args** | Max 3 arguments, prefer 0-2 |
48
- | **No Side Effects** | Don't mutate inputs unexpectedly |
49
-
50
- ---
51
-
52
- ## Code Structure
53
-
54
- | Pattern | Apply |
55
- |---------|-------|
56
- | **Guard Clauses** | Early returns for edge cases |
57
- | **Flat > Nested** | Avoid deep nesting (max 2 levels) |
58
- | **Composition** | Small functions composed together |
59
- | **Colocation** | Keep related code close |
60
-
61
- ---
62
-
63
- ## AI Coding Style
64
-
65
- | Situation | Action |
66
- |-----------|--------|
67
- | User asks for feature | STOP. Use Socratic Gate (brainstorming) |
68
- | User reports bug | Fix it, don't explain |
69
- | No clear requirement | Ask, don't assume |
70
- | Need current time/date | ALWAYS use `get_time_machine().now()` or `.is_trading_hours()`. NEVER use `datetime.now()` directly. |
71
-
72
- ---
73
-
74
- ## Anti-Patterns (DON'T)
75
-
76
- | ❌ Pattern | ✅ Fix |
77
- |-----------|-------|
78
- | Comment every line | Delete obvious comments |
79
- | Helper for one-liner | Inline the code |
80
- | Factory for 2 objects | Direct instantiation |
81
- | utils.ts with 1 function | Put code where used |
82
- | "First we import..." | Just write code |
83
- | Deep nesting | Guard clauses |
84
- | Magic numbers | Named constants |
85
- | God functions | Split by responsibility |
86
-
87
- ---
88
-
89
- ## 🔴 Before Editing ANY File (THINK FIRST!)
90
-
91
- **Before changing a file, ask yourself:**
92
-
93
- | Question | Why |
94
- |----------|-----|
95
- | **What imports this file?** | They might break |
96
- | **What does this file import?** | Interface changes |
97
- | **What tests cover this?** | Tests might fail |
98
- | **Is this a shared component?** | Multiple places affected |
99
-
100
- **Quick Check:**
101
- ```
102
- File to edit: UserService.ts
103
- └── Who imports this? → UserController.ts, AuthController.ts
104
- └── Do they need changes too? → Check function signatures
105
- ```
106
-
107
- > 🔴 **Rule:** Edit dependent files using independent 5-minute micro-tasks strictly within the Plan.
108
- > 🔴 **Never leave broken imports or missing updates.**
109
-
110
- ---
111
-
112
- ## Summary
113
-
114
- | Do | Don't |
115
- |----|-------|
116
- | Ask questions before big features | Write tutorials |
117
- | Let code self-document | Add obvious comments |
118
- | Fix bugs immediately | Explain the fix first |
119
- | Inline small things | Create unnecessary files |
120
- | Name things clearly | Use abbreviations |
121
- | Keep functions small | Write 100+ line functions |
122
-
123
- > **Remember: The user wants working code, not a programming lesson.**
124
-
125
- ---
126
-
127
- ## 🔴 Self-Check Before Completing (MANDATORY)
128
-
129
- **Before saying "task complete", verify:**
130
-
131
- | Check | Question |
132
- |-------|----------|
133
- | ✅ **Goal met?** | Did I do exactly what user asked? |
134
- | ✅ **Files edited?** | Did I modify all necessary files? |
135
- | ✅ **Code works?** | Did I test/verify the change? |
136
- | ✅ **No errors?** | Lint and TypeScript pass? |
137
- | ✅ **Nothing forgotten?** | Any edge cases missed? |
138
-
139
- > 🔴 **Rule:** If ANY check fails, fix it before completing.
140
-
141
- ---
142
-
143
- ## Verification Scripts (MANDATORY)
144
-
145
- > 🔴 **CRITICAL:** Each agent runs ONLY their own skill's scripts after completing work.
146
-
147
- ### Agent → Script Mapping
148
-
149
- | Agent | Script | Command |
150
- |-------|--------|---------|
151
- | **frontend-specialist** | UX Audit | `python .agent/skills/frontend-design/scripts/ux_audit.py .` |
152
- | **frontend-specialist** | A11y Check | `python .agent/skills/frontend-design/scripts/accessibility_checker.py .` |
153
- | **backend-specialist** | API Validator | `python .agent/skills/api-patterns/scripts/api_validator.py .` |
154
- | **mobile-developer** | Mobile Audit | `python .agent/skills/mobile-design/scripts/mobile_audit.py .` |
155
- | **database-architect** | Schema Validate | `python .agent/skills/database-design/scripts/schema_validator.py .` |
156
- | **security-auditor** | Security Scan | `python .agent/skills/vulnerability-scanner/scripts/security_scan.py .` |
157
- | **seo-specialist** | SEO Check | `python .agent/skills/seo-fundamentals/scripts/seo_checker.py .` |
158
- | **seo-specialist** | GEO Check | `python .agent/skills/geo-fundamentals/scripts/geo_checker.py .` |
159
- | **performance-optimizer** | Lighthouse | `python .agent/skills/performance-profiling/scripts/lighthouse_audit.py <url>` |
160
- | **test-engineer** | Test Runner | `python .agent/skills/testing-patterns/scripts/test_runner.py .` |
161
- | **test-engineer** | Playwright | `python .agent/skills/webapp-testing/scripts/playwright_runner.py <url>` |
162
- | **Any agent** | Lint Check | `python .agent/skills/lint-and-validate/scripts/lint_runner.py .` |
163
- | **Any agent** | Type Coverage | `python .agent/skills/lint-and-validate/scripts/type_coverage.py .` |
164
- | **Any agent** | i18n Check | `python .agent/skills/i18n-localization/scripts/i18n_checker.py .` |
165
-
166
- > ❌ **WRONG:** `test-engineer` running `ux_audit.py`
167
- > ✅ **CORRECT:** `frontend-specialist` running `ux_audit.py`
168
-
169
- ---
170
-
171
- ### 🔴 Script Output Handling (READ → SUMMARIZE → ASK)
172
-
173
- **When running a validation script, you MUST:**
174
-
175
- 1. **Run the script** and capture ALL output
176
- 2. **Parse the output** - identify errors, warnings, and passes
177
- 3. **Summarize to user** in this format:
178
-
179
- ```markdown
180
- ## Script Results: [script_name.py]
181
-
182
- ### ❌ Errors Found (X items)
183
- - [File:Line] Error description 1
184
- - [File:Line] Error description 2
185
-
186
- ### ⚠️ Warnings (Y items)
187
- - [File:Line] Warning description
188
-
189
- ### ✅ Passed (Z items)
190
- - Check 1 passed
191
- - Check 2 passed
192
-
193
- **Should I fix the X errors?**
194
- ```
195
-
196
- 4. **Wait for user confirmation** before fixing
197
- 5. **After fixing** → Re-run script to confirm
198
-
199
- > 🔴 **VIOLATION:** Running script and ignoring output = FAILED task.
200
- > 🔴 **VIOLATION:** Auto-fixing without asking = Not allowed.
201
- > 🔴 **Rule:** Always READ output → SUMMARIZE → ASK → then fix.
202
-
@@ -1,48 +0,0 @@
1
- ---
2
- name: cli-generator
3
- description: Meta-skill enabling the Agent to automatically convert local software, repositories, or APIs into structured CLI tools using HKUDS/CLI-Anything.
4
- ---
5
-
6
- # CLI-Generator (Meta-Skill)
7
-
8
- > 🔴 **CRITICAL**: This is a Meta-Skill. It gives you (the AI Agent) the ability to forge your own tools to solve complex constraints.
9
-
10
- ## When to Use
11
-
12
- Use this skill when:
13
- - The user asks you to interact with a complex local GUI software (e.g., GIMP, OBS).
14
- - You are working with a messy, undocumented local API or scripting repository that is too brittle to run manually via ad-hoc scripts.
15
- - You need a dedicated CLI tool to perform repetitive tasks reliably, but none exists.
16
-
17
- ## The Forging Process
18
-
19
- When you decide you need a new CLI tool for a given `TARGET_DIR` (the source code of the application), follow exactly these steps:
20
-
21
- ### 1. Install CLI-Anything (If not already installed)
22
- Check if `cli-anything` is available in your PATH. If not, install it globally:
23
- ```bash
24
- pip install cli-anything
25
- ```
26
- *(If the package is not on PyPI, clone `https://github.com/HKUDS/CLI-Anything` and run `pip install -e .`)*
27
-
28
- ### 2. Run the Generator Pipeline
29
- Navigate to a neutral workspace or the target, and run the automated generation pipeline:
30
- ```bash
31
- cli-anything --source /absolute/path/to/TARGET_DIR
32
- ```
33
- *Note: This process analyzes the source code and generates the harness. It may take several minutes and uses the underlying LLM's API tokens.*
34
-
35
- ### 3. Integrate the Forged Skill into `ag-kit`
36
- The pipeline will generate a new Python package (e.g., `cli-anything-targetname`) and automatically produce a `SKILL.md` file within its package directory (usually `cli_anything/<software>/skills/SKILL.md`).
37
- You MUST locate this generated `SKILL.md` and copy it into the user's `ag-kit` workspace:
38
- ```bash
39
- mkdir -p .agent/skills/<targetname-cli>
40
- cp /path/to/generated/SKILL.md .agent/skills/<targetname-cli>/SKILL.md
41
- ```
42
-
43
- ### 4. Self-Update
44
- Once the new `SKILL.md` is in place, you (or any other agent using this repository like GravityClaw / Openclaw) will instantly possess the knowledge to use the newly forged CLI tool. Proceed to solve the user's original objective using the new tool natively.
45
-
46
- ## Anti-Patterns
47
- - ❌ **Manual wrappers**: Do NOT try to manually write a CLI harness or wrappers if `cli-anything` can automate it perfectly.
48
- - ❌ **Token waste**: Do NOT run the generator repeatedly on the same source code. Generate the CLI once, store the `SKILL.md`, and reuse the tool.