@cyber-dash-tech/revela 0.1.16 → 0.2.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 CHANGED
@@ -2,36 +2,38 @@
2
2
 
3
3
  **English** | [中文](README.zh-CN.md)
4
4
 
5
- [![npm version](https://img.shields.io/npm/v/@cyber-dash-tech/revela)](https://www.npmjs.com/package/@cyber-dash-tech/revela) [![license](https://img.shields.io/npm/l/@cyber-dash-tech/revela)](LICENSE) [![tests](https://img.shields.io/badge/tests-110%20passing-brightgreen)](tests/) [![OpenCode plugin](https://img.shields.io/badge/OpenCode-plugin-blue)](https://opencode.ai) [![Bun](https://img.shields.io/badge/Bun-%E2%89%A51.0-orange)](https://bun.sh)
5
+ [![npm version](https://img.shields.io/npm/v/@cyber-dash-tech/revela)](https://www.npmjs.com/package/@cyber-dash-tech/revela) [![license](https://img.shields.io/npm/l/@cyber-dash-tech/revela)](LICENSE) [![tests](https://img.shields.io/badge/tests-109%20passing-brightgreen)](tests/) [![OpenCode plugin](https://img.shields.io/badge/OpenCode-plugin-blue)](https://opencode.ai) [![Bun](https://img.shields.io/badge/Bun-%E2%89%A51.0-orange)](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
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 `decks/*.html`.
12
+ Enable it for the current session, assign a presentation task, and the agent can research, structure, write, QA, and export a deck.
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
+ **[Live Demo — The AI Power Shift](https://cyber-dash-tech.github.io/revela/assets/html/ai-power-shift.html)**
15
15
 
16
16
  ---
17
17
 
18
- ## What Revela Is
18
+ ## What It Does
19
19
 
20
- Revela is a mode, not a separate chat agent.
20
+ - injects a presentation-specific system prompt into your current agent with `/revela enable`
21
+ - builds that prompt from 3 layers: core skill, active domain, active design
22
+ - supports workspace document discovery plus transparent extraction for `.pdf`, `.docx`, `.pptx`, and `.xlsx`
23
+ - runs automatic layout QA whenever the agent writes `decks/*.html`
24
+ - exports finished decks to PDF and editable PPTX
25
+ - switches designs and domains locally with zero LLM cost
21
26
 
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
27
+ Revela is a mode, not a separate agent.
26
28
 
27
29
  ---
28
30
 
29
31
  ## Requirements
30
32
 
31
33
  - [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
34
+ - Bun runtime `>= 1.0.0`
35
+ - [Google Chrome](https://www.google.com/chrome/) or Chromium for QA, PDF export, and PPTX export
36
+ - Git if you install from source
35
37
 
36
38
  ---
37
39
 
@@ -48,19 +50,13 @@ Add `@cyber-dash-tech/revela` to the `plugin` array in `opencode.json`:
48
50
  }
49
51
  ```
50
52
 
51
- Restart OpenCode. The plugin is installed automatically via Bun.
53
+ Restart OpenCode.
52
54
 
53
- To install globally, add the same `plugin` entry to `~/.config/opencode/opencode.json`.
55
+ To install globally, add the same entry to `~/.config/opencode/opencode.json`.
54
56
 
55
57
  ### Local wrapper install
56
58
 
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:
59
+ Use this when Bun-based plugin install is blocked, unreliable, or you want to run from a local checkout.
64
60
 
65
61
  ```bash
66
62
  git clone https://github.com/cyber-dash-tech/revela
@@ -74,41 +70,44 @@ Create `~/.config/opencode/plugins/revela.js`:
74
70
  export { default } from "/absolute/path/to/revela/index.ts";
75
71
  ```
76
72
 
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.
73
+ If you use the local wrapper route, remove any `@cyber-dash-tech/revela` entry from `opencode.json`, otherwise OpenCode may still try Bun installation.
78
74
 
79
75
  ### China mainland note
80
76
 
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.
77
+ OpenCode's npm plugin installer uses Bun and may ignore npm mirror settings. If direct installation fails, prefer the local wrapper method.
82
78
 
83
79
  ---
84
80
 
85
81
  ## Quick Start
86
82
 
87
- Start OpenCode:
83
+ Enable Revela in the current session:
88
84
 
89
- ```bash
90
- opencode
85
+ ```text
86
+ /revela enable
91
87
  ```
92
88
 
93
- Enable Revela in the current session:
89
+ Optionally switch design or domain:
94
90
 
95
91
  ```text
96
- /revela enable
92
+ /revela designs
93
+ /revela designs summit
94
+ /revela domains deeptech-investment
97
95
  ```
98
96
 
99
- Then give the agent a slide task, for example:
97
+ Then give the agent a deck task:
100
98
 
101
99
  ```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 decks/humanoid-robotics.html.
100
+ Create a 6-slide HTML deck on humanoid robotics supply chains. Cite the main market drivers, use the active design faithfully, and save the result to decks/humanoid-robotics.html.
103
101
  ```
104
102
 
105
- Export the resulting HTML deck to PDF if needed:
103
+ Export when needed:
106
104
 
107
105
  ```text
108
106
  /revela pdf decks/humanoid-robotics.html
107
+ /revela pptx decks/humanoid-robotics.html
109
108
  ```
110
109
 
111
- Disable Revela and return the current agent to normal mode:
110
+ Disable presentation mode when done:
112
111
 
113
112
  ```text
114
113
  /revela disable
@@ -134,9 +133,10 @@ Disable Revela and return the current agent to normal mode:
134
133
  /revela domains-rm <name> remove an installed domain
135
134
 
136
135
  /revela pdf <file> export an HTML deck to PDF in the same directory
136
+ /revela pptx <file> export an HTML deck to editable PPTX in the same directory
137
137
  ```
138
138
 
139
- All `/revela` commands execute locally with zero LLM cost.
139
+ All `/revela` commands run locally with zero LLM cost.
140
140
 
141
141
  ---
142
142
 
@@ -146,11 +146,12 @@ When Revela is enabled, it appends a generated prompt to the current agent's sys
146
146
 
147
147
  That prompt is built from 3 layers:
148
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
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 system, layouts, components, and chart rules
152
152
 
153
- The current design and domain are persisted in `~/.config/revela/config.json`. The session-level enabled/disabled state is not persisted.
153
+ Persistent preferences live in `~/.config/revela/config.json`.
154
+ The enabled or disabled state is session-level only.
154
155
 
155
156
  ---
156
157
 
@@ -159,60 +160,54 @@ The current design and domain are persisted in `~/.config/revela/config.json`. T
159
160
  When Revela is enabled, the agent can use:
160
161
 
161
162
  - `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
163
+ - the `revela-research` subagent for targeted web research
164
+ - `revela-research-save` to write structured findings into `researches/<topic>/`
165
+
166
+ Supported document extraction paths:
164
167
 
165
- Supported file types for `@` reference and automatic text extraction:
168
+ - `@` reference or pasted file in chat
169
+ - `read` tool access while Revela is enabled
170
+
171
+ Supported extracted file types:
166
172
 
167
173
  - `.pdf`
168
174
  - `.docx`
169
175
  - `.pptx`
170
176
  - `.xlsx`
171
177
 
172
- Revela transparently extracts text from these binary files before the main agent reasons over them.
178
+ This extraction is transparent to the main agent.
173
179
 
174
180
  ---
175
181
 
176
182
  ## Layout QA And Compliance
177
183
 
178
- Every time the agent writes `decks/*.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.
184
+ Every time the agent writes `decks/*.html`, Revela runs an automatic Puppeteer-based QA pass at `1920x1080`.
185
+ The report is returned immediately so the agent can fix problems before moving on.
180
186
 
181
187
  Current QA dimensions:
182
188
 
183
189
  | Dimension | What it checks |
184
190
  |---|---|
185
191
  | `overflow` | Elements extending outside the slide canvas |
186
- | `balance` | Sparse slides, weak fill, centroid drift, and bottom-gap issues |
192
+ | `balance` | Sparse slides, centroid drift, and bottom-gap issues |
187
193
  | `symmetry` | Side-by-side column imbalance in height or density |
188
194
  | `rhythm` | Irregular vertical spacing between stacked siblings |
189
195
  | `compliance` | Unknown design classes and novel CSS rules outside the active design vocabulary |
190
196
 
191
- Slides must declare `slide-qa="true"` or `slide-qa="false"`.
197
+ Each slide must declare `slide-qa="true"` or `slide-qa="false"`.
192
198
 
193
- - use `slide-qa="true"` for content-heavy slides that should undergo full layout QA
199
+ - use `slide-qa="true"` for content-heavy slides that should undergo full QA
194
200
  - use `slide-qa="false"` for structural slides such as cover, TOC, quote, summary, or closing pages
195
201
 
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
202
  You can also run QA manually with the `revela-qa` tool.
199
203
 
200
204
  ---
201
205
 
202
- ## Built-in Designs
203
-
204
- Switch designs with `/revela designs <name>`.
205
-
206
- | Name | Description | Preview |
207
- |---|---|---|
208
- | `aurora` | Dark executive style with structured information density and ECharts-ready data visualization patterns | ![aurora](assets/img/slide-example-aurora.jpg) |
209
- | `summit` | Editorial annual-report style for image-rich narrative slides and restrained business storytelling | ![summit](assets/img/slide-example-summit.jpg) |
210
-
211
- ---
206
+ ## Designs And Domains
212
207
 
213
- ## Built-in Domains
208
+ Use `/revela designs` and `/revela domains` to inspect what is installed in your environment.
214
209
 
215
- Switch domains with `/revela domains <name>`.
210
+ Bundled domains in this repository:
216
211
 
217
212
  | Name | Description |
218
213
  |---|---|
@@ -220,6 +215,13 @@ Switch domains with `/revela domains <name>`.
220
215
  | `deeptech-investment` | VC and investment analysis: market sizing, technical readiness, moat, and investment thesis |
221
216
  | `consulting` | Strategic consulting: go/no-go decisions, strategy design, and belief-change reporting |
222
217
 
218
+ Repository design examples:
219
+
220
+ | Name | Description | Preview |
221
+ |---|---|---|
222
+ | `summit` | Editorial annual-report style for image-rich narrative slides and restrained business storytelling | ![summit](assets/img/slide-example-summit.jpg) |
223
+ | `monet` | Light, serif-led visual system for quieter, art-directed business storytelling | `DESIGN.md` included in repo |
224
+
223
225
  ---
224
226
 
225
227
  ## Custom Designs
@@ -235,43 +237,31 @@ version: 1.0.0
235
237
  ---
236
238
  ```
237
239
 
238
- The body defines the visual system used by the agent.
239
-
240
- ### Marker system
241
-
242
- For larger designs, use the current marker format:
240
+ For larger designs, use the marker system:
243
241
 
244
242
  ```html
245
243
  <!-- @design:foundation:start -->
246
- Colors, typography, CSS variables, HTML shell, base JS...
244
+ Foundation rules
247
245
  <!-- @design:foundation:end -->
248
246
 
249
247
  <!-- @design:rules:start -->
250
- Composition rules, do/don't guidance, design-specific constraints...
248
+ Design rules
251
249
  <!-- @design:rules:end -->
252
250
 
253
251
  <!-- @design:layouts:start -->
254
252
  <!-- @layout:cover:start qa=false -->
255
- Layout details...
253
+ Layout details
256
254
  <!-- @layout:cover:end -->
257
-
258
- <!-- @layout:two-col:start qa=true -->
259
- Layout details...
260
- <!-- @layout:two-col:end -->
261
255
  <!-- @design:layouts:end -->
262
256
 
263
257
  <!-- @design:components:start -->
264
258
  <!-- @component:card:start -->
265
- Component HTML + CSS...
259
+ Component details
266
260
  <!-- @component:card:end -->
267
-
268
- <!-- @component:stat-card:start -->
269
- Component HTML + CSS...
270
- <!-- @component:stat-card:end -->
271
261
  <!-- @design:components:end -->
272
262
 
273
263
  <!-- @design:chart-rules:start -->
274
- Chart guidance...
264
+ Chart rules
275
265
  <!-- @design:chart-rules:end -->
276
266
  ```
277
267
 
@@ -282,11 +272,7 @@ Prompt injection behavior:
282
272
 
283
273
  If a design has no markers, Revela falls back to injecting the full `DESIGN.md` body.
284
274
 
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.
288
-
289
- ### Install a custom design
275
+ Install a custom design:
290
276
 
291
277
  ```text
292
278
  /revela designs-add github:your-org/your-design
@@ -298,7 +284,7 @@ Revela extracts the allowed CSS class vocabulary from your design and uses it du
298
284
 
299
285
  ## Custom Domains
300
286
 
301
- A custom domain is a folder containing `INDUSTRY.md` with frontmatter metadata similar to a design.
287
+ A custom domain is a folder containing `INDUSTRY.md`.
302
288
 
303
289
  ```text
304
290
  /revela domains-add github:your-org/your-domain
@@ -308,21 +294,32 @@ A custom domain is a folder containing `INDUSTRY.md` with frontmatter metadata s
308
294
 
309
295
  ---
310
296
 
311
- ## PDF Export
297
+ ## Export
312
298
 
313
- Export a generated HTML deck to PDF:
299
+ PDF export:
314
300
 
315
301
  ```text
316
302
  /revela pdf decks/my-deck.html
317
303
  ```
318
304
 
319
- Revela renders each slide through Chrome/Chromium and assembles the final PDF in the same directory.
305
+ Editable PPTX export:
306
+
307
+ ```text
308
+ /revela pptx decks/my-deck.html
309
+ ```
310
+
311
+ Both commands write output beside the source HTML deck.
320
312
 
321
313
  ---
322
314
 
323
- ## Logging
315
+ ## Development
316
+
317
+ ```bash
318
+ bun test
319
+ bun run typecheck
320
+ ```
324
321
 
325
- Revela uses structured logging via [tslog](https://tslog.js.org/). To enable verbose debug output:
322
+ Enable verbose logs with:
326
323
 
327
324
  ```bash
328
325
  REVELA_DEBUG=1 opencode
@@ -332,4 +329,4 @@ REVELA_DEBUG=1 opencode
332
329
 
333
330
  ## License
334
331
 
335
- MIT see [LICENSE](LICENSE).
332
+ MIT - see [LICENSE](LICENSE)