sdtk-design-kit 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -9
- package/package.json +1 -1
- package/src/commands/handoff.js +83 -8
- package/src/commands/help.js +14 -6
- package/src/commands/prototype.js +352 -0
- package/src/commands/review.js +56 -4
- package/src/commands/start.js +15 -4
- package/src/commands/status.js +5 -1
- package/src/commands/system.js +49 -19
- package/src/index.js +4 -0
- package/src/lib/design-paths.js +6 -0
- package/src/lib/domain-profile.js +108 -0
- package/src/lib/style-presets.js +150 -0
package/README.md
CHANGED
|
@@ -8,12 +8,13 @@ It is not a Figma clone, Lovable clone, v0 clone, full app builder, or productio
|
|
|
8
8
|
|
|
9
9
|
## Beginner Flow
|
|
10
10
|
|
|
11
|
-
Use this
|
|
11
|
+
Use this optimized flow for a clean project:
|
|
12
12
|
|
|
13
13
|
```powershell
|
|
14
14
|
sdtk-design init
|
|
15
|
-
sdtk-design start --idea "I want to build a lightweight CRM for solo consultants to track leads, follow-ups, notes, and simple revenue pipeline without using a complex enterprise CRM."
|
|
16
|
-
sdtk-design
|
|
15
|
+
sdtk-design start --idea "I want to build a lightweight CRM for solo consultants to track leads, follow-ups, notes, and simple revenue pipeline without using a complex enterprise CRM." --style premium-dashboard
|
|
16
|
+
sdtk-design prototype
|
|
17
|
+
sdtk-design review --artifact docs/design/prototype/index.html
|
|
17
18
|
sdtk-design handoff
|
|
18
19
|
sdtk-design status
|
|
19
20
|
```
|
|
@@ -22,7 +23,8 @@ What each command does:
|
|
|
22
23
|
|
|
23
24
|
- `init`: creates the local design workspace.
|
|
24
25
|
- `start`: creates the design brief, screen map, required wireframes, and design system.
|
|
25
|
-
- `
|
|
26
|
+
- `prototype`: creates a static visual preview from the generated design artifacts.
|
|
27
|
+
- `review`: reviews a local markdown or static HTML design artifact with visual polish checks.
|
|
26
28
|
- `handoff`: converts the generated design package into SDTK-CODE handoff guidance.
|
|
27
29
|
- `status`: reports complete artifacts, missing artifacts, and the next recommended command.
|
|
28
30
|
|
|
@@ -32,13 +34,15 @@ What each command does:
|
|
|
32
34
|
sdtk-design --help
|
|
33
35
|
sdtk-design --version
|
|
34
36
|
sdtk-design init [--project-path <path>] [--force] [--no-state]
|
|
35
|
-
sdtk-design start --idea "<idea>" [--project-path <path>] [--force]
|
|
37
|
+
sdtk-design start --idea "<idea>" [--style <preset>] [--project-path <path>] [--force]
|
|
36
38
|
sdtk-design brief --idea "<idea>" [--project-path <path>] [--force]
|
|
37
39
|
sdtk-design screens [--project-path <path>] [--force]
|
|
38
40
|
sdtk-design wireframe --screen landing [--project-path <path>] [--force]
|
|
39
41
|
sdtk-design wireframe --screen all [--project-path <path>] [--force]
|
|
40
|
-
sdtk-design system [--project-path <path>] [--force]
|
|
42
|
+
sdtk-design system [--style <preset>] [--project-path <path>] [--force]
|
|
43
|
+
sdtk-design prototype [--style <preset>] [--project-path <path>] [--force]
|
|
41
44
|
sdtk-design review --artifact docs/design/wireframes/LANDING.md [--project-path <path>] [--force]
|
|
45
|
+
sdtk-design review --artifact docs/design/prototype/index.html [--project-path <path>] [--force]
|
|
42
46
|
sdtk-design handoff [--project-path <path>] [--force]
|
|
43
47
|
sdtk-design status [--project-path <path>]
|
|
44
48
|
```
|
|
@@ -54,6 +58,8 @@ docs/design/
|
|
|
54
58
|
SCREEN_MAP.md
|
|
55
59
|
DESIGN_SYSTEM.md
|
|
56
60
|
DESIGN_HANDOFF.md
|
|
61
|
+
prototype/
|
|
62
|
+
index.html
|
|
57
63
|
wireframes/
|
|
58
64
|
LANDING.md
|
|
59
65
|
ONBOARDING.md
|
|
@@ -64,6 +70,17 @@ docs/design/
|
|
|
64
70
|
|
|
65
71
|
Internal state may live under `.sdtk/design/`. SDTK-DESIGN must not create or mutate `.sdtk/atlas`.
|
|
66
72
|
|
|
73
|
+
## Visual Style Presets
|
|
74
|
+
|
|
75
|
+
`start` and `system` accept `--style <preset>`. If omitted, SDTK-DESIGN uses `minimal-saas`.
|
|
76
|
+
|
|
77
|
+
Available presets:
|
|
78
|
+
|
|
79
|
+
- `minimal-saas`: clean solo-founder SaaS default.
|
|
80
|
+
- `premium-dashboard`: dashboard-first MVP with stronger metrics, cards, and status surfaces.
|
|
81
|
+
- `bold-founder`: high-contrast launch style for marketing-heavy MVPs.
|
|
82
|
+
- `warm-editorial`: softer consultant/service-product style.
|
|
83
|
+
|
|
67
84
|
## Command Details
|
|
68
85
|
|
|
69
86
|
### `init`
|
|
@@ -82,9 +99,27 @@ brief -> screens -> wireframe --screen all -> system
|
|
|
82
99
|
|
|
83
100
|
This is the beginner facade for the core design package. It does not run review or handoff. Existing managed core outputs are not overwritten unless `--force` is explicit.
|
|
84
101
|
|
|
102
|
+
Use `--style premium-dashboard` for dashboard-led MVPs such as ClientPulse.
|
|
103
|
+
|
|
104
|
+
### `prototype`
|
|
105
|
+
|
|
106
|
+
Creates a static visual preview at `docs/design/prototype/index.html`.
|
|
107
|
+
|
|
108
|
+
```powershell
|
|
109
|
+
sdtk-design prototype --style premium-dashboard
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The prototype includes landing, onboarding, and dashboard sections with responsive CSS, selected visual preset tokens, and domain copy derived from the generated design artifacts. It is not production app code and does not create files outside `docs/design/prototype`.
|
|
113
|
+
|
|
85
114
|
### `review`
|
|
86
115
|
|
|
87
|
-
Reviews a local markdown artifact,
|
|
116
|
+
Reviews a local markdown or static HTML artifact. For the optimized workflow, review the generated prototype:
|
|
117
|
+
|
|
118
|
+
```powershell
|
|
119
|
+
sdtk-design review --artifact docs/design/prototype/index.html
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Markdown artifact review remains supported:
|
|
88
123
|
|
|
89
124
|
```powershell
|
|
90
125
|
sdtk-design review --artifact docs/design/wireframes/LANDING.md
|
|
@@ -92,18 +127,20 @@ sdtk-design review --artifact docs/design/wireframes/LANDING.md
|
|
|
92
127
|
|
|
93
128
|
The review report is written to `docs/design/reviews/DESIGN_REVIEW_YYYYMMDD.md`.
|
|
94
129
|
|
|
95
|
-
Current review support is local
|
|
130
|
+
Current review support is local artifact review only. The report includes visual polish checks for hierarchy, spacing/density, CTA clarity, dashboard information density, responsive/mobile risk, accessibility baseline, and anti-wireframe/mockup risk. No URL, browser, screenshot, vision, or DOM review is implemented in Foundation Beta.
|
|
96
131
|
|
|
97
132
|
### `handoff`
|
|
98
133
|
|
|
99
134
|
Reads the generated brief, screen map, required wireframes, and design system, then writes `docs/design/DESIGN_HANDOFF.md`.
|
|
100
135
|
|
|
101
|
-
The handoff is planning input for SDTK-CODE. It includes screen-to-component mapping, screen-to-user-story mapping, design decisions, implementation notes, acceptance criteria, and a readiness verdict. It does not generate production app code.
|
|
136
|
+
The handoff is planning input for SDTK-CODE. It includes screen-to-component mapping, screen-to-user-story mapping, design decisions, implementation notes, suggested data model, domain/status taxonomy, interaction flow, persistence guidance, visual implementation contract, prototype reference, SDTK-CODE build notes, acceptance criteria, and a readiness verdict. Domain-specific examples are derived from the generated artifacts rather than fixed to one demo product. It does not generate production app code.
|
|
102
137
|
|
|
103
138
|
### `status`
|
|
104
139
|
|
|
105
140
|
Read-only command. It reports complete artifacts, missing artifacts, and the next recommended command.
|
|
106
141
|
|
|
142
|
+
The optimized readiness path expects `docs/design/prototype/index.html` before prototype review and handoff.
|
|
143
|
+
|
|
107
144
|
## Non-Goals And Deferred Features
|
|
108
145
|
|
|
109
146
|
Foundation Beta does not provide:
|
package/package.json
CHANGED
package/src/commands/handoff.js
CHANGED
|
@@ -4,6 +4,7 @@ const fs = require("fs");
|
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const { parseFlags } = require("../lib/args");
|
|
6
6
|
const { describeDesignPaths, resolveProjectPath } = require("../lib/design-paths");
|
|
7
|
+
const { inferDomainProfile } = require("../lib/domain-profile");
|
|
7
8
|
const { ValidationError } = require("../lib/errors");
|
|
8
9
|
|
|
9
10
|
const HANDOFF_FLAG_DEFS = {
|
|
@@ -56,7 +57,13 @@ function requiredArtifacts(paths) {
|
|
|
56
57
|
];
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
function handoffContent() {
|
|
60
|
+
function handoffContent({ hasPrototype = false, profile = inferDomainProfile() } = {}) {
|
|
61
|
+
const prototypeReference = hasPrototype
|
|
62
|
+
? "`docs/design/prototype/index.html` is available as the static visual preview reference."
|
|
63
|
+
: "Run `sdtk-design prototype` to create `docs/design/prototype/index.html` before implementation if visual preview evidence is needed.";
|
|
64
|
+
const setupKey = profile.storageKeys[0];
|
|
65
|
+
const itemKey = profile.storageKeys[1];
|
|
66
|
+
|
|
60
67
|
return [
|
|
61
68
|
"# Design Handoff",
|
|
62
69
|
"",
|
|
@@ -73,6 +80,7 @@ function handoffContent() {
|
|
|
73
80
|
"- `docs/design/wireframes/ONBOARDING.md`",
|
|
74
81
|
"- `docs/design/wireframes/DASHBOARD.md`",
|
|
75
82
|
"- `docs/design/DESIGN_SYSTEM.md`",
|
|
83
|
+
hasPrototype ? "- `docs/design/prototype/index.html`" : "- `docs/design/prototype/index.html` (optional, not present at handoff time)",
|
|
76
84
|
"",
|
|
77
85
|
"## Screen-To-Component Mapping",
|
|
78
86
|
"",
|
|
@@ -80,15 +88,15 @@ function handoffContent() {
|
|
|
80
88
|
"|---|---|---|",
|
|
81
89
|
"| Landing | `docs/design/wireframes/LANDING.md` | Header, hero copy, primary CTA, workflow preview, benefit bullets |",
|
|
82
90
|
"| Onboarding | `docs/design/wireframes/ONBOARDING.md` | Progress indicator, setup form, segmented sample-data control, inline validation, continue CTA |",
|
|
83
|
-
|
|
91
|
+
`| Dashboard | \`docs/design/wireframes/DASHBOARD.md\` | Summary counters, ${profile.collectionSurface}, status treatment, quick-add action, empty-state panel, recoverable error alert |`,
|
|
84
92
|
"",
|
|
85
93
|
"## Screen-To-User-Story Mapping",
|
|
86
94
|
"",
|
|
87
95
|
"| Screen | User story | Acceptance signal |",
|
|
88
96
|
"|---|---|---|",
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
97
|
+
`| Landing | As ${profile.targetUser}, I want to understand the ${profile.productName} promise so I can decide whether to start. | Primary CTA is visible and routes to onboarding. |`,
|
|
98
|
+
`| Onboarding | As a new user, I want a short setup path so I can create my first ${profile.itemSingular} without heavy configuration. | Required fields are clear, validation is inline, and entered values are preserved on error. |`,
|
|
99
|
+
`| Dashboard | As ${profile.targetUser}, I want to see active ${profile.itemPlural} and next actions so I can choose what to do next. | ${profile.itemPlural.charAt(0).toUpperCase() + profile.itemPlural.slice(1)}, next actions, context, and status are scannable with empty and error states. |`,
|
|
92
100
|
"",
|
|
93
101
|
"## Design Decisions",
|
|
94
102
|
"",
|
|
@@ -105,18 +113,79 @@ function handoffContent() {
|
|
|
105
113
|
"- Preserve empty, success, and error states from the screen map and wireframes.",
|
|
106
114
|
"- Apply typography, color, spacing, button, card, form, tone, and accessibility rules from `DESIGN_SYSTEM.md`.",
|
|
107
115
|
"",
|
|
116
|
+
"## Suggested Data Model",
|
|
117
|
+
"",
|
|
118
|
+
"Workspace fields:",
|
|
119
|
+
"",
|
|
120
|
+
"- `id`: local identifier.",
|
|
121
|
+
`- \`name\`: ${profile.setupLabel.toLowerCase()} name.`,
|
|
122
|
+
"- `createdAt`: ISO timestamp.",
|
|
123
|
+
"",
|
|
124
|
+
`${profile.modelName} fields:`,
|
|
125
|
+
"",
|
|
126
|
+
"- `id`: local identifier.",
|
|
127
|
+
`- \`name\`: ${profile.itemSingular} name or label.`,
|
|
128
|
+
"- `status`: workflow status.",
|
|
129
|
+
"- `nextAction`: next action or due context.",
|
|
130
|
+
"- `note`: latest context note or summary.",
|
|
131
|
+
"- `createdAt`: ISO timestamp.",
|
|
132
|
+
"- `updatedAt`: ISO timestamp.",
|
|
133
|
+
"",
|
|
134
|
+
"## Domain Vocabulary / Status Taxonomy",
|
|
135
|
+
"",
|
|
136
|
+
`- ${profile.itemLabel}: the primary record the MVP helps the user create and track.`,
|
|
137
|
+
"- Next action: the next planned step needed to keep the workflow moving.",
|
|
138
|
+
"- Note: short context needed before the next action.",
|
|
139
|
+
`- ${profile.collectionSurface.charAt(0).toUpperCase() + profile.collectionSurface.slice(1)}: the grouped view for active ${profile.itemPlural}.`,
|
|
140
|
+
`- Status taxonomy: ${profile.statusTaxonomy.join(", ")}.`,
|
|
141
|
+
"",
|
|
142
|
+
"## Interaction Flow",
|
|
143
|
+
"",
|
|
144
|
+
"1. Landing -> user chooses the primary CTA.",
|
|
145
|
+
`2. Onboarding -> user enters ${profile.setupLabel.toLowerCase()} name and continues.`,
|
|
146
|
+
`3. Dashboard -> user sees empty state, ${profile.itemSingular} form, and status counters.`,
|
|
147
|
+
`4. ${profile.itemAction} -> validate required fields, append ${profile.itemSingular}, update list/counts, and show the saved note/next action.`,
|
|
148
|
+
`5. Refresh -> restore ${profile.setupLabel.toLowerCase()} and ${profile.itemPlural} from local persistence before rendering dashboard state.`,
|
|
149
|
+
"",
|
|
150
|
+
"## Persistence Guidance",
|
|
151
|
+
"",
|
|
152
|
+
"- For a frontend-only MVP, use browser `localStorage` or equivalent local persistence.",
|
|
153
|
+
`- Suggested keys: \`${setupKey}\` and \`${itemKey}\`.`,
|
|
154
|
+
"- Store arrays/objects as JSON and tolerate parse failures by falling back to empty state.",
|
|
155
|
+
"- Do not introduce backend, API, auth, database, or network persistence unless a later SDTK-CODE task explicitly adds it.",
|
|
156
|
+
"",
|
|
157
|
+
"## Visual Implementation Contract",
|
|
158
|
+
"",
|
|
159
|
+
"- Implement the selected visual preset from `DESIGN_SYSTEM.md` before adding extra decoration.",
|
|
160
|
+
`- Preserve landing hero hierarchy, onboarding form clarity, dashboard metric density, ${profile.collectionSurface}, status treatment, and empty state.`,
|
|
161
|
+
"- Keep responsive behavior explicit: grids collapse at mobile width and controls remain at least 44px tall.",
|
|
162
|
+
"- Pair every status color with text; do not rely on color alone.",
|
|
163
|
+
"- Avoid shipping a gray wireframe look when the prototype/design system provides finished tokens.",
|
|
164
|
+
"",
|
|
165
|
+
"## Prototype Reference",
|
|
166
|
+
"",
|
|
167
|
+
`- ${prototypeReference}`,
|
|
168
|
+
"- Treat the prototype as visual direction only, not production application code.",
|
|
169
|
+
"",
|
|
170
|
+
"## SDTK-CODE Build Notes",
|
|
171
|
+
"",
|
|
172
|
+
"- A static frontend implementation may use `app/index.html`, `app/styles.css`, and `app/app.js` when no framework is required.",
|
|
173
|
+
"- Keep runtime dependencies optional; this handoff does not require a framework, server, or package install.",
|
|
174
|
+
`- Add verification for local rendering, ${profile.itemAction.toLowerCase()} behavior, persistence after refresh, and mobile-width layout.`,
|
|
175
|
+
"- SDTK-CODE owns implementation planning, code changes, tests, and ship readiness.",
|
|
176
|
+
"",
|
|
108
177
|
"## Acceptance Criteria",
|
|
109
178
|
"",
|
|
110
179
|
"- Landing renders the product promise, workflow preview, and a single dominant primary CTA.",
|
|
111
180
|
"- Onboarding captures only required setup data and keeps validation inline.",
|
|
112
|
-
|
|
181
|
+
`- Dashboard shows active ${profile.itemPlural}, next action, status, empty state, and recoverable error state.`,
|
|
113
182
|
"- Components follow the design system tokens and accessibility baseline.",
|
|
114
183
|
"- No production app code, network integration, Pro entitlement, `.sdtk/atlas`, or SDTK-WIKI mutation is implied by this handoff.",
|
|
115
184
|
"",
|
|
116
185
|
"## Non-Goals",
|
|
117
186
|
"",
|
|
118
187
|
"- Figma, Lovable, v0, or full app-builder replacement behavior.",
|
|
119
|
-
|
|
188
|
+
`- ${profile.nonGoals}`,
|
|
120
189
|
"- Package publish or deployment.",
|
|
121
190
|
"",
|
|
122
191
|
].join("\n");
|
|
@@ -138,8 +207,14 @@ function runDesignHandoff({ projectPath, force = false }) {
|
|
|
138
207
|
throw new ValidationError("docs/design/DESIGN_HANDOFF.md already exists. Re-run with --force to replace this managed handoff.");
|
|
139
208
|
}
|
|
140
209
|
|
|
210
|
+
const briefContent = fs.readFileSync(paths.designBriefPath, "utf-8");
|
|
211
|
+
const screenMapContent = fs.readFileSync(paths.screenMapPath, "utf-8");
|
|
212
|
+
const designSystemContent = fs.readFileSync(paths.designSystemPath, "utf-8");
|
|
213
|
+
const wireframeContents = REQUIRED_WIREFRAMES.map((fileName) => fs.readFileSync(path.join(paths.wireframesPath, fileName), "utf-8"));
|
|
214
|
+
const profile = inferDomainProfile({ briefContent, screenMapContent, designSystemContent, wireframeContents });
|
|
215
|
+
|
|
141
216
|
fs.mkdirSync(path.dirname(paths.designHandoffPath), { recursive: true });
|
|
142
|
-
fs.writeFileSync(paths.designHandoffPath, handoffContent(), "utf-8");
|
|
217
|
+
fs.writeFileSync(paths.designHandoffPath, handoffContent({ hasPrototype: fs.existsSync(paths.prototypeIndexPath), profile }), "utf-8");
|
|
143
218
|
|
|
144
219
|
return {
|
|
145
220
|
projectPath: resolvedProjectPath,
|
package/src/commands/help.js
CHANGED
|
@@ -7,21 +7,27 @@ Usage:
|
|
|
7
7
|
sdtk-design --help
|
|
8
8
|
sdtk-design --version
|
|
9
9
|
sdtk-design init
|
|
10
|
-
sdtk-design start --idea "<idea>"
|
|
10
|
+
sdtk-design start --idea "<idea>" --style premium-dashboard
|
|
11
11
|
sdtk-design brief --idea "<idea>"
|
|
12
12
|
sdtk-design screens
|
|
13
13
|
sdtk-design wireframe --screen landing
|
|
14
|
-
sdtk-design system
|
|
15
|
-
sdtk-design
|
|
14
|
+
sdtk-design system --style minimal-saas
|
|
15
|
+
sdtk-design prototype --style premium-dashboard
|
|
16
|
+
sdtk-design review --artifact docs/design/prototype/index.html
|
|
16
17
|
sdtk-design handoff
|
|
17
18
|
sdtk-design status
|
|
18
19
|
|
|
19
20
|
Examples:
|
|
20
|
-
sdtk-design start --idea "I want to build a lightweight CRM for solo consultants to track leads."
|
|
21
|
-
sdtk-design
|
|
21
|
+
sdtk-design start --idea "I want to build a lightweight CRM for solo consultants to track leads." --style premium-dashboard
|
|
22
|
+
sdtk-design prototype --style premium-dashboard
|
|
23
|
+
sdtk-design review --artifact docs/design/prototype/index.html
|
|
22
24
|
sdtk-design handoff
|
|
23
25
|
sdtk-design status
|
|
24
26
|
|
|
27
|
+
Visual style presets:
|
|
28
|
+
minimal-saas, premium-dashboard, bold-founder, warm-editorial
|
|
29
|
+
Default: minimal-saas
|
|
30
|
+
|
|
25
31
|
Foundation Beta purpose:
|
|
26
32
|
SDTK-DESIGN is a local-first MVP design planner and reviewer for solo founders.
|
|
27
33
|
It turns a rough MVP idea into reviewable design artifacts and a deterministic SDTK-CODE handoff.
|
|
@@ -33,6 +39,7 @@ Required human-facing output:
|
|
|
33
39
|
docs/design/wireframes/LANDING.md
|
|
34
40
|
docs/design/wireframes/ONBOARDING.md
|
|
35
41
|
docs/design/wireframes/DASHBOARD.md
|
|
42
|
+
docs/design/prototype/index.html
|
|
36
43
|
docs/design/reviews/DESIGN_REVIEW_YYYYMMDD.md
|
|
37
44
|
docs/design/DESIGN_HANDOFF.md
|
|
38
45
|
|
|
@@ -43,8 +50,9 @@ Command status:
|
|
|
43
50
|
screens Available.
|
|
44
51
|
wireframe Available.
|
|
45
52
|
system Available.
|
|
53
|
+
prototype Available static HTML/CSS preview.
|
|
46
54
|
handoff Available.
|
|
47
|
-
review Available for local markdown artifacts.
|
|
55
|
+
review Available for local markdown and static HTML artifacts.
|
|
48
56
|
start Available beginner facade.
|
|
49
57
|
status Available.
|
|
50
58
|
|