@ericrisco/rsc 1.0.26 → 1.0.28
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 +22 -4
- package/manifest.json +231 -3
- package/package.json +2 -1
- package/scripts/build-manifest.js +20 -4
- package/scripts/detect-repo.js +27 -1
- package/scripts/lib/domains.js +3 -2
- package/scripts/lib/skill-lint.js +29 -0
- package/scripts/lib/spec-gate.js +122 -0
- package/scripts/spec-gate.js +58 -0
- package/skills/animate/SKILL.md +228 -0
- package/skills/animate/evals/cases.yaml +36 -0
- package/skills/animate/references/recipes.md +324 -0
- package/skills/animate-expo/SKILL.md +281 -0
- package/skills/animate-expo/evals/cases.yaml +36 -0
- package/skills/animate-expo/references/recipes.md +385 -0
- package/skills/animation-vocabulary/SKILL.md +189 -0
- package/skills/animation-vocabulary/evals/cases.yaml +31 -0
- package/skills/apple-design/SKILL.md +301 -0
- package/skills/apple-design/evals/cases.yaml +33 -0
- package/skills/ask-sonner/SKILL.md +104 -0
- package/skills/ask-sonner/evals/cases.yaml +33 -0
- package/skills/ask-sonner/references/api.md +64 -0
- package/skills/clarify/SKILL.md +26 -2
- package/skills/design/SKILL.md +8 -0
- package/skills/design/references/motion-and-interaction.md +14 -3
- package/skills/design/references/visual-system.md +4 -3
- package/skills/design-eng/SKILL.md +724 -0
- package/skills/design-eng/evals/cases.yaml +36 -0
- package/skills/expo/SKILL.md +6 -0
- package/skills/find-animation-opportunities/SKILL.md +150 -0
- package/skills/find-animation-opportunities/evals/cases.yaml +31 -0
- package/skills/improve-animations/SKILL.md +126 -0
- package/skills/improve-animations/evals/cases.yaml +31 -0
- package/skills/improve-animations/references/audit.md +115 -0
- package/skills/improve-animations/references/plan-template.md +73 -0
- package/skills/pick-ui-library/SKILL.md +100 -0
- package/skills/pick-ui-library/evals/cases.yaml +33 -0
- package/skills/prototype/SKILL.md +113 -0
- package/skills/prototype/evals/cases.yaml +31 -0
- package/skills/prototype/references/picker.md +197 -0
- package/skills/react/SKILL.md +6 -0
- package/skills/react-native/SKILL.md +5 -0
- package/skills/review-animations/SKILL.md +137 -0
- package/skills/review-animations/evals/cases.yaml +34 -0
- package/skills/review-animations/references/standards.md +187 -0
- package/skills/review-animations/scripts/verify.sh +164 -0
- package/skills/specify/SKILL.md +77 -26
- package/skills/specify/evals/cases.yaml +4 -4
- package/skills/specify/references/eliciting-requirements.md +50 -10
- package/skills/specify/references/spec-template.md +19 -5
- package/skills/swift-ios/SKILL.md +7 -0
- package/skills/write-swift/SKILL.md +413 -0
- package/skills/write-swift/evals/cases.yaml +36 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
skill: review-animations
|
|
2
|
+
|
|
3
|
+
should_trigger:
|
|
4
|
+
- prompt: "Review the animations in this pull request and tell me what's wrong with them."
|
|
5
|
+
why: "Reviewing motion in a diff: the skill's core object."
|
|
6
|
+
- prompt: "Is the easing and duration on this modal transition right?"
|
|
7
|
+
why: "A judgement call against the easing and duration standards."
|
|
8
|
+
- prompt: "Check this component's motion against a strict craft bar before I merge it."
|
|
9
|
+
why: "The bar and the merge gate are what this skill provides."
|
|
10
|
+
- prompt: "Critique the transitions I just wrote — be harsh."
|
|
11
|
+
why: "Default-to-flagging posture; approval is earned."
|
|
12
|
+
- prompt: "Did I get the transform-origin and the reduced-motion handling right on this popover?"
|
|
13
|
+
why: "Two of the ten non-negotiable standards, named directly."
|
|
14
|
+
|
|
15
|
+
should_not_trigger:
|
|
16
|
+
- prompt: "Audit the animations across the whole app and give me a prioritized roadmap of fixes."
|
|
17
|
+
route_to: "improve-animations"
|
|
18
|
+
why: "Whole-codebase audit producing plans, not a verdict on one diff."
|
|
19
|
+
- prompt: "Animate this dropdown for me with the right curve and duration."
|
|
20
|
+
route_to: "animate"
|
|
21
|
+
why: "Building the animation, not reviewing one."
|
|
22
|
+
- prompt: "Review this pull request for SQL injection and missing authorization checks."
|
|
23
|
+
route_to: "code-review"
|
|
24
|
+
why: "Non-motion code review; this skill declines and points there."
|
|
25
|
+
- prompt: "What could be animated in this settings page that isn't animated today?"
|
|
26
|
+
route_to: "find-animation-opportunities"
|
|
27
|
+
why: "Looking for absent motion, not judging present motion."
|
|
28
|
+
- prompt: "Pick a library for the command palette instead of the div-based one we have."
|
|
29
|
+
route_to: "pick-ui-library"
|
|
30
|
+
why: "A dependency choice, not a motion review."
|
|
31
|
+
|
|
32
|
+
capability:
|
|
33
|
+
- scenario: "A diff adds `transition: all 400ms ease-in` and a `transform: scale(0)` entrance to a popover with `transform-origin: center`, and no reduced-motion handling anywhere in the project."
|
|
34
|
+
expect: "Runs scripts/verify.sh first so the countable findings come from the checker (transition-all, ease-in-ui, scale-zero-entrance, origin-center-popover, reduced-motion-missing) and spends judgement on frequency, purpose and cohesion. Blocks rather than approves, and every finding carries the exact replacement value."
|
|
@@ -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
|
+
- **Framer Motion shorthands are NOT hardware-accelerated.** `x`/`y`/`scale` run on the main thread via rAF and drop frames under load. Use the full transform string:
|
|
119
|
+
```jsx
|
|
120
|
+
<motion.div animate={{ x: 100 }} /> // drops frames under load
|
|
121
|
+
<motion.div animate={{ transform: "translateX(100px)" }} /> // hardware accelerated
|
|
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,164 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# verify.sh — the checkable half of the motion craft bar.
|
|
4
|
+
#
|
|
5
|
+
# WHAT THIS IS
|
|
6
|
+
# The source material for these skills (emilkowalski/skills, MIT) ships its "Never Ship" bar as
|
|
7
|
+
# a markdown table: prose an agent may or may not honor. Part of that bar is a plain pattern in
|
|
8
|
+
# the code — `transition: all`, an entrance from `scale(0)`, `ease-in` on a UI transition — and
|
|
9
|
+
# anything that is a pattern belongs in a binary, not in a paragraph (constitution P1).
|
|
10
|
+
#
|
|
11
|
+
# So this script owns the countable half, and the SKILL.md bodies own the half that needs
|
|
12
|
+
# judgement (is the frequency tier right? does the motion have a purpose? does it feel right?).
|
|
13
|
+
# Nothing here can tell you whether an animation feels good. It tells you when it is definitely
|
|
14
|
+
# wrong.
|
|
15
|
+
#
|
|
16
|
+
# WHAT IT CHECKS
|
|
17
|
+
# - the tell registry: one row per checkable motion defect, iterated generically — see
|
|
18
|
+
# motion_tell_table(). Every row has a fixture in tests/fixtures/motion-tells/ and is driven
|
|
19
|
+
# from tests/motion-tells.test.js; a row without a fixture fails the suite.
|
|
20
|
+
# - one counter that cannot be a row: motion present with no prefers-reduced-motion guard
|
|
21
|
+
# anywhere. Absence of a guard is not a pattern match, so it gets its own check and its own
|
|
22
|
+
# named test.
|
|
23
|
+
#
|
|
24
|
+
# HOW TO RUN (inside YOUR project, not the skills repo)
|
|
25
|
+
# bash verify.sh # fail-severity rows break the build; warns are advisory
|
|
26
|
+
# bash verify.sh --strict # treat warnings as failures too
|
|
27
|
+
#
|
|
28
|
+
# EXIT CODES
|
|
29
|
+
# 0 no fail-severity finding (and no warning, under --strict)
|
|
30
|
+
# 1 a fail-severity finding, or --strict with any warning
|
|
31
|
+
# 2 bad usage
|
|
32
|
+
#
|
|
33
|
+
# Missing tools are SKIPPED with a notice, never failed.
|
|
34
|
+
|
|
35
|
+
set -euo pipefail
|
|
36
|
+
|
|
37
|
+
# --- portability: runs on stock macOS bash 3.2 ------------------------------
|
|
38
|
+
# No mapfile, no associative arrays, no `${arr[@]}` under set -u — same constraint as design's
|
|
39
|
+
# verify.sh, for the same reason: the default /bin/bash on macOS is 3.2.
|
|
40
|
+
if [ -z "${BASH_VERSION:-}" ]; then
|
|
41
|
+
printf 'This script requires bash (any version >= 3.2). Run: bash %s\n' "$0" >&2
|
|
42
|
+
exit 2
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
STRICT=0
|
|
46
|
+
while [ "$#" -gt 0 ]; do
|
|
47
|
+
case "$1" in
|
|
48
|
+
--strict) STRICT=1; shift ;;
|
|
49
|
+
-h|--help) sed -n '2,32p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
|
|
50
|
+
*) printf 'unknown argument: %s\n' "$1" >&2; exit 2 ;;
|
|
51
|
+
esac
|
|
52
|
+
done
|
|
53
|
+
|
|
54
|
+
if [ -t 1 ] && [ -z "${NO_COLOR:-}" ]; then
|
|
55
|
+
RED=$'\033[31m'; GREEN=$'\033[32m'; YELLOW=$'\033[33m'; NC=$'\033[0m'
|
|
56
|
+
else
|
|
57
|
+
RED=''; GREEN=''; YELLOW=''; NC=''
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
ok_count=0; skip_count=0; warn_count=0; fail_count=0
|
|
61
|
+
SELF_NAME="$(basename "$0")"
|
|
62
|
+
|
|
63
|
+
ok() { printf '%s ok %s %s\n' "$GREEN" "$NC" "$1"; ok_count=$((ok_count + 1)); }
|
|
64
|
+
skip() { printf '%sskip %s %s\n' "$YELLOW" "$NC" "$1"; skip_count=$((skip_count + 1)); }
|
|
65
|
+
warn() { printf '%swarn %s %s\n' "$YELLOW" "$NC" "$1"; warn_count=$((warn_count + 1)); }
|
|
66
|
+
fail() { printf '%sfail %s %s\n' "$RED" "$NC" "$1"; fail_count=$((fail_count + 1)); }
|
|
67
|
+
|
|
68
|
+
have() { command -v "$1" >/dev/null 2>&1; }
|
|
69
|
+
|
|
70
|
+
search() {
|
|
71
|
+
[ "$#" -gt 0 ] || return 1
|
|
72
|
+
# VERIFY_FORCE_GREP=1 pins the grep branch so the suite can prove both engines agree, instead
|
|
73
|
+
# of only exercising whichever one happens to be installed.
|
|
74
|
+
if have rg && [ -z "${VERIFY_FORCE_GREP:-}" ]; then
|
|
75
|
+
rg -n --no-heading --glob "!$SELF_NAME" "$@"
|
|
76
|
+
else
|
|
77
|
+
local pattern="${*: -1}"
|
|
78
|
+
grep -rnE \
|
|
79
|
+
--exclude="$SELF_NAME" \
|
|
80
|
+
--exclude-dir=node_modules --exclude-dir=.git --exclude-dir=.next \
|
|
81
|
+
--exclude-dir=dist --exclude-dir=build \
|
|
82
|
+
"$pattern" . 2>/dev/null
|
|
83
|
+
fi
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
# --- the tell registry ------------------------------------------------------
|
|
87
|
+
# Columns, delimited by %% (the pattern column needs `|` for ERE alternation):
|
|
88
|
+
# id %% sev %% extensions %% POSIX-ERE pattern %% what to do instead / the legit exception
|
|
89
|
+
#
|
|
90
|
+
# Patterns are POSIX ERE: no lookahead, no \b, no \s — they must behave identically under rg and
|
|
91
|
+
# under grep -E. The bar they encode is adapted from emilkowalski/skills (MIT).
|
|
92
|
+
#
|
|
93
|
+
# Severity is load-bearing, not decoration. `fail` is for a defect with no legitimate reading;
|
|
94
|
+
# `warn` is for a pattern whose exception is real and cannot be seen from one line (a centered
|
|
95
|
+
# modal, an accordion animating height). A table where everything fails gets switched off (P7).
|
|
96
|
+
motion_tell_table() {
|
|
97
|
+
cat <<'TELLS'
|
|
98
|
+
transition-all%%fail%%tsx,jsx,ts,js,css,scss,html,vue,svelte%%transition:[[:space:]]*all|transition-all%%transition: all animates every property that ever changes, including layout ones, and janks. Name the exact properties instead: transition-property: transform, opacity
|
|
99
|
+
scale-zero-entrance%%fail%%tsx,jsx,ts,js,css,scss,html,vue,svelte%%scale\(0\)|scale3d\(0,|scale:[[:space:]]*0[,;}[:space:]]%%nothing in the real world appears from nothing, so an entrance from zero scale reads as broken. Start from scale(0.9)-scale(0.97) plus opacity: 0
|
|
100
|
+
ease-in-ui%%fail%%tsx,jsx,ts,js,css,scss,html,vue,svelte%%(^|[^a-zA-Z])ease-in([^-]|$)%%ease-in starts slow, delaying the exact moment the user is watching, so the interface feels sluggish. Use ease-out, or the stronger cubic-bezier(0.23, 1, 0.32, 1). Legitimate exception: an exit that must accelerate off-screen
|
|
101
|
+
origin-center-popover%%warn%%tsx,jsx,ts,js,css,scss,html,vue,svelte%%transform-origin:[[:space:]]*center%%a popover, dropdown, menu or tooltip should grow out of the trigger that opened it, not out of its own middle. Use transform-origin: var(--transform-origin). Legitimate exception: a modal, which is not anchored to a trigger and stays centered
|
|
102
|
+
layout-property-animation%%warn%%css,scss%%transition-property:[[:space:]]*(width|height|margin|padding|top|left)|transition:[[:space:]]*(width|height|margin|padding|top|left)[[:space:]]%%animating a layout property triggers layout, paint and composite every frame. Animate transform and opacity instead. Legitimate exception: an accordion height, which has no transform equivalent
|
|
103
|
+
motion-shorthand-under-load%%warn%%tsx,jsx,ts,js%%animate=\{\{[[:space:]]*(x|y|scale):%%the Motion x/y/scale shorthands are not hardware-accelerated: they run on the main thread and drop frames while the page is busy. Use the full transform string: animate={{ transform: "translateX(100px)" }}
|
|
104
|
+
TELLS
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
run_motion_tell_table() {
|
|
108
|
+
local line id sev globs pat msg hits exts rest
|
|
109
|
+
# NOT `IFS='%%'`: IFS is a set of characters, so it would split on a single `%`. Parameter
|
|
110
|
+
# expansion splits on the two-character delimiter exactly, which the pattern column needs to
|
|
111
|
+
# keep its ERE `|`.
|
|
112
|
+
while IFS= read -r line; do
|
|
113
|
+
case "$line" in ''|'#'*) continue ;; esac
|
|
114
|
+
id="${line%%"%%"*}"; rest="${line#*"%%"}"
|
|
115
|
+
sev="${rest%%"%%"*}"; rest="${rest#*"%%"}"
|
|
116
|
+
globs="${rest%%"%%"*}"; rest="${rest#*"%%"}"
|
|
117
|
+
pat="${rest%%"%%"*}"; msg="${rest#*"%%"}"
|
|
118
|
+
exts="${globs//,/|}"
|
|
119
|
+
# Two post-filters, both taken from design/scripts/verify.sh where they were learned from a
|
|
120
|
+
# real run: keep only the extensions the row declares (anchored before the first colon, so it
|
|
121
|
+
# behaves the same under rg and grep and never matches content that merely names a file), and
|
|
122
|
+
# drop matches that sit inside a code comment. `ease-in` in `/* not ease-in */` is not code,
|
|
123
|
+
# and flagging it trains the reader to ignore the tool.
|
|
124
|
+
hits="$(search "$pat" 2>/dev/null \
|
|
125
|
+
| grep -E "^[^:]*\.($exts):" \
|
|
126
|
+
| grep -vE "^[^:]*:[0-9]+:[[:space:]]*(//|/\*|\*[^a-zA-Z]|#|<!--|\{/\*)" || true)"
|
|
127
|
+
if [ -n "$hits" ]; then
|
|
128
|
+
case "$sev" in
|
|
129
|
+
warn) warn "$id: $msg" ;;
|
|
130
|
+
*) fail "$id: $msg" ;;
|
|
131
|
+
esac
|
|
132
|
+
printf '%s\n' "$hits" | head -n 5
|
|
133
|
+
fi
|
|
134
|
+
done <<EOF
|
|
135
|
+
$(motion_tell_table)
|
|
136
|
+
EOF
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
# --- the counter that cannot be a row ---------------------------------------
|
|
140
|
+
# Absence of a guard has no line to match, so it cannot ride the generic mechanism. It carries its
|
|
141
|
+
# own named test instead of pretending to be a row.
|
|
142
|
+
reduced_motion_counter() {
|
|
143
|
+
# Only meaningful where motion actually exists: telling a backend repo to add a reduced-motion
|
|
144
|
+
# guard is the noise that gets a checker switched off.
|
|
145
|
+
if search 'transition:|transition-property|@keyframes|animation:|animate=\{|useSpring|animate-\[' >/dev/null 2>&1; then
|
|
146
|
+
if search 'prefers-reduced-motion|useReducedMotion|motion-safe:|motion-reduce:' >/dev/null 2>&1; then
|
|
147
|
+
ok "reduced-motion-missing: motion is present and a reduced-motion guard was found"
|
|
148
|
+
else
|
|
149
|
+
fail "reduced-motion-missing: this project animates but no prefers-reduced-motion guard was found anywhere. Reduced motion means fewer and gentler animations, not zero: keep opacity and color transitions that aid comprehension, drop movement and position changes"
|
|
150
|
+
fi
|
|
151
|
+
else
|
|
152
|
+
skip "reduced-motion-missing: no motion found in this project, nothing to guard"
|
|
153
|
+
fi
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
# --- run --------------------------------------------------------------------
|
|
157
|
+
run_motion_tell_table
|
|
158
|
+
reduced_motion_counter
|
|
159
|
+
|
|
160
|
+
printf '\nok=%d skip=%d warn=%d fail=%d\n' "$ok_count" "$skip_count" "$warn_count" "$fail_count"
|
|
161
|
+
|
|
162
|
+
if [ "$fail_count" -gt 0 ]; then exit 1; fi
|
|
163
|
+
if [ "$STRICT" -eq 1 ] && [ "$warn_count" -gt 0 ]; then exit 1; fi
|
|
164
|
+
exit 0
|
package/skills/specify/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: specify
|
|
3
|
-
description: "Use when a feature, change, or product idea is still fuzzy and must become an approved WHAT/WHY spec before any planning or code — the brainstorming front door of SDD. Turns a one-line intent into problem, goals, users, scope, behaviour and acceptance criteria, via
|
|
3
|
+
description: "Use when a feature, change, or product idea is still fuzzy and must become an approved WHAT/WHY spec before any planning or code — the brainstorming front door of SDD. Turns a one-line intent into problem, goals, users, scope, behaviour and acceptance criteria, via frontier-round dialogue and 2-3 approaches with a recommendation, carrying zero implementation detail. Fires whenever someone jumps to HOW before WHAT is agreed, in any language. NOT the technical plan (that is `plan`), NOT the de-risking ambiguity sweep (that is `clarify`), NOT project-wide principles (that is `constitution`)."
|
|
4
4
|
tags: [sdd, spec, requirements]
|
|
5
5
|
recommends: [clarify, plan]
|
|
6
6
|
profiles: [core, full]
|
|
@@ -29,9 +29,11 @@ A **yes engages autopilot** (`../sdd/SKILL.md`): you still write the spec and ev
|
|
|
29
29
|
|
|
30
30
|
## The one rule that defines this skill
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
A spec is a **contract**: what the system will observably do, and why that matters. Every line either belongs in the contract or belongs to how the contract gets honoured — and the second kind is `plan`'s, not yours. Framework, table schema, library, endpoint shape, file path, algorithm: all of them are how, so the moment one appears the document has stopped being a contract.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
One question settles every judgement call in this skill: **is this a clause of the contract, or a detail of how it gets met?**
|
|
35
|
+
|
|
36
|
+
If you cannot state a requirement without naming the technology, that is a real open question — record it as a typed point to clarify, do not guess the answer.
|
|
35
37
|
|
|
36
38
|
## Model tier — `balanced` (opt-in routing)
|
|
37
39
|
|
|
@@ -41,23 +43,25 @@ This phase's default model tier is **`balanced`** — it drafts the what/why spe
|
|
|
41
43
|
|
|
42
44
|
Before asking anything, read `02-DOCS/wiki/harness/user-profile.md` for the technical level and accompaniment level, and adapt:
|
|
43
45
|
|
|
44
|
-
- **L0 "cavernícola"** — infer aggressively from the intent and any existing wiki/constitution. Ask only the questions whose answer would change the
|
|
46
|
+
- **L0 "cavernícola"** — infer aggressively from the intent and any existing wiki/constitution. Ask only the questions whose answer would change the contract. Draft, show, move on.
|
|
45
47
|
- **L1 "breve"** — one line of *why* per question; ask the few that genuinely matter.
|
|
46
48
|
- **L2 "explica decisiones"** — justify each requirement as you record it; surface the trade-offs you inferred.
|
|
47
|
-
- **L3 "acompañamiento total"** — explain what a spec is and is not, walk every section, ask freely (still one
|
|
49
|
+
- **L3 "acompañamiento total"** — explain what a spec is and is not, walk every section, ask freely (still one round per frontier, never crossing a dependency), confirm each answer before recording it. Ideal for non-technical users.
|
|
48
50
|
|
|
49
51
|
If no profile exists, default to non-technical framing and keep questions plain. Never assume fluency.
|
|
50
52
|
|
|
51
|
-
## Questioning discipline —
|
|
53
|
+
## Questioning discipline — ask the frontier, never cross a dependency
|
|
52
54
|
|
|
53
|
-
The failure mode of specs is the wall of twenty questions.
|
|
55
|
+
The failure mode of specs is the wall of twenty questions. The cure is not one question per turn: that spends a turn of the user's time per question even when the questions do not touch each other. The cure is the **frontier**.
|
|
54
56
|
|
|
55
57
|
1. **Infer first.** Read the `constitution` (`02-DOCS/wiki/sdd/constitution.md`), the existing wiki, and sibling specs. Fill every section you reasonably can from what already exists.
|
|
56
|
-
2. **Ask only the gaps that change the
|
|
57
|
-
3. **
|
|
58
|
-
4. **
|
|
58
|
+
2. **Ask only the gaps that change the contract.** A gap earns a question only if a different answer would move scope, a goal, a user, or an acceptance criterion. Cosmetic gaps become typed *points to clarify*, not questions.
|
|
59
|
+
3. **Ask the whole frontier in one round.** The frontier is every remaining gap whose prerequisites are already settled — the questions you can ask *now* without guessing at answers you have not heard yet. Number them, give each your recommended answer, then wait. Where the harness offers a native question selector, use it; where it does not, emit the same round as numbered text.
|
|
60
|
+
4. **Never cross a dependency.** A gap whose answer depends on another question open in *this* round belongs to a later round. Recompute the frontier after every set of answers: settled decisions push it outward and unblock what waited on them. If an answer redefines a question you already emitted in the same round, discard that question out loud and re-ask it next round rather than using an answer given under a premise that just moved.
|
|
61
|
+
5. **Facts are your job; decisions are the user's.** When a frontier question needs a fact from the environment, go find it — and do not block on it. A running search is an unsettled prerequisite, so only the questions downstream of it wait; ask the rest of the frontier now.
|
|
62
|
+
6. **When inference and asking both fail, type it.** Anything unresolved becomes a typed entry in *Points to clarify* — the handoff contract to `clarify`, not a defect.
|
|
59
63
|
|
|
60
|
-
|
|
64
|
+
A frontier of one is one question, and needs no apology. A frontier of zero is no question at all: never invent one to look diligent.
|
|
61
65
|
|
|
62
66
|
## What a good spec contains
|
|
63
67
|
|
|
@@ -71,7 +75,7 @@ Write these sections into `02-DOCS/wiki/sdd/specs/<slug>.md` using `references/s
|
|
|
71
75
|
| Users & context | Who acts, their context, what they're trying to achieve | An imagined user no one asked for |
|
|
72
76
|
| Behaviour | What the system does, in observable terms, incl. main + edge + error paths | A verb that's actually a HOW ("queries", "caches") |
|
|
73
77
|
| Acceptance criteria | Testable, binary checks that say "done" | Vague critera ("works well", "is fast") |
|
|
74
|
-
| Points to clarify |
|
|
78
|
+
| Points to clarify | The typed handoff to `clarify` — see the four types below | An untyped list, or pretending there are none |
|
|
75
79
|
|
|
76
80
|
### Acceptance criteria carry the weight
|
|
77
81
|
|
|
@@ -85,6 +89,33 @@ Then they see an empty-cart message and the "pay" button is disabled
|
|
|
85
89
|
|
|
86
90
|
A criterion that needs a human to "decide if it's good enough" is not done yet — sharpen it or move the soft part to *Points to clarify*.
|
|
87
91
|
|
|
92
|
+
### Points to clarify carry a type
|
|
93
|
+
|
|
94
|
+
*Points to clarify* is the handoff to `clarify`, and it holds four different objects that need four
|
|
95
|
+
different actions. An untyped list makes `clarify` treat all of them as questions, so it re-asks what
|
|
96
|
+
you already decided and touches what you deliberately deferred. Type every entry:
|
|
97
|
+
|
|
98
|
+
| Type | What it is | What `clarify` does with it |
|
|
99
|
+
| --- | --- | --- |
|
|
100
|
+
| **pregunta abierta** | Formulable with precision right now, unanswered | Asks it |
|
|
101
|
+
| **suposición tomada** | You decided it; the basis is written down | Validates it — does it still hold? |
|
|
102
|
+
| **decisión diferida** | Sharp, out of this cycle on purpose | Leaves it alone |
|
|
103
|
+
| **área no formulable** | Known to be coming, not yet sharp enough to phrase | Notes it; it graduates when it sharpens |
|
|
104
|
+
|
|
105
|
+
The test that separates the last two from a question is **sharpness, not difficulty**: *can you state
|
|
106
|
+
the question precisely now?* — not *can you answer it?* Sharp → **pregunta abierta**. Not sharp →
|
|
107
|
+
**área no formulable**. Beyond what this change is for → `Non-goals`, where it never graduates.
|
|
108
|
+
|
|
109
|
+
Write the type in bold at the head of the entry, and give a `suposición tomada` its basis:
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
- **suposición tomada** — el enlace caduca en minutos, no en horas. *Base:* el patrón de los
|
|
113
|
+
proveedores que ya usamos. *Riesgo:* si el soporte pide horas, el criterio de aceptación cambia.
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
An entry with no type is read as **pregunta abierta**, the costliest of the four. The default never
|
|
117
|
+
saves you work.
|
|
118
|
+
|
|
88
119
|
## The pass, end to end
|
|
89
120
|
|
|
90
121
|
Run these in order. It is a collaborative dialogue, not a form you fill in silence — and **you do not skip to a design dump.** Track the steps with a todo list so none is dropped.
|
|
@@ -94,23 +125,40 @@ Run these in order. It is a collaborative dialogue, not a form you fill in silen
|
|
|
94
125
|
2. SCOPE check → if the request is several independent subsystems, DECOMPOSE into sub-specs first,
|
|
95
126
|
then brainstorm the FIRST one; each gets its own spec → plan → build cycle
|
|
96
127
|
3. RESTATE in one sentence→ confirm you understood the intent before anything else
|
|
97
|
-
4. ASK
|
|
128
|
+
4. ASK the frontier → only gaps that change the contract; whole frontier per round, numbered, each
|
|
129
|
+
with your recommendation; never cross a dependency; wait, record, recompute
|
|
98
130
|
5. PROPOSE 2-3 approaches → distinct directions with honest trade-offs; lead with your recommendation and why
|
|
99
131
|
6. PRESENT the design → section by section (problem, users, behaviour, acceptance), scaled to complexity;
|
|
100
132
|
after EACH section ask "does this look right?" and adjust before moving on
|
|
101
133
|
7. WRITE the spec → 02-DOCS/wiki/sdd/specs/<slug>.md (WHAT/WHY), index it in 02-DOCS/wiki/index.md
|
|
102
134
|
(the Knowledge map; root CLAUDE.md keeps only a short pointer), commit if a repo
|
|
103
|
-
8. SELF-REVIEW → scan for
|
|
104
|
-
On L2/L3 or
|
|
135
|
+
8. SELF-REVIEW → run the EXIT GATE (below) until green; scan for contradictions, ambiguity,
|
|
136
|
+
scope creep; fix inline. On L2/L3 or high risk, add a FRESH-EYES review
|
|
105
137
|
9. USER APPROVES → ask them to read the written spec and confirm; loop on changes until they approve
|
|
106
138
|
10. HAND OFF → only now, result envelope → clarify/plan. NEVER to implement.
|
|
107
139
|
```
|
|
108
140
|
|
|
109
|
-
**
|
|
110
|
-
```
|
|
141
|
+
**Steps 5-9 are the gate**, stated once under *Detect the moment* above and not restated here: approval at step 9 is what unlocks implementation.
|
|
111
142
|
|
|
112
143
|
`<slug>` is a short kebab-case name derived from the feature (e.g. `bulk-csv-import`, `magic-link-login`). If a spec with that slug exists, read it and update rather than overwrite.
|
|
113
144
|
|
|
145
|
+
### Exit gate — checked, not felt
|
|
146
|
+
|
|
147
|
+
"Complete enough to plan against" cannot tell done from not-done, and the write/review/approve steps
|
|
148
|
+
are visible while you are still asking, pulling attention toward being finished. So the bound is a
|
|
149
|
+
property of the **file**, not of your confidence:
|
|
150
|
+
|
|
151
|
+
> Every template section carries content or an explicit typed open point, and no section holds an
|
|
152
|
+
> unmarked assumption.
|
|
153
|
+
|
|
154
|
+
Run `npm run spec:gate <path>` on the spec you just wrote (no path: the whole corpus). It reports the
|
|
155
|
+
missing and the empty sections by name, and it prints what it does **not** check — the unmarked
|
|
156
|
+
assumption is yours to catch, because no parser can. A red gate means the spec is not closed: name
|
|
157
|
+
the section that failed and fix it before step 9.
|
|
158
|
+
|
|
159
|
+
A gate that has never been seen fail is not known to work, so this one ships with the test that
|
|
160
|
+
watches it fail and pass (`tests/spec-gate.test.js`).
|
|
161
|
+
|
|
114
162
|
### Fresh-eyes spec review (step 8, scaled to the dial)
|
|
115
163
|
|
|
116
164
|
The author's own context is blind to its own gaps — the same mind that wrote the spec self-reviews it
|
|
@@ -191,8 +239,12 @@ A returning user on a new device who does not remember a password.
|
|
|
191
239
|
link can be requested.
|
|
192
240
|
|
|
193
241
|
## Points to clarify
|
|
194
|
-
-
|
|
195
|
-
-
|
|
242
|
+
- **pregunta abierta** — ¿cuánto vale la ventana de validez del enlace?
|
|
243
|
+
- **suposición tomada** — la ventana es corta, en minutos. *Base:* el patrón de los proveedores que
|
|
244
|
+
ya usamos. *Riesgo:* si soporte pide horas, cambia el criterio de aceptación.
|
|
245
|
+
- **decisión diferida** — límite de peticiones por email; fuera de este ciclo.
|
|
246
|
+
- **área no formulable** — qué pasa con las cuentas compartidas; sospecho que hay una pregunta y
|
|
247
|
+
todavía no sé enunciarla.
|
|
196
248
|
```
|
|
197
249
|
|
|
198
250
|
Note what is *absent*: no token format, no table, no email provider, no framework. Those are `plan`'s job.
|
|
@@ -226,17 +278,16 @@ The proposal is allowed to mention options and tradeoffs; the spec that follows
|
|
|
226
278
|
|
|
227
279
|
## Anti-patterns → STOP
|
|
228
280
|
|
|
281
|
+
Only failures with no positive statement elsewhere in this skill. The rules about the frontier, the
|
|
282
|
+
constitution, the 2-3 approaches, the gate, and answer-is-not-approval are stated positively above
|
|
283
|
+
(§Questioning discipline, §Detect the moment, the pass, §Approval is its own exchange) and are not
|
|
284
|
+
repeated here as prohibitions: naming a behaviour makes it more available, not less.
|
|
285
|
+
|
|
229
286
|
| If you're about to… | Reality / Fix |
|
|
230
287
|
| --- | --- |
|
|
231
288
|
| Name a framework, table, endpoint, or library | That's HOW. Strip it; describe the behaviour instead, or log the open question. |
|
|
232
|
-
| Dump 12 questions in one message | One focused question per turn. Infer the rest from the constitution and wiki. |
|
|
233
|
-
| Ask a question you could answer from the constitution | Read it first. Only ask what genuinely changes the spec. |
|
|
234
289
|
| Write "it should work well / be fast / be intuitive" | Not testable. Make it a binary Given/When/Then or move it to Points to clarify. |
|
|
235
|
-
| Skip the whole loop because "this is too simple to design" | That's the rationalization that wastes the most work. Every feature gets the loop; only a literal one-line, zero-risk change skips. |
|
|
236
|
-
| Present one approach as the answer | Offer 2-3 distinct directions with trade-offs and a recommendation; let the user choose before you write the spec. |
|
|
237
290
|
| Hand to `plan`/`implement` before the user approved the written spec | The approval at step 9 is the gate. No design approved → nothing gets built. |
|
|
238
|
-
| Treat the answer to your question as the approval of the spec | They answered the question, and the answer *changed* the spec. Fold it in, say what changed, show it, ask again. |
|
|
239
|
-
| Write `status: aprobada` after a blanket "just run it" | That is autopilot. Record it as such — the record must not overstate the strongest gate in the chain. |
|
|
240
291
|
| Skip non-goals because "it's obvious" | Unsaid scope becomes assumed scope. State what you are *not* doing. |
|
|
241
292
|
| Resolve every ambiguity yourself to look finished | Inventing answers is worse than naming gaps. List them in Points to clarify. |
|
|
242
293
|
| Start designing the solution because it's clearer | Stay on WHAT/WHY. The plan is a later, separate phase. |
|
|
@@ -287,7 +338,7 @@ If `clarify` surfaces answers, they get baked back into this same spec file. Onl
|
|
|
287
338
|
- `../plan/SKILL.md` — turns the de-risked spec into a technical implementation plan (the HOW).
|
|
288
339
|
- `../harness/SKILL.md` — the 02-DOCS wiki + accompaniment dial + decisions log this skill honors.
|
|
289
340
|
- `references/spec-template.md` — the exact section template written to `02-DOCS/wiki/sdd/specs/<slug>.md`.
|
|
290
|
-
- `references/eliciting-requirements.md` — inference checklist + the
|
|
341
|
+
- `references/eliciting-requirements.md` — inference checklist + the frontier-round elicitation pattern.
|
|
291
342
|
|
|
292
343
|
## Orientación (siempre)
|
|
293
344
|
|
|
@@ -63,20 +63,20 @@ should_not_trigger:
|
|
|
63
63
|
capability:
|
|
64
64
|
- scenario: "A user says: 'I want to add magic-link (passwordless) login.' There is a constitution at 02-DOCS/wiki/sdd/constitution.md but no spec yet. Produce the spec."
|
|
65
65
|
must_include:
|
|
66
|
-
- "Reads the accompaniment level from 02-DOCS/wiki/harness/user-profile.md and the constitution first, inferring everything it can before asking, then asks only
|
|
66
|
+
- "Reads the accompaniment level from 02-DOCS/wiki/harness/user-profile.md and the constitution first, inferring everything it can before asking, then asks only contract-changing gaps — the whole FRONTIER in one numbered round, each with its recommendation, and nothing whose answer depends on another question open in that same round."
|
|
67
67
|
- "Stays strictly WHAT/WHY: no framework, token format, database table, endpoint shape, email provider, library, or file path appears in the spec — implementation-laden answers are flagged as points to clarify instead of guessed."
|
|
68
68
|
- "Produces the spec sections: Problem & why, Goals, Non-goals / out of scope, Users & context, Behaviour (main + edge + error paths), Acceptance criteria, Points to clarify."
|
|
69
69
|
- "Writes testable acceptance criteria in Given/When/Then form that verify could later check (e.g. expired-link refusal, unknown-email revealing nothing)."
|
|
70
70
|
- "Writes the file to 02-DOCS/wiki/sdd/specs/<slug>.md (kebab-case slug), indexes it in the root CLAUDE.md Knowledge map under sdd/specs, and logs the spec creation to the canonical SDD decisions log at 02-DOCS/wiki/sdd/decisions.md."
|
|
71
|
-
- "Lists honest Points to clarify
|
|
71
|
+
- "Lists honest Points to clarify as the handoff rather than inventing values, and TYPES each one (pregunta abierta / suposición tomada / decisión diferida / área no formulable) so clarify knows whether to ask it, validate it, or leave it alone; a suposición carries its basis."
|
|
72
72
|
- "Ends by pointing to the clarify phase as the next step in the SDD chain."
|
|
73
73
|
|
|
74
74
|
- scenario: "A user pastes a rough one-liner: 'Let users export all their data as a download.' Show how you'd elicit and capture this without over-asking."
|
|
75
75
|
must_include:
|
|
76
76
|
- "Recovers the underlying problem/why rather than treating the feature request as the problem, and inherits any relevant constraints from the constitution."
|
|
77
|
-
- "Applies the 'would a different answer change the
|
|
77
|
+
- "Applies the 'would a different answer change the contract?' test, then splits what is left by dependency: independent gaps go out together in one round with recommendations, and any gap whose answer hinges on another still-open one is held for the next round rather than asked blind."
|
|
78
78
|
- "Captures observable behaviour (what the user sees/can do) and explicit non-goals / out-of-scope rather than implementation (no file format library, storage, or job-queue detail)."
|
|
79
|
-
- "Turns answers into binary acceptance criteria and defers unresolved items (e.g. data scope, retention, format) to Points to clarify instead of fabricating decisions."
|
|
79
|
+
- "Turns answers into binary acceptance criteria and defers unresolved items (e.g. data scope, retention, format) to typed Points to clarify instead of fabricating decisions, and checks the written file against the phase's exit gate before calling it done."
|
|
80
80
|
- "Notes that the spec is complete-enough-to-plan with open points remaining, and hands off to clarify — not to plan or implementation."
|
|
81
81
|
- "After the user answers a question, folds the answer in, states what changed, shows the revised spec, and asks for approval AGAIN — it does not treat the answer as approval of the spec, including when the user picked the recommended option."
|
|
82
82
|
- "If told to run the whole chain up front, records the approval as autopilot rather than item-by-item, and says the spec is the artifact to review after the fact."
|