@xenonbyte/da-vinci-workflow 0.1.2

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.
Files changed (48) hide show
  1. package/README.md +306 -0
  2. package/SKILL.md +377 -0
  3. package/agents/openai.yaml +7 -0
  4. package/bin/da-vinci.js +8 -0
  5. package/commands/claude/da-vinci.md +23 -0
  6. package/commands/claude/dv/breakdown.md +21 -0
  7. package/commands/claude/dv/build.md +17 -0
  8. package/commands/claude/dv/design.md +20 -0
  9. package/commands/claude/dv/tasks.md +19 -0
  10. package/commands/claude/dv/verify.md +16 -0
  11. package/commands/codex/prompts/da-vinci.md +24 -0
  12. package/commands/codex/prompts/dv-breakdown.md +19 -0
  13. package/commands/codex/prompts/dv-build.md +13 -0
  14. package/commands/codex/prompts/dv-design.md +14 -0
  15. package/commands/codex/prompts/dv-tasks.md +16 -0
  16. package/commands/codex/prompts/dv-verify.md +15 -0
  17. package/commands/gemini/da-vinci.toml +26 -0
  18. package/commands/gemini/dv/breakdown.toml +19 -0
  19. package/commands/gemini/dv/build.toml +13 -0
  20. package/commands/gemini/dv/design.toml +14 -0
  21. package/commands/gemini/dv/tasks.toml +13 -0
  22. package/commands/gemini/dv/verify.toml +15 -0
  23. package/docs/workflow-examples.md +104 -0
  24. package/examples/greenfield-spec-markupflow/README.md +40 -0
  25. package/examples/greenfield-spec-markupflow/design-brief.md +24 -0
  26. package/examples/greenfield-spec-markupflow/design-registry.md +15 -0
  27. package/examples/greenfield-spec-markupflow/design.md +32 -0
  28. package/examples/greenfield-spec-markupflow/page-map.md +19 -0
  29. package/examples/greenfield-spec-markupflow/pencil-bindings.md +13 -0
  30. package/examples/greenfield-spec-markupflow/pencil-design.md +29 -0
  31. package/examples/greenfield-spec-markupflow/proposal.md +33 -0
  32. package/examples/greenfield-spec-markupflow/site/index.html +192 -0
  33. package/examples/greenfield-spec-markupflow/site/product-detail.html +165 -0
  34. package/examples/greenfield-spec-markupflow/specs/marketing-site/spec.md +37 -0
  35. package/examples/greenfield-spec-markupflow/tasks.md +28 -0
  36. package/examples/greenfield-spec-markupflow/verification.md +37 -0
  37. package/lib/cli.js +100 -0
  38. package/lib/install.js +286 -0
  39. package/package.json +31 -0
  40. package/references/artifact-templates.md +364 -0
  41. package/references/checkpoints.md +141 -0
  42. package/references/design-inputs.md +55 -0
  43. package/references/modes.md +84 -0
  44. package/references/page-mapping.md +47 -0
  45. package/references/pencil-design-to-code.md +64 -0
  46. package/references/platform-adapters.md +66 -0
  47. package/scripts/postinstall.js +9 -0
  48. package/scripts/validate-assets.js +9 -0
@@ -0,0 +1,141 @@
1
+ # Checkpoints
2
+
3
+ Use these checkpoint rules for Da Vinci.
4
+
5
+ ## Execution Policy
6
+
7
+ Treat checkpoints as internal execution guards, not approval steps.
8
+
9
+ Default handling:
10
+
11
+ - `PASS`: continue automatically
12
+ - `WARN`: record the issue and continue automatically
13
+ - `BLOCK`: stop only when the blocker cannot be resolved from existing artifacts, local context, or the current codebase
14
+
15
+ Do not pause the workflow just because a checkpoint ran.
16
+
17
+ ## `discovery checkpoint`
18
+
19
+ Run after `brainstorm.md`, `project-inventory.md`, or `design-brief.md`.
20
+
21
+ Check:
22
+
23
+ - the active mode is correct
24
+ - the starting material is stable enough to write specs
25
+ - product form factor and visual direction are known, inferred, or explicitly deferred
26
+ - candidate pages or current pages are clear enough to move into `page-map.md`
27
+ - open questions are explicitly tracked
28
+
29
+ Result meanings:
30
+
31
+ - `PASS`: move into formal proposal/spec work
32
+ - `WARN`: continue, but the foundation is still soft
33
+ - `BLOCK`: do not produce downstream artifacts yet
34
+
35
+ ## `spec checkpoint`
36
+
37
+ Run after the core requirements and page scope are defined and before Pencil design is treated as final.
38
+
39
+ Check:
40
+
41
+ - page scope is complete
42
+ - user flows are named
43
+ - important states are present
44
+ - acceptance conditions are testable
45
+ - risky areas are called out early
46
+
47
+ Result meanings:
48
+
49
+ - `PASS`: safe to continue into final design and task planning
50
+ - `WARN`: continue, but update artifacts soon
51
+ - `BLOCK`: update source artifacts before moving on
52
+
53
+ ## `design checkpoint`
54
+
55
+ Run after Pencil pages exist and before implementation tasks are locked.
56
+
57
+ Check:
58
+
59
+ - each required page exists in Pencil
60
+ - important sections exist
61
+ - key states are represented or explicitly deferred
62
+ - major layout strategy matches the design artifact
63
+ - Pencil names and artifact names are aligned enough to implement from
64
+
65
+ Result meanings:
66
+
67
+ - `PASS`: safe to generate implementation tasks
68
+ - `WARN`: minor design gaps exist
69
+ - `BLOCK`: design is not ready to drive implementation
70
+
71
+ ## `mapping checkpoint`
72
+
73
+ Run after `design-registry.md` and `pencil-bindings.md`.
74
+
75
+ Check:
76
+
77
+ - the correct `.pen` source is identified
78
+ - each implementation page has a Pencil page or an explicit exception
79
+ - shared layouts and shared regions are bound clearly enough to implement from
80
+ - route names and Pencil names are traceable
81
+ - missing bindings are called out before implementation
82
+
83
+ Result meanings:
84
+
85
+ - `PASS`: safe to generate implementation tasks
86
+ - `WARN`: some bindings are weak, but implementation can continue carefully
87
+ - `BLOCK`: implementation would guess too much without fixing bindings
88
+
89
+ ## `task checkpoint`
90
+
91
+ Run before implementation starts.
92
+
93
+ Check:
94
+
95
+ - top-level task groups exist
96
+ - tasks cover page structure from Pencil
97
+ - tasks cover behavior from specs
98
+ - tasks cover integration and verification work
99
+ - tasks are ordered by dependency
100
+
101
+ Result meanings:
102
+
103
+ - `PASS`: safe to start implementation
104
+ - `WARN`: implementation can start, but task quality is weak
105
+ - `BLOCK`: rewrite tasks before implementation
106
+
107
+ ## `execution checkpoint`
108
+
109
+ Run after each top-level task group during implementation.
110
+
111
+ Check:
112
+
113
+ - completed code still matches spec behavior
114
+ - completed code still matches Pencil-backed structure
115
+ - no major scope drift appeared
116
+ - next task group is still valid
117
+
118
+ Result meanings:
119
+
120
+ - `PASS`: continue
121
+ - `WARN`: continue, but record the issue
122
+ - `BLOCK`: update artifacts before continuing
123
+
124
+ ## Reporting Format
125
+
126
+ Use this reporting shape:
127
+
128
+ ```md
129
+ ## Checkpoint
130
+ - Type:
131
+ - Status:
132
+
133
+ ## Findings
134
+ - Key point 1
135
+ - Key point 2
136
+
137
+ ## Next Step
138
+ - Continue or update artifacts
139
+ ```
140
+
141
+ Do not create separate review artifacts unless the project explicitly requires them.
@@ -0,0 +1,55 @@
1
+ # Design Inputs
2
+
3
+ Use this reference when collecting product form factor, UI direction, and design preferences.
4
+
5
+ ## Minimum Inputs
6
+
7
+ Collect or infer:
8
+
9
+ 1. form factor
10
+ - desktop software
11
+ - web app
12
+ - tablet
13
+ - mobile app
14
+
15
+ 2. visual direction
16
+ - minimal
17
+ - dense workspace
18
+ - brand-forward
19
+ - enterprise
20
+ - editorial
21
+ - utility-first
22
+
23
+ 3. preference details
24
+ - dark or light
25
+ - high or low density
26
+ - strong or restrained branding
27
+
28
+ 4. constraints
29
+ - existing design system
30
+ - existing brand
31
+ - existing layout shell
32
+ - responsive priority
33
+
34
+ ## Inference Order
35
+
36
+ Infer in this order:
37
+
38
+ 1. existing artifacts
39
+ 2. existing codebase
40
+ 3. user statements
41
+ 4. direct clarification
42
+
43
+ ## When To Ask
44
+
45
+ Ask concise questions only when the answer materially changes Pencil output.
46
+
47
+ Examples:
48
+
49
+ - desktop software or web app
50
+ - dark or light base direction
51
+ - dense productivity UI or spacious marketing UI
52
+
53
+ ## Record The Result
54
+
55
+ Write stable answers into `design-brief.md`.
@@ -0,0 +1,84 @@
1
+ # Workflow Modes
2
+
3
+ Use these mode definitions when selecting how Da Vinci should start work.
4
+
5
+ ## `greenfield-spec`
6
+
7
+ Use when:
8
+
9
+ - the project is new
10
+ - requirements are already clear enough to write specs
11
+
12
+ Entry artifacts:
13
+
14
+ - `design-brief.md`
15
+ - `proposal.md`
16
+ - `specs/<capability>/spec.md`
17
+ - `page-map.md`
18
+
19
+ Best for:
20
+
21
+ - 0-to-1 product work with a stable brief
22
+ - page sets that can be designed directly after requirement breakdown
23
+
24
+ ## `greenfield-brainstorm`
25
+
26
+ Use when:
27
+
28
+ - the project is new
29
+ - requirements are spread across multiple rounds of rough ideas
30
+
31
+ Entry artifacts:
32
+
33
+ - `brainstorm.md`
34
+ - `design-brief.md`
35
+ - then `proposal.md`
36
+ - then `specs/<capability>/spec.md`
37
+ - then `page-map.md`
38
+
39
+ Best for:
40
+
41
+ - founder ideation
42
+ - product discovery sessions
43
+ - messy early-stage requests that need synthesis before design
44
+
45
+ ## `redesign-from-code`
46
+
47
+ Use when:
48
+
49
+ - an existing project already has routes, pages, and UI
50
+ - the goal is a broad UI replacement or redesign
51
+
52
+ Entry artifacts:
53
+
54
+ - `project-inventory.md`
55
+ - `design-registry.md`
56
+ - `proposal.md`
57
+ - `specs/<capability>/spec.md`
58
+ - `page-map.md`
59
+
60
+ Best for:
61
+
62
+ - full visual refresh
63
+ - layout modernization
64
+ - design-system replacement
65
+
66
+ ## `feature-change`
67
+
68
+ Use when:
69
+
70
+ - the project already exists
71
+ - the change affects only part of the system
72
+
73
+ Entry artifacts:
74
+
75
+ - `proposal.md`
76
+ - `specs/<capability>/spec.md`
77
+ - affected `design-registry.md`
78
+ - affected subset of `page-map.md`
79
+
80
+ Best for:
81
+
82
+ - new feature pages
83
+ - changing existing pages
84
+ - scoped UX or workflow changes
@@ -0,0 +1,47 @@
1
+ # Page Mapping
2
+
3
+ Use this reference when the workflow must connect requirements, Pencil pages, and implementation pages.
4
+
5
+ ## Canonical Rule
6
+
7
+ Treat `page-map.md` as the source of truth for implementation pages.
8
+
9
+ Treat `design-registry.md` as the source of truth for available `.pen` sources.
10
+
11
+ Treat `pencil-bindings.md` as the source of truth for:
12
+
13
+ - implementation page -> Pencil page
14
+ - route -> Pencil screen
15
+ - shared region -> Pencil region
16
+
17
+ ## Mapping Rules
18
+
19
+ - define one canonical implementation page name per page
20
+ - define one canonical Pencil page or screen per implementation page when possible
21
+ - if multiple implementation pages share one Pencil page, record the reason
22
+ - if one implementation page needs multiple Pencil screens, record the sub-page or state split
23
+
24
+ ## Minimum Binding Shape
25
+
26
+ Use a simple mapping line:
27
+
28
+ ```md
29
+ - `/settings/billing` -> `Billing Settings Screen`
30
+ ```
31
+
32
+ For shared regions:
33
+
34
+ ```md
35
+ - `App sidebar` -> `Navigation Shell`
36
+ ```
37
+
38
+ ## When To Block
39
+
40
+ Treat bindings as insufficient when:
41
+
42
+ - no active `.pen` source is registered
43
+ - the implementation page has no Pencil source
44
+ - the Pencil page exists but cannot be traced to a route or page responsibility
45
+ - shared layout regions are undefined and implementation would guess too much
46
+
47
+ In those cases, stop at the `mapping checkpoint` and update the artifacts.
@@ -0,0 +1,64 @@
1
+ # Pencil Design To Code
2
+
3
+ Use this reference when implementation must follow Pencil data.
4
+
5
+ ## Source Priority
6
+
7
+ Use this priority order:
8
+
9
+ 1. requirement artifacts for behavior
10
+ 2. Pencil data for presentation
11
+ 3. screenshots only as a visual check
12
+
13
+ Do not infer behavior from appearance alone.
14
+
15
+ ## Read From Pencil
16
+
17
+ When MCP is available, read:
18
+
19
+ - active `.pen` file
20
+ - target page frame
21
+ - child section hierarchy
22
+ - text content
23
+ - layout direction
24
+ - gap and padding
25
+ - width and height strategy
26
+ - fills, strokes, corners, and major visual grouping
27
+
28
+ Prefer structural reads over screenshots.
29
+
30
+ ## Map Pencil To Frontend
31
+
32
+ Use these default mappings:
33
+
34
+ - vertical frame -> column flex container
35
+ - horizontal frame -> row flex container
36
+ - gap -> `gap-*` or arbitrary gap utilities
37
+ - padding -> `p-*` or directional padding utilities
38
+ - fill -> background utilities or custom CSS values
39
+ - text nodes -> semantic headings, paragraphs, labels, buttons
40
+
41
+ When the project uses Tailwind:
42
+
43
+ - preserve layout and spacing first
44
+ - preserve typography second
45
+ - preserve decorative effects third
46
+
47
+ ## Implementation Discipline
48
+
49
+ When coding from Pencil:
50
+
51
+ - keep section order aligned with Pencil
52
+ - keep content hierarchy aligned with Pencil
53
+ - keep major CTA placement aligned with Pencil
54
+ - extract reusable blocks only when the grouping is stable
55
+ - do not flatten the layout so aggressively that the design structure disappears
56
+
57
+ ## Verification
58
+
59
+ Before treating the code as complete:
60
+
61
+ - compare major sections against Pencil
62
+ - compare headline and CTA hierarchy against Pencil
63
+ - compare panel grouping against Pencil
64
+ - note any intentional deviations
@@ -0,0 +1,66 @@
1
+ # Platform Adapters
2
+
3
+ Use these invocation patterns when guiding users across platforms.
4
+
5
+ ## Codex
6
+
7
+ Preferred:
8
+
9
+ ```text
10
+ $da-vinci <request>
11
+ ```
12
+
13
+ Mode examples:
14
+
15
+ ```text
16
+ $da-vinci use greenfield-spec to break down a new SaaS project
17
+ $da-vinci use greenfield-brainstorm to synthesize product ideas into pages and specs
18
+ $da-vinci use redesign-from-code to inventory the current app and redesign the UI
19
+ $da-vinci use feature-change to add a new billing page and generate Pencil-backed tasks
20
+ ```
21
+
22
+ Use this for:
23
+
24
+ - requirement breakdown
25
+ - Pencil page generation planning
26
+ - design-to-code implementation
27
+
28
+ If explicit routes are added later, treat them as routing helpers, not the only entrypoint.
29
+
30
+ ## Claude
31
+
32
+ Preferred:
33
+
34
+ ```text
35
+ /da-vinci <request>
36
+ ```
37
+
38
+ Use the same workflow stages as Codex:
39
+
40
+ - requirement
41
+ - design
42
+ - tasks
43
+ - implementation
44
+ - verification
45
+
46
+ ## Gemini
47
+
48
+ Preferred:
49
+
50
+ ```text
51
+ /da-vinci <request>
52
+ ```
53
+
54
+ Keep the same artifact names and checkpoint names across platforms.
55
+
56
+ ## Cross-Platform Rule
57
+
58
+ Keep these stable:
59
+
60
+ - artifact names
61
+ - checkpoint names
62
+ - drift policy
63
+ - requirement/design/code contract
64
+ - mode names
65
+
66
+ Platform adapters may differ in command syntax, but not in workflow semantics.
@@ -0,0 +1,9 @@
1
+ const { VERSION } = require("../lib/install");
2
+
3
+ console.log(
4
+ [
5
+ `Da Vinci v${VERSION} installed.`,
6
+ "Next step:",
7
+ " da-vinci install --platform codex,claude,gemini"
8
+ ].join("\n")
9
+ );
@@ -0,0 +1,9 @@
1
+ const { validateAssets, VERSION } = require("../lib/install");
2
+
3
+ try {
4
+ const result = validateAssets();
5
+ console.log(`Da Vinci v${VERSION} assets are complete (${result.requiredAssets} required files).`);
6
+ } catch (error) {
7
+ console.error(error.message || String(error));
8
+ process.exit(1);
9
+ }