thachvd-kit 1.0.14 → 1.0.16

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 (203) hide show
  1. package/.agent/agents/backend-specialist.md +263 -0
  2. package/.agent/agents/code-archaeologist.md +106 -0
  3. package/.agent/agents/database-architect.md +226 -0
  4. package/.agent/agents/debugger.md +225 -0
  5. package/.agent/agents/devops-engineer.md +242 -0
  6. package/.agent/agents/documentation-writer.md +104 -0
  7. package/.agent/agents/explorer-agent.md +73 -0
  8. package/.agent/agents/frontend-specialist.md +593 -0
  9. package/.agent/agents/game-developer.md +162 -0
  10. package/.agent/agents/mobile-developer.md +377 -0
  11. package/.agent/agents/orchestrator.md +416 -0
  12. package/.agent/agents/penetration-tester.md +188 -0
  13. package/.agent/agents/performance-optimizer.md +187 -0
  14. package/.agent/agents/product-manager.md +112 -0
  15. package/.agent/agents/product-owner.md +95 -0
  16. package/.agent/agents/project-planner.md +406 -0
  17. package/.agent/agents/qa-automation-engineer.md +103 -0
  18. package/.agent/agents/security-auditor.md +170 -0
  19. package/.agent/agents/seo-specialist.md +111 -0
  20. package/.agent/agents/test-engineer.md +158 -0
  21. package/.agent/docs/architecture.md +22 -0
  22. package/.agent/docs/conventions.md +21 -0
  23. package/.agent/docs/project.md +40 -0
  24. package/.agent/docs/workflow.md +24 -0
  25. package/.agent/rules/GEMINI.md +45 -0
  26. package/.agent/skills/api-design/SKILL.md +156 -0
  27. package/.agent/skills/api-patterns/SKILL.md +81 -0
  28. package/.agent/skills/api-patterns/api-style.md +42 -0
  29. package/.agent/skills/api-patterns/auth.md +24 -0
  30. package/.agent/skills/api-patterns/documentation.md +26 -0
  31. package/.agent/skills/api-patterns/graphql.md +41 -0
  32. package/.agent/skills/api-patterns/rate-limiting.md +31 -0
  33. package/.agent/skills/api-patterns/response.md +37 -0
  34. package/.agent/skills/api-patterns/rest.md +40 -0
  35. package/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
  36. package/.agent/skills/api-patterns/security-testing.md +122 -0
  37. package/.agent/skills/api-patterns/trpc.md +41 -0
  38. package/.agent/skills/api-patterns/versioning.md +22 -0
  39. package/.agent/skills/app-builder/SKILL.md +75 -0
  40. package/.agent/skills/app-builder/agent-coordination.md +71 -0
  41. package/.agent/skills/app-builder/feature-building.md +53 -0
  42. package/.agent/skills/app-builder/project-detection.md +34 -0
  43. package/.agent/skills/app-builder/scaffolding.md +118 -0
  44. package/.agent/skills/app-builder/tech-stack.md +40 -0
  45. package/.agent/skills/app-builder/templates/SKILL.md +39 -0
  46. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  47. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  48. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  49. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  50. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  51. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  52. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  53. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
  54. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
  55. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
  56. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
  57. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  58. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
  59. package/.agent/skills/architecture/SKILL.md +55 -0
  60. package/.agent/skills/architecture/context-discovery.md +43 -0
  61. package/.agent/skills/architecture/examples.md +94 -0
  62. package/.agent/skills/architecture/pattern-selection.md +68 -0
  63. package/.agent/skills/architecture/patterns-reference.md +50 -0
  64. package/.agent/skills/architecture/trade-off-analysis.md +77 -0
  65. package/.agent/skills/bash-linux/SKILL.md +199 -0
  66. package/.agent/skills/behavioral-modes/SKILL.md +242 -0
  67. package/.agent/skills/brainstorming/SKILL.md +163 -0
  68. package/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
  69. package/.agent/skills/clean-code/SKILL.md +201 -0
  70. package/.agent/skills/code-review-checklist/SKILL.md +109 -0
  71. package/.agent/skills/database-design/SKILL.md +52 -0
  72. package/.agent/skills/database-design/database-selection.md +43 -0
  73. package/.agent/skills/database-design/indexing.md +39 -0
  74. package/.agent/skills/database-design/migrations.md +48 -0
  75. package/.agent/skills/database-design/optimization.md +36 -0
  76. package/.agent/skills/database-design/orm-selection.md +30 -0
  77. package/.agent/skills/database-design/schema-design.md +56 -0
  78. package/.agent/skills/database-design/scripts/schema_validator.py +172 -0
  79. package/.agent/skills/deployment-procedures/SKILL.md +241 -0
  80. package/.agent/skills/desktop-design/SKILL.md +25 -0
  81. package/.agent/skills/dispatching-parallel-agents/SKILL.md +112 -0
  82. package/.agent/skills/doc.md +177 -0
  83. package/.agent/skills/docker-patterns/SKILL.md +232 -0
  84. package/.agent/skills/documentation-templates/SKILL.md +194 -0
  85. package/.agent/skills/executing-plans/SKILL.md +61 -0
  86. package/.agent/skills/finishing-a-development-branch/SKILL.md +135 -0
  87. package/.agent/skills/frontend-design/SKILL.md +418 -0
  88. package/.agent/skills/frontend-design/animation-guide.md +331 -0
  89. package/.agent/skills/frontend-design/color-system.md +311 -0
  90. package/.agent/skills/frontend-design/decision-trees.md +418 -0
  91. package/.agent/skills/frontend-design/motion-graphics.md +306 -0
  92. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  93. package/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
  94. package/.agent/skills/frontend-design/typography-system.md +345 -0
  95. package/.agent/skills/frontend-design/ux-psychology.md +1116 -0
  96. package/.agent/skills/frontend-design/visual-effects.md +383 -0
  97. package/.agent/skills/game-development/2d-games/SKILL.md +119 -0
  98. package/.agent/skills/game-development/3d-games/SKILL.md +135 -0
  99. package/.agent/skills/game-development/SKILL.md +167 -0
  100. package/.agent/skills/game-development/game-art/SKILL.md +185 -0
  101. package/.agent/skills/game-development/game-audio/SKILL.md +190 -0
  102. package/.agent/skills/game-development/game-design/SKILL.md +129 -0
  103. package/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
  104. package/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
  105. package/.agent/skills/game-development/pc-games/SKILL.md +144 -0
  106. package/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
  107. package/.agent/skills/game-development/web-games/SKILL.md +150 -0
  108. package/.agent/skills/geo-fundamentals/SKILL.md +156 -0
  109. package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  110. package/.agent/skills/golang-patterns/SKILL.md +226 -0
  111. package/.agent/skills/golang-testing/SKILL.md +182 -0
  112. package/.agent/skills/i18n-localization/SKILL.md +154 -0
  113. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  114. package/.agent/skills/intelligent-routing/SKILL.md +335 -0
  115. package/.agent/skills/laravel-patterns/SKILL.md +224 -0
  116. package/.agent/skills/laravel-security/SKILL.md +171 -0
  117. package/.agent/skills/laravel-tdd/SKILL.md +149 -0
  118. package/.agent/skills/lint-and-validate/SKILL.md +45 -0
  119. package/.agent/skills/lint-and-validate/scripts/lint_runner.py +184 -0
  120. package/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
  121. package/.agent/skills/mcp-builder/SKILL.md +176 -0
  122. package/.agent/skills/mobile-design/SKILL.md +394 -0
  123. package/.agent/skills/mobile-design/decision-trees.md +516 -0
  124. package/.agent/skills/mobile-design/mobile-backend.md +491 -0
  125. package/.agent/skills/mobile-design/mobile-color-system.md +420 -0
  126. package/.agent/skills/mobile-design/mobile-debugging.md +122 -0
  127. package/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
  128. package/.agent/skills/mobile-design/mobile-navigation.md +458 -0
  129. package/.agent/skills/mobile-design/mobile-performance.md +767 -0
  130. package/.agent/skills/mobile-design/mobile-testing.md +356 -0
  131. package/.agent/skills/mobile-design/mobile-typography.md +433 -0
  132. package/.agent/skills/mobile-design/platform-android.md +666 -0
  133. package/.agent/skills/mobile-design/platform-ios.md +561 -0
  134. package/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
  135. package/.agent/skills/mobile-design/touch-psychology.md +537 -0
  136. package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  137. package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  138. package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  139. package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  140. package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  141. package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  142. package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  143. package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  144. package/.agent/skills/nextjs-react-expert/SKILL.md +286 -0
  145. package/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  146. package/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  147. package/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
  148. package/.agent/skills/parallel-agents/SKILL.md +175 -0
  149. package/.agent/skills/performance-profiling/SKILL.md +143 -0
  150. package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
  151. package/.agent/skills/plan-writing/SKILL.md +152 -0
  152. package/.agent/skills/powershell-windows/SKILL.md +167 -0
  153. package/.agent/skills/project-onboarding/SKILL.md +42 -0
  154. package/.agent/skills/python-patterns/SKILL.md +441 -0
  155. package/.agent/skills/react-frontend/SKILL.md +25 -0
  156. package/.agent/skills/receiving-code-review/SKILL.md +120 -0
  157. package/.agent/skills/red-team-tactics/SKILL.md +199 -0
  158. package/.agent/skills/requesting-code-review/SKILL.md +67 -0
  159. package/.agent/skills/rust-pro/SKILL.md +176 -0
  160. package/.agent/skills/seo-fundamentals/SKILL.md +129 -0
  161. package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  162. package/.agent/skills/server-management/SKILL.md +161 -0
  163. package/.agent/skills/subagent-driven-development/SKILL.md +76 -0
  164. package/.agent/skills/systematic-debugging/SKILL.md +109 -0
  165. package/.agent/skills/tailwind-patterns/SKILL.md +269 -0
  166. package/.agent/skills/tdd-workflow/SKILL.md +149 -0
  167. package/.agent/skills/testing-patterns/SKILL.md +178 -0
  168. package/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
  169. package/.agent/skills/using-git-worktrees/SKILL.md +122 -0
  170. package/.agent/skills/verification-before-completion/SKILL.md +99 -0
  171. package/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
  172. package/.agent/skills/vulnerability-scanner/checklists.md +121 -0
  173. package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  174. package/.agent/skills/web-design-guidelines/SKILL.md +57 -0
  175. package/.agent/skills/webapp-testing/SKILL.md +187 -0
  176. package/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
  177. package/.agent/skills/writing-skills/SKILL.md +110 -0
  178. package/.agent/workflows/brainstorm.md +113 -0
  179. package/.agent/workflows/create.md +59 -0
  180. package/.agent/workflows/debug.md +103 -0
  181. package/.agent/workflows/deploy.md +176 -0
  182. package/.agent/workflows/enhance.md +63 -0
  183. package/.agent/workflows/orchestrate.md +237 -0
  184. package/.agent/workflows/plan.md +89 -0
  185. package/.agent/workflows/preview.md +81 -0
  186. package/.agent/workflows/status.md +86 -0
  187. package/.agent/workflows/test.md +144 -0
  188. package/.agent/workflows/ui-ux-pro-max.md +296 -0
  189. package/LICENSE +21 -21
  190. package/README.md +37 -71
  191. package/agents/frontend-specialist.md +2 -2
  192. package/agents/mobile-developer.md +4 -4
  193. package/bin/cli.js +1239 -1326
  194. package/kit/PROMPT_RECIPE.md +30 -52
  195. package/kit/README.md +29 -33
  196. package/package.json +51 -51
  197. package/rules/GEMINI.md +43 -207
  198. package/skills/desktop-design/SKILL.md +25 -25
  199. package/skills/project-onboarding/SKILL.md +42 -62
  200. package/skills/react-frontend/SKILL.md +25 -25
  201. package/PROJECT_CONTEXT.template.md +0 -68
  202. package/kit/PROJECT_CONTEXT.template.md +0 -35
  203. package/scripts/init.py +0 -1047
@@ -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.
@@ -0,0 +1,22 @@
1
+ # Architecture Notes
2
+
3
+ ## Current Map
4
+
5
+ - `bin/cli.js`: Main Node.js CLI. Handles scan detection, prompts, file generation, and `.agent/` copy.
6
+ - `.agent/`: Installed kit content copied into target projects.
7
+ - `agents/`, `skills/`, `workflows/`, `rules/`: Source mirrors for kit content.
8
+ - `kit/`: Human-facing kit docs and prompt recipes.
9
+ - `scripts/`: Helper scripts used by generated workflows.
10
+
11
+ ## Output Model
12
+
13
+ `thachvd-kit init` creates thin root entry files and puts project-specific knowledge in `.agent/docs/`:
14
+
15
+ - `AGENTS.md`: shared instructions for Codex, Antigravity, and Claude Code.
16
+ - `CLAUDE.md`: imports `AGENTS.md` for Claude Code.
17
+ - `GEMINI.md`: Antigravity entry that points to `AGENTS.md`.
18
+ - `.agent/docs/*.md`: stack, architecture, conventions, and workflow.
19
+
20
+ ## Maintenance Rule
21
+
22
+ Keep root entry files short. Add project-specific details to `.agent/docs/*` and reusable behavior to `.agent/skills/*` or `.agent/workflows/*`.
@@ -0,0 +1,21 @@
1
+ # Coding Conventions
2
+
3
+ ## JavaScript CLI
4
+
5
+ - Keep CLI behavior in `bin/cli.js` unless a helper becomes clearly reusable.
6
+ - Prefer simple filesystem APIs from Node.js standard library.
7
+ - Keep generated Markdown ASCII-only unless the target file already requires non-ASCII.
8
+ - Avoid adding dependencies for small formatting or path operations.
9
+
10
+ ## Docs And Rules
11
+
12
+ - Root `AGENTS.md`, `CLAUDE.md`, and `GEMINI.md` should stay concise.
13
+ - Put scan-specific or project-specific detail in `.agent/docs/`.
14
+ - Keep `.agent/rules/GEMINI.md` and `rules/GEMINI.md` aligned.
15
+ - Keep mirrored source folders and `.agent/` content aligned when changing kit assets.
16
+
17
+ ## Verification
18
+
19
+ - Syntax-check `bin/cli.js` after edits.
20
+ - Run `npm test`.
21
+ - Run `npm pack --dry-run` for package output changes.
@@ -0,0 +1,40 @@
1
+ # Project Rules
2
+
3
+ Generated by thachvd-kit.
4
+
5
+ ## Summary
6
+
7
+ - Name: thachvd-kit
8
+ - Description: Project rules bootstrap kit for Codex, Antigravity, and Claude Code.
9
+ - Type: CLI package
10
+ - App root: `.`
11
+
12
+ ## Stack
13
+
14
+ - Language: JavaScript
15
+ - Runtime: Node.js
16
+ - Package manager: npm
17
+ - CLI entry: `bin/cli.js`
18
+ - Published package files: `.agent`, `agents`, `bin`, `kit`, `rules`, `scripts`, `skills`, `workflows`, `README.md`, `LICENSE`
19
+
20
+ ## Commands
21
+
22
+ - Install: `npm install`
23
+ - Test: `npm test`
24
+ - Package dry run: `npm pack --dry-run`
25
+ - Publish: `npm publish`
26
+
27
+ ## Agent Routing
28
+
29
+ | Task Type | Agent | Primary Skills |
30
+ |-----------|-------|----------------|
31
+ | CLI behavior | `backend-specialist` | `nodejs-best-practices`, `clean-code` |
32
+ | Docs/rules | `documentation-writer` | `documentation-templates` |
33
+ | Workflow design | `project-planner` | `plan-writing`, `executing-plans` |
34
+ | Security/release | `security-auditor` / `devops-engineer` | `vulnerability-scanner`, `deployment-procedures` |
35
+
36
+ ## Verification
37
+
38
+ - Run `node --check bin/cli.js` after CLI edits.
39
+ - Run `npm test` before claiming code changes are complete.
40
+ - Run `npm pack --dry-run` before release-oriented changes.
@@ -0,0 +1,24 @@
1
+ # Agent Workflow
2
+
3
+ ## Before Every Task
4
+
5
+ 1. Read `AGENTS.md`.
6
+ 2. Read `.agent/docs/project.md`.
7
+ 3. Classify the request.
8
+ 4. Load only the relevant agent, skill, or workflow docs.
9
+
10
+ ## Implementation Flow
11
+
12
+ 1. State assumptions and success criteria when the task is not trivial.
13
+ 2. Inspect dependent files before editing.
14
+ 3. Make the smallest coherent change.
15
+ 4. Add or update focused tests when behavior changes.
16
+ 5. Run verification.
17
+ 6. Summarize changed files and verification evidence.
18
+
19
+ ## Release Flow
20
+
21
+ 1. Update package metadata when changing publish behavior.
22
+ 2. Run `npm test`.
23
+ 3. Run `npm pack --dry-run`.
24
+ 4. Review tarball contents before publish.
@@ -0,0 +1,45 @@
1
+ ---
2
+ trigger: always_on
3
+ ---
4
+
5
+ # GEMINI.md
6
+
7
+ Antigravity-compatible entry rules for thachvd-kit projects.
8
+
9
+ ## Startup
10
+
11
+ 1. Read `AGENTS.md` at the project root.
12
+ 2. Read `.agent/docs/project.md` for stack, commands, and routing.
13
+ 3. Read `.agent/docs/workflow.md` before editing.
14
+ 4. Read `.agent/docs/architecture.md` and `.agent/docs/conventions.md` before planning non-trivial code changes.
15
+ 5. If any `.agent/docs/*.md` file contains `TODO: refine`, update that doc from the real code before product code changes.
16
+
17
+ ## Routing
18
+
19
+ - Frontend/UI: `.agent/agents/frontend-specialist.md`
20
+ - Backend/API: `.agent/agents/backend-specialist.md`
21
+ - Database/schema: `.agent/agents/database-architect.md`
22
+ - Mobile/desktop: `.agent/agents/mobile-developer.md`
23
+ - DevOps/CI/deploy: `.agent/agents/devops-engineer.md`
24
+ - Debug/RCA: `.agent/agents/debugger.md`
25
+ - Security: `.agent/agents/security-auditor.md`
26
+ - Multi-domain: `.agent/agents/orchestrator.md`
27
+
28
+ Load only the agent, skill, or workflow files relevant to the current task.
29
+
30
+ ## Execution
31
+
32
+ - Questions and analysis: answer directly; do not edit code.
33
+ - Simple fix: inspect dependencies, make the smallest change, verify.
34
+ - Feature or refactor: state assumptions, define success criteria, plan, implement, verify.
35
+ - UI work: use relevant frontend design skills before editing.
36
+ - Security or deploy work: run the matching checklist before claiming done.
37
+
38
+ ## Standards
39
+
40
+ - Respond in the user's language.
41
+ - Keep code, identifiers, and code comments in English.
42
+ - Prefer existing project patterns over new abstractions.
43
+ - Keep changes surgical.
44
+ - Tests or equivalent verification are mandatory.
45
+ - Update `.agent/docs/*` when stack, architecture, workflow, or conventions change.
@@ -0,0 +1,156 @@
1
+ ---
2
+ name: api-design
3
+ description: REST API design patterns. Use when designing new API endpoints, reviewing API contracts, choosing pagination strategies, error response formats, versioning, or HTTP status codes.
4
+ allowed-tools: Read, Edit, Write
5
+ ---
6
+
7
+ # API Design Patterns
8
+
9
+ ## URL Structure
10
+
11
+ ```
12
+ # Resources: plural nouns, lowercase, kebab-case, no verbs
13
+ GET /api/v1/users
14
+ POST /api/v1/users
15
+ GET /api/v1/users/:id
16
+ PUT /api/v1/users/:id
17
+ PATCH /api/v1/users/:id
18
+ DELETE /api/v1/users/:id
19
+
20
+ # Sub-resources for relationships
21
+ GET /api/v1/users/:id/orders
22
+ POST /api/v1/users/:id/orders
23
+
24
+ # Actions that don't map to CRUD
25
+ POST /api/v1/orders/:id/cancel
26
+ POST /api/v1/auth/refresh
27
+ ```
28
+
29
+ **Naming rules:**
30
+ ```
31
+ ✅ /api/v1/team-members kebab-case
32
+ ✅ /api/v1/orders?status=active query params for filtering
33
+ ✅ /api/v1/users/123/orders nested for ownership
34
+
35
+ ❌ /api/v1/getUsers verb in URL
36
+ ❌ /api/v1/user singular
37
+ ❌ /api/v1/team_members snake_case in URLs
38
+ ```
39
+
40
+ ## HTTP Methods and Status Codes
41
+
42
+ | Method | Idempotent | Use For |
43
+ |--------|-----------|---------|
44
+ | GET | Yes | Retrieve |
45
+ | POST | No | Create / trigger actions |
46
+ | PUT | Yes | Full replacement |
47
+ | PATCH | No | Partial update |
48
+ | DELETE | Yes | Remove |
49
+
50
+ ```
51
+ # Success
52
+ 200 OK GET, PUT, PATCH (with body)
53
+ 201 Created POST (add Location header)
54
+ 204 No Content DELETE, PUT (no body)
55
+
56
+ # Client Errors
57
+ 400 Bad Request Validation failure, malformed JSON
58
+ 401 Unauthorized Missing or invalid auth
59
+ 403 Forbidden Authenticated, not authorized
60
+ 404 Not Found Resource doesn't exist
61
+ 409 Conflict Duplicate entry, state conflict
62
+ 422 Unprocessable Entity Valid JSON, semantically invalid
63
+ 429 Too Many Requests Rate limit exceeded
64
+
65
+ # Server Errors
66
+ 500 Internal Server Error Never expose internal details
67
+ 503 Service Unavailable Include Retry-After header
68
+ ```
69
+
70
+ ## Response Format
71
+
72
+ ```json
73
+ // Success
74
+ { "data": { "id": "abc-123", "email": "alice@example.com", "created_at": "2025-01-15T10:30:00Z" } }
75
+
76
+ // Collection with pagination
77
+ {
78
+ "data": [{ "id": "abc-123", "name": "Alice" }],
79
+ "meta": { "total": 142, "page": 1, "per_page": 20, "total_pages": 8 },
80
+ "links": { "next": "/api/v1/users?page=2&per_page=20" }
81
+ }
82
+
83
+ // Error
84
+ {
85
+ "error": {
86
+ "code": "validation_error",
87
+ "message": "Request validation failed",
88
+ "details": [
89
+ { "field": "email", "message": "Must be a valid email", "code": "invalid_format" }
90
+ ]
91
+ }
92
+ }
93
+ ```
94
+
95
+ ## Pagination
96
+
97
+ | Use Case | Type |
98
+ |----------|------|
99
+ | Admin dashboards, small datasets (<10K) | Offset |
100
+ | Infinite scroll, feeds, large datasets | **Cursor** |
101
+ | Public APIs | Cursor (default) |
102
+ | Search results | Offset (users expect page numbers) |
103
+
104
+ ```
105
+ # Offset
106
+ GET /api/v1/users?page=2&per_page=20
107
+
108
+ # Cursor
109
+ GET /api/v1/users?cursor=eyJpZCI6MTIzfQ&limit=20
110
+ → { "data": [...], "meta": { "has_next": true, "next_cursor": "eyJpZCI6MTQzfQ" } }
111
+ ```
112
+
113
+ ## Versioning
114
+
115
+ ```
116
+ /api/v1/users ← recommended
117
+ /api/v2/users ← when breaking changes needed
118
+ ```
119
+
120
+ **Breaking changes** (require new version): removing fields, changing types, changing URL structure.
121
+ **Non-breaking** (no new version): adding optional fields/params, adding endpoints.
122
+
123
+ Deprecation: 6-month notice, add `Sunset` header, return `410 Gone` after.
124
+
125
+ ## Filtering, Sorting, Search
126
+
127
+ ```
128
+ GET /api/v1/orders?status=active&created_after=2025-01-01
129
+ GET /api/v1/users?sort=created_at&order=desc
130
+ GET /api/v1/products?q=widget
131
+ GET /api/v1/users?fields=id,email,name # Sparse fieldsets
132
+ ```
133
+
134
+ ## Rate Limiting Headers
135
+
136
+ ```
137
+ X-RateLimit-Limit: 100
138
+ X-RateLimit-Remaining: 45
139
+ X-RateLimit-Reset: 1640995200
140
+ Retry-After: 30 # on 429
141
+ ```
142
+
143
+ ## API Design Checklist
144
+
145
+ Before shipping a new endpoint:
146
+
147
+ - [ ] URL: plural noun, kebab-case, no verbs
148
+ - [ ] Correct HTTP method and status code
149
+ - [ ] Input validated with schema (Zod, Pydantic, Go validator)
150
+ - [ ] Error response follows standard format with field-level details
151
+ - [ ] Pagination implemented for list endpoints
152
+ - [ ] Authentication required (or explicitly marked public)
153
+ - [ ] Authorization checked (user can only access their own resources)
154
+ - [ ] Rate limiting configured
155
+ - [ ] Response does not leak internal details (stack traces, SQL errors)
156
+ - [ ] OpenAPI spec updated
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: api-patterns
3
+ description: API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.
4
+ allowed-tools: Read, Write, Edit, Glob, Grep
5
+ ---
6
+
7
+ # API Patterns
8
+
9
+ > API design principles and decision-making for 2025.
10
+ > **Learn to THINK, not copy fixed patterns.**
11
+
12
+ ## 🎯 Selective Reading Rule
13
+
14
+ **Read ONLY files relevant to the request!** Check the content map, find what you need.
15
+
16
+ ---
17
+
18
+ ## 📑 Content Map
19
+
20
+ | File | Description | When to Read |
21
+ |------|-------------|--------------|
22
+ | `api-style.md` | REST vs GraphQL vs tRPC decision tree | Choosing API type |
23
+ | `rest.md` | Resource naming, HTTP methods, status codes | Designing REST API |
24
+ | `response.md` | Envelope pattern, error format, pagination | Response structure |
25
+ | `graphql.md` | Schema design, when to use, security | Considering GraphQL |
26
+ | `trpc.md` | TypeScript monorepo, type safety | TS fullstack projects |
27
+ | `versioning.md` | URI/Header/Query versioning | API evolution planning |
28
+ | `auth.md` | JWT, OAuth, Passkey, API Keys | Auth pattern selection |
29
+ | `rate-limiting.md` | Token bucket, sliding window | API protection |
30
+ | `documentation.md` | OpenAPI/Swagger best practices | Documentation |
31
+ | `security-testing.md` | OWASP API Top 10, auth/authz testing | Security audits |
32
+
33
+ ---
34
+
35
+ ## 🔗 Related Skills
36
+
37
+ | Need | Skill |
38
+ |------|-------|
39
+ | API implementation | `@[skills/backend-development]` |
40
+ | Data structure | `@[skills/database-design]` |
41
+ | Security details | `@[skills/security-hardening]` |
42
+
43
+ ---
44
+
45
+ ## ✅ Decision Checklist
46
+
47
+ Before designing an API:
48
+
49
+ - [ ] **Asked user about API consumers?**
50
+ - [ ] **Chosen API style for THIS context?** (REST/GraphQL/tRPC)
51
+ - [ ] **Defined consistent response format?**
52
+ - [ ] **Planned versioning strategy?**
53
+ - [ ] **Considered authentication needs?**
54
+ - [ ] **Planned rate limiting?**
55
+ - [ ] **Documentation approach defined?**
56
+
57
+ ---
58
+
59
+ ## ❌ Anti-Patterns
60
+
61
+ **DON'T:**
62
+ - Default to REST for everything
63
+ - Use verbs in REST endpoints (/getUsers)
64
+ - Return inconsistent response formats
65
+ - Expose internal errors to clients
66
+ - Skip rate limiting
67
+
68
+ **DO:**
69
+ - Choose API style based on context
70
+ - Ask about client requirements
71
+ - Document thoroughly
72
+ - Use appropriate status codes
73
+
74
+ ---
75
+
76
+ ## Script
77
+
78
+ | Script | Purpose | Command |
79
+ |--------|---------|---------|
80
+ | `scripts/api_validator.py` | API endpoint validation | `python scripts/api_validator.py <project_path>` |
81
+
@@ -0,0 +1,42 @@
1
+ # API Style Selection (2025)
2
+
3
+ > REST vs GraphQL vs tRPC - Hangi durumda hangisi?
4
+
5
+ ## Decision Tree
6
+
7
+ ```
8
+ Who are the API consumers?
9
+ │
10
+ ├── Public API / Multiple platforms
11
+ │ └── REST + OpenAPI (widest compatibility)
12
+ │
13
+ ├── Complex data needs / Multiple frontends
14
+ │ └── GraphQL (flexible queries)
15
+ │
16
+ ├── TypeScript frontend + backend (monorepo)
17
+ │ └── tRPC (end-to-end type safety)
18
+ │
19
+ ├── Real-time / Event-driven
20
+ │ └── WebSocket + AsyncAPI
21
+ │
22
+ └── Internal microservices
23
+ └── gRPC (performance) or REST (simplicity)
24
+ ```
25
+
26
+ ## Comparison
27
+
28
+ | Factor | REST | GraphQL | tRPC |
29
+ |--------|------|---------|------|
30
+ | **Best for** | Public APIs | Complex apps | TS monorepos |
31
+ | **Learning curve** | Low | Medium | Low (if TS) |
32
+ | **Over/under fetching** | Common | Solved | Solved |
33
+ | **Type safety** | Manual (OpenAPI) | Schema-based | Automatic |
34
+ | **Caching** | HTTP native | Complex | Client-based |
35
+
36
+ ## Selection Questions
37
+
38
+ 1. Who are the API consumers?
39
+ 2. Is the frontend TypeScript?
40
+ 3. How complex are the data relationships?
41
+ 4. Is caching critical?
42
+ 5. Public or internal API?