@cyber-dash-tech/revela 0.17.24 → 0.18.3
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 +24 -25
- package/README.zh-CN.md +25 -26
- package/bin/revela.ts +2 -4
- package/lib/commands/help.ts +13 -13
- package/lib/commands/init.ts +24 -0
- package/lib/commands/png.ts +29 -0
- package/lib/commands/refine.ts +1 -1
- package/lib/commands/research.ts +24 -0
- package/lib/commands/review.ts +98 -19
- package/lib/decks-state.ts +7 -7
- package/lib/design/designs.ts +44 -0
- package/lib/narrative-state/deck-plan-artifact.ts +631 -114
- package/lib/narrative-state/render-plan.ts +53 -24
- package/lib/pdf/export.ts +84 -24
- package/lib/refine/server.ts +4 -3
- package/lib/runtime/index.ts +21 -14
- package/lib/runtime/review.ts +4 -104
- package/lib/workspace-state/render-targets.ts +2 -2
- package/lib/workspace-state/rendered-artifacts.ts +1 -1
- package/lib/workspace-state/types.ts +1 -1
- package/package.json +1 -1
- package/plugin.ts +31 -42
- package/plugins/revela/.codex-plugin/plugin.json +2 -2
- package/plugins/revela/.mcp.json +1 -1
- package/plugins/revela/mcp/revela-server.ts +58 -80
- package/plugins/revela/skills/revela-design/SKILL.md +4 -2
- package/plugins/revela/skills/revela-domain/SKILL.md +1 -1
- package/plugins/revela/skills/revela-export/SKILL.md +4 -5
- package/plugins/revela/skills/revela-init/SKILL.md +19 -34
- package/plugins/revela/skills/revela-make-deck/SKILL.md +16 -41
- package/plugins/revela/skills/revela-research/SKILL.md +17 -26
- package/plugins/revela/skills/revela-review-deck/SKILL.md +11 -29
- package/skill/SKILL.md +44 -35
- package/plugins/revela/skills/revela-story/SKILL.md +0 -24
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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="560" />
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
Revela works from [OpenCode](https://opencode.ai) and Codex to turn source materials, research, data, and intent into trusted, traceable, presentation-ready decision artifacts.
|
|
12
12
|
|
|
13
|
-
Its
|
|
13
|
+
Its deck-first workspace reviews local materials, saves source-linked research, builds an explicit `deck-plan.md`, generates HTML decks, reviews them, and exports PDF/PPTX/PNG artifacts.
|
|
14
14
|
|
|
15
15
|
## Install
|
|
16
16
|
|
|
@@ -34,8 +34,8 @@ To install globally, add the same entry to `~/.config/opencode/opencode.json`.
|
|
|
34
34
|
Requirements:
|
|
35
35
|
|
|
36
36
|
- The Codex CLI must be installed and the `codex` command must be available in your shell.
|
|
37
|
-
- Your environment must be able to run `npx`; Revela uses `npx -y @cyber-dash-tech/revela@0.
|
|
38
|
-
- For interactive Review actions, `codex exec` must also work because the Review UI uses it for
|
|
37
|
+
- Your environment must be able to run `npx`; Revela uses `npx -y @cyber-dash-tech/revela@0.18.3 mcp` to start the MCP server.
|
|
38
|
+
- For interactive Review actions, `codex exec` must also work because the Review UI uses it for Comment/Apply Fix requests.
|
|
39
39
|
|
|
40
40
|
Optional preflight:
|
|
41
41
|
|
|
@@ -55,11 +55,11 @@ npm_config_cache=/tmp/revela-npm-cache bun run smoke:mcp-pack
|
|
|
55
55
|
Install Revela through the Codex Git marketplace:
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.
|
|
58
|
+
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.18.3
|
|
59
59
|
codex plugin add revela@revela
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
The Git marketplace install provides the Codex plugin shell, skills, hooks, and MCP configuration. When Codex starts the Revela MCP server for the first time, it runs `npx -y @cyber-dash-tech/revela@0.
|
|
62
|
+
The Git marketplace install provides the Codex plugin shell, skills, hooks, and MCP configuration. When Codex starts the Revela MCP server for the first time, it runs `npx -y @cyber-dash-tech/revela@0.18.3 mcp` so npm can fetch the published package and its dependencies.
|
|
63
63
|
|
|
64
64
|
You do not need to run `bun install` inside the Codex marketplace clone.
|
|
65
65
|
|
|
@@ -121,13 +121,13 @@ In Codex, ask Revela to list or switch designs; the plugin uses the active desig
|
|
|
121
121
|
|
|
122
122
|
## Domains
|
|
123
123
|
|
|
124
|
-
Domains add topic-specific
|
|
124
|
+
Domains add topic-specific communication guidance, such as consulting, product, or investor communication. Use them when you want Revela to adapt deck framing to a specific context.
|
|
125
125
|
|
|
126
126
|
```text
|
|
127
127
|
/revela domain
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
In Codex, ask Revela to list or switch domains; the active domain guides
|
|
130
|
+
In Codex, ask Revela to list or switch domains; the active domain guides deck framing during init, research, and planning.
|
|
131
131
|
|
|
132
132
|
## Quick Start
|
|
133
133
|
|
|
@@ -157,54 +157,54 @@ Revela may ask for references or constraints, then creates and validates the des
|
|
|
157
157
|
revela, use neon-finance as the design.
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
4. Initialize
|
|
160
|
+
4. Initialize local material intake. Init scans, extracts, and reviews workspace sources; it does not create a Narrative Vault.
|
|
161
161
|
|
|
162
162
|
```text
|
|
163
163
|
revela, help me init this workspace from the local materials.
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
-
5. Research
|
|
166
|
+
5. Research source-linked deck inputs and save findings.
|
|
167
167
|
|
|
168
168
|
```text
|
|
169
|
-
revela, research the
|
|
169
|
+
revela, research the public evidence and examples needed for this deck.
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
6.
|
|
173
|
-
|
|
174
|
-
```text
|
|
175
|
-
revela, show me the Story before we make the deck.
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
7. Create or update the deck plan before generating HTML so slide order, chapter structure, evidence trace, caveats, and visual intent are explicit.
|
|
172
|
+
6. Create or update the deck plan before generating HTML so slide order, chapter structure, source links, unresolved inputs, source limitations, and visual intent are explicit.
|
|
179
173
|
|
|
180
174
|
```text
|
|
181
175
|
revela, create or update the deck plan before generating HTML.
|
|
182
176
|
```
|
|
183
177
|
|
|
184
|
-
|
|
178
|
+
7. Make an HTML deck from the current deck plan.
|
|
185
179
|
|
|
186
180
|
```text
|
|
187
|
-
revela, make the deck from the current deck plan
|
|
181
|
+
revela, make the deck from the current deck plan.
|
|
188
182
|
```
|
|
189
183
|
|
|
190
|
-
|
|
184
|
+
8. Review the generated deck for Artifact QA and targeted edits.
|
|
191
185
|
|
|
192
186
|
```text
|
|
193
187
|
revela, review the generated deck.
|
|
194
188
|
```
|
|
195
189
|
|
|
196
|
-
|
|
190
|
+
9. Export a PDF after deck QA passes.
|
|
197
191
|
|
|
198
192
|
```text
|
|
199
193
|
revela, export the deck to PDF.
|
|
200
194
|
```
|
|
201
195
|
|
|
202
|
-
|
|
196
|
+
10. Export an editable PPTX after deck QA passes.
|
|
203
197
|
|
|
204
198
|
```text
|
|
205
199
|
revela, export the deck to PPTX.
|
|
206
200
|
```
|
|
207
201
|
|
|
202
|
+
11. Export per-slide PNG files after deck QA passes.
|
|
203
|
+
|
|
204
|
+
```text
|
|
205
|
+
revela, export the deck to PNG.
|
|
206
|
+
```
|
|
207
|
+
|
|
208
208
|
## Review A Deck
|
|
209
209
|
|
|
210
210
|
Use Review after generating an HTML deck:
|
|
@@ -213,7 +213,6 @@ Use Review after generating an HTML deck:
|
|
|
213
213
|
/revela review --deck
|
|
214
214
|
```
|
|
215
215
|
|
|
216
|
-
Review opens a local deck workspace
|
|
216
|
+
Review opens a local deck workspace for QA and targeted edits:
|
|
217
217
|
|
|
218
|
-
- 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.
|
|
219
218
|
- Comment lets you request targeted edits on the deck, such as layout, copy, hierarchy, spacing, or visual changes.
|
package/README.zh-CN.md
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
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="560" />
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
|
-
Revela 可在 [OpenCode](https://opencode.ai) 和 Codex 中使用,把来源材料、调研、数据和用户意图转成可信、可追踪、可直接用于决策沟通的
|
|
11
|
+
Revela 可在 [OpenCode](https://opencode.ai) 和 Codex 中使用,把来源材料、调研、数据和用户意图转成可信、可追踪、可直接用于决策沟通的 deck artifact。
|
|
12
12
|
|
|
13
|
-
它的
|
|
13
|
+
它的 deck-first workspace 会审阅本地资料、保存 source-linked research、生成明确的 `deck-plan.md`、产出 HTML deck,并支持 Review 与 PDF/PPTX/PNG 导出。
|
|
14
14
|
|
|
15
15
|
## 安装
|
|
16
16
|
|
|
@@ -34,8 +34,8 @@ Revela 可在 [OpenCode](https://opencode.ai) 和 Codex 中使用,把来源材
|
|
|
34
34
|
环境要求:
|
|
35
35
|
|
|
36
36
|
- 需要已安装 Codex CLI,并且 shell 中可以执行 `codex`。
|
|
37
|
-
- 环境中需要可以执行 `npx`;Revela 会用 `npx -y @cyber-dash-tech/revela@0.
|
|
38
|
-
- 如果使用 Review UI 的
|
|
37
|
+
- 环境中需要可以执行 `npx`;Revela 会用 `npx -y @cyber-dash-tech/revela@0.18.3 mcp` 启动 MCP server。
|
|
38
|
+
- 如果使用 Review UI 的 Comment 或 Apply Fix,需要 `codex exec` 可用。
|
|
39
39
|
|
|
40
40
|
可选的安装前检查:
|
|
41
41
|
|
|
@@ -55,11 +55,11 @@ npm_config_cache=/tmp/revela-npm-cache bun run smoke:mcp-pack
|
|
|
55
55
|
通过 Codex Git marketplace 安装 Revela:
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.
|
|
58
|
+
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.18.3
|
|
59
59
|
codex plugin add revela@revela
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
Git marketplace 安装的是 Codex plugin 壳、skills、hooks 和 MCP 配置。Codex 第一次启动 Revela MCP server 时,会运行 `npx -y @cyber-dash-tech/revela@0.
|
|
62
|
+
Git marketplace 安装的是 Codex plugin 壳、skills、hooks 和 MCP 配置。Codex 第一次启动 Revela MCP server 时,会运行 `npx -y @cyber-dash-tech/revela@0.18.3 mcp`,由 npm 获取已发布 package 及其 dependencies。
|
|
63
63
|
|
|
64
64
|
不需要在 Codex marketplace clone 里运行 `bun install`。
|
|
65
65
|
|
|
@@ -121,13 +121,13 @@ Revela 内置多个 deck design:
|
|
|
121
121
|
|
|
122
122
|
## Domains
|
|
123
123
|
|
|
124
|
-
Domain
|
|
124
|
+
Domain 提供特定场景的沟通 guidance,例如 consulting、product 或 investor communication。需要让 Revela 按具体沟通场景调整 deck framing 时使用。
|
|
125
125
|
|
|
126
126
|
```text
|
|
127
127
|
/revela domain
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
在 Codex 中,可以直接让 Revela 列出或切换 domain;active domain 会用于 init、research 和
|
|
130
|
+
在 Codex 中,可以直接让 Revela 列出或切换 domain;active domain 会用于 init、research 和 deck planning 阶段的 framing。
|
|
131
131
|
|
|
132
132
|
## Quick Start
|
|
133
133
|
|
|
@@ -157,54 +157,54 @@ Revela 可能会继续询问参考图、风格约束或禁忌项,然后创建
|
|
|
157
157
|
revela,使用 neon-finance 作为 design。
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
4.
|
|
160
|
+
4. 初始化本地 material intake。Init 会扫描、抽取并审阅 workspace source;它不会创建 Narrative Vault。
|
|
161
161
|
|
|
162
162
|
```text
|
|
163
163
|
revela,帮我 init 这个 workspace,先读本地材料。
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
-
5. 针对
|
|
166
|
+
5. 针对 deck 所需输入做 research,并保存带来源的 findings。
|
|
167
167
|
|
|
168
168
|
```text
|
|
169
|
-
revela,research
|
|
169
|
+
revela,research 这个 deck 需要的公开证据、案例和 source。
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
6.
|
|
173
|
-
|
|
174
|
-
```text
|
|
175
|
-
revela,先给我看 Story,再 make deck。
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
7. 先创建或更新 deck plan,明确 slide 顺序、章节结构、evidence trace、caveats 和 visual intent,再生成 HTML。
|
|
172
|
+
6. 先创建或更新 deck plan,明确 slide 顺序、章节结构、source links、unresolved inputs、source limitations 和 visual intent,再生成 HTML。
|
|
179
173
|
|
|
180
174
|
```text
|
|
181
175
|
revela,生成 HTML 前先 create or update deck plan。
|
|
182
176
|
```
|
|
183
177
|
|
|
184
|
-
|
|
178
|
+
7. 基于当前 deck plan 生成 HTML deck。
|
|
185
179
|
|
|
186
180
|
```text
|
|
187
|
-
revela,基于当前 deck plan
|
|
181
|
+
revela,基于当前 deck plan make deck。
|
|
188
182
|
```
|
|
189
183
|
|
|
190
|
-
|
|
184
|
+
8. Review 生成后的 deck,检查 Artifact QA,并做定向修改。
|
|
191
185
|
|
|
192
186
|
```text
|
|
193
187
|
revela,review 生成好的 deck。
|
|
194
188
|
```
|
|
195
189
|
|
|
196
|
-
|
|
190
|
+
9. QA 通过后导出 PDF。
|
|
197
191
|
|
|
198
192
|
```text
|
|
199
193
|
revela,把 deck export 成 PDF。
|
|
200
194
|
```
|
|
201
195
|
|
|
202
|
-
|
|
196
|
+
10. QA 通过后导出可编辑 PPTX。
|
|
203
197
|
|
|
204
198
|
```text
|
|
205
199
|
revela,把 deck export 成 PPTX。
|
|
206
200
|
```
|
|
207
201
|
|
|
202
|
+
11. QA 通过后导出每页 PNG。
|
|
203
|
+
|
|
204
|
+
```text
|
|
205
|
+
revela,把 deck export 成 PNG。
|
|
206
|
+
```
|
|
207
|
+
|
|
208
208
|
## Review Deck
|
|
209
209
|
|
|
210
210
|
生成 HTML deck 后可以进入 Review:
|
|
@@ -213,7 +213,6 @@ revela,把 deck export 成 PPTX。
|
|
|
213
213
|
/revela review --deck
|
|
214
214
|
```
|
|
215
215
|
|
|
216
|
-
Review 会打开本地 deck
|
|
216
|
+
Review 会打开本地 deck 工作台,用于 QA 和定向修改:
|
|
217
217
|
|
|
218
|
-
- Insight:解释选中的 slide 内容支持哪个 claim、有哪些 evidence、还剩哪些 caveat 或 gap,以及它在叙事里的作用。
|
|
219
218
|
- Comment:对 deck 发起定向修改,例如 layout、文案、层级、间距或视觉调整。
|
package/bin/revela.ts
CHANGED
|
@@ -20,14 +20,13 @@ else {
|
|
|
20
20
|
try {
|
|
21
21
|
let result: CommandResult
|
|
22
22
|
if (command === "doctor") result = runtime.doctor(options)
|
|
23
|
-
else if (command === "compile") result = runtime.compileNarrative(options)
|
|
24
|
-
else if (command === "markdown-qa") result = runtime.markdownQa(options)
|
|
25
23
|
else if (command === "deck-plan") result = runtime.readDeckPlan(options)
|
|
26
24
|
else if (command === "deck-foundation") result = runtime.createDeckFoundation(required(options, ["outputPath", "title", "language"]))
|
|
27
25
|
else if (command === "qa") result = runtime.runDeckQa(required(options, ["file"]))
|
|
28
26
|
else if (command === "review-read") result = runtime.reviewDeckRead(required(options, ["file"]))
|
|
29
27
|
else if (command === "export-pdf") result = runtime.exportPdf(required(options, ["file"]))
|
|
30
28
|
else if (command === "export-pptx") result = runtime.exportPptx(required(options, ["file"]))
|
|
29
|
+
else if (command === "export-png") result = runtime.exportPng(required(options, ["file"]))
|
|
31
30
|
else if (command === "design-list") result = runtime.designList()
|
|
32
31
|
else if (command === "design-read") result = runtime.designRead(options)
|
|
33
32
|
else if (command === "design-use") result = runtime.designActivate(required(options, ["name"]))
|
|
@@ -82,14 +81,13 @@ function printHelp(): void {
|
|
|
82
81
|
Usage:
|
|
83
82
|
revela mcp
|
|
84
83
|
revela doctor [--workspaceRoot <path>]
|
|
85
|
-
revela compile [--workspaceRoot <path>]
|
|
86
|
-
revela markdown-qa [--workspaceRoot <path>] [--scope touched|affected|full] [--strictness authoring|readiness|render]
|
|
87
84
|
revela deck-plan [--workspaceRoot <path>]
|
|
88
85
|
revela deck-foundation --outputPath <path> --title <title> --language <tag> [--workspaceRoot <path>] [--designName <name>] [--mode create|repair] [--overwrite true]
|
|
89
86
|
revela qa --file <path> [--workspaceRoot <path>]
|
|
90
87
|
revela review-read --file <path> [--workspaceRoot <path>] [--format json|markdown]
|
|
91
88
|
revela export-pdf --file <path> [--workspaceRoot <path>] # deck PDF, or single-page PDF fallback for non-deck HTML
|
|
92
89
|
revela export-pptx --file <path> [--workspaceRoot <path>]
|
|
90
|
+
revela export-png --file <path> [--workspaceRoot <path>] [--outputDir <path>]
|
|
93
91
|
revela design-list
|
|
94
92
|
revela design-read [--name <design>] [--section <rules|foundation|chart-rules>] [--workspaceRoot <path>]
|
|
95
93
|
revela design-use --name <design>
|
package/lib/commands/help.ts
CHANGED
|
@@ -19,7 +19,7 @@ export async function handleHelp(
|
|
|
19
19
|
`\`\`\`\n` +
|
|
20
20
|
` R E V E L A H e l p v${pkg.version}\n` +
|
|
21
21
|
`\`\`\`\n` +
|
|
22
|
-
`Turn source materials, research, and
|
|
22
|
+
`Turn source materials, research, and deck plans into trusted, traceable decision artifacts.\n\n` +
|
|
23
23
|
`**Current**\n\n` +
|
|
24
24
|
`Status: ${status}\n` +
|
|
25
25
|
`Design: \`${design}\`\n` +
|
|
@@ -27,25 +27,25 @@ export async function handleHelp(
|
|
|
27
27
|
`Run \`/revela enable\` to load Revela context without starting a workflow, or run \`/revela disable\` to pause it. Workflow commands still auto-enable Revela.\n\n` +
|
|
28
28
|
`---\n\n` +
|
|
29
29
|
`**Workflow**\n\n` +
|
|
30
|
-
`1. \`init\` — discover
|
|
31
|
-
`2. \`research\` —
|
|
32
|
-
`3. \`
|
|
33
|
-
`4. \`make\` — generate deck
|
|
34
|
-
`5. \`review\` — comment on
|
|
35
|
-
`6. \`export\` — export deck artifacts to PDF or
|
|
30
|
+
`1. \`init\` — discover and review local source materials\n` +
|
|
31
|
+
`2. \`research\` — save source-linked findings for the deck objective\n` +
|
|
32
|
+
`3. \`plan --deck\` — create deck-plan/ from materials, research, and user intent\n` +
|
|
33
|
+
`4. \`make --deck\` — generate HTML deck from deck-plan/\n` +
|
|
34
|
+
`5. \`review --deck\` — QA and comment on rendered deck artifacts\n` +
|
|
35
|
+
`6. \`export\` — export deck artifacts to PDF, PPTX, or PNG\n\n` +
|
|
36
36
|
`---\n\n` +
|
|
37
37
|
`**Commands**\n\n` +
|
|
38
38
|
`\`/revela\` — show REVELA help\n` +
|
|
39
39
|
`\`/revela enable\` — enable Revela prompt/context without starting a workflow\n` +
|
|
40
40
|
`\`/revela disable\` — disable Revela prompt/context for this session\n` +
|
|
41
|
-
`\`/revela init\` —
|
|
42
|
-
`\`/revela research\` — research
|
|
43
|
-
`\`/revela
|
|
44
|
-
`\`/revela make --deck\` — make a deck from
|
|
45
|
-
`\`/revela
|
|
46
|
-
`\`/revela review --deck\` — open deck reading, insight, and comment workspace\n` +
|
|
41
|
+
`\`/revela init\` — discover local sources, extract materials, and capture deck intent\n` +
|
|
42
|
+
`\`/revela research\` — research and save source-linked deck findings\n` +
|
|
43
|
+
`\`/revela plan --deck\` — create or update deck-plan/ from materials and research\n` +
|
|
44
|
+
`\`/revela make --deck\` — make a deck from deck-plan/\n` +
|
|
45
|
+
`\`/revela review --deck\` — open deck QA and comment workspace\n` +
|
|
47
46
|
`\`/revela export --deck pdf [file.html]\` — export HTML deck to PDF\n` +
|
|
48
47
|
`\`/revela export --deck pptx [file.html] [--notes]\` — export HTML deck to PPTX\n` +
|
|
48
|
+
`\`/revela export --deck png [file.html]\` — export HTML deck to per-slide PNG files\n` +
|
|
49
49
|
`\`/revela design\` — list installed designs\n` +
|
|
50
50
|
`\`/revela design --use <name>\` — activate a design\n` +
|
|
51
51
|
`\`/revela design --preview [name]\` — open a design preview in browser\n` +
|
package/lib/commands/init.ts
CHANGED
|
@@ -7,6 +7,30 @@ export function buildInitPrompt({
|
|
|
7
7
|
exists: boolean
|
|
8
8
|
workspaceRoot?: string
|
|
9
9
|
}): string {
|
|
10
|
+
return `Start Revela deck-first workspace intake.
|
|
11
|
+
|
|
12
|
+
Goal:
|
|
13
|
+
- Discover local source materials and prepare them for deck planning.
|
|
14
|
+
- Do not create or update revela-narrative/.
|
|
15
|
+
- Treat local files, extraction read views, material reviews, saved research, assets, deck-plan.md, and decks/*.html as the product workspace.
|
|
16
|
+
- End with a concise intake report and the next command: /revela research when external support is needed, or /revela plan --deck when enough inputs exist.
|
|
17
|
+
|
|
18
|
+
Current state:
|
|
19
|
+
- Legacy/cache state exists: ${exists ? "yes" : "no"}.
|
|
20
|
+
${workspaceRoot ? `- Current workspace root: \`${workspaceRoot}\`` : ""}
|
|
21
|
+
|
|
22
|
+
Workflow:
|
|
23
|
+
1. Call revela_prepare_local_materials or the OpenCode material tools to scan at max depth 2 and extract Office/PDF sources when supported.
|
|
24
|
+
2. Read direct text/Markdown/CSV sources and extracted read views only for relevant materials.
|
|
25
|
+
3. Record material reviews for every Office/PDF source you rely on. Use "merged", "deferred", "ignored", or "gap" decisions as intake notes only; do not create a product research-gap object.
|
|
26
|
+
4. Check material intake before final reporting and surface scanned-but-unreviewed, unsupported, failed, or text-only limitations.
|
|
27
|
+
5. Ask only high-impact missing intent questions: audience, objective, decision/action, scope, language, source priority, or whether public research is allowed.
|
|
28
|
+
|
|
29
|
+
Report:
|
|
30
|
+
- Start with "Init: completed" or "Init: needs input".
|
|
31
|
+
- Include local files found, extracted read views, material reviews recorded, source limitations, user intent captured, and next command.
|
|
32
|
+
- Do not ask for slide layout, visual style, export format, or approval during init.`
|
|
33
|
+
|
|
10
34
|
const mode = exists
|
|
11
35
|
? `A ${DECKS_STATE_FILE} file already exists as legacy/cache state. Read it first through the revela-decks tool and update it conservatively only for compatibility metadata.`
|
|
12
36
|
: `No ${DECKS_STATE_FILE} file exists yet. Keep this workspace file-native: initialize the Markdown narrative vault before writing narrative meaning and do not create ${DECKS_STATE_FILE}.`
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { resolve } from "path"
|
|
2
|
+
import { exportDeckToPng } from "../pdf/export"
|
|
3
|
+
|
|
4
|
+
export async function handlePng(
|
|
5
|
+
rawPath: string,
|
|
6
|
+
send: (text: string) => Promise<void>,
|
|
7
|
+
workspaceRoot = process.cwd(),
|
|
8
|
+
): Promise<void> {
|
|
9
|
+
const requested = rawPath.trim()
|
|
10
|
+
if (requested.split(/\s+/).filter(Boolean).length > 1) {
|
|
11
|
+
await send("Usage: `/revela export --deck png [file.html]`.")
|
|
12
|
+
return
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const file = requested || "decks/deck.html"
|
|
16
|
+
try {
|
|
17
|
+
const result = await exportDeckToPng(resolve(workspaceRoot, file))
|
|
18
|
+
await send([
|
|
19
|
+
"**PNG export complete**",
|
|
20
|
+
"",
|
|
21
|
+
`Output directory: \`${result.outputDir}\``,
|
|
22
|
+
`Slides: ${result.slideCount}`,
|
|
23
|
+
`Duration: ${result.durationMs}ms`,
|
|
24
|
+
].join("\n"))
|
|
25
|
+
} catch (e) {
|
|
26
|
+
const msg = e instanceof Error ? e.message : String(e)
|
|
27
|
+
await send(`**PNG export failed**\n\n\`\`\`\n${msg}\n\`\`\``)
|
|
28
|
+
}
|
|
29
|
+
}
|
package/lib/commands/refine.ts
CHANGED
|
@@ -18,7 +18,7 @@ export async function handleRefine(
|
|
|
18
18
|
`File: \`${result.deck.file}\`\n` +
|
|
19
19
|
`${result.stateNote}\n` +
|
|
20
20
|
`URL: ${result.url}\n\n` +
|
|
21
|
-
`Use Ctrl/Cmd-click in the browser to reference deck elements. The Comment tab sends targeted change comments
|
|
21
|
+
`Use Ctrl/Cmd-click in the browser to reference deck elements. The Comment tab sends targeted change comments and applies deck edits after artifact QA.`
|
|
22
22
|
)
|
|
23
23
|
} catch (e: any) {
|
|
24
24
|
await send(`**Review failed:** ${e.message || String(e)}`)
|
package/lib/commands/research.ts
CHANGED
|
@@ -7,6 +7,30 @@ export function buildResearchPrompt({
|
|
|
7
7
|
exists: boolean
|
|
8
8
|
workspaceRoot?: string
|
|
9
9
|
}): string {
|
|
10
|
+
return `Run Revela deck-first research.
|
|
11
|
+
|
|
12
|
+
Goal:
|
|
13
|
+
- Gather source-linked findings that help the user's deck objective, current material reviews, existing research files, and deck-plan unresolved inputs.
|
|
14
|
+
- Save useful findings under researches/{topic}/{filename}.md.
|
|
15
|
+
- Do not create, bind, compile, or require revela-narrative/.
|
|
16
|
+
- Do not use canonical evidence binding, narrative research targets, Story, or research-gap lifecycle concepts.
|
|
17
|
+
|
|
18
|
+
Current state:
|
|
19
|
+
- Legacy/cache state exists: ${exists ? "yes" : "no"}.
|
|
20
|
+
${workspaceRoot ? `- Current workspace root: \`${workspaceRoot}\`` : ""}
|
|
21
|
+
|
|
22
|
+
Workflow:
|
|
23
|
+
1. Inspect material intake registry/check output, material review files, existing researches/**/*.md, and deck-plan.md when present.
|
|
24
|
+
2. Identify the smallest research tasks needed for the deck: missing market facts, benchmarks, examples, source quotes, images/logos/screenshots, or caveats.
|
|
25
|
+
3. Use external research only for public facts or user-authorized questions. Do not invent URLs, quotes, page references, numbers, or licenses.
|
|
26
|
+
4. Save every useful finding with source URLs/paths, quote/snippet, what it supports, what it does not support, caveat, date checked, and optional image leads.
|
|
27
|
+
5. If a finding is only context, label it as context. Do not promote it to proof.
|
|
28
|
+
|
|
29
|
+
Report:
|
|
30
|
+
- Start with "Research: completed".
|
|
31
|
+
- List research tasks addressed, saved findings paths, source limitations, unresolved inputs, and whether /revela plan --deck can proceed.
|
|
32
|
+
- If no useful findings were saved, state exactly what source type is needed next.`
|
|
33
|
+
|
|
10
34
|
const state = exists
|
|
11
35
|
? `${DECKS_STATE_FILE} exists. Read it through the revela-decks tool before researching.`
|
|
12
36
|
: `${DECKS_STATE_FILE} does not exist yet. Do not start broad internet research; initialize the workspace first with /revela init unless the user supplied a specific research question in chat.`
|