@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 +75 -55
- package/README.zh-CN.md +75 -55
- package/lib/command-intent.ts +59 -0
- package/lib/commands/brief.ts +1 -1
- package/lib/commands/designs.ts +1 -1
- package/lib/commands/domains.ts +1 -1
- package/lib/commands/edit.ts +7 -5
- package/lib/commands/enable.ts +6 -6
- package/lib/commands/help.ts +19 -10
- package/lib/commands/init.ts +1 -1
- package/lib/commands/inspect.ts +7 -5
- package/lib/commands/research.ts +66 -0
- package/lib/commands/review.ts +3 -3
- package/lib/decks-state.ts +5 -5
- package/lib/inspect/prompt.ts +15 -2
- package/lib/inspect/requests.ts +21 -2
- package/lib/inspection-context/compile.ts +71 -5
- package/lib/inspection-context/match.ts +71 -1
- package/lib/inspection-context/project.ts +116 -13
- package/lib/inspection-context/result.ts +183 -0
- package/lib/narrative-state/queries.ts +1 -0
- package/lib/refine/server.ts +91 -13
- package/package.json +1 -1
- package/plugin.ts +252 -53
- package/skill/NARRATIVE_SKILL.md +103 -25
- package/skill/SKILL.md +1 -1
- package/tools/edit.ts +10 -8
- package/tools/inspection-result.ts +37 -0
package/README.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
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
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:
|
|
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
|
|
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
|
|
104
|
-
/revela
|
|
97
|
+
/revela design
|
|
98
|
+
/revela design use summit
|
|
105
99
|
/revela domains deeptech-investment
|
|
106
100
|
```
|
|
107
101
|
|
|
108
|
-
Then shape or review the
|
|
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
|
|
112
|
-
/revela
|
|
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
|
-
|
|
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
|
|
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
|
|
145
|
-
/revela
|
|
146
|
-
/revela deck
|
|
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
|
|
149
|
-
/revela edit
|
|
150
|
-
/revela inspect
|
|
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
|
|
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
|
-
|
|
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.
|
|
211
|
-
2.
|
|
212
|
-
3. Use `/revela
|
|
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,
|
|
218
|
-
9. Use `/revela edit` or `/revela inspect`
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
568
|
-
/revela
|
|
569
|
-
/revela
|
|
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
|
|
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
|
-
|
|
616
|
+
Deprecated compatibility command:
|
|
597
617
|
|
|
598
618
|
```text
|
|
599
619
|
/revela edit
|
|
600
620
|
```
|
|
601
621
|
|
|
602
|
-
`/revela edit`
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|