@starcier/create-builder 0.0.0-stage → 1.0.0-next.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/LICENSE +21 -0
- package/README.md +62 -2
- package/dist/api.js +44 -0
- package/dist/args.js +79 -0
- package/dist/auth.js +68 -0
- package/dist/cli.js +23 -0
- package/dist/defaults.js +15 -0
- package/dist/errors.js +10 -0
- package/dist/main.js +162 -0
- package/dist/prompt.js +23 -0
- package/dist/slug.js +20 -0
- package/dist/template.js +61 -0
- package/package.json +34 -4
- package/template/.claude/skills/design-system/SKILL.md +177 -0
- package/template/.claude/skills/design-system-audit/SKILL.md +125 -0
- package/template/.claude/skills/design-work-review/SKILL.md +93 -0
- package/template/.claude/skills/process-interviewer/SKILL.md +124 -0
- package/template/.claude/skills/process-interviewer/references/plan-output-template.md +53 -0
- package/template/.claude/skills/process-interviewer/references/skill-output-template.md +72 -0
- package/template/.claude/skills/prototype-page-builder/SKILL.md +76 -0
- package/template/.cursor/rules/code-review.mdc +30 -0
- package/template/.cursor/rules/prototype-authoring.mdc +31 -0
- package/template/.cursor/rules/tokens.mdc +36 -0
- package/template/.cursor/rules/ui-system.mdc +39 -0
- package/template/.env.example +19 -0
- package/template/AGENTS.md +77 -0
- package/template/CLAUDE.md +19 -0
- package/template/README.md +65 -0
- package/template/_gitignore +15 -0
- package/template/docs/design-system-log.md +17 -0
- package/template/eslint.config.js +23 -0
- package/template/index.html +13 -0
- package/template/package.json +35 -0
- package/template/public/favicon.svg +1 -0
- package/template/src/App.tsx +65 -0
- package/template/src/app.css +5 -0
- package/template/src/brand.ts +2 -0
- package/template/src/config.ts +15 -0
- package/template/src/design-system/ThemeProvider.tsx +25 -0
- package/template/src/design-system/components/Button/Button.tsx +15 -0
- package/template/src/design-system/components/Button/button.css +62 -0
- package/template/src/design-system/components/Button/index.ts +1 -0
- package/template/src/design-system/components/Card/Card.tsx +22 -0
- package/template/src/design-system/components/Card/card.css +27 -0
- package/template/src/design-system/components/Card/index.ts +1 -0
- package/template/src/design-system/components/Field/Field.tsx +28 -0
- package/template/src/design-system/components/Field/field.css +37 -0
- package/template/src/design-system/components/Field/index.ts +1 -0
- package/template/src/design-system/components/Modal/Modal.tsx +55 -0
- package/template/src/design-system/components/Modal/index.ts +1 -0
- package/template/src/design-system/components/Modal/modal.css +39 -0
- package/template/src/design-system/components/ThemeToggle/ThemeToggle.tsx +13 -0
- package/template/src/design-system/components/ThemeToggle/index.ts +1 -0
- package/template/src/design-system/global.css +26 -0
- package/template/src/design-system/palette.ts +40 -0
- package/template/src/design-system/theme.ts +55 -0
- package/template/src/design-system/tokens.ts +126 -0
- package/template/src/main.tsx +13 -0
- package/template/src/prototypes/getting-started/welcome/README.md +6 -0
- package/template/src/prototypes/getting-started/welcome/Welcome.tsx +74 -0
- package/template/src/prototypes/getting-started/welcome/data.ts +14 -0
- package/template/src/prototypes/getting-started/welcome/index.ts +2 -0
- package/template/src/prototypes/getting-started/welcome/welcome.css +71 -0
- package/template/src/prototypes/getting-started/welcome/workflows.ts +51 -0
- package/template/src/prototypes/registry.ts +20 -0
- package/template/src/prototypes/workflows.ts +9 -0
- package/template/tsconfig.app.json +28 -0
- package/template/tsconfig.json +7 -0
- package/template/tsconfig.node.json +26 -0
- package/template/vercel.json +4 -0
- package/template/vite.config.ts +12 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-system
|
|
3
|
+
description: Design principles applied automatically when creating or modifying any component or screen in this design system. Covers accessibility (color-alone rule, contrast per theme, reduced motion), token governance (how to fix broken tokens without breaking other components), UX writing, empty/loading/error states, floating elements, icon semantics, typography, and component location. Trigger whenever making any visual or design decision — not just new components, but any edit touching states, colors, typography, icons, or copy.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Design System — Design Principles
|
|
7
|
+
|
|
8
|
+
These principles apply automatically whenever any component is created or modified — without
|
|
9
|
+
needing to be reminded. This is about the design decisions themselves; technical conventions
|
|
10
|
+
live in `AGENTS.md`.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. State is never communicated by color alone — when no other carrier exists
|
|
15
|
+
|
|
16
|
+
If a state is already communicated through text, a number, an icon, or a shape, color is
|
|
17
|
+
reinforcement, not the sole carrier. This rule applies where color is the ONLY distinguishing
|
|
18
|
+
factor (e.g. an empty vs. filled circle with no text or icon inside).
|
|
19
|
+
|
|
20
|
+
Before implementing any state: is there anything besides color that distinguishes it? If not,
|
|
21
|
+
add a shape, icon or text difference.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Dark theme is checked always, for every component — not on request
|
|
26
|
+
|
|
27
|
+
Every component must be verified in both themes before it is considered done. If a color token
|
|
28
|
+
looks unadapted for dark (too light or dark, no contrast, identical value in both sets), catch it
|
|
29
|
+
during the build — don't leave it for the user to discover.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## 3. Contrast is checked separately for light and for dark
|
|
34
|
+
|
|
35
|
+
Passing WCAG AA in light does NOT guarantee passing in dark, and vice versa. Check each theme
|
|
36
|
+
independently, especially muted or disabled states, text on colored surfaces, and small text.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 4. How to resolve a token problem depends on whether the token is used elsewhere
|
|
41
|
+
|
|
42
|
+
If a color token fails a contrast check or looks wrong in one theme:
|
|
43
|
+
|
|
44
|
+
- **Used only in the current component** → fix the token itself, in both sets in `tokens.ts`.
|
|
45
|
+
- **Already used by other components** → do NOT change it globally. Add a NEW semantic token
|
|
46
|
+
for this component with correct light and dark values.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 5. Any token problem is resolved as an explicit decision — never silently patched
|
|
51
|
+
|
|
52
|
+
Before choosing a path from Rule 4, say: "this token is also used in [list] / nowhere else, so I'm
|
|
53
|
+
choosing [A/B]." Never use a TODO comment instead — it hides the problem.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 6. UX writing follows the established copy — or the user decides
|
|
58
|
+
|
|
59
|
+
Before writing any text (labels, placeholders, helper text, errors, empty states, status
|
|
60
|
+
labels), check how existing components and prototypes phrase the same thing: tone, casing,
|
|
61
|
+
length, terminology, punctuation. Match it. If there is no precedent for a case, ask the user
|
|
62
|
+
rather than inventing a rule.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 7. Sizing, spacing, and radius — only from the scales, never hardcoded
|
|
67
|
+
|
|
68
|
+
Padding, gap, radius and sizing come only from `space` and `radius` in `tokens.ts`. If no value
|
|
69
|
+
fits, ask the user whether to add one to the scale.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 8. Empty / Loading / Error states are required, not an afterthought
|
|
74
|
+
|
|
75
|
+
Any component that displays data (lists, cards, tables) needs all three: empty, loading and
|
|
76
|
+
error. If the reference shows only the happy path, flag the gap and ask — do not silently skip.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 9. Icons — semantic consistency, not arbitrary choice
|
|
81
|
+
|
|
82
|
+
The same action or concept always uses the same icon. Before choosing an icon, check whether
|
|
83
|
+
the concept already has one elsewhere, and reuse it.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## 10. Text truncation / overflow is a defined decision, not an accident
|
|
88
|
+
|
|
89
|
+
For text with constrained width, decide upfront: truncate with "…", wrap, or grow the container.
|
|
90
|
+
If the reference doesn't show it, ask.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## 11. Minimum clickable/tap target size
|
|
95
|
+
|
|
96
|
+
Interactive elements have a target of at least 24×24px (44×44px on mobile), even when the visual
|
|
97
|
+
element is smaller.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 12. Reduced motion — animations have a static fallback
|
|
102
|
+
|
|
103
|
+
Any animation or transition respects `prefers-reduced-motion`. `global.css` turns transitions
|
|
104
|
+
off for it; a component with its own animation must not defeat that.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 13. Focus order matches visual order
|
|
109
|
+
|
|
110
|
+
In components with several focusable parts, Tab follows the logical, visual order. Every
|
|
111
|
+
interactive element shows a visible focus ring, using `--color-border-focus`.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## 14. Floating elements overlay content — they never displace it
|
|
116
|
+
|
|
117
|
+
Tooltips, dropdowns, menus and popovers:
|
|
118
|
+
|
|
119
|
+
1. **Overlay adjacent content, never shift it.**
|
|
120
|
+
2. **Are never clipped by a parent** with `overflow: hidden/auto` — render through a portal at
|
|
121
|
+
`document.body` when needed.
|
|
122
|
+
3. **Stack correctly.** Overlays sit between the builder's top bar (200) and its comments and
|
|
123
|
+
tours (9140 and up); use `zIndex` from the tokens. Test inside a scrolling container, not only
|
|
124
|
+
on an empty page.
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 15. Typography — only from the existing text styles
|
|
129
|
+
|
|
130
|
+
Every text element uses a style from `typography` (through `--text-<role>-*`). Never an arbitrary
|
|
131
|
+
size, weight, line-height or family. A new style is created only when the user asks for one.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 16. Colors are never hardcoded; a new color always becomes a token
|
|
136
|
+
|
|
137
|
+
No hex, rgb, hsl or gradient in components or prototypes. If a color doesn't exist yet:
|
|
138
|
+
|
|
139
|
+
1. Add a semantic token to both sets in `tokens.ts` (a role name, not "custom-blue-1").
|
|
140
|
+
2. Give it correct light and dark values immediately (Rules 2 and 3).
|
|
141
|
+
3. Use the new token.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## 17. Component location is verified, not assumed
|
|
146
|
+
|
|
147
|
+
Generic, reusable components live in `src/design-system/components/<Name>/`. Prototype-only
|
|
148
|
+
pieces live in their prototype's folder. Before creating a file, state which it is and why, and
|
|
149
|
+
check it against `AGENTS.md`. A disagreement about the architecture is the user's decision to
|
|
150
|
+
make and document — not something to "fix" silently.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## 18. Never use the native browser tooltip (`title` attribute)
|
|
155
|
+
|
|
156
|
+
The `title` attribute cannot be styled, ignores the tokens and the dark theme, and behaves
|
|
157
|
+
differently across browsers. If the design system has no Tooltip component yet and one is needed,
|
|
158
|
+
propose adding it (Rule 17) rather than reaching for `title`. Icon-only controls still need an
|
|
159
|
+
`aria-label`.
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 19. Changes to the chrome go through the palette
|
|
164
|
+
|
|
165
|
+
The builder's top bar, catalogue and sign-in pages are colored by `src/design-system/palette.ts`,
|
|
166
|
+
which maps tokens onto the `BuilderPalette` contract. When a token used there changes or is
|
|
167
|
+
renamed, update the mapping in the same change. The review and tour controls keep their own fixed
|
|
168
|
+
look on purpose — do not try to restyle them.
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## General principle
|
|
173
|
+
|
|
174
|
+
Before any design decision (color, state, contrast, text, icon, layout), check whether an
|
|
175
|
+
established source of truth exists in this system — the tokens, an existing component, existing
|
|
176
|
+
copy — and follow it. Inventing a plausible-sounding decision without checking is the root cause
|
|
177
|
+
of most errors.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-system-audit
|
|
3
|
+
description: Runs a systematic accessibility, dark-theme, token, and consistency audit over existing design-system components — checking them against the rules in the design-system skill. Use this when the user asks to audit, review, clean up, or check existing components against design-system rules, rather than when building a new component. Also proactively suggested (never auto-run) after every 3rd new component, after a cross-cutting token fix, or when the user flags visible inconsistency between components.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Design System — Audit Skill
|
|
7
|
+
|
|
8
|
+
This skill defines HOW to audit already-built components. It does NOT define the rules — those
|
|
9
|
+
live in the `design-system` skill (design principles) and `AGENTS.md` (technical conventions).
|
|
10
|
+
Read both, every time, before an audit; they may have changed since you last saw them.
|
|
11
|
+
|
|
12
|
+
The audit is read-only until Part 5 (Fixing). No fix is applied without the user confirming the
|
|
13
|
+
report first.
|
|
14
|
+
|
|
15
|
+
The audit keeps its record in `docs/design-system-log.md`: a changes log, past audits, and
|
|
16
|
+
deferred tech debt.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Auto-trigger rule
|
|
21
|
+
|
|
22
|
+
Suggest an audit (never run one without asking) when:
|
|
23
|
+
|
|
24
|
+
1. **Every 3rd new component** since the last audit — count from the log's changes section.
|
|
25
|
+
2. **A cross-cutting token issue was just fixed** (e.g. an unadapted dark value) — the same token
|
|
26
|
+
may be wrong in components that already shipped. Suggest auditing those that share it.
|
|
27
|
+
3. **The user mentions inconsistency** between components ("this looks different from X").
|
|
28
|
+
|
|
29
|
+
Be specific and low-friction:
|
|
30
|
+
|
|
31
|
+
> "This is the 3rd component since the last audit. Want me to run a consistency check across
|
|
32
|
+
> them before we continue?"
|
|
33
|
+
|
|
34
|
+
If the user declines, don't ask again for the same trigger.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Part 1 — Setup
|
|
39
|
+
|
|
40
|
+
1. Read the `design-system` skill in full.
|
|
41
|
+
2. Read `AGENTS.md`.
|
|
42
|
+
3. Read `docs/design-system-log.md` for known tech debt — don't re-discover it, but verify it is
|
|
43
|
+
still accurate.
|
|
44
|
+
4. List every component in `src/design-system/components/`. This is the scope; confirm it with
|
|
45
|
+
the user if the request was ambiguous.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Part 2 — Per-component check
|
|
50
|
+
|
|
51
|
+
Check each component against every rule, one rule at a time. Each outcome is one of:
|
|
52
|
+
|
|
53
|
+
- **Pass** — compliant.
|
|
54
|
+
- **Bug** — visibly broken: wrong color, missing state distinction, broken dark theme, clipped
|
|
55
|
+
popover.
|
|
56
|
+
- **Debt** — violated but not yet visible: a hardcoded value that matches a token today, spacing
|
|
57
|
+
close to but off the scale.
|
|
58
|
+
- **Question** — cannot be decided without the user.
|
|
59
|
+
|
|
60
|
+
Cite the exact file, line or token. Give dark theme (Rules 2–3), hardcoded colors (Rule 16) and
|
|
61
|
+
floating-element stacking (Rule 14) explicit attention even when nothing looks wrong.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Part 3 — Cross-component consistency pass
|
|
66
|
+
|
|
67
|
+
Then look across all components together:
|
|
68
|
+
|
|
69
|
+
- Do equivalent states (active, disabled, error) use the same tokens everywhere, or did
|
|
70
|
+
components invent slightly different values for the same concept?
|
|
71
|
+
- Are icons for the same concept identical (Rule 9)?
|
|
72
|
+
- Do components follow the same file shape (`<Name>.tsx`, `<name>.css`, `index.ts`) and class
|
|
73
|
+
naming (`ds-<name>`)?
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Part 4 — Report (before any code changes)
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
## [Component Name]
|
|
81
|
+
✅ Passes: [rules confirmed compliant, grouped]
|
|
82
|
+
🐛 Bugs:
|
|
83
|
+
[Rule N]: [finding, file/line/token cited]
|
|
84
|
+
💸 Debt:
|
|
85
|
+
[Rule N]: [finding, file/line/token cited]
|
|
86
|
+
❓ Questions:
|
|
87
|
+
[ambiguity, framed as a question]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Order components by severity (most bugs first). Add a final section for cross-component findings.
|
|
91
|
+
|
|
92
|
+
After the report, add a dated entry under "Audits" in `docs/design-system-log.md`:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
- [date] — [N components checked]: [X bugs, Y debt, Z questions]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Part 5 — Fixing
|
|
101
|
+
|
|
102
|
+
Only after the user confirms which items to fix:
|
|
103
|
+
|
|
104
|
+
1. Bugs first, then debt, unless the user says otherwise.
|
|
105
|
+
2. A fix touching a shared token follows the design-system skill's Rules 4–5 — say whether the
|
|
106
|
+
token is used elsewhere before changing it.
|
|
107
|
+
3. Update `docs/design-system-log.md`: remove resolved debt, log what was fixed, and add any debt
|
|
108
|
+
deliberately deferred, with the reason.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Tech debt cleanup trigger
|
|
113
|
+
|
|
114
|
+
The tech-debt list is not a parking lot. Suggest a cleanup pass (never run one unasked) when it
|
|
115
|
+
passes 15 open items, when one category appears 3+ times (a batch fix), or when an item has sat
|
|
116
|
+
through 2 audits. Separate mechanical batch fixes from items that need a design decision first.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## What this skill deliberately does NOT do
|
|
121
|
+
|
|
122
|
+
- Define the design principles — read the `design-system` skill fresh instead.
|
|
123
|
+
- Fix anything during scanning — reporting and fixing are separate, with a user checkpoint.
|
|
124
|
+
- Skip components because they are recent — recency is not evidence of compliance.
|
|
125
|
+
- Run itself — it only suggests, and waits for confirmation to run and to fix.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: design-work-review
|
|
3
|
+
description: Senior front-end code review of design work in this repo — evaluates any change (a prototype, a design-system component, or tokens) for architecture, layering, reusability, maintainability, design-system/token compliance, light and dark themes, and the build/lint gate. Default target is the current branch's diff against its base branch; also accepts an explicit target (a component, a prototype, or a folder). Use when asked to "review my branch / this PR / these changes", "review the <component>/<prototype>", "is this ready to merge", or "senior review of this diff".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Design Work Review
|
|
7
|
+
|
|
8
|
+
You are a **senior front-end engineer** reviewing design work. Judge whether the change is
|
|
9
|
+
well-architected, in the right layer, reusable, maintainable and compliant with the design system
|
|
10
|
+
— not just whether it runs. Cite `file:line`. **Review only; change code only if the user asks
|
|
11
|
+
you to fix findings.**
|
|
12
|
+
|
|
13
|
+
## Repo reality
|
|
14
|
+
|
|
15
|
+
- **Vite + React 19 + TypeScript**, plain CSS driven by tokens, react-router owned by the builder
|
|
16
|
+
shell. Not Next.js, not Tailwind, no CSS-in-JS runtime.
|
|
17
|
+
- **Design system:** `src/design-system/` — `tokens.ts` (the only source of design values),
|
|
18
|
+
`ThemeProvider.tsx` and `theme.ts` (tokens as CSS custom properties, the active theme),
|
|
19
|
+
`palette.ts` (tokens onto the builder's chrome),
|
|
20
|
+
`components/<Name>/` (`<Name>.tsx`, `<name>.css`, `index.ts`).
|
|
21
|
+
- **Prototypes:** `src/prototypes/<folder>/<id>/`, registered in `registry.ts` and
|
|
22
|
+
`workflows.ts`.
|
|
23
|
+
- **Layering:** generic UI belongs in the design system; prototype folders hold only that
|
|
24
|
+
prototype's screen, styles and mock data. Never fork a near-duplicate.
|
|
25
|
+
|
|
26
|
+
## Step 1 — Resolve the scope
|
|
27
|
+
|
|
28
|
+
**Default:** the current branch's diff against its base (ask which, if it isn't obvious), plus
|
|
29
|
+
uncommitted work:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
BASE="${BASE:-main}"
|
|
33
|
+
git fetch origin "$BASE" --quiet 2>/dev/null || true
|
|
34
|
+
git diff --stat "origin/$BASE...HEAD"
|
|
35
|
+
git diff --name-only "origin/$BASE...HEAD"
|
|
36
|
+
git status --short
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Explicit target:** scope to the named component, prototype or folder, plus whatever it wires
|
|
40
|
+
up elsewhere. If ambiguous, list candidates and ask.
|
|
41
|
+
|
|
42
|
+
## Step 2 — Read the rules
|
|
43
|
+
|
|
44
|
+
`AGENTS.md`, and the `design-system` skill for design decisions.
|
|
45
|
+
|
|
46
|
+
## Step 3 — Automated sweeps (on the changed files)
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# raw colors outside tokens.ts
|
|
50
|
+
rg -niE "#[0-9a-f]{3,8}\b|rgba?\(" $FILES
|
|
51
|
+
# raw px design values (spacing, radius and type come from tokens)
|
|
52
|
+
rg -niE ":\s*-?[0-9]+px" $FILES
|
|
53
|
+
# backend / network / auth — forbidden in prototypes
|
|
54
|
+
rg -niE "fetch\(|axios|/api/|useQuery|swr" $FILES
|
|
55
|
+
# raw interactive elements where a component exists
|
|
56
|
+
rg -nE "<(button|input|dialog)\b" $FILES
|
|
57
|
+
# leftovers
|
|
58
|
+
rg -nE "console\.(log|debug)|: any\b|TODO|FIXME" $FILES
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`tokens.ts` is the one place raw values belong; components implementing a primitive (e.g.
|
|
62
|
+
`Button.tsx` rendering `<button>`) are the expected exception to the raw-element sweep.
|
|
63
|
+
|
|
64
|
+
## Step 4 — The rubric (PASS / FAIL / N/A)
|
|
65
|
+
|
|
66
|
+
1. **Architecture & layering** — in the right place; a minimal, typed, prop-driven API; an
|
|
67
|
+
`index.ts` like its siblings.
|
|
68
|
+
2. **Reusability** — composes existing pieces; no near-duplicates; naming consistent.
|
|
69
|
+
3. **Maintainability** — readable, no dead code, strict TypeScript (no `any`), sound effects,
|
|
70
|
+
accessible (roles, `aria-*`, keyboard).
|
|
71
|
+
4. **Design-system compliance** — tokens only; renders in light AND dark (reason about dark
|
|
72
|
+
explicitly); overlays stack between 200 and 9140; a token change used by the chrome is
|
|
73
|
+
reflected in `palette.ts`.
|
|
74
|
+
5. **Quality gate** — run `npm run build` and `npm run lint`; report the actual results.
|
|
75
|
+
6. **Prototypes** (when changed) — no backend; local typed mock data; `data-tour` anchors; a tour
|
|
76
|
+
whose `prototypeId` equals the registry `slug`; registered in both files.
|
|
77
|
+
|
|
78
|
+
## Step 5 — Report
|
|
79
|
+
|
|
80
|
+
- **Verdict:** ✅ Approve / 🔧 Approve with changes / ❌ Request changes.
|
|
81
|
+
- **Summary:** one line per rubric section.
|
|
82
|
+
- **Findings:** ranked, as `severity — file:line — problem — suggested fix`.
|
|
83
|
+
- **Quality gate:** the actual build and lint results.
|
|
84
|
+
- **Nice-to-haves:** separate from must-fix.
|
|
85
|
+
|
|
86
|
+
Severity: **Blocker** — build or lint fails. **High** — raw color or px value, broken dark theme,
|
|
87
|
+
backend in a prototype, a generic component in the wrong layer, a duplicate. **Medium** — weak
|
|
88
|
+
API, raw element where a component exists, missing `index.ts`. **Low** — nits.
|
|
89
|
+
|
|
90
|
+
## Fix mode
|
|
91
|
+
|
|
92
|
+
If asked to fix: apply the fixes, highest severity first, then re-run build and lint and report
|
|
93
|
+
again.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: process-interviewer
|
|
3
|
+
description: Relentless process interviewer that extracts a complete, unambiguous plan from the user's head before any building begins. Use when the user wants to plan a complex task, design a process, build a skill, create a workflow, scope a project, or says things like "I want to build", "let's plan", "help me think through", "I have an idea for", "scope this out", "interview me", "help me figure out the process", "I need a skill that", or any variation where the user has a fuzzy idea that needs to be sharpened into a concrete plan. Also use when the user wants to stress-test a plan, validate their thinking, or get challenged on their assumptions. If the user's goal is to build a skill, this interviewer will automatically create it after the interview is complete. ALWAYS use this skill before jumping into building anything complex. Even if the user seems confident, the interview reveals gaps they didn't know they had.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Process Interviewer
|
|
7
|
+
|
|
8
|
+
You are a relentless interviewer whose job is to extract the complete process from the user's head before anything gets built. Most people think they know what they want, but when pressed on specifics, they discover gaps, contradictions, and unresolved decisions. Your job is to find every one of those gaps.
|
|
9
|
+
|
|
10
|
+
## The Goal
|
|
11
|
+
|
|
12
|
+
The single outcome of this skill is **shared understanding**. By the end of the interview, you and the user should be so aligned on what's being built (or planned) that there are zero surprises when execution starts. Every question you ask exists to close a gap between what's in the user's head and what's in yours. The interview is done when both sides could independently describe the same plan and arrive at the same result.
|
|
13
|
+
|
|
14
|
+
## Why this matters
|
|
15
|
+
|
|
16
|
+
Bad skills and bad plans fail for the same reason: the creator skipped the hard thinking. They jumped to building before they understood the process. This interviewer exists to prevent that. By the time you're done, the shared understanding should be so complete that building becomes mechanical.
|
|
17
|
+
|
|
18
|
+
## How the interview works
|
|
19
|
+
|
|
20
|
+
### Phase 1: The Big Picture (2-4 questions)
|
|
21
|
+
|
|
22
|
+
Start by understanding what the user is trying to accomplish and why. Don't accept vague answers. If they say "I want a skill that helps with LinkedIn posts," push back: What specifically about LinkedIn posts? What's the input? What does success look like? Who is this for?
|
|
23
|
+
|
|
24
|
+
Ask ONE question at a time. After each answer, acknowledge what you heard, then dig deeper or move to the next branch.
|
|
25
|
+
|
|
26
|
+
**Opening question format:** Start with something like: "Before we build anything, I want to make sure we get this right. Let me interview you on this so we don't miss anything. First: [specific question about the goal]."
|
|
27
|
+
|
|
28
|
+
Key things to establish early:
|
|
29
|
+
|
|
30
|
+
- What is the actual goal? (Not "what do you want to build" but "what problem are you solving")
|
|
31
|
+
- Who is this for? (Just the user? A team? Clients?)
|
|
32
|
+
- What does the input look like? (Where does data come from? What format?)
|
|
33
|
+
- What does the output look like? (What gets produced? Where does it go?)
|
|
34
|
+
- Is this a skill they want to build, or just a plan/process they want to clarify?
|
|
35
|
+
|
|
36
|
+
### Phase 2: The Process Deep-Dive (5-15 questions)
|
|
37
|
+
|
|
38
|
+
This is where you get relentless. Walk through the process step by step, and at each step ask:
|
|
39
|
+
|
|
40
|
+
- "What exactly happens here?"
|
|
41
|
+
- "What decisions need to be made at this point?"
|
|
42
|
+
- "What could go wrong here?"
|
|
43
|
+
- "What does the user need to provide vs. what should be automatic?"
|
|
44
|
+
- "Show me an example of what this looks like in practice"
|
|
45
|
+
|
|
46
|
+
**The Relentless Pattern:** For every answer the user gives, ask yourself: "Is this specific enough that I could hand it to a stranger and they'd know exactly what to do?" If not, push deeper.
|
|
47
|
+
|
|
48
|
+
Examples of pushing deeper:
|
|
49
|
+
|
|
50
|
+
- User: "Then it analyzes the content." → You: "Analyzes it how? What are you looking for specifically? Give me an example of content going in and what the analysis should produce."
|
|
51
|
+
- User: "It should write in my tone of voice." → You: "Describe your tone of voice in concrete terms. Show me a paragraph that IS your voice and one that ISN'T. What are the specific patterns?"
|
|
52
|
+
- User: "It formats the output nicely." → You: "Define 'nicely'. What format? What sections? What's required vs optional? Show me an ideal output."
|
|
53
|
+
|
|
54
|
+
**Decision Tree Navigation:** When you hit a branch point (e.g., "it depends on whether the input is a URL or raw text"), resolve BOTH branches before moving on. Don't leave any path unexplored.
|
|
55
|
+
|
|
56
|
+
### Phase 3: Edge Cases and Failure Modes (3-5 questions)
|
|
57
|
+
|
|
58
|
+
Once the happy path is clear, probe the edges:
|
|
59
|
+
|
|
60
|
+
- "What happens when the input is incomplete or malformed?"
|
|
61
|
+
- "What if the user changes their mind halfway through?"
|
|
62
|
+
- "What's the minimum viable input that should still produce useful output?"
|
|
63
|
+
- "Are there cases where this should refuse to proceed? What are they?"
|
|
64
|
+
- "What happens when [specific external dependency] is unavailable?"
|
|
65
|
+
|
|
66
|
+
### Phase 4: Confirmation and Gaps (2-3 questions)
|
|
67
|
+
|
|
68
|
+
Summarize the entire process back to the user as you understand it. Use a structured format:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Here's what I've captured so far:
|
|
72
|
+
|
|
73
|
+
GOAL: [one sentence]
|
|
74
|
+
INPUT: [what goes in]
|
|
75
|
+
PROCESS:
|
|
76
|
+
1. [step with specifics]
|
|
77
|
+
2. [step with specifics]
|
|
78
|
+
...
|
|
79
|
+
OUTPUT: [what comes out]
|
|
80
|
+
EDGE CASES: [how failures are handled]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Then ask: "What did I get wrong? What's missing?" This almost always surfaces 1-2 more things they forgot to mention.
|
|
84
|
+
|
|
85
|
+
### Phase 5: Build or Plan
|
|
86
|
+
|
|
87
|
+
Based on whether the user wants a skill or just a plan:
|
|
88
|
+
|
|
89
|
+
**If building a skill:** Read `references/skill-output-template.md` for the skill structure, then automatically generate the complete skill. Follow the best practices from the article (concise, progressive disclosure, explain the why, avoid over-explaining things Claude already knows). Create the SKILL.md and any necessary reference files. Save them to the workspace.
|
|
90
|
+
|
|
91
|
+
**If just planning:** Read `references/plan-output-template.md` and produce a detailed plan document. Save it to the workspace.
|
|
92
|
+
|
|
93
|
+
## Interview Rules
|
|
94
|
+
|
|
95
|
+
1. **ONE question at a time.** Never ask 2+ questions in a single message. Pick the most important one.
|
|
96
|
+
2. **Answer your own questions from context first.** Before asking the user anything, check whether the answer already exists in the workspace folder this session has access to. Scan existing skills, reference files, CLAUDE.md files, project folders, and any other available context. If the answer is there, state what you found and confirm with the user ("I found [X] in your existing [file]. Does that still hold, or has it changed?") instead of asking them to repeat themselves. Only ask questions the workspace can't answer.
|
|
97
|
+
3. **Recommend an answer.** For every question, provide your suggested answer or best guess based on what you know so far. This gives the user something to react to instead of staring at a blank page. Format: "My recommendation would be [X] because [reason]. Does that match what you're thinking, or would you go a different direction?"
|
|
98
|
+
4. **Acknowledge before advancing.** After each answer, briefly confirm what you heard ("Got it, so the input is always a YouTube URL and the output is...") before asking the next question. This prevents misunderstandings from compounding.
|
|
99
|
+
5. **Don't accept vague answers.** If the user says "it depends" or "whatever works best," push for specifics. Say: "I need you to make a call here. If you had to pick one default approach, what would it be? We can add flexibility later."
|
|
100
|
+
6. **Use concrete examples.** When the user describes something abstract, ask for a concrete example. "Can you show me what a real input would look like? And what the ideal output would be for that input?"
|
|
101
|
+
7. **Track unresolved items.** If the user says "I'll figure that out later," note it and come back to it before Phase 5. Nothing should be unresolved at the end.
|
|
102
|
+
8. **Be conversational, not interrogative.** You're helping them think, not deposing them. Use a warm but persistent tone. Think of it as a collaborative whiteboarding session where you happen to be the one asking all the questions.
|
|
103
|
+
9. **Know when to stop.** The interview is done when: (a) every step of the process is specific enough to implement, (b) edge cases are handled, (c) the user confirms the summary is accurate. Don't keep asking just to ask.
|
|
104
|
+
10. **Adapt question depth to complexity.** Simple skills (3-4 steps) need 8-10 questions total. Complex workflows (10+ steps, multiple branches) might need 15-20. Don't over-interview simple things.
|
|
105
|
+
11. **If the user gets impatient,** explain why you're being thorough: "I know this feels like a lot of questions, but every gap we close now is a rewrite we avoid later. We're almost through the hard part."
|
|
106
|
+
|
|
107
|
+
## Detecting the User's Intent
|
|
108
|
+
|
|
109
|
+
When this skill triggers, immediately determine:
|
|
110
|
+
|
|
111
|
+
1. **Are they building a skill?** Look for: "I want a skill that...", "build me a skill", "create a skill", "turn this into a skill"
|
|
112
|
+
2. **Are they planning a process?** Look for: "help me plan", "think through this", "scope this out", "figure out the process"
|
|
113
|
+
3. **Are they stress-testing an existing plan?** Look for: "grill me on this", "poke holes in my plan", "what am I missing"
|
|
114
|
+
4. **Not sure?** Ask directly in your first question: "Before we dig in: is the end goal to build a skill that Claude can run, or are you looking for a detailed plan you'll execute yourself?"
|
|
115
|
+
|
|
116
|
+
## What Makes This Different from Just Asking Questions
|
|
117
|
+
|
|
118
|
+
Regular planning conversations drift. The user says something vague, the assistant accepts it, and both move on. This skill is different because:
|
|
119
|
+
|
|
120
|
+
- It follows a structured progression (big picture → process → edges → confirmation)
|
|
121
|
+
- It refuses to move forward with ambiguity
|
|
122
|
+
- It always provides a recommendation (the user reacts instead of generating from scratch)
|
|
123
|
+
- It produces a concrete artifact at the end (a skill or a plan document)
|
|
124
|
+
- It tracks what's been resolved and what hasn't
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Plan Output Template
|
|
2
|
+
|
|
3
|
+
After the interview is complete and the user wants a plan (not a skill), produce a document using this structure. Save as a markdown file in the workspace.
|
|
4
|
+
|
|
5
|
+
## Plan Document Structure
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# [Plan Title]
|
|
9
|
+
|
|
10
|
+
## Goal
|
|
11
|
+
[One clear sentence describing what this plan achieves and why it matters]
|
|
12
|
+
|
|
13
|
+
## Context
|
|
14
|
+
[2-3 sentences of background: who is this for, what triggered this, any constraints]
|
|
15
|
+
|
|
16
|
+
## Process Overview
|
|
17
|
+
[Numbered list of high-level steps, each one sentence. This is the "at a glance" version.]
|
|
18
|
+
|
|
19
|
+
## Detailed Steps
|
|
20
|
+
|
|
21
|
+
### Step 1: [Step Name]
|
|
22
|
+
**What happens:** [Specific description]
|
|
23
|
+
**Input:** [What's needed to start this step]
|
|
24
|
+
**Output:** [What this step produces]
|
|
25
|
+
**Decisions:** [Any choices that need to be made]
|
|
26
|
+
**Owner:** [Who does this, if applicable]
|
|
27
|
+
**Notes:** [Anything non-obvious]
|
|
28
|
+
|
|
29
|
+
### Step 2: [Step Name]
|
|
30
|
+
[Same structure as above]
|
|
31
|
+
|
|
32
|
+
[Continue for all steps...]
|
|
33
|
+
|
|
34
|
+
## Edge Cases and Failure Modes
|
|
35
|
+
[Bulleted list of what could go wrong and how to handle each case]
|
|
36
|
+
|
|
37
|
+
## Dependencies and Requirements
|
|
38
|
+
[What needs to be in place before this plan can execute]
|
|
39
|
+
|
|
40
|
+
## Open Questions
|
|
41
|
+
[Anything that came up during the interview that still needs resolution. Should be minimal if the interview was thorough.]
|
|
42
|
+
|
|
43
|
+
## Success Criteria
|
|
44
|
+
[How do you know this plan worked? What metrics or outcomes indicate success?]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Writing Guidelines
|
|
48
|
+
|
|
49
|
+
- Be specific enough that someone who wasn't in the interview could follow the plan
|
|
50
|
+
- Use the user's own language and terminology where possible
|
|
51
|
+
- Every step should pass the "stranger test": could a competent stranger execute this step with no additional context?
|
|
52
|
+
- Include concrete examples where the user provided them during the interview
|
|
53
|
+
- Flag any areas where the user was uncertain or where assumptions were made
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Skill Output Template
|
|
2
|
+
|
|
3
|
+
After the interview is complete and the user wants a skill built, use this template to generate it. Apply the best practices below while writing.
|
|
4
|
+
|
|
5
|
+
## SKILL.md Structure
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
---
|
|
9
|
+
name: [lowercase-with-hyphens, max 64 chars, gerund form preferred]
|
|
10
|
+
description: [What it does + when to trigger. Be specific. Include trigger phrases. Max 1024 chars. Write in third person. Be slightly "pushy" about when to use it so it actually triggers.]
|
|
11
|
+
---
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Best Practices to Apply
|
|
15
|
+
|
|
16
|
+
### Be concise
|
|
17
|
+
Claude is smart. Don't explain what PDFs are or how libraries work. Only add context Claude doesn't already have. Challenge every paragraph: "Does this justify its token cost?"
|
|
18
|
+
|
|
19
|
+
### Explain the why, not just the what
|
|
20
|
+
Instead of "ALWAYS do X", explain why X matters. Claude responds better to understanding the reasoning than to rigid rules.
|
|
21
|
+
|
|
22
|
+
### Set appropriate freedom levels
|
|
23
|
+
- High freedom for judgment calls (code review, writing style)
|
|
24
|
+
- Medium freedom for preferred patterns with acceptable variation
|
|
25
|
+
- Low freedom for fragile operations (database migrations, API sequences)
|
|
26
|
+
|
|
27
|
+
### Use progressive disclosure
|
|
28
|
+
- Keep SKILL.md body under 500 lines
|
|
29
|
+
- Put detailed references in separate files with clear pointers
|
|
30
|
+
- Keep file references one level deep from SKILL.md
|
|
31
|
+
- For files over 100 lines, include a table of contents
|
|
32
|
+
|
|
33
|
+
### Include workflows with checklists
|
|
34
|
+
For multi-step processes, provide a checklist the model can track:
|
|
35
|
+
```
|
|
36
|
+
Task Progress:
|
|
37
|
+
- [ ] Step 1: ...
|
|
38
|
+
- [ ] Step 2: ...
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Build in feedback loops
|
|
42
|
+
Add validation steps: "After step 3, verify the output by [check]. If validation fails, return to step 2."
|
|
43
|
+
|
|
44
|
+
### Use examples
|
|
45
|
+
Input/output pairs are more powerful than descriptions. Show what good output looks like.
|
|
46
|
+
|
|
47
|
+
### Avoid anti-patterns
|
|
48
|
+
- No time-sensitive info ("before August 2025...")
|
|
49
|
+
- Consistent terminology (pick one term, use it everywhere)
|
|
50
|
+
- No vague descriptions ("helps with documents")
|
|
51
|
+
- No deeply nested file references
|
|
52
|
+
- No Windows-style paths
|
|
53
|
+
|
|
54
|
+
## Skill File Organization
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
skill-name/
|
|
58
|
+
├── SKILL.md # Main instructions (under 500 lines)
|
|
59
|
+
├── references/ # Loaded on demand
|
|
60
|
+
│ ├── examples.md # Input/output examples
|
|
61
|
+
│ ├── templates.md # Output templates
|
|
62
|
+
│ └── domain-ref.md # Domain-specific reference
|
|
63
|
+
└── scripts/ # Executed, not loaded into context
|
|
64
|
+
└── utility.py # Deterministic operations
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## After Writing the Skill
|
|
68
|
+
|
|
69
|
+
1. Save all files to the workspace folder
|
|
70
|
+
2. Present the skill to the user with a summary of what was created
|
|
71
|
+
3. Offer to refine or adjust anything
|
|
72
|
+
4. Mention they can install it or use the skill-creator skill to run evals on it
|