class-ai-agent 1.2.3 → 1.4.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 (242) hide show
  1. package/.agent/README.md +33 -0
  2. package/.agent/SESSION.md +54 -0
  3. package/.agent/SESSION.template.md +46 -0
  4. package/.claude/CLAUDE.md +24 -6
  5. package/.claude/commands/build.md +5 -4
  6. package/.claude/commands/debug.md +2 -1
  7. package/.claude/commands/handoff.md +94 -0
  8. package/.claude/commands/plan.md +1 -0
  9. package/.claude/commands/publish-npm.md +119 -0
  10. package/.claude/commands/resume.md +107 -0
  11. package/.claude/commands/spec.md +2 -1
  12. package/.claude/references/agent-continuity.md +42 -0
  13. package/.claude/references/codegraph.md +50 -0
  14. package/.claude/references/supabase.md +55 -0
  15. package/.claude/rules/agent-continuity.md +39 -0
  16. package/.claude/rules/tech-stack.md +2 -1
  17. package/.claude/skills/agent-continuity/SKILL.md +70 -0
  18. package/.claude/skills/supabase/SKILL.md +135 -0
  19. package/.claude/skills/supabase/UPSTREAM.md +16 -0
  20. package/.claude/skills/supabase/assets/feedback-issue-template.md +17 -0
  21. package/.claude/skills/supabase/references/skill-feedback.md +17 -0
  22. package/.claude/skills/supabase-postgres-best-practices/SKILL.md +64 -0
  23. package/.claude/skills/supabase-postgres-best-practices/UPSTREAM.md +16 -0
  24. package/.claude/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
  25. package/.claude/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
  26. package/.claude/skills/supabase-postgres-best-practices/references/_template.md +34 -0
  27. package/.claude/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
  28. package/.claude/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
  29. package/.claude/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
  30. package/.claude/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
  31. package/.claude/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
  32. package/.claude/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
  33. package/.claude/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
  34. package/.claude/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
  35. package/.claude/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
  36. package/.claude/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
  37. package/.claude/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
  38. package/.claude/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
  39. package/.claude/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
  40. package/.claude/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
  41. package/.claude/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
  42. package/.claude/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
  43. package/.claude/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
  44. package/.claude/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
  45. package/.claude/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
  46. package/.claude/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
  47. package/.claude/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
  48. package/.claude/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
  49. package/.claude/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
  50. package/.claude/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
  51. package/.claude/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
  52. package/.claude/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
  53. package/.claude/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
  54. package/.claude/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
  55. package/.claude/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
  56. package/.claude/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
  57. package/.claude/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
  58. package/.cursor/CURSOR.md +40 -5
  59. package/.cursor/commands/build.md +5 -4
  60. package/.cursor/commands/debug.md +2 -1
  61. package/.cursor/commands/handoff.md +94 -0
  62. package/.cursor/commands/plan.md +1 -0
  63. package/.cursor/commands/publish-npm.md +119 -0
  64. package/.cursor/commands/resume.md +107 -0
  65. package/.cursor/commands/spec.md +2 -1
  66. package/.cursor/mcp.json +19 -0
  67. package/.cursor/references/agent-continuity.md +42 -0
  68. package/.cursor/references/codegraph.md +87 -0
  69. package/.cursor/references/supabase.md +55 -0
  70. package/.cursor/rules/agent-continuity.mdc +44 -0
  71. package/.cursor/rules/codegraph.mdc +47 -0
  72. package/.cursor/rules/cursor-overview.mdc +10 -3
  73. package/.cursor/rules/tech-stack.mdc +2 -1
  74. package/.cursor/settings.json +6 -1
  75. package/.cursor/skills/agent-continuity/SKILL.md +70 -0
  76. package/.cursor/skills/supabase/SKILL.md +135 -0
  77. package/.cursor/skills/supabase/UPSTREAM.md +16 -0
  78. package/.cursor/skills/supabase/assets/feedback-issue-template.md +17 -0
  79. package/.cursor/skills/supabase/references/skill-feedback.md +17 -0
  80. package/.cursor/skills/supabase-postgres-best-practices/SKILL.md +64 -0
  81. package/.cursor/skills/supabase-postgres-best-practices/UPSTREAM.md +16 -0
  82. package/.cursor/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
  83. package/.cursor/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
  84. package/.cursor/skills/supabase-postgres-best-practices/references/_template.md +34 -0
  85. package/.cursor/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
  86. package/.cursor/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
  87. package/.cursor/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
  88. package/.cursor/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
  89. package/.cursor/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
  90. package/.cursor/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
  91. package/.cursor/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
  92. package/.cursor/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
  93. package/.cursor/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
  94. package/.cursor/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
  95. package/.cursor/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
  96. package/.cursor/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
  97. package/.cursor/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
  98. package/.cursor/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
  99. package/.cursor/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
  100. package/.cursor/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
  101. package/.cursor/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
  102. package/.cursor/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
  103. package/.cursor/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
  104. package/.cursor/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
  105. package/.cursor/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
  106. package/.cursor/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
  107. package/.cursor/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
  108. package/.cursor/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
  109. package/.cursor/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
  110. package/.cursor/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
  111. package/.cursor/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
  112. package/.cursor/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
  113. package/.cursor/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
  114. package/.cursor/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
  115. package/.cursor/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
  116. package/.kiro/KIRO.md +149 -0
  117. package/.kiro/agents/backend.md +395 -0
  118. package/.kiro/agents/code-reviewer.md +110 -0
  119. package/.kiro/agents/copywriter-seo.md +236 -0
  120. package/.kiro/agents/frontend.md +384 -0
  121. package/.kiro/agents/project-manager.md +201 -0
  122. package/.kiro/agents/qa.md +221 -0
  123. package/.kiro/agents/security-auditor.md +143 -0
  124. package/.kiro/agents/systems-architect.md +211 -0
  125. package/.kiro/agents/test-engineer.md +123 -0
  126. package/.kiro/agents/ui-ux-designer.md +210 -0
  127. package/.kiro/commands/build.md +133 -0
  128. package/.kiro/commands/debug.md +243 -0
  129. package/.kiro/commands/deploy.md +40 -0
  130. package/.kiro/commands/fix-issue.md +42 -0
  131. package/.kiro/commands/handoff.md +94 -0
  132. package/.kiro/commands/plan.md +126 -0
  133. package/.kiro/commands/publish-npm.md +119 -0
  134. package/.kiro/commands/resume.md +107 -0
  135. package/.kiro/commands/review.md +50 -0
  136. package/.kiro/commands/simplify.md +222 -0
  137. package/.kiro/commands/spec.md +96 -0
  138. package/.kiro/commands/test.md +214 -0
  139. package/.kiro/references/accessibility-checklist.md +174 -0
  140. package/.kiro/references/agent-continuity.md +42 -0
  141. package/.kiro/references/codegraph.md +86 -0
  142. package/.kiro/references/performance-checklist.md +150 -0
  143. package/.kiro/references/security-checklist.md +94 -0
  144. package/.kiro/references/supabase.md +55 -0
  145. package/.kiro/references/testing-patterns.md +183 -0
  146. package/.kiro/settings/mcp.json +19 -0
  147. package/.kiro/settings.json +8 -0
  148. package/.kiro/skills/agent-continuity/SKILL.md +70 -0
  149. package/.kiro/skills/code-review/SKILL.md +208 -0
  150. package/.kiro/skills/deploy/SKILL.md +68 -0
  151. package/.kiro/skills/deploy/deploy.md +735 -0
  152. package/.kiro/skills/incremental-implementation/SKILL.md +210 -0
  153. package/.kiro/skills/security-review/SKILL.md +71 -0
  154. package/.kiro/skills/supabase/SKILL.md +135 -0
  155. package/.kiro/skills/supabase/UPSTREAM.md +16 -0
  156. package/.kiro/skills/supabase/assets/feedback-issue-template.md +17 -0
  157. package/.kiro/skills/supabase/references/skill-feedback.md +17 -0
  158. package/.kiro/skills/supabase-postgres-best-practices/SKILL.md +64 -0
  159. package/.kiro/skills/supabase-postgres-best-practices/UPSTREAM.md +16 -0
  160. package/.kiro/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
  161. package/.kiro/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
  162. package/.kiro/skills/supabase-postgres-best-practices/references/_template.md +34 -0
  163. package/.kiro/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
  164. package/.kiro/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
  165. package/.kiro/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
  166. package/.kiro/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
  167. package/.kiro/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
  168. package/.kiro/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
  169. package/.kiro/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
  170. package/.kiro/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
  171. package/.kiro/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
  172. package/.kiro/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
  173. package/.kiro/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
  174. package/.kiro/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
  175. package/.kiro/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
  176. package/.kiro/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
  177. package/.kiro/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
  178. package/.kiro/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
  179. package/.kiro/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
  180. package/.kiro/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
  181. package/.kiro/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
  182. package/.kiro/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
  183. package/.kiro/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
  184. package/.kiro/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
  185. package/.kiro/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
  186. package/.kiro/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
  187. package/.kiro/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
  188. package/.kiro/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
  189. package/.kiro/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
  190. package/.kiro/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
  191. package/.kiro/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
  192. package/.kiro/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
  193. package/.kiro/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
  194. package/.kiro/skills/tdd/SKILL.md +217 -0
  195. package/.kiro/skills/ui-ux-pro-max/SKILL.md +288 -0
  196. package/.kiro/skills/ui-ux-pro-max/data/charts.csv +26 -0
  197. package/.kiro/skills/ui-ux-pro-max/data/colors.csv +97 -0
  198. package/.kiro/skills/ui-ux-pro-max/data/icons.csv +101 -0
  199. package/.kiro/skills/ui-ux-pro-max/data/landing.csv +31 -0
  200. package/.kiro/skills/ui-ux-pro-max/data/products.csv +97 -0
  201. package/.kiro/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  202. package/.kiro/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  203. package/.kiro/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  204. package/.kiro/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  205. package/.kiro/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  206. package/.kiro/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  207. package/.kiro/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  208. package/.kiro/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  209. package/.kiro/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  210. package/.kiro/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  211. package/.kiro/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  212. package/.kiro/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  213. package/.kiro/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  214. package/.kiro/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  215. package/.kiro/skills/ui-ux-pro-max/data/styles.csv +68 -0
  216. package/.kiro/skills/ui-ux-pro-max/data/typography.csv +58 -0
  217. package/.kiro/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  218. package/.kiro/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  219. package/.kiro/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  220. package/.kiro/skills/ui-ux-pro-max/scripts/core.py +253 -0
  221. package/.kiro/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  222. package/.kiro/skills/ui-ux-pro-max/scripts/search.py +114 -0
  223. package/.kiro/steering/agent-continuity.md +44 -0
  224. package/.kiro/steering/api-conventions.md +85 -0
  225. package/.kiro/steering/clean-code.md +211 -0
  226. package/.kiro/steering/code-style.md +92 -0
  227. package/.kiro/steering/codegraph.md +47 -0
  228. package/.kiro/steering/database.md +66 -0
  229. package/.kiro/steering/error-handling.md +98 -0
  230. package/.kiro/steering/git-workflow.md +83 -0
  231. package/.kiro/steering/kiro-overview.md +38 -0
  232. package/.kiro/steering/monitoring.md +317 -0
  233. package/.kiro/steering/naming-conventions.md +266 -0
  234. package/.kiro/steering/project-structure.md +71 -0
  235. package/.kiro/steering/security.md +95 -0
  236. package/.kiro/steering/system-design.md +168 -0
  237. package/.kiro/steering/tech-stack.md +463 -0
  238. package/.kiro/steering/testing.md +110 -0
  239. package/AGENTS.md +13 -7
  240. package/README.md +126 -18
  241. package/bin/class-ai-agent.cjs +171 -11
  242. package/package.json +12 -4
@@ -0,0 +1,183 @@
1
+ # Testing Patterns Reference
2
+
3
+ > Quick reference for test patterns. See `.claude/rules/testing.md` for full rules.
4
+
5
+ ## Test Pyramid
6
+
7
+ ```
8
+ ┌─────────┐
9
+ │ E2E │ 5% Critical user flows
10
+ ├─────────┤
11
+ │ Integ │ 15% API + DB interactions
12
+ ├─────────┤
13
+ │ Unit │ 80% Pure logic, fast
14
+ └─────────┘
15
+ ```
16
+
17
+ ## Test Structure (AAA)
18
+
19
+ ```javascript
20
+ it('should [expected behavior] when [condition]', () => {
21
+ // Arrange — Setup
22
+ const user = createTestUser({ role: 'admin' });
23
+
24
+ // Act — Execute
25
+ const result = checkPermission(user, 'delete');
26
+
27
+ // Assert — Verify
28
+ expect(result).toBe(true);
29
+ });
30
+ ```
31
+
32
+ ## Unit Test Example
33
+
34
+ ```javascript
35
+ describe('calculateDiscount', () => {
36
+ it('should return 10% for orders over $100', () => {
37
+ expect(calculateDiscount(150)).toBe(15);
38
+ });
39
+
40
+ it('should return 0 for orders under $100', () => {
41
+ expect(calculateDiscount(50)).toBe(0);
42
+ });
43
+
44
+ it('should handle edge case at exactly $100', () => {
45
+ expect(calculateDiscount(100)).toBe(0);
46
+ });
47
+ });
48
+ ```
49
+
50
+ ## Integration Test Example
51
+
52
+ ```javascript
53
+ describe('POST /api/users', () => {
54
+ it('should create user and return 201', async () => {
55
+ const response = await request(app)
56
+ .post('/api/users')
57
+ .send({ email: 'test@example.com', name: 'Test' })
58
+ .set('Authorization', `Bearer ${token}`);
59
+
60
+ expect(response.status).toBe(201);
61
+ expect(response.body.data.email).toBe('test@example.com');
62
+
63
+ // Verify in database
64
+ const user = await db.user.findUnique({
65
+ where: { email: 'test@example.com' }
66
+ });
67
+ expect(user).toBeDefined();
68
+ });
69
+ });
70
+ ```
71
+
72
+ ## E2E Test Example (Playwright)
73
+
74
+ ```javascript
75
+ test('user can complete checkout flow', async ({ page }) => {
76
+ // Login
77
+ await page.goto('/login');
78
+ await page.fill('[name="email"]', 'user@example.com');
79
+ await page.fill('[name="password"]', 'password');
80
+ await page.click('button[type="submit"]');
81
+
82
+ // Add to cart
83
+ await page.goto('/products/1');
84
+ await page.click('button:has-text("Add to Cart")');
85
+
86
+ // Checkout
87
+ await page.goto('/checkout');
88
+ await page.fill('[name="card"]', '4242424242424242');
89
+ await page.click('button:has-text("Pay")');
90
+
91
+ // Verify
92
+ await expect(page.locator('.success-message')).toBeVisible();
93
+ });
94
+ ```
95
+
96
+ ## React Component Test
97
+
98
+ ```javascript
99
+ import { render, screen, fireEvent } from '@testing-library/react';
100
+
101
+ describe('Counter', () => {
102
+ it('should increment count when button clicked', () => {
103
+ render(<Counter initialCount={0} />);
104
+
105
+ const button = screen.getByRole('button', { name: /increment/i });
106
+ fireEvent.click(button);
107
+
108
+ expect(screen.getByText('Count: 1')).toBeInTheDocument();
109
+ });
110
+ });
111
+ ```
112
+
113
+ ## Test Doubles
114
+
115
+ ```javascript
116
+ // 1. Real (preferred)
117
+ const db = createTestDatabase();
118
+
119
+ // 2. Fake (in-memory)
120
+ const fakeUserRepo = {
121
+ users: [],
122
+ create(user) { this.users.push(user); return user; },
123
+ findById(id) { return this.users.find(u => u.id === id); }
124
+ };
125
+
126
+ // 3. Stub (canned response)
127
+ const stubbedApi = {
128
+ getUser: () => Promise.resolve({ id: '1', name: 'Test' })
129
+ };
130
+
131
+ // 4. Mock (verify interactions — use sparingly)
132
+ const mockLogger = vi.fn();
133
+ ```
134
+
135
+ ## Naming Convention
136
+
137
+ ```javascript
138
+ // Pattern: should [expected] when [condition]
139
+
140
+ // ✅ Good
141
+ 'should return null when user not found'
142
+ 'should throw ValidationError when email invalid'
143
+ 'should emit event when order placed'
144
+
145
+ // ❌ Bad
146
+ 'works'
147
+ 'test user'
148
+ 'error handling'
149
+ ```
150
+
151
+ ## Anti-Patterns
152
+
153
+ | Pattern | Problem | Fix |
154
+ |---------|---------|-----|
155
+ | Testing internals | Breaks on refactor | Test behavior |
156
+ | Shared state | Tests affect each other | Reset in beforeEach |
157
+ | Flaky tests | Random failures | Deterministic data |
158
+ | Over-mocking | False confidence | Real implementations |
159
+ | No assertions | Test always passes | Assert outcomes |
160
+ | Magic numbers | Hard to understand | Named constants |
161
+
162
+ ## Coverage Thresholds
163
+
164
+ ```javascript
165
+ // vitest.config.js
166
+ coverage: {
167
+ thresholds: {
168
+ lines: 80,
169
+ branches: 80,
170
+ functions: 80,
171
+ statements: 80
172
+ }
173
+ }
174
+ ```
175
+
176
+ ## Commands
177
+
178
+ ```bash
179
+ npm test # Run all tests
180
+ npm test -- --watch # Watch mode
181
+ npm test -- --coverage # Coverage report
182
+ npm run test:e2e # E2E tests
183
+ ```
@@ -0,0 +1,19 @@
1
+ {
2
+ "mcpServers": {
3
+ "codegraph": {
4
+ "command": "npx",
5
+ "args": [
6
+ "-y",
7
+ "@colbymchenry/codegraph",
8
+ "serve",
9
+ "--mcp",
10
+ "--path",
11
+ "${workspaceFolder}"
12
+ ]
13
+ },
14
+ "supabase": {
15
+ "type": "http",
16
+ "url": "https://mcp.supabase.com/mcp?features=docs"
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "steering_dir": ".kiro/steering",
3
+ "commands_dir": ".kiro/commands",
4
+ "skills_dir": ".kiro/skills",
5
+ "agents_dir": ".kiro/agents",
6
+ "references_dir": ".kiro/references",
7
+ "note": "Parallels .cursor/settings.json. Kiro loads .kiro/steering/*.md and .kiro/settings/mcp.json."
8
+ }
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: Agent Continuity
3
+ description: Cross-tool session handoff and resume via .agent/SESSION.md
4
+ ---
5
+
6
+ # Agent Continuity Skill
7
+
8
+ ## Purpose
9
+
10
+ Keep **Cursor**, **Claude Code**, and **Kiro** aligned on the same in-flight work using committed **`.agent/SESSION.md`**.
11
+
12
+ ---
13
+
14
+ ## When to apply
15
+
16
+ | Situation | Action |
17
+ |-----------|--------|
18
+ | New chat, same feature | **Resume** — read SESSION first |
19
+ | End of session | **Handoff** — update SESSION |
20
+ | Switch IDE/tool | **Handoff** then **Resume** in new tool |
21
+ | Switch persona | Update Meta `persona`; handoff notes for next role |
22
+ | Phase change (plan → build) | Update Meta `phase` |
23
+
24
+ ---
25
+
26
+ ## Handoff checklist
27
+
28
+ - [ ] Meta: date, phase, tool, persona
29
+ - [ ] Goal still accurate (one paragraph)
30
+ - [ ] Done: bullets with paths/commits
31
+ - [ ] In progress + blockers
32
+ - [ ] Next: numbered for next agent
33
+ - [ ] Decisions: non-obvious choices
34
+ - [ ] Gotchas: failures, test commands, env
35
+ - [ ] Pointers: spec, tasks, branch, key files
36
+ - [ ] `tasks/todo.md` synced
37
+ - [ ] No secrets or PII in SESSION
38
+
39
+ ---
40
+
41
+ ## Resume checklist
42
+
43
+ - [ ] Read `.agent/SESSION.md`
44
+ - [ ] Read `tasks/todo.md` if linked
45
+ - [ ] Read SPEC if linked
46
+ - [ ] `git status` vs SESSION expectations
47
+ - [ ] Run sanity build/test if Gotchas say so
48
+ - [ ] Post resumption summary to user
49
+ - [ ] Execute first **Next** step via workflow command
50
+
51
+ ---
52
+
53
+ ## SESSION schema
54
+
55
+ See **`.agent/SESSION.template.md`** for the canonical sections.
56
+
57
+ ---
58
+
59
+ ## Commands
60
+
61
+ | Command | File |
62
+ |---------|------|
63
+ | `/handoff` | `.cursor/commands/handoff.md` (`.claude/`, `.kiro/`) |
64
+ | `/resume` | `.cursor/commands/resume.md` |
65
+
66
+ ---
67
+
68
+ ## Optional history
69
+
70
+ Copy SESSION to `.agent/history/YYYY-MM-DD-slug.md` at milestones; commit for audit trail.
@@ -0,0 +1,208 @@
1
+ ---
2
+ name: Code Review & Quality
3
+ description: Five-axis code review for comprehensive quality assessment
4
+ ---
5
+
6
+ # Code Review & Quality Skill
7
+
8
+ ## Philosophy
9
+
10
+ > "Approve a change when it definitely improves overall code health, even if it isn't perfect."
11
+
12
+ Progress over perfection. Continuous incremental improvement.
13
+
14
+ ---
15
+
16
+ ## Five-Axis Review Framework
17
+
18
+ ### Axis 1: Correctness
19
+
20
+ **Questions to ask:**
21
+ - Does the implementation match the specification?
22
+ - Are edge cases handled?
23
+ - Are error paths covered?
24
+ - Are there potential runtime issues?
25
+ - Off-by-one errors
26
+ - Race conditions
27
+ - Null/undefined access
28
+ - Resource leaks
29
+
30
+ **Test adequacy:**
31
+ - Do tests verify the claimed behavior?
32
+ - Are negative cases tested?
33
+ - Would a bug slip through?
34
+
35
+ ---
36
+
37
+ ### Axis 2: Readability & Simplicity
38
+
39
+ **Questions to ask:**
40
+ - Can another engineer understand this without explanation?
41
+ - Are names clear and descriptive?
42
+ - Is control flow straightforward?
43
+ - Is the code organized logically?
44
+
45
+ **Complexity checks:**
46
+ - Deep nesting (> 3 levels)?
47
+ - Long functions (> 30 lines)?
48
+ - Clever tricks that obscure intent?
49
+ - Unnecessary abstractions?
50
+
51
+ ---
52
+
53
+ ### Axis 3: Architecture
54
+
55
+ **Questions to ask:**
56
+ - Does this follow existing patterns in the codebase?
57
+ - Are module boundaries respected?
58
+ - Is there code duplication that should be extracted?
59
+ - Is the abstraction level appropriate?
60
+ - Do dependencies flow in the right direction?
61
+
62
+ **Over-engineering checks:**
63
+ - Is this simpler than it needs to be?
64
+ - Are there abstractions "for future use"?
65
+ - Would a simpler approach work?
66
+
67
+ ---
68
+
69
+ ### Axis 4: Security
70
+
71
+ **Input validation:**
72
+ - Is user input validated and sanitized?
73
+ - Are queries parameterized?
74
+ - Is output properly encoded?
75
+
76
+ **Authentication & Authorization:**
77
+ - Are auth checks in place?
78
+ - Is ownership verified for resources?
79
+ - Are permissions enforced?
80
+
81
+ **Secrets management:**
82
+ - No hardcoded secrets?
83
+ - Sensitive data excluded from logs?
84
+ - External data treated as untrusted?
85
+
86
+ ---
87
+
88
+ ### Axis 5: Performance
89
+
90
+ **Common issues:**
91
+ - N+1 query patterns?
92
+ - Unbounded operations (loops, queries)?
93
+ - Missing pagination?
94
+ - Unnecessary re-renders (React)?
95
+ - Objects created in hot paths?
96
+ - Missing indexes for queries?
97
+
98
+ **Async handling:**
99
+ - Are async operations properly awaited?
100
+ - Could operations be parallelized?
101
+
102
+ ---
103
+
104
+ ## Change Sizing Guidelines
105
+
106
+ | Size | Lines | Guidance |
107
+ |------|-------|----------|
108
+ | **Ideal** | ~100 | Easy to review thoroughly |
109
+ | **Acceptable** | ~300 | Requires focused review |
110
+ | **Too Large** | 1000+ | Split into smaller PRs |
111
+
112
+ Each PR should be **one logical change**, not an entire feature.
113
+
114
+ ---
115
+
116
+ ## Comment Severity Labels
117
+
118
+ Use prefixes to clarify intent:
119
+
120
+ | Label | Meaning | Action Required |
121
+ |-------|---------|-----------------|
122
+ | (none) | Required change | Must fix before merge |
123
+ | `Critical:` | Merge blocker | Must fix before merge |
124
+ | `Nit:` | Minor/style | Optional, author's choice |
125
+ | `Optional:` | Suggestion | Consider, not required |
126
+ | `FYI:` | Informational | No action needed |
127
+
128
+ **Examples:**
129
+ ```
130
+ Critical: This allows SQL injection via the `name` parameter.
131
+
132
+ Nit: Consider renaming `data` to `userData` for clarity.
133
+
134
+ Optional: You could use `Array.from()` here instead of spread.
135
+
136
+ FYI: We have a shared utility for this in `src/utils/format.ts`.
137
+ ```
138
+
139
+ ---
140
+
141
+ ## Review Process
142
+
143
+ ### Step 1: Understand Context
144
+
145
+ - What is this PR trying to achieve?
146
+ - Is there a linked issue or spec?
147
+ - What's the scope of changes?
148
+
149
+ ### Step 2: Review Tests First
150
+
151
+ Tests reveal:
152
+ - What behavior is expected
153
+ - What edge cases are considered
154
+ - Whether coverage is adequate
155
+
156
+ ### Step 3: Examine Implementation
157
+
158
+ Walk through changes with the 5 axes in mind.
159
+
160
+ ### Step 4: Categorize Findings
161
+
162
+ - **Must fix** — Correctness, security, critical bugs
163
+ - **Should fix** — Readability, architecture concerns
164
+ - **Consider** — Suggestions, style preferences
165
+
166
+ ### Step 5: Provide Actionable Feedback
167
+
168
+ ```
169
+ ❌ "This is confusing"
170
+
171
+ ✅ "This nested conditional is hard to follow. Consider extracting
172
+ the inner logic to a named function like `isEligibleForDiscount()`"
173
+ ```
174
+
175
+ ---
176
+
177
+ ## Review Output Format
178
+
179
+ ```markdown
180
+ ## Review: [PR Title]
181
+
182
+ ### Summary
183
+ [1-2 sentences on overall assessment]
184
+
185
+ ### Critical Issues
186
+ - **[file:line]** [Issue description]
187
+
188
+ ### Important
189
+ - **[file:line]** [Issue description]
190
+
191
+ ### Suggestions
192
+ - **[file:line]** [Suggestion]
193
+
194
+ ### Verdict
195
+ - [ ] Approve
196
+ - [ ] Request changes
197
+ - [ ] Needs discussion
198
+ ```
199
+
200
+ ---
201
+
202
+ ## Rules
203
+
204
+ - **Don't accept "I'll clean it up later"** — It won't happen
205
+ - **Remove dead code** — Don't comment it out
206
+ - **Review within 1 business day** — Faster is better
207
+ - **Be kind, not nice** — Honest feedback helps everyone
208
+ - **One approval minimum** — Before any merge
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: deploy
3
+ description: Skill to automate the full deployment process including build, test, and release steps
4
+ ---
5
+
6
+ # Deploy Skill
7
+
8
+ ## Purpose
9
+ Automate the deployment pipeline: build → test → deploy → verify.
10
+
11
+ ## Prerequisites
12
+ - All tests passing
13
+ - Environment variables configured
14
+ - Access to deployment target
15
+
16
+ ## Steps
17
+
18
+ ### 1. Verify Clean State
19
+ ```bash
20
+ git status
21
+ git pull origin main
22
+ ```
23
+
24
+ ### 2. Run Tests
25
+ ```bash
26
+ npm test
27
+ ```
28
+ If tests fail → STOP. Report failures.
29
+
30
+ ### 3. Build
31
+ ```bash
32
+ npm run build
33
+ ```
34
+
35
+ ### 4. Deploy by Environment
36
+
37
+ **Development:**
38
+ ```bash
39
+ docker-compose -f docker-compose.dev.yml up -d --build
40
+ ```
41
+
42
+ **Production:**
43
+ ```bash
44
+ docker-compose -f docker-compose.prod.yml pull
45
+ docker-compose -f docker-compose.prod.yml up -d
46
+ ```
47
+
48
+ ### 5. Health Check
49
+ ```bash
50
+ curl -f http://localhost:3000/health || echo "Health check failed"
51
+ ```
52
+
53
+ ### 6. Tail Logs (first 30 seconds)
54
+ ```bash
55
+ docker-compose logs --tail=50 -f app
56
+ ```
57
+
58
+ ## Rollback
59
+ ```bash
60
+ git revert HEAD --no-edit
61
+ git push origin main
62
+ # Redeploy previous version
63
+ ```
64
+
65
+ ## Success Criteria
66
+ - Health endpoint returns 200
67
+ - No error logs in initial 30 seconds
68
+ - All smoke tests pass