@xenonbyte/da-vinci-workflow 0.1.2 → 0.1.4

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.
@@ -0,0 +1,540 @@
1
+ # Da Vinci Mode Use Cases
2
+
3
+ This document shows how to use Da Vinci in each workflow mode with concrete project scenarios.
4
+
5
+ Use it when you need to decide:
6
+
7
+ - which mode fits the current job
8
+ - what inputs to provide first
9
+ - which artifacts Da Vinci should create
10
+ - how `DA-VINCI.md`, Pencil, and implementation should interact
11
+
12
+ ## Recommended output layout inside a project
13
+
14
+ Use this output structure:
15
+
16
+ ```text
17
+ project/
18
+ ├── DA-VINCI.md
19
+ └── .da-vinci/
20
+ ├── project-inventory.md
21
+ ├── design-registry.md
22
+ ├── page-map.md
23
+ └── changes/
24
+ └── <change-id>/
25
+ ├── brainstorm.md
26
+ ├── design-brief.md
27
+ ├── proposal.md
28
+ ├── design.md
29
+ ├── pencil-design.md
30
+ ├── pencil-bindings.md
31
+ ├── tasks.md
32
+ ├── verification.md
33
+ └── specs/
34
+ └── <capability>/spec.md
35
+ ```
36
+
37
+ Rule:
38
+
39
+ - only `DA-VINCI.md` belongs at the project root
40
+ - all other workflow outputs should stay under `.da-vinci/`
41
+
42
+ ## Quick mode selection
43
+
44
+ Choose the mode by project start condition:
45
+
46
+ 1. `greenfield-spec`
47
+ - new project
48
+ - requirements are already clear enough to write specs
49
+
50
+ 2. `greenfield-brainstorm`
51
+ - new project
52
+ - requirements are still spread across multiple rounds of ideation
53
+
54
+ 3. `redesign-from-code`
55
+ - project already exists
56
+ - current codebase is the behavior source of truth
57
+ - UI needs broad or global redesign
58
+
59
+ 4. `feature-change`
60
+ - project already exists
61
+ - a scoped feature, page, or flow needs to be added or updated
62
+
63
+ ---
64
+
65
+ ## 1. `greenfield-spec`
66
+
67
+ ### Typical scenario
68
+
69
+ You are starting a new desktop or web product. The product scope is already clear enough to write requirements. You want Da Vinci to:
70
+
71
+ 1. break requirements into pages and flows
72
+ 2. establish a visual baseline
73
+ 3. generate Pencil-backed pages
74
+ 4. create implementation tasks
75
+ 5. build from requirement plus Pencil data
76
+
77
+ ### Example case
78
+
79
+ Project:
80
+
81
+ - desktop software for annotated design delivery
82
+
83
+ Known inputs:
84
+
85
+ - the product converts HTML and Figma sources into annotated design output
86
+ - the output is also exposed as MCP-ready structured data
87
+ - launch needs a homepage and a product detail page
88
+
89
+ ### Recommended request
90
+
91
+ ```text
92
+ $da-vinci use greenfield-spec to break down a new desktop software product for annotated design delivery.
93
+ Generate DA-VINCI.md, proposal, specs, page map, Pencil-backed launch pages, bindings, and implementation tasks.
94
+ ```
95
+
96
+ ### What Da Vinci should do
97
+
98
+ 1. create `DA-VINCI.md`
99
+ - choose or infer a stable visual contract
100
+ - record theme, palette, typography direction, and component tone
101
+
102
+ 2. create `design-brief.md`
103
+ - confirm form factor and page-level design priorities
104
+
105
+ 3. create `proposal.md`
106
+ - define scope, non-goals, and success criteria
107
+
108
+ 4. create `specs/<capability>/spec.md`
109
+ - define behavior, states, acceptance, and edge cases
110
+
111
+ 5. create `page-map.md`
112
+ - define the canonical pages and page responsibilities
113
+
114
+ 6. create `design-registry.md`
115
+ - register the active `.pen` source once Pencil work starts
116
+
117
+ 7. create `design.md`
118
+ - define page structure and layout strategy
119
+
120
+ 8. create `pencil-design.md`
121
+ - record the generated Pencil screens
122
+
123
+ 9. create `pencil-bindings.md`
124
+ - map implementation pages to Pencil pages
125
+
126
+ 10. create `tasks.md`
127
+ - define implementation order
128
+
129
+ 11. build code from:
130
+ - requirements
131
+ - `DA-VINCI.md`
132
+ - Pencil page data
133
+
134
+ ### What should be true before implementation
135
+
136
+ - `DA-VINCI.md` exists and is stable
137
+ - every core page exists in `page-map.md`
138
+ - every implementation page has a Pencil counterpart or an explicit exception
139
+ - `task checkpoint` passes
140
+
141
+ ### Best fit
142
+
143
+ Use this mode when you do **not** need idea synthesis first and when the product scope is not primarily reverse-engineered from an existing codebase.
144
+
145
+ ---
146
+
147
+ ## 2. `greenfield-brainstorm`
148
+
149
+ ### Typical scenario
150
+
151
+ You are starting a new project, but the inputs are still rough. The user may have described:
152
+
153
+ - several possible features
154
+ - multiple product directions
155
+ - unclear page boundaries
156
+ - conflicting style preferences
157
+
158
+ The goal is to turn those messy inputs into a buildable workflow.
159
+
160
+ ### Example case
161
+
162
+ Project:
163
+
164
+ - AI writing workspace for product teams
165
+
166
+ User inputs across several rounds:
167
+
168
+ - “Need a docs editor”
169
+ - “Also maybe an AI copilot”
170
+ - “Maybe a dashboard”
171
+ - “Should feel professional, not playful”
172
+ - “Could be a web app or maybe a desktop tool”
173
+
174
+ ### Recommended request
175
+
176
+ ```text
177
+ $da-vinci use greenfield-brainstorm to turn product brainstorming into a stable delivery workflow.
178
+ First synthesize the product direction, then generate DA-VINCI.md, specs, page map, Pencil-backed pages, and implementation tasks.
179
+ ```
180
+
181
+ ### What Da Vinci should do
182
+
183
+ 1. create `brainstorm.md`
184
+ - collect recurring themes
185
+ - separate stable goals from open questions
186
+ - identify contradictions
187
+
188
+ 2. create or infer `DA-VINCI.md`
189
+ - once visual preferences are stable enough
190
+ - do not generate many unrelated pages before this exists
191
+
192
+ 3. create `design-brief.md`
193
+ - record form factor and design direction
194
+
195
+ 4. create `proposal.md`
196
+ - stabilize scope
197
+
198
+ 5. create `specs/<capability>/spec.md`
199
+ - convert brainstorm into testable behavior
200
+
201
+ 6. create `page-map.md`
202
+ - define real pages instead of vague product areas
203
+
204
+ 7. continue with:
205
+ - `design-registry.md`
206
+ - `design.md`
207
+ - `pencil-design.md`
208
+ - `pencil-bindings.md`
209
+ - `tasks.md`
210
+
211
+ ### Where this mode differs from `greenfield-spec`
212
+
213
+ The extra work is at the front:
214
+
215
+ - synthesize first
216
+ - design later
217
+ - code only after the idea set is stable enough
218
+
219
+ ### Common blockers
220
+
221
+ - product surface is still unclear: web app vs desktop app
222
+ - core user flow is still contradictory
223
+ - design preference is unstable enough that `DA-VINCI.md` would be noise instead of a baseline
224
+
225
+ ### Best fit
226
+
227
+ Use this mode when the biggest risk is not implementation, but ambiguity.
228
+
229
+ ---
230
+
231
+ ## 3. `redesign-from-code`
232
+
233
+ ### Typical scenario
234
+
235
+ You already have a working project. You want to redesign all or most of the UI while preserving behavior and routes.
236
+
237
+ This is the right mode for:
238
+
239
+ - full visual refresh
240
+ - broad UI cleanup
241
+ - migration from old interface style to a new product language
242
+ - redesign using existing design references
243
+
244
+ ### Example case A: redesign from current code only
245
+
246
+ Project:
247
+
248
+ - existing SaaS admin app
249
+
250
+ Goal:
251
+
252
+ - keep all routes and behavior
253
+ - replace the visual system with a dark, dense, desktop-tool style
254
+
255
+ Recommended request:
256
+
257
+ ```text
258
+ $da-vinci use redesign-from-code to redesign the whole product UI.
259
+ Keep current routes and behavior, inventory the existing pages and shared layouts, create DA-VINCI.md as the visual contract, generate a Pencil-backed design baseline, bind implementation pages to Pencil pages, and produce implementation tasks for a full UI refresh.
260
+ ```
261
+
262
+ ### Example case B: redesign from code plus existing design references
263
+
264
+ Project:
265
+
266
+ - existing product with some earlier design drafts
267
+
268
+ Goal:
269
+
270
+ - current code remains the behavior source of truth
271
+ - existing design drafts become the visual reference source
272
+ - missing pages should be designed to match the same style
273
+
274
+ Recommended request:
275
+
276
+ ```text
277
+ $da-vinci use redesign-from-code to redesign the whole product UI.
278
+ Current code is the behavior source of truth. Existing design drafts are the visual reference source.
279
+ Register the design sources, extract DA-VINCI.md from them, bind covered pages, generate Pencil designs for uncovered pages, and create implementation tasks.
280
+ ```
281
+
282
+ ### What Da Vinci should do
283
+
284
+ 1. create `project-inventory.md`
285
+ - inventory routes
286
+ - inventory pages
287
+ - inventory shared regions
288
+ - inventory current UI patterns
289
+
290
+ 2. detect or create `DA-VINCI.md`
291
+ - if prior design references exist, extract the baseline from them
292
+ - if not, infer the new visual contract from the redesign request
293
+
294
+ 3. create or update `design-registry.md`
295
+ - register old and new `.pen` sources
296
+
297
+ 4. create or update `page-map.md`
298
+ - identify canonical implementation pages
299
+
300
+ 5. create `design.md`
301
+ - define redesign layout strategy and component strategy
302
+
303
+ 6. create or update `pencil-design.md`
304
+ - build the new redesign baseline in Pencil
305
+
306
+ 7. create or update `pencil-bindings.md`
307
+ - bind pages to redesign screens
308
+
309
+ 8. create `tasks.md`
310
+ - group implementation by layout shell, shared components, and page slices
311
+
312
+ 9. continue directly into implementation when the request is a full redesign
313
+ - start Task Group 1 automatically
314
+ - preserve current behavior
315
+ - apply the redesign through code, not only through planning artifacts
316
+
317
+ ### Critical rule in this mode
318
+
319
+ For redesign work:
320
+
321
+ - current code decides behavior
322
+ - `DA-VINCI.md` decides the new visual contract
323
+ - Pencil decides page-by-page presentation
324
+
325
+ ### Spec partitioning rule
326
+
327
+ For broad refreshes, do not keep everything inside one `ui-refresh/spec.md` unless the project surface is genuinely small or the change is mostly cosmetic.
328
+
329
+ Preferred structure:
330
+
331
+ - keep one overall `proposal.md`
332
+ - keep one project-level `page-map.md`
333
+ - split `specs/` by redesign slice
334
+
335
+ Recommended redesign slices:
336
+
337
+ - `shared-shell`
338
+ - `core-pages`
339
+ - `settings-and-secondary`
340
+ - `admin-or-restricted`
341
+ - `reference-gap-pages`
342
+
343
+ This keeps implementation traceable without falling into one-spec-per-page fragmentation.
344
+
345
+ ### Important execution rule
346
+
347
+ For a request like:
348
+
349
+ - "redesign the whole product UI"
350
+ - "globally update all UI"
351
+ - "complete the refresh"
352
+
353
+ Da Vinci should treat the intent as `full-delivery`.
354
+
355
+ That means it should not stop after:
356
+
357
+ - `design.md`
358
+ - `pencil-design.md`
359
+ - `pencil-bindings.md`
360
+ - `tasks.md`
361
+
362
+ Instead it should:
363
+
364
+ 1. generate the redesign artifacts
365
+ 2. run `task checkpoint`
366
+ 3. if the result is `PASS` or non-blocking `WARN`, immediately enter Task Group 1
367
+ 4. modify code while preserving current behavior
368
+ 5. use `execution checkpoint` only after implementation starts
369
+
370
+ ### Example: redesign from code plus HTML design references
371
+
372
+ Project:
373
+
374
+ - existing application with complete functional code
375
+ - some HTML design drafts already exist
376
+ - those HTML drafts are visual references and suggestions, not 1:1 restoration targets
377
+
378
+ Recommended request:
379
+
380
+ ```text
381
+ $da-vinci use redesign-from-code to redesign the whole product UI.
382
+ Current code is the behavior source of truth.
383
+ Existing HTML design drafts are visual references and suggestions, not restoration targets.
384
+ Please inventory the current pages and shared layouts, register the HTML drafts as design references, extract DA-VINCI.md as the project visual contract, generate a unified Pencil design baseline, bind implementation pages to redesign screens, and continue implementation automatically unless a true blocker exists.
385
+ ```
386
+
387
+ Expected behavior:
388
+
389
+ 1. inventory current pages and shared regions
390
+ 2. register the HTML drafts as design references
391
+ 3. extract a stable `DA-VINCI.md`
392
+ 4. split broad redesign work into multiple spec slices when needed
393
+ 5. create or refine Pencil redesign screens
394
+ 6. bind implementation pages to redesign screens
395
+ 7. generate `tasks.md` aligned to the redesign slices
396
+ 8. continue into code changes without stopping at "next recommended step"
397
+
398
+ ### Best fit
399
+
400
+ Use this mode whenever the project already exists and the real work starts from discovery and redesign, not from a blank page.
401
+
402
+ ---
403
+
404
+ ## 4. `feature-change`
405
+
406
+ ### Typical scenario
407
+
408
+ The product already exists. You do not want a whole redesign. You want a single change to flow through requirements, Pencil, and code.
409
+
410
+ Examples:
411
+
412
+ - add a billing page
413
+ - redesign an onboarding flow
414
+ - add a settings subsection
415
+ - add a new dashboard tab
416
+
417
+ ### Example case
418
+
419
+ Project:
420
+
421
+ - existing product with current page system and visual contract
422
+
423
+ Change:
424
+
425
+ - add a billing center page and connect it to the existing settings area
426
+
427
+ ### Recommended request
428
+
429
+ ```text
430
+ $da-vinci use feature-change to add a billing center page.
431
+ Keep the current behavior and project style baseline, update the affected page map, generate the Pencil design delta, bind the new page, and create implementation tasks.
432
+ ```
433
+
434
+ ### What Da Vinci should do
435
+
436
+ 1. create or update `proposal.md`
437
+ - define the change scope
438
+
439
+ 2. create or update `specs/<capability>/spec.md`
440
+ - define the new behavior or updated behavior
441
+
442
+ 3. update `page-map.md`
443
+ - only for affected pages and related flows
444
+
445
+ 4. reuse `DA-VINCI.md`
446
+ - unless the change explicitly introduces a new product area or rebrand
447
+
448
+ 5. update `design-registry.md`
449
+ - if a new `.pen` source or screen is added
450
+
451
+ 6. create `pencil-design.md` delta
452
+ - only for the affected pages
453
+
454
+ 7. update `pencil-bindings.md`
455
+ - bind the new or changed page
456
+
457
+ 8. create `tasks.md`
458
+ - implementation order for the scoped change
459
+
460
+ 9. implement and verify
461
+
462
+ ### Why this mode matters
463
+
464
+ Without a dedicated change mode, AI tends to:
465
+
466
+ - redesign too much
467
+ - regenerate pages that are out of scope
468
+ - ignore the existing visual contract
469
+
470
+ This mode prevents that.
471
+
472
+ ---
473
+
474
+ ## How `DA-VINCI.md` should behave in every mode
475
+
476
+ `DA-VINCI.md` is not optional noise. It is the project-level visual contract.
477
+
478
+ Use it like this:
479
+
480
+ 1. if it exists
481
+ - reuse it
482
+ - avoid asking duplicate style questions
483
+ - avoid page-by-page style reinvention
484
+
485
+ 2. if it does not exist
486
+ - generate it from stable user preference, existing code signals, or prior design sources
487
+ - save it before broad Pencil generation
488
+
489
+ 3. if the project is rebranding
490
+ - update `DA-VINCI.md`
491
+ - then propagate the new baseline through Pencil and implementation
492
+
493
+ ---
494
+
495
+ ## How to choose between design sources
496
+
497
+ Use this source order:
498
+
499
+ 1. `DA-VINCI.md`
500
+ - project visual baseline
501
+
502
+ 2. `design-registry.md`
503
+ - which `.pen` sources are active
504
+
505
+ 3. `pencil-bindings.md`
506
+ - which page maps to which Pencil screen
507
+
508
+ 4. implementation code
509
+ - behavior truth for existing products
510
+
511
+ 5. user prompt
512
+ - high-level direction and scope
513
+
514
+ ---
515
+
516
+ ## Recommended request templates
517
+
518
+ ### New project with clear scope
519
+
520
+ ```text
521
+ $da-vinci use greenfield-spec to turn this new product into requirements, Pencil-backed pages, and implementation tasks.
522
+ ```
523
+
524
+ ### New project from rough ideation
525
+
526
+ ```text
527
+ $da-vinci use greenfield-brainstorm to synthesize the product idea, establish the visual baseline, and generate a buildable workflow.
528
+ ```
529
+
530
+ ### Existing project full redesign
531
+
532
+ ```text
533
+ $da-vinci use redesign-from-code to inventory the current product, establish or update DA-VINCI.md, generate a Pencil-backed redesign baseline, and prepare implementation tasks.
534
+ ```
535
+
536
+ ### Existing project scoped feature
537
+
538
+ ```text
539
+ $da-vinci use feature-change to add or update a page while preserving the current project visual contract and behavior baseline.
540
+ ```
@@ -61,11 +61,11 @@ Expected flow:
61
61
  1. scan the existing product into `project-inventory.md`
62
62
  2. register any current `.pen` sources in `design-registry.md`
63
63
  3. define redesign scope in `proposal.md`
64
- 4. write redesign constraints in `specs/<capability>/spec.md`
64
+ 4. split broad redesign work into `specs/<slice>/spec.md` files when one large `ui-refresh` spec would be too coarse
65
65
  5. rebuild or refine `page-map.md`
66
66
  6. create new or updated Pencil pages
67
67
  7. bind routes and pages to Pencil screens
68
- 8. generate tasks
68
+ 8. generate tasks aligned to the redesign slices
69
69
  9. build and verify
70
70
 
71
71
  ## 4. `feature-change`
@@ -0,0 +1,49 @@
1
+ # DA-VINCI
2
+
3
+ ## Product Surface
4
+ - desktop software
5
+ - desktop-first launch pages
6
+
7
+ ## Visual Direction
8
+ - dark tool-like product marketing
9
+ - technical but polished
10
+ - high-contrast hierarchy
11
+
12
+ ## Theme
13
+ - primary color: `#A855F7`
14
+ - accent color: `#EC4899`
15
+ - background color: `#06070A`
16
+ - panel color: `#10131A`
17
+ - border color: `#2A3142`
18
+ - primary text color: `#FFFFFF`
19
+ - secondary text color: `#A1A1AA`
20
+
21
+ ## Typography
22
+ - display direction: bold geometric sans
23
+ - body direction: neutral sans for dense product copy
24
+ - mono usage: metadata, labels, and process cues
25
+
26
+ ## Layout Rules
27
+ - desktop-first
28
+ - wide hero sections
29
+ - dark panels with occasional light contrast surfaces
30
+ - rounded panels and strong internal spacing
31
+
32
+ ## Component Tone
33
+ - buttons should feel direct and product-oriented
34
+ - content panels should look like software surfaces, not generic blog cards
35
+ - CTA regions should preserve the same dark product language
36
+
37
+ ## Do
38
+ - keep page sections clearly bounded
39
+ - use contrast panels to explain structured output
40
+ - keep technical cues visible in labels and metadata
41
+
42
+ ## Do Not
43
+ - switch to unrelated bright themes on later pages
44
+ - replace the desktop-product tone with consumer lifestyle styling
45
+ - generate unrelated type or spacing systems for each page
46
+
47
+ ## Source Of Truth
48
+ - inferred from the MarkupFlow forward-test product description
49
+ - aligned with the active Pencil screens `MarkupFlow Homepage` and `MarkupFlow Product Detail`
@@ -10,11 +10,13 @@ Scenario:
10
10
 
11
11
  - a desktop-software product named `MarkupFlow`
12
12
  - two launch pages
13
+ - one project-level visual contract
13
14
  - Pencil-backed design source
14
15
  - static `HTML + Tailwind` implementation
15
16
 
16
17
  Files in this example:
17
18
 
19
+ - `DA-VINCI.md`
18
20
  - `design-brief.md`
19
21
  - `proposal.md`
20
22
  - `specs/marketing-site/spec.md`
@@ -1,6 +1,7 @@
1
1
  # Tasks
2
2
 
3
3
  ## 1. Scope And Page Definition
4
+ - [x] define the project visual contract in `DA-VINCI.md`
4
5
  - [x] capture the desktop-product design brief
5
6
  - [x] define the proposal and delivery scope
6
7
  - [x] write the marketing-site behavior spec
@@ -12,6 +13,7 @@
12
13
  - [x] register the active Pencil source
13
14
  - [x] record the active Pencil screens and implementation notes
14
15
  - [x] bind implementation pages to Pencil screens
16
+ - [x] confirm the Pencil screens follow the same `DA-VINCI.md` visual baseline
15
17
  - [x] `PASS` design checkpoint
16
18
  - [x] `PASS` mapping checkpoint
17
19
 
@@ -19,6 +19,7 @@
19
19
  - product detail page explains desktop workspace modules
20
20
 
21
21
  ## Design Coverage
22
+ - the implementation follows the project visual contract in `DA-VINCI.md`
22
23
  - the homepage implementation follows the Pencil screen structure for hero, capabilities, MCP service, and CTA
23
24
  - the product detail implementation follows the Pencil screen structure for workspace hero, pipeline, modules, and CTA
24
25
  - implementation pages are explicitly bound to Pencil screen ids
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenonbyte/da-vinci-workflow",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Requirement-to-design-to-code workflow skill for Codex, Claude, and Gemini",
5
5
  "bin": {
6
6
  "da-vinci": "bin/da-vinci.js"