thomas-agentkit 0.9.0-alpha.0 → 0.9.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -7
- package/dist/cli.js +21 -12
- package/package.json +1 -1
- package/templates/.cursor/rules/agentkit.md +1 -1
- package/templates/.github/copilot-instructions.md +1 -1
- package/templates/AGENTS.md +1 -1
- package/templates/WORKFLOWS.md +1 -1
- package/templates/design-systems/apple.md +74 -209
- package/templates/design-systems/cursor.md +95 -0
- package/templates/design-systems/framer.md +95 -0
- package/templates/design-systems/linear.md +95 -207
- package/templates/design-systems/notion.md +94 -0
- package/templates/design-systems/warp.md +89 -0
- package/templates/skills/agentkit/SKILL.md +12 -5
- package/templates/skills/agentkit/references/design-baselines/apple.md +101 -0
- package/templates/skills/agentkit/references/design-baselines/cursor.md +95 -0
- package/templates/skills/agentkit/references/design-baselines/framer.md +95 -0
- package/templates/skills/agentkit/references/design-baselines/linear.md +117 -0
- package/templates/skills/agentkit/references/design-baselines/notion.md +94 -0
- package/templates/skills/agentkit/references/design-baselines/warp.md +89 -0
- package/templates/skills/agentkit/references/design.md +100 -0
- package/templates/skills/agentkit/references/file-contract.md +6 -5
- package/templates/skills/agentkit/references/init.md +5 -4
- package/templates/skills/agentkit/references/update.md +4 -3
package/README.md
CHANGED
|
@@ -190,7 +190,7 @@ List available presets:
|
|
|
190
190
|
npx thomas-agentkit --list-presets
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
List bundled design
|
|
193
|
+
List bundled design baselines (source variants for `DESIGN.md`):
|
|
194
194
|
|
|
195
195
|
```bash
|
|
196
196
|
npx thomas-agentkit --list-design-systems
|
|
@@ -204,7 +204,7 @@ AgentKit can copy these bundled files into the target project:
|
|
|
204
204
|
- `CHANGE-EXPLANATION.md`
|
|
205
205
|
- `CLAUDE.md`
|
|
206
206
|
- `CODE-QUALITY.md`
|
|
207
|
-
- `DESIGN
|
|
207
|
+
- `DESIGN.md`
|
|
208
208
|
- `IMPLEMENTATION-BRIEF-TEMPLATE.md`
|
|
209
209
|
- `PRD-TEMPLATE.md`
|
|
210
210
|
- `SECURITY-CHECKLIST.md`
|
|
@@ -216,7 +216,7 @@ AgentKit can copy these bundled files into the target project:
|
|
|
216
216
|
|
|
217
217
|
When a preset is selected, AgentKit also installs `STACK.md` and adds a note in `AGENTS.md` telling agents to read it before changing stack-specific code.
|
|
218
218
|
|
|
219
|
-
Bundled design
|
|
219
|
+
Bundled design baselines are stored under `templates/design-systems/` in this repository (`linear`, `apple`, `cursor`, `framer`, `notion`, `warp`). The CLI installs the chosen variant into `DESIGN.md` in the target project; variant paths are not separate install targets. The bundled AgentKit skill also ships copies under `references/design-baselines/` for `/agentkit design`.
|
|
220
220
|
|
|
221
221
|
Existing files are skipped by default so local edits are preserved. Use `--force` when you intentionally want to refresh files from the bundled package version.
|
|
222
222
|
|
|
@@ -232,12 +232,12 @@ Generated content
|
|
|
232
232
|
|
|
233
233
|
Interactive personalization only applies during `agentkit init` when files are created or overwritten. It does not write a config file unless `--write-config` is passed, and `agentkit update` does not reapply personalized values.
|
|
234
234
|
|
|
235
|
-
`agentkit.config.json` can set `preset`, `templateSet`, `designSystem`, `aiTools`, and `personalization` defaults. `templateSet` may be `minimal`, `standard`, or `full`; `designSystem` selects which bundled
|
|
235
|
+
`agentkit.config.json` can set `preset`, `templateSet`, `designSystem`, `aiTools`, and `personalization` defaults. `templateSet` may be `minimal`, `standard`, or `full`; `designSystem` selects which bundled baseline fills `DESIGN.md` (`linear`, `apple`, `cursor`, `framer`, `notion`, or `warp`); `aiTools` may include `codex`, `cursor`, `claude`, and `copilot`. `agentkit update` uses config `preset` and `designSystem` and continues to update all managed bundled templates.
|
|
236
236
|
|
|
237
237
|
Template set mappings:
|
|
238
238
|
|
|
239
239
|
- `minimal`: `AGENTS.md`
|
|
240
|
-
- `standard`: `AGENTS.md`, `CHANGE-EXPLANATION.md`, `CODE-QUALITY.md`, `DESIGN
|
|
240
|
+
- `standard`: `AGENTS.md`, `CHANGE-EXPLANATION.md`, `CODE-QUALITY.md`, `DESIGN.md`, `.github/pull_request_template.md`
|
|
241
241
|
- `full`: all bundled templates, including AI tool adapters and planning/testing/security guides
|
|
242
242
|
|
|
243
243
|
AI tool mappings:
|
|
@@ -273,6 +273,7 @@ The same names mean different things in the terminal vs in an agent session:
|
|
|
273
273
|
| `agentkit doctor` | Agent | Audit guidance quality |
|
|
274
274
|
| `agentkit repair` | Agent | Repair guidance structure after explicit request |
|
|
275
275
|
| `agentkit learn` | Agent | Teach recent codebase changes and check understanding |
|
|
276
|
+
| `agentkit design` | Agent | Create or refresh `DESIGN.md` from a bundled baseline |
|
|
276
277
|
|
|
277
278
|
Never use CLI `agentkit init` for skill installation.
|
|
278
279
|
|
|
@@ -299,14 +300,14 @@ Options:
|
|
|
299
300
|
- `-y, --yes`: accept defaults without prompts
|
|
300
301
|
- `--write-config`: write resolved template install defaults to `agentkit.config.json`
|
|
301
302
|
- `--preset <name>`: install stack-specific guidance (`next`, `sveltekit`, `express`, `convex`, `fullstack`)
|
|
302
|
-
- `--design-system <name>`: design
|
|
303
|
+
- `--design-system <name>`: design baseline for `DESIGN.md` (`linear`, `apple`, `cursor`, `framer`, `notion`, `warp`)
|
|
303
304
|
- `--list`: list bundled template files
|
|
304
305
|
- `--list-presets`: list available presets
|
|
305
306
|
- `--list-design-systems`: list available design systems
|
|
306
307
|
- `-h, --help`: show help
|
|
307
308
|
- `-v, --version`: show package version
|
|
308
309
|
|
|
309
|
-
For `agentkit update`, `--preset <name>` refreshes preset-specific managed content, including `STACK.md`. `--design-system <name>` refreshes the managed `DESIGN
|
|
310
|
+
For `agentkit update`, `--preset <name>` refreshes preset-specific managed content, including `STACK.md`. `--design-system <name>` refreshes the managed `DESIGN.md` body from the matching bundled baseline.
|
|
310
311
|
|
|
311
312
|
## Local Development
|
|
312
313
|
|
package/dist/cli.js
CHANGED
|
@@ -15,10 +15,21 @@ const validPresets = ["next", "sveltekit", "express", "convex", "fullstack"];
|
|
|
15
15
|
const validProjectTypes = ["generic", ...validPresets];
|
|
16
16
|
const validAiTools = ["codex", "cursor", "claude", "copilot"];
|
|
17
17
|
const validTemplateSets = ["minimal", "standard", "full"];
|
|
18
|
-
const validDesignSystems = [
|
|
18
|
+
const validDesignSystems = [
|
|
19
|
+
"linear",
|
|
20
|
+
"apple",
|
|
21
|
+
"cursor",
|
|
22
|
+
"framer",
|
|
23
|
+
"notion",
|
|
24
|
+
"warp",
|
|
25
|
+
];
|
|
19
26
|
const designSystemLabels = {
|
|
20
|
-
linear: "Linear
|
|
21
|
-
apple: "Apple
|
|
27
|
+
linear: "Linear",
|
|
28
|
+
apple: "Apple",
|
|
29
|
+
cursor: "Cursor",
|
|
30
|
+
framer: "Framer",
|
|
31
|
+
notion: "Notion",
|
|
32
|
+
warp: "Warp",
|
|
22
33
|
};
|
|
23
34
|
const configFileName = "agentkit.config.json";
|
|
24
35
|
const configKeys = [
|
|
@@ -61,7 +72,7 @@ const templateSetFiles = {
|
|
|
61
72
|
"AGENTS.md",
|
|
62
73
|
"CHANGE-EXPLANATION.md",
|
|
63
74
|
"CODE-QUALITY.md",
|
|
64
|
-
"DESIGN
|
|
75
|
+
"DESIGN.md",
|
|
65
76
|
".github/pull_request_template.md",
|
|
66
77
|
],
|
|
67
78
|
full: [],
|
|
@@ -153,10 +164,8 @@ async function collectInstallableTemplatePaths(dir, base) {
|
|
|
153
164
|
}
|
|
154
165
|
async function getTemplateFiles() {
|
|
155
166
|
const discovered = await collectInstallableTemplatePaths(templatesDir, templatesDir);
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
: [...discovered, "DESIGN-SYSTEM.md"];
|
|
159
|
-
return withDesignSystem.sort();
|
|
167
|
+
const withDesign = discovered.includes("DESIGN.md") ? discovered : [...discovered, "DESIGN.md"];
|
|
168
|
+
return withDesign.sort();
|
|
160
169
|
}
|
|
161
170
|
function isPresetName(value) {
|
|
162
171
|
return validPresets.includes(value);
|
|
@@ -518,7 +527,7 @@ export function personalizeTemplateContent(file, content, values) {
|
|
|
518
527
|
return content;
|
|
519
528
|
}
|
|
520
529
|
let personalized = content;
|
|
521
|
-
if (file === "AGENTS.md" || file === "DESIGN
|
|
530
|
+
if (file === "AGENTS.md" || file === "DESIGN.md") {
|
|
522
531
|
personalized = replaceIfProvided(personalized, "[Project Name]", values.projectName);
|
|
523
532
|
}
|
|
524
533
|
if (file === "AGENTS.md") {
|
|
@@ -649,7 +658,7 @@ async function buildTemplateContent(file, preset, designSystem) {
|
|
|
649
658
|
}
|
|
650
659
|
return getStackGuidance(preset);
|
|
651
660
|
}
|
|
652
|
-
if (file === "DESIGN
|
|
661
|
+
if (file === "DESIGN.md") {
|
|
653
662
|
const source = path.join(templatesDir, "design-systems", `${designSystem}.md`);
|
|
654
663
|
const content = await readFile(source, "utf8");
|
|
655
664
|
return addStackReference(file, content, preset);
|
|
@@ -943,7 +952,7 @@ Examples:
|
|
|
943
952
|
.option("-y, --yes", "accept defaults for non-interactive runs")
|
|
944
953
|
.option("--write-config", "write resolved install defaults to agentkit.config.json")
|
|
945
954
|
.option("--preset <name>", `install stack-specific guidance (${formatPresetList()})`)
|
|
946
|
-
.option("--design-system <name>", `design
|
|
955
|
+
.option("--design-system <name>", `design baseline for DESIGN.md (${formatDesignSystemList()})`)
|
|
947
956
|
.action(async (target, options) => {
|
|
948
957
|
await applyInitConfig(options, await loadConfigForTarget(target));
|
|
949
958
|
const agentkitVersion = await readPackageVersion();
|
|
@@ -981,7 +990,7 @@ Examples:
|
|
|
981
990
|
.argument("[target]", "target project directory", ".")
|
|
982
991
|
.option("--dry-run", "print planned changes without writing files")
|
|
983
992
|
.option("--preset <name>", `update stack-specific guidance (${formatPresetList()})`)
|
|
984
|
-
.option("--design-system <name>", `design
|
|
993
|
+
.option("--design-system <name>", `design baseline for DESIGN.md (${formatDesignSystemList()})`)
|
|
985
994
|
.action(async (target, options) => {
|
|
986
995
|
const config = await loadConfigForTarget(target);
|
|
987
996
|
if (getInstallMode(config) === "skill") {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ Use this rule as a repository guidance router for Cursor agents and composer wor
|
|
|
11
11
|
## When Relevant
|
|
12
12
|
|
|
13
13
|
- **File edits (final message):** change-explanation format in `AGENTS.md` and `CHANGE-EXPLANATION.md`.
|
|
14
|
-
- **UI / styling / layout:** `DESIGN
|
|
14
|
+
- **UI / styling / layout:** `DESIGN.md` or the project design path from `AGENTS.md`.
|
|
15
15
|
- **Review / refactor / dependencies:** `CODE-QUALITY.md`.
|
|
16
16
|
- **Tests / QA strategy:** `TESTING.md` if present.
|
|
17
17
|
- **Auth / secrets / PII:** `SECURITY-CHECKLIST.md` if present.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Follow `AGENTS.md` first. It is the primary source of truth for this repository's AI-agent guidance.
|
|
4
4
|
|
|
5
|
-
Do not load companion files for routine coding. Use `AGENTS.md` triggers: change explanation after file edits; `CODE-QUALITY.md` for review/refactors;
|
|
5
|
+
Do not load companion files for routine coding. Use `AGENTS.md` triggers: change explanation after file edits; `CODE-QUALITY.md` for review/refactors; `DESIGN.md` or project design path for UI; `TESTING.md`, `SECURITY-CHECKLIST.md`, or `STACK.md` when present and relevant; planning templates only when explicitly requested.
|
|
6
6
|
|
|
7
7
|
For files covered by additional GitHub instructions under `.github/instructions/`, apply those path-specific instructions together with this file.
|
|
8
8
|
|
package/templates/AGENTS.md
CHANGED
|
@@ -19,7 +19,7 @@ For routine bugfixes and small features, do not open `WORKFLOWS.md`, planning te
|
|
|
19
19
|
| Trigger | Action |
|
|
20
20
|
| --- | --- |
|
|
21
21
|
| Any file edits (final message) | Use the change-explanation format in **After Coding (Required)**; see `CHANGE-EXPLANATION.md` for detail |
|
|
22
|
-
| UI, components, styling, layout | Read `[design system path, e.g. docs/design-system.md]`
|
|
22
|
+
| UI, components, styling, layout | Read `DESIGN.md` or `[design system path, e.g. docs/design-system.md]` when set |
|
|
23
23
|
| Review, refactor, dependencies | Read `CODE-QUALITY.md` |
|
|
24
24
|
| Tests, fixtures, QA strategy | Read `TESTING.md` if present |
|
|
25
25
|
| Auth, permissions, secrets, PII | Read `SECURITY-CHECKLIST.md` if present |
|
package/templates/WORKFLOWS.md
CHANGED
|
@@ -14,7 +14,7 @@ Optional process reference for repositories that installed the **full** AgentKit
|
|
|
14
14
|
| Tiny obvious fix | Implement directly; no formal planning doc |
|
|
15
15
|
| User-facing feature or product uncertainty (planning requested) | Create from `PRD-TEMPLATE.md` under `[briefs path, e.g. docs/briefs]` |
|
|
16
16
|
| Multi-file engineering with risk (planning requested) | Create from `IMPLEMENTATION-BRIEF-TEMPLATE.md` under `[briefs path, e.g. docs/briefs]` |
|
|
17
|
-
| UI, styling, layout, navigation, components | `DESIGN
|
|
17
|
+
| UI, styling, layout, navigation, components | `DESIGN.md` or project design path |
|
|
18
18
|
| Security-sensitive change | `SECURITY-CHECKLIST.md` if present |
|
|
19
19
|
| Test strategy or test implementation | `TESTING.md` if present |
|
|
20
20
|
| Review, refactor, dependencies | `CODE-QUALITY.md` |
|
|
@@ -1,236 +1,101 @@
|
|
|
1
|
-
# [Project Name] Design
|
|
1
|
+
# [Project Name] Design — Apple
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Design spec for [Project Name]. Map semantic tokens to `[theme stylesheet path, e.g. src/styles.css]` or your Tailwind theme. Do not hardcode literal colors in components.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Overview
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Photography-first marketing: full-bleed product tiles alternating light and dark canvases, confident display type, and a single Action Blue accent for interactive elements. UI recedes so product imagery leads. One soft product shadow is allowed on photographic renders — never on cards or buttons.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Key characteristics:**
|
|
10
|
+
- Tile alternation (white/parchment ↔ near-black) as section divider
|
|
11
|
+
- Single structural accent (`{colors.primary}`) for CTAs and links
|
|
12
|
+
- Pill CTAs (`{rounded.pill}`) vs compact utility rects (`{rounded.sm}`)
|
|
13
|
+
- Display tracking pulls negative at large sizes; body at 17px
|
|
14
|
+
- No decorative gradients; atmosphere from photography only
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
## Colors
|
|
12
17
|
|
|
13
|
-
|
|
18
|
+
### Brand & Accent
|
|
19
|
+
- `{colors.primary}` — Action Blue (CTAs, links, focus)
|
|
20
|
+
- `{colors.primary-hover}`, `{colors.primary-focus}` — hover and focus variants
|
|
21
|
+
- `{colors.on-primary}` — text on primary fills
|
|
14
22
|
|
|
15
|
-
###
|
|
23
|
+
### Surface
|
|
24
|
+
- `{colors.canvas}` — pure white tile
|
|
25
|
+
- `{colors.canvas-parchment}` — off-white alternating tile
|
|
26
|
+
- `{colors.surface-tile-1}` through `{colors.surface-tile-3}` — dark tile steps
|
|
27
|
+
- `{colors.surface-black}` — nav bar, video void
|
|
28
|
+
- `{colors.hairline}` — card and divider borders
|
|
16
29
|
|
|
17
|
-
|
|
30
|
+
### Text
|
|
31
|
+
- `{colors.ink}` — near-black on light; `{colors.body-on-dark}` on dark tiles
|
|
32
|
+
- `{colors.body-muted}`, `{colors.ink-muted-48}` — secondary and disabled
|
|
18
33
|
|
|
19
|
-
|
|
20
|
-
- `--foreground`: primary text
|
|
21
|
-
- `--muted-foreground`: secondary/meta text
|
|
22
|
-
- `--border`: structural seams
|
|
23
|
-
- `--card`: grouped inset surfaces (forms, settings groups, grouped lists) and dialogs/popovers
|
|
24
|
-
- `--popover`: overlay surfaces
|
|
25
|
-
- `--accent`: subtle hover/active in content areas
|
|
26
|
-
- `--sidebar`: sidebar canvas
|
|
27
|
-
- `--sidebar-accent`: hover/active in sidebar
|
|
28
|
-
- `--primary`: brand and primary CTA (system blue)
|
|
29
|
-
- `--destructive`: danger actions
|
|
30
|
-
- `--ring`: focus ring
|
|
34
|
+
## Typography
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
- Display: system sans (SF Pro Display stack); body: SF Pro Text stack; mono for code snippets
|
|
37
|
+
- Substitute: Inter at 500/600/700 with tightened tracking; JetBrains Mono for mono
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
+
| Token | Use |
|
|
40
|
+
|---|---|
|
|
41
|
+
| `{typography.display-xl}` | Hero headline |
|
|
42
|
+
| `{typography.display-lg}` | Section openers |
|
|
43
|
+
| `{typography.lead}` | Tile taglines |
|
|
44
|
+
| `{typography.body}` | Default body (17px) |
|
|
45
|
+
| `{typography.button}` | Button labels |
|
|
46
|
+
| `{typography.nav-link}` | Global nav |
|
|
39
47
|
|
|
40
|
-
|
|
48
|
+
### Principles
|
|
49
|
+
- Headlines weight 600 with negative tracking; body 400
|
|
50
|
+
- Weight 300 rare and deliberate for large airy reads
|
|
51
|
+
- No weight 500 in the ladder
|
|
41
52
|
|
|
42
|
-
|
|
53
|
+
## Layout
|
|
43
54
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
55
|
+
- Base unit: 8px; section padding `{spacing.section}` ~80px
|
|
56
|
+
- Max width ~1280px; tile stacks edge-to-edge vertically
|
|
57
|
+
- Whitespace = canvas color change between tiles
|
|
46
58
|
|
|
47
|
-
|
|
59
|
+
## Elevation
|
|
48
60
|
|
|
49
|
-
|
|
61
|
+
Flat tiles default. One product shadow on renders resting on surface. Backdrop blur on frosted sub-nav and sticky bars.
|
|
50
62
|
|
|
51
|
-
|
|
52
|
-
- Section heading: `text-lg`, `font-semibold`
|
|
53
|
-
- Body / row label: `text-sm`, `font-normal` to `font-medium`
|
|
54
|
-
- Meta / secondary: `text-xs`, `font-normal`
|
|
55
|
-
- Nav section label: `text-xs uppercase tracking-wide`, `font-medium`
|
|
56
|
-
- Tiny helper: `text-[11px]`, `font-normal`
|
|
63
|
+
## Shapes
|
|
57
64
|
|
|
58
|
-
|
|
65
|
+
| Token | Use |
|
|
66
|
+
|---|---|
|
|
67
|
+
| `{rounded.sm}` 8px | Utility buttons, inputs |
|
|
68
|
+
| `{rounded.lg}` 18px | Cards |
|
|
69
|
+
| `{rounded.pill}` | Primary/secondary pill CTAs |
|
|
70
|
+
| `{rounded.none}` | Full-bleed tiles |
|
|
59
71
|
|
|
60
|
-
|
|
61
|
-
- Use comfortable line height for body (`leading-normal` or `leading-relaxed`).
|
|
62
|
-
- Reserve uppercase for nav section labels and compact metadata.
|
|
72
|
+
## Components
|
|
63
73
|
|
|
64
|
-
|
|
74
|
+
- `{components.button-primary}` — Action Blue pill
|
|
75
|
+
- `{components.button-secondary}` — charcoal pill with hairline
|
|
76
|
+
- `{components.product-tile-light}`, `{components.product-tile-dark}` — full-bleed tiles
|
|
77
|
+
- `{components.store-utility-card}` — bordered white card
|
|
78
|
+
- `{components.global-nav}`, `{components.sub-nav-frosted}` — two-row nav
|
|
79
|
+
- `{components.text-input}` — surface fill, pill or md radius
|
|
65
80
|
|
|
66
|
-
|
|
81
|
+
## Do's and Don'ts
|
|
67
82
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
83
|
+
### Do
|
|
84
|
+
- Use `{colors.primary}` only for interactive signals
|
|
85
|
+
- Alternate light and dark tiles for rhythm
|
|
86
|
+
- Apply `scale(0.95)` as button press state
|
|
87
|
+
- Keep global nav on `{colors.surface-black}`
|
|
72
88
|
|
|
73
|
-
###
|
|
89
|
+
### Don't
|
|
90
|
+
- Don't add decorative gradients or second accents
|
|
91
|
+
- Don't pill-round utility buttons
|
|
92
|
+
- Don't use true `#000000` as canvas
|
|
93
|
+
- Don't shadow cards or buttons
|
|
74
94
|
|
|
75
|
-
|
|
76
|
-
- Hover: subtle `sidebar-accent` background.
|
|
77
|
-
- Active: full-width rounded rectangle, medium weight.
|
|
78
|
-
- Icon size: 14px to 16px.
|
|
79
|
-
- Nav row baseline: `rounded-lg h-9 px-3`.
|
|
95
|
+
## Responsive Behavior
|
|
80
96
|
|
|
81
|
-
|
|
97
|
+
Nav hamburger below 768px. Card grids 3→2→1. Display scales from 80px toward 36px on small phones. Touch targets ≥44px.
|
|
82
98
|
|
|
83
|
-
|
|
84
|
-
- Collapsed width: `3rem` or 48px, icon-only with tooltip.
|
|
85
|
-
- Mobile: sheet/drawer using expanded width.
|
|
86
|
-
- Keyboard shortcut: support the project's standard sidebar toggle shortcut, e.g. `Cmd+B`.
|
|
99
|
+
## Token Mapping
|
|
87
100
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
### App Shell
|
|
91
|
-
|
|
92
|
-
- Sidebar: fixed left, full viewport height, right seam border.
|
|
93
|
-
- Content: `flex-1 min-w-0`, same background canvas.
|
|
94
|
-
- Optional inspector: right panel, `22rem` to `28rem`, collapsible.
|
|
95
|
-
|
|
96
|
-
### Common Page Patterns
|
|
97
|
-
|
|
98
|
-
- List workspace: toolbar plus scrollable list.
|
|
99
|
-
- Detail view: breadcrumbs/title plus body and optional inspector.
|
|
100
|
-
- Editor split: left rail plus center editor.
|
|
101
|
-
- Settings split: nav plus forms inside grouped inset surfaces.
|
|
102
|
-
|
|
103
|
-
### Toolbar Strip
|
|
104
|
-
|
|
105
|
-
- Height: `h-12`.
|
|
106
|
-
- Bottom seam: `border-b border-border/50`.
|
|
107
|
-
- No separate heavy background block.
|
|
108
|
-
|
|
109
|
-
### Page padding
|
|
110
|
-
|
|
111
|
-
- Content padding: `p-4` to `p-6` (16px to 24px) for comfortable reading rhythm.
|
|
112
|
-
|
|
113
|
-
## 5) Interactive Elements
|
|
114
|
-
|
|
115
|
-
### Buttons
|
|
116
|
-
|
|
117
|
-
- Primary: solid `primary` (system blue).
|
|
118
|
-
- Secondary: neutral fill.
|
|
119
|
-
- Ghost: transparent with subtle hover fill.
|
|
120
|
-
- Destructive: `destructive` only for dangerous confirms.
|
|
121
|
-
- Icon-only: `size-9` or `size-10`, ghost, tooltip.
|
|
122
|
-
|
|
123
|
-
Rules:
|
|
124
|
-
|
|
125
|
-
- Default radius: `rounded-lg` using the tokenized radius scale.
|
|
126
|
-
- Sparse shadows; prefer borders for separation on web.
|
|
127
|
-
- Primary buttons are intentional—do not pepper every row with a primary.
|
|
128
|
-
|
|
129
|
-
### Inputs
|
|
130
|
-
|
|
131
|
-
- Default height: `h-9`; relaxed contexts: `h-10` to `h-12`.
|
|
132
|
-
- Tokenized input background and border.
|
|
133
|
-
- Visible focus ring: `ring-2 ring-ring` with comfortable offset.
|
|
134
|
-
- Labels above fields. Do not use floating labels by default.
|
|
135
|
-
|
|
136
|
-
### Menus / Popovers / Dialogs
|
|
137
|
-
|
|
138
|
-
- Tokenized `popover` surface and subtle border.
|
|
139
|
-
- Typography: `text-sm` for menus; `text-sm` to `text-base` for dialogs as needed.
|
|
140
|
-
- Comfortable spacing.
|
|
141
|
-
- Dialog actions align right: secondary then primary.
|
|
142
|
-
|
|
143
|
-
## 6) Lists And Data
|
|
144
|
-
|
|
145
|
-
### Row Anatomy
|
|
146
|
-
|
|
147
|
-
- Relaxed, single-line by default where possible.
|
|
148
|
-
- Hover uses subtle accent fill.
|
|
149
|
-
- Selected row uses tinted fill derived from `--primary` (for example ~12% opacity in light, ~24% in dark) plus medium weight.
|
|
150
|
-
- Avoid per-row borders; separate by spacing and padding rhythm.
|
|
151
|
-
|
|
152
|
-
### Grouping And Tables
|
|
153
|
-
|
|
154
|
-
- Group labels are muted; children are indented or wrapped in grouped inset surfaces.
|
|
155
|
-
- Table headers: compact meta style; avoid heavy uppercase unless it aids scanability.
|
|
156
|
-
- No zebra striping or heavy gridlines.
|
|
157
|
-
|
|
158
|
-
## 7) Status And Feedback
|
|
159
|
-
|
|
160
|
-
- Status: small dots or SF-symbol-style glyphs with semantic meaning (optional).
|
|
161
|
-
- Loading: skeletons for content, spinners only for inline actions.
|
|
162
|
-
- Toasts: soft shadow, corner-pinned or non-intrusive, auto-dismiss.
|
|
163
|
-
- Empty states: icon, short message, and optional single CTA.
|
|
164
|
-
|
|
165
|
-
## 8) Motion
|
|
166
|
-
|
|
167
|
-
- Motion confirms state changes; it is never decorative.
|
|
168
|
-
- Micro interactions: about 200ms.
|
|
169
|
-
- Layout shifts: about 300ms to 350ms.
|
|
170
|
-
- Preferred easing: `cubic-bezier(0.25, 0.1, 0.25, 1)`.
|
|
171
|
-
- Sheets and popovers may use a subtle spring-like overshoot when it aids affordance; keep amplitude low on web.
|
|
172
|
-
- Respect `prefers-reduced-motion` with near-instant transitions.
|
|
173
|
-
|
|
174
|
-
## 9) Spacing System
|
|
175
|
-
|
|
176
|
-
Base unit is 4px, using the project's spacing scale.
|
|
177
|
-
|
|
178
|
-
- `p-1` or 4px: tight internals.
|
|
179
|
-
- `p-2` or 8px: compact section padding.
|
|
180
|
-
- `p-3` or 12px: dense content blocks.
|
|
181
|
-
- `p-4` or 16px: page-level rhythm.
|
|
182
|
-
- `p-6` or 24px: relaxed sections when the layout calls for breathing room.
|
|
183
|
-
|
|
184
|
-
Density guidelines:
|
|
185
|
-
|
|
186
|
-
- Sidebar: relaxed, `h-9` rows.
|
|
187
|
-
- Content: moderate, `h-10` to `h-12` rows.
|
|
188
|
-
- Forms/settings: relaxed, `h-12` to `h-14` rows.
|
|
189
|
-
|
|
190
|
-
## 10) Accessibility
|
|
191
|
-
|
|
192
|
-
- Full keyboard navigation for all controls.
|
|
193
|
-
- Consistent visible focus styles.
|
|
194
|
-
- Semantic landmarks such as `nav` and `main`.
|
|
195
|
-
- Collapsibles expose `aria-expanded`.
|
|
196
|
-
- Ensure WCAG AA contrast in both themes.
|
|
197
|
-
|
|
198
|
-
## 11) Anti-Patterns
|
|
199
|
-
|
|
200
|
-
- Do not wrap routine browsing content in grouped inset surfaces.
|
|
201
|
-
- Do not introduce multiple accent colors.
|
|
202
|
-
- Do not add decorative gradients behind core product surfaces.
|
|
203
|
-
- Do not stack multiple competing toolbars.
|
|
204
|
-
- Do not color-code nav icons.
|
|
205
|
-
- Do not use heavy drop shadows for everyday chrome.
|
|
206
|
-
- Do not hardcode colors or font families in components.
|
|
207
|
-
|
|
208
|
-
## 12) Applying This System
|
|
209
|
-
|
|
210
|
-
### Where Values Live
|
|
211
|
-
|
|
212
|
-
- Theme tokens and base layer: `[theme stylesheet path, e.g. src/styles.css]`.
|
|
213
|
-
- App shell composition: `[route/layout path, e.g. src/routes or app]`.
|
|
214
|
-
- Reusable UI primitives: `[components path, e.g. src/components/ui]`.
|
|
215
|
-
|
|
216
|
-
### New Component Checklist
|
|
217
|
-
|
|
218
|
-
1. Canvas-first or justified grouped inset for grouped controls—not card-first for everything?
|
|
219
|
-
2. Uses 2-3 text hierarchy levels max?
|
|
220
|
-
3. Has subtle hover and clear active states?
|
|
221
|
-
4. Uses primary color only where needed?
|
|
222
|
-
5. Uses spacing rhythm in 4px increments?
|
|
223
|
-
6. Has complete keyboard and focus behavior?
|
|
224
|
-
7. Uses token-driven colors and fonts?
|
|
225
|
-
8. Works in light and dark themes?
|
|
226
|
-
|
|
227
|
-
### For Coding Agents
|
|
228
|
-
|
|
229
|
-
- Read this file before changing UI, layout, navigation, styling, or components.
|
|
230
|
-
- Prefer existing UI primitives and local layout patterns.
|
|
231
|
-
- Do not introduce new visual language without documenting the reason in the implementation brief or PR.
|
|
232
|
-
- Before handoff, check responsive behavior, focus states, text overflow, loading states, empty states, and token usage.
|
|
233
|
-
|
|
234
|
-
### Working Rule
|
|
235
|
-
|
|
236
|
-
Default to these principles unless a deliberate exception is documented in a feature-specific spec.
|
|
101
|
+
Bind roles in `[theme stylesheet path, e.g. src/styles.css]`.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# [Project Name] Design — Cursor
|
|
2
|
+
|
|
3
|
+
Design spec for [Project Name]. Map semantic tokens to `[theme stylesheet path, e.g. src/styles.css]` or your Tailwind theme.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Editorial developer brand on warm cream canvas: quiet display weight 400, single Cursor Orange accent used scarcely, and IDE mockup cards as the primary decorative system. AI timeline pastels are scoped to in-product agent visualizations only.
|
|
8
|
+
|
|
9
|
+
**Key characteristics:**
|
|
10
|
+
- Warm cream `{colors.canvas}` — never pure white page floor
|
|
11
|
+
- Single CTA color `{colors.primary}` (orange)
|
|
12
|
+
- Display weight 400; negative tracking on display only
|
|
13
|
+
- JetBrains Mono on every code surface
|
|
14
|
+
- Hairline-only depth; no drop shadows
|
|
15
|
+
- Timeline pastels: thinking, grep, read, edit, done — agent UI only
|
|
16
|
+
|
|
17
|
+
## Colors
|
|
18
|
+
|
|
19
|
+
### Brand & Accent
|
|
20
|
+
- `{colors.primary}`, `{colors.primary-active}`, `{colors.on-primary}`
|
|
21
|
+
|
|
22
|
+
### Surface
|
|
23
|
+
- `{colors.canvas}` — warm cream page floor
|
|
24
|
+
- `{colors.canvas-soft}` — IDE pane background in mockups
|
|
25
|
+
- `{colors.surface-card}` — white cards on cream
|
|
26
|
+
- `{colors.surface-strong}` — badges
|
|
27
|
+
- `{colors.hairline}`, `{colors.hairline-soft}`, `{colors.hairline-strong}`
|
|
28
|
+
|
|
29
|
+
### Text
|
|
30
|
+
- `{colors.ink}`, `{colors.body}`, `{colors.body-strong}`, `{colors.muted}`, `{colors.muted-soft}`
|
|
31
|
+
|
|
32
|
+
### Timeline (in-product only)
|
|
33
|
+
- `{colors.timeline-thinking}`, `{colors.timeline-grep}`, `{colors.timeline-read}`, `{colors.timeline-edit}`, `{colors.timeline-done}`
|
|
34
|
+
|
|
35
|
+
### Semantic
|
|
36
|
+
- `{colors.semantic-success}`, `{colors.semantic-error}`
|
|
37
|
+
|
|
38
|
+
## Typography
|
|
39
|
+
|
|
40
|
+
- CursorGothic substitute: Inter weight 400/500/600; JetBrains Mono for code
|
|
41
|
+
- Display 400 with negative tracking; body 400 at 16px
|
|
42
|
+
|
|
43
|
+
| Token | Use |
|
|
44
|
+
|---|---|
|
|
45
|
+
| `{typography.display-mega}` | Homepage hero |
|
|
46
|
+
| `{typography.display-lg}` | Section heads |
|
|
47
|
+
| `{typography.body-md}` | Default body |
|
|
48
|
+
| `{typography.code}` | Code blocks |
|
|
49
|
+
| `{typography.button}` | CTA labels |
|
|
50
|
+
|
|
51
|
+
## Layout
|
|
52
|
+
|
|
53
|
+
- Base 4px; `{spacing.section}` 80px; max width ~1200px
|
|
54
|
+
- Feature grids 3-up → 2-up → 1-up; footer 5-column desktop
|
|
55
|
+
|
|
56
|
+
## Elevation
|
|
57
|
+
|
|
58
|
+
Hairlines + white-on-cream contrast only. IDE mockup cards are the elevated element.
|
|
59
|
+
|
|
60
|
+
## Shapes
|
|
61
|
+
|
|
62
|
+
| Token | Use |
|
|
63
|
+
|---|---|
|
|
64
|
+
| `{rounded.md}` 8px | CTAs, inputs |
|
|
65
|
+
| `{rounded.lg}` 12px | Cards, IDE panes |
|
|
66
|
+
| `{rounded.pill}` | Timeline pills, badges |
|
|
67
|
+
|
|
68
|
+
## Components
|
|
69
|
+
|
|
70
|
+
- `{components.button-primary}` — orange CTA `{rounded.md}`
|
|
71
|
+
- `{components.button-download}` — ink fill inverted CTA
|
|
72
|
+
- `{components.hero-band}`, `{components.ide-mockup-card}`, `{components.ide-pane}`
|
|
73
|
+
- `{components.timeline-pill-*}` — five stage variants
|
|
74
|
+
- `{components.feature-card}`, `{components.pricing-tier-card}`
|
|
75
|
+
- `{components.top-nav}`, `{components.footer}`
|
|
76
|
+
|
|
77
|
+
## Do's and Don'ts
|
|
78
|
+
|
|
79
|
+
### Do
|
|
80
|
+
- Keep display at weight 400
|
|
81
|
+
- Use timeline pastels only in agent timeline UI
|
|
82
|
+
- Render code in JetBrains Mono
|
|
83
|
+
|
|
84
|
+
### Don't
|
|
85
|
+
- Don't add drop shadows
|
|
86
|
+
- Don't use timeline pastels as system action colors
|
|
87
|
+
- Don't bold display headlines
|
|
88
|
+
|
|
89
|
+
## Responsive Behavior
|
|
90
|
+
|
|
91
|
+
Nav hamburger below 768px. Hero display 72→32px mobile. IDE mockup collapses to single pane.
|
|
92
|
+
|
|
93
|
+
## Token Mapping
|
|
94
|
+
|
|
95
|
+
Bind roles in `[theme stylesheet path, e.g. src/styles.css]`.
|