vc-extras 0.0.0-stage → 0.1.1
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/README.md +128 -3
- package/agent-install.mjs +159 -0
- package/agents/tester.md +23 -0
- package/install-extras.mjs +66 -0
- package/install-menu.mjs +42 -0
- package/install-skills.mjs +112 -0
- package/package.json +72 -6
- package/plugin-registry.mjs +73 -0
- package/plugins/config-ui/index.ts +160 -0
- package/plugins/config-ui/lib/arguments.mjs +24 -0
- package/plugins/config-ui/lib/documents.mjs +67 -0
- package/plugins/config-ui/lib/frontmatter.mjs +91 -0
- package/plugins/config-ui/lib/open.mjs +17 -0
- package/plugins/config-ui/lib/ownership.mjs +99 -0
- package/plugins/config-ui/lib/page.mjs +11 -0
- package/plugins/config-ui/lib/patch.mjs +36 -0
- package/plugins/config-ui/lib/paths.mjs +14 -0
- package/plugins/config-ui/lib/plugin-fields.mjs +86 -0
- package/plugins/config-ui/lib/plugin-validation.mjs +28 -0
- package/plugins/config-ui/lib/redaction.mjs +8 -0
- package/plugins/config-ui/lib/registry.mjs +282 -0
- package/plugins/config-ui/lib/secrets.mjs +45 -0
- package/plugins/config-ui/lib/server.mjs +251 -0
- package/plugins/config-ui/lib/sources.mjs +96 -0
- package/plugins/config-ui/lib/state.mjs +157 -0
- package/plugins/config-ui/lib/themes.mjs +113 -0
- package/plugins/config-ui/lib/writer.mjs +691 -0
- package/plugins/config-ui/package.json +12 -0
- package/plugins/config-ui/project-local-owner.ts +106 -0
- package/plugins/config-ui/vc-extras.plugin.json +13 -0
- package/plugins/config-ui/web/app.mjs +997 -0
- package/plugins/config-ui/web/index.html +342 -0
- package/plugins/pi-blackhole/vc-extras.plugin.json +12 -0
- package/plugins/pi-btw/vc-extras.plugin.json +12 -0
- package/plugins/pi-claude-code/vc-extras.plugin.json +12 -0
- package/plugins/pi-fff/vc-extras.plugin.json +12 -0
- package/plugins/pi-jev-auto-mode/vc-extras.plugin.json +12 -0
- package/plugins/pi-mcp-adapter/vc-extras.plugin.json +12 -0
- package/plugins/pi-web-access/vc-extras.plugin.json +12 -0
- package/plugins/vc-ask/claude-hook.mjs +37 -0
- package/plugins/vc-ask/codex-native.mjs +28 -0
- package/plugins/vc-ask/host-channel.mjs +75 -0
- package/plugins/vc-ask/index.ts +57 -0
- package/plugins/vc-ask/native-questions.mjs +33 -0
- package/plugins/vc-ask/package.json +10 -0
- package/plugins/vc-ask/payload.ts +170 -0
- package/plugins/vc-ask/questionnaire/LICENSE.ask-user-question +21 -0
- package/plugins/vc-ask/questionnaire/UPSTREAM.md +104 -0
- package/plugins/vc-ask/questionnaire/answer-channel.ts +135 -0
- package/plugins/vc-ask/questionnaire/config.ts +180 -0
- package/plugins/vc-ask/questionnaire/events.ts +154 -0
- package/plugins/vc-ask/questionnaire/execute.ts +688 -0
- package/plugins/vc-ask/questionnaire/i18n.ts +73 -0
- package/plugins/vc-ask/questionnaire/inline-entry.ts +312 -0
- package/plugins/vc-ask/questionnaire/locales/de.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/en.json +42 -0
- package/plugins/vc-ask/questionnaire/locales/es.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/fr.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/pt-BR.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/pt.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/ru.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/uk.json +43 -0
- package/plugins/vc-ask/questionnaire/locales/zh.json +46 -0
- package/plugins/vc-ask/questionnaire/presentation.ts +11 -0
- package/plugins/vc-ask/questionnaire/question-preview.ts +6 -0
- package/plugins/vc-ask/questionnaire/rpc.ts +221 -0
- package/plugins/vc-ask/questionnaire/session-timeout.ts +67 -0
- package/plugins/vc-ask/questionnaire/state/build-questionnaire.ts +144 -0
- package/plugins/vc-ask/questionnaire/state/external-editor.ts +62 -0
- package/plugins/vc-ask/questionnaire/state/geometry.ts +131 -0
- package/plugins/vc-ask/questionnaire/state/key-router.ts +382 -0
- package/plugins/vc-ask/questionnaire/state/panel-router.ts +32 -0
- package/plugins/vc-ask/questionnaire/state/questionnaire-session.ts +642 -0
- package/plugins/vc-ask/questionnaire/state/row-intent.ts +143 -0
- package/plugins/vc-ask/questionnaire/state/selectors/contract.ts +24 -0
- package/plugins/vc-ask/questionnaire/state/selectors/derivations.ts +40 -0
- package/plugins/vc-ask/questionnaire/state/selectors/focus.ts +17 -0
- package/plugins/vc-ask/questionnaire/state/selectors/projections.ts +99 -0
- package/plugins/vc-ask/questionnaire/state/state-reducer.ts +455 -0
- package/plugins/vc-ask/questionnaire/state/state.ts +90 -0
- package/plugins/vc-ask/questionnaire/state/vertical.ts +158 -0
- package/plugins/vc-ask/questionnaire/timeout.ts +59 -0
- package/plugins/vc-ask/questionnaire/tool/external-answer.ts +103 -0
- package/plugins/vc-ask/questionnaire/tool/format-answer.ts +24 -0
- package/plugins/vc-ask/questionnaire/tool/normalize-params.ts +37 -0
- package/plugins/vc-ask/questionnaire/tool/response-envelope.ts +75 -0
- package/plugins/vc-ask/questionnaire/tool/types.ts +74 -0
- package/plugins/vc-ask/questionnaire/tool/validate-questionnaire.ts +75 -0
- package/plugins/vc-ask/questionnaire/view/card-theme.ts +245 -0
- package/plugins/vc-ask/questionnaire/view/components/inline-input.ts +66 -0
- package/plugins/vc-ask/questionnaire/view/components/multi-select-view.ts +177 -0
- package/plugins/vc-ask/questionnaire/view/components/option-list-view.ts +65 -0
- package/plugins/vc-ask/questionnaire/view/components/preview/markdown-content-cache.ts +101 -0
- package/plugins/vc-ask/questionnaire/view/components/preview/preview-block-renderer.ts +130 -0
- package/plugins/vc-ask/questionnaire/view/components/preview/preview-box-renderer.ts +86 -0
- package/plugins/vc-ask/questionnaire/view/components/preview/preview-layout-decider.ts +204 -0
- package/plugins/vc-ask/questionnaire/view/components/preview/preview-pane.ts +257 -0
- package/plugins/vc-ask/questionnaire/view/components/submit-picker.ts +65 -0
- package/plugins/vc-ask/questionnaire/view/components/tab-bar.ts +57 -0
- package/plugins/vc-ask/questionnaire/view/components/wrapping-select.ts +269 -0
- package/plugins/vc-ask/questionnaire/view/dialog-builder.ts +319 -0
- package/plugins/vc-ask/questionnaire/view/document-theme.ts +53 -0
- package/plugins/vc-ask/questionnaire/view/document-view.ts +306 -0
- package/plugins/vc-ask/questionnaire/view/panel-chrome.ts +133 -0
- package/plugins/vc-ask/questionnaire/view/props-adapter.ts +77 -0
- package/plugins/vc-ask/questionnaire/view/stateful-view.ts +24 -0
- package/plugins/vc-ask/questionnaire/view/tab-components.ts +16 -0
- package/plugins/vc-ask/questionnaire/view/tab-content-strategy.ts +280 -0
- package/plugins/vc-ask/questionnaire/view/vertical-view.ts +218 -0
- package/plugins/vc-ask/user-input-events.ts +34 -0
- package/plugins/vc-ask/vc-extras.plugin.json +18 -0
- package/plugins/vc-footer/agents/claude-code/adapter.mjs +29 -0
- package/plugins/vc-footer/agents/claude-code/cli.mjs +23 -0
- package/plugins/vc-footer/agents/claude-code/renderer.mjs +1 -0
- package/plugins/vc-footer/agents/claude-code/types.d.ts +38 -0
- package/plugins/vc-footer/agents/codex/adapter.mjs +13 -0
- package/plugins/vc-footer/agents/codex/mcp.mjs +45 -0
- package/plugins/vc-footer/agents/codex/native.mjs +19 -0
- package/plugins/vc-footer/agents/codex/renderer.mjs +2 -0
- package/plugins/vc-footer/agents/pi/adapter.mjs +23 -0
- package/plugins/vc-footer/agents/pi/index.js +84 -0
- package/plugins/vc-footer/agents/pi/project-local-owner.mjs +97 -0
- package/plugins/vc-footer/agents/pi/renderer.mjs +5 -0
- package/plugins/vc-footer/core/data.mjs +218 -0
- package/plugins/vc-footer/core/render.mjs +291 -0
- package/plugins/vc-footer/core/types.d.ts +29 -0
- package/plugins/vc-footer/package.json +22 -0
- package/plugins/vc-footer/vc-extras.plugin.json +32 -0
- package/skills/animate/LICENSE +21 -0
- package/skills/animate/RECIPES.md +324 -0
- package/skills/animate/SKILL.md +208 -0
- package/skills/animate/UPSTREAM.md +19 -0
- package/skills/animation-performance/LICENSE +21 -0
- package/skills/animation-performance/SKILL.md +223 -0
- package/skills/animation-performance/UPSTREAM.md +19 -0
- package/skills/answer-me-with-html/SKILL.md +174 -0
- package/skills/answer-me-with-html/scripts/am.mjs +12896 -0
- package/skills/apple-design/LICENSE +21 -0
- package/skills/apple-design/SKILL.md +291 -0
- package/skills/apple-design/UPSTREAM.md +19 -0
- package/skills/bad-smell/SKILL.md +44 -0
- package/skills/commit/SKILL.md +90 -0
- package/skills/emil-design-eng/LICENSE +21 -0
- package/skills/emil-design-eng/SKILL.md +677 -0
- package/skills/emil-design-eng/UPSTREAM.md +19 -0
- package/skills/find-the-truth/SKILL.md +38 -0
- package/skills/find-the-truth/references/trace-method.md +48 -0
- package/skills/find-the-truth/references/truth-method.md +39 -0
- package/skills/gestures/LICENSE +21 -0
- package/skills/gestures/SKILL.md +107 -0
- package/skills/gestures/UPSTREAM.md +19 -0
- package/skills/humanizer-zh/LICENSE +21 -0
- package/skills/humanizer-zh/SKILL.md +409 -0
- package/skills/humanizer-zh/UPSTREAM.md +7 -0
- package/skills/impeccable/LICENSE +191 -0
- package/skills/impeccable/NOTICE.md +11 -0
- package/skills/impeccable/SKILL.md +90 -0
- package/skills/impeccable/licenses/modern-screenshot-MIT.txt +9 -0
- package/skills/impeccable/licenses/platform-design-skills-MIT.txt +21 -0
- package/skills/impeccable/reference/adapt.md +318 -0
- package/skills/impeccable/reference/adapt.native.md +58 -0
- package/skills/impeccable/reference/android.md +46 -0
- package/skills/impeccable/reference/animate.md +89 -0
- package/skills/impeccable/reference/audit.md +139 -0
- package/skills/impeccable/reference/audit.native.md +139 -0
- package/skills/impeccable/reference/bolder.md +33 -0
- package/skills/impeccable/reference/clarify.md +94 -0
- package/skills/impeccable/reference/colorize.md +86 -0
- package/skills/impeccable/reference/component-review.md +63 -0
- package/skills/impeccable/reference/craft-floor.md +44 -0
- package/skills/impeccable/reference/craft.md +5 -0
- package/skills/impeccable/reference/critique.md +819 -0
- package/skills/impeccable/reference/degraded/asset-producer.md +42 -0
- package/skills/impeccable/reference/degraded/documenter.md +24 -0
- package/skills/impeccable/reference/degraded/finish-reviewer.md +38 -0
- package/skills/impeccable/reference/degraded/manual-edit-applier.md +93 -0
- package/skills/impeccable/reference/delight.md +70 -0
- package/skills/impeccable/reference/distill.md +111 -0
- package/skills/impeccable/reference/doctor.md +54 -0
- package/skills/impeccable/reference/document.md +416 -0
- package/skills/impeccable/reference/extract.md +69 -0
- package/skills/impeccable/reference/generate.md +101 -0
- package/skills/impeccable/reference/harden.md +362 -0
- package/skills/impeccable/reference/hooks.md +114 -0
- package/skills/impeccable/reference/init.md +131 -0
- package/skills/impeccable/reference/ios.md +51 -0
- package/skills/impeccable/reference/layout.md +84 -0
- package/skills/impeccable/reference/live-setup.md +104 -0
- package/skills/impeccable/reference/live.md +327 -0
- package/skills/impeccable/reference/mode-operate.md +21 -0
- package/skills/impeccable/reference/mode-persuade.md +19 -0
- package/skills/impeccable/reference/mode-read.md +21 -0
- package/skills/impeccable/reference/new-work.md +152 -0
- package/skills/impeccable/reference/onboard.md +234 -0
- package/skills/impeccable/reference/operate.md +61 -0
- package/skills/impeccable/reference/optimize.md +257 -0
- package/skills/impeccable/reference/overdrive.md +127 -0
- package/skills/impeccable/reference/polish.md +105 -0
- package/skills/impeccable/reference/quieter.md +99 -0
- package/skills/impeccable/reference/region-map.md +26 -0
- package/skills/impeccable/reference/routing.md +24 -0
- package/skills/impeccable/reference/shape.md +59 -0
- package/skills/impeccable/reference/typeset.md +90 -0
- package/skills/impeccable/reference/visualize.md +47 -0
- package/skills/impeccable/scripts/VERSION +1 -0
- package/skills/impeccable/scripts/command-metadata.json +98 -0
- package/skills/impeccable/scripts/data/font-index-failures.json +121 -0
- package/skills/impeccable/scripts/data/font-index.json +1 -0
- package/skills/impeccable/scripts/engine-checksums.txt +9 -0
- package/skills/impeccable/scripts/impeccable +249 -0
- package/skills/impeccable/scripts/impeccable.cmd +278 -0
- package/skills/impeccable/scripts/live-browser-dom.js +320 -0
- package/skills/impeccable/scripts/live-browser-ignores.js +246 -0
- package/skills/impeccable/scripts/live-browser-session.js +183 -0
- package/skills/impeccable/scripts/live-browser.js +13862 -0
- package/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/skills/improve-animations/AUDIT.md +115 -0
- package/skills/improve-animations/LICENSE +21 -0
- package/skills/improve-animations/PLAN-TEMPLATE.md +73 -0
- package/skills/improve-animations/SKILL.md +110 -0
- package/skills/improve-animations/UPSTREAM.md +19 -0
- package/skills/pick-ui-library/LICENSE +21 -0
- package/skills/pick-ui-library/SKILL.md +85 -0
- package/skills/pick-ui-library/UPSTREAM.md +19 -0
- package/skills/review-animations/LICENSE +21 -0
- package/skills/review-animations/SKILL.md +120 -0
- package/skills/review-animations/STANDARDS.md +187 -0
- package/skills/review-animations/UPSTREAM.md +19 -0
- package/skills/test/SKILL.md +29 -0
- package/skills/test/references/test-method.md +60 -0
- package/skills/write-doc/SKILL.md +115 -0
- package/skills/write-doc/examples/result-report.md +53 -0
- package/skills/write-doc/examples/task-summary.md +45 -0
- package/skills/write-doc/references/terminology.md +147 -0
- package/specs/ask-host-protocol-v1.md +58 -0
- package/specs/design-demo.md +1102 -0
- package/specs/frontend-immersive.md +28 -0
- package/specs/plugin-install-v2.md +123 -0
- package/specs/plugin-install.md +38 -0
- package/specs/web-modes/explore.md +31 -0
- package/specs/web-modes/risk.md +15 -0
- package/specs/web-modes/verify.md +16 -0
- package/vc-extras.mjs +62 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-animations
|
|
3
|
+
description: Reviews animation and motion code against a high craft bar derived from Emil Kowalski's design engineering philosophy. Default to flagging; approval is earned.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Reviewing Animations
|
|
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 review your animations against a high craft bar, my standards come from Emil Kowalski's animation philosophy.
|
|
14
|
+
|
|
15
|
+
Do not provide any other information until the user asks a question.
|
|
16
|
+
|
|
17
|
+
A specialized review skill. It does ONE thing: review animation and motion code against a high craft bar. It does not write features, fix unrelated bugs, or review non-motion code. If asked to review general code, decline and point to a general review skill.
|
|
18
|
+
|
|
19
|
+
## Operating Posture
|
|
20
|
+
|
|
21
|
+
You are a senior design engineer with a brutal eye for craft. Your bias is toward **motion that feels right**, not motion that merely runs. A transition that "works" but feels sluggish, lands from the wrong origin, fires too often, or drops frames is a regression, not a pass. Default to flagging. Approval is earned, not assumed.
|
|
22
|
+
|
|
23
|
+
The substantive bar comes from Emil Kowalski's animation philosophy (animations.dev). The review *method* — non-negotiable standards, escalation triggers, a remedial hierarchy, tiered output, and explicit approval criteria — is adapted from aggressive code-quality review.
|
|
24
|
+
|
|
25
|
+
For the full rule catalog (easing curves, duration tables, spring config, gestures, clip-path, performance, a11y), see [STANDARDS.md](STANDARDS.md). Load it whenever a finding needs a precise value or citation.
|
|
26
|
+
|
|
27
|
+
## The Ten Non-Negotiable Standards
|
|
28
|
+
|
|
29
|
+
Every animation in the diff is measured against these. A violation is a finding.
|
|
30
|
+
|
|
31
|
+
1. **Justified motion.** Every animation must answer "why does this animate?" — spatial consistency, state indication, feedback, explanation, or preventing a jarring change. "It looks cool" on a frequently-seen element is a block.
|
|
32
|
+
|
|
33
|
+
2. **Frequency-appropriate.** Match motion to how often it's seen. Keyboard-initiated and 100+/day actions get **no** animation. Tens/day gets reduced motion. Occasional gets standard. Rare/first-time can have delight.
|
|
34
|
+
|
|
35
|
+
3. **Responsive easing.** Entering/exiting elements use `ease-out` or a strong custom curve. `ease-in` on UI is a block — it delays the moment the user watches most. Built-in CSS easings are too weak; expect custom cubic-beziers.
|
|
36
|
+
|
|
37
|
+
4. **Sub-300ms UI.** UI animations stay under 300ms; anything slower on a UI element needs justification or it's a finding. Per-element budgets live in [STANDARDS.md](STANDARDS.md).
|
|
38
|
+
|
|
39
|
+
5. **Origin & physical correctness.** Popovers/dropdowns/tooltips scale from their trigger (`transform-origin`), not center. Never animate from `scale(0)` — start from `scale(0.9–0.97)` + opacity (Modals are exempt — they stay centered.)
|
|
40
|
+
|
|
41
|
+
6. **Interruptibility.** Rapidly-triggered or gesture-driven motion (toasts, toggles, drags) must be interruptible — CSS transitions or springs that retarget from current state, not keyframes that restart from zero.
|
|
42
|
+
|
|
43
|
+
7. **GPU-only properties.** Animate `transform` and `opacity` only. Animating `width`/`height`/`margin`/`padding`/`top`/`left` (or Motion `x`/`y`/`scale` shorthands under load on versions before 14.2) is a performance finding.
|
|
44
|
+
|
|
45
|
+
8. **Accessibility.** `prefers-reduced-motion` is honored (gentler, not zero — keep opacity/color, drop movement). Hover animations are gated behind `@media (hover: hover) and (pointer: fine)`.
|
|
46
|
+
|
|
47
|
+
9. **Asymmetric enter/exit.** Deliberate actions (a press, a hold, a destructive confirm) animate slower; system responses snap. Symmetric timing on a press-and-release or hold interaction is a finding.
|
|
48
|
+
|
|
49
|
+
10. **Cohesion.** Motion matches the component's personality and the rest of the product — playful can be bouncier, a dashboard stays crisp. Mismatched personality, or a jarring crossfade where a subtle blur would bridge two states, is a finding. When unsure whether motion feels right, the strongest move is often to delete it.
|
|
50
|
+
|
|
51
|
+
## Aggressive Escalation Triggers
|
|
52
|
+
|
|
53
|
+
Flag these on sight, hard:
|
|
54
|
+
|
|
55
|
+
- `transition: all` (unbounded property animation)
|
|
56
|
+
- `scale(0)` or pure-fade entrances with no initial transform
|
|
57
|
+
- `ease-in` on any UI interaction; weak built-in easing on a deliberate animation
|
|
58
|
+
- Animation on a keyboard shortcut, command-palette toggle, or 100+/day action
|
|
59
|
+
- UI duration > 300ms with no stated reason
|
|
60
|
+
- `transform-origin: center` on a trigger-anchored popover/dropdown/tooltip
|
|
61
|
+
- Keyframes on toasts, toggles, or anything added/triggered rapidly
|
|
62
|
+
- Animating layout properties (`width`/`height`/`margin`/`padding`/`top`/`left`)
|
|
63
|
+
- Motion `x`/`y`/`scale` props (before `motion` 14.2) or layout animations on motion that runs while the page is busy
|
|
64
|
+
- Updating a CSS variable on a parent to drive a child transform (style recalc storm)
|
|
65
|
+
- Missing `prefers-reduced-motion` handling on movement
|
|
66
|
+
- Ungated `:hover` motion
|
|
67
|
+
- Symmetric enter/exit timing on a press-and-release or hold interaction
|
|
68
|
+
- Everything-at-once entrance where a 30–80ms stagger belongs
|
|
69
|
+
|
|
70
|
+
## Remedial Preference Hierarchy
|
|
71
|
+
|
|
72
|
+
When proposing fixes, prefer earlier moves over later ones:
|
|
73
|
+
|
|
74
|
+
1. **Delete the animation** (high-frequency / no purpose / keyboard-triggered).
|
|
75
|
+
2. **Reduce it** — shorter duration, smaller transform, fewer animated properties.
|
|
76
|
+
3. **Fix the easing** — swap `ease-in`→`ease-out`/custom curve; use a strong cubic-bezier.
|
|
77
|
+
4. **Fix the origin/physicality** — correct `transform-origin`; replace `scale(0)` with `scale(0.95)`+opacity.
|
|
78
|
+
5. **Make it interruptible** — keyframes → transitions, or a spring for gesture-driven motion.
|
|
79
|
+
6. **Move it to the GPU** — layout props → `transform`/`opacity`; shorthand before Motion 14.2 → upgrade or full `transform` string; WAAPI for programmatic CSS.
|
|
80
|
+
7. **Asymmetric timing** — slow the deliberate phase, snap the response.
|
|
81
|
+
8. **Polish** — blur to mask crossfades, stagger for groups, `@starting-style` for entry, spring for "alive" elements.
|
|
82
|
+
9. **Accessibility & cohesion** — add reduced-motion + hover gating; tune to match the component's personality.
|
|
83
|
+
|
|
84
|
+
## Required Output Format
|
|
85
|
+
|
|
86
|
+
Two parts, in this order.
|
|
87
|
+
|
|
88
|
+
### Part 1 — Findings table (REQUIRED)
|
|
89
|
+
|
|
90
|
+
A single markdown table. One row per issue. Never a "Before:/After:" list.
|
|
91
|
+
|
|
92
|
+
| Before | After | Why |
|
|
93
|
+
| --- | --- | --- |
|
|
94
|
+
| `transition: all 300ms` | `transition: transform 200ms ease-out` | Specify exact properties; `all` animates unintended properties off-GPU |
|
|
95
|
+
| `transform: scale(0)` | `transform: scale(0.95); opacity: 0` | Nothing appears from nothing — `scale(0)` looks like it came from nowhere |
|
|
96
|
+
| `ease-in` on dropdown | `ease-out` + custom curve | `ease-in` delays the moment the user watches most; feels sluggish |
|
|
97
|
+
| `transform-origin: center` on popover | `var(--transform-origin)` (Base UI) | Popovers scale from their trigger, not center (modals are exempt) |
|
|
98
|
+
|
|
99
|
+
### Part 2 — Verdict (REQUIRED)
|
|
100
|
+
|
|
101
|
+
Group remaining commentary by impact tier, highest first. Omit empty tiers.
|
|
102
|
+
|
|
103
|
+
1. **Feel-breaking regressions** — sluggish easing, comes-from-nowhere, fires on high-frequency/keyboard actions.
|
|
104
|
+
2. **Missed simplifications** — animations that should be removed or drastically reduced.
|
|
105
|
+
3. **Performance** — non-GPU properties, dropped-frame risks, recalc storms.
|
|
106
|
+
4. **Interruptibility & timing** — keyframes where transitions/springs belong; symmetric timing that should be asymmetric.
|
|
107
|
+
5. **Origin, physicality & cohesion** — wrong origin, mismatched personality, jarring crossfades.
|
|
108
|
+
6. **Accessibility** — reduced-motion and pointer/hover gating.
|
|
109
|
+
|
|
110
|
+
Close with an explicit decision:
|
|
111
|
+
|
|
112
|
+
- **Block** — any feel-breaking regression, animation on a keyboard/high-frequency action, `scale(0)`/`ease-in` on UI, or a non-GPU animation with an easy GPU fix.
|
|
113
|
+
- **Approve** — no feel-breaking regressions, no obvious motion that should be deleted, durations and easing within bounds, interruptibility handled where needed, reduced-motion respected.
|
|
114
|
+
|
|
115
|
+
Be specific and cite `file:line`. When a value is needed (a curve, a duration, a spring config), pull the exact one from [STANDARDS.md](STANDARDS.md) rather than approximating.
|
|
116
|
+
|
|
117
|
+
## Guidelines
|
|
118
|
+
|
|
119
|
+
- Prefer CSS transitions/`@starting-style`/WAAPI for predetermined motion; JS/springs for dynamic, interruptible, gesture-driven motion.
|
|
120
|
+
- When unsure whether motion feels right, recommend reviewing it in slow motion / frame-by-frame and with fresh eyes the next day rather than guessing.
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# Animation Standards Reference
|
|
2
|
+
|
|
3
|
+
The precise values, curves, and rules behind the review. Cite these in findings instead of approximating. Distilled from Emil Kowalski's design engineering philosophy.
|
|
4
|
+
|
|
5
|
+
## Should it animate? (frequency table)
|
|
6
|
+
|
|
7
|
+
| Frequency | Decision |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| 100+ times/day (keyboard shortcuts, command palette toggle) | No animation. Ever. |
|
|
10
|
+
| Tens of times/day (hover effects, list navigation) | Remove or drastically reduce |
|
|
11
|
+
| Occasional (modals, drawers, toasts) | Standard animation |
|
|
12
|
+
| Rare / first-time (onboarding, feedback, celebrations) | Can add delight |
|
|
13
|
+
|
|
14
|
+
**Never animate keyboard-initiated actions** — they repeat hundreds of times daily; animation makes them feel slow and disconnected. (Raycast has no open/close animation — correct for something used hundreds of times a day.)
|
|
15
|
+
|
|
16
|
+
Valid purposes for motion: spatial consistency, state indication, explanation, feedback, preventing jarring change. "It looks cool" on a frequently-seen element is not valid.
|
|
17
|
+
|
|
18
|
+
## Easing
|
|
19
|
+
|
|
20
|
+
Decision order:
|
|
21
|
+
- Entering or exiting → **`ease-out`** (starts fast, feels responsive)
|
|
22
|
+
- Moving / morphing on screen → **`ease-in-out`**
|
|
23
|
+
- Hover / color change → **`ease`**
|
|
24
|
+
- Constant motion (marquee, progress) → **`linear`**
|
|
25
|
+
- Default → **`ease-out`**
|
|
26
|
+
|
|
27
|
+
**Never `ease-in` on UI.** It starts slow, delaying the exact moment the user is watching. `ease-out` at 200ms *feels* faster than `ease-in` at 200ms.
|
|
28
|
+
|
|
29
|
+
Built-in CSS easings are too weak. Use strong custom curves:
|
|
30
|
+
|
|
31
|
+
```css
|
|
32
|
+
--ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* strong ease-out for UI */
|
|
33
|
+
--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* strong ease-in-out for on-screen movement */
|
|
34
|
+
--ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); /* iOS-like drawer curve (Ionic) */
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Find curves at [easing.dev](https://easing.dev/) or [easings.co](https://easings.co/) — don't hand-roll from scratch.
|
|
38
|
+
|
|
39
|
+
## Duration
|
|
40
|
+
|
|
41
|
+
| Element | Duration |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| Button press feedback | 100–160ms |
|
|
44
|
+
| Tooltips, small popovers | 125–200ms |
|
|
45
|
+
| Dropdowns, selects | 150–250ms |
|
|
46
|
+
| Modals, drawers | 200–500ms |
|
|
47
|
+
| Marketing / explanatory | Can be longer |
|
|
48
|
+
|
|
49
|
+
**Rule: UI animations stay under 300ms.** A 180ms dropdown feels more responsive than a 400ms one. Faster spinners make load feel faster (same actual time). Instant tooltips after the first (skip delay + animation) make a toolbar feel faster.
|
|
50
|
+
|
|
51
|
+
## Physicality
|
|
52
|
+
|
|
53
|
+
- **Never `scale(0)`.** Start from `scale(0.9–0.97)` + `opacity: 0`. Nothing in the real world appears from nothing.
|
|
54
|
+
- **Origin-aware popovers.** Scale from the trigger, not center:
|
|
55
|
+
```css
|
|
56
|
+
.popover { transform-origin: var(--transform-origin); } /* Base UI */
|
|
57
|
+
```
|
|
58
|
+
**Modals are exempt** — they appear centered in the viewport, keep `transform-origin: center`.
|
|
59
|
+
- **Button press feedback.** `transform: scale(0.97)` on `:active`, `transition: transform 160ms ease-out`. Subtle (0.95–0.98). Applies to any pressable element.
|
|
60
|
+
|
|
61
|
+
## Springs
|
|
62
|
+
|
|
63
|
+
Feel natural because they simulate physics; no fixed duration — they settle on parameters. Use for: drag with momentum, "alive" elements (Dynamic Island), interruptible gestures, decorative mouse-tracking.
|
|
64
|
+
|
|
65
|
+
```js
|
|
66
|
+
// Apple-style (easier to reason about) — recommended
|
|
67
|
+
{ type: "spring", duration: 0.5, bounce: 0.2 }
|
|
68
|
+
|
|
69
|
+
// Traditional physics (more control)
|
|
70
|
+
{ type: "spring", mass: 1, stiffness: 100, damping: 10 }
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Keep bounce subtle (0.1–0.3); avoid bounce in most UI — reserve for drag-to-dismiss and playful interactions. Springs maintain velocity when interrupted (keyframes restart from zero), so they're ideal for gestures users may reverse mid-motion.
|
|
74
|
+
|
|
75
|
+
Mouse interactions: interpolate with `useSpring` rather than tying value directly to mouse position (direct = artificial, no momentum). Only do this when the motion is decorative.
|
|
76
|
+
|
|
77
|
+
## Interruptibility
|
|
78
|
+
|
|
79
|
+
CSS **transitions** can be interrupted and retargeted mid-animation; **keyframes** restart from zero. For anything triggered rapidly (toasts being added, toggles), transitions are smoother.
|
|
80
|
+
|
|
81
|
+
```css
|
|
82
|
+
/* Interruptible — good for dynamic UI */
|
|
83
|
+
.toast { transition: transform 400ms ease; }
|
|
84
|
+
|
|
85
|
+
/* Not interruptible — avoid for dynamic UI */
|
|
86
|
+
@keyframes slideIn { from { transform: translateY(100%); } to { transform: translateY(0); } }
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Use `@starting-style` for entry without JS:
|
|
90
|
+
|
|
91
|
+
```css
|
|
92
|
+
.toast {
|
|
93
|
+
opacity: 1; transform: translateY(0);
|
|
94
|
+
transition: opacity 400ms ease, transform 400ms ease;
|
|
95
|
+
@starting-style { opacity: 0; transform: translateY(100%); }
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Legacy fallback: `useEffect(() => setMounted(true), [])` + `data-mounted` attribute.
|
|
100
|
+
|
|
101
|
+
## Asymmetric timing
|
|
102
|
+
|
|
103
|
+
Slow where the user is deciding, fast where the system responds.
|
|
104
|
+
|
|
105
|
+
```css
|
|
106
|
+
.overlay { transition: clip-path 200ms ease-out; } /* release: fast */
|
|
107
|
+
.button:active .overlay { transition: clip-path 2s linear; } /* press: slow, deliberate */
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Performance
|
|
111
|
+
|
|
112
|
+
- **Only animate `transform` and `opacity`** — they skip layout/paint and run on the GPU. `padding`/`margin`/`height`/`width`/`top`/`left` trigger all three rendering steps.
|
|
113
|
+
- **Don't drive child transforms via a CSS variable on the parent** — it recalcs styles for all children. Set `transform` directly on the element.
|
|
114
|
+
```js
|
|
115
|
+
element.style.setProperty('--swipe-amount', `${d}px`); // bad: recalc on all children
|
|
116
|
+
element.style.transform = `translateY(${d}px)`; // good: only this element
|
|
117
|
+
```
|
|
118
|
+
- **Motion shorthands are hardware-accelerated from `motion` 14.2.** Before 14.2, `x`/`y`/`scale` run on the main thread via rAF and drop frames under load, so on those versions upgrade or use the full transform string. Layout animations (`layout`, `layoutId`) run on the main thread in every version:
|
|
119
|
+
```jsx
|
|
120
|
+
<motion.div animate={{ x: 100 }} /> // motion 14.2+: hardware accelerated
|
|
121
|
+
<motion.div animate={{ transform: "translateX(100px)" }} /> // hardware accelerated in every version
|
|
122
|
+
```
|
|
123
|
+
- **CSS animations beat JS under load** — they run off the main thread; rAF-based animations stutter while the browser loads/scripts/paints. Use CSS for predetermined motion, JS for dynamic/interruptible.
|
|
124
|
+
- **WAAPI** gives JS control with CSS performance (hardware-accelerated, interruptible, no library):
|
|
125
|
+
```js
|
|
126
|
+
element.animate([{ clipPath: 'inset(0 0 100% 0)' }, { clipPath: 'inset(0 0 0 0)' }],
|
|
127
|
+
{ duration: 1000, fill: 'forwards', easing: 'cubic-bezier(0.77, 0, 0.175, 1)' });
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Transforms & clip-path
|
|
131
|
+
|
|
132
|
+
- **`translate` percentages** are relative to the element's own size — `translateY(100%)` moves by the element's height regardless of dimensions (how Sonner/Vaul position toasts/drawers). Prefer over hardcoded px.
|
|
133
|
+
- **`scale()` scales children too** (font, icons, content) — a feature for press feedback.
|
|
134
|
+
- **3D**: `rotateX/Y` + `transform-style: preserve-3d` for depth/orbit/flip without JS.
|
|
135
|
+
- **`clip-path: inset(t r b l)`** is a powerful animation tool: each value eats in from that side. Uses: reveal-on-scroll (`inset(0 0 100% 0)` → `inset(0 0 0 0)`), hold-to-delete overlay, seamless tab color transitions (duplicate + clip the active copy), comparison sliders.
|
|
136
|
+
|
|
137
|
+
## Gestures & drag
|
|
138
|
+
|
|
139
|
+
- **Momentum dismissal**: don't require crossing a distance threshold — compute velocity (`Math.abs(distance)/elapsedMs`); dismiss if `> ~0.11`. A flick should be enough.
|
|
140
|
+
- **Damping at boundaries**: dragging past a natural edge moves less the further you go (real things slow before stopping).
|
|
141
|
+
- **Pointer capture** once dragging starts, so it continues when the pointer leaves bounds.
|
|
142
|
+
- **Multi-touch protection**: ignore extra touch points after the drag begins (`if (isDragging) return`) — prevents jumps.
|
|
143
|
+
- **Friction over hard stops** — allow over-drag with rising resistance rather than an invisible wall.
|
|
144
|
+
|
|
145
|
+
## Masking imperfect crossfades
|
|
146
|
+
|
|
147
|
+
When a crossfade shows two overlapping states despite tuning easing/duration, add subtle `filter: blur(2px)` during the transition to blend them into one perceived transformation. Keep blur < 20px (heavy blur is expensive, especially Safari).
|
|
148
|
+
|
|
149
|
+
## Stagger
|
|
150
|
+
|
|
151
|
+
Stagger group entrances; 30–80ms between items. Longer delays feel slow. Stagger is decorative — never block interaction while it plays.
|
|
152
|
+
|
|
153
|
+
```css
|
|
154
|
+
.item { opacity: 0; transform: translateY(8px); animation: fadeIn 300ms ease-out forwards; }
|
|
155
|
+
.item:nth-child(2) { animation-delay: 50ms; }
|
|
156
|
+
.item:nth-child(3) { animation-delay: 100ms; }
|
|
157
|
+
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Accessibility
|
|
161
|
+
|
|
162
|
+
```css
|
|
163
|
+
@media (prefers-reduced-motion: reduce) {
|
|
164
|
+
.element { animation: fade 0.2s ease; } /* keep opacity/color, drop transform-based motion */
|
|
165
|
+
}
|
|
166
|
+
@media (hover: hover) and (pointer: fine) {
|
|
167
|
+
.element:hover { transform: scale(1.05); } /* gate hover motion — touch fires false hovers on tap */
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
```jsx
|
|
172
|
+
const reduce = useReducedMotion();
|
|
173
|
+
const closedX = reduce ? 0 : '-100%';
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Reduced motion means fewer and gentler animations, not zero — keep transitions that aid comprehension, remove movement/position changes.
|
|
177
|
+
|
|
178
|
+
## Debugging (recommend in reviews when feel is uncertain)
|
|
179
|
+
|
|
180
|
+
- **Slow motion**: bump duration 2–5× or use DevTools animation inspector. Check colors crossfade cleanly, easing doesn't stop abruptly, `transform-origin` is right, coordinated properties stay in sync.
|
|
181
|
+
- **Frame-by-frame**: Chrome DevTools Animations panel reveals timing drift between coordinated properties.
|
|
182
|
+
- **Real devices** for gestures (drawers, swipe) — connect a phone, hit the dev server by IP, use Safari remote devtools.
|
|
183
|
+
- **Fresh eyes next day** — imperfections invisible during development surface later.
|
|
184
|
+
|
|
185
|
+
## Cohesion
|
|
186
|
+
|
|
187
|
+
Match motion to the component's personality: playful can be bouncier; a professional dashboard should be crisp and fast. Sonner feels right partly because easing, duration, design, and even the name are in harmony — slightly slower, `ease` rather than `ease-out`, to feel elegant. Opacity + height in entering/exiting lists is trial and error; there's no formula — adjust until it feels right.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Upstream
|
|
2
|
+
|
|
3
|
+
- Repository: https://github.com/emilkowalski/skills
|
|
4
|
+
- Commit: f7ce8c02d6e3c8f0d980a44c57bcc41a40254349 (2026-11-12)
|
|
5
|
+
- Upstream path: `skills/review-animations/`
|
|
6
|
+
- License: MIT (see `LICENSE` in this directory)
|
|
7
|
+
|
|
8
|
+
Files copied verbatim: `SKILL.md`, `STANDARDS.md`.
|
|
9
|
+
|
|
10
|
+
The only local adaptation is the frontmatter `disable-model-invocation: true` added by
|
|
11
|
+
`npm run sync:skills`, so the model sees this skill only through the
|
|
12
|
+
`emma/skills/skills-router/SKILL.md` row and loads it on demand.
|
|
13
|
+
|
|
14
|
+
## Resync
|
|
15
|
+
|
|
16
|
+
1. Check out the recorded commit of the upstream repository.
|
|
17
|
+
2. Replace the upstream files here with `skills/review-animations/` from that commit; keep `LICENSE` and this file.
|
|
18
|
+
3. Run `npm run sync:skills` to restore the hidden frontmatter and the router row.
|
|
19
|
+
4. Keep the frontmatter `description` a single-line plain scalar; the router generator rejects block and folded scalars.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
disable-model-invocation: true
|
|
3
|
+
name: test
|
|
4
|
+
description: Use when work needs independent end-to-end verification — a feature or change before delivery, or a retest after a confirmed fix.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Assemble the test objective and materials, determine the scope, and always delegate to the `Tester` sub-agent in the background — return immediately after dispatch and do something else; do not wait.
|
|
8
|
+
After the sub-agent returns: relay per the report — Fail and Blocked are not passes; experience items are relayed as observations and issues only; state uncovered items faithfully; never authorize fixes on your own.
|
|
9
|
+
|
|
10
|
+
## Assemble the prompt
|
|
11
|
+
|
|
12
|
+
- Assemble per the template below, replacing every `<...>`; derive this round's test items from the goal and acceptance criteria — do not substitute the whole requirements document for the test scope.
|
|
13
|
+
- Materials must be real — version, changes, environment, and credentials point to actual sources.
|
|
14
|
+
- Resolve `<test-method-path>` to the absolute path of `references/test-method.md` beside the loaded `SKILL.md`, so Tester can read it without loading skills.
|
|
15
|
+
|
|
16
|
+
```markdown
|
|
17
|
+
## Context
|
|
18
|
+
<This round's goal and acceptance criteria, constraints that must hold; the version under test and the change scope (diff entry or changed-file list); environment state (a ready entry point, or how to start it) and credentials; the task artifact directory; what is explicitly out of scope this round. For a retest: the previous report location and this round's fixes.>
|
|
19
|
+
|
|
20
|
+
## Test Items
|
|
21
|
+
<This round's test items, labeled by type with expectations:
|
|
22
|
+
- [Functional] explicit case and expected result
|
|
23
|
+
- [Experience] scenario and focus points (real-user end-to-end experience, non-binary)
|
|
24
|
+
For a retest: the original issues plus the regression scenarios directly affected by this round's fixes.>
|
|
25
|
+
|
|
26
|
+
## Method
|
|
27
|
+
Read `<test-method-path>` in full first; strictly follow it.
|
|
28
|
+
Return the end-to-end test report (test environment / functional table / experience table / conclusions / follow-ups); write the full report to `e2e.md` in the task artifact directory and output only the report path.
|
|
29
|
+
```
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Test Method
|
|
2
|
+
|
|
3
|
+
## Workflow
|
|
4
|
+
|
|
5
|
+
1. **Understand the scope**: from the test request, read the related task docs and the project's testing conventions (including `.emma/specs/testing-scope.md`, reuse it if already in context); determine the target under test, acceptance criteria, available test environment, and test items; separate functional from experience items. When a Test Items list is already provided, follow it and extend as needed.
|
|
6
|
+
2. **Choose the approach**: reuse existing test commands and scripts first — let the program run continuously and inspect at key results, failures, or points needing an experience judgment; do not default to step-by-step screenshots and simulated clicks.
|
|
7
|
+
3. **Prepare and wait**: prepare accounts, data, and the test starting point; direct means such as APIs or commands are fine, but the user operation being verified must not be skipped. Wait for the actual result before continuing; no arbitrary fixed waits — control pacing only when measuring input speed or animation itself.
|
|
8
|
+
4. **Execute item by item**:
|
|
9
|
+
- Functional: cover every case; give each a 「Pass / Fail / Blocked」 verdict with evidence.
|
|
10
|
+
- Experience: walk through it fully like a real user, judging by sight, subjective feel, and common sense; record **observations** (what you actually experienced), **suggestions** (improvement directions), and **issues** (specific points hurting the experience). Prioritize core real scenarios; do not write meaningless tests for coverage numbers.
|
|
11
|
+
5. **Blocked handling**: when environment, tools, or credentials make verification impossible, mark the item 「Blocked」 and state what is needed; do not guess the result. Items not executed are marked 「Untested」 and listed under follow-ups.
|
|
12
|
+
|
|
13
|
+
## Screenshots and evidence
|
|
14
|
+
|
|
15
|
+
- **Every result must carry evidence**: UI tests use screenshots at key nodes; non-UI tests use actual output, logs, or responses. Experience observations, suggestions, and issues must correspond to an actual screen or interaction; one piece of evidence may support several related conclusions.
|
|
16
|
+
- Screenshots target the case's key nodes (result page, error state, where the visual problem occurs) — not just the home page or the initial state.
|
|
17
|
+
- Save screenshots as files and inline them in the report's evidence column with Markdown image syntax (e.g. ``); notes, log paths, or command output also work (separate multiple items in one cell with `<br>`). **A screenshot path alone is not evidence.**
|
|
18
|
+
- Blocked / non-reproducible items must also keep what you saw (screenshot or text) and state what you tried.
|
|
19
|
+
- Reports and screenshots must not expose passwords, tokens, or other secrets.
|
|
20
|
+
|
|
21
|
+
## Report format
|
|
22
|
+
|
|
23
|
+
```markdown
|
|
24
|
+
# {feature/issue} End-to-end Test Report
|
|
25
|
+
|
|
26
|
+
## Test environment
|
|
27
|
+
|
|
28
|
+
- Version under test: <the code version or workspace changes>
|
|
29
|
+
- Execution: <test commands, scripts, or interactive operations used; write 「none」 if empty>
|
|
30
|
+
- Time profile: <total time; notably long preparation, waiting, or retries and why; write 「none」 if empty>
|
|
31
|
+
- Environment/prerequisites: <device, browser, test accounts, data; write 「none」 if empty>
|
|
32
|
+
|
|
33
|
+
## Functional items
|
|
34
|
+
|
|
35
|
+
| # | Steps | Expected | Actual | Status | Evidence |
|
|
36
|
+
| --- | -------------- | -------------- | -------- | -------------------------- | ------------------------------ |
|
|
37
|
+
| 1 | <repeatable> | <observable> | <actual> | Pass/Fail/Blocked/Untested | <inline screenshot, output, or log evidence> |
|
|
38
|
+
|
|
39
|
+
## Experience items
|
|
40
|
+
|
|
41
|
+
| # | Scenario | Focus | Observation | Suggestion/Issue | Evidence |
|
|
42
|
+
| --- | -------- | ----------------- | -------------- | ---------------------------------- | ------------------- |
|
|
43
|
+
| 1 | <scenario> | <visual/interaction/common sense> | <actually experienced> | <suggestion or specific issue; 「none」 if empty> |  |
|
|
44
|
+
|
|
45
|
+
## Conclusions
|
|
46
|
+
|
|
47
|
+
- Functional: Pass N · Fail N · Blocked N · Untested N
|
|
48
|
+
- Experience: N observations, N key issues
|
|
49
|
+
|
|
50
|
+
## Follow-ups
|
|
51
|
+
|
|
52
|
+
<Next steps for Failed/Blocked/Untested items and key experience issues>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
If one item type is absent, omit its section and its conclusion count.
|
|
56
|
+
|
|
57
|
+
## Output location
|
|
58
|
+
|
|
59
|
+
- Write the full report to `e2e.md` in the task directory named by Context; store screenshots under `shots/` in the same directory.
|
|
60
|
+
- Output only the report path.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
disable-model-invocation: true
|
|
3
|
+
name: write-doc
|
|
4
|
+
description: Use when the user asks to write or rewrite a document, including results reports, progress updates, investigation explanations, decision notes, and summaries. Applies only to the current task.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# write-doc:简化技术中文
|
|
8
|
+
|
|
9
|
+
用自然、准确、克制的语言,把事情讲清楚。
|
|
10
|
+
|
|
11
|
+
先让读者把握整体,再理解关键部分,获得足以判断或行动的信息。简洁不是最少字数,而是没有多余的话,也没有缺少必要的解释。
|
|
12
|
+
|
|
13
|
+
用户明确指定的读者、用途、来源范围和格式优先。
|
|
14
|
+
|
|
15
|
+
使用简体中文。原样引用的日志、错误信息和命令输出必须一字不改,可以在引用之外解释。
|
|
16
|
+
|
|
17
|
+
R1–R25 用于指导和检查写作,不是最终回答的栏目。术语含义与完成条件参考 [references/terminology.md](references/terminology.md),不要求正文采用固定词组或状态标签。
|
|
18
|
+
|
|
19
|
+
## 成品的风格与组织
|
|
20
|
+
|
|
21
|
+
像一个思路清楚、判断审慎、表达克制的人说话:直接,但不生硬;充分,但不铺陈;有判断,但不过度断言。
|
|
22
|
+
|
|
23
|
+
以自然段承载完整意思,用少量有意义的标题划分主要层次。标题应说明这一部分在讲什么,不默认套用「现象、原因、证据、改动、验证、建议」。
|
|
24
|
+
|
|
25
|
+
组织时把握主从关系,由整体向细节展开:
|
|
26
|
+
|
|
27
|
+
- **主判断统领全文。** 后续内容围绕读者需要理解或决定的事情展开。
|
|
28
|
+
- **支撑解释判断。** 按原因、对照、条件或取舍之间的关系组织,不照搬资料顺序。
|
|
29
|
+
- **复杂处逐层拆解。** 先讲主要机制或关系,再进入必要的字段、接口、日志和局部细节。
|
|
30
|
+
- **收束落到新信息。** 需要时补充下一步动作、选择或判断条件,不把正文重新复述一遍。
|
|
31
|
+
|
|
32
|
+
这是组织思路,不是四个固定栏目,也不要求每次全部出现。短回答可以直接结束;操作说明可以在简短判断后进入步骤。
|
|
33
|
+
|
|
34
|
+
主次由读者的问题决定。不因掌握了某项材料,就把它放进正文;用户需要完整数据或复现步骤时,也不以简洁为由删减。
|
|
35
|
+
|
|
36
|
+
## 写作规则
|
|
37
|
+
|
|
38
|
+
### 词与表达
|
|
39
|
+
|
|
40
|
+
- **R1 一词一义。** 同一概念保持一致称呼,不为避免重复而更换成含义不明的近义词。简称和指代可以使用,但必须清楚。
|
|
41
|
+
|
|
42
|
+
- **R2 先解释,后展开。** 优先直接描述读者需要理解的行为和范围。能写「当前节点及其下级节点」,就不必先引入「子树」。术语确有检索、讨论或操作价值时,在首次出现处就地解释;不仅说明它是什么,还要说清它与当前问题的关系。解释仍须遵守来源范围。
|
|
43
|
+
|
|
44
|
+
- **R3 用具体动词。** 写「修改配置」,不写「对配置进行修改」。能说明具体行为时,不只写「优化」「处理」「完善」。删掉不增加意思的包装,不改变技术含义。
|
|
45
|
+
|
|
46
|
+
- **R4 字面量保持原样。** 界面文案、按钮名、代码标识符、命令和路径保持原文,不因改写而拆分或改变其边界。代码、命令和路径写在反引号内;需要检索的原标题保留原文。
|
|
47
|
+
|
|
48
|
+
- **R5 拆开难读的名词串。** 连续堆叠名词时,写出它们之间的关系。例:「终端会话失败反馈界面状态」改为「终端会话失败时的界面状态」。固定技术名称不为拆词而改名。
|
|
49
|
+
|
|
50
|
+
### 句与段落
|
|
51
|
+
|
|
52
|
+
- **R6 一句围绕一个主要意思。** 无关的动作或事实拆开写。同一件事的条件、原因、结果或对照可以放在一句中,不为拆句而切断关系。
|
|
53
|
+
|
|
54
|
+
- **R7 优先短句,不机械限字。** 长句先删重复,再按意思拆分。保留必要的对象、条件、因果和限定,不为满足字数门槛而省略信息。
|
|
55
|
+
|
|
56
|
+
- **R8 优先主动表达。** 谁做了什么应当清楚。执行者不明确或不重要时,可以使用被动表达,不强行补出主语。
|
|
57
|
+
|
|
58
|
+
- **R9 条件与动作相邻。** 条件影响理解或操作时,先交代条件,再说明动作或结果。不要把关键前提藏在段末。
|
|
59
|
+
|
|
60
|
+
- **R10 不用不必要的双重否定。** 写「必须确认」,不写「不能不确认」。涉及原始逻辑或引用时,不得因改写否定形式而改变含义。
|
|
61
|
+
|
|
62
|
+
- **R11 保持要求的强度。** 区分强制、禁止、允许、建议和能力。不得把建议改成必须,把能够说成允许。用词可以自然变化,来源中的要求强度不能改变。
|
|
63
|
+
|
|
64
|
+
- **R12 主语与指代明确。** 省略后可能产生歧义时,补出对象。尤其要分清不同节点、版本、时间和检查范围,避免用一个「它」连接不同对象。
|
|
65
|
+
|
|
66
|
+
- **R13 一段一个主题。** 用几句话把一个意思讲完整,转到新问题时另起一段。不机械地一句一段;段落过重时,先检查是否混入另一个主题或无关细节。
|
|
67
|
+
|
|
68
|
+
- **R14 操作步骤写清动作。** 需要读者按顺序执行时,使用编号步骤,说明必要条件、具体动作和预期结果。写到目标读者能够照做,不只重述「确认正常」「做好备份」之类的目标,也不补造未知环境中的菜单或命令。解释事情不等于指导操作,不把所有解释写成步骤。
|
|
69
|
+
|
|
70
|
+
- **R15 按阅读任务选择形式。** 连续解释用段落,独立重点用列表,相同维度的比较用表格。表格标清必要的对象、单位和时间范围,不把长篇解释塞进单元格,也不在表后逐行复述。
|
|
71
|
+
|
|
72
|
+
- **R16 风险提醒先说怎么做。** 先说明对应动作,再解释风险或后果。保持来源中的要求强度:确属强制或禁止的明确写出,其余说明建议与取舍。提醒与具体风险相称,不补无依据的警告或反复免责。
|
|
73
|
+
|
|
74
|
+
- **R17 列举的边界清楚。** 完整范围必须列全,或提供完整清单的位置。只举例时明确是在举例,不用「等」「之类」掩盖未说明的改动、影响或要求。
|
|
75
|
+
|
|
76
|
+
### 内容与汇报
|
|
77
|
+
|
|
78
|
+
- **R18 关键信息先行。** 首句回答当前问题,不先介绍工作安排,也不用笼统状态代替实质答复。用户问了多个问题时,按它们之间的关系组织,不能只给一个概括结论。准确但不影响理解、判断或行动的细节不必进入正文。
|
|
79
|
+
|
|
80
|
+
- **R19 自然说明状态。** 完成范围与验证范围必须明确,但不强制状态标签。可以写「代码已经修改,运行效果还没有验证」。必需验收未完成或存在已知失败时,不得宣称整项任务完成;临时恢复不得写成永久解决。
|
|
81
|
+
|
|
82
|
+
- **R20 如实写验证。** 实际效果、运行行为和检查结果应有依据,说明必要的方法、结果与覆盖范围。读取资料不等于运行验证。已知未执行、执行失败、缺少记录是不同情况,不得混写。历史结果不能冒充本次新检查。验证限制贴近对应结论,共享的来源或检查边界集中交代,不逐段重复。
|
|
83
|
+
|
|
84
|
+
- **R21 保留必要经过,删除操作流水账。** 用户要求调查经过,或经过支持结论时,说明哪些观察缩小了范围,哪些对照支持了判断。保留推理链,不复述全部文件读取和工具调用。面向不同用途可以概括细节,但不能省略使结论成立的条件。
|
|
85
|
+
|
|
86
|
+
- **R22 证据可定位。** 引用代码使用已知的 `路径:行号`,引用提交写提交号,引用资料或历史对话时提供可定位的版本、位置或消息信息。缺少行号时,可以用路径及函数名或节标题定位,不补造缺失信息。需要复现操作时给出完整命令,仅概述安排时不必展开整套脚本。同一来源可以集中列一次,再关联它支持的结论。
|
|
87
|
+
|
|
88
|
+
- **R23 让选择容易比较。** 需要用户决定时,说明真正不同的选项及其后果,有充分依据再推荐。多个选项需要明确选择时使用编号,不为套格式制造选项。
|
|
89
|
+
|
|
90
|
+
- **R24 区分事实、推断和未知。** 已确认的直接说,有依据的推断说明依据和限制,未查清的明确承认。可以使用「可能」,但不能用它掩盖没有证据。先回答现有材料允许回答的部分,再说明缺口如何影响判断,不让「尚未确认」代替整个回答。
|
|
91
|
+
|
|
92
|
+
- **R25 尊重来源范围,不改变事实边界。** 只改写所给材料时,不补入材料外事实或机制。任务允许解释背景时,可以使用可靠的一般知识,但一般机制不能冒充本次原因,类比不能补出未经支持的因果。保留数字的单位、时间、对象和统计范围;字段对应或口径不清时,不自行确定。可以省略无关细节,不能省略会改变结论的限定。待查事实与待用户决定的事项分开,不把所有未知都转交用户。
|
|
93
|
+
|
|
94
|
+
## 克制与收束
|
|
95
|
+
|
|
96
|
+
少用空泛评价、夸张修饰、口号和自我表态。不要反复强调「非常重要」「必须明确」,直接说它是什么、为什么影响当前判断。
|
|
97
|
+
|
|
98
|
+
每一段都应增加必要的信息、解释或判断。开头可以概括,正文可以论证,表格可以供读者横向比较;同一事实再次出现时,应承担不同的阅读作用,而不是换一种说法再讲一遍。
|
|
99
|
+
|
|
100
|
+
例如,操作说明开头提醒暂不删除,末尾说明满足哪些条件后可以删除,承担的是不同作用;已经解释过推荐理由,结尾再重复「因此推荐」,通常没有增量。
|
|
101
|
+
|
|
102
|
+
结尾有新的判断、取舍或行动时再写。正文已经说清的,不另加「简单来说」「总而言之」重复一次。干练不等于省略必要细节,克制也不等于回避明确判断。
|
|
103
|
+
|
|
104
|
+
## 发出前通读
|
|
105
|
+
|
|
106
|
+
在内部检查,不把清单附在回答末尾。
|
|
107
|
+
|
|
108
|
+
- 用户能否直接找到所问问题的答案,主要判断是否清楚?
|
|
109
|
+
- 内容是否按关系展开,复杂处是否逐层解释,而不是倾倒资料或套用栏目?
|
|
110
|
+
- 必要的概念、原因和操作是否说清,有没有为了简短删掉读者需要的细节?
|
|
111
|
+
- 标题、分段、列表和表格是否帮助阅读?
|
|
112
|
+
- 有没有无助于当前任务的细节,或没有新增作用的重述、修饰和提醒?
|
|
113
|
+
- 数字、字面量、来源范围、验证范围与结论强度是否一致?
|
|
114
|
+
|
|
115
|
+
发现问题时,先调整信息取舍和解释关系,不用增加栏目代替组织,也不用压缩字数代替克制。
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# 示例:结果汇报
|
|
2
|
+
|
|
3
|
+
本示例的来源是虚构的。
|
|
4
|
+
|
|
5
|
+
## Agent 掌握的事实
|
|
6
|
+
|
|
7
|
+
改写只改写法,不增加事实(R25)。改写后的每个事实都来自本节。
|
|
8
|
+
|
|
9
|
+
- 用户的要求:修复登录后偶发退出的问题。用户没有要求改日志和重试逻辑。
|
|
10
|
+
- Agent 读了 `auth/refresh.ts`。第 42 行在刷新前不检查是否已有刷新在进行。
|
|
11
|
+
- 两个请求同时刷新 token 时,后完成的刷新使先拿到的 token 失效。
|
|
12
|
+
- Agent 修改了 `auth/refresh.ts`:同一时间只发一个刷新请求,其他请求等待这次刷新的结果。
|
|
13
|
+
- Agent 删除了 `auth/logger.ts` 中的 3 处重复日志。
|
|
14
|
+
- Agent 新增了并发刷新测试,位置是 `auth/refresh.test.ts:88`。
|
|
15
|
+
- `npm test auth` 的输出:48 项通过,0 项失败。新增的测试在其中。
|
|
16
|
+
- 本机没有 iOS 构建环境。
|
|
17
|
+
|
|
18
|
+
## 改写前
|
|
19
|
+
|
|
20
|
+
> 好的,我先看了一下登录相关的代码,发现问题应该是出在 token 刷新的逻辑上,大概是并发的时候两个请求同时去刷新导致的。然后我对 `auth/refresh.ts` 进行了修改,加了一个锁来实现串行化处理,另外顺手把一些日志之类的也优化了一下。测试基本都跑过了,应该没什么问题,不过 iOS 那边因为没有环境暂时没法验证。你看要不要我再把重试逻辑也一起改了?
|
|
21
|
+
|
|
22
|
+
需要改进的地方:
|
|
23
|
+
|
|
24
|
+
- 没有先回答修复到了哪一步,操作流水账挤占了解释。
|
|
25
|
+
- 「应该」「大概」没有说明依据;「基本都跑过了」没有方法、结果和覆盖范围。
|
|
26
|
+
- 「进行了修改」「实现串行化处理」没有直接说明现在的行为。
|
|
27
|
+
- 日志改动超出了用户要求,不能用「顺手优化」带过。
|
|
28
|
+
- 重试逻辑不是用户需求,不应自行扩展任务。
|
|
29
|
+
|
|
30
|
+
## 改写后
|
|
31
|
+
|
|
32
|
+
登录刷新逻辑已经修改,并发刷新测试通过;iOS 端还没有验证,因此不能据此认定整项修复已完成。
|
|
33
|
+
|
|
34
|
+
### 为什么会退出,现在怎样避免
|
|
35
|
+
|
|
36
|
+
两个请求同时刷新登录凭证(token)时,后完成的刷新会让先拿到的凭证失效。原代码在刷新前没有检查是否已有刷新在进行,位置是 `auth/refresh.ts:42`。
|
|
37
|
+
|
|
38
|
+
现在 `auth/refresh.ts` 同一时间只发一个刷新请求,其他请求等待这次刷新的结果。`npm test auth` 的结果为 48 项通过、0 项失败,包含新增的并发刷新测试 `auth/refresh.test.ts:88`。本机没有 iOS 构建环境,所以这些测试不能代替 iOS 端的检查。
|
|
39
|
+
|
|
40
|
+
### 还有一项范围外改动需要决定
|
|
41
|
+
|
|
42
|
+
这次还删除了 `auth/logger.ts` 中的 3 处重复日志,不在原来的登录修复范围内。建议撤回,让本次提交只包含登录修复:
|
|
43
|
+
|
|
44
|
+
1. 撤回日志改动(推荐)— 本次提交只含登录修复。
|
|
45
|
+
2. 保留日志改动 — 日志清理与登录修复一起提交。
|
|
46
|
+
|
|
47
|
+
## 说明
|
|
48
|
+
|
|
49
|
+
自然段连接了原因、改动和测试范围;决定是否保留独立改动时才使用编号。状态不靠标签表达,但代码修改、测试通过和 iOS 未验证仍然有明确区别。
|
|
50
|
+
|
|
51
|
+
数字和文件位置来自「Agent 掌握的事实」,不是改写时补充的。已知没有运行 iOS 检查与缺少检查记录不同;若 iOS 检查属于验收条件,整项任务仍只能算部分完成。新增并发刷新测试已经包含在 48 项结果中,不再重复列一份验证。
|
|
52
|
+
|
|
53
|
+
本例仍是虚构素材,不是当前仓库的文件或测试结果,也不是唯一正确的汇报版式。
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# 示例:任务卡总结
|
|
2
|
+
|
|
3
|
+
本示例的来源是虚构的。来源是 3 张任务卡和一段迭代说明。
|
|
4
|
+
|
|
5
|
+
## 改写前
|
|
6
|
+
|
|
7
|
+
> 本迭代需要对移动端登录模块进行优化处理,第三方登录暂不考虑。这里的会话指登录成功后服务端保留的登录状态。
|
|
8
|
+
>
|
|
9
|
+
> **Retry Login Requests on Weak Networks**(large,Bug):针对弱网环境下登录请求经常超时、用户体验较差的问题,要做好重试机制的实现工作,重试不超过三次。
|
|
10
|
+
>
|
|
11
|
+
> **Notify Users When the Session Expires**(small,Bug):会话过期后用户无法感知,需要予以提示。
|
|
12
|
+
>
|
|
13
|
+
> **Keep the Password Field Above the Keyboard**(small,Bug):密码输入框在部分机型上存在被键盘遮挡等问题。
|
|
14
|
+
|
|
15
|
+
需要改进的地方:
|
|
16
|
+
|
|
17
|
+
原文的「优化处理」「做好……实现工作」「予以提示」没有直接说行为,「等问题」则留下了不明确的范围。「需要」「要」本身不算错误,重要的是不改变来源中的要求强度。
|
|
18
|
+
|
|
19
|
+
## 改写后
|
|
20
|
+
|
|
21
|
+
本迭代围绕移动端登录的 3 项需求展开,不包含第三方登录。
|
|
22
|
+
|
|
23
|
+
### 请求超时时怎样重试
|
|
24
|
+
|
|
25
|
+
**Retry Login Requests on Weak Networks**(large,Bug)
|
|
26
|
+
|
|
27
|
+
网络信号弱时,登录请求经常超时。这项需求是在登录请求超时后自动重试,最多 3 次;3 次重试都失败后的行为,来源尚未说明。
|
|
28
|
+
|
|
29
|
+
### 登录状态与输入体验
|
|
30
|
+
|
|
31
|
+
**Notify Users When the Session Expires**(small,Bug)
|
|
32
|
+
|
|
33
|
+
会话是登录成功后服务端保留的登录状态。会话过期时,应用目前不会提示用户,这次需要增加提示。提示文案和用户看到后的下一步仍待补充。
|
|
34
|
+
|
|
35
|
+
**Keep the Password Field Above the Keyboard**(small,Bug)
|
|
36
|
+
|
|
37
|
+
部分机型的键盘会挡住密码输入框,需要让输入框在键盘弹出时保持在键盘上方。具体机型尚未列出,原文「等问题」是否还包括其他现象也需要澄清。
|
|
38
|
+
|
|
39
|
+
## 说明
|
|
40
|
+
|
|
41
|
+
这是一份需求总结,不声明代码完成或运行验证。原标题、规模和类型保留原文,便于检索;共同背景只交代一次,每张卡不重复套用「问题/要做/待确认」栏目。
|
|
42
|
+
|
|
43
|
+
重试最多 3 次来自来源,不是改写时设定。缺少的型号、其他问题、重试失败行为和提示要求放在相应需求附近,没有擅自补齐,也不再另列一份重复的待确认清单。需要后续补充这些信息,不表示总结时必须逐项向用户追问。
|
|
44
|
+
|
|
45
|
+
本例用于展示一种组织方式;用户要求逐项清单或表格时,应按用户要求呈现。
|