@cyber-dash-tech/revela 0.1.12 → 0.1.13
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/package.json +1 -1
- package/skill/SKILL.md +40 -132
package/package.json
CHANGED
package/skill/SKILL.md
CHANGED
|
@@ -34,7 +34,39 @@ Before writing any HTML, ask the user these questions **in a single message**
|
|
|
34
34
|
|
|
35
35
|
If the user's first message already answers most of these, skip what's clear and
|
|
36
36
|
only ask about what's missing. If the message is detailed enough, proceed directly
|
|
37
|
-
to Phase
|
|
37
|
+
to Phase 1.5.
|
|
38
|
+
|
|
39
|
+
Once you have the user's answers, **derive the deck slug** from the topic:
|
|
40
|
+
lowercase, hyphens, no spaces (e.g. "AI Investment Shift" → `ai-investment-shift`).
|
|
41
|
+
Tell the user: "I'll save this deck as `slides/{slug}.html`." They can correct the
|
|
42
|
+
name at this point.
|
|
43
|
+
|
|
44
|
+
### Phase 1.5 — Deck Initialization & Resume Check
|
|
45
|
+
|
|
46
|
+
After confirming the deck slug, check whether this deck has been worked on before:
|
|
47
|
+
|
|
48
|
+
1. Run `ls researches/{slug}/` (or `glob researches/{slug}/*.md`).
|
|
49
|
+
2. **If the directory does not exist (new deck):** proceed to Phase 2.
|
|
50
|
+
3. **If research files already exist (resuming):** list the files and ask the user:
|
|
51
|
+
|
|
52
|
+
> 我发现 `researches/{slug}/` 下已有以下研究文件:
|
|
53
|
+
> - `market-data.md`
|
|
54
|
+
> - `competitor-profile.md`
|
|
55
|
+
> - _(etc.)_
|
|
56
|
+
>
|
|
57
|
+
> 你想:
|
|
58
|
+
> a. 直接使用现有研究,跳到幻灯片计划阶段
|
|
59
|
+
> b. 补充某些方向的研究(请告诉我哪些方向)
|
|
60
|
+
> c. 全部重新研究
|
|
61
|
+
|
|
62
|
+
Then act based on the user's reply:
|
|
63
|
+
- **a** → skip Phase 3, go directly to Phase 4 (read existing files first)
|
|
64
|
+
- **b** → run research agents only for the specified axes, then Phase 4
|
|
65
|
+
- **c** → proceed to Phase 2 normally (full research)
|
|
66
|
+
|
|
67
|
+
All subsequent file paths in this session use the confirmed slug:
|
|
68
|
+
- Slides file: `slides/{slug}.html`
|
|
69
|
+
- Research dir: `researches/{slug}/`
|
|
38
70
|
|
|
39
71
|
### Phase 2 — Select Design
|
|
40
72
|
|
|
@@ -127,8 +159,9 @@ research workhorse — not an optional enhancement.
|
|
|
127
159
|
|
|
128
160
|
The research agent searches the web using `websearch` for broad discovery and
|
|
129
161
|
`webfetch` for depth on specific pages, reads workspace documents, and writes
|
|
130
|
-
structured findings to a single file `researches/{
|
|
131
|
-
in the workspace.
|
|
162
|
+
structured findings to a single file `researches/{slug}/{axis-name}.md`
|
|
163
|
+
in the workspace. Use the deck slug confirmed in Phase 1.5 — do not invent a
|
|
164
|
+
different slug at this point.
|
|
132
165
|
|
|
133
166
|
##### Parallelization Rule
|
|
134
167
|
|
|
@@ -151,14 +184,14 @@ need 2 axes; a complex comparison may need 4 or more. Typical decompositions:
|
|
|
151
184
|
Launch ALL agents in a single message (parallel Task tool calls).
|
|
152
185
|
|
|
153
186
|
Each agent's brief should specify:
|
|
154
|
-
- The
|
|
187
|
+
- The deck slug from Phase 1.5 (e.g. `ai-investment-shift`) — all agents share the same slug
|
|
155
188
|
- The axis name for their file (e.g. `anthropic-profile`, `openai-challenges`, `market-trends`)
|
|
156
189
|
- What to research and what time period to focus on
|
|
157
190
|
- An explicit instruction to use `websearch` (e.g. "Use the websearch tool to find relevant market reports, news, and data for this axis.")
|
|
158
191
|
|
|
159
192
|
##### After Agents Complete
|
|
160
193
|
|
|
161
|
-
List and read the findings files: `ls researches/{
|
|
194
|
+
List and read the findings files: `ls researches/{slug}/`, then `read`
|
|
162
195
|
each `.md` file. Each file contains structured `## Data`, `## Cases`,
|
|
163
196
|
`## Images`, and `## Gaps` sections — use these directly as slide material.
|
|
164
197
|
Cross-reference agent findings with workspace documents (Layer 1). Flag any
|
|
@@ -313,8 +346,7 @@ Once the fetch is complete, generate the complete HTML file in one shot.
|
|
|
313
346
|
|
|
314
347
|
- Output **only** the raw HTML — no markdown fences, no explanation before or after
|
|
315
348
|
- Create a `slides/` directory in the current working directory if it doesn't already exist
|
|
316
|
-
- Write the file to `slides
|
|
317
|
-
(e.g. "AI Future" → `slides/ai-future.html`)
|
|
349
|
+
- Write the file to `slides/{slug}.html` using the deck slug confirmed in Phase 1.5
|
|
318
350
|
- The file must be completely self-contained (all CSS and JS inline)
|
|
319
351
|
|
|
320
352
|
### Phase 6 — Iterate
|
|
@@ -325,7 +357,7 @@ After generating, briefly tell the user:
|
|
|
325
357
|
- One line invitation to request changes
|
|
326
358
|
|
|
327
359
|
For change requests: re-generate the **entire** file (don't patch). Apply the
|
|
328
|
-
change and silently overwrite the same `slides
|
|
360
|
+
change and silently overwrite the same `slides/{slug}.html` filename.
|
|
329
361
|
|
|
330
362
|
---
|
|
331
363
|
|
|
@@ -450,130 +482,6 @@ Lowercase, hyphens, no spaces, `.html` extension. Always place files inside the
|
|
|
450
482
|
|
|
451
483
|
---
|
|
452
484
|
|
|
453
|
-
## Design Generation Mode
|
|
454
|
-
|
|
455
|
-
Enter this mode when the user wants to create a new visual design — triggered by
|
|
456
|
-
phrases like "create a design", "save this style as a design", "generate a
|
|
457
|
-
design from this image/screenshot/design", "make a design based on this".
|
|
458
|
-
|
|
459
|
-
Design generation produces a reusable **style definition** (not a full
|
|
460
|
-
presentation). Once saved, the design appears in the design picker and
|
|
461
|
-
applies its visual style to all future presentations.
|
|
462
|
-
|
|
463
|
-
---
|
|
464
|
-
|
|
465
|
-
### Phase T1 — Analyse the reference
|
|
466
|
-
|
|
467
|
-
Study the uploaded image(s) or described style and extract:
|
|
468
|
-
|
|
469
|
-
- **Color palette**: exact hex values for background, surface, text (primary +
|
|
470
|
-
secondary), accent, border. If extracting from an image, sample the dominant
|
|
471
|
-
colors precisely.
|
|
472
|
-
- **Typography feel**: serif vs sans-serif, weight choices, size hierarchy.
|
|
473
|
-
Pick real web fonts from Fontshare (`https://api.fontshare.com`) or Google
|
|
474
|
-
Fonts that match the feel — never use system fonts.
|
|
475
|
-
- **Layout density**: generous whitespace vs compact, centered vs left-aligned.
|
|
476
|
-
- **Animation mood**: subtle & professional, bold & energetic, or minimal
|
|
477
|
-
(no animation).
|
|
478
|
-
- **Aesthetic name**: 2–3 words in kebab-case that describe the look, e.g.
|
|
479
|
-
`warm-editorial`, `neon-brutalist`, `soft-corporate`. Never include the word
|
|
480
|
-
"design".
|
|
481
|
-
|
|
482
|
-
Briefly tell the user what you extracted (palette, fonts, mood) and the name
|
|
483
|
-
you chose. Ask if they want any adjustments before proceeding.
|
|
484
|
-
|
|
485
|
-
---
|
|
486
|
-
|
|
487
|
-
### Phase T2 — Generate skill text
|
|
488
|
-
|
|
489
|
-
Write the complete DESIGN.md body for the new design. Use the **default design's
|
|
490
|
-
DESIGN.md** as the canonical reference for section structure. Your output must
|
|
491
|
-
include all of the same sections: Color Palette, Typography, Background Layers,
|
|
492
|
-
Slide Layout, Component Library, Layout Primitives, Data Visualization (ECharts),
|
|
493
|
-
Composition Guide, Code Blocks, Do & Don't, Reduced Motion.
|
|
494
|
-
|
|
495
|
-
---
|
|
496
|
-
|
|
497
|
-
### Phase T3 — Generate preview.html
|
|
498
|
-
|
|
499
|
-
Write a self-contained HTML file with **at least 7 slides** that demonstrates
|
|
500
|
-
the design can handle all common presentation content types:
|
|
501
|
-
|
|
502
|
-
1. **Cover** — title, subtitle, date/author
|
|
503
|
-
2. **Content with parallel items** — multiple items presented side by side
|
|
504
|
-
(e.g., features, principles, team members)
|
|
505
|
-
3. **Content with quantitative data** — large numbers, metrics, or statistics
|
|
506
|
-
4. **Content with two distinct areas** — narrative paired with supporting
|
|
507
|
-
evidence, or data paired with explanation
|
|
508
|
-
5. **Content with sequential process** — ordered steps or timeline
|
|
509
|
-
6. **Content with a quote or key message** — emphasis on a single statement
|
|
510
|
-
7. **Closing** — thank you, CTA, or summary
|
|
511
|
-
|
|
512
|
-
Rules:
|
|
513
|
-
- Use the exact CSS variables from the skill text you just generated
|
|
514
|
-
- Each slide should demonstrate the design's visual style — collectively
|
|
515
|
-
showcase all components at least once (cards, stat cards, quote block,
|
|
516
|
-
step flow, evidence lists, chart containers, decorative fills, etc.)
|
|
517
|
-
- Must use the 1920×1080 canvas with `transform: scale()` and `setupScaling()` JS
|
|
518
|
-
- Must look great at 900×600px (DesignModal preview iframe size — canvas auto-scales)
|
|
519
|
-
- Include working keyboard navigation, nav dots, and progress bar
|
|
520
|
-
|
|
521
|
-
---
|
|
522
|
-
|
|
523
|
-
### Phase T4 — Save the design
|
|
524
|
-
|
|
525
|
-
Save the new design by writing the files and installing via the `designs` tool.
|
|
526
|
-
|
|
527
|
-
**Step 1 — Write files to a temporary directory:**
|
|
528
|
-
|
|
529
|
-
Create a temporary directory and write two files:
|
|
530
|
-
- `DESIGN.md` — with YAML frontmatter (`name`, `description`, `author`, `version`)
|
|
531
|
-
followed by the full skill text body from Phase T2
|
|
532
|
-
- `preview.html` — the full HTML from Phase T3
|
|
533
|
-
|
|
534
|
-
```
|
|
535
|
-
/tmp/revela-design-<name>/
|
|
536
|
-
├── DESIGN.md
|
|
537
|
-
└── preview.html
|
|
538
|
-
```
|
|
539
|
-
|
|
540
|
-
**Step 2 — Install the design:**
|
|
541
|
-
|
|
542
|
-
Call the `designs` tool with action `"install"` and `source` pointing to the
|
|
543
|
-
temporary directory path. Optionally pass `name` to override the design name.
|
|
544
|
-
|
|
545
|
-
**Step 3 — Activate the design:**
|
|
546
|
-
|
|
547
|
-
Call the `designs` tool with action `"activate"` and the design name.
|
|
548
|
-
|
|
549
|
-
**Step 4 — Clean up:**
|
|
550
|
-
|
|
551
|
-
Remove the temporary directory.
|
|
552
|
-
|
|
553
|
-
---
|
|
554
|
-
|
|
555
|
-
### Phase T5 — Confirm
|
|
556
|
-
|
|
557
|
-
Tell the user:
|
|
558
|
-
|
|
559
|
-
> Design **`<name>`** has been created and activated.
|
|
560
|
-
> Open the design picker (the design button in the bottom bar) to see it.
|
|
561
|
-
> Your next presentation will use this style automatically.
|
|
562
|
-
|
|
563
|
-
Do not generate a presentation unless the user asks for one.
|
|
564
|
-
|
|
565
|
-
---
|
|
566
|
-
|
|
567
|
-
### Design Generation Rules
|
|
568
|
-
|
|
569
|
-
- **Never** hardcode colors — always use CSS custom properties.
|
|
570
|
-
- **Never** name a design after a brand or person. Use descriptive aesthetic names.
|
|
571
|
-
- The `skill_md` you generate becomes the AI's only style reference — be precise.
|
|
572
|
-
- preview.html must use the **exact same CSS variables** as the skill text.
|
|
573
|
-
- If the user uploads multiple images with conflicting styles, ask which one to use.
|
|
574
|
-
|
|
575
|
-
---
|
|
576
|
-
|
|
577
485
|
## Active Design Reference
|
|
578
486
|
|
|
579
487
|
The active design name is in the HTML comment at the top of this prompt:
|