takomi 2.0.6 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pi/README.md +124 -0
- package/.pi/agents/architect.md +16 -0
- package/.pi/agents/coder.md +15 -0
- package/.pi/agents/designer.md +18 -0
- package/.pi/agents/orchestrator.md +23 -0
- package/.pi/agents/reviewer.md +17 -0
- package/.pi/extensions/oauth-router/README.md +125 -0
- package/.pi/extensions/oauth-router/commands.ts +380 -0
- package/.pi/extensions/oauth-router/config.ts +200 -0
- package/.pi/extensions/oauth-router/index.ts +41 -0
- package/.pi/extensions/oauth-router/oauth-flow.ts +154 -0
- package/.pi/extensions/oauth-router/oauth-store.ts +121 -0
- package/.pi/extensions/oauth-router/package.json +14 -0
- package/.pi/extensions/oauth-router/policies.ts +27 -0
- package/.pi/extensions/oauth-router/provider.ts +492 -0
- package/.pi/extensions/oauth-router/scripts/vibe-verify.py +98 -0
- package/.pi/extensions/oauth-router/state.ts +174 -0
- package/.pi/extensions/oauth-router/types.ts +153 -0
- package/.pi/extensions/takomi-runtime/command-text.ts +130 -0
- package/.pi/extensions/takomi-runtime/commands.ts +179 -0
- package/.pi/extensions/takomi-runtime/context-panel.ts +282 -0
- package/.pi/extensions/takomi-runtime/index.ts +1288 -0
- package/.pi/extensions/takomi-runtime/profile.ts +114 -0
- package/.pi/extensions/takomi-runtime/routing-policy.ts +105 -0
- package/.pi/extensions/takomi-runtime/shared.ts +492 -0
- package/.pi/extensions/takomi-runtime/subagent-controller.ts +364 -0
- package/.pi/extensions/takomi-runtime/subagent-render.ts +501 -0
- package/.pi/extensions/takomi-runtime/subagent-types.ts +83 -0
- package/.pi/extensions/takomi-runtime/ui.ts +133 -0
- package/.pi/extensions/takomi-subagents/agent-aliases.ts +18 -0
- package/.pi/extensions/takomi-subagents/agents.ts +113 -0
- package/.pi/extensions/takomi-subagents/delegation-plan.ts +95 -0
- package/.pi/extensions/takomi-subagents/dispatch-helpers.ts +26 -0
- package/.pi/extensions/takomi-subagents/dispatch.ts +215 -0
- package/.pi/extensions/takomi-subagents/index.ts +75 -0
- package/.pi/extensions/takomi-subagents/live-updates.ts +83 -0
- package/.pi/extensions/takomi-subagents/native-render.ts +174 -0
- package/.pi/extensions/takomi-subagents/tool-runner.ts +209 -0
- package/.pi/prompts/build-prompt.md +199 -0
- package/.pi/prompts/design-prompt.md +134 -0
- package/.pi/prompts/genesis-prompt.md +133 -0
- package/.pi/prompts/orch-prompt.md +144 -0
- package/.pi/prompts/prime-prompt.md +80 -0
- package/.pi/prompts/takomi-prompt.md +96 -0
- package/.pi/prompts/vibe-primeAgent.md +97 -0
- package/.pi/prompts/vibe-spawnTask.md +133 -0
- package/.pi/prompts/vibe-syncDocs.md +100 -0
- package/.pi/themes/takomi-noir.json +81 -0
- package/README.md +61 -27
- package/assets/.agent/skills/21st-dev-components/21st-handoff.md +146 -0
- package/assets/.agent/skills/21st-dev-components/SKILL.md +198 -0
- package/assets/.agent/skills/21st-dev-components/references/categories.md +91 -0
- package/assets/.agent/skills/21st-dev-components/references/manual-handoff-template.md +79 -0
- package/assets/.agent/skills/21st-dev-components/references/section-detection-rubric.md +59 -0
- package/assets/.agent/skills/21st-dev-components/scripts/_shared.mjs +304 -0
- package/assets/.agent/skills/21st-dev-components/scripts/build-manual-handoff-template.mjs +115 -0
- package/assets/.agent/skills/21st-dev-components/scripts/fetch-21st-source.mjs +65 -0
- package/assets/.agent/skills/21st-dev-components/scripts/resolve-21st-component.mjs +115 -0
- package/assets/.agent/skills/pr-comment-fix/SKILL.md +182 -0
- package/assets/.agent/skills/takomi/SKILL.md +59 -59
- package/package.json +58 -41
- package/src/cli.js +165 -15
- package/src/doctor.js +84 -0
- package/src/harness.js +13 -0
- package/src/pi-harness.js +351 -0
- package/src/pi-installer.js +171 -0
- package/src/pi-takomi-core/index.ts +4 -0
- package/src/pi-takomi-core/orchestration.ts +402 -0
- package/src/pi-takomi-core/routing.ts +93 -0
- package/src/pi-takomi-core/types.ts +173 -0
- package/src/pi-takomi-core/workflows.ts +299 -0
- package/src/skills-installer.js +101 -0
- package/src/utils.js +479 -447
- package/assets/.agent/skills/skill-creator/scripts/__pycache__/quick_validate.cpython-311.pyc +0 -0
- package/assets/.agent/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-311.pyc +0 -0
- package/assets/.agent/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-311.pyc +0 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 21st-dev-components
|
|
3
|
+
description: Use when the user wants to build a React site or app section from 21st.dev components, clone the structure of a reference site with 21st.dev building blocks, browse 21st.dev manually and return copied prompts/code, or says things like "build me a site like this", "use 21st.dev", "copy prompt", "component URL", "hero from 21st", or "match this landing page with ready-made components".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 21st.dev Reference-to-Component Skill
|
|
7
|
+
|
|
8
|
+
This skill routes between two flows:
|
|
9
|
+
|
|
10
|
+
- **Auto mode**: the user provides a reference site URL and wants the agent to inspect it, infer the required sections, choose matching 21st.dev components automatically, and integrate them.
|
|
11
|
+
- **Manual mode**: the user wants guided collection. The agent lists the sections, tells the user what to fetch from 21st.dev, then integrates the returned handoff.
|
|
12
|
+
|
|
13
|
+
Use this skill only for **React-family** projects. If the repo is not React-based, explain that v1 of this skill is React-only and stop.
|
|
14
|
+
|
|
15
|
+
## Bundled Resources
|
|
16
|
+
|
|
17
|
+
- `references/categories.md`
|
|
18
|
+
Use for section-to-category mapping and direct 21st.dev category URLs.
|
|
19
|
+
- `references/manual-handoff-template.md`
|
|
20
|
+
Use when the user is gathering components manually.
|
|
21
|
+
- `references/section-detection-rubric.md`
|
|
22
|
+
Use during Auto mode after crawling the reference site.
|
|
23
|
+
- `scripts/resolve-21st-component.mjs`
|
|
24
|
+
Resolve a 21st.dev component page into normalized metadata.
|
|
25
|
+
- `scripts/fetch-21st-source.mjs`
|
|
26
|
+
Fetch raw source from 21st CDN URLs.
|
|
27
|
+
- `scripts/build-manual-handoff-template.mjs`
|
|
28
|
+
Generate a manual handoff markdown file for the user.
|
|
29
|
+
|
|
30
|
+
## Mode Router
|
|
31
|
+
|
|
32
|
+
### Use Auto mode when
|
|
33
|
+
|
|
34
|
+
- The user gives a live reference site URL.
|
|
35
|
+
- The user says "build me something like this", "clone this layout", or "crawl this site and rebuild it".
|
|
36
|
+
- The user expects the agent to choose components automatically.
|
|
37
|
+
|
|
38
|
+
### Use Manual mode when
|
|
39
|
+
|
|
40
|
+
- The user says they will browse 21st.dev themselves.
|
|
41
|
+
- The user pastes 21st.dev component URLs, copied prompts, code fences, or a markdown handoff file.
|
|
42
|
+
- The user wants the agent to tell them exactly what sections to gather.
|
|
43
|
+
|
|
44
|
+
If Auto mode fails because the site is blocked, brittle, or the 21st lookup is weak, fall back to Manual mode immediately and generate the handoff template instead of dead-ending.
|
|
45
|
+
|
|
46
|
+
## Auto Mode Workflow
|
|
47
|
+
|
|
48
|
+
### Step 1: Crawl the reference site in a browser
|
|
49
|
+
|
|
50
|
+
Use the browser-first workflow from the `webapp-testing` skill. Do not rely only on raw HTML if the page is clearly client-rendered.
|
|
51
|
+
|
|
52
|
+
What to inspect:
|
|
53
|
+
- header / navbar / announcement bars
|
|
54
|
+
- hero block
|
|
55
|
+
- feature grids or card rows
|
|
56
|
+
- social proof / logos
|
|
57
|
+
- testimonials
|
|
58
|
+
- pricing
|
|
59
|
+
- FAQ
|
|
60
|
+
- forms / auth blocks
|
|
61
|
+
- footer
|
|
62
|
+
- app shell elements such as sidebar, table, tabs, or modals
|
|
63
|
+
|
|
64
|
+
Load `references/section-detection-rubric.md` if the page structure is not obvious.
|
|
65
|
+
|
|
66
|
+
### Step 2: Build a page anatomy model
|
|
67
|
+
|
|
68
|
+
Write down the major sections in visual order. For each section, capture:
|
|
69
|
+
- section name
|
|
70
|
+
- rough structure
|
|
71
|
+
- visual tone
|
|
72
|
+
- obvious dependencies such as carousels, motion, video, maps, charts, or forms
|
|
73
|
+
|
|
74
|
+
### Step 3: Map sections to 21st.dev categories
|
|
75
|
+
|
|
76
|
+
Load `references/categories.md` and map each detected section to one or more category slugs.
|
|
77
|
+
|
|
78
|
+
Rules:
|
|
79
|
+
- Match structure first, style second.
|
|
80
|
+
- Use one primary category and optional supporting categories.
|
|
81
|
+
- Decorative elements like shaders, backgrounds, or borders are secondary, not the main section match.
|
|
82
|
+
|
|
83
|
+
### Step 4: Discover and resolve candidate components
|
|
84
|
+
|
|
85
|
+
Search 21st.dev for each mapped category. Once you have likely component URLs:
|
|
86
|
+
|
|
87
|
+
1. Resolve each page:
|
|
88
|
+
```bash
|
|
89
|
+
node scripts/resolve-21st-component.mjs --url "<21st-component-url>" --json
|
|
90
|
+
```
|
|
91
|
+
2. Inspect:
|
|
92
|
+
- dependency count
|
|
93
|
+
- component/demo CDN URLs
|
|
94
|
+
- tags
|
|
95
|
+
- author
|
|
96
|
+
- registry dependency hints
|
|
97
|
+
|
|
98
|
+
### Step 5: Choose the best match automatically
|
|
99
|
+
|
|
100
|
+
Default behavior is **not** to ask the user to choose.
|
|
101
|
+
|
|
102
|
+
Prefer:
|
|
103
|
+
- closest structural match
|
|
104
|
+
- lowest dependency burden
|
|
105
|
+
- compatibility with the current repo
|
|
106
|
+
- easier adaptation to the existing styling system
|
|
107
|
+
|
|
108
|
+
### Step 6: Fetch source and integrate
|
|
109
|
+
|
|
110
|
+
Fetch component/demo source from CDN URLs:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
node scripts/fetch-21st-source.mjs --url "<code-url>" --url "<demo-code-url>" --out-dir tmp/21st
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Then integrate into the repo:
|
|
117
|
+
- adapt file paths to the existing project structure
|
|
118
|
+
- prefer the repo's current component locations
|
|
119
|
+
- prefer existing Tailwind, TypeScript, and shadcn conventions when present
|
|
120
|
+
- if shadcn conventions are absent, adapt rather than forcing `/components/ui`
|
|
121
|
+
- if required dependencies or setup are missing, install/configure them first
|
|
122
|
+
|
|
123
|
+
### Step 7: Report what was selected
|
|
124
|
+
|
|
125
|
+
When you finish, state:
|
|
126
|
+
- which sections were detected
|
|
127
|
+
- which 21st.dev components were selected
|
|
128
|
+
- which dependencies were added
|
|
129
|
+
- any sections that required partial custom adaptation
|
|
130
|
+
|
|
131
|
+
## Manual Mode Workflow
|
|
132
|
+
|
|
133
|
+
### Step 1: Break the page into sections
|
|
134
|
+
|
|
135
|
+
Identify the target sections from the user's request or reference URL:
|
|
136
|
+
- header / navbar
|
|
137
|
+
- hero
|
|
138
|
+
- features
|
|
139
|
+
- testimonials
|
|
140
|
+
- pricing
|
|
141
|
+
- footer
|
|
142
|
+
- sidebar
|
|
143
|
+
- CTA
|
|
144
|
+
- forms
|
|
145
|
+
- tables
|
|
146
|
+
- auth
|
|
147
|
+
- FAQ
|
|
148
|
+
|
|
149
|
+
### Step 2: Tell the user what to collect
|
|
150
|
+
|
|
151
|
+
Use `references/categories.md` to give the exact 21st.dev category links.
|
|
152
|
+
|
|
153
|
+
Generate a checklist file when useful:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
node scripts/build-manual-handoff-template.mjs --sections "header,hero,features,pricing,footer" --out 21st-handoff.md
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Point the user at the template in `references/manual-handoff-template.md` if they want to paste directly in chat instead of using a file.
|
|
160
|
+
|
|
161
|
+
### Step 3: Accept one combined handoff
|
|
162
|
+
|
|
163
|
+
The handoff can contain:
|
|
164
|
+
- 21st.dev URLs
|
|
165
|
+
- copied prompt blocks
|
|
166
|
+
- code fences
|
|
167
|
+
- dependency lists
|
|
168
|
+
- placement notes
|
|
169
|
+
|
|
170
|
+
Do not make the user re-explain the same page structure if the handoff already contains it.
|
|
171
|
+
|
|
172
|
+
### Step 4: Parse and integrate
|
|
173
|
+
|
|
174
|
+
For each returned section:
|
|
175
|
+
- resolve the component URL if present
|
|
176
|
+
- fetch source if needed
|
|
177
|
+
- merge copied prompt/code information with repo context
|
|
178
|
+
- install dependencies
|
|
179
|
+
- adapt imports, component paths, and utility functions to the current repo
|
|
180
|
+
|
|
181
|
+
## Integration Rules
|
|
182
|
+
|
|
183
|
+
- v1 supports React projects broadly.
|
|
184
|
+
- Preserve the repo's existing file layout whenever possible.
|
|
185
|
+
- If Tailwind or TypeScript is missing and the chosen component requires it, explain exactly what must be added before integration.
|
|
186
|
+
- If the component assumes shadcn utilities like `cn` or `@/lib/utils`, either map them to the repo equivalent or add a minimal compatible helper.
|
|
187
|
+
- If one section cannot be matched cleanly, integrate the rest and flag the unmatched section explicitly.
|
|
188
|
+
|
|
189
|
+
## Failure Handling
|
|
190
|
+
|
|
191
|
+
- Bad reference URL or blocked crawl: switch to Manual mode and generate a handoff template.
|
|
192
|
+
- 21st.dev page resolves but source URLs are missing: use the copied prompt path or ask for the component's copied prompt/code only for that section.
|
|
193
|
+
- Non-React target repo: explain the limitation and stop.
|
|
194
|
+
|
|
195
|
+
## Output Defaults
|
|
196
|
+
|
|
197
|
+
- **Auto mode**: inspect, choose, fetch, integrate, report.
|
|
198
|
+
- **Manual mode**: generate checklist, ingest handoff, integrate, report.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# 21st.dev Category Map
|
|
2
|
+
|
|
3
|
+
Use this file when mapping a reference site's sections to 21st.dev buckets or when generating a manual collection checklist.
|
|
4
|
+
|
|
5
|
+
## Landing Page Sections
|
|
6
|
+
|
|
7
|
+
| Section | Primary categories | Secondary categories |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Announcement bar | `announcement` | `badge`, `text`, `link` |
|
|
10
|
+
| Header / Navbar | `navbar-navigation` | `announcement`, `button`, `dropdown`, `menu` |
|
|
11
|
+
| Hero | `hero` | `call-to-action`, `background`, `text`, `image` |
|
|
12
|
+
| Feature grid | `features` | `card`, `icons`, `number` |
|
|
13
|
+
| Social proof / logos | `image` | `icons`, `scroll-area` |
|
|
14
|
+
| Testimonials | `testimonials` | `card`, `carousel` |
|
|
15
|
+
| Pricing | `pricing-section` | `comparison`, `card`, `button` |
|
|
16
|
+
| FAQ | `accordion` | `text` |
|
|
17
|
+
| Footer | `footer` | `link`, `button` |
|
|
18
|
+
|
|
19
|
+
## App / Dashboard Sections
|
|
20
|
+
|
|
21
|
+
| Section | Primary categories | Secondary categories |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| Sidebar | `sidebar` | `menu`, `navbar-navigation`, `scroll-area` |
|
|
24
|
+
| Data table | `table` | `pagination`, `tabs`, `card` |
|
|
25
|
+
| Filters / forms | `form` | `input`, `select`, `radio-group`, `checkbox`, `button` |
|
|
26
|
+
| Dialogs | `modal-dialog` | `popover`, `button`, `toast` |
|
|
27
|
+
| Auth | `sign-in`, `registration-signup` | `form`, `input`, `button` |
|
|
28
|
+
| Chat | `ai-chat` | `input`, `button`, `avatar` |
|
|
29
|
+
|
|
30
|
+
## Raw Category Index
|
|
31
|
+
|
|
32
|
+
| Slug | Label | Count | URL |
|
|
33
|
+
|---|---|---:|---|
|
|
34
|
+
| `announcement` | Announcements | 10 | `https://21st.dev/s/announcement` |
|
|
35
|
+
| `background` | Backgrounds | 33 | `https://21st.dev/s/background` |
|
|
36
|
+
| `border` | Borders | 12 | `https://21st.dev/s/border` |
|
|
37
|
+
| `call-to-action` | Calls to Action | 34 | `https://21st.dev/s/call-to-action` |
|
|
38
|
+
| `comparison` | Comparisons | 6 | `https://21st.dev/s/comparison` |
|
|
39
|
+
| `dock` | Docks | 6 | `https://21st.dev/s/dock` |
|
|
40
|
+
| `features` | Features | 36 | `https://21st.dev/s/features` |
|
|
41
|
+
| `footer` | Footers | 14 | `https://21st.dev/s/footer` |
|
|
42
|
+
| `hero` | Heroes | 73 | `https://21st.dev/s/hero` |
|
|
43
|
+
| `hook` | Hooks | 31 | `https://21st.dev/s/hook` |
|
|
44
|
+
| `image` | Images | 26 | `https://21st.dev/s/image` |
|
|
45
|
+
| `map` | Maps | 2 | `https://21st.dev/s/map` |
|
|
46
|
+
| `navbar-navigation` | Navigation Menus | 11 | `https://21st.dev/s/navbar-navigation` |
|
|
47
|
+
| `pricing-section` | Pricing Sections | 17 | `https://21st.dev/s/pricing-section` |
|
|
48
|
+
| `scroll-area` | Scroll Areas | 24 | `https://21st.dev/s/scroll-area` |
|
|
49
|
+
| `shader` | Shaders | 15 | `https://21st.dev/s/shader` |
|
|
50
|
+
| `testimonials` | Testimonials | 15 | `https://21st.dev/s/testimonials` |
|
|
51
|
+
| `text` | Texts | 58 | `https://21st.dev/s/text` |
|
|
52
|
+
| `video` | Videos | 9 | `https://21st.dev/s/video` |
|
|
53
|
+
| `accordion` | Accordions | 40 | `https://21st.dev/s/accordion` |
|
|
54
|
+
| `ai-chat` | AI Chats | 30 | `https://21st.dev/s/ai-chat` |
|
|
55
|
+
| `alert` | Alerts | 23 | `https://21st.dev/s/alert` |
|
|
56
|
+
| `avatar` | Avatars | 17 | `https://21st.dev/s/avatar` |
|
|
57
|
+
| `badge` | Badges | 25 | `https://21st.dev/s/badge` |
|
|
58
|
+
| `button` | Buttons | 130 | `https://21st.dev/s/button` |
|
|
59
|
+
| `calendar` | Calendars | 34 | `https://21st.dev/s/calendar` |
|
|
60
|
+
| `card` | Cards | 79 | `https://21st.dev/s/card` |
|
|
61
|
+
| `carousel` | Carousels | 16 | `https://21st.dev/s/carousel` |
|
|
62
|
+
| `checkbox` | Checkboxes | 19 | `https://21st.dev/s/checkbox` |
|
|
63
|
+
| `date-picker` | Date Pickers | 12 | `https://21st.dev/s/date-picker` |
|
|
64
|
+
| `modal-dialog` | Dialogs / Modals | 37 | `https://21st.dev/s/modal-dialog` |
|
|
65
|
+
| `dropdown` | Dropdowns | 25 | `https://21st.dev/s/dropdown` |
|
|
66
|
+
| `empty-state` | Empty States | 1 | `https://21st.dev/s/empty-state` |
|
|
67
|
+
| `file-tree` | File Trees | 2 | `https://21st.dev/s/file-tree` |
|
|
68
|
+
| `upload-download` | File Uploads | 7 | `https://21st.dev/s/upload-download` |
|
|
69
|
+
| `form` | Forms | 23 | `https://21st.dev/s/form` |
|
|
70
|
+
| `icons` | Icons | 10 | `https://21st.dev/s/icons` |
|
|
71
|
+
| `input` | Inputs | 102 | `https://21st.dev/s/input` |
|
|
72
|
+
| `link` | Links | 13 | `https://21st.dev/s/link` |
|
|
73
|
+
| `menu` | Menus | 18 | `https://21st.dev/s/menu` |
|
|
74
|
+
| `notification` | Notifications | 5 | `https://21st.dev/s/notification` |
|
|
75
|
+
| `number` | Numbers | 18 | `https://21st.dev/s/number` |
|
|
76
|
+
| `pagination` | Paginations | 20 | `https://21st.dev/s/pagination` |
|
|
77
|
+
| `popover` | Popovers | 23 | `https://21st.dev/s/popover` |
|
|
78
|
+
| `radio-group` | Radio Groups | 22 | `https://21st.dev/s/radio-group` |
|
|
79
|
+
| `select` | Selects | 62 | `https://21st.dev/s/select` |
|
|
80
|
+
| `sidebar` | Sidebars | 10 | `https://21st.dev/s/sidebar` |
|
|
81
|
+
| `sign-in` | Sign Ins | 4 | `https://21st.dev/s/sign-in` |
|
|
82
|
+
| `registration-signup` | Sign ups | 4 | `https://21st.dev/s/registration-signup` |
|
|
83
|
+
| `slider` | Sliders | 45 | `https://21st.dev/s/slider` |
|
|
84
|
+
| `spinner-loader` | Spinner Loaders | 21 | `https://21st.dev/s/spinner-loader` |
|
|
85
|
+
| `table` | Tables | 30 | `https://21st.dev/s/table` |
|
|
86
|
+
| `tabs` | Tabs | 38 | `https://21st.dev/s/tabs` |
|
|
87
|
+
| `chip-tag` | Tags | 6 | `https://21st.dev/s/chip-tag` |
|
|
88
|
+
| `textarea` | Text Areas | 22 | `https://21st.dev/s/textarea` |
|
|
89
|
+
| `toast` | Toasts | 2 | `https://21st.dev/s/toast` |
|
|
90
|
+
| `toggle` | Toggles | 12 | `https://21st.dev/s/toggle` |
|
|
91
|
+
| `tooltip` | Tooltips | 28 | `https://21st.dev/s/tooltip` |
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# 21st.dev Manual Handoff Template
|
|
2
|
+
|
|
3
|
+
Use this structure when the user is gathering 21st.dev pieces manually.
|
|
4
|
+
|
|
5
|
+
## Skeleton
|
|
6
|
+
|
|
7
|
+
Copy this into a markdown file or paste it into chat:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
# 21st.dev Manual Handoff
|
|
11
|
+
|
|
12
|
+
Reference URL:
|
|
13
|
+
https://example.com
|
|
14
|
+
|
|
15
|
+
Page goal:
|
|
16
|
+
Build a React landing page inspired by the reference site.
|
|
17
|
+
|
|
18
|
+
Desired page order:
|
|
19
|
+
- header
|
|
20
|
+
- hero
|
|
21
|
+
- features
|
|
22
|
+
- testimonials
|
|
23
|
+
- pricing
|
|
24
|
+
- footer
|
|
25
|
+
|
|
26
|
+
General project notes:
|
|
27
|
+
- Framework: React / Next.js / Vite
|
|
28
|
+
- Styling stack: Tailwind / CSS modules / other
|
|
29
|
+
- Existing component path:
|
|
30
|
+
- Constraints:
|
|
31
|
+
|
|
32
|
+
## header
|
|
33
|
+
Suggested 21st.dev categories used:
|
|
34
|
+
- https://21st.dev/s/navbar-navigation
|
|
35
|
+
- https://21st.dev/s/announcement
|
|
36
|
+
|
|
37
|
+
Chosen 21st.dev URLs:
|
|
38
|
+
- https://21st.dev/community/components/<author>/<component>/<demo>
|
|
39
|
+
|
|
40
|
+
Copy prompt or notes:
|
|
41
|
+
[Paste the 21st.dev "Copy prompt" block here.]
|
|
42
|
+
|
|
43
|
+
Component code blocks:
|
|
44
|
+
[Paste component source here when needed.]
|
|
45
|
+
|
|
46
|
+
Dependencies:
|
|
47
|
+
- lucide-react
|
|
48
|
+
- framer-motion
|
|
49
|
+
|
|
50
|
+
Placement / styling notes:
|
|
51
|
+
- Use as the top sticky navigation.
|
|
52
|
+
|
|
53
|
+
## hero
|
|
54
|
+
Suggested 21st.dev categories used:
|
|
55
|
+
- https://21st.dev/s/hero
|
|
56
|
+
- https://21st.dev/s/call-to-action
|
|
57
|
+
|
|
58
|
+
Chosen 21st.dev URLs:
|
|
59
|
+
-
|
|
60
|
+
|
|
61
|
+
Copy prompt or notes:
|
|
62
|
+
[Paste copied prompt text here.]
|
|
63
|
+
|
|
64
|
+
Component code blocks:
|
|
65
|
+
[Paste source code here if needed.]
|
|
66
|
+
|
|
67
|
+
Dependencies:
|
|
68
|
+
-
|
|
69
|
+
|
|
70
|
+
Placement / styling notes:
|
|
71
|
+
-
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Rules
|
|
75
|
+
|
|
76
|
+
- Keep one section per page slice.
|
|
77
|
+
- Put every chosen 21st.dev URL in the same document.
|
|
78
|
+
- Include dependency names exactly as shown on 21st.dev or in the copied prompt.
|
|
79
|
+
- If you paste source, include the original filename immediately above the pasted code when possible.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Reference Site Section Detection Rubric
|
|
2
|
+
|
|
3
|
+
Use this when Auto mode crawls a reference site and needs to infer which 21st.dev component families to search.
|
|
4
|
+
|
|
5
|
+
## Detection Order
|
|
6
|
+
|
|
7
|
+
1. Capture the page at the top of the viewport.
|
|
8
|
+
2. Identify the persistent shell first:
|
|
9
|
+
- announcement bar
|
|
10
|
+
- navbar / header
|
|
11
|
+
- sidebar / dock
|
|
12
|
+
3. Walk top to bottom through the main content:
|
|
13
|
+
- hero
|
|
14
|
+
- trust / logos
|
|
15
|
+
- features
|
|
16
|
+
- stats / numbers
|
|
17
|
+
- gallery / image / video blocks
|
|
18
|
+
- testimonials
|
|
19
|
+
- pricing / comparison
|
|
20
|
+
- FAQ / accordion
|
|
21
|
+
- forms / CTA
|
|
22
|
+
- footer
|
|
23
|
+
4. Record both structure and visual traits:
|
|
24
|
+
- column count
|
|
25
|
+
- card density
|
|
26
|
+
- media-heavy or text-heavy
|
|
27
|
+
- dark / light
|
|
28
|
+
- animated / static
|
|
29
|
+
- decorative borders, shaders, or backgrounds
|
|
30
|
+
|
|
31
|
+
## DOM / Visual Heuristics
|
|
32
|
+
|
|
33
|
+
| Signal | Likely section |
|
|
34
|
+
|---|---|
|
|
35
|
+
| Top horizontal bar with few links + logo + CTA | `header`, `navbar` |
|
|
36
|
+
| Large headline + supporting copy + CTA near page top | `hero` |
|
|
37
|
+
| Repeating 3-6 cards with icons or short bullets | `features` |
|
|
38
|
+
| Customer quotes, avatars, star ratings | `testimonials` |
|
|
39
|
+
| Tiered cards with prices, plan names, feature lists | `pricing` |
|
|
40
|
+
| Expand/collapse question rows | `faq` |
|
|
41
|
+
| Long form fields, search, email capture, sign-in area | `form`, `auth` |
|
|
42
|
+
| Fixed left navigation or app shell | `sidebar` |
|
|
43
|
+
| Repeating rows/columns of data | `table`, `dashboard` |
|
|
44
|
+
| Large media, video poster, or carousel | `video`, `gallery`, `carousel` |
|
|
45
|
+
|
|
46
|
+
## Category Mapping Rules
|
|
47
|
+
|
|
48
|
+
- Prefer the exact section category first, then layer supporting categories.
|
|
49
|
+
- For minimalist landing pages, combine `hero` with `text`, `image`, `background`, or `border`.
|
|
50
|
+
- For app-like layouts, combine `sidebar`, `table`, `tabs`, `card`, and `pagination`.
|
|
51
|
+
- If a block is visually impressive but structurally thin, use a decorative category like `background`, `shader`, or `border` in addition to the main section category.
|
|
52
|
+
|
|
53
|
+
## Selection Rules
|
|
54
|
+
|
|
55
|
+
- Match structure before style.
|
|
56
|
+
- Prefer fewer external dependencies when two candidates are equally good.
|
|
57
|
+
- Prefer components whose dependency list fits the target repo.
|
|
58
|
+
- Prefer components whose layout can be adapted without rewriting most of the markup.
|
|
59
|
+
- If the site has a clearly custom section with no close match, fall back to Manual mode for that section only.
|