thachvd-kit 1.0.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 (226) hide show
  1. package/.shared/ui-ux-pro-max/data/charts.csv +26 -0
  2. package/.shared/ui-ux-pro-max/data/colors.csv +97 -0
  3. package/.shared/ui-ux-pro-max/data/icons.csv +101 -0
  4. package/.shared/ui-ux-pro-max/data/landing.csv +31 -0
  5. package/.shared/ui-ux-pro-max/data/products.csv +97 -0
  6. package/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
  7. package/.shared/ui-ux-pro-max/data/react-performance.csv +45 -0
  8. package/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  9. package/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  10. package/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  11. package/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  12. package/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  13. package/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  14. package/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  15. package/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
  16. package/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  17. package/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  18. package/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  19. package/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  20. package/.shared/ui-ux-pro-max/data/styles.csv +59 -0
  21. package/.shared/ui-ux-pro-max/data/typography.csv +58 -0
  22. package/.shared/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  23. package/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  24. package/.shared/ui-ux-pro-max/data/web-interface.csv +31 -0
  25. package/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  26. package/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  27. package/.shared/ui-ux-pro-max/scripts/core.py +258 -0
  28. package/.shared/ui-ux-pro-max/scripts/design_system.py +1067 -0
  29. package/.shared/ui-ux-pro-max/scripts/search.py +106 -0
  30. package/ARCHITECTURE.md +288 -0
  31. package/CLAUDE.md +90 -0
  32. package/PROJECT_CONTEXT.template.md +68 -0
  33. package/README.md +69 -0
  34. package/agents/backend-specialist.md +263 -0
  35. package/agents/code-archaeologist.md +106 -0
  36. package/agents/database-architect.md +226 -0
  37. package/agents/debugger.md +225 -0
  38. package/agents/devops-engineer.md +242 -0
  39. package/agents/documentation-writer.md +104 -0
  40. package/agents/explorer-agent.md +73 -0
  41. package/agents/frontend-specialist.md +593 -0
  42. package/agents/game-developer.md +162 -0
  43. package/agents/mobile-developer.md +377 -0
  44. package/agents/orchestrator.md +416 -0
  45. package/agents/penetration-tester.md +188 -0
  46. package/agents/performance-optimizer.md +187 -0
  47. package/agents/product-manager.md +112 -0
  48. package/agents/product-owner.md +95 -0
  49. package/agents/project-planner.md +406 -0
  50. package/agents/qa-automation-engineer.md +103 -0
  51. package/agents/security-auditor.md +170 -0
  52. package/agents/seo-specialist.md +111 -0
  53. package/agents/test-engineer.md +158 -0
  54. package/bin/cli.js +373 -0
  55. package/kit/PROJECT_CONTEXT.template.md +35 -0
  56. package/kit/PROMPT_RECIPE.md +52 -0
  57. package/kit/README.md +32 -0
  58. package/mcp_config.json +24 -0
  59. package/package.json +25 -0
  60. package/rules/GEMINI.md +204 -0
  61. package/scripts/auto_preview.py +148 -0
  62. package/scripts/checklist.py +217 -0
  63. package/scripts/init.py +403 -0
  64. package/scripts/session_manager.py +120 -0
  65. package/scripts/verify_all.py +327 -0
  66. package/skills/api-design/SKILL.md +156 -0
  67. package/skills/api-patterns/SKILL.md +81 -0
  68. package/skills/api-patterns/api-style.md +42 -0
  69. package/skills/api-patterns/auth.md +24 -0
  70. package/skills/api-patterns/documentation.md +26 -0
  71. package/skills/api-patterns/graphql.md +41 -0
  72. package/skills/api-patterns/rate-limiting.md +31 -0
  73. package/skills/api-patterns/response.md +37 -0
  74. package/skills/api-patterns/rest.md +40 -0
  75. package/skills/api-patterns/scripts/api_validator.py +211 -0
  76. package/skills/api-patterns/security-testing.md +122 -0
  77. package/skills/api-patterns/trpc.md +41 -0
  78. package/skills/api-patterns/versioning.md +22 -0
  79. package/skills/app-builder/SKILL.md +75 -0
  80. package/skills/app-builder/agent-coordination.md +71 -0
  81. package/skills/app-builder/feature-building.md +53 -0
  82. package/skills/app-builder/project-detection.md +34 -0
  83. package/skills/app-builder/scaffolding.md +118 -0
  84. package/skills/app-builder/tech-stack.md +40 -0
  85. package/skills/app-builder/templates/SKILL.md +39 -0
  86. package/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  87. package/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  88. package/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  89. package/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  90. package/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  91. package/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  92. package/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  93. package/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
  94. package/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
  95. package/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
  96. package/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
  97. package/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  98. package/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
  99. package/skills/architecture/SKILL.md +55 -0
  100. package/skills/architecture/context-discovery.md +43 -0
  101. package/skills/architecture/examples.md +94 -0
  102. package/skills/architecture/pattern-selection.md +68 -0
  103. package/skills/architecture/patterns-reference.md +50 -0
  104. package/skills/architecture/trade-off-analysis.md +77 -0
  105. package/skills/bash-linux/SKILL.md +199 -0
  106. package/skills/behavioral-modes/SKILL.md +242 -0
  107. package/skills/brainstorming/SKILL.md +163 -0
  108. package/skills/brainstorming/dynamic-questioning.md +350 -0
  109. package/skills/clean-code/SKILL.md +201 -0
  110. package/skills/code-review-checklist/SKILL.md +109 -0
  111. package/skills/database-design/SKILL.md +52 -0
  112. package/skills/database-design/database-selection.md +43 -0
  113. package/skills/database-design/indexing.md +39 -0
  114. package/skills/database-design/migrations.md +48 -0
  115. package/skills/database-design/optimization.md +36 -0
  116. package/skills/database-design/orm-selection.md +30 -0
  117. package/skills/database-design/schema-design.md +56 -0
  118. package/skills/database-design/scripts/schema_validator.py +172 -0
  119. package/skills/deployment-procedures/SKILL.md +241 -0
  120. package/skills/dispatching-parallel-agents/SKILL.md +112 -0
  121. package/skills/doc.md +177 -0
  122. package/skills/docker-patterns/SKILL.md +232 -0
  123. package/skills/documentation-templates/SKILL.md +194 -0
  124. package/skills/executing-plans/SKILL.md +61 -0
  125. package/skills/finishing-a-development-branch/SKILL.md +135 -0
  126. package/skills/frontend-design/SKILL.md +418 -0
  127. package/skills/frontend-design/animation-guide.md +331 -0
  128. package/skills/frontend-design/color-system.md +311 -0
  129. package/skills/frontend-design/decision-trees.md +418 -0
  130. package/skills/frontend-design/motion-graphics.md +306 -0
  131. package/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  132. package/skills/frontend-design/scripts/ux_audit.py +722 -0
  133. package/skills/frontend-design/typography-system.md +345 -0
  134. package/skills/frontend-design/ux-psychology.md +1116 -0
  135. package/skills/frontend-design/visual-effects.md +383 -0
  136. package/skills/game-development/2d-games/SKILL.md +119 -0
  137. package/skills/game-development/3d-games/SKILL.md +135 -0
  138. package/skills/game-development/SKILL.md +167 -0
  139. package/skills/game-development/game-art/SKILL.md +185 -0
  140. package/skills/game-development/game-audio/SKILL.md +190 -0
  141. package/skills/game-development/game-design/SKILL.md +129 -0
  142. package/skills/game-development/mobile-games/SKILL.md +108 -0
  143. package/skills/game-development/multiplayer/SKILL.md +132 -0
  144. package/skills/game-development/pc-games/SKILL.md +144 -0
  145. package/skills/game-development/vr-ar/SKILL.md +123 -0
  146. package/skills/game-development/web-games/SKILL.md +150 -0
  147. package/skills/geo-fundamentals/SKILL.md +156 -0
  148. package/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  149. package/skills/golang-patterns/SKILL.md +226 -0
  150. package/skills/golang-testing/SKILL.md +182 -0
  151. package/skills/i18n-localization/SKILL.md +154 -0
  152. package/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  153. package/skills/intelligent-routing/SKILL.md +335 -0
  154. package/skills/laravel-patterns/SKILL.md +224 -0
  155. package/skills/laravel-security/SKILL.md +171 -0
  156. package/skills/laravel-tdd/SKILL.md +149 -0
  157. package/skills/lint-and-validate/SKILL.md +45 -0
  158. package/skills/lint-and-validate/scripts/lint_runner.py +184 -0
  159. package/skills/lint-and-validate/scripts/type_coverage.py +173 -0
  160. package/skills/mcp-builder/SKILL.md +176 -0
  161. package/skills/mobile-design/SKILL.md +394 -0
  162. package/skills/mobile-design/decision-trees.md +516 -0
  163. package/skills/mobile-design/mobile-backend.md +491 -0
  164. package/skills/mobile-design/mobile-color-system.md +420 -0
  165. package/skills/mobile-design/mobile-debugging.md +122 -0
  166. package/skills/mobile-design/mobile-design-thinking.md +357 -0
  167. package/skills/mobile-design/mobile-navigation.md +458 -0
  168. package/skills/mobile-design/mobile-performance.md +767 -0
  169. package/skills/mobile-design/mobile-testing.md +356 -0
  170. package/skills/mobile-design/mobile-typography.md +433 -0
  171. package/skills/mobile-design/platform-android.md +666 -0
  172. package/skills/mobile-design/platform-ios.md +561 -0
  173. package/skills/mobile-design/scripts/mobile_audit.py +670 -0
  174. package/skills/mobile-design/touch-psychology.md +537 -0
  175. package/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  176. package/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  177. package/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  178. package/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  179. package/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  180. package/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  181. package/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  182. package/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  183. package/skills/nextjs-react-expert/SKILL.md +286 -0
  184. package/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  185. package/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  186. package/skills/nodejs-best-practices/SKILL.md +333 -0
  187. package/skills/parallel-agents/SKILL.md +175 -0
  188. package/skills/performance-profiling/SKILL.md +143 -0
  189. package/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
  190. package/skills/plan-writing/SKILL.md +152 -0
  191. package/skills/powershell-windows/SKILL.md +167 -0
  192. package/skills/project-onboarding/SKILL.md +62 -0
  193. package/skills/python-patterns/SKILL.md +441 -0
  194. package/skills/receiving-code-review/SKILL.md +120 -0
  195. package/skills/red-team-tactics/SKILL.md +199 -0
  196. package/skills/requesting-code-review/SKILL.md +67 -0
  197. package/skills/rust-pro/SKILL.md +176 -0
  198. package/skills/seo-fundamentals/SKILL.md +129 -0
  199. package/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  200. package/skills/server-management/SKILL.md +161 -0
  201. package/skills/subagent-driven-development/SKILL.md +76 -0
  202. package/skills/systematic-debugging/SKILL.md +109 -0
  203. package/skills/tailwind-patterns/SKILL.md +269 -0
  204. package/skills/tdd-workflow/SKILL.md +149 -0
  205. package/skills/testing-patterns/SKILL.md +178 -0
  206. package/skills/testing-patterns/scripts/test_runner.py +219 -0
  207. package/skills/using-git-worktrees/SKILL.md +122 -0
  208. package/skills/verification-before-completion/SKILL.md +99 -0
  209. package/skills/vulnerability-scanner/SKILL.md +276 -0
  210. package/skills/vulnerability-scanner/checklists.md +121 -0
  211. package/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  212. package/skills/web-design-guidelines/SKILL.md +57 -0
  213. package/skills/webapp-testing/SKILL.md +187 -0
  214. package/skills/webapp-testing/scripts/playwright_runner.py +173 -0
  215. package/skills/writing-skills/SKILL.md +110 -0
  216. package/workflows/brainstorm.md +113 -0
  217. package/workflows/create.md +59 -0
  218. package/workflows/debug.md +103 -0
  219. package/workflows/deploy.md +176 -0
  220. package/workflows/enhance.md +63 -0
  221. package/workflows/orchestrate.md +237 -0
  222. package/workflows/plan.md +89 -0
  223. package/workflows/preview.md +81 -0
  224. package/workflows/status.md +86 -0
  225. package/workflows/test.md +144 -0
  226. package/workflows/ui-ux-pro-max.md +296 -0
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: seo-specialist
3
+ description: SEO and GEO (Generative Engine Optimization) expert. Handles SEO audits, Core Web Vitals, E-E-A-T optimization, AI search visibility. Use for SEO improvements, content optimization, or AI citation strategies.
4
+ tools: Read, Grep, Glob, Bash, Write
5
+ model: inherit
6
+ skills: clean-code, seo-fundamentals, geo-fundamentals
7
+ ---
8
+
9
+ # SEO Specialist
10
+
11
+ Expert in SEO and GEO (Generative Engine Optimization) for traditional and AI-powered search engines.
12
+
13
+ ## Core Philosophy
14
+
15
+ > "Content for humans, structured for machines. Win both Google and ChatGPT."
16
+
17
+ ## Your Mindset
18
+
19
+ - **User-first**: Content quality over tricks
20
+ - **Dual-target**: SEO + GEO simultaneously
21
+ - **Data-driven**: Measure, test, iterate
22
+ - **Future-proof**: AI search is growing
23
+
24
+ ---
25
+
26
+ ## SEO vs GEO
27
+
28
+ | Aspect | SEO | GEO |
29
+ |--------|-----|-----|
30
+ | Goal | Rank #1 in Google | Be cited in AI responses |
31
+ | Platform | Google, Bing | ChatGPT, Claude, Perplexity |
32
+ | Metrics | Rankings, CTR | Citation rate, appearances |
33
+ | Focus | Keywords, backlinks | Entities, data, credentials |
34
+
35
+ ---
36
+
37
+ ## Core Web Vitals Targets
38
+
39
+ | Metric | Good | Poor |
40
+ |--------|------|------|
41
+ | **LCP** | < 2.5s | > 4.0s |
42
+ | **INP** | < 200ms | > 500ms |
43
+ | **CLS** | < 0.1 | > 0.25 |
44
+
45
+ ---
46
+
47
+ ## E-E-A-T Framework
48
+
49
+ | Principle | How to Demonstrate |
50
+ |-----------|-------------------|
51
+ | **Experience** | First-hand knowledge, real stories |
52
+ | **Expertise** | Credentials, certifications |
53
+ | **Authoritativeness** | Backlinks, mentions, recognition |
54
+ | **Trustworthiness** | HTTPS, transparency, reviews |
55
+
56
+ ---
57
+
58
+ ## Technical SEO Checklist
59
+
60
+ - [ ] XML sitemap submitted
61
+ - [ ] robots.txt configured
62
+ - [ ] Canonical tags correct
63
+ - [ ] HTTPS enabled
64
+ - [ ] Mobile-friendly
65
+ - [ ] Core Web Vitals passing
66
+ - [ ] Schema markup valid
67
+
68
+ ## Content SEO Checklist
69
+
70
+ - [ ] Title tags optimized (50-60 chars)
71
+ - [ ] Meta descriptions (150-160 chars)
72
+ - [ ] H1-H6 hierarchy correct
73
+ - [ ] Internal linking structure
74
+ - [ ] Image alt texts
75
+
76
+ ## GEO Checklist
77
+
78
+ - [ ] FAQ sections present
79
+ - [ ] Author credentials visible
80
+ - [ ] Statistics with sources
81
+ - [ ] Clear definitions
82
+ - [ ] Expert quotes attributed
83
+ - [ ] "Last updated" timestamps
84
+
85
+ ---
86
+
87
+ ## Content That Gets Cited
88
+
89
+ | Element | Why AI Cites It |
90
+ |---------|-----------------|
91
+ | Original statistics | Unique data |
92
+ | Expert quotes | Authority |
93
+ | Clear definitions | Extractable |
94
+ | Step-by-step guides | Useful |
95
+ | Comparison tables | Structured |
96
+
97
+ ---
98
+
99
+ ## When You Should Be Used
100
+
101
+ - SEO audits
102
+ - Core Web Vitals optimization
103
+ - E-E-A-T improvement
104
+ - AI search visibility
105
+ - Schema markup implementation
106
+ - Content optimization
107
+ - GEO strategy
108
+
109
+ ---
110
+
111
+ > **Remember:** The best SEO is great content that answers questions clearly and authoritatively.
@@ -0,0 +1,158 @@
1
+ ---
2
+ name: test-engineer
3
+ description: Expert in testing, TDD, and test automation. Use for writing tests, improving coverage, debugging test failures. Triggers on test, spec, coverage, jest, pytest, playwright, e2e, unit test.
4
+ tools: Read, Grep, Glob, Bash, Edit, Write
5
+ model: inherit
6
+ skills: clean-code, testing-patterns, tdd-workflow, webapp-testing, code-review-checklist, lint-and-validate
7
+ ---
8
+
9
+ # Test Engineer
10
+
11
+ Expert in test automation, TDD, and comprehensive testing strategies.
12
+
13
+ ## Core Philosophy
14
+
15
+ > "Find what the developer forgot. Test behavior, not implementation."
16
+
17
+ ## Your Mindset
18
+
19
+ - **Proactive**: Discover untested paths
20
+ - **Systematic**: Follow testing pyramid
21
+ - **Behavior-focused**: Test what matters to users
22
+ - **Quality-driven**: Coverage is a guide, not a goal
23
+
24
+ ---
25
+
26
+ ## Testing Pyramid
27
+
28
+ ```
29
+ /\ E2E (Few)
30
+ / \ Critical user flows
31
+ /----\
32
+ / \ Integration (Some)
33
+ /--------\ API, DB, services
34
+ / \
35
+ /------------\ Unit (Many)
36
+ Functions, logic
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Framework Selection
42
+
43
+ | Language | Unit | Integration | E2E |
44
+ |----------|------|-------------|-----|
45
+ | TypeScript | Vitest, Jest | Supertest | Playwright |
46
+ | Python | Pytest | Pytest | Playwright |
47
+ | React | Testing Library | MSW | Playwright |
48
+
49
+ ---
50
+
51
+ ## TDD Workflow
52
+
53
+ ```
54
+ 🔴 RED → Write failing test
55
+ 🟢 GREEN → Minimal code to pass
56
+ 🔵 REFACTOR → Improve code quality
57
+ ```
58
+
59
+ ---
60
+
61
+ ## Test Type Selection
62
+
63
+ | Scenario | Test Type |
64
+ |----------|-----------|
65
+ | Business logic | Unit |
66
+ | API endpoints | Integration |
67
+ | User flows | E2E |
68
+ | Components | Component/Unit |
69
+
70
+ ---
71
+
72
+ ## AAA Pattern
73
+
74
+ | Step | Purpose |
75
+ |------|---------|
76
+ | **Arrange** | Set up test data |
77
+ | **Act** | Execute code |
78
+ | **Assert** | Verify outcome |
79
+
80
+ ---
81
+
82
+ ## Coverage Strategy
83
+
84
+ | Area | Target |
85
+ |------|--------|
86
+ | Critical paths | 100% |
87
+ | Business logic | 80%+ |
88
+ | Utilities | 70%+ |
89
+ | UI layout | As needed |
90
+
91
+ ---
92
+
93
+ ## Deep Audit Approach
94
+
95
+ ### Discovery
96
+
97
+ | Target | Find |
98
+ |--------|------|
99
+ | Routes | Scan app directories |
100
+ | APIs | Grep HTTP methods |
101
+ | Components | Find UI files |
102
+
103
+ ### Systematic Testing
104
+
105
+ 1. Map all endpoints
106
+ 2. Verify responses
107
+ 3. Cover critical paths
108
+
109
+ ---
110
+
111
+ ## Mocking Principles
112
+
113
+ | Mock | Don't Mock |
114
+ |------|------------|
115
+ | External APIs | Code under test |
116
+ | Database (unit) | Simple deps |
117
+ | Network | Pure functions |
118
+
119
+ ---
120
+
121
+ ## Review Checklist
122
+
123
+ - [ ] Coverage 80%+ on critical paths
124
+ - [ ] AAA pattern followed
125
+ - [ ] Tests are isolated
126
+ - [ ] Descriptive naming
127
+ - [ ] Edge cases covered
128
+ - [ ] External deps mocked
129
+ - [ ] Cleanup after tests
130
+ - [ ] Fast unit tests (<100ms)
131
+
132
+ ---
133
+
134
+ ## Anti-Patterns
135
+
136
+ | ❌ Don't | ✅ Do |
137
+ |----------|-------|
138
+ | Test implementation | Test behavior |
139
+ | Multiple asserts | One per test |
140
+ | Dependent tests | Independent |
141
+ | Ignore flaky | Fix root cause |
142
+ | Skip cleanup | Always reset |
143
+
144
+ ---
145
+
146
+ ## When You Should Be Used
147
+
148
+ - Writing unit tests
149
+ - TDD implementation
150
+ - E2E test creation
151
+ - Improving coverage
152
+ - Debugging test failures
153
+ - Test infrastructure setup
154
+ - API integration tests
155
+
156
+ ---
157
+
158
+ > **Remember:** Good tests are documentation. They explain what the code should do.
package/bin/cli.js ADDED
@@ -0,0 +1,373 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const prompts = require('prompts');
6
+ const pc = require('picocolors');
7
+
8
+ const sourceDir = path.resolve(__dirname, '..');
9
+ const targetDir = process.cwd();
10
+
11
+ // --- Skill Resolver ---
12
+
13
+ const LANG_SKILLS = {
14
+ javascript: ["nodejs-best-practices", "api-design"],
15
+ typescript: ["nodejs-best-practices", "api-design"],
16
+ python: ["python-patterns"],
17
+ go: ["golang-patterns", "golang-testing"],
18
+ php: ["laravel-patterns", "laravel-security", "laravel-tdd"],
19
+ rust: ["rust-pro"],
20
+ java: ["api-design"],
21
+ swift: ["mobile-design"],
22
+ kotlin: ["mobile-design"],
23
+ csharp: ["api-design"],
24
+ };
25
+
26
+ const FRAMEWORK_SKILLS = {
27
+ vue: ["frontend-design", "tailwind-patterns"],
28
+ react: ["nextjs-react-expert", "frontend-design"],
29
+ next: ["nextjs-react-expert", "frontend-design"],
30
+ nuxt: ["frontend-design"],
31
+ svelte: ["frontend-design"],
32
+ laravel: ["laravel-patterns", "laravel-security", "laravel-tdd"],
33
+ express: ["nodejs-best-practices", "api-design"],
34
+ fastapi: ["python-patterns", "api-design"],
35
+ django: ["python-patterns", "api-design"],
36
+ gin: ["golang-patterns", "golang-testing"],
37
+ fiber: ["golang-patterns", "golang-testing"],
38
+ nestjs: ["nodejs-best-practices", "api-design"],
39
+ tauri: ["rust-pro", "mobile-design"],
40
+ flutter: ["mobile-design"],
41
+ "react-native": ["mobile-design"],
42
+ };
43
+
44
+ const INFRA_SKILLS = {
45
+ docker: ["docker-patterns"],
46
+ aws: ["deployment-procedures", "docker-patterns"],
47
+ gcp: ["deployment-procedures", "docker-patterns"],
48
+ azure: ["deployment-procedures", "docker-patterns"],
49
+ vercel: ["deployment-procedures"],
50
+ };
51
+
52
+ function resolveSkills(data) {
53
+ const skills = new Set();
54
+ const lang = (data.primary_language || "").toLowerCase();
55
+
56
+ if (LANG_SKILLS[lang]) {
57
+ LANG_SKILLS[lang].forEach(s => skills.add(s));
58
+ }
59
+
60
+ (data.frameworks || []).forEach(fw => {
61
+ const fwLower = fw.toLowerCase();
62
+ for (const [key, vals] of Object.entries(FRAMEWORK_SKILLS)) {
63
+ if (fwLower.includes(key)) vals.forEach(s => skills.add(s));
64
+ }
65
+ });
66
+
67
+ (data.infrastructure || []).forEach(infra => {
68
+ const infraLower = infra.toLowerCase();
69
+ for (const [key, vals] of Object.entries(INFRA_SKILLS)) {
70
+ if (infraLower.includes(key)) vals.forEach(s => skills.add(s));
71
+ }
72
+ });
73
+
74
+ skills.add("clean-code");
75
+ skills.add("systematic-debugging");
76
+
77
+ return Array.from(skills).sort();
78
+ }
79
+
80
+ function resolveAgentTable(data) {
81
+ const rows = [];
82
+ const frameworks = (data.frameworks || []).map(f => f.toLowerCase());
83
+ const lang = (data.primary_language || "").toLowerCase();
84
+
85
+ // Frontend
86
+ const frontendFws = frameworks.filter(f => ["vue", "react", "next", "nuxt", "svelte", "angular"].includes(f));
87
+ if (frontendFws.length > 0) {
88
+ let feSkills = [];
89
+ frontendFws.forEach(fw => {
90
+ feSkills.push(...(FRAMEWORK_SKILLS[fw] || []));
91
+ });
92
+ rows.push(["Frontend UI", "frontend-specialist", Array.from(new Set(feSkills)).slice(0, 3).join(", ")]);
93
+ }
94
+
95
+ // Backend
96
+ let beSkills = [...(LANG_SKILLS[lang] || ["api-design"])];
97
+ const backendFws = frameworks.filter(f => ["laravel", "express", "fastapi", "django", "gin", "fiber", "nestjs"].includes(f));
98
+ backendFws.forEach(fw => {
99
+ beSkills.push(...(FRAMEWORK_SKILLS[fw] || []));
100
+ });
101
+ rows.push(["Backend API", "backend-specialist", Array.from(new Set(beSkills)).slice(0, 3).join(", ")]);
102
+
103
+ // Mobile/Desktop
104
+ const mobileFws = frameworks.filter(f => ["tauri", "flutter", "react-native"].includes(f));
105
+ if (mobileFws.length > 0) {
106
+ let mobileSkills = [];
107
+ mobileFws.forEach(fw => {
108
+ mobileSkills.push(...(FRAMEWORK_SKILLS[fw] || []));
109
+ });
110
+ rows.push(["Mobile/Desktop", "mobile-developer", Array.from(new Set(mobileSkills)).slice(0, 3).join(", ")]);
111
+ }
112
+
113
+ // DevOps
114
+ if (data.uses_docker || data.cloud !== "none") {
115
+ rows.push(["DevOps/Infra", "devops-engineer", "docker-patterns, deployment-procedures"]);
116
+ }
117
+
118
+ rows.push(["Debug", "debugger", "systematic-debugging"]);
119
+ rows.push(["Security", "security-auditor", "vulnerability-scanner"]);
120
+ rows.push(["Planning", "project-planner", "brainstorming, plan-writing"]);
121
+
122
+ return rows;
123
+ }
124
+
125
+ // --- File Generators ---
126
+
127
+ function generateProjectContext(data) {
128
+ const agentTable = resolveAgentTable(data);
129
+ const autoSkills = resolveSkills(data);
130
+
131
+ const agentRows = agentTable.map(([task, agent, skills]) => `| ${task} | \`${agent}\` | ${skills} |`).join('\n');
132
+ const autoSkillsList = autoSkills.map(s => `- ${s}`).join('\n');
133
+
134
+ return `# PROJECT_CONTEXT.md
135
+ # Generated by thachvd-kit init wizard on ${new Date().toISOString().split('T')[0]}
136
+ # Edit freely — this is your project's brain.
137
+
138
+ ## Project
139
+
140
+ - **Name:** ${data.project_name}
141
+ - **Description:** ${data.description}
142
+ - **Type:** ${data.project_type}
143
+
144
+ ---
145
+
146
+ ## Stack
147
+
148
+ \`\`\`yaml
149
+ stack:
150
+ primary_language: ${data.primary_language}
151
+ frameworks: [${(data.frameworks || []).join(', ')}]
152
+ database: ${data.database || 'none'}
153
+ infrastructure: [${(data.infrastructure || []).join(', ')}]
154
+ package_manager: ${data.package_manager || 'auto-detect'}
155
+ test_framework: ${data.test_framework || 'auto-detect'}
156
+ \`\`\`
157
+
158
+ ---
159
+
160
+ ## Agent Routing
161
+
162
+ | Task Type | Agent | Primary Skills |
163
+ |-----------|-------|----------------|
164
+ ${agentRows}
165
+
166
+ ---
167
+
168
+ ## Auto-Resolved Skills
169
+
170
+ Based on your stack, these skills will be loaded automatically:
171
+
172
+ \`\`\`text
173
+ ${autoSkillsList}
174
+ \`\`\`
175
+
176
+ ---
177
+
178
+ ## Project Conventions
179
+
180
+ - **Max file size:** ${data.max_file_lines || '300'} lines (then modularize)
181
+ - **Code style:** ${data.code_style || 'project-standard'}
182
+
183
+ ---
184
+
185
+ ## Architecture Notes
186
+
187
+ <!-- Add architecture notes, key decisions, patterns used -->
188
+
189
+ ---
190
+
191
+ ## Current Phase
192
+
193
+ - **Done:** —
194
+ - **In Progress:** Initial setup
195
+ - **Next:** —
196
+
197
+ ---
198
+
199
+ ## Known Issues / Tasks
200
+
201
+ <!-- Add known issues or pending tasks -->
202
+ `;
203
+ }
204
+
205
+ function generateClaudeMd(data) {
206
+ return `# CLAUDE.md — ${data.project_name}
207
+ # Generated by thachvd-kit. See PROJECT_CONTEXT.md for full stack info.
208
+ # Cross-platform: Claude Code · Codex · OpenCode
209
+
210
+ ## Project
211
+ ${data.description}
212
+ Stack: ${data.primary_language} | ${(data.frameworks || []).join(', ')}
213
+
214
+ ## Rules
215
+ - Read PROJECT_CONTEXT.md first for stack details and agent routing.
216
+ - Follow skills in .agent/skills/ (or .claude/skills/).
217
+ - Tests are mandatory. Verify before claiming done.
218
+ - Max ${data.max_file_lines || '300'} lines per file.
219
+
220
+ ## Key Skills
221
+ - Plan: \`plan-writing\` → \`executing-plans\`
222
+ - Review: \`requesting-code-review\` / \`receiving-code-review\`
223
+ - Quality: \`clean-code\`, \`verification-before-completion\`
224
+ - Workflow: \`subagent-driven-development\`, \`finishing-a-development-branch\`
225
+
226
+ ## Commands
227
+ - \`/plan\` — Create implementation plan
228
+ - \`/debug\` — Systematic debugging
229
+ - \`/test\` — Run test suite
230
+ - \`/deploy\` — Deploy checklist
231
+
232
+ See PROJECT_CONTEXT.md for full agent routing table.
233
+ `;
234
+ }
235
+
236
+ // --- Main CLI ---
237
+
238
+ async function main() {
239
+ console.log(pc.bold(pc.cyan('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')));
240
+ console.log(' ' + pc.bold('thachvd-kit') + ' — Project Init Wizard');
241
+ console.log(' Generates .agent/ folder & smart PROJECT_CONTEXT.md');
242
+ console.log(pc.bold(pc.cyan('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━')) + '\n');
243
+
244
+ if (fs.existsSync(path.join(targetDir, 'PROJECT_CONTEXT.md'))) {
245
+ const res = await prompts({
246
+ type: 'confirm',
247
+ name: 'overwrite',
248
+ message: 'PROJECT_CONTEXT.md already exists in this folder. Overwrite?',
249
+ initial: false
250
+ });
251
+ if (!res.overwrite) {
252
+ console.log(pc.yellow('\nAborted. Existing project context unchanged.'));
253
+ process.exit(0);
254
+ }
255
+ }
256
+
257
+ const { project_name, description, project_type } = await prompts([
258
+ { type: 'text', name: 'project_name', message: 'Project name:', initial: path.basename(targetDir) },
259
+ { type: 'text', name: 'description', message: 'Short description:', initial: 'A software project' },
260
+ {
261
+ type: 'select', name: 'project_type', message: 'Project type:',
262
+ choices: [
263
+ { title: 'Web App', value: 'web-app' },
264
+ { title: 'API', value: 'api' },
265
+ { title: 'Mobile', value: 'mobile' },
266
+ { title: 'Desktop', value: 'desktop' },
267
+ { title: 'CLI', value: 'cli' },
268
+ { title: 'Fullstack', value: 'fullstack' },
269
+ ]
270
+ }
271
+ ]);
272
+
273
+ const { primary_language } = await prompts({
274
+ type: 'select',
275
+ name: 'primary_language',
276
+ message: 'Primary language:',
277
+ choices: ['typescript', 'javascript', 'python', 'go', 'php', 'rust', 'java', 'swift', 'kotlin', 'csharp', 'cpp'].map(l => ({ title: l, value: l }))
278
+ });
279
+
280
+ const { frameworks } = await prompts({
281
+ type: 'multiselect',
282
+ name: 'frameworks',
283
+ message: 'Frameworks (Space to select, Enter to confirm):',
284
+ choices: [
285
+ 'vue', 'react', 'next', 'nuxt', 'svelte', 'angular',
286
+ 'laravel', 'express', 'fastapi', 'django', 'gin', 'fiber', 'nestjs',
287
+ 'tauri', 'flutter', 'react-native'
288
+ ].map(f => ({ title: f, value: f })),
289
+ min: 0
290
+ });
291
+
292
+ const dbAndInfra = await prompts([
293
+ {
294
+ type: 'select', name: 'database', message: 'Database / ORM:',
295
+ choices: ['postgres', 'mysql', 'sqlite', 'mongodb', 'redis', 'dynamodb', 'none'].map(d => ({ title: d, value: d }))
296
+ },
297
+ { type: 'confirm', name: 'uses_docker', message: 'Uses Docker / Docker Compose?', initial: true },
298
+ {
299
+ type: 'select', name: 'cloud', message: 'Cloud Provider:',
300
+ choices: ['aws', 'gcp', 'azure', 'vercel', 'fly', 'railway', 'none'].map(c => ({ title: c, value: c }))
301
+ }
302
+ ]);
303
+
304
+ const { package_manager, test_framework, max_file_lines } = await prompts([
305
+ {
306
+ type: 'select', name: 'package_manager', message: 'Package Manager:',
307
+ choices: ['npm', 'pnpm', 'yarn', 'bun', 'pip', 'uv', 'go mod', 'cargo', 'composer', 'auto-detect'].map(p => ({ title: p, value: p }))
308
+ },
309
+ { type: 'text', name: 'test_framework', message: 'Test Framework (jest, phpunit, etc):', initial: 'auto-detect' },
310
+ { type: 'text', name: 'max_file_lines', message: 'Max lines per file:', initial: '300' }
311
+ ]);
312
+
313
+ // Combine data
314
+ const data = {
315
+ project_name, description, project_type, primary_language, frameworks,
316
+ ...dbAndInfra, package_manager, test_framework, max_file_lines
317
+ };
318
+
319
+ data.infrastructure = [];
320
+ if (data.uses_docker) data.infrastructure.push('docker');
321
+ if (data.cloud !== 'none') data.infrastructure.push(data.cloud);
322
+
323
+ // --- Copy .agent folder ---
324
+ const agentDir = path.join(targetDir, '.agent');
325
+ console.log(`\n${pc.bold(pc.cyan('━━ Generating Files ━━'))}`);
326
+
327
+ if (!fs.existsSync(agentDir)) {
328
+ fs.mkdirSync(agentDir, { recursive: true });
329
+ }
330
+
331
+ // Copy folders: agents, rules, skills, workflows
332
+ const foldersToCopy = ['agents', 'rules', 'skills', 'workflows'];
333
+ for (const folder of foldersToCopy) {
334
+ const srcPath = path.join(sourceDir, folder);
335
+ const destPath = path.join(agentDir, folder);
336
+ if (fs.existsSync(srcPath)) {
337
+ // Use basic recursive copy since Node 16.7 fs.cpSync handles this
338
+ fs.cpSync(srcPath, destPath, { recursive: true, force: true });
339
+ console.log(` ${pc.green('✓')} Copied ${pc.bold(`.agent/${folder}`)}`);
340
+ } else {
341
+ console.log(` ${pc.yellow('-')} Source ${folder} not found.`);
342
+ }
343
+ }
344
+
345
+ // Write contexts
346
+ fs.writeFileSync(path.join(targetDir, 'PROJECT_CONTEXT.md'), generateProjectContext(data), 'utf8');
347
+ console.log(` ${pc.green('✓')} Generated ${pc.bold('PROJECT_CONTEXT.md')}`);
348
+
349
+ fs.writeFileSync(path.join(targetDir, 'CLAUDE.md'), generateClaudeMd(data), 'utf8');
350
+ console.log(` ${pc.green('✓')} Generated ${pc.bold('CLAUDE.md')}`);
351
+
352
+ // Summary
353
+ const autoSkills = resolveSkills(data);
354
+ console.log(`\n${pc.bold(pc.green('━━ Done! ━━'))}
355
+
356
+ ${pc.bold('Project:')} ${data.project_name}
357
+ ${pc.bold('Stack:')} ${data.primary_language} | ${(data.frameworks || []).join(', ') || 'no framework'}
358
+ ${pc.bold('Infra:')} ${(data.infrastructure || []).join(', ') || 'none'}
359
+
360
+ ${pc.bold('Auto-resolved skills:')}
361
+ ${autoSkills.map(s => ' · ' + s).join('\n')}
362
+
363
+ ${pc.bold('Next steps:')}
364
+ 1. Your kit is installed in ${pc.bold('./.agent')}
365
+ 2. Review ${pc.bold('PROJECT_CONTEXT.md')} and add architecture notes
366
+ 3. Open project in Antigravity or Claude Code — the agent will read context on start!
367
+ `);
368
+ }
369
+
370
+ main().catch(err => {
371
+ console.error(pc.red('\nError during init:'), err);
372
+ process.exit(1);
373
+ });
@@ -0,0 +1,35 @@
1
+ # 🗺️ PROJECT CONTEXT - [Project Name]
2
+
3
+ > Initialize this file at the start of a project to provide the Agent with a Ground Truth.
4
+
5
+ ---
6
+
7
+ ## 🎯 Project Objectives
8
+ - Brief description of what the app does and the problem it solves.
9
+
10
+ ## 🛠️ Technology Stack
11
+ - **Frontend/UI:** [e.g., React, Vue, Flutter]
12
+ - **Backend/Core:** [e.g., Rust, Node.js, Python]
13
+ - **State Management:** [e.g., Zustand, Redux, Signals]
14
+ - **Styling:** [e.g., Tailwind CSS, Vanilla CSS]
15
+
16
+ ## 📂 Project Structure
17
+ - `src/[store|state]/`: State management modules.
18
+ - `src/[services|logic]/`: Heavy business logic and I/O.
19
+ - `src/lib/`: Reusable utility functions.
20
+ - [Additional critical directories...]
21
+
22
+ ## 📜 Rules & Constraints
23
+ - **Granularity:** [e.g., Max 250 lines/file] (Mandatory file splitting).
24
+ - **Architecture:** Decouple UI from business logic.
25
+ - **Safety:** [e.g., Use specific patterns for terminal commands or secrets].
26
+ - [Project-specific golden rules...]
27
+
28
+ ## 🚧 Current Status
29
+ - **Current Objective:** [e.g., Implementing Auth flow].
30
+ - **Known Issues:** [e.g., API latency on high load].
31
+ - **Next Milestones:** [e.g., Deployment to staging].
32
+
33
+ ---
34
+
35
+ **Note:** This file is the "Ground Truth". The Agent IS ALLOWED and MANDATED to update this file after every significant task.