@cyber-dash-tech/revela 0.18.7 → 0.18.9

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,7 +2,7 @@
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-716%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-723%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="560" />
@@ -34,7 +34,7 @@ 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.18.7 mcp` to start the MCP server.
37
+ - Your environment must be able to run `npx`; Revela uses `npx -y @cyber-dash-tech/revela@0.18.9 mcp` to start the MCP server.
38
38
  - For interactive Review Apply actions, `codex exec` must also work because the Review UI uses it after saved comments are applied.
39
39
 
40
40
  Optional preflight:
@@ -55,17 +55,17 @@ 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.18.7
58
+ codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.18.9
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.18.7 mcp` so npm can fetch the published package and its dependencies.
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.9 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
 
66
66
  Start a new Codex thread after installing so Codex loads the Revela skills, MCP tools, and hooks.
67
67
 
68
- Codex uses seven Revela skills: `revela-helper` for status and active design/domain, `revela-design` for custom design creation/validation/activation, `revela-domain` for custom narrative domain creation/validation/activation, `revela-research` for local and web research saved under `researches/` plus the design-aware `deck-plan.md` handoff, `revela-make-deck` for generating `decks/*.html` from an existing plan, `revela-review` for the Review UI, and `revela-export` for PDF/PPTX/PNG.
68
+ Codex uses nine Revela skills: `revela` for routing the next workflow step, `revela-spec` for writing root-level `spec.md`, `revela-helper` for status and active design/domain, `revela-design` for custom design creation/validation/activation, `revela-domain` for custom narrative domain creation/validation/activation, `revela-research` for local and web research saved under `researches/` plus the design-aware `deck-plan.md` handoff, `revela-make-deck` for generating `decks/*.html` from an existing plan, `revela-review` for the Review UI, and `revela-export` for PDF/PPTX/PNG.
69
69
 
70
70
  For release-aligned local validation, run `bun run smoke:mcp-pack`. It packs the current checkout to a temporary npm tarball and starts the MCP server through `npx`, matching the published Codex launcher path without requiring a registry publish.
71
71
 
package/README.zh-CN.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](README.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-716%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-723%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="560" />
@@ -34,7 +34,7 @@ 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.18.7 mcp` 启动 MCP server。
37
+ - 环境中需要可以执行 `npx`;Revela 会用 `npx -y @cyber-dash-tech/revela@0.18.9 mcp` 启动 MCP server。
38
38
  - 如果使用 Review UI 的 Apply,需要 `codex exec` 可用;评论会先保存,点击 Apply 后才执行修复。
39
39
 
40
40
  可选的安装前检查:
@@ -55,17 +55,17 @@ 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.18.7
58
+ codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.18.9
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.18.7 mcp`,由 npm 获取已发布 package 及其 dependencies。
62
+ Git marketplace 安装的是 Codex plugin 壳、skills、hooks 和 MCP 配置。Codex 第一次启动 Revela MCP server 时,会运行 `npx -y @cyber-dash-tech/revela@0.18.9 mcp`,由 npm 获取已发布 package 及其 dependencies。
63
63
 
64
64
  不需要在 Codex marketplace clone 里运行 `bun install`。
65
65
 
66
66
  安装后开启一个新的 Codex thread,让 Codex 加载 Revela 的 skills、MCP tools 和 hooks。
67
67
 
68
- Codex 使用七个 Revela skills:`revela-helper` 查看状态和 active design/domain,`revela-design` 创建、验证、激活 custom design,`revela-domain` 创建、验证、激活 custom narrative domain,`revela-research` 调研本地与网络资料、保存到 `researches/`,并产出 design-aware `deck-plan.md` handoff;`revela-make-deck` 基于已有 plan 生成 `decks/*.html`,`revela-review` 打开 Review UI,`revela-export` 导出 PDF/PPTX/PNG。
68
+ Codex 使用九个 Revela skills:`revela` 路由下一步 workflow,`revela-spec` 产出根目录 `spec.md`,`revela-helper` 查看状态和 active design/domain,`revela-design` 创建、验证、激活 custom design,`revela-domain` 创建、验证、激活 custom narrative domain,`revela-research` 调研本地与网络资料、保存到 `researches/`,并产出 design-aware `deck-plan.md` handoff;`revela-make-deck` 基于已有 plan 生成 `decks/*.html`,`revela-review` 打开 Review UI,`revela-export` 导出 PDF/PPTX/PNG。
69
69
 
70
70
  如果要按发布路径做本地验证,运行 `bun run smoke:mcp-pack`。它会把当前 checkout 打成临时 npm tarball,再通过 `npx` 启动 MCP server,不需要先发布到 registry。
71
71
 
@@ -109,40 +109,81 @@ Use **\`revela-research-save\`** to write ONE file with all your findings.
109
109
 
110
110
  - \`topic\`: kebab-case topic key shared across all agents for this presentation
111
111
  - \`filename\`: your axis name (e.g. \`market-data\`, \`catl-profile\`, \`tech-trends\`)
112
- - \`content\`: structured findings using the four sections below
112
+ - \`content\`: structured findings using the block types below
113
113
  - \`sources\`: list of all URLs and filenames used
114
114
 
115
115
  The primary agent will map your findings into \`DECKS.json\` slide-level evidence.
116
116
  Preserve compact source trace so it can do that without rediscovering sources.
117
+ For the current deck-first workflow, structure findings for finding-level deck-plan source links and later artifact planning.
117
118
 
118
119
  ### Findings file format
119
120
 
120
- Use these four sections omit any that are empty:
121
+ Use stable blocks. Omit empty optional fields:
121
122
 
122
123
  \`\`\`markdown
123
- ## Data
124
- - {stat or finding} [Source: {url or filename}; Location: {page/slide/sheet/section if known}; Quote: "{short exact snippet if available}"; Caveat: {scope/uncertainty if relevant}]
125
- - {stat or finding} [Source: {url or filename}; Location: {page/slide/sheet/section if known}; Quote: "{short exact snippet if available}"; Caveat: {scope/uncertainty if relevant}]
126
- (5–10 items, most argument-worthy only)
127
-
128
- ## Cases
129
- - **{Company/Entity}**: {1–2 sentence profile with key metrics} [Source: {url or filename}; Location: {page/slide/sheet/section if known}; Caveat: {scope/uncertainty if relevant}]
130
- (2–4 entries max)
131
-
132
- ## Images
133
- - {Description}: {url} | Alt: {brief alt text} | Use: logo|screenshot|portrait
134
- (only if found — do NOT fabricate URLs)
124
+ ## Finding: <stable-id>
125
+
126
+ Source: {source name and publication/check date when known}
127
+ URL: {url when available}
128
+ Location: {page/slide/sheet/section if known}
129
+ Quote/Snippet: "{short exact snippet if available, or explicit note that no exact quote is available}"
130
+ Supports: {narrow support scope or intended slide/source context}
131
+ Evidence boundary: {internal support limit, unsupported scope, or uncertainty; not default deck copy}
132
+ Strength: {strong|directional|weak|context-only}
133
+ Deck use: {where this belongs in deck planning}
134
+ Display note: {optional short audience-facing scope note for captions/source notes}
135
+
136
+ ## Synthesis: <stable-id>
137
+
138
+ Question answered: {research question this synthesis resolves}
139
+ Basis: {finding ids, source files, or URLs used}
140
+ Interpretation: {what the evidence means when read together}
141
+ So what: {why this matters for the audience or decision}
142
+ Decision implication: {what should change in the recommendation, story, or slide argument}
143
+ Confidence: {high|medium|low}
144
+ Alternative reading: {plausible competing interpretation or contradiction}
145
+ Evidence boundary: {internal guardrail; what this synthesis must not overclaim}
146
+ Deck use: {where this belongs in deck planning}
147
+ Display note: {optional short user-facing scope note}
148
+
149
+ ## Analysis: <stable-id>
150
+
151
+ Basis: {user/LLM analytical framework or synthesis basis}
152
+ Assumptions: {key assumptions}
153
+ Deck use: {where this supports structure or methodology}
154
+ Evidence boundary: This is an analytical framework, not external source evidence.
155
+ Display note: {optional visible note}
156
+
157
+ ## Implementation Note: <stable-id>
158
+
159
+ Purpose: {render/data/API contract purpose}
160
+ Required fields: {fields, data shape, or implementation constraints}
161
+ Deck use: {where this supports rendering}
162
+ Evidence boundary: This is a rendering/data contract, not market evidence.
163
+ Display note: {optional visible note}
164
+
165
+ ## Asset Lead: <stable-id>
166
+
167
+ Source: {url or workspace path}
168
+ Description: {image/logo/screenshot/diagram description}
169
+ Alt: {brief alt text}
170
+ License/Attribution: {known status; do not invent clearance}
171
+ Deck use: {logo|screenshot|portrait|diagram|visual draft}
135
172
 
136
173
  ## Gaps
137
174
  - {topic or data point not found or insufficiently covered}
138
175
  \`\`\`
139
176
 
140
177
  Content rules:
141
- - Every data point MUST have inline source attribution: \`[Source: {url}]\` or \`[Source: AI knowledge verify]\` or \`[Source: {filename}]\`
178
+ - Every evidence finding MUST have source attribution: \`Source:\` plus \`URL:\` or workspace filename/path. Use \`Source: AI knowledge - verify\` only as a gap/context marker, not proof.
142
179
  - For workspace documents, identify the original filename and available page, slide, sheet, or section location. Do not cite only the extracted summary.
143
180
  - When extracted materials were used, include \`extractedTextPath\` or \`extractedManifestPath\` when useful for traceability.
144
181
  - Preserve compact direct snippets or quotes when available. Do not invent quotes, page references, locations, URLs, or caveats.
145
- - Include caveats or scope limitations for estimates, rankings, market sizes, forecasts, and conflicting sources.
182
+ - Use \`Evidence boundary\` for internal support limits, unsupported scope, estimates, rankings, market sizes, forecasts, and conflicting sources.
183
+ - Use \`Display note\` only for short user-facing scope text that may appear in captions or source notes.
184
+ - Do not mechanically copy \`Evidence boundary\` into deck copy; expose it only when needed to avoid a misleading audience conclusion.
185
+ - For deck goals, turn related findings into \`Synthesis\` before planning slides. Findings are evidence basis; synthesis carries Interpretation, So what, Decision implication, and Audience takeaway material.
186
+ - Do not mechanically copy finding bullets into deck copy. Use \`Synthesis\` to write slide claims and takeaways, then keep findings in source notes, captions, evidence charts, or speaker notes.
146
187
  - Preserve raw numbers and direct quotes — do not summarize prematurely
147
188
  - Use tables for comparative data when 3+ entities are compared
148
189
  - Include publication dates where available
@@ -176,8 +217,9 @@ Gaps:
176
217
  - **NEVER** fabricate image URLs — only record URLs you actually found
177
218
  - **Always** call \`revela-extract-document-materials\` for every selected workspace file before deciding which extracted materials to read next
178
219
  - **Avoid** repeated extraction or deep reading for files that are clearly irrelevant to this axis
179
- - **Always** include source attribution on every data point
180
- - **Always** preserve source trace: URL or filename, location when available, compact quote/snippet when available, and caveat/scope where relevant
220
+ - **Always** include source attribution on every evidence finding
221
+ - **Always** preserve source trace: URL or filename, location when available, compact quote/snippet when available, Evidence boundary, Strength, Deck use, and Display note where relevant
222
+ - **Always** write synthesis when multiple findings answer the same deck question or when a finding needs interpretation before it can become a slide argument
181
223
  - **Always** use tables for comparative data (more useful than bullets for presentations)
182
224
  - **Preserve** raw data — the primary agent will select what to include in slides
183
225
  - **Note** data freshness — include publication dates where available
@@ -905,6 +905,7 @@ function htmlWritingInstruction(): string {
905
905
  function slideDiagnostics(slide: DeckPlanSlideProjection, knownNodeIds?: Set<string>): DeckPlanProjectionDiagnostic[] {
906
906
  const diagnostics: DeckPlanProjectionDiagnostic[] = []
907
907
  if (!slide.structural && linksCount(slide.sourceLinks) === 0) diagnostics.push({ severity: "warning", code: "slide_source_link_missing", message: `Non-structural deck-plan slide ${slide.id} has no material, finding, asset, or URL source link.`, file: slide.path, nodeId: slide.id })
908
+ if (!slide.structural && linksCount(slide.sourceLinks) > 0) diagnostics.push(...slideSynthesisDiagnostics(slide))
908
909
  if (!slide.layout) diagnostics.push({ severity: "warning", code: "slide_layout_missing", message: `Deck-plan slide ${slide.id} is missing a layout.`, file: slide.path, nodeId: slide.id })
909
910
  if (slide.components.length === 0) diagnostics.push({ severity: "warning", code: "slide_components_missing", message: `Deck-plan slide ${slide.id} has no component names in frontmatter.`, file: slide.path, nodeId: slide.id })
910
911
  if (slide.componentPlan.length === 0) diagnostics.push({ severity: "warning", code: "slide_component_plan_missing", message: `Deck-plan slide ${slide.id} is missing structured ## Component Plan entries.`, file: slide.path, nodeId: slide.id })
@@ -921,6 +922,36 @@ function slideDiagnostics(slide: DeckPlanSlideProjection, knownNodeIds?: Set<str
921
922
  return diagnostics
922
923
  }
923
924
 
925
+ function slideSynthesisDiagnostics(slide: DeckPlanSlideProjection): DeckPlanProjectionDiagnostic[] {
926
+ const diagnostics: DeckPlanProjectionDiagnostic[] = []
927
+ const contentPlan = singleFileSubsection(slide.markdown, "Content Plan")
928
+ const missing = ["Claim", "Reasoning", "Audience takeaway"].filter((field) => !hasPlanField(contentPlan, field))
929
+ if (missing.length > 0) diagnostics.push({
930
+ severity: "warning",
931
+ code: "slide_synthesis_thin",
932
+ message: `Non-structural deck-plan slide ${slide.id} has source links but lacks synthesis fields in Content Plan: ${missing.join(", ")}.`,
933
+ file: slide.path,
934
+ nodeId: slide.id,
935
+ })
936
+ if (contentPlanContainsFindingCopy(contentPlan)) diagnostics.push({
937
+ severity: "warning",
938
+ code: "slide_finding_copy_risk",
939
+ message: `Deck-plan slide ${slide.id} appears to use raw finding text in Content Plan; use synthesis for the claim, reasoning, and audience takeaway, and keep findings as evidence/source context.`,
940
+ file: slide.path,
941
+ nodeId: slide.id,
942
+ })
943
+ return diagnostics
944
+ }
945
+
946
+ function hasPlanField(markdown: string, field: string): boolean {
947
+ const escaped = field.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
948
+ return new RegExp(`^\\s*[-*]?\\s*${escaped}\\s*:`, "im").test(markdown)
949
+ }
950
+
951
+ function contentPlanContainsFindingCopy(markdown: string): boolean {
952
+ return /^\s*[-*]?\s*(Finding|Quote\/Snippet|Source|URL)\s*:/im.test(markdown)
953
+ }
954
+
924
955
  export function deckPlanDesignDiagnostics(projection: DeckPlanProjection | undefined, inventory: { layouts: string[]; components: string[]; layoutSlots?: Record<string, string[]>; componentNesting?: Record<string, { acceptsChildren: boolean; allowedChildren?: string[] }> }): DeckPlanProjectionDiagnostic[] {
925
956
  if (!projection) return []
926
957
  const layouts = new Set(inventory.layouts)
@@ -254,6 +254,8 @@ function buildDeckPlanRequirements(narrativeHash: string): DeckPlanRequirements
254
254
  "Chapter divider or chapter TOC slides should use layout: toc with the toc component as structural wayfinding.",
255
255
  "Do not create filler slides, repeated thesis pages, or generic bridge slides.",
256
256
  "Preserve evidence ids, source trace, source limitations, unresolved inputs, and user review notes where available.",
257
+ "For non-structural slides, write Content Plan fields for Claim, Reasoning, Audience takeaway, Evidence basis, and Boundary handling before design details.",
258
+ "Use synthesized interpretation for slide arguments; do not mechanically copy raw research findings into executive body copy.",
257
259
  "Do not render internal labels such as Evidence gap:, Unsupported scope:, Caveat:, Missing Data, or Evidence Boundary in executive body copy.",
258
260
  "Do not infer plan structure from DECKS.json slides[]; it is compatibility cache only.",
259
261
  "Use sourceLinks in slide blocks for materials, findings, assets, and URLs; do not use canonical ## Relations in deck-plan files.",