qualia-framework 2.5.1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/CLAUDE.md +63 -0
  2. package/README.md +108 -30
  3. package/agents/builder.md +110 -0
  4. package/agents/planner.md +186 -0
  5. package/agents/qa-browser.md +186 -0
  6. package/agents/verifier.md +369 -0
  7. package/bin/cli.js +706 -417
  8. package/bin/install.js +622 -0
  9. package/bin/qualia-ui.js +284 -0
  10. package/bin/state.js +824 -0
  11. package/bin/statusline.js +252 -0
  12. package/docs/erp-contract.md +161 -0
  13. package/guide.md +63 -0
  14. package/hooks/auto-update.js +117 -0
  15. package/hooks/block-env-edit.js +52 -0
  16. package/hooks/branch-guard.js +68 -0
  17. package/hooks/migration-guard.js +83 -0
  18. package/hooks/pre-compact.js +52 -0
  19. package/hooks/pre-deploy-gate.js +149 -0
  20. package/hooks/pre-push.js +53 -0
  21. package/hooks/session-start.js +126 -0
  22. package/package.json +31 -17
  23. package/rules/design-reference.md +179 -0
  24. package/rules/frontend.md +126 -0
  25. package/rules/infrastructure.md +87 -0
  26. package/skills/qualia/SKILL.md +88 -0
  27. package/skills/qualia-build/SKILL.md +115 -0
  28. package/skills/qualia-debug/SKILL.md +87 -0
  29. package/skills/qualia-design/SKILL.md +99 -0
  30. package/skills/qualia-handoff/SKILL.md +66 -0
  31. package/skills/qualia-help/SKILL.md +60 -0
  32. package/skills/qualia-idk/SKILL.md +8 -0
  33. package/skills/qualia-learn/SKILL.md +111 -0
  34. package/skills/qualia-new/SKILL.md +323 -0
  35. package/skills/qualia-pause/SKILL.md +63 -0
  36. package/skills/qualia-plan/SKILL.md +101 -0
  37. package/skills/qualia-polish/SKILL.md +207 -0
  38. package/skills/qualia-quick/SKILL.md +37 -0
  39. package/skills/qualia-report/SKILL.md +114 -0
  40. package/skills/qualia-resume/SKILL.md +49 -0
  41. package/skills/qualia-review/SKILL.md +161 -0
  42. package/skills/qualia-ship/SKILL.md +90 -0
  43. package/skills/qualia-skill-new/SKILL.md +167 -0
  44. package/skills/qualia-task/SKILL.md +91 -0
  45. package/skills/qualia-test/SKILL.md +134 -0
  46. package/skills/qualia-verify/SKILL.md +113 -0
  47. package/templates/DESIGN.md +475 -0
  48. package/templates/help.html +476 -0
  49. package/templates/plan.md +42 -0
  50. package/templates/project.md +22 -0
  51. package/templates/state.md +27 -0
  52. package/templates/tracking.json +20 -0
  53. package/tests/bin.test.sh +687 -0
  54. package/tests/hooks.test.sh +384 -0
  55. package/tests/runner.js +1956 -0
  56. package/tests/state.test.sh +713 -0
  57. package/tests/statusline.test.sh +243 -0
  58. package/bin/collect-metrics.sh +0 -62
  59. package/framework/.claudeignore +0 -51
  60. package/framework/CLAUDE.md +0 -51
  61. package/framework/MCP_SETUP.md +0 -229
  62. package/framework/agents/architecture-strategist.md +0 -53
  63. package/framework/agents/backend-agent.md +0 -150
  64. package/framework/agents/code-simplicity-reviewer.md +0 -86
  65. package/framework/agents/frontend-agent.md +0 -111
  66. package/framework/agents/kieran-typescript-reviewer.md +0 -96
  67. package/framework/agents/performance-oracle.md +0 -111
  68. package/framework/agents/qualia-codebase-mapper.md +0 -761
  69. package/framework/agents/qualia-debugger.md +0 -1204
  70. package/framework/agents/qualia-executor.md +0 -882
  71. package/framework/agents/qualia-integration-checker.md +0 -424
  72. package/framework/agents/qualia-phase-researcher.md +0 -457
  73. package/framework/agents/qualia-plan-checker.md +0 -700
  74. package/framework/agents/qualia-planner.md +0 -1245
  75. package/framework/agents/qualia-project-researcher.md +0 -603
  76. package/framework/agents/qualia-research-synthesizer.md +0 -200
  77. package/framework/agents/qualia-roadmapper.md +0 -606
  78. package/framework/agents/qualia-verifier.md +0 -686
  79. package/framework/agents/red-team-qa.md +0 -130
  80. package/framework/agents/security-auditor.md +0 -72
  81. package/framework/agents/team-orchestrator.md +0 -229
  82. package/framework/agents/teams/framework-audit-team.md +0 -66
  83. package/framework/agents/teams/full-stack-team.md +0 -48
  84. package/framework/agents/teams/optimize-team.md +0 -53
  85. package/framework/agents/teams/review-team.md +0 -70
  86. package/framework/agents/teams/ship-team.md +0 -86
  87. package/framework/agents/test-agent.md +0 -182
  88. package/framework/hooks/auto-format.sh +0 -54
  89. package/framework/hooks/block-env-edit.sh +0 -42
  90. package/framework/hooks/branch-guard.sh +0 -43
  91. package/framework/hooks/confirm-delete.sh +0 -59
  92. package/framework/hooks/migration-validate.sh +0 -77
  93. package/framework/hooks/notification-speak.sh +0 -16
  94. package/framework/hooks/pre-commit.sh +0 -100
  95. package/framework/hooks/pre-compact.sh +0 -56
  96. package/framework/hooks/pre-deploy-gate.sh +0 -160
  97. package/framework/hooks/qualia-colors.sh +0 -32
  98. package/framework/hooks/retention-cleanup.sh +0 -62
  99. package/framework/hooks/save-session-state.sh +0 -185
  100. package/framework/hooks/session-context-loader.sh +0 -96
  101. package/framework/hooks/session-learn.sh +0 -32
  102. package/framework/hooks/skill-announce.sh +0 -123
  103. package/framework/hooks/tool-error-announce.sh +0 -27
  104. package/framework/install.ps1 +0 -323
  105. package/framework/install.sh +0 -313
  106. package/framework/qualia-framework/VERSION +0 -1
  107. package/framework/qualia-framework/assets/qualia-logo.png +0 -0
  108. package/framework/qualia-framework/bin/collect-metrics.sh +0 -67
  109. package/framework/qualia-framework/bin/generate-report-docx.py +0 -429
  110. package/framework/qualia-framework/bin/qualia-tools.js +0 -2201
  111. package/framework/qualia-framework/bin/qualia-tools.test.js +0 -1054
  112. package/framework/qualia-framework/references/checkpoints.md +0 -775
  113. package/framework/qualia-framework/references/completion-checklists.md +0 -359
  114. package/framework/qualia-framework/references/continuation-format.md +0 -249
  115. package/framework/qualia-framework/references/continuation-prompt.md +0 -97
  116. package/framework/qualia-framework/references/decimal-phase-calculation.md +0 -65
  117. package/framework/qualia-framework/references/design-quality.md +0 -56
  118. package/framework/qualia-framework/references/employee-guide.md +0 -167
  119. package/framework/qualia-framework/references/git-integration.md +0 -254
  120. package/framework/qualia-framework/references/git-planning-commit.md +0 -50
  121. package/framework/qualia-framework/references/model-profile-resolution.md +0 -32
  122. package/framework/qualia-framework/references/model-profiles.md +0 -73
  123. package/framework/qualia-framework/references/phase-argument-parsing.md +0 -61
  124. package/framework/qualia-framework/references/planning-config.md +0 -195
  125. package/framework/qualia-framework/references/questioning.md +0 -141
  126. package/framework/qualia-framework/references/tdd.md +0 -263
  127. package/framework/qualia-framework/references/ui-brand.md +0 -160
  128. package/framework/qualia-framework/references/verification-patterns.md +0 -612
  129. package/framework/qualia-framework/templates/DEBUG.md +0 -159
  130. package/framework/qualia-framework/templates/DESIGN.md +0 -81
  131. package/framework/qualia-framework/templates/UAT.md +0 -247
  132. package/framework/qualia-framework/templates/codebase/architecture.md +0 -255
  133. package/framework/qualia-framework/templates/codebase/concerns.md +0 -310
  134. package/framework/qualia-framework/templates/codebase/conventions.md +0 -307
  135. package/framework/qualia-framework/templates/codebase/integrations.md +0 -280
  136. package/framework/qualia-framework/templates/codebase/stack.md +0 -186
  137. package/framework/qualia-framework/templates/codebase/structure.md +0 -285
  138. package/framework/qualia-framework/templates/codebase/testing.md +0 -480
  139. package/framework/qualia-framework/templates/config.json +0 -35
  140. package/framework/qualia-framework/templates/context.md +0 -283
  141. package/framework/qualia-framework/templates/continue-here.md +0 -78
  142. package/framework/qualia-framework/templates/debug-subagent-prompt.md +0 -91
  143. package/framework/qualia-framework/templates/discovery.md +0 -146
  144. package/framework/qualia-framework/templates/lab-notes.md +0 -16
  145. package/framework/qualia-framework/templates/milestone-archive.md +0 -123
  146. package/framework/qualia-framework/templates/milestone.md +0 -115
  147. package/framework/qualia-framework/templates/phase-prompt.md +0 -567
  148. package/framework/qualia-framework/templates/planner-subagent-prompt.md +0 -117
  149. package/framework/qualia-framework/templates/project.md +0 -184
  150. package/framework/qualia-framework/templates/projects/ai-agent.md +0 -156
  151. package/framework/qualia-framework/templates/projects/mobile-app.md +0 -181
  152. package/framework/qualia-framework/templates/projects/voice-agent.md +0 -134
  153. package/framework/qualia-framework/templates/projects/website.md +0 -137
  154. package/framework/qualia-framework/templates/requirements.md +0 -231
  155. package/framework/qualia-framework/templates/research-project/ARCHITECTURE.md +0 -204
  156. package/framework/qualia-framework/templates/research-project/FEATURES.md +0 -147
  157. package/framework/qualia-framework/templates/research-project/PITFALLS.md +0 -200
  158. package/framework/qualia-framework/templates/research-project/STACK.md +0 -120
  159. package/framework/qualia-framework/templates/research-project/SUMMARY.md +0 -170
  160. package/framework/qualia-framework/templates/research.md +0 -552
  161. package/framework/qualia-framework/templates/roadmap.md +0 -206
  162. package/framework/qualia-framework/templates/state.md +0 -179
  163. package/framework/qualia-framework/templates/summary-complex.md +0 -59
  164. package/framework/qualia-framework/templates/summary-minimal.md +0 -41
  165. package/framework/qualia-framework/templates/summary-standard.md +0 -48
  166. package/framework/qualia-framework/templates/summary.md +0 -246
  167. package/framework/qualia-framework/templates/user-setup.md +0 -311
  168. package/framework/qualia-framework/templates/verification-report.md +0 -322
  169. package/framework/qualia-framework/workflows/add-phase.md +0 -179
  170. package/framework/qualia-framework/workflows/add-todo.md +0 -157
  171. package/framework/qualia-framework/workflows/audit-milestone.md +0 -241
  172. package/framework/qualia-framework/workflows/check-todos.md +0 -176
  173. package/framework/qualia-framework/workflows/complete-milestone.md +0 -858
  174. package/framework/qualia-framework/workflows/diagnose-issues.md +0 -219
  175. package/framework/qualia-framework/workflows/discovery-phase.md +0 -289
  176. package/framework/qualia-framework/workflows/discuss-phase.md +0 -534
  177. package/framework/qualia-framework/workflows/execute-phase.md +0 -559
  178. package/framework/qualia-framework/workflows/execute-plan.md +0 -438
  179. package/framework/qualia-framework/workflows/help.md +0 -470
  180. package/framework/qualia-framework/workflows/insert-phase.md +0 -220
  181. package/framework/qualia-framework/workflows/list-phase-assumptions.md +0 -178
  182. package/framework/qualia-framework/workflows/map-codebase.md +0 -327
  183. package/framework/qualia-framework/workflows/new-milestone.md +0 -363
  184. package/framework/qualia-framework/workflows/new-project.md +0 -982
  185. package/framework/qualia-framework/workflows/pause-work.md +0 -122
  186. package/framework/qualia-framework/workflows/plan-milestone-gaps.md +0 -256
  187. package/framework/qualia-framework/workflows/plan-phase.md +0 -422
  188. package/framework/qualia-framework/workflows/progress.md +0 -389
  189. package/framework/qualia-framework/workflows/quick.md +0 -252
  190. package/framework/qualia-framework/workflows/remove-phase.md +0 -326
  191. package/framework/qualia-framework/workflows/research-phase.md +0 -74
  192. package/framework/qualia-framework/workflows/resume-project.md +0 -306
  193. package/framework/qualia-framework/workflows/set-profile.md +0 -80
  194. package/framework/qualia-framework/workflows/settings.md +0 -145
  195. package/framework/qualia-framework/workflows/transition.md +0 -556
  196. package/framework/qualia-framework/workflows/update.md +0 -197
  197. package/framework/qualia-framework/workflows/verify-phase.md +0 -195
  198. package/framework/qualia-framework/workflows/verify-work.md +0 -625
  199. package/framework/rules/context7.md +0 -14
  200. package/framework/rules/frontend.md +0 -33
  201. package/framework/rules/speed.md +0 -23
  202. package/framework/scripts/__pycache__/say.cpython-314.pyc +0 -0
  203. package/framework/scripts/apply-retention.sh +0 -120
  204. package/framework/scripts/bootstrap-pop-os.sh +0 -354
  205. package/framework/scripts/claude-voice +0 -13
  206. package/framework/scripts/cleanup.sh +0 -131
  207. package/framework/scripts/cowork-mode.sh +0 -141
  208. package/framework/scripts/generate-project-claude-md.sh +0 -153
  209. package/framework/scripts/load-test-webhook.js +0 -172
  210. package/framework/scripts/say.py +0 -236
  211. package/framework/scripts/showcase-video-recorder/ffmpeg-builder.js +0 -167
  212. package/framework/scripts/showcase-video-recorder/playwright-helpers.js +0 -216
  213. package/framework/scripts/speak.py +0 -55
  214. package/framework/scripts/speak.sh +0 -18
  215. package/framework/scripts/status.sh +0 -138
  216. package/framework/scripts/sync-to-framework.sh +0 -65
  217. package/framework/scripts/voice-hotkey.py +0 -227
  218. package/framework/scripts/voice-input.sh +0 -51
  219. package/framework/skills/animate/SKILL.md +0 -202
  220. package/framework/skills/bolder/SKILL.md +0 -144
  221. package/framework/skills/browser-qa/SKILL.md +0 -536
  222. package/framework/skills/clarify/SKILL.md +0 -179
  223. package/framework/skills/client-handoff/SKILL.md +0 -135
  224. package/framework/skills/collab-onboard/SKILL.md +0 -111
  225. package/framework/skills/colorize/SKILL.md +0 -170
  226. package/framework/skills/critique/SKILL.md +0 -126
  227. package/framework/skills/deep-research/SKILL.md +0 -240
  228. package/framework/skills/delight/SKILL.md +0 -329
  229. package/framework/skills/deploy/SKILL.md +0 -261
  230. package/framework/skills/deploy-verify/SKILL.md +0 -377
  231. package/framework/skills/deploy-verify/scripts/canary-check.sh +0 -206
  232. package/framework/skills/deploy-verify/scripts/check-console-errors.js +0 -147
  233. package/framework/skills/deploy-verify/scripts/check-cwv.js +0 -139
  234. package/framework/skills/deploy-verify/scripts/project-detect.sh +0 -84
  235. package/framework/skills/deploy-verify/scripts/verify.sh +0 -548
  236. package/framework/skills/design-quieter/SKILL.md +0 -130
  237. package/framework/skills/distill/SKILL.md +0 -149
  238. package/framework/skills/docs-lookup/SKILL.md +0 -79
  239. package/framework/skills/fcm-notifications/SKILL.md +0 -125
  240. package/framework/skills/financial-ledger/SKILL.md +0 -1039
  241. package/framework/skills/frontend-master/NOTICE.md +0 -4
  242. package/framework/skills/frontend-master/SKILL.md +0 -127
  243. package/framework/skills/frontend-master/reference/color-and-contrast.md +0 -132
  244. package/framework/skills/frontend-master/reference/interaction-design.md +0 -123
  245. package/framework/skills/frontend-master/reference/motion-design.md +0 -99
  246. package/framework/skills/frontend-master/reference/responsive-design.md +0 -114
  247. package/framework/skills/frontend-master/reference/spatial-design.md +0 -100
  248. package/framework/skills/frontend-master/reference/typography.md +0 -131
  249. package/framework/skills/frontend-master/reference/ux-writing.md +0 -107
  250. package/framework/skills/harden/SKILL.md +0 -357
  251. package/framework/skills/i18n-rtl/SKILL.md +0 -752
  252. package/framework/skills/learn/SKILL.md +0 -95
  253. package/framework/skills/memory/SKILL.md +0 -50
  254. package/framework/skills/mobile-expo/SKILL.md +0 -977
  255. package/framework/skills/mobile-expo/references/store-checklist.md +0 -550
  256. package/framework/skills/nestjs-backend/README.md +0 -73
  257. package/framework/skills/nestjs-backend/SKILL.md +0 -446
  258. package/framework/skills/nestjs-backend/references/templates.md +0 -1173
  259. package/framework/skills/normalize/SKILL.md +0 -79
  260. package/framework/skills/onboard/SKILL.md +0 -242
  261. package/framework/skills/openrouter-agent/SKILL.md +0 -922
  262. package/framework/skills/polish/SKILL.md +0 -209
  263. package/framework/skills/pr/SKILL.md +0 -66
  264. package/framework/skills/qualia/SKILL.md +0 -199
  265. package/framework/skills/qualia-add-todo/SKILL.md +0 -68
  266. package/framework/skills/qualia-audit-milestone/SKILL.md +0 -95
  267. package/framework/skills/qualia-check-todos/SKILL.md +0 -55
  268. package/framework/skills/qualia-complete-milestone/SKILL.md +0 -134
  269. package/framework/skills/qualia-debug/SKILL.md +0 -149
  270. package/framework/skills/qualia-design/SKILL.md +0 -203
  271. package/framework/skills/qualia-discuss-phase/SKILL.md +0 -72
  272. package/framework/skills/qualia-evolve/SKILL.md +0 -200
  273. package/framework/skills/qualia-execute-phase/SKILL.md +0 -89
  274. package/framework/skills/qualia-framework-audit/SKILL.md +0 -604
  275. package/framework/skills/qualia-guide/SKILL.md +0 -32
  276. package/framework/skills/qualia-help/SKILL.md +0 -114
  277. package/framework/skills/qualia-idk/SKILL.md +0 -352
  278. package/framework/skills/qualia-list-phase-assumptions/SKILL.md +0 -67
  279. package/framework/skills/qualia-new-milestone/SKILL.md +0 -72
  280. package/framework/skills/qualia-new-project/SKILL.md +0 -232
  281. package/framework/skills/qualia-optimize/SKILL.md +0 -417
  282. package/framework/skills/qualia-pause-work/SKILL.md +0 -96
  283. package/framework/skills/qualia-plan-milestone-gaps/SKILL.md +0 -57
  284. package/framework/skills/qualia-plan-phase/SKILL.md +0 -104
  285. package/framework/skills/qualia-production-check/SKILL.md +0 -0
  286. package/framework/skills/qualia-progress/SKILL.md +0 -53
  287. package/framework/skills/qualia-quick/SKILL.md +0 -89
  288. package/framework/skills/qualia-report/SKILL.md +0 -166
  289. package/framework/skills/qualia-research-phase/SKILL.md +0 -88
  290. package/framework/skills/qualia-resume-work/SKILL.md +0 -62
  291. package/framework/skills/qualia-review/SKILL.md +0 -263
  292. package/framework/skills/qualia-start/SKILL.md +0 -161
  293. package/framework/skills/qualia-verify-work/SKILL.md +0 -132
  294. package/framework/skills/rag/SKILL.md +0 -750
  295. package/framework/skills/responsive/SKILL.md +0 -231
  296. package/framework/skills/retro/SKILL.md +0 -284
  297. package/framework/skills/sakani-conventions/SKILL.md +0 -136
  298. package/framework/skills/sakani-conventions/evals/evals.json +0 -23
  299. package/framework/skills/sakani-conventions/references/entities.md +0 -365
  300. package/framework/skills/sakani-conventions/references/error-codes.md +0 -95
  301. package/framework/skills/seo-master/SKILL.md +0 -490
  302. package/framework/skills/seo-master/references/checklist.md +0 -199
  303. package/framework/skills/seo-master/references/structured-data.md +0 -609
  304. package/framework/skills/ship/SKILL.md +0 -239
  305. package/framework/skills/stack-researcher/SKILL.md +0 -215
  306. package/framework/skills/status/SKILL.md +0 -154
  307. package/framework/skills/status/scripts/health-check.sh +0 -562
  308. package/framework/skills/subscription-payments/SKILL.md +0 -250
  309. package/framework/skills/supabase/SKILL.md +0 -973
  310. package/framework/skills/supabase/references/templates.md +0 -159
  311. package/framework/skills/team/SKILL.md +0 -67
  312. package/framework/skills/test-runner/SKILL.md +0 -202
  313. package/framework/skills/voice-agent/SKILL.md +0 -1312
  314. package/framework/skills/zoho-workflow/SKILL.md +0 -51
  315. package/framework/statusline-command.sh +0 -117
  316. package/framework/teams/default/inboxes/plan-04.json +0 -9
  317. package/framework/teams/review-team.md +0 -75
  318. package/framework/teams/ship-team.md +0 -86
  319. package/profiles/fawzi.json +0 -16
  320. package/profiles/hasan.json +0 -16
  321. package/profiles/moayad.json +0 -16
  322. package/templates/CLAUDE-owner.md +0 -52
  323. package/templates/CLAUDE.md.hbs +0 -58
  324. package/templates/env.claude.template +0 -12
  325. package/templates/settings.json +0 -172
  326. /package/{framework/rules → rules}/deployment.md +0 -0
  327. /package/{framework/rules → rules}/security.md +0 -0
@@ -1,231 +0,0 @@
1
- ---
2
- name: responsive
3
- description: Deep responsive design expert. Analyzes and fixes layouts for all screens - mobile, tablet, desktop, ultrawide. Understands breakpoints, container queries, fluid typography, and touch targets.
4
- tags: [responsive, mobile, layout, breakpoints, accessibility]
5
- ---
6
-
7
- # Responsive Design Expert
8
-
9
- I make your UI work perfectly on every screen size.
10
-
11
- ## What I Do
12
-
13
- 1. **Audit current responsiveness** - Find what breaks
14
- 2. **Fix layout issues** - Overflow, cramped content, tiny text
15
- 3. **Optimize touch targets** - 44px minimum for mobile
16
- 4. **Apply fluid scaling** - Typography, spacing, containers
17
- 5. **Test edge cases** - Landscape phones, tablets, ultrawides
18
-
19
- ## How to Use
20
-
21
- - "Make this page responsive"
22
- - "Fix the mobile layout"
23
- - "The navbar breaks on tablet"
24
- - "This looks bad on ultrawide"
25
-
26
- I'll analyze and fix it.
27
-
28
- ## My Analysis Process
29
-
30
- ### 1. Find Breaking Points
31
- ```
32
- - Scan for fixed widths (px values that should be fluid)
33
- - Check for horizontal overflow
34
- - Find text that gets too small or too large
35
- - Identify touch targets under 44px
36
- - Look for images without max-width
37
- ```
38
-
39
- ### 2. Check Key Breakpoints
40
- ```
41
- 320px - Small phones (iPhone SE)
42
- 375px - Standard phones
43
- 428px - Large phones (iPhone Pro Max)
44
- 768px - Tablets portrait
45
- 1024px - Tablets landscape / small laptops
46
- 1280px - Laptops
47
- 1536px - Desktops
48
- 1920px - Large desktops
49
- 2560px - Ultrawides
50
- ```
51
-
52
- ### 3. Test Interactions
53
- ```
54
- - Hover states need touch alternatives
55
- - Dropdowns need mobile-friendly triggers
56
- - Modals need proper mobile sizing
57
- - Forms need appropriate input sizes
58
- ```
59
-
60
- ## Common Fixes I Apply
61
-
62
- ### Layout
63
- ```css
64
- /* Fluid container — full width with responsive padding */
65
- .container {
66
- width: 100%;
67
- padding-inline: clamp(1rem, 5vw, 4rem);
68
- margin-inline: auto;
69
- }
70
-
71
- /* Content container — for readable text sections only */
72
- .container-prose {
73
- max-width: 65ch;
74
- margin-inline: auto;
75
- }
76
-
77
- /* Responsive grid */
78
- .grid {
79
- display: grid;
80
- grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
81
- gap: clamp(1rem, 3vw, 2rem);
82
- }
83
-
84
- /* Stack on mobile */
85
- .flex-row {
86
- display: flex;
87
- flex-direction: column;
88
- @media (min-width: 768px) {
89
- flex-direction: row;
90
- }
91
- }
92
- ```
93
-
94
- ### Typography
95
- ```css
96
- /* Fluid type scale */
97
- .heading {
98
- font-size: clamp(1.5rem, 4vw + 1rem, 3rem);
99
- }
100
-
101
- .body {
102
- font-size: clamp(1rem, 0.5vw + 0.875rem, 1.125rem);
103
- }
104
-
105
- /* Readable line length */
106
- .prose {
107
- max-width: 65ch;
108
- }
109
- ```
110
-
111
- ### Spacing
112
- ```css
113
- /* Fluid spacing */
114
- .section {
115
- padding-block: clamp(2rem, 8vw, 6rem);
116
- padding-inline: clamp(1rem, 5vw, 3rem);
117
- }
118
- ```
119
-
120
- ### Images
121
- ```css
122
- img {
123
- max-width: 100%;
124
- height: auto;
125
- display: block;
126
- }
127
-
128
- /* Responsive aspect ratio */
129
- .hero-image {
130
- aspect-ratio: 16/9;
131
- @media (max-width: 768px) {
132
- aspect-ratio: 4/3;
133
- }
134
- }
135
- ```
136
-
137
- ### Touch Targets
138
- ```css
139
- /* Minimum touch target */
140
- button, a, input {
141
- min-height: 44px;
142
- min-width: 44px;
143
- }
144
-
145
- /* Spacing between targets */
146
- .nav-links {
147
- gap: 0.5rem; /* At least 8px between */
148
- }
149
- ```
150
-
151
- ## Container Queries (Modern Approach)
152
-
153
- ```css
154
- /* Component responds to its container, not viewport */
155
- .card-container {
156
- container-type: inline-size;
157
- }
158
-
159
- @container (width < 300px) {
160
- .card { flex-direction: column; }
161
- .card-image { aspect-ratio: 16/9; }
162
- }
163
-
164
- @container (width >= 300px) {
165
- .card { flex-direction: row; }
166
- .card-image { width: 120px; }
167
- }
168
- ```
169
-
170
- ## Mobile-First Checklist
171
-
172
- - [ ] Base styles work without media queries
173
- - [ ] Text readable without zooming (16px+ body)
174
- - [ ] Touch targets 44px+
175
- - [ ] No horizontal scroll
176
- - [ ] Forms have proper input types
177
- - [ ] Images scale down
178
- - [ ] Modals fit screen
179
- - [ ] Navigation accessible
180
- - [ ] Focus states visible
181
- - [ ] Landscape orientation works
182
-
183
- ## Red Flags I Look For
184
-
185
- ```
186
- ❌ width: 500px (fixed widths)
187
- ❌ font-size: 12px (too small for mobile)
188
- ❌ height: 100vh on mobile (iOS issues)
189
- ❌ hover-only interactions
190
- ❌ Tiny close buttons
191
- ❌ Side-by-side on mobile
192
- ❌ Overflow: hidden hiding content
193
- ❌ Position: fixed without mobile consideration
194
- ```
195
-
196
- ## Tailwind Responsive Patterns
197
-
198
- ```html
199
- <!-- Mobile-first stacking -->
200
- <div class="flex flex-col md:flex-row gap-4">
201
-
202
- <!-- Responsive text -->
203
- <h1 class="text-2xl sm:text-3xl md:text-4xl lg:text-5xl">
204
-
205
- <!-- Responsive padding -->
206
- <section class="px-4 sm:px-6 lg:px-8 py-12 md:py-20">
207
-
208
- <!-- Hide/show -->
209
- <div class="hidden md:block">Desktop only</div>
210
- <div class="md:hidden">Mobile only</div>
211
-
212
- <!-- Responsive grid -->
213
- <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4">
214
- ```
215
-
216
- ## I Test At These Widths
217
-
218
- 1. **320px** - Does it fit? Is text readable?
219
- 2. **375px** - Standard mobile, should look good
220
- 3. **768px** - Tablet, layout should adapt
221
- 4. **1024px** - Small desktop, full features
222
- 5. **1440px** - Standard desktop
223
- 6. **1920px+** - Should it max-width or fill?
224
-
225
- ## Output
226
-
227
- I provide:
228
- 1. List of issues found
229
- 2. Specific fixes with code
230
- 3. Before/after mental model
231
- 4. Priority order (critical → nice-to-have)
@@ -1,284 +0,0 @@
1
- ---
2
- name: retro
3
- description: "Generate retrospective analytics from git log, session data, and SUMMARY files. Produces a markdown trend report with commits per session, lines added/removed, test ratio, deviation rate, hotspot files, and shipping velocity. Run from any project directory or ~/.claude for cross-project view."
4
- user-invocable: true
5
- args:
6
- - name: weeks
7
- description: "Number of weeks to analyze (default: 4)"
8
- required: false
9
- - name: project
10
- description: "Specific project name to filter (default: current directory)"
11
- required: false
12
- ---
13
-
14
- # Retrospective Analytics
15
-
16
- > Team-level shipping analytics. No individual attribution. Outcome-focused.
17
-
18
- Generate a retrospective report showing how shipping patterns evolve over time. All metrics are aggregate -- no per-developer breakdowns or policing metrics (RETR-05).
19
-
20
- ## Usage
21
-
22
- - `/retro` -- Analyze current project, last 4 weeks
23
- - `/retro --weeks 8` -- Analyze current project, last 8 weeks
24
- - `/retro --project under` -- Analyze specific project, last 4 weeks
25
-
26
- ## Data Sources
27
-
28
- Collect data from three sources. If a source is unavailable, skip it and note "N/A" in the report.
29
-
30
- ### Source 1: Git Log
31
-
32
- Run from the current project directory (or the project specified by `--project`):
33
-
34
- ```bash
35
- # Commits in date range
36
- git log --since="{WEEKS} weeks ago" --format="%H|%aI|%s" --no-merges
37
-
38
- # Lines added/removed per commit
39
- git log --since="{WEEKS} weeks ago" --format="%H" --no-merges | while read hash; do
40
- git diff --shortstat "${hash}^..${hash}" 2>/dev/null
41
- done
42
-
43
- # File change frequency (hotspots)
44
- git log --since="{WEEKS} weeks ago" --name-only --format="" --no-merges | sort | uniq -c | sort -rn | head -15
45
-
46
- # Test file vs source file ratio in commits
47
- git log --since="{WEEKS} weeks ago" --name-only --format="" --no-merges | grep -c '\.test\.\|\.spec\.\|test_\|_test\.'
48
- git log --since="{WEEKS} weeks ago" --name-only --format="" --no-merges | grep -c '\.\(ts\|tsx\|js\|jsx\|py\)$'
49
- ```
50
-
51
- ### Source 2: Session Data
52
-
53
- Read session JSON files from `~/.claude/session-env/session_*.json`:
54
-
55
- ```bash
56
- # List all session files
57
- ls -t ~/.claude/session-env/session_*.json
58
-
59
- # Each file contains: timestamp, project, branch, files_changed, summary
60
- # Parse with jq or grep to extract metrics
61
- ```
62
-
63
- Also read `~/.claude/knowledge/session-digest.md` for the rolling session log (pipe-delimited table with date, project, branch, files_changed, summary).
64
-
65
- **Session detection heuristic:** Each `session_*.json` file = one session. Count files matching the date range.
66
-
67
- ### Source 3: SUMMARY Files
68
-
69
- Scan for SUMMARY files in the current project's `.planning/phases/` directory:
70
-
71
- ```bash
72
- # Find all SUMMARY files
73
- find .planning/phases/ -name "*-SUMMARY.md" -type f 2>/dev/null
74
-
75
- # From each SUMMARY, extract:
76
- # - Duration (from frontmatter or body)
77
- # - Deviation count (from "## Deviations" or "## Deferred Discoveries" sections)
78
- # - Task count (from provides/affects lists)
79
- ```
80
-
81
- ## Metric Calculations
82
-
83
- Calculate these 6 metrics from collected data:
84
-
85
- ### M1: Commits Per Session
86
- ```
87
- commits_per_session = total_commits / total_sessions
88
- ```
89
- Where `total_sessions` = count of session_*.json files matching the project and date range. If session data unavailable, report "N/A (no session data)".
90
-
91
- ### M2: Lines Added / Removed
92
- ```
93
- lines_added = sum of insertions from git shortstat
94
- lines_removed = sum of deletions from git shortstat
95
- net_lines = lines_added - lines_removed
96
- churn_ratio = lines_removed / lines_added (lower = more additive work)
97
- ```
98
-
99
- ### M3: Test Ratio
100
- ```
101
- test_ratio = test_file_changes / total_source_file_changes
102
- ```
103
- Where test files match `*.test.*`, `*.spec.*`, `test_*`, `_test.*` and source files match `*.ts`, `*.tsx`, `*.js`, `*.jsx`, `*.py`. Report as percentage: "23% of file changes include tests".
104
-
105
- ### M4: Deviation Rate
106
- ```
107
- deviation_rate = total_deviations / total_tasks_completed
108
- ```
109
- Parse from SUMMARY files. Deviations appear under `## Deviations` or `## Deferred Discoveries` sections. If no SUMMARY files exist, report "N/A (no planning data)".
110
-
111
- ### M5: Hotspot Files
112
- Top 10 most frequently changed files in the period. Flag files with >5 changes as "high churn" -- these may indicate architectural issues or high-risk areas.
113
-
114
- ### M6: Shipping Velocity
115
- ```
116
- plans_per_week = completed_plans / weeks_analyzed
117
- commits_per_week = total_commits / weeks_analyzed
118
- ```
119
- Completed plans = count of SUMMARY files created in the date range (by file modification time). Commits per week from git log.
120
-
121
- ## Report Template
122
-
123
- Generate the report in this exact format:
124
-
125
- ```markdown
126
- # Retrospective Report
127
-
128
- **Project:** {project_name}
129
- **Period:** {start_date} to {end_date} ({weeks} weeks)
130
- **Generated:** {current_date}
131
-
132
- ## Metrics Summary
133
-
134
- | Metric | Value | vs Last |
135
- |--------|-------|---------|
136
- | Commits/Session | {value} | {computed_trend} |
137
- | Lines Added | {value} | {computed_trend} |
138
- | Lines Removed | {value} | {computed_trend} |
139
- | Net Lines | {value} | {computed_trend} |
140
- | Test Ratio | {value}% | {computed_trend} |
141
- | Deviation Rate | {value}% | {computed_trend} |
142
- | Plans/Week | {value} | {computed_trend} |
143
- | Commits/Week | {value} | {computed_trend} |
144
-
145
- ## Hotspot Files
146
-
147
- | Rank | File | Changes | Status |
148
- |------|------|---------|--------|
149
- | 1 | {file} | {count} | {normal|high churn} |
150
- | ... | ... | ... | ... |
151
-
152
- ## Observations
153
-
154
- {Auto-generated observations based on data:}
155
- - {If test ratio < 20%: "Low test coverage in commits -- consider TDD for new features"}
156
- - {If churn_ratio > 0.5: "High code churn -- significant rewrites happening"}
157
- - {If any hotspot > 10 changes: "{file} is a hotspot with {N} changes -- consider splitting"}
158
- - {If deviation_rate > 30%: "High deviation rate -- plans may need better scoping"}
159
- - {If commits_per_session < 1: "Low commit frequency -- consider more atomic commits"}
160
-
161
- ## Raw Data
162
-
163
- <details>
164
- <summary>Data sources used</summary>
165
-
166
- - Git log: {commit_count} commits analyzed
167
- - Sessions: {session_count} sessions found
168
- - SUMMARYs: {summary_count} plan summaries parsed
169
- </details>
170
- ```
171
-
172
- The "vs Last" column shows week-over-week deltas computed from prior JSON snapshots in `~/.claude/knowledge/retros/`. First run shows "---" for all trends.
173
-
174
- ## Snapshot Storage
175
-
176
- After generating the report, save a JSON snapshot for trend tracking:
177
-
178
- ```bash
179
- mkdir -p ~/.claude/knowledge/retros
180
- ```
181
-
182
- Save to `~/.claude/knowledge/retros/retro_{project}_{YYYYMMDD}.json`:
183
-
184
- ```json
185
- {
186
- "project": "{project_name}",
187
- "date": "{YYYY-MM-DD}",
188
- "period_weeks": {weeks},
189
- "metrics": {
190
- "commits_per_session": {value},
191
- "lines_added": {value},
192
- "lines_removed": {value},
193
- "net_lines": {value},
194
- "test_ratio": {value},
195
- "deviation_rate": {value},
196
- "plans_per_week": {value},
197
- "commits_per_week": {value}
198
- },
199
- "hotspots": [
200
- {"file": "{path}", "changes": {count}}
201
- ]
202
- }
203
- ```
204
-
205
- This snapshot is consumed by week-over-week trend analysis (see below).
206
-
207
- ## Week-over-Week Trend Analysis
208
-
209
- After collecting current metrics, load prior snapshots to compute deltas (RETR-03).
210
-
211
- ### Loading Prior Snapshots
212
-
213
- ```bash
214
- # Find the most recent prior snapshot for this project
215
- ls -t ~/.claude/knowledge/retros/retro_{project}_*.json 2>/dev/null | head -2
216
- ```
217
-
218
- Read the **second most recent** snapshot (the most recent will be the one about to be saved). If no prior snapshot exists, set all trends to "---" (first run, no comparison available).
219
-
220
- ### Computing Deltas
221
-
222
- For each metric, calculate:
223
-
224
- ```
225
- delta = current_value - prior_value
226
- delta_pct = ((current_value - prior_value) / prior_value) * 100
227
- ```
228
-
229
- ### Trend Formatting
230
-
231
- Format each trend using direction arrow + magnitude:
232
-
233
- | Condition | Format | Example |
234
- |-----------|--------|---------|
235
- | delta_pct > 10% | {arrow_up} +{delta_pct}% | ^ +25% |
236
- | delta_pct between -10% and +10% | {arrow_right} ~{delta_pct}% | ~ ~3% |
237
- | delta_pct < -10% | {arrow_down} {delta_pct}% | v -15% |
238
- | No prior data | --- | --- |
239
- | Prior value was 0 | NEW | NEW |
240
-
241
- Use text arrows: `^` for up, `v` for down, `~` for flat. Do NOT use unicode arrows (they render inconsistently in terminals).
242
-
243
- **Trend interpretation context (add after each metric in the report):**
244
-
245
- - Commits/Session: higher is neutral (more granular work), lower is neutral (bigger chunks)
246
- - Lines Added: higher may mean new features, lower may mean maintenance mode
247
- - Lines Removed: higher means cleanup/refactoring is happening
248
- - Test Ratio: higher is GOOD (more testing), lower is CONCERNING
249
- - Deviation Rate: lower is GOOD (better planning), higher is CONCERNING
250
- - Plans/Week: higher means faster shipping velocity
251
- - Commits/Week: higher is neutral (activity indicator only)
252
-
253
- ### Trend Summary
254
-
255
- Add a "## Trend Summary" section to the report, after the metrics table:
256
-
257
- ```markdown
258
- ## Trend Summary
259
-
260
- **Compared to:** {prior_snapshot_date}
261
-
262
- **Positive signals:**
263
- - {List metrics trending in desirable direction, e.g., "Test ratio up 15% -- more tests being written"}
264
-
265
- **Watch items:**
266
- - {List metrics trending in concerning direction, e.g., "Deviation rate up 20% -- plans may need better scoping"}
267
-
268
- **Stable:**
269
- - {List metrics within +/-10%}
270
- ```
271
-
272
- If no prior snapshot exists, replace the Trend Summary with:
273
-
274
- ```markdown
275
- ## Trend Summary
276
-
277
- First retrospective run -- no prior data for comparison. Run `/retro` again next week to see trends.
278
- ```
279
-
280
- ## Guardrails
281
-
282
- - **No individual attribution:** Never break down metrics by author. All metrics are project-level aggregate (RETR-05).
283
- - **Graceful degradation:** If git log fails (not a git repo), report only session data. If session data missing, report only git data. If both missing, report error with instructions.
284
- - **No policing metrics:** No "lines per hour", "commits per day per person", or productivity scoring. Focus on outcomes: what shipped, what's changing, what needs attention.
@@ -1,136 +0,0 @@
1
- ---
2
- name: sakani-conventions
3
- description: "Sakani project conventions — monorepo structure, shared types, error codes, entity naming, role definitions, and domain rules from SRS V1.14. Use this skill whenever working on the Sakani project, including backend, mobile, admin console, or any shared code. Trigger on: sakani, building management, property management, tenant, owner, guard, building manager, dues, ledger, or any reference to the Sakani codebase."
4
- tags: [sakani, conventions, domain, property-management]
5
- ---
6
-
7
- # Sakani Project Conventions
8
-
9
- Sakani is a property management platform for Jordan. Native iOS/Android app (React Native Expo) + NestJS backend + Next.js staff admin console + Supabase (Postgres). This skill defines project-wide conventions that all other skills reference.
10
-
11
- ## Monorepo Structure
12
-
13
- ```
14
- sakani/
15
- ├── apps/
16
- │ ├── mobile/ # React Native Expo (iOS + Android)
17
- │ ├── api/ # NestJS backend
18
- │ └── admin/ # Next.js staff admin console
19
- ├── packages/
20
- │ ├── shared/ # Shared types, constants, validation
21
- │ │ ├── src/
22
- │ │ │ ├── types/ # Domain entity types
23
- │ │ │ ├── constants/ # Error codes, role definitions, enums
24
- │ │ │ ├── validation/ # Zod schemas shared across apps
25
- │ │ │ └── utils/ # Pure utility functions
26
- │ │ └── package.json
27
- │ └── config/ # Shared ESLint, TS configs
28
- ├── supabase/
29
- │ ├── migrations/ # SQL migrations (source of truth)
30
- │ └── functions/ # Edge Functions (background jobs)
31
- ├── docs/ # Reference docs (gitignored)
32
- ├── turbo.json
33
- ├── package.json
34
- └── .gitignore
35
- ```
36
-
37
- Import convention: `@sakani/shared` resolves to `packages/shared`. All apps import domain types and validation from here — never duplicate type definitions across apps.
38
-
39
- ## User Roles
40
-
41
- 8 roles with RBAC+ABAC hybrid. Deny-by-default — every action requires explicit grant.
42
-
43
- | Role | Code | Scope | Description |
44
- |------|------|-------|-------------|
45
- | Staff Admin | `STAFF_ADMIN` | Global | Verification governance, audited overrides |
46
- | BM Candidate | `BM_CANDIDATE` | Building | Initial building manager, pre-verification |
47
- | BM Verified | `BM_VERIFIED` | Building | Verified building manager, full ops access |
48
- | Owner Unverified | `OWNER_UNVERIFIED` | Unit | Pending ownership verification |
49
- | Owner Verified | `OWNER_VERIFIED` | Unit | Verified owner (one per unit) |
50
- | Tenant | `TENANT` | Unit | Invite-only, unit-scoped, cannot browse |
51
- | Guard | `GUARD` | Building | Building ops, timed tasks, calendar |
52
- | Dev Admin | `DEV_ADMIN` | Building | Pre-handover only, identity doc access |
53
-
54
- Scopes: `S` (self), `U` (unit), `B` (building), `G` (global). Server-side predicates enforce all scope rules — UI conventions are display-only, never security boundaries.
55
-
56
- ## Entity Naming
57
-
58
- All entities use `snake_case` in the database and API. TypeScript types use `PascalCase`. Properties use `camelCase` in TypeScript, `snake_case` in API responses.
59
-
60
- ### Core Entities
61
-
62
- Read `references/entities.md` for the full entity list with field definitions. Key entities:
63
-
64
- **Identity:** `building`, `unit`, `unit_claim_request`, `building_setup_request`, `unit_membership`, `building_role_assignment`, `document`
65
-
66
- **Finance:** `dues_cycle`, `dues_config`, `dues_obligation`, `ledger_entry`, `credit_topup_request`, `settlement_entry`, `expense`
67
-
68
- **Subscription:** `subscription_entitlement`, `subscription_plan`, `subscription_pricing_tier`, `subscription_price_quote`, `subscription_checkout_session`, `promo_code`, `promo_redemption`, `reimbursement_obligation`
69
-
70
- **Operations:** `guard_invite`, `guard_assignment`, `guard_task`, `task_template`, `task_instance`, `ticket`
71
-
72
- **Audit:** `audit_log`, `statement_version`
73
-
74
- ## Error Contract
75
-
76
- All API errors follow a standardized shape. 44 error codes defined in V1.14 (EH-6.02 through EH-6.44).
77
-
78
- ```typescript
79
- interface ApiError {
80
- http_status: number;
81
- error_code: string; // e.g., "BUILDING_NOT_FOUND"
82
- message_key: string; // i18n key, e.g., "error.building.not_found"
83
- request_id: string; // UUID correlation
84
- details?: Record<string, unknown>; // safe details only
85
- }
86
- ```
87
-
88
- **Safe-details rule:** Never include `building_key_v1`, `unit_key_v1`, identity values, or extracted document text in error responses. This prevents entity enumeration.
89
-
90
- Read `references/error-codes.md` for the full mapping of all 44 error codes with HTTP status codes.
91
-
92
- ## Financial Rules
93
-
94
- These are non-negotiable domain rules that every piece of code touching money must follow:
95
-
96
- - **Append-only ledger.** Never update or delete a `ledger_entry`. Corrections use `REVERSAL` entries only.
97
- - **Idempotency keys** on every financial write operation. Duplicate requests with same idempotency key return the original result.
98
- - **FIFO credit settlement.** No partial settlement — credit either covers the full obligation or doesn't apply.
99
- - **7 entry types only:** `CREDIT_TOPUP`, `MANUAL_UNIT_INCOME`, `OPENING_BALANCE`, `EXPENSE`, `SUBSCRIPTION_FEE`, `AUTOSETTLEMENT_APPLIED`, `REVERSAL`.
100
- - **Monetary values** always stored as `{ amount: number, currency: string }` with ISO 4217 currency code (JOD for Jordan).
101
- - **Daily auto-settlement** at 07:00 Asia/Amman — atomically applies credit to cover obligations.
102
-
103
- ## Timestamps & Localization
104
-
105
- - All timestamps stored in UTC. Presented in `Asia/Amman` for Jordan buildings.
106
- - Numerals display as `0-9` (Western Arabic), not `٠-٩`.
107
- - Arabic (RTL) + English. Every user-facing string uses a `message_key` — no hardcoded labels in backend responses.
108
- - All `reason_code` values are stable identifiers, not display text.
109
-
110
- ## Database Conventions
111
-
112
- - Every table has `id` (UUID), `created_at` (timestamptz), `updated_at` (timestamptz).
113
- - Every request carries a `request_id` (UUID) for audit correlation.
114
- - RLS policies on every table — no exceptions.
115
- - `building_key_v1` and `unit_key_v1` are opaque canonical keys for deterministic matching. Never expose in API responses or logs.
116
-
117
- ## Authentication
118
-
119
- OTP-based login via SMS. Access/refresh token rotation with server-side session enforcement. No password-based auth.
120
-
121
- ## Subscription States
122
-
123
- Per-building subscription: `TRIAL` (30 days) → `ACTIVE` → `INACTIVE`. Paywall gates most features when `INACTIVE`, but identity documents remain accessible.
124
-
125
- ## Commit Convention
126
-
127
- All commits within Sakani follow: `{type}({phase}-{plan}): {description}` during Qualia execution, or `{type}(sakani): {description}` for standalone changes.
128
-
129
- ## When to Read References
130
-
131
- | You're working on... | Read |
132
- |---|---|
133
- | Any entity CRUD, schema design | `references/entities.md` |
134
- | Error handling, API responses | `references/error-codes.md` |
135
- | Permission checks, role guards | This file (Roles table above) |
136
- | Financial logic, ledger ops | This file (Financial Rules above) |
@@ -1,23 +0,0 @@
1
- {
2
- "skill_name": "sakani-conventions",
3
- "evals": [
4
- {
5
- "id": 1,
6
- "prompt": "I need to create the NestJS DTOs and Supabase migration for the credit top-up request feature. Owner submits a top-up with evidence (CliQ screenshot), BM approves or rejects. Create the migration SQL file and the TypeScript types.",
7
- "expected_output": "Should produce: migration with correct table schema matching entities.md (idempotency_key, evidence_document_id FK, status enum, etc.), TypeScript types with snake_case DB fields and camelCase TS properties, error handling using the exact SAKANI_ERRORS codes (DUPLICATE_TOPUP_REQUEST, TOPUP_ALREADY_REVIEWED), and the ledger_entry for CREDIT_TOPUP type following append-only rules.",
8
- "files": []
9
- },
10
- {
11
- "id": 2,
12
- "prompt": "Write the guard invite API endpoint for Sakani. BM invites a guard to the building by phone number. The invite expires after 7 days and is single-use. Only one active guard per building.",
13
- "expected_output": "Should produce: NestJS controller/service following monorepo import pattern (@sakani/shared), correct error codes (GUARD_INVITE_EXPIRED, GUARD_INVITE_REVOKED, GUARD_ALREADY_ACTIVE), proper role check (BM_VERIFIED only), idempotency handling, and the API error response shape matching the ApiError interface exactly.",
14
- "files": []
15
- },
16
- {
17
- "id": 3,
18
- "prompt": "Create the Supabase RLS policies for the ticket table. Owners and tenants can create tickets for their unit. BMs can see all tickets in their building. Guards can see tickets assigned to them. Staff admins can see everything.",
19
- "expected_output": "Should produce: RLS policies using auth.uid() with correct role checks against building_role_assignment and unit_membership tables, proper scope enforcement (unit-scoped for owners/tenants, building-scoped for BM/guard, global for staff), and deny-by-default approach (no permissive policies without role check).",
20
- "files": []
21
- }
22
- ]
23
- }