@cyber-dash-tech/revela 0.14.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 +60 -40
- package/README.zh-CN.md +60 -40
- 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/enable.ts +6 -6
- package/lib/commands/help.ts +16 -7
- package/lib/commands/init.ts +1 -1
- package/lib/commands/research.ts +66 -0
- package/lib/commands/review.ts +3 -3
- package/lib/decks-state.ts +5 -5
- package/package.json +1 -1
- package/plugin.ts +250 -51
- package/skill/NARRATIVE_SKILL.md +103 -25
- package/skill/SKILL.md +1 -1
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
151
|
/revela refine open unified reading, inspection, and editing workspace
|
|
149
152
|
/revela edit deprecated shim to /revela refine Edit mode
|
|
150
153
|
/revela inspect deprecated shim to /revela refine Inspect mode
|
|
151
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
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.
|
|
218
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
|
---
|
package/README.zh-CN.md
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.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 是一个 [OpenCode](https://opencode.ai) 插件,用来把工作区来源材料、调研、证据和用户意图转成可信的叙事型沟通 artifact。
|
|
12
|
-
它的第一个 render target 仍然是 HTML slide deck
|
|
12
|
+
它的第一个 render target 仍然是 HTML slide deck:启动 Revela workflow command 之后,agent 可以完成调研、结构设计、HTML 写作、QA、检查、refine 和导出。
|
|
13
13
|
|
|
14
14
|
**[在线演示 — AI 权力转移](https://cyber-dash-tech.github.io/revela/assets/html/ai-power-shift.html)**
|
|
15
15
|
|
|
@@ -17,8 +17,8 @@ Revela 是一个 [OpenCode](https://opencode.ai) 插件,用来把工作区来
|
|
|
17
17
|
|
|
18
18
|
## 它能做什么
|
|
19
19
|
|
|
20
|
-
-
|
|
21
|
-
- 只有在显式运行 `/revela deck` 时,才切换到 deck-render prompt mode
|
|
20
|
+
- 为 `/revela init`、`/revela story`、`/revela make deck` 等显式命令注入一次性 workflow instructions
|
|
21
|
+
- 只有在显式运行 `/revela make deck` 时,才切换到 deck-render prompt mode
|
|
22
22
|
- 支持工作区文档扫描,以及 `.pdf`、`.docx`、`.pptx`、`.xlsx` 的透明文本提取和嵌入素材缓存提取
|
|
23
23
|
- 将 `DECKS.json` 作为当前 workspace state engine,持续记录来源材料、调研动作、findings、claims、证据、叙事意图、render targets 和 readiness
|
|
24
24
|
- 先检查 narrative readiness,再用独立 deck/artifact gate 保护 deck HTML 写入
|
|
@@ -84,12 +84,6 @@ export { default } from "/absolute/path/to/revela/index.ts";
|
|
|
84
84
|
|
|
85
85
|
## 快速开始
|
|
86
86
|
|
|
87
|
-
先在当前会话中启用 Revela:
|
|
88
|
-
|
|
89
|
-
```text
|
|
90
|
-
/revela enable
|
|
91
|
-
```
|
|
92
|
-
|
|
93
87
|
在新项目里可以先准备工作区:
|
|
94
88
|
|
|
95
89
|
```text
|
|
@@ -99,22 +93,23 @@ export { default } from "/absolute/path/to/revela/index.ts";
|
|
|
99
93
|
如有需要,先切换 design 或 domain:
|
|
100
94
|
|
|
101
95
|
```text
|
|
102
|
-
/revela
|
|
103
|
-
/revela
|
|
96
|
+
/revela design
|
|
97
|
+
/revela design use summit
|
|
104
98
|
/revela domains deeptech-investment
|
|
105
99
|
```
|
|
106
100
|
|
|
107
|
-
|
|
101
|
+
然后先打磨、调研或检查 story。叙事 ready 并获得批准后,再生成 deck:
|
|
108
102
|
|
|
109
103
|
```text
|
|
110
|
-
/revela
|
|
111
|
-
/revela
|
|
104
|
+
/revela story
|
|
105
|
+
/revela research
|
|
106
|
+
/revela make deck
|
|
112
107
|
```
|
|
113
108
|
|
|
114
109
|
如果只需要检查写 HTML 前的 deck/artifact gate,使用:
|
|
115
110
|
|
|
116
111
|
```text
|
|
117
|
-
/revela deck --review
|
|
112
|
+
/revela make deck --review
|
|
118
113
|
```
|
|
119
114
|
|
|
120
115
|
需要导出时,可以手动调用,也可以让 agent 直接导出:
|
|
@@ -124,7 +119,13 @@ export { default } from "/absolute/path/to/revela/index.ts";
|
|
|
124
119
|
/revela pptx decks/humanoid-robotics.html
|
|
125
120
|
```
|
|
126
121
|
|
|
127
|
-
|
|
122
|
+
如果希望普通聊天消息在显式命令之间也保持 Revela narrative mode,可以启用可选 ambient mode:
|
|
123
|
+
|
|
124
|
+
```text
|
|
125
|
+
/revela enable
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
完成后关闭 ambient mode:
|
|
128
129
|
|
|
129
130
|
```text
|
|
130
131
|
/revela disable
|
|
@@ -136,18 +137,32 @@ export { default } from "/absolute/path/to/revela/index.ts";
|
|
|
136
137
|
|
|
137
138
|
```text
|
|
138
139
|
/revela 显示当前状态与帮助
|
|
139
|
-
/revela enable
|
|
140
|
-
/revela disable 关闭 Revela
|
|
140
|
+
/revela enable 可选:让普通聊天保持 ambient narrative mode
|
|
141
|
+
/revela disable 关闭 ambient Revela mode
|
|
141
142
|
|
|
142
143
|
/revela init 初始化或刷新 narrative workspace state
|
|
143
|
-
/revela
|
|
144
|
-
/revela
|
|
145
|
-
/revela deck
|
|
144
|
+
/revela research 调研、绑定证据,并减少 story gaps/caveats
|
|
145
|
+
/revela story 打开只读 story workspace UI
|
|
146
|
+
/revela make deck 从已批准 story 生成 deck
|
|
147
|
+
/revela make deck --review 写 HTML 前检查 deck/artifact readiness
|
|
148
|
+
/revela make brief [file.md] 从已批准 story 渲染 executive brief
|
|
146
149
|
/revela remember <text> 保存明确的用户/工作流偏好
|
|
147
150
|
/revela refine 打开统一的阅读、检查和编辑 workspace
|
|
148
151
|
/revela edit deprecated,兼容到 /revela refine Edit mode
|
|
149
152
|
/revela inspect deprecated,兼容到 /revela refine Inspect mode
|
|
150
153
|
|
|
154
|
+
/revela review legacy story readiness report
|
|
155
|
+
/revela narrative 兼容别名,等同 /revela story
|
|
156
|
+
/revela deck 兼容别名,等同 /revela make deck
|
|
157
|
+
/revela brief [file.md] 兼容别名,等同 /revela make brief
|
|
158
|
+
|
|
159
|
+
/revela design 列出已安装 design
|
|
160
|
+
/revela design use <name> 激活某个 design
|
|
161
|
+
/revela design new <name> 通过 AI 创建一个自定义 design
|
|
162
|
+
/revela design edit <name> 通过 AI 调整已有自定义 design
|
|
163
|
+
/revela design preview [name] 在浏览器中打开 design preview
|
|
164
|
+
/revela design add <source> 从 URL、本地路径或 github:user/repo 安装 design
|
|
165
|
+
/revela design rm <name> 删除已安装 design
|
|
151
166
|
/revela designs 列出已安装 design
|
|
152
167
|
/revela designs <name> 激活某个 design
|
|
153
168
|
/revela designs-new <name> 通过 AI 创建一个自定义 design
|
|
@@ -165,15 +180,15 @@ export { default } from "/absolute/path/to/revela/index.ts";
|
|
|
165
180
|
/revela pptx <file> 将 HTML deck 导出为同目录可编辑 PPTX
|
|
166
181
|
```
|
|
167
182
|
|
|
168
|
-
大多数 `/revela` 命令都在本地执行,不消耗 LLM token。`/revela init`、`/revela review`、`/revela deck`、`/revela remember`、`/revela
|
|
183
|
+
大多数 `/revela` 命令都在本地执行,不消耗 LLM token。`/revela init`、`/revela research`、`/revela story`、`/revela review`、`/revela make deck`、`/revela remember`、`/revela design new` 和 `/revela design edit` 会启动 AI 辅助流程,因为它们需要读取或更新项目状态。这些 workflow command 只在可见聊天里显示短意图,详细内部说明通过一次性的 system-prompt command intent 注入。`/revela refine` 是统一的 post-artifact workspace,会打开一个本地浏览器 workspace,里面有 Edit 和 Inspect 两个 tab,并共享同一套 Cmd/Ctrl-click 元素引用。Edit 会把精准修改评论发回当前 OpenCode 会话;Inspect 会把 grounded selection context 发给当前 OpenCode 会话,并渲染本地化的 Narrative Reading、Exploratory Reading、Source、Purpose 卡片。确定性预处理保留为 fallback context,而不是默认先展示的 UI。如果生成结果缺少较新的 reading 卡片,Refine 会保留确定性 Narrative Reading 和 Exploratory Reading,而不是丢掉这些上下文。Narrative Reading 还会显示所选 canonical claim 的 artifact coverage,包括每个已记录 artifact 是否包含该 claim,以及 coverage 是 current、stale、partial 还是 missing。Exploratory Reading 明确是非官方阅读辅助,只能基于已记录 claim、evidence、caveat、objection、risk 和 artifact coverage。它没有聊天框,也不会修改 deck。`/revela edit` 和 `/revela inspect` 只作为 deprecated 兼容入口保留。
|
|
169
184
|
|
|
170
185
|
---
|
|
171
186
|
|
|
172
187
|
## 工作原理
|
|
173
188
|
|
|
174
|
-
|
|
189
|
+
显式 Revela workflow command 会把一次性 command instructions 追加到当前 agent 的 system prompt 中。`/revela enable` 是可选 ambient mode,用于让显式命令之间的普通聊天也保持 Revela narrative mode。
|
|
175
190
|
|
|
176
|
-
默认 prompt 是 narrative-first
|
|
191
|
+
默认 prompt 是 narrative-first:它遵循 `Init -> Research -> Story -> Make -> Refine`,关注受众信念变化、decision/action、thesis、claims、证据边界、objections、risks、research gaps 和 approval。Active design CSS、layout catalog、component index、chart rules 和 deck HTML skeleton 在 `/revela make deck` 切换到 deck-render mode 或 `/revela design` 进入显式设计工作流前不会注入。
|
|
177
192
|
|
|
178
193
|
Deck-render mode 由 3 层组成:
|
|
179
194
|
|
|
@@ -182,7 +197,7 @@ Deck-render mode 由 3 层组成:
|
|
|
182
197
|
3. 当前 active design - 视觉系统、layout、component 和图表规则
|
|
183
198
|
|
|
184
199
|
持久化配置保存在 `~/.config/revela/config.json`。
|
|
185
|
-
|
|
200
|
+
ambient enable/disable 状态只在当前会话生效。
|
|
186
201
|
|
|
187
202
|
### Workspace State
|
|
188
203
|
|
|
@@ -206,20 +221,22 @@ Deck 仍然是主要 authored artifact,但现在它是从同一份 workspace s
|
|
|
206
221
|
|
|
207
222
|
把 Revela 当成 narrative-first artifact workflow:
|
|
208
223
|
|
|
209
|
-
1.
|
|
210
|
-
2.
|
|
211
|
-
3. 用 `/revela
|
|
224
|
+
1. 新项目或工作区明显变化时,运行 `/revela init`。
|
|
225
|
+
2. 如果 story gaps 或 unsupported central claims 需要外部证据,用 `/revela research` 定向调研;它应循环执行 research、证据绑定、claim/relation 收窄和 re-review,直到公开调研无法继续改善状态。
|
|
226
|
+
3. 用 `/revela story` 打开 story workspace UI,查看 claim flow、证据、caveats、research gaps、approval state 和 artifact coverage。
|
|
212
227
|
4. 批准 narrative 或要求修改。如果需要在完整战略批准前渲染,必须记录 explicit render override。
|
|
213
|
-
5. 运行 `/revela deck`,把已批准 narrative 编译成 deck slide specs
|
|
214
|
-
6. 只在 deck handoff 阶段选择或确认 design,然后通过 handoff workflow 或 `/revela deck --review` 运行 deck/artifact gate。
|
|
228
|
+
5. 运行 `/revela make deck`,把已批准 narrative 编译成 deck slide specs 并进入 deck-render mode,或运行 `/revela make brief` 渲染 executive brief。
|
|
229
|
+
6. 只在 deck handoff 阶段选择或确认 design,然后通过 handoff workflow 或 `/revela make deck --review` 运行 deck/artifact gate。
|
|
215
230
|
7. 只有 artifact gate ready 后,才让 agent 把 HTML deck 写到 `decks/` 下。
|
|
216
231
|
8. 用 `/revela refine` 对选中 deck 元素做可视化评论、精准修改、只读 Narrative Reading、有边界的 Exploratory Reading、Source、Purpose 检查,以及 claim-to-artifact coverage 查看。
|
|
217
232
|
9. 只有旧脚本或旧习惯需要时,才使用 `/revela edit` 或 `/revela inspect`;两者都会打开对应模式的 `/revela refine`。
|
|
218
233
|
10. 用 `/revela pdf <file>` 或 `/revela pptx <file>` 导出。
|
|
219
234
|
|
|
220
|
-
`/revela
|
|
235
|
+
只有当你希望普通聊天消息,而不只是显式 `/revela ...` 命令,也保持 Revela narrative mode 时,才需要使用 `/revela enable`。
|
|
236
|
+
|
|
237
|
+
`/revela story` 打开只读 story workspace UI。`/revela review` 生成 legacy readiness report,用于检查受众不清、缺信念变化、缺 decision/action、thesis 弱、central claims 无证据、evidence 弱、unsupported scope、objection 未处理、缺风险/假设处理、approval stale 或缺 approval。两者都不检查 design/layout readiness,也不会写最终 deck。
|
|
221
238
|
|
|
222
|
-
如果 Revela 阻止写入 deck,直接让 agent 运行 `/revela deck --review`,根据报告补齐 artifact 缺口后再写。这样可以避免在 slide specs、evidence projection、design/layout readiness、review snapshot 和 deck HTML contract 还不完整时覆盖真实 deck 文件。
|
|
239
|
+
如果 Revela 阻止写入 deck,直接让 agent 运行 `/revela make deck --review`,根据报告补齐 artifact 缺口后再写。这样可以避免在 slide specs、evidence projection、design/layout readiness、review snapshot 和 deck HTML contract 还不完整时覆盖真实 deck 文件。
|
|
223
240
|
|
|
224
241
|
记住长期偏好请使用:
|
|
225
242
|
|
|
@@ -233,7 +250,7 @@ Deck 仍然是主要 authored artifact,但现在它是从同一份 workspace s
|
|
|
233
250
|
|
|
234
251
|
## 调研与文件摄取
|
|
235
252
|
|
|
236
|
-
|
|
253
|
+
在 Revela workflow 中,agent 可以使用:
|
|
237
254
|
|
|
238
255
|
- `revela-workspace-scan` 扫描工作区中的 PDF、Office 文件、CSV、Markdown 和文本文件
|
|
239
256
|
- `revela-research` 子代理做定向网页调研
|
|
@@ -245,7 +262,7 @@ Deck 仍然是主要 authored artifact,但现在它是从同一份 workspace s
|
|
|
245
262
|
支持提取文本的入口:
|
|
246
263
|
|
|
247
264
|
- 在对话里 `@` 引用或直接粘贴文件
|
|
248
|
-
-
|
|
265
|
+
- 在 Revela workflow 或 ambient mode 中通过 `read` 工具访问文件
|
|
249
266
|
|
|
250
267
|
支持提取的文件类型:
|
|
251
268
|
|
|
@@ -279,7 +296,7 @@ Deck 仍然是主要 authored artifact,但现在它是从同一份 workspace s
|
|
|
279
296
|
|
|
280
297
|
## Designs 与 Domains
|
|
281
298
|
|
|
282
|
-
用 `/revela
|
|
299
|
+
用 `/revela design` 和 `/revela domains` 查看你当前环境里实际安装的内容。旧的 `/revela designs*` 命令仍作为兼容别名保留。
|
|
283
300
|
|
|
284
301
|
仓库内置的 domains:
|
|
285
302
|
|
|
@@ -307,6 +324,7 @@ Deck 仍然是主要 authored artifact,但现在它是从同一份 workspace s
|
|
|
307
324
|
|
|
308
325
|
```text
|
|
309
326
|
/revela designs-new my-design
|
|
327
|
+
/revela design new my-design
|
|
310
328
|
```
|
|
311
329
|
|
|
312
330
|
Agent 会先询问你的审美参考,整理设计 brief 并等待确认,然后把 `DESIGN.md` 和 `preview.html` 保存到本地 Revela designs 目录。对 AI 生成的 design,`preview.html` 是必需验收面:它必须包含 cover 和 closing 页,并且必须展示所有 `@component:*`,否则 `revela-designs-author` 不会接受这个包。默认结构底座是内部中性 `starter` design,它不会出现在普通 design 列表中。只有当你明确想从 `summit` 或 `monet` 的具体风格派生时,才建议使用 `--base summit` 或 `--base monet`。
|
|
@@ -315,6 +333,7 @@ Agent 会先询问你的审美参考,整理设计 brief 并等待确认,然
|
|
|
315
333
|
|
|
316
334
|
```text
|
|
317
335
|
/revela designs-edit my-design
|
|
336
|
+
/revela design edit my-design
|
|
318
337
|
```
|
|
319
338
|
|
|
320
339
|
Agent 会询问你想修改什么,读取当前 design,整理 edit brief 并等待确认,然后通过受控 authoring tool 覆盖保存本地 design 包。
|
|
@@ -323,6 +342,7 @@ Agent 会询问你想修改什么,读取当前 design,整理 edit brief 并
|
|
|
323
342
|
|
|
324
343
|
```text
|
|
325
344
|
/revela designs-preview my-design
|
|
345
|
+
/revela design preview my-design
|
|
326
346
|
```
|
|
327
347
|
|
|
328
348
|
省略 name 时会打开当前 active design 的 preview。如果该 design 没有 `preview.html`,Revela 会提示没有可用 preview。
|
|
@@ -340,7 +360,7 @@ my-design/
|
|
|
340
360
|
```yaml
|
|
341
361
|
---
|
|
342
362
|
name: my-design
|
|
343
|
-
description: 在 /revela
|
|
363
|
+
description: 在 /revela design 中显示的简短说明
|
|
344
364
|
author: you
|
|
345
365
|
version: 1.0.0
|
|
346
366
|
---
|
|
@@ -529,9 +549,9 @@ Prompt 注入规则:
|
|
|
529
549
|
安装自定义 design:
|
|
530
550
|
|
|
531
551
|
```text
|
|
532
|
-
/revela
|
|
533
|
-
/revela
|
|
534
|
-
/revela
|
|
552
|
+
/revela design add github:your-org/your-design
|
|
553
|
+
/revela design add https://example.com/my-design.zip
|
|
554
|
+
/revela design add ./path/to/local/design-folder
|
|
535
555
|
```
|
|
536
556
|
|
|
537
557
|
---
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { PromptMode } from "./prompt-builder"
|
|
2
|
+
|
|
3
|
+
export interface PendingCommandIntent {
|
|
4
|
+
sessionID: string
|
|
5
|
+
name: string
|
|
6
|
+
mode: PromptMode
|
|
7
|
+
visibleText: string
|
|
8
|
+
hiddenPrompt: string
|
|
9
|
+
createdAt: number
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const pendingCommandIntents = new Map<string, PendingCommandIntent>()
|
|
13
|
+
|
|
14
|
+
export function setPendingCommandIntent(intent: Omit<PendingCommandIntent, "createdAt"> & { createdAt?: number }): PendingCommandIntent {
|
|
15
|
+
const normalized: PendingCommandIntent = {
|
|
16
|
+
...intent,
|
|
17
|
+
createdAt: intent.createdAt ?? Date.now(),
|
|
18
|
+
}
|
|
19
|
+
pendingCommandIntents.set(normalized.sessionID, normalized)
|
|
20
|
+
return normalized
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function peekPendingCommandIntent(sessionID: string): PendingCommandIntent | undefined {
|
|
24
|
+
if (!sessionID) return undefined
|
|
25
|
+
return pendingCommandIntents.get(sessionID)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function takePendingCommandIntent(sessionID: string): PendingCommandIntent | undefined {
|
|
29
|
+
if (!sessionID) return undefined
|
|
30
|
+
const intent = pendingCommandIntents.get(sessionID)
|
|
31
|
+
if (intent) pendingCommandIntents.delete(sessionID)
|
|
32
|
+
return intent
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function clearPendingCommandIntent(sessionID: string): void {
|
|
36
|
+
if (!sessionID) return
|
|
37
|
+
pendingCommandIntents.delete(sessionID)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function clearAllPendingCommandIntents(): void {
|
|
41
|
+
pendingCommandIntents.clear()
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function formatCommandIntentSystemBlock(intent: PendingCommandIntent): string {
|
|
45
|
+
return [
|
|
46
|
+
"<revela-command-intent>",
|
|
47
|
+
`User invoked: /revela ${intent.name}`,
|
|
48
|
+
`Prompt mode: ${intent.mode}`,
|
|
49
|
+
"Visible user intent:",
|
|
50
|
+
intent.visibleText,
|
|
51
|
+
"",
|
|
52
|
+
"Execute the hidden workflow instructions below with the available Revela tools.",
|
|
53
|
+
"Do not persist this command block as workspace memory or user preference.",
|
|
54
|
+
"",
|
|
55
|
+
"Hidden workflow instructions:",
|
|
56
|
+
intent.hiddenPrompt,
|
|
57
|
+
"</revela-command-intent>",
|
|
58
|
+
].join("\n")
|
|
59
|
+
}
|
package/lib/commands/brief.ts
CHANGED
|
@@ -34,7 +34,7 @@ export async function handleBrief(
|
|
|
34
34
|
await send(
|
|
35
35
|
`**Executive brief not rendered**\n\n${result.reason}\n\n` +
|
|
36
36
|
(result.narrativeHash ? `Narrative hash: \`${result.narrativeHash}\`\n\n` : "") +
|
|
37
|
-
"Run `/revela
|
|
37
|
+
"Run `/revela story` and approve the current narrative, or record an explicit render override before retrying."
|
|
38
38
|
)
|
|
39
39
|
return
|
|
40
40
|
}
|
package/lib/commands/designs.ts
CHANGED
|
@@ -36,7 +36,7 @@ export async function handleDesignsActivate(
|
|
|
36
36
|
try {
|
|
37
37
|
activateDesign(name)
|
|
38
38
|
buildPrompt({ mode: "narrative" })
|
|
39
|
-
await send(`**Design activated:** \`${name}\`\nNarrative prompt rebuilt. The design will apply when \`/revela deck\` enters deck-render mode.`)
|
|
39
|
+
await send(`**Design activated:** \`${name}\`\nNarrative prompt rebuilt. The design will apply when \`/revela make deck\` enters deck-render mode.`)
|
|
40
40
|
} catch (e: any) {
|
|
41
41
|
await send(`**Error:** ${e.message}`)
|
|
42
42
|
}
|
package/lib/commands/domains.ts
CHANGED
|
@@ -36,7 +36,7 @@ export async function handleDomainsActivate(
|
|
|
36
36
|
try {
|
|
37
37
|
activateDomain(name)
|
|
38
38
|
buildPrompt({ mode: "narrative" })
|
|
39
|
-
await send(`**Domain activated:** \`${name}\`\nNarrative prompt rebuilt. Domain reasoning applies now; deck-specific render guidance applies during \`/revela deck\`.`)
|
|
39
|
+
await send(`**Domain activated:** \`${name}\`\nNarrative prompt rebuilt. Domain reasoning applies now; deck-specific render guidance applies during \`/revela make deck\`.`)
|
|
40
40
|
} catch (e: any) {
|
|
41
41
|
await send(`**Error:** ${e.message}`)
|
|
42
42
|
}
|