@cyber-dash-tech/revela 0.1.11 → 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/README.md +180 -91
- package/README.zh-CN.md +185 -128
- package/designs/summit/DESIGN.md +122 -55
- package/package.json +1 -1
- package/skill/SKILL.md +40 -132
package/README.md
CHANGED
|
@@ -2,32 +2,44 @@
|
|
|
2
2
|
|
|
3
3
|
**English** | [中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@cyber-dash-tech/revela) [](LICENSE) [](https://www.npmjs.com/package/@cyber-dash-tech/revela) [](LICENSE) [](tests/) [](https://opencode.ai) [](https://bun.sh)
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<img src="assets/img/logo.png" alt="Revela" width="800" />
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
Revela is an [OpenCode](https://opencode.ai) plugin that turns your current agent into an HTML slide deck generator.
|
|
12
|
+
Enable it for a session, give the agent a presentation task, and it can research, structure, write, and QA a complete deck in `slides/*.html`.
|
|
13
13
|
|
|
14
|
+
**[Live Demo — The AI Power Shift](https://cyber-dash-tech.github.io/revela/assets/html/ai-power-shift.html)** · A 5-slide investment brief generated with Revela.
|
|
14
15
|
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## What Revela Is
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
Revela is a mode, not a separate chat agent.
|
|
21
|
+
|
|
22
|
+
- `/revela enable` injects a presentation-specific system prompt into your current agent
|
|
23
|
+
- the prompt is built from 3 layers: core skill, active domain, active design
|
|
24
|
+
- the agent can scan workspace files, delegate web research, generate HTML slides, and run layout QA automatically
|
|
25
|
+
- design and domain switching happen locally and rebuild the active prompt immediately
|
|
17
26
|
|
|
18
27
|
---
|
|
19
28
|
|
|
20
29
|
## Requirements
|
|
21
30
|
|
|
22
|
-
- [OpenCode](https://opencode.ai)
|
|
23
|
-
-
|
|
24
|
-
-
|
|
31
|
+
- [OpenCode](https://opencode.ai)
|
|
32
|
+
- Bun runtime (`bun >= 1.0.0`)
|
|
33
|
+
- [Google Chrome](https://www.google.com/chrome/) or Chromium for layout QA and PDF export
|
|
34
|
+
- Git for source install
|
|
25
35
|
|
|
26
36
|
---
|
|
27
37
|
|
|
28
38
|
## Install
|
|
29
39
|
|
|
30
|
-
|
|
40
|
+
### Standard install
|
|
41
|
+
|
|
42
|
+
Add `@cyber-dash-tech/revela` to the `plugin` array in `opencode.json`:
|
|
31
43
|
|
|
32
44
|
```json
|
|
33
45
|
{
|
|
@@ -36,15 +48,24 @@ Add `@cyber-dash-tech/revela` to the `plugin` array in your `opencode.json`:
|
|
|
36
48
|
}
|
|
37
49
|
```
|
|
38
50
|
|
|
39
|
-
Restart OpenCode
|
|
51
|
+
Restart OpenCode. The plugin is installed automatically via Bun.
|
|
40
52
|
|
|
41
|
-
To install globally
|
|
53
|
+
To install globally, add the same `plugin` entry to `~/.config/opencode/opencode.json`.
|
|
42
54
|
|
|
43
|
-
###
|
|
55
|
+
### Local wrapper install
|
|
56
|
+
|
|
57
|
+
Use this when:
|
|
58
|
+
|
|
59
|
+
- Bun plugin install is blocked or unreliable
|
|
60
|
+
- you are on a mainland China network
|
|
61
|
+
- you want to run Revela from a local checkout
|
|
62
|
+
|
|
63
|
+
From source:
|
|
44
64
|
|
|
45
65
|
```bash
|
|
46
66
|
git clone https://github.com/cyber-dash-tech/revela
|
|
47
|
-
cd revela
|
|
67
|
+
cd revela
|
|
68
|
+
npm install
|
|
48
69
|
```
|
|
49
70
|
|
|
50
71
|
Create `~/.config/opencode/plugins/revela.js`:
|
|
@@ -53,24 +74,43 @@ Create `~/.config/opencode/plugins/revela.js`:
|
|
|
53
74
|
export { default } from "/absolute/path/to/revela/index.ts";
|
|
54
75
|
```
|
|
55
76
|
|
|
56
|
-
|
|
77
|
+
If you use the local wrapper route, make sure `~/.config/opencode/opencode.json` does not also contain a `plugin` entry for `@cyber-dash-tech/revela`, otherwise OpenCode will still try Bun-based installation.
|
|
78
|
+
|
|
79
|
+
### China mainland note
|
|
80
|
+
|
|
81
|
+
OpenCode's npm plugin installer uses Bun and may ignore npm mirror configuration. If direct installation fails, use the local wrapper method above or install the package with npm under `~/.config/opencode/` and create a local wrapper file.
|
|
57
82
|
|
|
58
83
|
---
|
|
59
84
|
|
|
60
85
|
## Quick Start
|
|
61
86
|
|
|
62
|
-
|
|
87
|
+
Start OpenCode:
|
|
88
|
+
|
|
63
89
|
```bash
|
|
64
|
-
|
|
90
|
+
opencode
|
|
65
91
|
```
|
|
66
92
|
|
|
67
|
-
Enable Revela in
|
|
68
|
-
|
|
93
|
+
Enable Revela in the current session:
|
|
94
|
+
|
|
95
|
+
```text
|
|
69
96
|
/revela enable
|
|
70
97
|
```
|
|
71
98
|
|
|
72
|
-
|
|
99
|
+
Then give the agent a slide task, for example:
|
|
100
|
+
|
|
101
|
+
```text
|
|
102
|
+
Create a 6-slide HTML deck on humanoid robotics supply chains. Use the summit design, cite the main market drivers, and save the result to slides/humanoid-robotics.html.
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Export the resulting HTML deck to PDF if needed:
|
|
106
|
+
|
|
107
|
+
```text
|
|
108
|
+
/revela pdf slides/humanoid-robotics.html
|
|
73
109
|
```
|
|
110
|
+
|
|
111
|
+
Disable Revela and return the current agent to normal mode:
|
|
112
|
+
|
|
113
|
+
```text
|
|
74
114
|
/revela disable
|
|
75
115
|
```
|
|
76
116
|
|
|
@@ -78,86 +118,113 @@ To turn it off and restore the primary agent to normal:
|
|
|
78
118
|
|
|
79
119
|
## Commands
|
|
80
120
|
|
|
81
|
-
```
|
|
82
|
-
/revela show status
|
|
83
|
-
/revela enable
|
|
84
|
-
/revela disable
|
|
121
|
+
```text
|
|
122
|
+
/revela show status and help
|
|
123
|
+
/revela enable enable presentation mode for this session
|
|
124
|
+
/revela disable disable presentation mode
|
|
85
125
|
|
|
86
126
|
/revela designs list installed designs
|
|
87
|
-
/revela designs <name>
|
|
88
|
-
/revela designs-add <source> install a design from
|
|
127
|
+
/revela designs <name> activate a design
|
|
128
|
+
/revela designs-add <source> install a design from URL, local path, or github:user/repo
|
|
129
|
+
/revela designs-rm <name> remove an installed design
|
|
89
130
|
|
|
90
131
|
/revela domains list installed domains
|
|
91
|
-
/revela domains <name>
|
|
92
|
-
/revela domains-add <source> install a domain from
|
|
132
|
+
/revela domains <name> activate a domain
|
|
133
|
+
/revela domains-add <source> install a domain from URL, local path, or github:user/repo
|
|
134
|
+
/revela domains-rm <name> remove an installed domain
|
|
135
|
+
|
|
136
|
+
/revela pdf <file> export an HTML deck to PDF in the same directory
|
|
93
137
|
```
|
|
94
138
|
|
|
95
|
-
All commands execute locally
|
|
139
|
+
All `/revela` commands execute locally with zero LLM cost.
|
|
96
140
|
|
|
97
141
|
---
|
|
98
142
|
|
|
99
|
-
##
|
|
143
|
+
## How It Works
|
|
100
144
|
|
|
101
|
-
|
|
145
|
+
When Revela is enabled, it appends a generated prompt to the current agent's system prompt.
|
|
102
146
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
147
|
+
That prompt is built from 3 layers:
|
|
148
|
+
|
|
149
|
+
1. `skill/SKILL.md` — the core slide-generation workflow
|
|
150
|
+
2. active domain — domain-specific report structure and terminology
|
|
151
|
+
3. active design — visual language, layouts, components, and chart rules
|
|
152
|
+
|
|
153
|
+
The current design and domain are persisted in `~/.config/revela/config.json`. The session-level enabled/disabled state is not persisted.
|
|
107
154
|
|
|
108
155
|
---
|
|
109
156
|
|
|
110
|
-
##
|
|
157
|
+
## Research And File Ingestion
|
|
111
158
|
|
|
112
|
-
|
|
159
|
+
When Revela is enabled, the agent can use:
|
|
113
160
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
161
|
+
- `revela-workspace-scan` to discover PDFs, Office files, CSVs, Markdown, and text files in the workspace
|
|
162
|
+
- the `revela-research` subagent to fetch targeted web sources and save structured findings into `researches/<topic>/`
|
|
163
|
+
- `revela-research-save` to write one findings file per research axis
|
|
164
|
+
|
|
165
|
+
Supported file types for `@` reference and automatic text extraction:
|
|
166
|
+
|
|
167
|
+
- `.pdf`
|
|
168
|
+
- `.docx`
|
|
169
|
+
- `.pptx`
|
|
170
|
+
- `.xlsx`
|
|
119
171
|
|
|
120
|
-
|
|
172
|
+
Revela transparently extracts text from these binary files before the main agent reasons over them.
|
|
121
173
|
|
|
122
174
|
---
|
|
123
175
|
|
|
124
|
-
##
|
|
176
|
+
## Layout QA And Compliance
|
|
125
177
|
|
|
126
|
-
|
|
178
|
+
Every time the agent writes `slides/*.html`, Revela automatically runs a Puppeteer-based QA pass at `1920x1080`.
|
|
179
|
+
The QA report is fed back immediately so the agent can fix layout or compliance problems before moving on.
|
|
127
180
|
|
|
128
|
-
|
|
129
|
-
- **Run parallel research** via the `revela-research` subagent — fetches targeted URLs and saves structured findings to `researches/<topic>/`. The primary agent then synthesises these findings into slides.
|
|
181
|
+
Current QA dimensions:
|
|
130
182
|
|
|
131
|
-
|
|
183
|
+
| Dimension | What it checks |
|
|
184
|
+
|---|---|
|
|
185
|
+
| `overflow` | Elements extending outside the slide canvas |
|
|
186
|
+
| `balance` | Sparse slides, weak fill, centroid drift, and bottom-gap issues |
|
|
187
|
+
| `symmetry` | Side-by-side column imbalance in height or density |
|
|
188
|
+
| `rhythm` | Irregular vertical spacing between stacked siblings |
|
|
189
|
+
| `compliance` | Unknown design classes and novel CSS rules outside the active design vocabulary |
|
|
190
|
+
|
|
191
|
+
Slides must declare `slide-qa="true"` or `slide-qa="false"`.
|
|
192
|
+
|
|
193
|
+
- use `slide-qa="true"` for content-heavy slides that should undergo full layout QA
|
|
194
|
+
- use `slide-qa="false"` for structural slides such as cover, TOC, quote, summary, or closing pages
|
|
195
|
+
|
|
196
|
+
Compliance is part of the generation loop, not a soft suggestion. If the agent introduces classes or CSS rules that are not defined by the active design, QA flags them and the file should be corrected.
|
|
197
|
+
|
|
198
|
+
You can also run QA manually with the `revela-qa` tool.
|
|
132
199
|
|
|
133
200
|
---
|
|
134
201
|
|
|
135
|
-
##
|
|
202
|
+
## Built-in Designs
|
|
136
203
|
|
|
137
|
-
|
|
204
|
+
Switch designs with `/revela designs <name>`.
|
|
138
205
|
|
|
139
|
-
|
|
206
|
+
| Name | Description | Preview |
|
|
207
|
+
|---|---|---|
|
|
208
|
+
| `aurora` | Dark executive style with structured information density and ECharts-ready data visualization patterns |  |
|
|
209
|
+
| `summit` | Editorial annual-report style for image-rich narrative slides and restrained business storytelling |  |
|
|
140
210
|
|
|
141
|
-
|
|
142
|
-
|---|---|
|
|
143
|
-
| **Fill ratio** | Content must occupy enough of the canvas |
|
|
144
|
-
| **Bottom whitespace** | Flags large empty gaps at the slide bottom |
|
|
145
|
-
| **Overflow** | Elements that extend outside the canvas |
|
|
146
|
-
| **Asymmetry** | Side-by-side columns with large height differences |
|
|
147
|
-
| **Density imbalance** | Columns where CSS `align-items: stretch` hides content imbalance |
|
|
148
|
-
| **Sparse** | Slides with too few visible elements |
|
|
211
|
+
---
|
|
149
212
|
|
|
150
|
-
|
|
213
|
+
## Built-in Domains
|
|
151
214
|
|
|
152
|
-
|
|
215
|
+
Switch domains with `/revela domains <name>`.
|
|
153
216
|
|
|
154
|
-
|
|
217
|
+
| Name | Description |
|
|
218
|
+
|---|---|
|
|
219
|
+
| `general` | No domain specialization |
|
|
220
|
+
| `deeptech-investment` | VC and investment analysis: market sizing, technical readiness, moat, and investment thesis |
|
|
221
|
+
| `consulting` | Strategic consulting: go/no-go decisions, strategy design, and belief-change reporting |
|
|
155
222
|
|
|
156
223
|
---
|
|
157
224
|
|
|
158
225
|
## Custom Designs
|
|
159
226
|
|
|
160
|
-
A design is a folder
|
|
227
|
+
A custom design is a folder containing `DESIGN.md` with frontmatter metadata:
|
|
161
228
|
|
|
162
229
|
```yaml
|
|
163
230
|
---
|
|
@@ -168,49 +235,60 @@ version: 1.0.0
|
|
|
168
235
|
---
|
|
169
236
|
```
|
|
170
237
|
|
|
171
|
-
The body
|
|
238
|
+
The body defines the visual system used by the agent.
|
|
172
239
|
|
|
173
|
-
###
|
|
240
|
+
### Marker system
|
|
174
241
|
|
|
175
|
-
|
|
242
|
+
For larger designs, use the current marker format:
|
|
176
243
|
|
|
177
244
|
```html
|
|
178
|
-
<!-- @
|
|
179
|
-
|
|
180
|
-
<!-- @
|
|
245
|
+
<!-- @design:foundation:start -->
|
|
246
|
+
Colors, typography, CSS variables, HTML shell, base JS...
|
|
247
|
+
<!-- @design:foundation:end -->
|
|
248
|
+
|
|
249
|
+
<!-- @design:rules:start -->
|
|
250
|
+
Composition rules, do/don't guidance, design-specific constraints...
|
|
251
|
+
<!-- @design:rules:end -->
|
|
252
|
+
|
|
253
|
+
<!-- @design:layouts:start -->
|
|
254
|
+
<!-- @layout:cover:start qa=false -->
|
|
255
|
+
Layout details...
|
|
256
|
+
<!-- @layout:cover:end -->
|
|
181
257
|
|
|
182
|
-
<!-- @
|
|
183
|
-
Layout
|
|
184
|
-
<!-- @
|
|
258
|
+
<!-- @layout:two-col:start qa=true -->
|
|
259
|
+
Layout details...
|
|
260
|
+
<!-- @layout:two-col:end -->
|
|
261
|
+
<!-- @design:layouts:end -->
|
|
185
262
|
|
|
186
|
-
<!-- @
|
|
263
|
+
<!-- @design:components:start -->
|
|
187
264
|
<!-- @component:card:start -->
|
|
188
|
-
|
|
265
|
+
Component HTML + CSS...
|
|
189
266
|
<!-- @component:card:end -->
|
|
190
267
|
|
|
191
268
|
<!-- @component:stat-card:start -->
|
|
192
|
-
|
|
269
|
+
Component HTML + CSS...
|
|
193
270
|
<!-- @component:stat-card:end -->
|
|
194
|
-
<!-- @
|
|
271
|
+
<!-- @design:components:end -->
|
|
195
272
|
|
|
196
|
-
<!-- @
|
|
197
|
-
|
|
198
|
-
<!-- @
|
|
199
|
-
|
|
200
|
-
<!-- @section:guide:start -->
|
|
201
|
-
Composition rules, common recipes, do/don't examples...
|
|
202
|
-
<!-- @section:guide:end -->
|
|
273
|
+
<!-- @design:chart-rules:start -->
|
|
274
|
+
Chart guidance...
|
|
275
|
+
<!-- @design:chart-rules:end -->
|
|
203
276
|
```
|
|
204
277
|
|
|
205
|
-
|
|
278
|
+
Prompt injection behavior:
|
|
279
|
+
|
|
280
|
+
- always injected: `@design:foundation`, `@design:rules`, layout index, component index
|
|
281
|
+
- fetched on demand: individual `@layout:*`, individual `@component:*`, `@design:chart-rules`
|
|
206
282
|
|
|
207
|
-
|
|
283
|
+
If a design has no markers, Revela falls back to injecting the full `DESIGN.md` body.
|
|
208
284
|
|
|
209
|
-
|
|
285
|
+
### Compliance note for design authors
|
|
286
|
+
|
|
287
|
+
Revela extracts the allowed CSS class vocabulary from your design and uses it during QA compliance checks. If the agent invents a class or defines a CSS rule outside that vocabulary, QA reports it.
|
|
210
288
|
|
|
211
289
|
### Install a custom design
|
|
212
290
|
|
|
213
|
-
```
|
|
291
|
+
```text
|
|
214
292
|
/revela designs-add github:your-org/your-design
|
|
215
293
|
/revela designs-add https://example.com/my-design.zip
|
|
216
294
|
/revela designs-add ./path/to/local/design-folder
|
|
@@ -220,20 +298,31 @@ Without markers, the entire `DESIGN.md` body is injected every turn (backward-co
|
|
|
220
298
|
|
|
221
299
|
## Custom Domains
|
|
222
300
|
|
|
223
|
-
A domain
|
|
301
|
+
A custom domain is a folder containing `INDUSTRY.md` with frontmatter metadata similar to a design.
|
|
224
302
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
```
|
|
303
|
+
```text
|
|
228
304
|
/revela domains-add github:your-org/your-domain
|
|
229
305
|
```
|
|
230
306
|
|
|
307
|
+
`INDUSTRY.md` is a legacy filename kept for compatibility.
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## PDF Export
|
|
312
|
+
|
|
313
|
+
Export a generated HTML deck to PDF:
|
|
314
|
+
|
|
315
|
+
```text
|
|
316
|
+
/revela pdf slides/my-deck.html
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
Revela renders each slide through Chrome/Chromium and assembles the final PDF in the same directory.
|
|
320
|
+
|
|
231
321
|
---
|
|
232
322
|
|
|
233
323
|
## Logging
|
|
234
324
|
|
|
235
|
-
Revela uses structured
|
|
236
|
-
Logs are written to `stderr`. To enable verbose debug output:
|
|
325
|
+
Revela uses structured logging via [tslog](https://tslog.js.org/). To enable verbose debug output:
|
|
237
326
|
|
|
238
327
|
```bash
|
|
239
328
|
REVELA_DEBUG=1 opencode
|