@cyber-dash-tech/revela 0.13.0 → 0.15.0

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,14 +2,14 @@
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-324%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-380%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 for building trusted narrative artifacts from workspace sources, research, evidence, and user intent.
12
- Its first render target is still the HTML slide deck: enable Revela for the current session, assign a presentation task, and the agent can research, structure, write, QA, inspect, refine, and export a deck.
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
13
 
14
14
  **[Live Demo — The AI Power Shift](https://cyber-dash-tech.github.io/revela/assets/html/ai-power-shift.html)**
15
15
 
@@ -17,8 +17,8 @@ Its first render target is still the HTML slide deck: enable Revela for the curr
17
17
 
18
18
  ## What It Does
19
19
 
20
- - injects a narrative-first system prompt into your current agent with `/revela enable`
21
- - switches into deck-render prompt mode only when you explicitly start `/revela deck`
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
22
  - supports workspace document discovery, transparent text extraction for `.pdf`, `.docx`, `.pptx`, and `.xlsx`, and cached embedded-material extraction for those formats
23
23
  - keeps `DECKS.json` as the current workspace state engine for sources, research actions, findings, claims, evidence, narrative intent, render targets, and readiness
24
24
  - reviews narrative readiness before artifact rendering, then separately gates deck HTML writes through deck/artifact readiness
@@ -85,12 +85,6 @@ If you use the local wrapper route, remove any `@cyber-dash-tech/revela` entry f
85
85
 
86
86
  ## Quick Start
87
87
 
88
- Enable Revela in the current session:
89
-
90
- ```text
91
- /revela enable
92
- ```
93
-
94
88
  Prepare the workspace when starting a new deck project:
95
89
 
96
90
  ```text
@@ -100,22 +94,23 @@ Prepare the workspace when starting a new deck project:
100
94
  Optionally switch design or domain:
101
95
 
102
96
  ```text
103
- /revela designs
104
- /revela designs summit
97
+ /revela design
98
+ /revela design use summit
105
99
  /revela domains deeptech-investment
106
100
  ```
107
101
 
108
- Then shape or review the narrative. When the narrative is ready and approved, start deck handoff:
102
+ Then shape, research, or review the story. When the narrative is ready and approved, make the deck:
109
103
 
110
104
  ```text
111
- /revela review
112
- /revela deck
105
+ /revela story
106
+ /revela research
107
+ /revela make deck
113
108
  ```
114
109
 
115
110
  If you need to check only the deck/artifact gate before HTML writing, use:
116
111
 
117
112
  ```text
118
- /revela deck --review
113
+ /revela make deck --review
119
114
  ```
120
115
 
121
116
  Export when needed, either manually or by asking the agent to export:
@@ -125,7 +120,13 @@ Export when needed, either manually or by asking the agent to export:
125
120
  /revela pptx decks/humanoid-robotics.html
126
121
  ```
127
122
 
128
- Disable presentation mode when done:
123
+ If you want normal chat messages to stay in Revela narrative mode between explicit commands, enable optional ambient mode:
124
+
125
+ ```text
126
+ /revela enable
127
+ ```
128
+
129
+ Disable ambient mode when done:
129
130
 
130
131
  ```text
131
132
  /revela disable
@@ -137,18 +138,32 @@ Disable presentation mode when done:
137
138
 
138
139
  ```text
139
140
  /revela show status and help
140
- /revela enable enable narrative/artifact mode for this session
141
- /revela disable disable Revela mode
141
+ /revela enable optional ambient narrative mode for normal chat
142
+ /revela disable disable ambient Revela mode
142
143
 
143
144
  /revela init initialize or refresh narrative workspace state
144
- /revela review review narrative readiness and approval state
145
- /revela deck start deck handoff from approved narrative
146
- /revela deck --review review deck/artifact readiness before writing HTML
145
+ /revela research research, bind evidence, and reduce story gaps/caveats
146
+ /revela story open the read-only story workspace UI
147
+ /revela make deck make a deck from approved story state
148
+ /revela make deck --review review deck/artifact readiness before writing HTML
149
+ /revela make brief [file.md] render executive brief from approved story
147
150
  /revela remember <text> save an explicit user/workflow preference
148
- /revela refine open unified Edit/Inspect refinement workspace
149
- /revela edit open visual editor for the only deck in decks/
150
- /revela inspect open Evidence Inspector for Cmd/Ctrl-click review
151
-
151
+ /revela refine open unified reading, inspection, and editing workspace
152
+ /revela edit deprecated shim to /revela refine Edit mode
153
+ /revela inspect deprecated shim to /revela refine Inspect mode
154
+
155
+ /revela review legacy readiness report for story state
156
+ /revela narrative compatibility alias for /revela story
157
+ /revela deck compatibility alias for /revela make deck
158
+ /revela brief [file.md] compatibility alias for /revela make brief
159
+
160
+ /revela design list installed designs
161
+ /revela design use <name> activate a design
162
+ /revela design new <name> create a custom design with AI
163
+ /revela design edit <name> refine an existing custom design with AI
164
+ /revela design preview [name] open a design preview in the browser
165
+ /revela design add <source> install a design from URL, local path, or github:user/repo
166
+ /revela design rm <name> remove an installed design
152
167
  /revela designs list installed designs
153
168
  /revela designs <name> activate a design
154
169
  /revela designs-new <name> create a custom design with AI
@@ -166,15 +181,15 @@ Disable presentation mode when done:
166
181
  /revela pptx <file> export an HTML deck to editable PPTX in the same directory
167
182
  ```
168
183
 
169
- Most `/revela` commands run locally with zero LLM cost. `/revela init`, `/revela review`, `/revela deck`, `/revela remember`, `/revela designs-new`, and `/revela designs-edit` start AI-assisted workflows because they need to read or update project files. `/revela refine` opens a local browser workspace with Edit and Inspect tabs that share the same Cmd/Ctrl-click element references. Edit sends targeted comments back into the current OpenCode session; Inspect renders deterministic Source/Purpose preprocessing first before lazy LLM-generated cards arrive, has no chat box, and does not edit the deck.
184
+ Most `/revela` commands run locally with zero LLM cost. `/revela init`, `/revela research`, `/revela story`, `/revela review`, `/revela make deck`, `/revela remember`, `/revela design new`, and `/revela design edit` 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 refine` is the unified post-artifact workspace. It opens a local browser workspace with Edit and Inspect tabs that share the same Cmd/Ctrl-click element references. Edit sends targeted comments back into the current OpenCode session; Inspect 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, Refine 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` remain only as deprecated compatibility shims to Refine.
170
185
 
171
186
  ---
172
187
 
173
188
  ## How It Works
174
189
 
175
- When Revela is enabled, it appends a generated prompt to the current agent's system prompt.
190
+ Explicit Revela workflow commands append one-shot command instructions to the current agent's system prompt. `/revela enable` is optional ambient mode for keeping normal chat in Revela narrative mode between explicit commands.
176
191
 
177
- The default prompt is narrative-first: it focuses on audience belief shift, decision/action, thesis, claims, evidence boundaries, objections, risks, and approval. Active design CSS, layout catalogs, component indexes, chart rules, and deck HTML skeletons are intentionally omitted until `/revela deck` switches the session into deck-render mode.
192
+ The default prompt is narrative-first: it follows `Init -> Research -> Story -> Make -> Refine` 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.
178
193
 
179
194
  Deck-render mode is built from 3 layers:
180
195
 
@@ -183,7 +198,7 @@ Deck-render mode is built from 3 layers:
183
198
  3. active design - visual system, layouts, components, and chart rules
184
199
 
185
200
  Persistent preferences live in `~/.config/revela/config.json`.
186
- The enabled or disabled state is session-level only.
201
+ The ambient enabled or disabled state is session-level only.
187
202
 
188
203
  ### Workspace State
189
204
 
@@ -207,20 +222,22 @@ Decks remain the primary authored artifact, but they are now treated as render t
207
222
 
208
223
  Use Revela as a narrative-first artifact workflow:
209
224
 
210
- 1. Enable Revela with `/revela enable`.
211
- 2. Run `/revela init` when starting in a new project or when the workspace has changed significantly.
212
- 3. Use `/revela review` to check narrative readiness: audience, belief shift, decision/action, thesis, central claims, evidence, objections, risks, and approval state.
225
+ 1. Run `/revela init` when starting in a new project or when the workspace has changed significantly.
226
+ 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.
227
+ 3. Use `/revela story` to open the story workspace UI and inspect claim flow, evidence, caveats, research gaps, approval state, and artifact coverage.
213
228
  4. Approve the narrative or request revisions. If you intentionally render before full strategic approval, record an explicit render override.
214
- 5. Run `/revela deck` to compile the approved narrative into deck slide specs and enter deck-render mode.
215
- 6. Choose or confirm design only during deck handoff, then run the deck/artifact gate with `/revela deck --review` or the handoff workflow.
229
+ 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.
230
+ 6. Choose or confirm design only during deck handoff, then run the deck/artifact gate with `/revela make deck --review` or the handoff workflow.
216
231
  7. Let the agent write the HTML deck under `decks/` only after the artifact gate is ready.
217
- 8. Use `/revela refine` for visual comments, targeted revisions, and optional Source/Purpose inspection of selected deck elements.
218
- 9. Use `/revela edit` or `/revela inspect` directly only if you need the older single-purpose shells.
232
+ 8. Use `/revela refine` for visual comments, targeted revisions, read-only Narrative Reading, bounded Exploratory Reading, Source, and Purpose inspection, and claim-to-artifact coverage for selected deck elements.
233
+ 9. Use `/revela edit` or `/revela inspect` only for old scripts or habits; both open `/revela refine` in the matching mode.
219
234
  10. Export with `/revela pdf <file>` or `/revela pptx <file>`.
220
235
 
221
- `/revela review` checks narrative readiness: 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 and does not write the final deck.
236
+ Use `/revela enable` only when you want ordinary chat messages, not just explicit `/revela ...` commands, to stay in Revela narrative mode.
237
+
238
+ `/revela story` opens the read-only story workspace UI. `/revela review` produces the legacy readiness report 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. Neither command reviews design/layout readiness or writes the final deck.
222
239
 
223
- If Revela blocks a deck write, ask the agent to run `/revela deck --review`, 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.
240
+ If Revela blocks a deck write, ask the agent to run `/revela make deck --review`, 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.
224
241
 
225
242
  To remember long-term preferences, use:
226
243
 
@@ -234,7 +251,7 @@ Do not use `remember` for temporary checklist state; use it only for durable use
234
251
 
235
252
  ## Research And File Ingestion
236
253
 
237
- When Revela is enabled, the agent can use:
254
+ During Revela workflows, the agent can use:
238
255
 
239
256
  - `revela-workspace-scan` to discover PDFs, Office files, CSVs, Markdown, and text files in the workspace
240
257
  - the `revela-research` subagent for targeted web research
@@ -246,7 +263,7 @@ When Revela is enabled, the agent can use:
246
263
  Supported document extraction paths:
247
264
 
248
265
  - `@` reference or pasted file in chat
249
- - `read` tool access while Revela is enabled
266
+ - `read` tool access during Revela workflows or ambient mode
250
267
 
251
268
  Supported extracted file types:
252
269
 
@@ -313,7 +330,7 @@ You can also run QA manually with the `revela-qa` tool.
313
330
 
314
331
  ## Designs And Domains
315
332
 
316
- Use `/revela designs` and `/revela domains` to inspect what is installed in your environment.
333
+ Use `/revela design` and `/revela domains` to inspect what is installed in your environment. Older `/revela designs*` commands remain compatibility aliases.
317
334
 
318
335
  Bundled domains in this repository:
319
336
 
@@ -341,6 +358,7 @@ You can ask Revela to create a new local design interactively:
341
358
 
342
359
  ```text
343
360
  /revela designs-new my-design
361
+ /revela design new my-design
344
362
  ```
345
363
 
346
364
  The agent will interview you for visual references, summarize a design brief for confirmation, then save `DESIGN.md` and `preview.html` into your local Revela designs directory. For AI-authored designs, `preview.html` is required: it must include cover and closing slides, and it must showcase every `@component:*` before `revela-designs-author` will accept the package. The default structural base is an internal neutral `starter` design, which is hidden from the normal design list. Use `--base summit` or `--base monet` only when you want to derive from those specific styles.
@@ -349,6 +367,7 @@ Refine an existing local design:
349
367
 
350
368
  ```text
351
369
  /revela designs-edit my-design
370
+ /revela design edit my-design
352
371
  ```
353
372
 
354
373
  The agent will ask what to change, inspect the current design, confirm an edit brief, then overwrite the local design package through the controlled authoring tool.
@@ -357,6 +376,7 @@ Open a design preview in your browser:
357
376
 
358
377
  ```text
359
378
  /revela designs-preview my-design
379
+ /revela design preview my-design
360
380
  ```
361
381
 
362
382
  Omit the name to preview the active design. If a design has no `preview.html`, Revela will report that no preview is available.
@@ -374,7 +394,7 @@ my-design/
374
394
  ```yaml
375
395
  ---
376
396
  name: my-design
377
- description: Short description shown in /revela designs
397
+ description: Short description shown in /revela design
378
398
  author: you
379
399
  version: 1.0.0
380
400
  ---
@@ -564,9 +584,9 @@ If a design has no markers, Revela falls back to injecting the full `DESIGN.md`
564
584
  Install a custom design:
565
585
 
566
586
  ```text
567
- /revela designs-add github:your-org/your-design
568
- /revela designs-add https://example.com/my-design.zip
569
- /revela designs-add ./path/to/local/design-folder
587
+ /revela design add github:your-org/your-design
588
+ /revela design add https://example.com/my-design.zip
589
+ /revela design add ./path/to/local/design-folder
570
590
  ```
571
591
 
572
592
  ---
@@ -591,19 +611,19 @@ Use the unified refinement workspace for normal post-write review and revision:
591
611
  /revela refine
592
612
  ```
593
613
 
594
- `/revela refine` opens the only HTML deck in `decks/` with two tabs. Use `Ctrl`/`Cmd` + click once to reference deck elements, then choose Edit for fast natural-language change comments or Inspect for read-only Source and Purpose review. Inspect does not mutate the deck; Edit remains the mutation path.
614
+ `/revela refine` opens the active HTML deck with two tabs. Use `Ctrl`/`Cmd` + click once to reference deck elements, then choose Edit for fast natural-language change comments or Inspect for read-only Narrative Reading, bounded Exploratory Reading, Source, Purpose, and artifact coverage review. Inspect does not mutate the deck; Edit remains the mutation path. This is the recommended entry for post-artifact reading, inspection, and editing.
595
615
 
596
- Open the visual editor for the only HTML deck in `decks/`:
616
+ Deprecated compatibility command:
597
617
 
598
618
  ```text
599
619
  /revela edit
600
620
  ```
601
621
 
602
- `/revela edit` does not accept a target in Revela 0.8. If `decks/` contains exactly one `.html` file, Revela opens it. If `decks/` contains zero or multiple `.html` files, Revela asks you to generate a deck first or move extra decks to separate workspaces.
622
+ `/revela edit` no longer opens a separate edit-only shell. It opens `/revela refine` in Edit mode for compatibility with old scripts and user habits.
603
623
 
604
- The older edit-only shell opens in your browser. Use `Ctrl`/`Cmd` + click to reference deck elements, write a natural-language comment, 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.
624
+ Use `Ctrl`/`Cmd` + click to reference deck elements, write a natural-language comment in the Edit 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.
605
625
 
606
- LLM tool equivalent: `revela-edit` with no target. This lets the agent open the same editor when you say things like “I want to edit the deck”.
626
+ LLM tool equivalent: `revela-edit` with no target. The tool is also a compatibility shim and opens Refine in Edit mode when you say things like “I want to edit the deck”.
607
627
 
608
628
  For existing decks, `/revela edit` prepares whatever minimal project context is needed so targeted edits can still use the normal safety checks.
609
629
 
@@ -611,17 +631,17 @@ For existing decks, `/revela edit` prepares whatever minimal project context is
611
631
 
612
632
  ## Evidence Inspector
613
633
 
614
- Open the Evidence Inspector for the only HTML deck in `decks/`, or use the Inspect tab in `/revela refine`:
634
+ Use `/revela refine` for evidence inspection and narrative reading. Deprecated compatibility command:
615
635
 
616
636
  ```text
617
637
  /revela inspect
618
638
  ```
619
639
 
620
- The inspector opens in your browser with the deck on the left and fixed cards on the right: Source and Purpose. Use `Ctrl`/`Cmd` + click to reference deck elements exactly like `/revela edit`, then click `Inspect Selection`. Selection is locked while the request is being processed.
640
+ `/revela inspect` no longer opens a separate inspector shell. It opens `/revela refine` in Inspect mode. The Inspect 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 `Inspect Selection`. Selection is locked while the request is being processed.
621
641
 
622
- The inspector 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. Deterministic preprocessing appears immediately; lazy LLM judgment then refines the Source and Purpose cards without inventing edits.
642
+ The inspector 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. Inspect 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 Inspect 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, Refine preserves the deterministic reading cards so generated inspection cannot silently remove claim, evidence-boundary, artifact-coverage, or exploratory context.
623
643
 
624
- Inspection and refinement use 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 inspect/refine/export workflows trust them.
644
+ Refine 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 refine/export workflows trust them.
625
645
 
626
646
  ---
627
647