@cyber-dash-tech/revela 0.17.0 → 0.17.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.
- package/README.md +45 -567
- package/README.zh-CN.md +47 -535
- package/designs/monet/DESIGN.md +1 -1
- package/designs/starter/DESIGN.md +1 -1
- package/designs/summit/DESIGN.md +1 -1
- package/lib/commands/help.ts +4 -4
- package/lib/commands/init.ts +9 -7
- package/lib/commands/narrative.ts +13 -4
- package/lib/commands/pdf.ts +24 -15
- package/lib/commands/pptx.ts +2 -16
- package/lib/commands/research.ts +2 -0
- package/lib/commands/review.ts +81 -93
- package/lib/deck-html/contract.ts +26 -10
- package/lib/decks-state.ts +75 -86
- package/lib/edit/deck-state.ts +3 -111
- package/lib/edit/open.ts +2 -2
- package/lib/edit/resolve-deck.ts +14 -24
- package/lib/inspect/open.ts +2 -2
- package/lib/media/download.ts +23 -3
- package/lib/media/save.ts +1 -0
- package/lib/media/types.ts +1 -0
- package/lib/narrative-state/deck-plan-artifact.ts +584 -0
- package/lib/narrative-state/display.ts +74 -4
- package/lib/narrative-state/map-html.ts +242 -107
- package/lib/narrative-state/render-plan.ts +649 -44
- package/lib/narrative-state/research-gaps.ts +5 -2
- package/lib/narrative-vault/compile.ts +16 -1
- package/lib/narrative-vault/types.ts +4 -2
- package/lib/qa/checks.ts +206 -5
- package/lib/qa/measure.ts +63 -1
- package/lib/refine/open.ts +2 -2
- package/lib/refine/server.ts +157 -20
- package/package.json +1 -1
- package/plugin.ts +2 -2
- package/skill/NARRATIVE_SKILL.md +19 -19
- package/skill/SKILL.md +99 -35
- package/tools/decks.ts +83 -51
- package/tools/narrative-view.ts +16 -0
package/README.md
CHANGED
|
@@ -2,51 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
**English** | [中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@cyber-dash-tech/revela) [](LICENSE) [](tests/) [](https://opencode.ai) [](https://bun.sh)
|
|
6
|
-
|
|
7
5
|
<p align="center">
|
|
8
|
-
<img src="assets/img/logo.png" alt="Revela" width="
|
|
6
|
+
<img src="assets/img/logo.png" alt="Revela" width="560" />
|
|
9
7
|
</p>
|
|
10
8
|
|
|
11
|
-
Revela is an [OpenCode](https://opencode.ai) plugin for
|
|
12
|
-
Its first render target is still the HTML slide deck: start a Revela workflow command, assign a presentation task, and the agent can research, structure, write, QA, inspect, refine, and export a deck.
|
|
13
|
-
|
|
14
|
-
**[Live Demo — The AI Power Shift](https://cyber-dash-tech.github.io/revela/assets/html/ai-power-shift.html)**
|
|
15
|
-
|
|
16
|
-
---
|
|
17
|
-
|
|
18
|
-
## What It Does
|
|
19
|
-
|
|
20
|
-
- injects one-shot workflow instructions for explicit commands such as `/revela init`, `/revela story`, and `/revela make --deck`
|
|
21
|
-
- switches into deck-render prompt mode only when you explicitly start `/revela make --deck`
|
|
22
|
-
- supports workspace document discovery, transparent text extraction for `.pdf`, `.docx`, `.pptx`, and `.xlsx`, and cached embedded-material extraction for those formats
|
|
23
|
-
- uses `revela-narrative/` as the editable Markdown narrative vault when present, with `DECKS.json` as the compatibility/render-state mirror
|
|
24
|
-
- reviews narrative readiness before artifact rendering, then separately gates deck HTML writes through deck/artifact readiness
|
|
25
|
-
- records review snapshots so stale readiness cannot silently authorize new deck HTML after important state changes
|
|
26
|
-
- treats HTML decks, PDF, and PPTX as render targets from shared workspace state rather than isolated output files
|
|
27
|
-
- runs fast design compliance checks whenever the agent writes, patches, or edits `decks/*.html`
|
|
28
|
-
- opens a visual comment editor for existing decks so users can Ctrl/Cmd-click elements and send precise edit requests back to OpenCode
|
|
29
|
-
- exports finished decks to PDF and editable PPTX
|
|
30
|
-
- switches designs and domains locally with zero LLM cost
|
|
31
|
-
|
|
32
|
-
Revela is a mode, not a separate agent.
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## Requirements
|
|
37
|
-
|
|
38
|
-
- [OpenCode](https://opencode.ai)
|
|
39
|
-
- Bun runtime `>= 1.0.0`
|
|
40
|
-
- [Google Chrome](https://www.google.com/chrome/) or Chromium for QA, PDF export, and PPTX export
|
|
41
|
-
- Git if you install from source
|
|
42
|
-
|
|
43
|
-
---
|
|
9
|
+
Revela is an [OpenCode](https://opencode.ai) plugin for turning workspace sources, research, evidence, and user intent into trusted narrative artifacts. Its first render target is HTML slide decks.
|
|
44
10
|
|
|
45
11
|
## Install
|
|
46
12
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Add `@cyber-dash-tech/revela` to the `plugin` array in `opencode.json`:
|
|
13
|
+
Add Revela to your `opencode.json`:
|
|
50
14
|
|
|
51
15
|
```json
|
|
52
16
|
{
|
|
@@ -59,584 +23,98 @@ Restart OpenCode.
|
|
|
59
23
|
|
|
60
24
|
To install globally, add the same entry to `~/.config/opencode/opencode.json`.
|
|
61
25
|
|
|
62
|
-
|
|
63
|
-
the `plugin` field should be the default path.
|
|
64
|
-
|
|
65
|
-
### Local wrapper install
|
|
26
|
+
## Built-In Designs
|
|
66
27
|
|
|
67
|
-
|
|
68
|
-
local checkout during development.
|
|
28
|
+
Revela includes built-in deck designs:
|
|
69
29
|
|
|
70
|
-
|
|
71
|
-
git clone https://github.com/cyber-dash-tech/revela
|
|
72
|
-
cd revela
|
|
73
|
-
npm install
|
|
74
|
-
```
|
|
30
|
+
### [summit](designs/summit/preview.html)
|
|
75
31
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
If you use the local wrapper route, remove any `@cyber-dash-tech/revela` entry from `opencode.json`, otherwise OpenCode may still try Bun installation.
|
|
83
|
-
|
|
84
|
-
---
|
|
32
|
+
<p align="center">
|
|
33
|
+
<img src="assets/img/summit-01.png" alt="Summit design preview 1" width="32%" />
|
|
34
|
+
<img src="assets/img/summit-02.png" alt="Summit design preview 2" width="32%" />
|
|
35
|
+
<img src="assets/img/summit-03.png" alt="Summit design preview 3" width="32%" />
|
|
36
|
+
</p>
|
|
85
37
|
|
|
86
|
-
|
|
38
|
+
### [monet](designs/monet/preview.html)
|
|
87
39
|
|
|
88
|
-
|
|
40
|
+
<p align="center">
|
|
41
|
+
<img src="assets/img/monet-01.png" alt="Monet design preview 1" width="32%" />
|
|
42
|
+
<img src="assets/img/monet-02.png" alt="Monet design preview 2" width="32%" />
|
|
43
|
+
<img src="assets/img/monet-03.png" alt="Monet design preview 3" width="32%" />
|
|
44
|
+
</p>
|
|
89
45
|
|
|
90
|
-
|
|
91
|
-
/revela init
|
|
92
|
-
```
|
|
46
|
+
`starter` is the clean default presentation style.
|
|
93
47
|
|
|
94
|
-
|
|
48
|
+
Switch designs with:
|
|
95
49
|
|
|
96
50
|
```text
|
|
97
|
-
/revela design
|
|
98
51
|
/revela design --use summit
|
|
99
|
-
/revela domain --use deeptech-investment
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Then shape, research, or review the story. When the narrative is ready and approved, make the deck:
|
|
103
|
-
|
|
104
|
-
```text
|
|
105
|
-
/revela story
|
|
106
|
-
/revela research
|
|
107
|
-
/revela make --deck
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Export when needed, either manually or by asking the agent to export:
|
|
111
|
-
|
|
112
|
-
```text
|
|
113
|
-
/revela export --deck pdf decks/humanoid-robotics.html
|
|
114
|
-
/revela export --deck pptx decks/humanoid-robotics.html
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Commands
|
|
120
|
-
|
|
121
|
-
```text
|
|
122
|
-
/revela show REVELA help
|
|
123
|
-
|
|
124
|
-
/revela init initialize or refresh narrative workspace state
|
|
125
|
-
/revela research research, bind evidence, and reduce story gaps/caveats
|
|
126
|
-
/revela story open the read-only story workspace UI
|
|
127
|
-
/revela make --deck make a deck from approved story state
|
|
128
|
-
/revela make --brief [file.md] render executive brief from approved story
|
|
129
|
-
/revela review --deck open unified deck reading, insight, and comment workspace
|
|
130
|
-
/revela export --deck pdf [file] export an HTML deck to PDF in the same directory
|
|
131
|
-
/revela export --deck pptx [file] [--notes] export an HTML deck to editable PPTX
|
|
132
|
-
|
|
133
|
-
/revela design list installed designs
|
|
134
|
-
/revela design --use <name> activate a design
|
|
135
|
-
/revela design --new <name> create a custom design with AI
|
|
136
|
-
/revela design --edit <name> refine an existing custom design with AI
|
|
137
|
-
/revela design --preview [name] open a design preview in the browser
|
|
138
|
-
/revela design --add <source> install a design from URL, local path, or github:user/repo
|
|
139
|
-
/revela design --rm <name> remove an installed design
|
|
140
|
-
|
|
141
|
-
/revela domain list installed domains
|
|
142
|
-
/revela domain --use <name> activate a domain
|
|
143
|
-
/revela domain --add <source> install a domain from URL, local path, or github:user/repo
|
|
144
|
-
/revela domain --rm <name> remove an installed domain
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
Most `/revela` commands run locally with zero LLM cost. `/revela init`, `/revela research`, `/revela story`, `/revela make --deck`, `/revela design --new`, `/revela design --edit`, and `/revela export --deck pptx --notes` start AI-assisted workflows because they need to read or update project files. These workflow commands keep the visible chat message short and inject their detailed instructions through a one-shot system-prompt command intent. `/revela review --deck` is the unified post-artifact workspace. It opens a local browser workspace with Comment and Insight tabs that share the same Cmd/Ctrl-click element references. Comment sends targeted comments back into the current OpenCode session; Insight sends grounded selection context to the current OpenCode session and renders localized Narrative Reading, Exploratory Reading, Source, and Purpose cards, has no chat box, and does not edit the deck. Deterministic preprocessing is kept as fallback context rather than the normal first UI. If a generated result omits newer reading cards, Review keeps the deterministic Narrative Reading and Exploratory Reading cards instead of dropping context. Narrative Reading also shows artifact coverage for the selected canonical claim, including whether each recorded artifact contains the claim and whether coverage is current, stale, partial, or missing. Exploratory Reading is explicitly non-official and bounded to recorded claims, evidence, caveats, objections, risks, and artifact coverage. `/revela edit` and `/revela inspect` are no longer public commands; use `/revela review --deck` instead. `/revela refine --deck` remains a compatibility alias.
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## How It Works
|
|
152
|
-
|
|
153
|
-
Explicit Revela workflow commands append one-shot command instructions to the current agent's system prompt and choose the needed prompt mode automatically.
|
|
154
|
-
|
|
155
|
-
The default prompt is narrative-first: it follows `Init -> Research -> Story -> Make -> Review -> Export` and focuses on audience belief shift, decision/action, thesis, claims, evidence boundaries, objections, risks, research gaps, and approval. Active design CSS, layout catalogs, component indexes, chart rules, and deck HTML skeletons are intentionally omitted until `/revela make --deck` switches the session into deck-render mode or `/revela design` starts explicit design work.
|
|
156
|
-
|
|
157
|
-
Deck-render mode is built from 2 layers:
|
|
158
|
-
|
|
159
|
-
1. `skill/SKILL.md` - the core deck-render workflow
|
|
160
|
-
2. active design - visual system, layouts, components, and chart rules
|
|
161
|
-
|
|
162
|
-
Active domain guidance is narrative-only. It helps `init`, `research`, and `story`
|
|
163
|
-
shape the canonical narrative; `make --deck` renders that approved narrative
|
|
164
|
-
without injecting the full domain prompt again.
|
|
165
|
-
|
|
166
|
-
Persistent preferences live in `~/.config/revela/config.json`.
|
|
167
|
-
The ambient enabled or disabled state is session-level only.
|
|
168
|
-
|
|
169
|
-
### Workspace State
|
|
170
|
-
|
|
171
|
-
`revela-narrative/` is Revela's editable Markdown narrative vault when present. It stores the human/LLM-editable source for audience, decision, thesis, claims, evidence nodes, objections, risks, research gaps, and typed narrative relations.
|
|
172
|
-
|
|
173
|
-
`DECKS.json` remains Revela's compatibility and render-state file. It is still stored at the workspace root and remains readable as the current deck project state, but when a vault exists its top-level `narrative` is a compiled mirror from Markdown rather than the primary editing surface.
|
|
174
|
-
|
|
175
|
-
The state records:
|
|
176
|
-
|
|
177
|
-
- workspace source materials and reusable extraction cache paths
|
|
178
|
-
- research plans, saved findings, and compact action provenance
|
|
179
|
-
- compiled canonical narrative mirror, approvals, objections, risks, slide specs, claim candidates, and evidence trace
|
|
180
|
-
- render targets such as the active HTML deck plus derived PDF and PPTX artifacts
|
|
181
|
-
- review snapshots with input hashes so old readiness results become stale after meaningful state changes
|
|
182
|
-
|
|
183
|
-
New workspaces bootstrap `revela-narrative/` directly with `initNarrativeVault`; stable findings can be recorded as partial Markdown nodes without waiting for a complete story. `/revela init` is repeatable ingest: first runs consider all supported source files, later runs prioritize files added or modified after the latest vault Markdown timestamp plus same-path files whose fingerprint changed, then distill stable findings into vault nodes. Developer workspaces that still have a JSON narrative but no Markdown vault receive a migration hint from `revela-decks read` with `summary: true`; `exportNarrativeVault` can export that narrative into `revela-narrative/` without moving approvals, render targets, review snapshots, artifact coverage, actions, deck specs, or source material records into Markdown. Generated cache files live under `.opencode/revela/narrative-cache/` and should not be edited by hand. `writeReadiness.status: "ready"` is deck/artifact readiness only; it is never narrative approval.
|
|
184
|
-
|
|
185
|
-
Decks remain the primary authored artifact, but they are now treated as render targets from the same workspace state that can later support briefs, appendix material, Evidence Inspector views, Q&A, and interactive reading layers without duplicating source/evidence logic.
|
|
186
|
-
|
|
187
|
-
---
|
|
188
|
-
|
|
189
|
-
## Recommended Workflow
|
|
190
|
-
|
|
191
|
-
Use Revela as a narrative-first artifact workflow:
|
|
192
|
-
|
|
193
|
-
1. Run `/revela init` when starting in a new project or when the workspace has changed significantly.
|
|
194
|
-
2. Use `/revela research` when story gaps or unsupported central claims need external evidence; it should loop through research, evidence binding, claim/relation narrowing, and re-review until public research stops improving the state.
|
|
195
|
-
3. Use `/revela story` to open the story workspace UI and inspect claim flow, evidence, caveats, research gaps, approval state, and artifact coverage.
|
|
196
|
-
4. Approve the narrative or request revisions. If you intentionally render before full strategic approval, record an explicit render override.
|
|
197
|
-
5. Run `/revela make --deck` to compile the approved narrative into deck slide specs and enter deck-render mode, or `/revela make --brief` to render an executive brief.
|
|
198
|
-
6. Choose or confirm design only during deck handoff; `/revela make --deck` runs the deck/artifact gate after plan confirmation.
|
|
199
|
-
7. Let the agent write the HTML deck under `decks/` only after the artifact gate is ready.
|
|
200
|
-
8. Use `/revela review --deck` for visual comments, targeted revisions, read-only Narrative Reading, bounded Exploratory Reading, Source, and Purpose insight, and claim-to-artifact coverage for selected deck elements.
|
|
201
|
-
9. Use `/revela review --deck` for post-artifact changes; `/revela edit` and `/revela inspect` are no longer public commands.
|
|
202
|
-
10. Export with `/revela export --deck pdf <file>` or `/revela export --deck pptx <file>`.
|
|
203
|
-
|
|
204
|
-
`/revela story` opens the read-only story workspace UI for unclear audience, missing belief shift, missing decision/action, weak thesis, unsupported central claims, weak evidence, unsupported scope, unhandled objections, missing risk/assumption handling, stale approval, or missing approval. It does not review design/layout readiness or write the final deck.
|
|
205
|
-
|
|
206
|
-
If Revela blocks a deck write, ask the agent to continue `/revela make --deck`, resolve the reported artifact gaps, and try again. This protects the deck file from being overwritten before the slide specs, evidence projection, design/layout readiness, review snapshot, and deck HTML contract are ready.
|
|
207
|
-
|
|
208
|
-
---
|
|
209
|
-
|
|
210
|
-
## Research And File Ingestion
|
|
211
|
-
|
|
212
|
-
During Revela workflows, the agent can use:
|
|
213
|
-
|
|
214
|
-
- `revela-workspace-scan` to discover PDFs, Office files, CSVs, Markdown, and text files in the workspace
|
|
215
|
-
- the `revela-research` subagent for targeted web research
|
|
216
|
-
- `revela-research-save` to write structured findings into `researches/<topic>/`
|
|
217
|
-
- `revela-research-images-list` to extract structured image candidates from `researches/<topic>/*.md`
|
|
218
|
-
- `revela-media-batch-save` to batch-save selected research image leads into workspace assets
|
|
219
|
-
- `revela-media-save` to turn chosen local or remote images into reusable workspace assets under `assets/<topic>/media/`
|
|
220
|
-
|
|
221
|
-
Supported document extraction paths:
|
|
222
|
-
|
|
223
|
-
- `@` reference or pasted file in chat
|
|
224
|
-
- `read` tool access during Revela workflows or ambient mode
|
|
225
|
-
|
|
226
|
-
Supported extracted file types:
|
|
227
|
-
|
|
228
|
-
- `.pdf`
|
|
229
|
-
- `.docx`
|
|
230
|
-
- `.pptx`
|
|
231
|
-
- `.xlsx`
|
|
232
|
-
|
|
233
|
-
This extraction is transparent to the main agent.
|
|
234
|
-
|
|
235
|
-
---
|
|
236
|
-
|
|
237
|
-
## Media Assets
|
|
238
|
-
|
|
239
|
-
Research findings can record image leads in `## Images`, but those URLs are still just leads.
|
|
240
|
-
Final slides should reference local workspace assets instead of remote image URLs.
|
|
241
|
-
|
|
242
|
-
Use `revela-media-save` when the agent wants to promote one chosen image into a formal project asset.
|
|
243
|
-
|
|
244
|
-
Current Stage 2 additions:
|
|
245
|
-
|
|
246
|
-
- `revela-research-images-list` parses `## Images` sections into structured candidates
|
|
247
|
-
- the primary agent can review those candidates and select a subset to use
|
|
248
|
-
- `revela-media-batch-save` batch-saves the selected subset into `assets/<topic>/media/`
|
|
249
|
-
- this stage is still text-driven; it does not inspect image pixels or do visual recognition
|
|
250
|
-
|
|
251
|
-
Current Stage 1 behavior:
|
|
252
|
-
|
|
253
|
-
- accepts either `sourcePath` for a workspace-local image or `sourceUrl` for a remote image
|
|
254
|
-
- saves successful results into `assets/<topic>/media/`
|
|
255
|
-
- updates `assets/<topic>/media-manifest.json`
|
|
256
|
-
- records failed attempts with explicit statuses such as `invalid-url` and `cannot-download`
|
|
257
|
-
- lets the agent reference the returned local path directly in final HTML
|
|
258
|
-
|
|
259
|
-
Typical flow:
|
|
260
|
-
|
|
261
|
-
1. `revela-research` writes image leads into `researches/<topic>/*.md`
|
|
262
|
-
2. the primary agent calls `revela-research-images-list` and selects the images worth using
|
|
263
|
-
3. `revela-media-batch-save` or `revela-media-save` downloads or copies them into `assets/<topic>/media/`
|
|
264
|
-
4. the deck uses the returned local paths in `<img src="...">`
|
|
265
|
-
|
|
266
|
-
This keeps final decks stable, offline-friendly, and independent from expiring remote URLs.
|
|
267
|
-
|
|
268
|
-
---
|
|
269
|
-
|
|
270
|
-
## Layout QA And Compliance
|
|
271
|
-
|
|
272
|
-
Every time the agent writes, patches, or edits `decks/*.html`, Revela runs a fast static design compliance check.
|
|
273
|
-
The manual `revela-qa` tool and PDF/PPTX export preflight also run a Puppeteer-based overflow check at `1920x1080`.
|
|
274
|
-
|
|
275
|
-
Current QA checks:
|
|
276
|
-
|
|
277
|
-
| Dimension | What it checks |
|
|
278
|
-
|---|---|
|
|
279
|
-
| `overflow` | Elements extending outside the slide canvas |
|
|
280
|
-
| `compliance` | Unknown design classes and novel CSS rules outside the active design vocabulary |
|
|
281
|
-
|
|
282
|
-
Each slide must declare `slide-qa="true"` or `slide-qa="false"`.
|
|
283
|
-
The current QA path keeps this as deck metadata; it does not enable additional subjective balance or spacing checks.
|
|
284
|
-
|
|
285
|
-
You can also run QA manually with the `revela-qa` tool.
|
|
286
|
-
|
|
287
|
-
---
|
|
288
|
-
|
|
289
|
-
## Designs And Domains
|
|
290
|
-
|
|
291
|
-
Use `/revela design` and `/revela domain` to inspect what is installed in your environment. Older `/revela designs*` commands now show migration help.
|
|
292
|
-
|
|
293
|
-
Bundled domains in this repository:
|
|
294
|
-
|
|
295
|
-
| Name | Description |
|
|
296
|
-
|---|---|
|
|
297
|
-
| `general` | No domain specialization |
|
|
298
|
-
| `deeptech-investment` | VC and investment analysis: market sizing, technical readiness, moat, and investment thesis |
|
|
299
|
-
| `consulting` | Strategic consulting: go/no-go decisions, strategy design, and belief-change reporting |
|
|
300
|
-
|
|
301
|
-
Repository design examples:
|
|
302
|
-
|
|
303
|
-
| Name | Description | Preview |
|
|
304
|
-
|---|---|---|
|
|
305
|
-
| `summit` | Editorial annual-report style for image-rich narrative slides and restrained business storytelling |  |
|
|
306
|
-
| `monet` | Light, serif-led visual system for quieter, art-directed business storytelling | `DESIGN.md` included in repo |
|
|
307
|
-
|
|
308
|
-
---
|
|
309
|
-
|
|
310
|
-
## Custom Designs
|
|
311
|
-
|
|
312
|
-
A custom design is a folder containing `DESIGN.md`. The folder name becomes the install target name
|
|
313
|
-
unless the installer infers another name from the source.
|
|
314
|
-
|
|
315
|
-
You can ask Revela to create a new local design interactively:
|
|
316
|
-
|
|
317
|
-
```text
|
|
318
|
-
/revela design --new my-design
|
|
319
52
|
```
|
|
320
53
|
|
|
321
|
-
|
|
54
|
+
## Domains
|
|
322
55
|
|
|
323
|
-
|
|
56
|
+
Domains add topic-specific narrative guidance, such as consulting, product, or investor communication. Use them when you want Revela to adapt story framing to a specific context.
|
|
324
57
|
|
|
325
58
|
```text
|
|
326
|
-
/revela
|
|
59
|
+
/revela domain
|
|
327
60
|
```
|
|
328
61
|
|
|
329
|
-
|
|
62
|
+
## Quick Start: Make An HTML Deck
|
|
330
63
|
|
|
331
|
-
|
|
64
|
+
1. Initialize the narrative workspace from your local source materials.
|
|
332
65
|
|
|
333
66
|
```text
|
|
334
|
-
/revela
|
|
67
|
+
/revela init
|
|
335
68
|
```
|
|
336
69
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
Recommended structure:
|
|
70
|
+
2. Research missing evidence and bind useful findings to claims.
|
|
340
71
|
|
|
341
72
|
```text
|
|
342
|
-
|
|
343
|
-
├── DESIGN.md
|
|
344
|
-
└── preview.html required for AI-authored designs
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
`DESIGN.md` starts with frontmatter metadata:
|
|
348
|
-
|
|
349
|
-
```yaml
|
|
350
|
-
---
|
|
351
|
-
name: my-design
|
|
352
|
-
description: Short description shown in /revela design
|
|
353
|
-
author: you
|
|
354
|
-
version: 1.0.0
|
|
355
|
-
---
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
### Minimal working example
|
|
359
|
-
|
|
360
|
-
This is the smallest useful `DESIGN.md` shape. It gives the model a clear visual system, one layout,
|
|
361
|
-
and one reusable component.
|
|
362
|
-
|
|
363
|
-
```md
|
|
364
|
-
---
|
|
365
|
-
name: alpine-brief
|
|
366
|
-
description: Minimal editorial design for strategy decks
|
|
367
|
-
author: you
|
|
368
|
-
version: 1.0.0
|
|
369
|
-
---
|
|
370
|
-
|
|
371
|
-
## Visual Style
|
|
372
|
-
|
|
373
|
-
Apply this visual style to every slide in the deck.
|
|
374
|
-
|
|
375
|
-
<!-- @design:foundation:start -->
|
|
376
|
-
### Color Palette
|
|
377
|
-
|
|
378
|
-
```css
|
|
379
|
-
:root {
|
|
380
|
-
--bg: #f6f2ea;
|
|
381
|
-
--surface: #fffdf8;
|
|
382
|
-
--text-primary: #1c1a17;
|
|
383
|
-
--text-secondary: #625b52;
|
|
384
|
-
--accent: #8a6a45;
|
|
385
|
-
--line: rgba(28, 26, 23, 0.14);
|
|
386
|
-
--font-display: 'IBM Plex Sans Condensed', 'Inter', sans-serif;
|
|
387
|
-
--font-body: 'Inter', sans-serif;
|
|
388
|
-
}
|
|
389
|
-
```
|
|
390
|
-
|
|
391
|
-
### Typography
|
|
392
|
-
|
|
393
|
-
- Headings use `--font-display`
|
|
394
|
-
- Body copy uses `--font-body`
|
|
395
|
-
- Keep all sizing in fixed `px` for a `1920x1080` canvas
|
|
396
|
-
|
|
397
|
-
### HTML Structure
|
|
398
|
-
|
|
399
|
-
- Every slide must use `<section class="slide" slide-qa="true|false">`
|
|
400
|
-
- Every slide must contain one `.slide-canvas`
|
|
401
|
-
- Keep all CSS in one `<style>` block and all JS in one `<script>` block
|
|
402
|
-
<!-- @design:foundation:end -->
|
|
403
|
-
|
|
404
|
-
<!-- @design:rules:start -->
|
|
405
|
-
### Composition Rules
|
|
406
|
-
|
|
407
|
-
- Use warm off-white backgrounds and restrained brown accents
|
|
408
|
-
- Prefer narrow text columns and generous whitespace
|
|
409
|
-
- Avoid glow, glassmorphism, neon gradients, and dashboard styling
|
|
410
|
-
<!-- @design:rules:end -->
|
|
411
|
-
|
|
412
|
-
<!-- @design:layouts:start -->
|
|
413
|
-
<!-- @layout:cover:start qa=false -->
|
|
414
|
-
### Cover layout
|
|
415
|
-
|
|
416
|
-
- Centered title stack
|
|
417
|
-
- Small eyebrow at top
|
|
418
|
-
- One thin accent divider under the title
|
|
419
|
-
<!-- @layout:cover:end -->
|
|
420
|
-
|
|
421
|
-
<!-- @layout:two-col:start qa=true -->
|
|
422
|
-
### Two-column layout
|
|
423
|
-
|
|
424
|
-
- Left column for argument, right column for evidence
|
|
425
|
-
- Recommended split: `5 / 7`
|
|
426
|
-
- Keep the left column under `520px` for readable paragraphs
|
|
427
|
-
<!-- @layout:two-col:end -->
|
|
428
|
-
<!-- @design:layouts:end -->
|
|
429
|
-
|
|
430
|
-
<!-- @design:components:start -->
|
|
431
|
-
<!-- @component:stat-card:start -->
|
|
432
|
-
### Stat card (`.stat-card`)
|
|
433
|
-
|
|
434
|
-
```html
|
|
435
|
-
<div class="stat-card">
|
|
436
|
-
<div class="stat-label">Revenue CAGR</div>
|
|
437
|
-
<div class="stat-value">27%</div>
|
|
438
|
-
<div class="stat-note">2024-2028E</div>
|
|
439
|
-
</div>
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
```css
|
|
443
|
-
.stat-card {
|
|
444
|
-
border-top: 1px solid var(--line);
|
|
445
|
-
padding-top: 18px;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
.stat-label {
|
|
449
|
-
font-size: 12px;
|
|
450
|
-
letter-spacing: 0.12em;
|
|
451
|
-
text-transform: uppercase;
|
|
452
|
-
color: var(--text-secondary);
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
.stat-value {
|
|
456
|
-
margin-top: 10px;
|
|
457
|
-
font-family: var(--font-display);
|
|
458
|
-
font-size: 72px;
|
|
459
|
-
line-height: 0.95;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
.stat-note {
|
|
463
|
-
margin-top: 8px;
|
|
464
|
-
font-size: 16px;
|
|
465
|
-
color: var(--text-secondary);
|
|
466
|
-
}
|
|
467
|
-
```
|
|
468
|
-
<!-- @component:stat-card:end -->
|
|
469
|
-
<!-- @design:components:end -->
|
|
470
|
-
```
|
|
471
|
-
|
|
472
|
-
### Marker system
|
|
473
|
-
|
|
474
|
-
For larger designs, use the marker system so Revela can keep the always-on prompt compact and fetch
|
|
475
|
-
details only when needed:
|
|
476
|
-
|
|
477
|
-
```html
|
|
478
|
-
<!-- @design:foundation:start -->
|
|
479
|
-
Foundation rules
|
|
480
|
-
<!-- @design:foundation:end -->
|
|
481
|
-
|
|
482
|
-
<!-- @design:rules:start -->
|
|
483
|
-
Design rules
|
|
484
|
-
<!-- @design:rules:end -->
|
|
485
|
-
|
|
486
|
-
<!-- @design:layouts:start -->
|
|
487
|
-
<!-- @layout:cover:start qa=false -->
|
|
488
|
-
Layout details
|
|
489
|
-
<!-- @layout:cover:end -->
|
|
490
|
-
<!-- @design:layouts:end -->
|
|
491
|
-
|
|
492
|
-
<!-- @design:components:start -->
|
|
493
|
-
<!-- @component:card:start -->
|
|
494
|
-
Component details
|
|
495
|
-
<!-- @component:card:end -->
|
|
496
|
-
<!-- @design:components:end -->
|
|
497
|
-
|
|
498
|
-
<!-- @design:chart-rules:start -->
|
|
499
|
-
Chart rules
|
|
500
|
-
<!-- @design:chart-rules:end -->
|
|
73
|
+
/revela research
|
|
501
74
|
```
|
|
502
75
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
- `@design:foundation`: core tokens, HTML skeleton, CSS foundations, typography, spacing, page framing
|
|
506
|
-
- `@design:rules`: composition rules, dos and don'ts, art direction constraints, interaction rules
|
|
507
|
-
- `@design:layouts`: named layout recipes such as `cover`, `toc`, `two-col`, `data-vis`
|
|
508
|
-
- `@design:components`: reusable building blocks such as `card`, `stat-card`, `quote-block`
|
|
509
|
-
- `@design:chart-rules`: chart-specific rules that are only needed when a slide actually uses charts
|
|
510
|
-
|
|
511
|
-
Layout marker rules:
|
|
512
|
-
|
|
513
|
-
- Use stable, simple names such as `cover`, `two-col`, `stats`, `timeline`
|
|
514
|
-
- Add `qa=true` for dense content layouts and `qa=false` for intentionally sparse structural layouts
|
|
515
|
-
- Write each layout section as a recipe: purpose, recommended structure, preferred ratios, and known constraints
|
|
516
|
-
|
|
517
|
-
Component marker rules:
|
|
518
|
-
|
|
519
|
-
- Include at least one concrete HTML example
|
|
520
|
-
- Include the CSS class names the component depends on
|
|
521
|
-
- Prefer a small vocabulary of reusable class names over many one-off classes
|
|
522
|
-
|
|
523
|
-
Prompt injection behavior:
|
|
524
|
-
|
|
525
|
-
- always injected: `@design:foundation`, `@design:rules`, layout index, component index
|
|
526
|
-
- fetched on demand: individual `@layout:*`, individual `@component:*`, `@design:chart-rules`
|
|
527
|
-
|
|
528
|
-
If a design has no markers, Revela falls back to injecting the full `DESIGN.md` body.
|
|
529
|
-
|
|
530
|
-
### Practical guidance
|
|
76
|
+
Skip this step if your local materials already provide enough support.
|
|
531
77
|
|
|
532
|
-
|
|
533
|
-
- Keep layout names semantically meaningful; they become the vocabulary the model sees in the layout index
|
|
534
|
-
- If your design defines a custom CSS class, document that class inside `DESIGN.md`; QA checks can flag classes not present in the design vocabulary
|
|
535
|
-
- For AI-authored designs, `preview.html` must include `<section class="slide" data-slide-role="cover">` and `<section class="slide" data-slide-role="closing">`
|
|
536
|
-
- For AI-authored designs, `preview.html` must visibly showcase every `@component:*` and mark each sample with `data-preview-component="<component-name>"`; otherwise `revela-designs-author create/validate` will fail
|
|
537
|
-
- When the design supports chart styling, include a 3x3 ECharts gallery with at least 9 chart examples in `preview.html`; this is a quality requirement for the agent workflow, not a hard validation blocker
|
|
538
|
-
|
|
539
|
-
Install a custom design:
|
|
78
|
+
3. Inspect the claim flow before rendering.
|
|
540
79
|
|
|
541
80
|
```text
|
|
542
|
-
/revela
|
|
543
|
-
/revela design --add https://example.com/my-design.zip
|
|
544
|
-
/revela design --add ./path/to/local/design-folder
|
|
81
|
+
/revela story
|
|
545
82
|
```
|
|
546
83
|
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
## Custom Domains
|
|
84
|
+
Use this to check the audience, decision, claims, evidence, gaps, risks, and objections.
|
|
550
85
|
|
|
551
|
-
|
|
86
|
+
4. Generate the HTML deck.
|
|
552
87
|
|
|
553
88
|
```text
|
|
554
|
-
/revela
|
|
89
|
+
/revela make --deck
|
|
555
90
|
```
|
|
556
91
|
|
|
557
|
-
`
|
|
558
|
-
|
|
559
|
-
---
|
|
560
|
-
|
|
561
|
-
## Visual Editing
|
|
92
|
+
Revela writes the deck under `decks/` and uses the current narrative, deck plan, and active design.
|
|
562
93
|
|
|
563
|
-
|
|
94
|
+
5. Review or revise the deck.
|
|
564
95
|
|
|
565
96
|
```text
|
|
566
97
|
/revela review --deck
|
|
567
98
|
```
|
|
568
99
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
Removed command:
|
|
572
|
-
|
|
573
|
-
```text
|
|
574
|
-
/revela edit
|
|
575
|
-
```
|
|
576
|
-
|
|
577
|
-
`/revela edit` has been removed. Use `/revela review --deck` for the unified reading, insight, and comment workspace.
|
|
578
|
-
|
|
579
|
-
Use `Ctrl`/`Cmd` + click to reference deck elements, write a natural-language comment in the Comment tab, then send it back to OpenCode. Revela sends a structured edit prompt that includes the deck file, slide context, selected element metadata, and your comment.
|
|
580
|
-
|
|
581
|
-
LLM tool equivalent: `revela-edit` with no target. The tool remains a compatibility shim and opens Review in Comment mode when you say things like “I want to edit the deck”.
|
|
582
|
-
|
|
583
|
-
For existing decks, `/revela review --deck` prepares whatever minimal project context is needed so targeted edits can still use the normal safety checks.
|
|
584
|
-
|
|
585
|
-
---
|
|
586
|
-
|
|
587
|
-
## Evidence Inspector
|
|
588
|
-
|
|
589
|
-
Use `/revela review --deck` for evidence insight and narrative reading. Removed compatibility command:
|
|
590
|
-
|
|
591
|
-
```text
|
|
592
|
-
/revela inspect
|
|
593
|
-
```
|
|
594
|
-
|
|
595
|
-
`/revela inspect` no longer opens a separate inspector shell. Use `/revela review --deck` and the Insight tab. The Insight tab shows Narrative Reading and Exploratory Reading cards alongside the fixed Source and Purpose cards. Narrative Reading preserves canonical claim ids, evidence binding ids, supported scope, unsupported scope, caveats, objections, risks, and artifact coverage when the selected element maps to canonical narrative state. Coverage shows whether the selected claim appears in recorded deck/brief/export artifacts and whether those artifacts are current, stale, partial, or missing against the current narrative hash. Exploratory Reading provides non-official objection prep, audience reframing boundaries, appendix leads, and meeting-prep cues from the same recorded context only. Use `Ctrl`/`Cmd` + click to reference deck elements, then click `Get Insight`. Selection is locked while the request is being processed.
|
|
596
|
-
|
|
597
|
-
The insight surface is not chat and has no freeform prompt. It does not mutate `DECKS.json` or the deck HTML. It uses recorded slide specs, narrative state, and slide-level evidence trace as grounded context. Insight is LLM-first in the UI: it shows a reading/loading state, then renders structured generated cards. Deterministic preprocessing remains internal fallback context and is shown only if generation fails or times out. The Insight tab includes a fixed display-language selector; language changes affect card copy only and never alter claim ids, evidence ids, source paths, URLs, numbers, quotes, or canonical facts. When an older or partial generated result only returns Source/Purpose, Review preserves the deterministic reading cards so generated insight cannot silently remove claim, evidence-boundary, artifact-coverage, or exploratory context.
|
|
598
|
-
|
|
599
|
-
Review uses the active HTML deck render target recorded in workspace state. The deck HTML must satisfy Revela's slide identity contract: every `<section class="slide">` in the active artifact needs a positive 1-based `data-slide-index` matching the current slide specs. Invalid active artifacts are refused or reported before review/export workflows trust them.
|
|
600
|
-
|
|
601
|
-
---
|
|
100
|
+
See [Review A Deck](#review-a-deck) for Insight and Comment.
|
|
602
101
|
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
PDF export:
|
|
102
|
+
6. Export if needed.
|
|
606
103
|
|
|
607
104
|
```text
|
|
608
|
-
/revela export --deck pdf decks/
|
|
105
|
+
/revela export --deck pdf decks/example.html
|
|
106
|
+
/revela export --deck pptx decks/example.html
|
|
609
107
|
```
|
|
610
108
|
|
|
611
|
-
|
|
109
|
+
## Review A Deck
|
|
612
110
|
|
|
613
|
-
|
|
111
|
+
Use Review after generating an HTML deck:
|
|
614
112
|
|
|
615
113
|
```text
|
|
616
|
-
/revela
|
|
617
|
-
```
|
|
618
|
-
|
|
619
|
-
LLM tool equivalent: `revela-pptx` with `{ "file": "decks/my-deck.html" }`.
|
|
620
|
-
|
|
621
|
-
Both commands and tools write output beside the source HTML deck. Use the tools when you want the agent to run export as part of the deck workflow instead of asking the user to invoke `/revela export --deck pdf` or `/revela export --deck pptx` manually.
|
|
622
|
-
|
|
623
|
-
---
|
|
624
|
-
|
|
625
|
-
## Development
|
|
626
|
-
|
|
627
|
-
```bash
|
|
628
|
-
bun test
|
|
629
|
-
bun run typecheck
|
|
630
|
-
```
|
|
631
|
-
|
|
632
|
-
Enable verbose logs with:
|
|
633
|
-
|
|
634
|
-
```bash
|
|
635
|
-
REVELA_DEBUG=1 opencode
|
|
114
|
+
/revela review --deck
|
|
636
115
|
```
|
|
637
116
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
## License
|
|
117
|
+
Review opens a local deck workspace with two main modes:
|
|
641
118
|
|
|
642
|
-
|
|
119
|
+
- Insight explains selected slide content: what claim it supports, what evidence backs it, what caveats or gaps remain, and why it matters in the narrative.
|
|
120
|
+
- Comment lets you request targeted edits on the deck, such as layout, copy, hierarchy, spacing, or visual changes.
|