@cyber-dash-tech/revela 0.18.6 → 0.18.8

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-709%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-722%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.6 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.8 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.6
58
+ codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.18.8
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.6 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.8 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 five Revela skills: `revela-helper` for status and active design/domain, `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-709%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-722%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.6 mcp` 启动 MCP server。
37
+ - 环境中需要可以执行 `npx`;Revela 会用 `npx -y @cyber-dash-tech/revela@0.18.8 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.6
58
+ codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.18.8
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.6 mcp`,由 npm 获取已发布 package 及其 dependencies。
62
+ Git marketplace 安装的是 Codex plugin 壳、skills、hooks 和 MCP 配置。Codex 第一次启动 Revela MCP server 时,会运行 `npx -y @cyber-dash-tech/revela@0.18.8 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-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
 
@@ -838,6 +838,25 @@ Every slot accepts 1 or more components, but the layout should preserve a synthe
838
838
  - **Dark background variant.** Set CSS variable overrides (`--text-primary` etc.) on `.stacked-grid` to cascade into both slots automatically.
839
839
  <!-- @layout:stacked:end -->
840
840
 
841
+ <!-- @layout:toc:start qa=false -->
842
+ #### TOC
843
+
844
+ Editorial wayfinding layout for a table of contents, agenda, section map, or chapter divider. Use with the `toc` component as the primary structure so Monet keeps its print-like chapter list and page-number rhythm. Do not use this as a general two-column narrative layout, and do not replace the TOC structure with a `text-panel`.
845
+
846
+ Structural intent:
847
+ - main slot: one `toc` component.
848
+
849
+ ```html
850
+ <section class="slide" slide-qa="false" data-slide-index="N">
851
+ <div class="slide-canvas">
852
+ <div class="page" style="padding:0;overflow:hidden;">
853
+ <!-- [slot: main] — use one toc component -->
854
+ </div>
855
+ </div>
856
+ </section>
857
+ ```
858
+ <!-- @layout:toc:end -->
859
+
841
860
  <!-- @design:layouts:end -->
842
861
 
843
862
 
@@ -422,6 +422,25 @@ Two-row layout for a compact header/summary above a larger evidence, chart, or f
422
422
  ```
423
423
  <!-- @layout:stacked:end -->
424
424
 
425
+ <!-- @layout:toc:start qa=false -->
426
+ #### TOC
427
+
428
+ Structural wayfinding layout for a table of contents, agenda, section map, or chapter divider. Use with the `toc` component as the primary structure. Do not use this as a general two-column narrative layout, and do not replace the TOC structure with a `text-panel`.
429
+
430
+ Structural intent:
431
+ - main slot: one `toc` component.
432
+
433
+ ```html
434
+ <section class="slide" slide-qa="false" data-slide-index="N">
435
+ <div class="slide-canvas">
436
+ <div class="page" style="padding:0;">
437
+ <!-- [slot: main] — use one toc component -->
438
+ </div>
439
+ </div>
440
+ </section>
441
+ ```
442
+ <!-- @layout:toc:end -->
443
+
425
444
  <!-- @design:layouts:end -->
426
445
 
427
446
  <!-- @design:components:start -->
@@ -801,6 +801,25 @@ Every slot accepts 1 or more components. The LLM decides what each slot contains
801
801
  - **Dark background variant.** Set CSS variable overrides (`--text-primary` etc.) on `.stacked-grid` to cascade into both slots automatically.
802
802
  <!-- @layout:stacked:end -->
803
803
 
804
+ <!-- @layout:toc:start qa=false -->
805
+ #### TOC
806
+
807
+ Structural wayfinding layout for a table of contents, agenda, section map, or chapter divider. Use with the `toc` component as the primary structure so Summit can keep its wide editorial spacing, understated rules, and section rhythm. Do not use this as a general two-column narrative layout, and do not replace the TOC structure with a `text-panel`.
808
+
809
+ Structural intent:
810
+ - main slot: one `toc` component.
811
+
812
+ ```html
813
+ <section class="slide" slide-qa="false" data-slide-index="N">
814
+ <div class="slide-canvas">
815
+ <div class="page" style="padding:0;overflow:hidden;">
816
+ <!-- [slot: main] — use one toc component -->
817
+ </div>
818
+ </div>
819
+ </section>
820
+ ```
821
+ <!-- @layout:toc:end -->
822
+
804
823
  <!-- @design:layouts:end -->
805
824
 
806
825
 
@@ -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
@@ -157,14 +157,26 @@ function designDirHasPackage(dir: string): boolean {
157
157
  function resolveDesignDir(nameInput?: string): string | null {
158
158
  const name = normalizeDesignName(nameInput || activeDesign())
159
159
  const userDir = join(DESIGNS_DIR, name)
160
- if (designDirHasPackage(userDir)) return userDir
161
-
162
160
  const bundledDir = join(SEED_DIR, name)
161
+ if (designDirHasPackage(userDir)) {
162
+ if (designDirHasPackage(bundledDir) && isSeededBuiltinCopy(userDir, bundledDir)) return bundledDir
163
+ return userDir
164
+ }
165
+
163
166
  if (designDirHasPackage(bundledDir)) return bundledDir
164
167
 
165
168
  return null
166
169
  }
167
170
 
171
+ function isSeededBuiltinCopy(userDir: string, bundledDir: string): boolean {
172
+ const userInfo = parseDesignFile(join(userDir, "DESIGN.md"))
173
+ const bundledInfo = parseDesignFile(join(bundledDir, "DESIGN.md"))
174
+ if (!userInfo || !bundledInfo) return false
175
+ return userInfo.author === bundledInfo.author
176
+ && userInfo.version === bundledInfo.version
177
+ && userInfo.description === bundledInfo.description
178
+ }
179
+
168
180
  function readDesignsFromDir(root: string): Map<string, DesignInfo> {
169
181
  const designs = new Map<string, DesignInfo>()
170
182
  if (!existsSync(root)) return designs
@@ -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)
@@ -251,9 +251,11 @@ function buildDeckPlanRequirements(narrativeHash: string): DeckPlanRequirements
251
251
  "Use 3-5 chapters for normal executive decks.",
252
252
  "Cover every central claim, but group related central claims into chapters instead of giving each claim its own chapter.",
253
253
  "Each substantive chapter should have framing, proof, and implication/boundary coverage.",
254
- "Chapter divider or chapter TOC slides may use the toc component as structural wayfinding.",
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.",
@@ -283,7 +285,7 @@ export function buildRenderPlanContract(deck: DeckSpec, chapters: DeckPlanChapte
283
285
  renderRules: [
284
286
  "Do not infer deck structure, slide count, or chapter substance from DECKS.json slides[].",
285
287
  "Use the compileDeckPlan planning packet plus deck-plan.md as the render-plan contract.",
286
- "Render chapter divider slides with the toc component when slideKind is chapter-divider.",
288
+ "Render chapter divider slides with layout: toc and the toc component when slideKind is chapter-divider.",
287
289
  "Chapter divider and global TOC slides are structural wayfinding and do not count toward central-claim substance.",
288
290
  "Each central claim chapter needs non-structural framing, proof, and implication/boundary slides unless the current deck-plan projection explicitly says otherwise.",
289
291
  `Generate HTML in chapter-bounded batches of at most ${MAX_HTML_SLIDES_PER_BATCH} slides, preserving valid HTML and already-written slides after every batch.`,
@@ -470,7 +472,7 @@ function tocSlide(index: number, chapters: DeckPlanChapter[]): SlideSpec {
470
472
  narrativeRole: "context",
471
473
  layout: "toc",
472
474
  qa: false,
473
- components: ["toc", "text-panel"],
475
+ components: ["toc"],
474
476
  content: {
475
477
  headline: "How the decision story is organized",
476
478
  bullets: chapters.map((chapter) => chapter.title),
@@ -491,7 +493,7 @@ function chapterDividerSlide(index: number, chapters: DeckPlanChapter[], chapter
491
493
  narrativeRole: "context",
492
494
  layout: "toc",
493
495
  qa: false,
494
- components: ["toc", "text-panel"],
496
+ components: ["toc"],
495
497
  claimIds: chapter.sourceClaimId ? [chapter.sourceClaimId] : [],
496
498
  claimRefs: chapter.sourceClaimId ? [{ claimId: chapter.sourceClaimId, role: "supporting", note: "Structural chapter divider; not counted as claim proof." }] : [],
497
499
  evidenceBindingIds: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyber-dash-tech/revela",
3
- "version": "0.18.6",
3
+ "version": "0.18.8",
4
4
  "description": "OpenCode plugin for trusted narrative artifacts from local sources, research, and evidence",
5
5
  "type": "module",
6
6
  "main": "./index.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "revela",
3
3
  "version": "0.1.0+codex.20260524164007",
4
- "description": "Use Revela in Codex to build trusted, traceable narrative decision artifacts from local sources and research.",
4
+ "description": "Use Revela in Codex to specify, research, plan, make, review, and export trusted narrative decision artifacts.",
5
5
  "author": {
6
6
  "name": "cyber-dash-tech",
7
7
  "url": "https://github.com/cyber-dash-tech"
@@ -20,7 +20,7 @@
20
20
  "interface": {
21
21
  "displayName": "Revela",
22
22
  "shortDescription": "Trusted narrative artifacts from local sources and research.",
23
- "longDescription": "Revela helps Codex ingest local materials, save research findings, plan decks, generate HTML deck artifacts, review them, and export PDF/PPTX/PNG outputs while preserving source traceability.",
23
+ "longDescription": "Revela helps Codex route workspace workflows, capture requirements in spec.md, ingest local materials, save research findings, plan decks, generate HTML deck artifacts, review them, and export PDF/PPTX/PNG outputs while preserving source traceability.",
24
24
  "developerName": "cyber-dash-tech",
25
25
  "category": "Productivity",
26
26
  "capabilities": [
@@ -28,7 +28,8 @@
28
28
  "Write"
29
29
  ],
30
30
  "defaultPrompt": [
31
- "Use Revela to initialize this workspace.",
31
+ "Use Revela to route the next workflow step for this workspace.",
32
+ "Use Revela to write a spec.md for this deck objective.",
32
33
  "Use Revela to make a deck from the deck plan.",
33
34
  "Use Revela to review this deck artifact."
34
35
  ],
@@ -2,7 +2,7 @@
2
2
  "mcpServers": {
3
3
  "revela": {
4
4
  "command": "npx",
5
- "args": ["-y", "@cyber-dash-tech/revela@0.18.6", "mcp"]
5
+ "args": ["-y", "@cyber-dash-tech/revela@0.18.8", "mcp"]
6
6
  }
7
7
  }
8
8
  }
@@ -289,12 +289,12 @@ const tools = [
289
289
  },
290
290
  {
291
291
  name: "revela_research_save",
292
- description: "Save source-linked research findings under researches/{topic}/{filename}.md for deck-plan use.",
292
+ description: "Save source-linked research findings under researches/{topic}/{filename}.md for deck-plan use. Prefer structured blocks: ## Finding: <stable-id> for evidence, ## Synthesis: <stable-id> for interpretation across findings, ## Analysis: <stable-id> for analytical frameworks, ## Implementation Note: <stable-id> for render/data/API contracts, ## Asset Lead: <stable-id> for media leads, and ## Gaps for missing support.",
293
293
  inputSchema: objectSchema({
294
294
  workspaceRoot: stringProp("Optional workspace root."),
295
295
  topic: requiredStringProp("Research topic key."),
296
296
  filename: requiredStringProp("Findings filename without extension."),
297
- content: requiredStringProp("Structured Markdown findings content."),
297
+ content: requiredStringProp("Structured Markdown findings content. Evidence findings should preserve source, quote/snippet, support scope or Supports, Evidence boundary or unsupported scope, Strength, Deck use, and optional Display note. Synthesis entries should preserve Basis, Interpretation, So what, Decision implication, Confidence, Alternative reading, Evidence boundary, and Deck use. Analysis and Implementation Note entries may support planning or rendering but are not external factual proof."),
298
298
  sources: arrayProp("Source URLs or workspace files for YAML frontmatter."),
299
299
  }, ["topic", "filename", "content"]),
300
300
  },
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: revela
3
+ description: Route Revela requests to the right specialist workflow based on user intent and workspace state. Use when the user asks generally to use Revela, start or continue a Revela workflow, inspect next steps, or decide what to do from existing spec.md, researches/, deck-plan.md, or deck artifacts.
4
+ ---
5
+
6
+ # Revela Router
7
+
8
+ Use this skill as the main Revela entrypoint in Codex. It should inspect intent and file-native workspace state, then route to the narrow specialist skill that owns the next action.
9
+
10
+ ## Contract
11
+
12
+ - This is a non-mutating router.
13
+ - It may inspect runtime, active design/domain, and workspace artifact status.
14
+ - It must not write `spec.md`, save research findings, write `deck-plan.md`, generate deck HTML, open Review UI, or export artifacts.
15
+ - Route quickly once the next workflow is clear.
16
+
17
+ ## Required Tools
18
+
19
+ 1. Call `revela_doctor` to inspect runtime and workspace status.
20
+ 2. Call `revela_design_list` to identify the active design.
21
+ 3. Call `revela_domain_list` to identify the active domain.
22
+ 4. Read files only as needed to distinguish `spec.md`, `researches/`, `deck-plan.md`, `decks/*.html`, and `assets/` state.
23
+
24
+ ## Routing Rules
25
+
26
+ - Custom visual system, design package, layout, component, or activation request: use `revela-design`.
27
+ - Custom narrative domain, industry guidance, evidence standard, or domain activation request: use `revela-domain`.
28
+ - No `spec.md`, unclear objective, missing audience, missing output target, or missing acceptance criteria: use `revela-spec`.
29
+ - `spec.md` exists but source support, material review, or findings are missing: use `revela-research`.
30
+ - `spec.md` and sufficient findings exist but `deck-plan.md` is missing or needs normal authoring: use `revela-research` Planning Handoff.
31
+ - Valid `deck-plan.md` exists and the user asks to make, generate, render, or update a deck: use `revela-make-deck`.
32
+ - Existing deck artifact and the user asks to review, diagnose, QA, or refine: use `revela-review`.
33
+ - Existing deck artifact and the user asks for PDF, PPTX, or PNG output: use `revela-export`.
34
+ - If the next step is still ambiguous after inspection, ask the smallest missing question and recommend the safest next specialist skill.
35
+
36
+ ## Output
37
+
38
+ Report:
39
+
40
+ - Current workflow state: `spec.md`, `researches/`, `deck-plan.md`, `decks/*.html`, and `assets/`.
41
+ - Active design and active domain.
42
+ - The selected specialist skill and why.
43
+ - Any missing input that prevents routing.
44
+
45
+ ## Must Not
46
+
47
+ - Do not write or patch files.
48
+ - Do not do external web research.
49
+ - Do not create or repair `spec.md` or `deck-plan.md`.
50
+ - Do not generate, review, patch, or export deck artifacts.
51
+ - Do not install or activate designs or domains; route those requests to `revela-design` or `revela-domain`.
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: revela-design
3
+ description: Create, edit, validate, install, activate, inspect, or list Revela design packages in Codex using design MCP tools.
4
+ ---
5
+
6
+ # Revela Design
7
+
8
+ Use this skill when the user asks to create, customize, edit, validate, install, activate, inspect, list, or switch a Revela design.
9
+
10
+ ## Contract
11
+
12
+ - Designs define deck visual systems: rules, foundation, layouts, components, chart rules, and preview coverage.
13
+ - Default authoring is workspace draft first, then validate, then install only when appropriate.
14
+ - Direct user-level creation is reserved for explicit create/install-now requests.
15
+ - Do not use domain tools for visual design work.
16
+ - Do not generate deck HTML while authoring a design.
17
+
18
+ ## Required Tools
19
+
20
+ For status, inspection, activation, or selection:
21
+
22
+ 1. Call `revela_design_list`.
23
+ 2. Call `revela_design_read`, `revela_design_inventory`, `revela_design_read_layout`, or `revela_design_read_component` as needed.
24
+ 3. Call `revela_design_activate` only when the user asks to use a design.
25
+
26
+ For new or edited designs:
27
+
28
+ 1. Call `revela_design_list`.
29
+ 2. Read the requested base design or active design with `revela_design_read`.
30
+ 3. Draft complete `DESIGN.md` and complete `preview.html` content.
31
+ 4. Call `revela_design_draft_create`.
32
+ 5. Call `revela_design_draft_validate`.
33
+ 6. If validation fails, revise the draft content and repeat draft create/validate.
34
+ 7. Call `revela_design_draft_install` only after the draft validates and the user intent is to install it.
35
+ 8. Call `revela_design_activate` only when the user asks to make it active.
36
+
37
+ Use `revela_design_create` only when the user explicitly requests direct local creation outside the workspace draft workflow. Follow it with `revela_design_validate`.
38
+
39
+ ## Design Package Requirements
40
+
41
+ - Use a kebab-case design name.
42
+ - `DESIGN.md` must include valid frontmatter and complete design marker sections.
43
+ - Include design rules, foundation guidance, at least one layout, and at least one component.
44
+ - `preview.html` must use the fixed Revela preview canvas contract and visibly preview the design.
45
+ - Preview must include cover and closing examples and showcase every component.
46
+ - Preserve source inspiration and limitations explicitly; do not copy copyrighted design text or assets into the package.
47
+
48
+ ## Outputs
49
+
50
+ - Design draft path/status or installed design name.
51
+ - Validation result and any remaining diagnostics.
52
+ - Whether the design was activated.
53
+ - Next step, usually `revela-research` for planning with the design or `revela-make-deck` when a valid `deck-plan.md` already exists.
54
+
55
+ ## Must Not
56
+
57
+ - Do not write `deck-plan.md`.
58
+ - Do not write `decks/*.html`.
59
+ - Do not install or activate a design unless the user requested that outcome.
60
+ - Do not invent licenses, asset provenance, or brand permissions.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: revela-domain
3
+ description: Create, edit, validate, install, activate, inspect, or list Revela narrative domain packages in Codex using domain MCP tools.
4
+ ---
5
+
6
+ # Revela Domain
7
+
8
+ Use this skill when the user asks to create, customize, edit, validate, install, activate, inspect, list, or switch a Revela narrative domain.
9
+
10
+ ## Contract
11
+
12
+ - Domains guide narrative authoring: audience framing, decision standards, evidence expectations, objection/risk handling, and research priorities.
13
+ - Domain guidance is not evidence and must never be cited as proof for factual claims.
14
+ - Default authoring is workspace draft first, then validate, then install only when appropriate.
15
+ - Direct user-level creation is reserved for explicit create/install-now requests.
16
+ - Do not use design tools for narrative domain work.
17
+
18
+ ## Required Tools
19
+
20
+ For status, inspection, activation, or selection:
21
+
22
+ 1. Call `revela_domain_list`.
23
+ 2. Call `revela_domain_read` when the user asks for detail or comparison.
24
+ 3. Call `revela_domain_activate` only when the user asks to use a domain.
25
+
26
+ For new or edited domains:
27
+
28
+ 1. Call `revela_domain_list`.
29
+ 2. Read a relevant existing domain with `revela_domain_read` when useful as a reference.
30
+ 3. Draft complete `INDUSTRY.md` content.
31
+ 4. Call `revela_domain_draft_create`.
32
+ 5. Call `revela_domain_draft_validate`.
33
+ 6. If validation fails, revise the draft content and repeat draft create/validate.
34
+ 7. Call `revela_domain_draft_install` only after the draft validates and the user intent is to install it.
35
+ 8. Call `revela_domain_activate` only when the user asks to make it active.
36
+
37
+ Use `revela_domain_create` only when the user explicitly requests direct local creation outside the workspace draft workflow. Follow it with `revela_domain_validate`.
38
+
39
+ ## Domain Package Requirements
40
+
41
+ - Use a kebab-case domain name.
42
+ - `INDUSTRY.md` must be complete domain guidance, not a research report.
43
+ - Include audience/decision framing, claim standards, evidence expectations, objection/risk guidance, and research-gap priorities.
44
+ - Keep guidance procedural and reusable; do not include unsupported factual claims as evidence.
45
+ - Preserve source limitations explicitly when domain guidance is based on user-provided context.
46
+
47
+ ## Outputs
48
+
49
+ - Domain draft path/status or installed domain name.
50
+ - Validation result and any remaining diagnostics.
51
+ - Whether the domain was activated.
52
+ - Next step, usually `revela-research` so the active domain informs material intake and planning.
53
+
54
+ ## Must Not
55
+
56
+ - Do not write `researches/**/*.md`, `deck-plan.md`, or `decks/*.html`.
57
+ - Do not install or activate a domain unless the user requested that outcome.
58
+ - Do not treat domain guidance as source evidence.
59
+ - Do not invent citations, claims, URLs, or industry facts.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: revela-helper
3
- description: Explain Revela, inspect the current Revela workspace status, and report active design/domain guidance in Codex.
3
+ description: Explain Revela, inspect the current Revela workspace status, and report active design/domain guidance in Codex. Use the revela router for workflow routing when the user wants to start or continue work.
4
4
  ---
5
5
 
6
6
  # Revela Helper
@@ -10,8 +10,9 @@ Use this skill when the user asks what Revela is, what the current workspace sta
10
10
  ## Contract
11
11
 
12
12
  - This is a read-only helper and orientation surface.
13
+ - `revela` is the main workflow router; this skill explains status and capabilities.
13
14
  - It may inspect runtime, design, domain, and workspace artifact status.
14
- - It must not perform research, write files, create `deck-plan.md`, generate decks, open Review UI, or export artifacts.
15
+ - It must not perform research, write files, create `spec.md`, create `deck-plan.md`, generate decks, open Review UI, or export artifacts.
15
16
  - Keep the answer short and operational.
16
17
 
17
18
  ## Preconditions
@@ -21,7 +22,7 @@ Use this skill when the user asks what Revela is, what the current workspace sta
21
22
  ## Inputs
22
23
 
23
24
  - User questions about Revela, current status, active design/domain, or next workflow step.
24
- - Optional workspace context such as existing `researches/`, `deck-plan.md`, `decks/*.html`, and `assets/`.
25
+ - Optional workspace context such as existing `spec.md`, `researches/`, `deck-plan.md`, `decks/*.html`, and `assets/`.
25
26
 
26
27
  ## Required Tools
27
28
 
@@ -37,9 +38,12 @@ Report:
37
38
  - What Revela does: trusted, traceable, deck-first decision artifacts from local materials, research, data, and user intent.
38
39
  - Runtime/version status from `revela_doctor`.
39
40
  - Active design and active domain.
40
- - Workspace artifact status: whether `researches/`, `deck-plan.md`, `decks/*.html`, and `assets/` appear available.
41
+ - Workspace artifact status: whether `spec.md`, `researches/`, `deck-plan.md`, `decks/*.html`, and `assets/` appear available.
41
42
  - Recommended next step:
42
- - No `researches/`: run `revela-research`.
43
+ - Custom visual system requested: use `revela-design`.
44
+ - Custom narrative domain guidance requested: use `revela-domain`.
45
+ - No `spec.md` or unclear objective: run `revela-spec`.
46
+ - `spec.md` exists but no `researches/`: run `revela-research`.
43
47
  - Research exists but no `deck-plan.md`: continue `revela-research` to the Planning Handoff.
44
48
  - Valid `deck-plan.md` but no deck artifact: run `revela-make-deck`.
45
49
  - Existing deck artifact: run `revela-review` or `revela-export` depending on the user goal.
@@ -48,5 +52,7 @@ Report:
48
52
 
49
53
  - Do not write or patch files.
50
54
  - Do not do external web research.
55
+ - Do not generate or repair `spec.md`.
51
56
  - Do not generate or repair `deck-plan.md`.
52
57
  - Do not generate, review, patch, or export deck artifacts.
58
+ - Do not create, install, or activate designs or domains; route those requests to `revela-design` or `revela-domain`.
@@ -11,6 +11,7 @@ Use this skill when the user asks to make, generate, render, or update a Revela
11
11
 
12
12
  - Deck execution planning comes from canonical `deck-plan.md`.
13
13
  - Local materials, material reviews, `researches/`, `assets/`, and user intent provide source context.
14
+ - Slide argument copy comes from `deck-plan.md` `Claim`, `Reasoning`, and `Audience takeaway` fields when present; raw findings are evidence/source context, not default body copy.
14
15
  - Active/requested design tools define valid layouts, slots, components, nesting hints, and HTML writing rules.
15
16
  - Active/requested domain guidance may inform communication framing, but it is not source evidence.
16
17
  - Generated artifacts live under `decks/*.html`.
@@ -22,7 +23,7 @@ Use this skill when the user asks to make, generate, render, or update a Revela
22
23
 
23
24
  - Required: readable `deck-plan.md`.
24
25
  - An active or user-requested design must be readable.
25
- - If `deck-plan.md` is missing, stop and tell the user to run `revela-research` or continue `revela-research` to the Planning Handoff.
26
+ - If `deck-plan.md` is missing, stop and tell the user to run `revela` for routing, `revela-spec` for missing requirements, or `revela-research` for the Planning Handoff.
26
27
  - If `deck-plan.md` is structurally invalid, only repair technical plan diagnostics reported during render preflight.
27
28
 
28
29
  ## Inputs
@@ -61,7 +62,9 @@ Allowed plan repairs are limited to technical diagnostics from `revela_read_deck
61
62
  - Layout, slot, component, or `children` names that do not match `revela_design_inventory`.
62
63
  - Component nesting fixes such as using `box.children` when the selected component model requires nested semantic groups.
63
64
 
64
- Do not redesign the argument structure, add new slides, remove supported slides, rewrite claims, or add source links that were not reviewed or saved by `revela-research`. If normal plan authoring is needed, stop and send the user back to `revela-research` Planning Handoff.
65
+ Do not redesign the argument structure, add new slides, remove supported slides, rewrite claims, or add source links that were not reviewed or saved by `revela-research`. If normal plan authoring is needed, stop and send the user back to `revela` routing or `revela-research` Planning Handoff.
66
+
67
+ If a non-structural slide plan has source links but lacks `Claim`, `Reasoning`, or `Audience takeaway`, treat it as synthesis-thin: do not fill the gap by copying raw findings into slide body copy. Report that the plan needs `revela-research` Planning Handoff repair.
65
68
 
66
69
  ## Render Phase
67
70
 
@@ -70,14 +73,15 @@ Use this phase when the user asks to make, generate, render, or update an HTML d
70
73
  1. Call `revela_read_deck_plan` before HTML generation and follow the current projection.
71
74
  2. Read `htmlWritingBatches` before any HTML write. `revela_read_deck_plan` is QA/diagnostics, not a writer.
72
75
  3. For new HTML files, call `revela_create_deck_foundation`.
73
- 4. Generate one `htmlWritingBatches` entry at a time.
74
- 5. A single HTML write/edit/apply_patch may add or rewrite at most 5 slide sections.
75
- 6. If a chapter is longer than 5 slides, use the consecutive batch parts returned by `revela_read_deck_plan`.
76
- 7. Patch slides into the foundation between Revela slide markers.
77
- 8. Preserve positive 1-based `data-slide-index` values.
78
- 9. Every slide must have exactly one direct `.slide-canvas` child.
79
- 10. Keep the HTML valid after each write.
80
- 11. After every HTML write, call `revela_run_deck_qa` and repair hard errors before continuing, review, or export.
76
+ 4. Use the deck-plan's `Claim`, `Reasoning`, and `Audience takeaway` as the primary slide copy. Keep finding text in source notes, captions, evidence charts, or speaker notes unless the plan explicitly calls for a direct evidence quote.
77
+ 5. Generate one `htmlWritingBatches` entry at a time.
78
+ 6. A single HTML write/edit/apply_patch may add or rewrite at most 5 slide sections.
79
+ 7. If a chapter is longer than 5 slides, use the consecutive batch parts returned by `revela_read_deck_plan`.
80
+ 8. Patch slides into the foundation between Revela slide markers.
81
+ 9. Preserve positive 1-based `data-slide-index` values.
82
+ 10. Every slide must have exactly one direct `.slide-canvas` child.
83
+ 11. Keep the HTML valid after each write.
84
+ 12. After every HTML write, call `revela_run_deck_qa` and repair hard errors before continuing, review, or export.
81
85
 
82
86
  ## Outputs
83
87
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: revela-research
3
- description: Research workspace materials and public sources for a Revela deck objective, using active domain/design guidance to save source-linked findings and hand off deck-plan.md.
3
+ description: Research from an existing or emerging Revela spec.md and public/workspace sources, using active domain/design guidance to save source-linked findings and hand off deck-plan.md.
4
4
  ---
5
5
 
6
6
  # Revela Research
@@ -10,6 +10,7 @@ Use this skill when the user asks to start from a goal, inspect local materials,
10
10
  ## Contract
11
11
 
12
12
  - Research is the source-preparation workflow for Codex Revela.
13
+ - Prefer root-level `spec.md` as the demand contract. If it is missing or the objective is unclear, route to `revela-spec` unless the user gave enough intent to research immediately.
13
14
  - Research output is saved under `researches/**/*.md` and, when the user goal is a deck and materials are sufficient, handed off as `deck-plan.md`.
14
15
  - Local materials are only usable after direct text review or extracted read-view review.
15
16
  - Active/requested domain guidance informs audience, decision framing, claim standards, evidence expectations, objection/risk interpretation, and research-gap priority.
@@ -21,11 +22,12 @@ Use this skill when the user asks to start from a goal, inspect local materials,
21
22
 
22
23
  ## Preconditions
23
24
 
24
- - The user provides at least one of: objective, topic, audience, decision/action, source materials, or deck intent.
25
+ - The user provides at least one of: existing `spec.md`, objective, topic, audience, decision/action, source materials, or deck intent.
25
26
  - If intent is unclear, inspect the workspace first and ask only the smallest missing high-impact questions.
26
27
 
27
28
  ## Inputs
28
29
 
30
+ - Root-level `spec.md` when present.
29
31
  - User objective, constraints, audience, decision/action, and language preference when available.
30
32
  - Workspace materials, extracted material read views, existing `researches/**/*.md`, existing `deck-plan.md`, and `assets/`.
31
33
  - Active or user-requested domain guidance.
@@ -35,14 +37,15 @@ Use this skill when the user asks to start from a goal, inspect local materials,
35
37
 
36
38
  1. Call `revela_domain_list`.
37
39
  2. Call `revela_domain_read` for the active domain or user-requested domain.
38
- 3. Call `revela_prepare_local_materials`.
39
- 4. For Office/PDF sources, read the provided `allowedReadPath` / `read_view_path`; if missing, call `revela_extract_document_materials`.
40
- 5. Read original text/Markdown/CSV files or extracted read views before treating a material as usable.
41
- 6. Call `revela_record_material_review` for each reviewed Office/PDF source.
42
- 7. Call `revela_check_material_intake` before reporting research readiness.
43
- 8. Use external research only for public facts, user-authorized questions, or gaps not covered by local materials.
44
- 9. Save useful findings with `revela_research_save`.
45
- 10. For deck goals with sufficient materials, run Planning Handoff:
40
+ 3. Read `spec.md` when present and use it to scope material review, findings, and deck-plan handoff.
41
+ 4. Call `revela_prepare_local_materials`.
42
+ 5. For Office/PDF sources, read the provided `allowedReadPath` / `read_view_path`; if missing, call `revela_extract_document_materials`.
43
+ 6. Read original text/Markdown/CSV files or extracted read views before treating a material as usable.
44
+ 7. Call `revela_record_material_review` for each reviewed Office/PDF source.
45
+ 8. Call `revela_check_material_intake` before reporting research readiness.
46
+ 9. Use external research only for public facts, user-authorized questions, or gaps not covered by local materials or `spec.md`.
47
+ 10. Save useful findings with `revela_research_save`.
48
+ 11. For deck goals with sufficient materials, run Planning Handoff:
46
49
  - Call `revela_design_list`.
47
50
  - Call `revela_design_read` with `section: "rules"` for the active/requested design.
48
51
  - Call `revela_design_inventory`.
@@ -52,17 +55,55 @@ Use this skill when the user asks to start from a goal, inspect local materials,
52
55
 
53
56
  ## Finding Requirements
54
57
 
55
- Each saved finding should include:
58
+ Saved research should use stable, reusable Markdown blocks. Evidence findings use:
59
+
60
+ ```md
61
+ ## Finding: <stable-id>
62
+
63
+ Source: <source name and date when known>
64
+ URL: <source URL when available>
65
+ Location: <page/slide/sheet/section when known>
66
+ Quote/Snippet: <short exact quote or compact snippet; note when no exact quote is available>
67
+ Supports: <narrow support scope or intended slide/source context>
68
+ Evidence boundary: <internal guardrail; what this finding does not prove>
69
+ Strength: <strong|directional|weak|context-only>
70
+ Deck use: <where this belongs in deck planning>
71
+ Display note: <optional short user-facing scope note for captions/source notes>
72
+ ```
73
+
74
+ Use synthesis blocks to turn multiple findings into decision-relevant interpretation before deck planning:
75
+
76
+ ```md
77
+ ## Synthesis: <stable-id>
78
+
79
+ Question answered: <research question this synthesis resolves>
80
+ Basis: <finding ids, source files, or URLs used>
81
+ Interpretation: <what the evidence means when read together>
82
+ So what: <why this matters for the audience or decision>
83
+ Decision implication: <what should change in the recommendation, story, or slide argument>
84
+ Confidence: <high|medium|low>
85
+ Alternative reading: <plausible competing interpretation or contradiction>
86
+ Evidence boundary: <internal guardrail; what this synthesis must not overclaim>
87
+ Deck use: <where this belongs in deck planning>
88
+ Display note: <optional short user-facing scope note>
89
+ ```
90
+
91
+ Use `## Analysis: <stable-id>` for user/LLM analytical frameworks, `## Implementation Note: <stable-id>` for render/data/API contracts, `## Asset Lead: <stable-id>` for image/logo/media leads, and `## Gaps` for missing or insufficient source support.
92
+
93
+ Each saved evidence finding should include:
56
94
 
57
95
  - Source URL or workspace path.
58
96
  - Quote/snippet or explicit note when no exact quote is available.
59
97
  - What it supports.
60
- - What it does not support.
61
- - Caveat or limitation.
98
+ - `Evidence boundary` for internal support limits, unsupported scope, or uncertainty.
99
+ - `Deck use` for likely planning placement.
100
+ - Optional `Display note` for short audience-facing scope text.
62
101
  - Date checked.
63
102
  - Optional image/logo/screenshot leads with known source and license/attribution status.
64
103
 
65
- If a finding is context only, label it as context and do not present it as proof.
104
+ If a finding is context only, label it as context and do not present it as proof. Internal boundaries must not be mechanically copied into deck text; use `Display note` for default visible caption/source-note scope, and expose `Evidence boundary` only when needed to avoid a misleading audience conclusion.
105
+
106
+ Do not use raw findings as the default deck argument. For deck goals, synthesize findings first; findings provide evidence basis, while `Synthesis` provides the interpretation, decision implication, and audience takeaway that should drive `deck-plan.md`.
66
107
 
67
108
  ## Outputs
68
109
 
@@ -82,12 +123,17 @@ Each non-structural slide block must include:
82
123
 
83
124
  - Slide title and role when relevant.
84
125
  - `#### Content Plan`
85
- - `#### Source Links` for materials, findings, assets, URLs, and caveats.
126
+ - In `#### Content Plan`: `Claim`, `Reasoning`, `Audience takeaway`, `Evidence basis`, and `Boundary handling`.
127
+ - `#### Source Links` for materials, finding-level references when available, assets, URLs, and caveats.
86
128
  - `#### Design Plan`
87
129
  - Selected layout from design inventory.
88
130
  - Component plan using component names from design inventory.
89
131
  - Valid slots from the selected layout.
90
132
  - Valid component nesting hints, including `box.children` when multiple child components support one semantic idea.
133
+ - Base slide arguments on `Synthesis` blocks when available; use finding text as evidence/source context, not as default body copy.
134
+ - Use `Display note` for short visible caption/source-note scope.
135
+ - Keep `Evidence boundary` internal unless it is required to avoid a misleading audience conclusion.
136
+ - `Analysis` and `Implementation Note` entries may support deck structure or rendering, but must not be cited as external factual proof.
91
137
  - Unresolved inputs, source limitations, and user review notes instead of AI-authored caveat/risk judgement.
92
138
 
93
139
  Do not duplicate the same child as both nested and top-level. Do not add source links that were not reviewed or saved during research.
@@ -95,6 +141,7 @@ Do not duplicate the same child as both nested and top-level. Do not add source
95
141
  ## Must Not
96
142
 
97
143
  - Do not generate `revela-narrative/`.
144
+ - Do not write `spec.md`; route demand changes to `revela-spec`.
98
145
  - Do not write `decks/*.html`.
99
146
  - Do not bind findings into a Narrative Vault or canonical evidence graph.
100
147
  - Do not treat domain guidance as source evidence.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: revela-spec
3
+ description: Discover Revela artifact requirements and write a root-level spec.md before research or deck planning. Use when the user goal, audience, output type, constraints, acceptance criteria, or next workflow step is unclear or not yet captured.
4
+ ---
5
+
6
+ # Revela Spec
7
+
8
+ Use this skill to turn user intent and available workspace context into a concise root-level `spec.md` demand contract.
9
+
10
+ ## Contract
11
+
12
+ - `spec.md` is the canonical demand and task specification for Codex Revela.
13
+ - The spec answers what to build, for whom, why it matters, what constraints apply, and how success will be judged.
14
+ - Local materials may be inspected only to ground scope and identify available inputs.
15
+ - This skill does not own research findings, deck planning, deck rendering, Review, or Export.
16
+ - Ask the smallest missing high-impact questions after local inspection.
17
+
18
+ ## Preconditions
19
+
20
+ - The user provides at least one of: objective, topic, audience, decision/action, source material, desired artifact, or open problem.
21
+ - If no local workspace exists, write the spec from user intent and mark material gaps explicitly.
22
+
23
+ ## Inputs
24
+
25
+ - User objective, audience, decision/action, output type, language, style, constraints, and deadline when available.
26
+ - Existing workspace context: local materials, `researches/`, `deck-plan.md`, `decks/*.html`, `assets/`, active design, and active domain.
27
+
28
+ ## Workflow
29
+
30
+ 1. Call `revela_doctor` to inspect workspace state.
31
+ 2. Call `revela_domain_list` to capture active narrative guidance.
32
+ 3. Call `revela_design_list` to capture active design guidance.
33
+ 4. Call `revela_prepare_local_materials` when local material awareness is needed for scope.
34
+ 5. For Office/PDF sources, do not treat them as reviewed evidence unless extracted/read in a later `revela-research` workflow.
35
+ 6. Ask only for missing information that materially changes the spec or next step.
36
+ 7. Write or update root-level `spec.md`.
37
+ 8. End by recommending the next specialist skill:
38
+ - `revela-research` when sources or findings are needed.
39
+ - `revela-make-deck` only when a valid `deck-plan.md` already exists and the spec does not require new source work.
40
+ - `revela-design` or `revela-domain` when the spec requires custom guidance first.
41
+
42
+ ## spec.md Requirements
43
+
44
+ `spec.md` must include these sections:
45
+
46
+ - `# Spec`
47
+ - `## Objective`
48
+ - `## Audience`
49
+ - `## Decision Or Action`
50
+ - `## Output`
51
+ - `## Constraints`
52
+ - `## Available Materials`
53
+ - `## Known Gaps`
54
+ - `## Acceptance Criteria`
55
+ - `## Recommended Next Step`
56
+
57
+ Use explicit `Unknown` or `Pending user input` entries instead of inventing requirements.
58
+
59
+ ## Outputs
60
+
61
+ - Root-level `spec.md`.
62
+ - A short summary of open questions, source limitations, and the recommended next skill.
63
+
64
+ ## Must Not
65
+
66
+ - Do not write `researches/**/*.md`.
67
+ - Do not write `deck-plan.md`.
68
+ - Do not write `decks/*.html`.
69
+ - Do not bind findings into a Narrative Vault or canonical evidence graph.
70
+ - Do not treat domain guidance or unreviewed local files as source evidence.
71
+ - Do not invent requirements, constraints, citations, source paths, URLs, numbers, licenses, or acceptance criteria.
package/skill/SKILL.md CHANGED
@@ -156,8 +156,8 @@ Rules for the slide plan:
156
156
  evidence table, comparison grid, risk matrix, steps view, chart, or media brief
157
157
  into generic bullets unless the user revises the plan.
158
158
  - Chapter divider or chapter TOC slides are structural wayfinding and should
159
- usually render with the `toc` component; they must not replace framing, proof,
160
- and implication coverage in substantive chapters.
159
+ use `layout: toc` with the `toc` component; they must not replace framing,
160
+ proof, and implication coverage in substantive chapters.
161
161
  - Normal content slides should usually contain 2-4 semantic boxes/cards unless
162
162
  intentionally using a focus layout.
163
163
  - If a chapter lacks enough substance for its allocated slides, reduce the slide
@@ -183,7 +183,7 @@ For decks with 5 or more slides:
183
183
  `htmlWritingBatches`.
184
184
  - Do not mix multiple central-claim chapters in the same write.
185
185
  - Chapter divider or chapter TOC slides are allowed as structural wayfinding and
186
- should usually use the `toc` component.
186
+ should use `layout: toc` with the `toc` component.
187
187
  - Do not use placeholder, blank, repeated thesis, or generic transition slides as
188
188
  substitutes for required claim substance.
189
189
  - Treat appendix, summary, and closing slides as the final batch unless the
@@ -6,7 +6,8 @@ export default tool({
6
6
  "Save a research findings file to the workspace researches/ directory. " +
7
7
  "Creates researches/{topic}/{filename}.md with YAML frontmatter. " +
8
8
  "Each research axis gets its own file (e.g. 'market-data', 'catl-profile'). " +
9
- "Content should use ## Data / ## Cases / ## Images / ## Gaps sections.",
9
+ "Content should use structured blocks such as ## Finding: <stable-id>, ## Synthesis: <stable-id>, ## Analysis: <stable-id>, " +
10
+ "## Implementation Note: <stable-id>, ## Asset Lead: <stable-id>, and ## Gaps.",
10
11
  args: {
11
12
  topic: tool.schema
12
13
  .string()
@@ -23,10 +24,12 @@ export default tool({
23
24
  content: tool.schema
24
25
  .string()
25
26
  .describe(
26
- "Structured markdown findings. Use these sections (omit empty ones):\n" +
27
- "## Datakey stats and data points, each with [Source: url]\n" +
28
- "## Casescompany/entity profiles, 1-2 sentences each with [Source: url]\n" +
29
- "## Imagesimage URLs: '{description}: {url} | Alt: {text} | Use: logo|screenshot|portrait'\n" +
27
+ "Structured markdown findings. Prefer stable cards:\n" +
28
+ "## Finding: <stable-id> evidence with Source, URL/path, Quote/Snippet, Supports, Evidence boundary, Strength, Deck use, and optional Display note\n" +
29
+ "## Synthesis: <stable-id> interpretation across findings with Basis, Interpretation, So what, Decision implication, Confidence, Alternative reading, Evidence boundary, Deck use, and optional Display note\n" +
30
+ "## Analysis: <stable-id> LLM/user analytical frameworks; not external factual proof\n" +
31
+ "## Implementation Note: <stable-id> — render/data/API contracts; not market evidence\n" +
32
+ "## Asset Lead: <stable-id> — image/logo/media leads with source, license/attribution status, alt text, and deck use\n" +
30
33
  "## Gaps — topics not found or insufficiently covered",
31
34
  ),
32
35
  sources: tool.schema