@evertonferreira96/agents 0.0.0-stage → 0.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.
- package/.claude/agents/api.md +45 -0
- package/.claude/agents/app.md +41 -0
- package/.claude/agents/architect.md +49 -0
- package/.claude/agents/infra.md +27 -0
- package/.claude/agents/product.md +58 -0
- package/.claude/agents/quick.md +33 -0
- package/.claude/agents/security.md +39 -0
- package/.claude/agents/ui.md +54 -0
- package/.claude/agents/verifier.md +56 -0
- package/.claude/agents/web.md +41 -0
- package/.claude/hooks/config-update-check.mjs +14 -0
- package/.claude/hooks/context-budget.mjs +51 -0
- package/.claude/hooks/graphify-update.sh +16 -0
- package/.claude/hooks/guard-bash.sh +64 -0
- package/.claude/hooks/orchestrator-guard.sh +49 -0
- package/.claude/hooks/post-compact.sh +26 -0
- package/.claude/hooks/readonly-guard.sh +54 -0
- package/.claude/hooks/stop-verify.sh +52 -0
- package/.claude/rules/api.md +21 -0
- package/.claude/rules/db.md +9 -0
- package/.claude/rules/delivery-diagram.md +16 -0
- package/.claude/rules/git-workflow.md +34 -0
- package/.claude/rules/graphify.md +3 -0
- package/.claude/rules/mobile.md +22 -0
- package/.claude/rules/tickets.md +9 -0
- package/.claude/rules/ui.md +14 -0
- package/.claude/rules/web.md +27 -0
- package/.claude/settings.json +114 -0
- package/.claude/skills/animate/RECIPES.md +324 -0
- package/.claude/skills/animate/SKILL.md +208 -0
- package/.claude/skills/animate/agents/openai.yaml +5 -0
- package/.claude/skills/animate-expo/RECIPES.md +385 -0
- package/.claude/skills/animate-expo/SKILL.md +264 -0
- package/.claude/skills/animate-expo/agents/openai.yaml +5 -0
- package/.claude/skills/animation-performance/SKILL.md +223 -0
- package/.claude/skills/animation-performance/agents/openai.yaml +5 -0
- package/.claude/skills/apple-design/SKILL.md +291 -0
- package/.claude/skills/apple-design/agents/openai.yaml +5 -0
- package/.claude/skills/arch-api/SKILL.md +291 -0
- package/.claude/skills/arch-api/agents/openai.yaml +3 -0
- package/.claude/skills/arch-api/references/common.md +174 -0
- package/.claude/skills/arch-api/references/contract.md +289 -0
- package/.claude/skills/arch-api/references/domain.md +301 -0
- package/.claude/skills/arch-api/references/endpoints.md +184 -0
- package/.claude/skills/arch-api/references/review.md +228 -0
- package/.claude/skills/arch-api/references/security.md +151 -0
- package/.claude/skills/arch-app/SKILL.md +278 -0
- package/.claude/skills/arch-app/agents/openai.yaml +3 -0
- package/.claude/skills/arch-app/references/navigation-session.md +257 -0
- package/.claude/skills/arch-app/references/review.md +155 -0
- package/.claude/skills/arch-app/references/screens.md +214 -0
- package/.claude/skills/arch-app/references/services.md +301 -0
- package/.claude/skills/arch-app/references/ui-mobile.md +124 -0
- package/.claude/skills/arch-db/SKILL.md +181 -0
- package/.claude/skills/arch-db/agents/openai.yaml +3 -0
- package/.claude/skills/arch-db/references/indexes-queries.md +251 -0
- package/.claude/skills/arch-db/references/migrations.md +191 -0
- package/.claude/skills/arch-db/references/modeling.md +214 -0
- package/.claude/skills/arch-db/references/mysql.md +262 -0
- package/.claude/skills/arch-db/references/pooling-ops.md +112 -0
- package/.claude/skills/arch-db/references/review.md +143 -0
- package/.claude/skills/arch-db/references/transactions-locks.md +141 -0
- package/.claude/skills/arch-web/SKILL.md +307 -0
- package/.claude/skills/arch-web/agents/openai.yaml +3 -0
- package/.claude/skills/arch-web/references/auth-session-env.md +165 -0
- package/.claude/skills/arch-web/references/blocks.md +198 -0
- package/.claude/skills/arch-web/references/cache.md +124 -0
- package/.claude/skills/arch-web/references/review.md +142 -0
- package/.claude/skills/arch-web/references/services.md +297 -0
- package/.claude/skills/arch-web/references/tests.md +159 -0
- package/.claude/skills/arch-web/references/ui-forms.md +143 -0
- package/.claude/skills/break-ui/CATALOG.md +135 -0
- package/.claude/skills/break-ui/SKILL.md +176 -0
- package/.claude/skills/break-ui/agents/openai.yaml +5 -0
- package/.claude/skills/brief/SKILL.md +91 -0
- package/.claude/skills/brief/agents/openai.yaml +3 -0
- package/.claude/skills/diagnosing-bugs/SKILL.md +138 -0
- package/.claude/skills/diagnosing-bugs/agents/openai.yaml +3 -0
- package/.claude/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +44 -0
- package/.claude/skills/emil-design-eng/SKILL.md +675 -0
- package/.claude/skills/emil-design-eng/agents/openai.yaml +5 -0
- package/.claude/skills/find-animation-opportunities/SKILL.md +141 -0
- package/.claude/skills/find-animation-opportunities/agents/openai.yaml +5 -0
- package/.claude/skills/graphify/.graphify_version +1 -0
- package/.claude/skills/graphify/SKILL.md +742 -0
- package/.claude/skills/graphify/agents/openai.yaml +3 -0
- package/.claude/skills/graphify/references/add-watch.md +56 -0
- package/.claude/skills/graphify/references/exports.md +91 -0
- package/.claude/skills/graphify/references/extraction-spec.md +70 -0
- package/.claude/skills/graphify/references/github-and-merge.md +46 -0
- package/.claude/skills/graphify/references/hooks.md +33 -0
- package/.claude/skills/graphify/references/query.md +317 -0
- package/.claude/skills/graphify/references/transcribe.md +52 -0
- package/.claude/skills/graphify/references/update.md +221 -0
- package/.claude/skills/grill-me/SKILL.md +7 -0
- package/.claude/skills/grill-me/agents/openai.yaml +5 -0
- package/.claude/skills/grill-with-docs/SKILL.md +64 -0
- package/.claude/skills/grill-with-docs/agents/openai.yaml +5 -0
- package/.claude/skills/grilling/SKILL.md +30 -0
- package/.claude/skills/grilling/agents/openai.yaml +3 -0
- package/.claude/skills/handoff/SKILL.md +28 -0
- package/.claude/skills/handoff/agents/openai.yaml +5 -0
- package/.claude/skills/impeccable/SKILL.md +89 -0
- package/.claude/skills/impeccable/agents/openai.yaml +5 -0
- package/.claude/skills/impeccable/reference/adapt.md +318 -0
- package/.claude/skills/impeccable/reference/adapt.native.md +58 -0
- package/.claude/skills/impeccable/reference/android.md +46 -0
- package/.claude/skills/impeccable/reference/animate.md +89 -0
- package/.claude/skills/impeccable/reference/audit.md +137 -0
- package/.claude/skills/impeccable/reference/audit.native.md +139 -0
- package/.claude/skills/impeccable/reference/bolder.md +33 -0
- package/.claude/skills/impeccable/reference/clarify.md +94 -0
- package/.claude/skills/impeccable/reference/colorize.md +86 -0
- package/.claude/skills/impeccable/reference/component-review.md +63 -0
- package/.claude/skills/impeccable/reference/craft-floor.md +44 -0
- package/.claude/skills/impeccable/reference/craft.md +5 -0
- package/.claude/skills/impeccable/reference/critique.md +809 -0
- package/.claude/skills/impeccable/reference/degraded/asset-producer.md +42 -0
- package/.claude/skills/impeccable/reference/degraded/documenter.md +24 -0
- package/.claude/skills/impeccable/reference/degraded/finish-reviewer.md +38 -0
- package/.claude/skills/impeccable/reference/degraded/manual-edit-applier.md +92 -0
- package/.claude/skills/impeccable/reference/delight.md +70 -0
- package/.claude/skills/impeccable/reference/distill.md +111 -0
- package/.claude/skills/impeccable/reference/doctor.md +54 -0
- package/.claude/skills/impeccable/reference/document.md +416 -0
- package/.claude/skills/impeccable/reference/extract.md +69 -0
- package/.claude/skills/impeccable/reference/generate.md +101 -0
- package/.claude/skills/impeccable/reference/harden.md +345 -0
- package/.claude/skills/impeccable/reference/hooks.md +113 -0
- package/.claude/skills/impeccable/reference/init.md +131 -0
- package/.claude/skills/impeccable/reference/ios.md +51 -0
- package/.claude/skills/impeccable/reference/layout.md +84 -0
- package/.claude/skills/impeccable/reference/live-setup.md +104 -0
- package/.claude/skills/impeccable/reference/live.md +325 -0
- package/.claude/skills/impeccable/reference/mode-operate.md +21 -0
- package/.claude/skills/impeccable/reference/mode-persuade.md +19 -0
- package/.claude/skills/impeccable/reference/mode-read.md +21 -0
- package/.claude/skills/impeccable/reference/new-work.md +154 -0
- package/.claude/skills/impeccable/reference/onboard.md +234 -0
- package/.claude/skills/impeccable/reference/operate.md +61 -0
- package/.claude/skills/impeccable/reference/optimize.md +258 -0
- package/.claude/skills/impeccable/reference/overdrive.md +127 -0
- package/.claude/skills/impeccable/reference/polish.md +105 -0
- package/.claude/skills/impeccable/reference/quieter.md +99 -0
- package/.claude/skills/impeccable/reference/region-map.md +26 -0
- package/.claude/skills/impeccable/reference/routing.md +24 -0
- package/.claude/skills/impeccable/reference/shape.md +59 -0
- package/.claude/skills/impeccable/reference/typeset.md +80 -0
- package/.claude/skills/impeccable/reference/visualize.md +47 -0
- package/.claude/skills/impeccable/scripts/VERSION +1 -0
- package/.claude/skills/impeccable/scripts/command-metadata.json +98 -0
- package/.claude/skills/impeccable/scripts/data/font-index-failures.json +121 -0
- package/.claude/skills/impeccable/scripts/data/font-index.json +1 -0
- package/.claude/skills/impeccable/scripts/impeccable +206 -0
- package/.claude/skills/impeccable/scripts/impeccable.cmd +214 -0
- package/.claude/skills/impeccable/scripts/live-browser-dom.js +281 -0
- package/.claude/skills/impeccable/scripts/live-browser-ignores.js +242 -0
- package/.claude/skills/impeccable/scripts/live-browser-session.js +148 -0
- package/.claude/skills/impeccable/scripts/live-browser.js +13532 -0
- package/.claude/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/.claude/skills/improve-animations/AUDIT.md +115 -0
- package/.claude/skills/improve-animations/PLAN-TEMPLATE.md +73 -0
- package/.claude/skills/improve-animations/SKILL.md +110 -0
- package/.claude/skills/improve-animations/agents/openai.yaml +5 -0
- package/.claude/skills/mobile-native/SKILL.md +311 -0
- package/.claude/skills/mobile-native/agents/openai.yaml +3 -0
- package/.claude/skills/orchestrate/SKILL.md +181 -0
- package/.claude/skills/orchestrate/agents/openai.yaml +3 -0
- package/.claude/skills/pick-ui-library/SKILL.md +85 -0
- package/.claude/skills/pick-ui-library/agents/openai.yaml +5 -0
- package/.claude/skills/ponytail/SKILL.md +52 -0
- package/.claude/skills/ponytail/agents/openai.yaml +3 -0
- package/.claude/skills/ponytail-audit/SKILL.md +103 -0
- package/.claude/skills/ponytail-audit/agents/openai.yaml +3 -0
- package/.claude/skills/ponytail-debt/SKILL.md +44 -0
- package/.claude/skills/ponytail-debt/agents/openai.yaml +3 -0
- package/.claude/skills/ponytail-review/SKILL.md +101 -0
- package/.claude/skills/ponytail-review/agents/openai.yaml +3 -0
- package/.claude/skills/postgres-best-practices/SKILL.md +42 -0
- package/.claude/skills/postgres-best-practices/agents/openai.yaml +3 -0
- package/.claude/skills/postgres-best-practices/references/backup-restore.md +372 -0
- package/.claude/skills/postgres-best-practices/references/bulk-loading.md +315 -0
- package/.claude/skills/postgres-best-practices/references/connection-pooling.md +310 -0
- package/.claude/skills/postgres-best-practices/references/hot-standby.md +221 -0
- package/.claude/skills/postgres-best-practices/references/indexing.md +318 -0
- package/.claude/skills/postgres-best-practices/references/logical-replication.md +610 -0
- package/.claude/skills/postgres-best-practices/references/major-version-upgrades.md +334 -0
- package/.claude/skills/postgres-best-practices/references/performance-diagnostics.md +553 -0
- package/.claude/skills/postgres-best-practices/references/query-optimization.md +294 -0
- package/.claude/skills/postgres-best-practices/references/query-patterns.md +566 -0
- package/.claude/skills/postgres-best-practices/references/schema-design.md +362 -0
- package/.claude/skills/postgres-best-practices/references/security-roles.md +489 -0
- package/.claude/skills/postgres-best-practices/references/transaction-isolation.md +344 -0
- package/.claude/skills/project-docs/SKILL.md +330 -0
- package/.claude/skills/project-docs/agents/openai.yaml +3 -0
- package/.claude/skills/prototype/PICKER.md +197 -0
- package/.claude/skills/prototype/SKILL.md +98 -0
- package/.claude/skills/prototype/agents/openai.yaml +5 -0
- package/.claude/skills/retro/SKILL.md +43 -0
- package/.claude/skills/retro/agents/openai.yaml +5 -0
- package/.claude/skills/review/SKILL.md +74 -0
- package/.claude/skills/review/agents/openai.yaml +3 -0
- package/.claude/skills/review/references/smells.md +23 -0
- package/.claude/skills/review-animations/SKILL.md +120 -0
- package/.claude/skills/review-animations/STANDARDS.md +187 -0
- package/.claude/skills/review-animations/agents/openai.yaml +5 -0
- package/.claude/skills/tdd/SKILL.md +38 -0
- package/.claude/skills/tdd/agents/openai.yaml +3 -0
- package/.claude/skills/tdd/mocking.md +59 -0
- package/.claude/skills/tdd/tests.md +77 -0
- package/.claude/skills/triage/SKILL.md +58 -0
- package/.claude/skills/triage/agents/openai.yaml +3 -0
- package/.claude/skills/ui-ux-pro-max/SKILL.md +378 -0
- package/.claude/skills/ui-ux-pro-max/agents/openai.yaml +5 -0
- package/.claude/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/.claude/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/.claude/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/.claude/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/.claude/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/.claude/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.claude/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.claude/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/.claude/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/.claude/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.claude/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.claude/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.claude/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/.claude/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.claude/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/.claude/skills/writing-for-agents/SKILL-MECHANICS.md +22 -0
- package/.claude/skills/writing-for-agents/SKILL.md +81 -0
- package/.claude/skills/writing-for-agents/agents/openai.yaml +3 -0
- package/.worktreeinclude +3 -0
- package/AGENTS.md +44 -0
- package/README.md +14 -2
- package/VERSION +1 -0
- package/bin/agents.mjs +45 -0
- package/docs/adr/README.md +31 -0
- package/docs/brief-template.md +3 -0
- package/docs/plans/README.md +73 -0
- package/package.json +46 -4
- package/scripts/bootstrap.mjs +188 -0
- package/scripts/check-catalog.mjs +43 -0
- package/scripts/skills-update.mjs +51 -0
- package/skills-lock.json +269 -0
- package/templates/CLAUDE.project.md +41 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mobile-native
|
|
3
|
+
description: Make a web app feel native on a phone — the small CSS and meta-tag fixes that separate "a website in a browser" from something that feels installed. Covers sticky hover states, tap highlight flashes, the 100vh bug, inputs that zoom the page, laggy taps, pull-to-refresh hijacking scroll, content under the notch, long-press selecting button text, carousels that scroll the wrong way, mismatched status bars, and the rule that you test on real hardware. Use when a web app is being built for or reviewed on mobile, when something "works in Chrome but feels wrong on my phone", when building a PWA, a bottom sheet, a carousel, a full-screen layout, or any touch interaction. For motion itself use animate; for React Native use animate-expo.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Feeling Native On Mobile
|
|
7
|
+
|
|
8
|
+
## Initial Response
|
|
9
|
+
|
|
10
|
+
When this skill is first invoked without a specific question, respond only with:
|
|
11
|
+
|
|
12
|
+
> I'm ready to make your web app feel native on mobile, my knowledge comes from Emil Kowalski's design engineering philosophy.
|
|
13
|
+
|
|
14
|
+
Do not provide any other information until the user asks a question.
|
|
15
|
+
|
|
16
|
+
A fix-it skill. It does ONE thing: take a web app that feels like a website on a phone and remove, one by one, the tells that give it away. It does not design motion (that's `animate`), review motion (that's `review-animations`), or build for React Native (that's `animate-expo`). The rules here are about the platform layer — viewport, touch, scroll, safe areas, the browser chrome — where a handful of lines decide whether the app feels installed or embedded.
|
|
17
|
+
|
|
18
|
+
## Operating Posture
|
|
19
|
+
|
|
20
|
+
You are a senior design engineer who has shipped drawers, sheets, and gesture-driven UI to real phones and has been burned by every item below. You know that a desktop browser with the device toolbar on is not a phone. You know that most "the app feels janky on mobile" reports are not animation problems — they're a 300ms tap delay, a gray flash on tap, or a hover state that won't let go.
|
|
21
|
+
|
|
22
|
+
The user's phone is the source of truth. If you can't run it on hardware, say which of the fixes below you can verify from code and which need a real device.
|
|
23
|
+
|
|
24
|
+
Two failure modes, and the first is worse:
|
|
25
|
+
|
|
26
|
+
1. **Fixing what the desktop shows you.** The bugs in this skill don't reproduce in Chrome's device emulation. If you only test there, you ship all of them.
|
|
27
|
+
2. **Reaching for JavaScript when CSS or a meta tag does it.** Almost every item here is one declaration. A `useIsTouchDevice()` hook to hide hover states is the wrong tool; a media query is the right one.
|
|
28
|
+
|
|
29
|
+
## Hard Rules
|
|
30
|
+
|
|
31
|
+
1. **Every fix ships with the reason.** Each rule below has a *why*. Apply it where the why applies, not globally out of habit — `user-select: none` on body text is a defect, on a button it's correct.
|
|
32
|
+
2. **Media queries over device sniffing.** `(hover: hover)`, `(pointer: fine)`, `env()`, `dvh` — the platform tells you what it can do. Never branch on user agent strings or screen width to guess at touch.
|
|
33
|
+
3. **Touch and mouse are not exclusive.** iPads with trackpads, laptops with touchscreens, phones with a mouse. Write for both at once; gate by capability, not by device.
|
|
34
|
+
4. **Never disable zoom.** `user-scalable=no` and `maximum-scale=1` are accessibility failures. Fix the input font size instead, which is what was causing the zoom.
|
|
35
|
+
5. **Test on hardware before calling it done.** Connect the phone, open the dev server by IP, use Safari's Web Inspector or Chrome remote debugging. Emulation cannot reproduce sticky hover, tap delay, rubber-banding, safe areas, or the keyboard.
|
|
36
|
+
|
|
37
|
+
## The Symptom Table
|
|
38
|
+
|
|
39
|
+
Start here. Match what the user is seeing, then read the matching section for the why and the exact code.
|
|
40
|
+
|
|
41
|
+
| Problem | Solution |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| Hover state stuck after tap | Wrap in `@media (hover: hover) and (pointer: fine)` |
|
|
44
|
+
| Gray/blue flash on tap | Kill `-webkit-tap-highlight-color` |
|
|
45
|
+
| Layout has wrong height | `100dvh` (app) or `100svh` (hero) |
|
|
46
|
+
| Page zooms into input | Input font size 16px at the minimum |
|
|
47
|
+
| Tap feels laggy | Feedback on pointer-down + `touch-action: manipulation` |
|
|
48
|
+
| Pull-to-refresh hijacks scroll | `overscroll-behavior: none` on `html, body` |
|
|
49
|
+
| Content stops at the notch | `viewport-fit=cover` + `env(safe-area-inset-*)` |
|
|
50
|
+
| Long-press selects button text | Add `user-select: none` |
|
|
51
|
+
| Carousel scrolls vertically | `touch-action: pan-y` on the gesture surface |
|
|
52
|
+
| Status bar color doesn't match | `theme-color` per color scheme |
|
|
53
|
+
| Right in Chrome, wrong on phone | Test on real hardware |
|
|
54
|
+
|
|
55
|
+
## The Fixes
|
|
56
|
+
|
|
57
|
+
### 1. Hover state stuck after tap
|
|
58
|
+
|
|
59
|
+
Touch has no hover, so browsers fake one: the first tap on an element applies `:hover` and leaves it there until the user taps somewhere else. A button that scales up on hover stays scaled up after being tapped. Gate every hover style behind a capability query.
|
|
60
|
+
|
|
61
|
+
```css
|
|
62
|
+
@media (hover: hover) and (pointer: fine) {
|
|
63
|
+
.button:hover {
|
|
64
|
+
background: var(--gray-3);
|
|
65
|
+
transform: scale(1.02);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Both conditions matter. `(hover: hover)` means the primary input can hover. `(pointer: fine)` means it's precise, like a mouse — it rules out styluses and the odd Android device that claims hover support. In Tailwind v4 the `hover:` variant already compiles to `@media (hover: hover)`; in v3 set `future.hoverOnlyWhenSupported`.
|
|
71
|
+
|
|
72
|
+
Touch users still need press feedback. Give it to them through `:active` (see §5), which works on every input type.
|
|
73
|
+
|
|
74
|
+
### 2. Gray/blue flash on tap
|
|
75
|
+
|
|
76
|
+
iOS Safari and Android Chrome paint a translucent highlight over any tapped element that has a click handler. It's the single loudest "this is a website" signal, and it fights whatever press feedback you designed.
|
|
77
|
+
|
|
78
|
+
```css
|
|
79
|
+
html {
|
|
80
|
+
-webkit-tap-highlight-color: transparent;
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Set it once, globally. Then make sure every tappable element has its own `:active` state, because you've just removed the only feedback the browser was giving.
|
|
85
|
+
|
|
86
|
+
### 3. Layout has the wrong height
|
|
87
|
+
|
|
88
|
+
`100vh` on mobile is the *largest* viewport — the height with the browser chrome collapsed. On page load the URL bar is visible, so a `100vh` element overflows by the height of that bar, and a bottom-pinned button sits under it. Use the dynamic and small units instead:
|
|
89
|
+
|
|
90
|
+
```css
|
|
91
|
+
/* App shell, drawers, anything that should track the visible area as chrome shows/hides */
|
|
92
|
+
.app { height: 100dvh; }
|
|
93
|
+
|
|
94
|
+
/* Heroes and first screens — the smallest the viewport gets, so nothing is ever cut off */
|
|
95
|
+
.hero { min-height: 100svh; }
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`dvh` resizes as the URL bar collapses, which is right for an app shell but causes layout shifts on marketing content mid-scroll. `svh` is stable and never overflows, which is right for a hero. `lvh` is the old `vh` — you almost never want it. Keep a `100vh` fallback line above for old browsers only if the project's support matrix demands it.
|
|
99
|
+
|
|
100
|
+
### 4. Page zooms into the input
|
|
101
|
+
|
|
102
|
+
iOS Safari zooms the page when focus lands on an input whose font size is under 16px, and it does not zoom back out on blur. The user is left looking at a cropped, drifted layout. This is the reason people reach for `maximum-scale=1`, which is the wrong fix (Hard Rule 4).
|
|
103
|
+
|
|
104
|
+
```css
|
|
105
|
+
input, textarea, select {
|
|
106
|
+
font-size: 16px; /* the minimum; 1rem at the default root size */
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
If the design calls for smaller text in inputs on desktop, scale it up only where it matters:
|
|
111
|
+
|
|
112
|
+
```css
|
|
113
|
+
@media (pointer: coarse) {
|
|
114
|
+
input, textarea, select { font-size: 16px; }
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
While you're in the inputs, set the keyboard: `inputmode="numeric"` for codes, `inputmode="decimal"` for amounts, `type="email"` and `type="tel"` for their fields, `autocapitalize="none"` and `autocorrect="off"` on usernames and codes, `enterkeyhint="send"` / `"search"` / `"done"` so the return key says what it does.
|
|
119
|
+
|
|
120
|
+
### 5. Tap feels laggy
|
|
121
|
+
|
|
122
|
+
Two separate causes stack here.
|
|
123
|
+
|
|
124
|
+
**The 300ms click delay.** Browsers wait after a tap to see whether a second tap is coming, because double-tap zooms. Modern browsers skip the wait when the viewport is `width=device-width`, but not in every case (iOS Safari still delays on some elements). `touch-action: manipulation` tells the browser this element never double-tap-zooms, so it fires `click` immediately:
|
|
125
|
+
|
|
126
|
+
```css
|
|
127
|
+
button, a, [role="button"], .tappable {
|
|
128
|
+
touch-action: manipulation;
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**Feedback on release instead of press.** Native buttons respond the instant your finger lands. A web button that only changes on `click` responds when your finger *leaves*, which reads as lag even at 0ms. Style `:active`, and if you need JavaScript, listen to `pointerdown`, not `click`:
|
|
133
|
+
|
|
134
|
+
```css
|
|
135
|
+
.button {
|
|
136
|
+
transition: transform 100ms var(--ease-out), background 100ms;
|
|
137
|
+
}
|
|
138
|
+
.button:active {
|
|
139
|
+
transform: scale(0.97);
|
|
140
|
+
background: var(--gray-4);
|
|
141
|
+
}
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Keep press feedback at 100–160ms and `ease-out`. If the codebase uses the `animate` skill's tokens, use them; don't fork a new curve.
|
|
145
|
+
|
|
146
|
+
### 6. Pull-to-refresh hijacks scroll
|
|
147
|
+
|
|
148
|
+
Scrolling past the top of the page triggers pull-to-refresh on Android Chrome and the whole-page rubber band on iOS. Fine on a document. Wrong in an app with its own scroll containers, a drawer the user drags down, or a canvas.
|
|
149
|
+
|
|
150
|
+
```css
|
|
151
|
+
html, body {
|
|
152
|
+
overscroll-behavior: none;
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Then, on any inner scrollable — a sheet's content, a chat list, a sidebar — stop scroll from chaining to the page when it hits the end:
|
|
157
|
+
|
|
158
|
+
```css
|
|
159
|
+
.sheet-content {
|
|
160
|
+
overflow-y: auto;
|
|
161
|
+
overscroll-behavior: contain;
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
`contain` keeps the container's own bounce (which feels native) but stops the page behind it from moving. Use `none` on the root, `contain` on children. Never reach for a `touchmove` + `preventDefault()` listener for this — it blocks scrolling entirely and makes the listener non-passive, which costs frames.
|
|
166
|
+
|
|
167
|
+
### 7. Content stops at the notch
|
|
168
|
+
|
|
169
|
+
By default the browser letterboxes your page inside the safe area, leaving the notch, Dynamic Island, and home-indicator zones the body's background color. A native app paints edge to edge and pads its *content* away from those zones. Two steps:
|
|
170
|
+
|
|
171
|
+
```html
|
|
172
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
```css
|
|
176
|
+
.app-header {
|
|
177
|
+
padding-top: env(safe-area-inset-top);
|
|
178
|
+
}
|
|
179
|
+
.bottom-bar {
|
|
180
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
181
|
+
}
|
|
182
|
+
.sheet {
|
|
183
|
+
padding-bottom: calc(1rem + env(safe-area-inset-bottom));
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
`viewport-fit=cover` lets the page under the notch; `env(safe-area-inset-*)` gives you the insets to pad back out. Without the meta tag the `env()` values are all `0px`. Fixed headers, bottom tab bars, toasts, and sheets are the elements that need this; normal page content usually gets it for free through the header's padding. Give `env()` a fallback (`env(safe-area-inset-bottom, 0px)`) when the value is used in a calc.
|
|
188
|
+
|
|
189
|
+
### 8. Long-press selects button text
|
|
190
|
+
|
|
191
|
+
Hold a finger on a web button and iOS selects its label, or pops the copy/share callout on a link. Native controls never do that. Text that is a *control* shouldn't be selectable; text that is *content* must stay selectable.
|
|
192
|
+
|
|
193
|
+
```css
|
|
194
|
+
button, [role="button"], .tab, .chip, .drag-handle {
|
|
195
|
+
user-select: none;
|
|
196
|
+
-webkit-user-select: none; /* Safari still needs the prefix */
|
|
197
|
+
-webkit-touch-callout: none; /* no long-press callout on links/images used as controls */
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Never put `user-select: none` on `body`. Users copy addresses, error messages, and order numbers; that is content.
|
|
202
|
+
|
|
203
|
+
### 9. Carousel scrolls vertically
|
|
204
|
+
|
|
205
|
+
A horizontal swipe on a carousel is ambiguous to the browser — it doesn't know whether you're scrolling the page or the track, so it guesses, and the guess is often the page jittering up while the carousel moves. Tell it which axes the element owns:
|
|
206
|
+
|
|
207
|
+
```css
|
|
208
|
+
.carousel {
|
|
209
|
+
touch-action: pan-y; /* the carousel handles horizontal; the browser keeps vertical */
|
|
210
|
+
}
|
|
211
|
+
.drag-surface {
|
|
212
|
+
touch-action: none; /* a custom gesture (a drag-to-dismiss sheet, a slider) owns every axis */
|
|
213
|
+
}
|
|
214
|
+
.vertical-sheet-handle {
|
|
215
|
+
touch-action: pan-x; /* the sheet handles vertical drags; horizontal stays with the browser */
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
The values name what the *browser* may still do. `pan-y` on a horizontal carousel means "browser, you keep vertical panning; I'm handling horizontal". `none` means the element handles everything — use it only on elements that really do, or the user won't be able to scroll past them.
|
|
220
|
+
|
|
221
|
+
If the carousel is native scroll rather than a JS gesture, prefer `scroll-snap-type: x mandatory` on the track and `scroll-snap-align: start` on slides — the browser's own physics beat a hand-rolled spring, and `touch-action` becomes unnecessary.
|
|
222
|
+
|
|
223
|
+
### 10. Status bar color doesn't match
|
|
224
|
+
|
|
225
|
+
The status bar and the browser chrome take their color from `theme-color`. One value means light mode gets a dark bar or dark mode gets a white one. Give each scheme its own:
|
|
226
|
+
|
|
227
|
+
```html
|
|
228
|
+
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff" />
|
|
229
|
+
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0a0a0a" />
|
|
230
|
+
<meta name="color-scheme" content="light dark" />
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Match the value to the color at the very top of your page — the header background, not the brand color. In Next.js set it through the `viewport` export (`themeColor: [{ media, color }]`). If the app switches theme with a class rather than the OS setting, update the tag from JavaScript on toggle. For an installed PWA, `apple-mobile-web-app-status-bar-style` and the manifest's `theme_color`/`background_color` are the same decision.
|
|
234
|
+
|
|
235
|
+
### 11. Right in Chrome, wrong on phone
|
|
236
|
+
|
|
237
|
+
Nothing above reproduces in device emulation. Sticky hover, the tap highlight, the URL bar's effect on `vh`, input zoom, the click delay, overscroll, safe areas, the software keyboard — every one is a real-hardware behavior.
|
|
238
|
+
|
|
239
|
+
- Connect the phone over USB, run the dev server on `0.0.0.0`, open it by the machine's LAN IP.
|
|
240
|
+
- iOS: Safari → Develop → the device. Android: `chrome://inspect`.
|
|
241
|
+
- Test on a phone that's a few years old, not the newest one on your desk. Test with the keyboard open. Test in landscape once.
|
|
242
|
+
- Test as an installed PWA if that's a target; standalone mode changes viewport, safe areas, and status bar behavior.
|
|
243
|
+
|
|
244
|
+
The Xcode Simulator is a step up from emulation but still misses touch feel. Real hardware is the bar.
|
|
245
|
+
|
|
246
|
+
## Baseline
|
|
247
|
+
|
|
248
|
+
When starting a mobile-facing app, this is the floor. Ship it before the first component:
|
|
249
|
+
|
|
250
|
+
```html
|
|
251
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, interactive-widget=resizes-content" />
|
|
252
|
+
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#ffffff" />
|
|
253
|
+
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0a0a0a" />
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
```css
|
|
257
|
+
html {
|
|
258
|
+
-webkit-tap-highlight-color: transparent;
|
|
259
|
+
-webkit-text-size-adjust: 100%; /* no font inflation in landscape */
|
|
260
|
+
overscroll-behavior: none;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
input, textarea, select {
|
|
264
|
+
font-size: 16px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
button, a, [role="button"] {
|
|
268
|
+
touch-action: manipulation;
|
|
269
|
+
user-select: none;
|
|
270
|
+
-webkit-user-select: none;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
@media (hover: hover) and (pointer: fine) {
|
|
274
|
+
/* all :hover rules live here */
|
|
275
|
+
}
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
`interactive-widget=resizes-content` makes the software keyboard shrink the layout viewport on Android Chrome, so `100dvh` and bottom-pinned inputs react to it the way they do on iOS. Drop `overscroll-behavior: none` from `html` if the app is a scrolling document where pull-to-refresh is welcome.
|
|
279
|
+
|
|
280
|
+
## Never Ship
|
|
281
|
+
|
|
282
|
+
Self-check before you finish.
|
|
283
|
+
|
|
284
|
+
| Never | Instead |
|
|
285
|
+
| --- | --- |
|
|
286
|
+
| `user-scalable=no` or `maximum-scale=1` | 16px inputs — fix the cause |
|
|
287
|
+
| Ungated `:hover` | `@media (hover: hover) and (pointer: fine)` |
|
|
288
|
+
| `100vh` for an app shell or bottom-pinned UI | `100dvh` |
|
|
289
|
+
| `100dvh` on a marketing hero | `100svh` (no layout shift on scroll) |
|
|
290
|
+
| Press feedback on `click` only | `:active` / `pointerdown` |
|
|
291
|
+
| `touchmove` + `preventDefault()` to stop overscroll | `overscroll-behavior` |
|
|
292
|
+
| `user-select: none` on `body` | Only on controls |
|
|
293
|
+
| `touch-action: none` on something the user needs to scroll past | `pan-x` / `pan-y` |
|
|
294
|
+
| `env(safe-area-inset-*)` without `viewport-fit=cover` | Add the meta tag or the value is `0` |
|
|
295
|
+
| One `theme-color` for both schemes | One per `prefers-color-scheme` |
|
|
296
|
+
| User-agent sniffing to detect touch | `(hover)` / `(pointer)` media queries |
|
|
297
|
+
| Declaring it fixed from device emulation | Real hardware |
|
|
298
|
+
|
|
299
|
+
## Output
|
|
300
|
+
|
|
301
|
+
Apply the fixes. Then, in at most a few lines:
|
|
302
|
+
|
|
303
|
+
- **What was wrong** — the symptom matched from the table, and the one-line why.
|
|
304
|
+
- **What changed** — file and declaration, one line each.
|
|
305
|
+
- **What needs a phone** — which fixes you could verify from code and which the user must confirm on hardware.
|
|
306
|
+
|
|
307
|
+
Don't pad this into a report. The code is the deliverable.
|
|
308
|
+
|
|
309
|
+
## Tone
|
|
310
|
+
|
|
311
|
+
Opinionated and brief. Most of these are one line; say the line and the reason and move on. When the honest answer is "I can't verify this without a device," say that instead of claiming it's fixed.
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: orchestrate
|
|
3
|
+
description: Orchestrator playbook - classify work as S/M/L, open the task worktree, grill, plan and break the plan into tickets, brief one implementer per ticket, integrate, verify and commit. Use at the start of any task that may involve more than one file or scope.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Orchestrate
|
|
7
|
+
|
|
8
|
+
You are the parent orchestrator. You classify, grill, plan, brief, delegate, integrate and report. Subagents cannot see this chat; every delegation goes through skill `brief`.
|
|
9
|
+
|
|
10
|
+
## Hard rule
|
|
11
|
+
|
|
12
|
+
- You never call Edit, Write or NotebookEdit on code, and you never run lint, build or test yourself.
|
|
13
|
+
- Allowed writes: `docs/plans/**`, `docs/adr/**`, `GLOSSARY.md`, and git integration commands (merge, apply, commit) per rule `git-workflow`.
|
|
14
|
+
- `.claude/agent-memory/**` belongs to the agents, not to you.
|
|
15
|
+
- About to edit code or run a check? Stop and dispatch `/quick` or an implementer.
|
|
16
|
+
- Hook `orchestrator-guard` blocks main-session edits outside `docs/plans/`, `docs/adr/`, `docs/README.md`, `.claude/` and root `*.md`.
|
|
17
|
+
|
|
18
|
+
## The flow
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
S: classify -> worktree -> /quick -> commit
|
|
22
|
+
M: classify -> worktree -> grill (if a decision is open) -> /product -> tickets -> implementer per ticket -> /verifier -> commit
|
|
23
|
+
L: classify -> worktree -> grill -> /product -> /architect -> tickets -> implementers on the frontier -> integrate -> /architect -> /verifier -> /security on trigger -> commit
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 1. Classify
|
|
27
|
+
|
|
28
|
+
| Size | Signal | Do |
|
|
29
|
+
|------|--------|----|
|
|
30
|
+
| S | 1 file, diff describable in 1 sentence, no cross-module flow change | `/quick` with the short brief. No grill, product or verifier. |
|
|
31
|
+
| M | 1-2 scopes, paths known | Grill only if a decision is open. `/product` plan with tickets, one implementer per ticket in the task worktree, then `/verifier`. |
|
|
32
|
+
| L | 3+ scopes, or any architecture trigger | Grill. `/product` -> `/architect` -> tickets -> implementers (parallel on the frontier) -> integrate -> `/architect` again -> `/verifier` -> `/security` on trigger. |
|
|
33
|
+
|
|
34
|
+
S: the Stop hook (lint + test) is the DoD. `/quick` returns `escalate to M` -> reclassify and continue as M.
|
|
35
|
+
|
|
36
|
+
Architecture triggers: new domain, integration, storage/ownership, sync/async flow, retry/timeout/fallback, regulatory/ops impact.
|
|
37
|
+
Security triggers: auth, secrets, PII, payments, public routes.
|
|
38
|
+
|
|
39
|
+
Raw report (a pasted error, a support message, a ticket nobody shaped yet): call the Skill tool with "triage" first; its Brief is what you classify. Bug entry: a bug report is classified like any work, with one extra rule. Known cause and a one-file fix: S. Unknown cause: the first ticket is the diagnosis, run by the owning implementer through `diagnosing-bugs` (a loop that goes red on this bug before any hypothesis); the fix with its regression test at the seam is the second ticket. `/verifier` checks that the regression test exists, or that the missing seam is recorded as a finding.
|
|
40
|
+
|
|
41
|
+
## 2. Worktree
|
|
42
|
+
|
|
43
|
+
One task worktree per affected repo, inside that repo, never `git checkout` in the shared cwd (other sessions use it).
|
|
44
|
+
|
|
45
|
+
1. Branch: `type/sc-<number>` with a ticket id, else `type/<short-slug>`; `type` in `feat|fix|chore|docs|refactor|test|ci`. Worktree slug = branch with `/` -> `-`.
|
|
46
|
+
2. `git status --short`: unrelated uncommitted work the task would need -> stop and ask. Never stash or discard.
|
|
47
|
+
3. Default branch: `git symbolic-ref --short refs/remotes/origin/HEAD` (strip `origin/`), fallback `main`.
|
|
48
|
+
4. `git fetch origin && git worktree add .claude/worktrees/<slug> -b <branch> origin/<default>`. Branch exists: `git worktree add .claude/worktrees/<slug> <branch>`. Worktree exists (`git worktree list`): reuse it.
|
|
49
|
+
5. Copy the files listed in `.worktreeinclude` (`.env`, `graphify-out/`, ...) into the worktree if missing there. Never stage them.
|
|
50
|
+
6. Move the session in: `EnterWorktree` when available, otherwise tell the user to run `claude -w <slug>` and stop.
|
|
51
|
+
7. Create `docs/plans/<task>.md` from `docs/plans/README.md` with title, ticket, size and `Status: draft`. The rest comes from `/product`.
|
|
52
|
+
|
|
53
|
+
## 3. Grill (main session, with the user)
|
|
54
|
+
|
|
55
|
+
- L: always. M: when two competent implementers could build different things from the request. S: never.
|
|
56
|
+
- Call the Skill tool with "grilling". Rounds over the design tree, every question with a recommended answer; facts come from the code or a sub-agent, decisions from the user.
|
|
57
|
+
- While it runs, write what `grill-with-docs` writes: settled terms into `GLOSSARY.md`, hard-to-reverse decisions as `Proposed` ADRs in `docs/adr/` (template in `docs/adr/README.md`). The user may start the same thing with `/grill-with-docs`.
|
|
58
|
+
- Close with the decisions block (Decisions / Deferred / Out of scope / Plan changes) and apply it to the plan. Decisions that meet an architecture trigger go to `/architect`, not silently into the plan.
|
|
59
|
+
|
|
60
|
+
## 4. Plan
|
|
61
|
+
|
|
62
|
+
- Dispatch `/product` (skill `brief`) with the request, the ticket, the decisions block and the plan path. It returns the plan: objective, scope, stories, AC, decisions, test seams, tickets, DoR, open questions. Write it to `docs/plans/<task>.md`.
|
|
63
|
+
- Open questions -> ask the user before any ticket is briefed. Answers go into the plan; a changed decision goes back through grill, not around it.
|
|
64
|
+
- L, or any architecture trigger: `/architect` on the plan. ADR proposal into Decisions, constraints into the affected tickets.
|
|
65
|
+
- **Ticket gate.** Show the user the Tickets table as a numbered list (title, what it delivers, blocked by, agent) and ask three things: is the granularity right (too coarse, too fine), does each ticket depend only on what truly gates it, should any be merged or split. Iterate until approved; approved edits go into the plan. M with a single ticket: state it in one line and continue unless the user objects. No brief leaves before this gate. If the user is away, say which breakdown you took and proceed; a disagreement later costs one re-brief, not the plan.
|
|
66
|
+
- Ready gate: objective, AC, context, dependencies, seams and tickets filled. Any gap: no delegation.
|
|
67
|
+
|
|
68
|
+
## 5. Tickets
|
|
69
|
+
|
|
70
|
+
The plan's Tickets table is the work. One ticket = one tracer bullet = one brief = one agent = one context window.
|
|
71
|
+
|
|
72
|
+
- A ticket cuts a complete vertical path (schema, API, UI, tests) and is demoable alone. Horizontal slices (all schema, then all API) are not tickets.
|
|
73
|
+
- `Blocked by` edges define the **frontier**: every ticket whose blockers are done. Work the frontier; nothing else.
|
|
74
|
+
- Parallel only when frontier tickets have disjoint paths. Shared files -> sequential.
|
|
75
|
+
- Each brief carries the ticket (title, delivers, AC, seams, paths), the decisions that bind it, and the DoD. Never "read the plan"; paste what the ticket needs.
|
|
76
|
+
- A ticket that turns out bigger than one context window goes back to `/product` to split, not to a second implementer.
|
|
77
|
+
|
|
78
|
+
## 6. Roster
|
|
79
|
+
|
|
80
|
+
| Agent | Use for | Mode |
|
|
81
|
+
|-------|---------|------|
|
|
82
|
+
| `/quick` | S work: one file, one-sentence diff; short brief | writes, opus high |
|
|
83
|
+
| `/product` | plan: scope, stories, AC, decisions, test seams, tickets, DoR | readonly, opus xhigh |
|
|
84
|
+
| `/architect` | boundaries, ownership, contracts, failure modes; verdict proceed/constraints/stop; ADR proposal | readonly, opus xhigh |
|
|
85
|
+
| `/api` | server-side: APIs, domain, persistence, workers, tests (skills arch-api, arch-db, tdd) | writes, opus high |
|
|
86
|
+
| `/web` | Next.js app code (skills arch-web, tdd); consumes the design system | writes, opus high |
|
|
87
|
+
| `/app` | React Native/Expo app code (skills arch-app, tdd) | writes, opus high |
|
|
88
|
+
| `/infra` | Terraform, CI, deploy, observability, database provisioning/pooling (arch-db); never apply | writes, opus high |
|
|
89
|
+
| `/ui` | design system, tokens, components, DESIGN.md, motion, a11y | writes, opus high |
|
|
90
|
+
| `/verifier` | fresh-context check of diff vs plan: Spec axis then Standards axis; runs lint/build/test | no edits, opus high |
|
|
91
|
+
| `/security` | auth, secrets, PII, payments, public routes; severity report | readonly, opus xhigh |
|
|
92
|
+
|
|
93
|
+
Readonly agents are enforced by the `readonly-guard` hook. Implementers run `tdd` at the seams the plan lists and `diagnosing-bugs` on bugs without a known cause.
|
|
94
|
+
|
|
95
|
+
## 7. Dispatch discipline
|
|
96
|
+
|
|
97
|
+
- Set `model` and `effort` explicitly on every Agent call, per the roster.
|
|
98
|
+
- Curated brief: exact paths and a digest of what you already know. Never "read the repo".
|
|
99
|
+
- Flat orchestration only: no agent spawns agents (spawn depth is 1).
|
|
100
|
+
- At most 5 agents in flight.
|
|
101
|
+
- `/verifier` at most 2 rounds per task, then report to the user.
|
|
102
|
+
- After 10 dispatches in one task, pause and summarize cost and progress to the user before continuing.
|
|
103
|
+
|
|
104
|
+
## 8. Isolation per spawn
|
|
105
|
+
|
|
106
|
+
Decided per spawn, not in agent frontmatter.
|
|
107
|
+
|
|
108
|
+
- Sequential or single-scope work (all S and M, dependent L tickets): spawn without isolation. Brief: `Worktree: <task-wt>`, `Base ref: <task-wt HEAD>`, `Commit: no`. The implementer leaves changes uncommitted; you review the diff and commit before the next ticket.
|
|
109
|
+
- Parallel frontier tickets with disjoint paths (L): spawn each with Agent `isolation: "worktree"`. `worktree.baseRef: head` branches from the task worktree HEAD, so commit pending task-worktree changes first. Brief: `Commit: yes`, `Base ref: <task-wt HEAD sha>`. The implementer commits on its own branch with scoped `git add <paths>` and returns branch and worktree path.
|
|
110
|
+
- L: 3-5 implementers at most. Each extra agent costs context and merge effort.
|
|
111
|
+
- Gaps returned by `/web` or `/app` for tokens/components go to `/ui`, then back.
|
|
112
|
+
- Implementer stops for a new boundary/table/integration -> run `/architect`, then resume.
|
|
113
|
+
|
|
114
|
+
## 9. Integrate parallel worktrees
|
|
115
|
+
|
|
116
|
+
After every parallel batch, before any verifier or next ticket.
|
|
117
|
+
|
|
118
|
+
1. Per returned branch: `git -C <impl-wt> log --oneline <base>..HEAD` and `git -C <impl-wt> status --porcelain`. Uncommitted leftovers or an empty log -> send back with a new brief.
|
|
119
|
+
2. `git -C <task-wt> merge --no-ff <branch>`.
|
|
120
|
+
3. Noisy merge (unrelated history, generated files): `git -C <task-wt> merge --abort`, then `git -C <impl-wt> diff <base>...HEAD | git -C <task-wt> apply --3way`.
|
|
121
|
+
4. Conflicts: never resolve them yourself. Dispatch the owning implementer with `Worktree: <task-wt>`, `Commit: no`, the conflicted paths, and lint/build/test in its DoD.
|
|
122
|
+
5. Commit per rule `git-workflow`. One integration commit per batch when using `apply`.
|
|
123
|
+
6. Mark the tickets done in the plan, recompute the frontier, continue.
|
|
124
|
+
|
|
125
|
+
## 10. Verify
|
|
126
|
+
|
|
127
|
+
- `/verifier` only after integration into the task worktree. Pass only: `Worktree: <task-wt>`, `Base ref: <task base sha>`, the DoD and the plan path. No implementation narrative.
|
|
128
|
+
- It reports two axes separately: Spec (AC, seams, DoD) and Standards (rules, smells, quality). Blocked on either -> findings back to the owning implementer with a new brief. Second Blocked -> stop and report to the user.
|
|
129
|
+
- Security trigger -> `/security` before the final commit. Critical/High must be fixed or explicitly accepted by the user.
|
|
130
|
+
|
|
131
|
+
## 11. ADR (L with an architecture decision)
|
|
132
|
+
|
|
133
|
+
- After the first `/architect` pass, write its ADR proposal into `docs/plans/<task>.md` under Decisions.
|
|
134
|
+
- At DoD, create `docs/adr/NNNN-<slug>.md` from that proposal (template in `docs/adr/README.md`) in the same diff. Grill ADRs already written as `Proposed` become `Accepted` here. This is a docs write and is yours.
|
|
135
|
+
|
|
136
|
+
## 12. Commit
|
|
137
|
+
|
|
138
|
+
- Lint/build/test evidence comes from the implementer and `/verifier` returns, not from your own runs.
|
|
139
|
+
- Commit per rule `git-workflow`: explicit paths, conventional commit, HEREDOC message. No push, no PR, no ticket writes.
|
|
140
|
+
- Update `docs/plans/<task>.md` (`Status: done` when finished).
|
|
141
|
+
|
|
142
|
+
## 13. Report to the user
|
|
143
|
+
|
|
144
|
+
- What changed and why (short), commands run by agents with result, residual risk, open questions.
|
|
145
|
+
- Merge danger: one-way or two-way door, and blast radius in one line.
|
|
146
|
+
- Delivery diagram (Mermaid) when the flow between modules/services/events changed, per rule `delivery-diagram`.
|
|
147
|
+
- Retro: after an L task, after any `/verifier` Blocked, or when the user asks, call the Skill tool with "retro" and route each finding to its home: a mechanical mistake becomes a hook in `.claude/hooks/`, a lint rule or a CI job; a judgement call becomes a line in `.claude/rules/` or in `arch-*/references/review.md`; a navigation gap becomes a pointer in `CLAUDE.md`; a token-expensive habit becomes a line in skill `brief`. Record the change in `CHANGELOG.md`.
|
|
148
|
+
|
|
149
|
+
## 14. Context and phase boundaries
|
|
150
|
+
|
|
151
|
+
Your context is the scarcest resource in the task: the plan file is durable, your window is not. Hook `context-budget` measures the live context after every tool call (`input + cache_creation + cache_read` of the last response) and warns once per band; `autoCompactWindow` in `settings.json` compacts at 120k whether you are ready or not.
|
|
152
|
+
|
|
153
|
+
| Band | Tokens | What it means |
|
|
154
|
+
|------|--------|---------------|
|
|
155
|
+
| focus | < 60k | Normal. Nothing to do. |
|
|
156
|
+
| review | 60k-90k | Past the focus zone. Stop reading anything yourself; returns from agents stay under 2k; plan the next boundary. |
|
|
157
|
+
| boundary | 90k-110k | Compact at the next phase boundary, not mid-ticket. |
|
|
158
|
+
| compact | > 110k | Update Session state and `/compact` now; the automatic one at 120k keeps the default summary, not yours. |
|
|
159
|
+
|
|
160
|
+
A **phase boundary** is the gap after grill, after the ticket gate, after each ticket is integrated, and after `/verifier`. Mid-phase there is no decision: continue, or split what is left into subagents. At a boundary, take the first yes:
|
|
161
|
+
|
|
162
|
+
1. **Continue** when the next phase needs this one verbatim (grill -> plan is the standard case) and there is room for it. Costs nothing, loses nothing.
|
|
163
|
+
2. **`/clear`** when nothing in the window matters to what comes next (the plan already holds it). Cheapest move; one-way, so be sure.
|
|
164
|
+
3. **`/handoff`** only when the work travels: another harness (Cursor, Codex), another repo or worktree, a colleague, or a parallel session of your own. Skill `handoff` writes `.claude/handoffs/<task>-<stamp>.md`.
|
|
165
|
+
4. **Subagent** when the next chunk can run without you steering it: that is every ticket, every verification, every research question. Your window stays untouched.
|
|
166
|
+
5. **`/compact`** otherwise: relevant context, same repo, you stay in the loop. The default at the bottom, not the first reach.
|
|
167
|
+
|
|
168
|
+
Before any compact, manual or imminent:
|
|
169
|
+
|
|
170
|
+
1. Update `## Session state` in `docs/plans/<task>.md`: worktree, branch, base ref, frontier (next ticket), files touched, last commands and errors, where you stopped, open questions. Mark landed tickets done. The post-compact hook re-injects the plan, so whatever is in it survives; whatever is only in the window does not.
|
|
171
|
+
2. Run `/compact keep decisions, ticket status, files changed, errors seen and the next step; drop file contents and tool output already reflected in docs/plans/<task>.md`. The `# Compact instructions` section in `CLAUDE.md` says the same, so the automatic compaction follows it too.
|
|
172
|
+
|
|
173
|
+
Hygiene that keeps you out of the upper bands: never read code yourself (agents do, and return a digest); brief by pointer to the plan and the ticket, never by pasting files; ask for returns under 2k tokens; one `/verifier` round per integration; S work in `/quick`, never in your window.
|
|
174
|
+
|
|
175
|
+
## It's working if
|
|
176
|
+
|
|
177
|
+
- Every code change in the task was made by an agent with a brief; your own writes are only under `docs/plans/`, `docs/adr/` and `GLOSSARY.md`.
|
|
178
|
+
- The plan's Tickets table matches what was built, and the user saw and approved it before the first brief.
|
|
179
|
+
- `/verifier` ran on the integrated worktree and its evidence (commands, output) is in the report; none of it is yours.
|
|
180
|
+
- The window never crossed 110k tokens without a Session state update, and the final report fits on one screen.
|
|
181
|
+
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pick-ui-library
|
|
3
|
+
description: Pick the right library for a given frontend task from a curated, opinionated list — numbers, OTP inputs, charts, command menus, virtualization, drag and drop, toasts, state, styling, and more. Only runs when explicitly invoked; it does not trigger on its own.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Picking The Right Library
|
|
8
|
+
|
|
9
|
+
## Initial Response
|
|
10
|
+
|
|
11
|
+
When this skill is first invoked without a specific question, respond only with:
|
|
12
|
+
|
|
13
|
+
> I'm ready to pick the right library for your task, my picks come from Emil Kowalski's curated list.
|
|
14
|
+
|
|
15
|
+
Do not provide any other information until the user asks a question.
|
|
16
|
+
|
|
17
|
+
A lookup skill. When invoked with a task ("I need toasts", "what should I use for drag and drop?"), match the task to the curated list below and recommend the library. These are deliberate, taste-driven picks — don't substitute alternatives outside this list unless the user asks for one or the task genuinely isn't covered.
|
|
18
|
+
|
|
19
|
+
## How to use this
|
|
20
|
+
|
|
21
|
+
1. **Identify the task**, not the library the user named. "I need to show a dropdown" is a UI-primitives task (base-ui), even if they asked about something else.
|
|
22
|
+
2. **Check what's already installed.** Look at `package.json` first. If the project already uses a listed library, use it. If it uses a competitor (e.g. react-window instead of Virtuoso), flag the recommendation but don't churn the dependency without being asked.
|
|
23
|
+
3. **Recommend one library**, state what it's for in one sentence, and install/wire it up if that's part of the request. Don't present a menu of options when the list has a clear answer.
|
|
24
|
+
4. If the task isn't covered by the list, say so explicitly and recommend from your own knowledge — but be clear you've left the curated list.
|
|
25
|
+
|
|
26
|
+
## The list
|
|
27
|
+
|
|
28
|
+
### UI components & primitives
|
|
29
|
+
|
|
30
|
+
| Task | Library |
|
|
31
|
+
| --- | --- |
|
|
32
|
+
| Unstyled, accessible UI components (dialogs, popovers, menus, selects…) | [base-ui](https://base-ui.com) |
|
|
33
|
+
| Command menus (⌘K palettes) | [cmdk](https://cmdk.paco.me) |
|
|
34
|
+
| Toasts / notifications | [Sonner](https://sonner.emilkowal.ski) |
|
|
35
|
+
| One-time password / verification code inputs | [input-otp](https://input-otp.rodz.dev) |
|
|
36
|
+
| Customizable GUIs / control panels | [Leva](https://github.com/pmndrs/leva) — [dialkit](https://joshpuckett.me/dialkit) is an alternative |
|
|
37
|
+
|
|
38
|
+
### Motion & visuals
|
|
39
|
+
|
|
40
|
+
| Task | Library |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| General-purpose animation (springs, layout animations, enter/exit) | [motion](https://motion.dev) (Framer Motion) |
|
|
43
|
+
| Animating numbers (counters, prices, stats) | [NumberFlow](https://number-flow.barvian.me) |
|
|
44
|
+
| Animated text components | [torph](https://torph.lochie.me/) |
|
|
45
|
+
| 3D globes | [Cobe](https://cobe.vercel.app) |
|
|
46
|
+
| Dynamic OG images (HTML/CSS → SVG/PNG) | [Satori](https://github.com/vercel/satori) |
|
|
47
|
+
| Syntax highlighting | [shiki](https://shiki.style) |
|
|
48
|
+
|
|
49
|
+
Reach for motion when you need springs, layout animations, exit animations, or gesture-driven values. A simple hover or fade doesn't need it — plain CSS transitions are the right tool there.
|
|
50
|
+
|
|
51
|
+
### Charts
|
|
52
|
+
|
|
53
|
+
| Task | Library |
|
|
54
|
+
| --- | --- |
|
|
55
|
+
| Real-time / streaming charts | [Liveline](https://github.com/benjitaylor/liveline) |
|
|
56
|
+
| General charts (static or interactive dashboards) | [recharts](https://recharts.org) |
|
|
57
|
+
|
|
58
|
+
The split: if data points arrive live and the chart scrolls with time, use Liveline. Everything else is recharts.
|
|
59
|
+
|
|
60
|
+
### Interaction & performance
|
|
61
|
+
|
|
62
|
+
| Task | Library |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| Drag and drop | [dnd kit](https://dndkit.com) |
|
|
65
|
+
| Virtualization (long lists, large tables) | [Virtuoso](https://virtuoso.dev) |
|
|
66
|
+
|
|
67
|
+
### State & styling
|
|
68
|
+
|
|
69
|
+
| Task | Library |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| State management | [zustand](https://zustand.docs.pmnd.rs) |
|
|
72
|
+
| Constructing `className` strings conditionally | [clsx](https://github.com/lukeed/clsx) |
|
|
73
|
+
| Type-safe, variant-driven styling for Tailwind | [cva](https://cva.style) |
|
|
74
|
+
| Theme switching / dark mode (no flash on load) | [next-themes](https://github.com/pacocoursey/next-themes) |
|
|
75
|
+
|
|
76
|
+
The styling split: clsx for ad-hoc conditional classes; cva when a component has real variants (size, intent, state) that deserve a typed API. They compose — cva uses clsx-style inputs internally.
|
|
77
|
+
|
|
78
|
+
## Common mismatches to catch
|
|
79
|
+
|
|
80
|
+
- **Toasts built by hand or with a modal library** → Sonner exists for exactly this.
|
|
81
|
+
- **A `<div>`-based dropdown/dialog with manual focus handling** → base-ui, which handles accessibility, focus trapping, and dismissal.
|
|
82
|
+
- **Animating a number by re-rendering text** → NumberFlow handles digit transitions properly.
|
|
83
|
+
- **Rendering a 1,000+ row list directly** → Virtuoso before reaching for pagination hacks.
|
|
84
|
+
- **A `useState`-per-component web of props for shared state** → zustand.
|
|
85
|
+
- **Template-literal className ternaries three conditions deep** → clsx (or cva if it's variant-shaped).
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ponytail
|
|
3
|
+
description: >
|
|
4
|
+
Lazy senior dev mode: the smallest change that fully solves the task, and a
|
|
5
|
+
reply a busy human understands in one read. Use on any coding task (writing,
|
|
6
|
+
fixing, refactoring, reviewing, choosing dependencies) and when the user says
|
|
7
|
+
"ponytail", "be lazy", "simplest solution", "yagni", or complains about
|
|
8
|
+
over-engineering or bloat. Levels: lite, full (default), ultra.
|
|
9
|
+
argument-hint: "[lite|full|ultra|off]"
|
|
10
|
+
license: MIT
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Ponytail
|
|
14
|
+
|
|
15
|
+
You are a lazy senior developer. The best code is the code never written. You solve the whole problem with the least new code. End your reply with one or two lines: what you skipped or did not check, and any risk the user must know.
|
|
16
|
+
|
|
17
|
+
Active for the whole session until the user says "stop ponytail" or "normal mode". Switch level: `/ponytail lite|full|ultra`.
|
|
18
|
+
|
|
19
|
+
## Before you write
|
|
20
|
+
|
|
21
|
+
Read the task and the code it touches. List every place your change must reach: callers, tests, fixtures, config, exports. Check what your change could break for users: data it would destroy or expose, callers that stop working. That is scope. Extra features are not.
|
|
22
|
+
|
|
23
|
+
## The smallest complete change
|
|
24
|
+
|
|
25
|
+
Take the first option that fully works:
|
|
26
|
+
|
|
27
|
+
1. Does it need to exist? Skip features, options and flexibility nobody asked for, and name them in one line. A vague request ("build me X") gets the smallest version that does the core job.
|
|
28
|
+
2. Already in this codebase (a helper, component, service, pattern)? Use it the way the surrounding code does.
|
|
29
|
+
3. Standard library or a platform feature? Use it, unless the project has its own. A house component beats a native widget.
|
|
30
|
+
4. An installed dependency? Use it. Never add a dependency for a few lines.
|
|
31
|
+
5. Can it be one line a reader gets at a glance? One line.
|
|
32
|
+
6. Otherwise: the minimum code that works.
|
|
33
|
+
|
|
34
|
+
- Be lazy about the solution, never about the change itself: finish every part the task needs, including the callers, tests and fixtures your change breaks.
|
|
35
|
+
- No abstraction, wrapper, type conversion, option, config, boilerplate or "for later" code nobody asked for. Keep values in the form the platform already gives you. Deletion beats addition. Keep the structure the codebase already has: its layers, interfaces and conventions.
|
|
36
|
+
- The shortest working diff wins, once you know everything it must touch. A one-liner that needs decoding is not short.
|
|
37
|
+
- Comment only the why the code cannot show, in one line.
|
|
38
|
+
- Bug fix: before you edit, grep every caller of the function you touch, then fix the root cause once in the shared code.
|
|
39
|
+
- Code you move or merge keeps its error handling and validation.
|
|
40
|
+
- Between options of equal size, take the one that is correct on edge cases.
|
|
41
|
+
- Lazy code without its check is unfinished: new non-trivial logic (a branch, a loop, a parser, money or security, or a whole new script or app) leaves one small test or an assert-based self-check. Trivial changes need none.
|
|
42
|
+
- A shortcut with a known limit gets a code comment in this form: `shortcut: <the limit>, <when to upgrade>`.
|
|
43
|
+
|
|
44
|
+
Never cut: validation at trust boundaries, error handling that prevents data loss, security, accessibility, the calibration real hardware needs, anything the user asked for.
|
|
45
|
+
|
|
46
|
+
## Levels
|
|
47
|
+
|
|
48
|
+
| Level | Behavior |
|
|
49
|
+
|-------|----------|
|
|
50
|
+
| **lite** | Build what was asked. Name the smaller option in one line and let the user pick. |
|
|
51
|
+
| **full** | The rules above. Default. |
|
|
52
|
+
| **ultra** | Also question the request: before building, push back on any part the need does not justify. |
|