@cyber-dash-tech/revela 0.17.8 → 0.17.10
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 -16
- package/README.zh-CN.md +24 -16
- package/lib/log.ts +33 -22
- package/lib/runtime/index.ts +16 -5
- package/package.json +1 -1
- package/plugins/revela/.codex-plugin/plugin.json +1 -1
- package/plugins/revela/.mcp.json +2 -5
- package/plugins/revela/mcp/runtime-resolver.ts +38 -4
- package/plugins/revela/skills/revela-make-deck/SKILL.md +18 -6
- package/plugins/revela/skills/revela-review-deck/SKILL.md +9 -0
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" />
|
|
@@ -34,11 +34,13 @@ To install globally, add the same entry to `~/.config/opencode/opencode.json`.
|
|
|
34
34
|
Install Revela through the Codex Git marketplace:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.17.
|
|
37
|
+
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.17.10
|
|
38
38
|
codex plugin add revela@revela
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
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.17.10 mcp` so npm can fetch the published package and its dependencies.
|
|
42
|
+
|
|
43
|
+
You do not need to run `bun install` inside the Codex marketplace clone.
|
|
42
44
|
|
|
43
45
|
Start a new Codex thread after installing so Codex loads the Revela skills, MCP tools, and hooks.
|
|
44
46
|
|
|
@@ -89,55 +91,61 @@ Use these prompts in Codex from the workspace that contains your source material
|
|
|
89
91
|
1. Choose the narrative domain before authoring so Revela frames the audience, decision, risks, and objections for your context.
|
|
90
92
|
|
|
91
93
|
```text
|
|
92
|
-
|
|
94
|
+
revela, use consulting as the domain.
|
|
93
95
|
```
|
|
94
96
|
|
|
95
97
|
2. Choose the deck design before rendering so generated artifacts use the intended visual language.
|
|
96
98
|
|
|
97
99
|
```text
|
|
98
|
-
|
|
100
|
+
revela, use summit as the design.
|
|
99
101
|
```
|
|
100
102
|
|
|
101
103
|
3. Initialize the narrative from local materials. Init grounds the narrative in the workspace and surfaces gaps; it does not replace the research step.
|
|
102
104
|
|
|
103
105
|
```text
|
|
104
|
-
|
|
106
|
+
revela, help me init this workspace from the local materials.
|
|
105
107
|
```
|
|
106
108
|
|
|
107
109
|
4. Research the gaps and bind only source-supported evidence into the narrative.
|
|
108
110
|
|
|
109
111
|
```text
|
|
110
|
-
|
|
112
|
+
revela, research the current gaps and bind only source-supported evidence.
|
|
111
113
|
```
|
|
112
114
|
|
|
113
115
|
5. Read Story before rendering to inspect the claim flow, evidence support, caveats, unsupported scope, and open gaps.
|
|
114
116
|
|
|
115
117
|
```text
|
|
116
|
-
|
|
118
|
+
revela, show me the Story before we make the deck.
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
6. Create or update the deck plan before generating HTML so slide order, chapter structure, evidence trace, caveats, and visual intent are explicit.
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
revela, create or update the deck plan before generating HTML.
|
|
117
125
|
```
|
|
118
126
|
|
|
119
|
-
|
|
127
|
+
7. Make an HTML deck from the current deck plan and canonical narrative.
|
|
120
128
|
|
|
121
129
|
```text
|
|
122
|
-
|
|
130
|
+
revela, make the deck from the current deck plan and narrative.
|
|
123
131
|
```
|
|
124
132
|
|
|
125
|
-
|
|
133
|
+
8. Review the generated deck for traceability, diagnostics, and targeted edits.
|
|
126
134
|
|
|
127
135
|
```text
|
|
128
|
-
|
|
136
|
+
revela, review the generated deck.
|
|
129
137
|
```
|
|
130
138
|
|
|
131
|
-
|
|
139
|
+
9. Export a PDF after deck QA passes.
|
|
132
140
|
|
|
133
141
|
```text
|
|
134
|
-
|
|
142
|
+
revela, export the deck to PDF.
|
|
135
143
|
```
|
|
136
144
|
|
|
137
|
-
|
|
145
|
+
10. Export an editable PPTX after deck QA passes.
|
|
138
146
|
|
|
139
147
|
```text
|
|
140
|
-
|
|
148
|
+
revela, export the deck to PPTX.
|
|
141
149
|
```
|
|
142
150
|
|
|
143
151
|
## Review A Deck
|
package/README.zh-CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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" />
|
|
@@ -34,11 +34,13 @@ Revela 可在 [OpenCode](https://opencode.ai) 和 Codex 中使用,把来源材
|
|
|
34
34
|
通过 Codex Git marketplace 安装 Revela:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.17.
|
|
37
|
+
codex plugin marketplace add https://github.com/cyber-dash-tech/revela --ref v0.17.10
|
|
38
38
|
codex plugin add revela@revela
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Git marketplace 安装的是 Codex plugin 壳、skills、hooks 和 MCP 配置。Codex 第一次启动 Revela MCP server 时,会运行 `npx -y @cyber-dash-tech/revela@0.17.10 mcp`,由 npm 获取已发布 package 及其 dependencies。
|
|
42
|
+
|
|
43
|
+
不需要在 Codex marketplace clone 里运行 `bun install`。
|
|
42
44
|
|
|
43
45
|
安装后开启一个新的 Codex thread,让 Codex 加载 Revela 的 skills、MCP tools 和 hooks。
|
|
44
46
|
|
|
@@ -89,55 +91,61 @@ Domain 提供特定场景的叙事 guidance,例如 consulting、product 或 in
|
|
|
89
91
|
1. 先选择 domain,让 Revela 按你的沟通场景 framing 受众、决策、风险和潜在质疑。
|
|
90
92
|
|
|
91
93
|
```text
|
|
92
|
-
|
|
94
|
+
revela,use consulting as domain.
|
|
93
95
|
```
|
|
94
96
|
|
|
95
97
|
2. 再选择 design,让后续生成的 deck 使用指定视觉风格。
|
|
96
98
|
|
|
97
99
|
```text
|
|
98
|
-
|
|
100
|
+
revela,use summit as design.
|
|
99
101
|
```
|
|
100
102
|
|
|
101
103
|
3. 从本地材料初始化 narrative。Init 负责基于 workspace 做 grounding 并暴露 gap;它不替代 research 步骤。
|
|
102
104
|
|
|
103
105
|
```text
|
|
104
|
-
|
|
106
|
+
revela,帮我 init 这个 workspace,先读本地材料。
|
|
105
107
|
```
|
|
106
108
|
|
|
107
109
|
4. 针对 gap 做 research,并且只把来源明确支持的 evidence 绑定回 narrative。
|
|
108
110
|
|
|
109
111
|
```text
|
|
110
|
-
|
|
112
|
+
revela,research 当前 gaps,只绑定 source-supported evidence。
|
|
111
113
|
```
|
|
112
114
|
|
|
113
115
|
5. 生成 deck 前先读 Story,检查 claim flow、证据支撑、caveats、unsupported scope 和 open gaps。
|
|
114
116
|
|
|
115
117
|
```text
|
|
116
|
-
|
|
118
|
+
revela,先给我看 Story,再 make deck。
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
6. 先创建或更新 deck plan,明确 slide 顺序、章节结构、evidence trace、caveats 和 visual intent,再生成 HTML。
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
revela,生成 HTML 前先 create or update deck plan。
|
|
117
125
|
```
|
|
118
126
|
|
|
119
|
-
|
|
127
|
+
7. 基于当前 deck plan 和 canonical narrative 生成 HTML deck。
|
|
120
128
|
|
|
121
129
|
```text
|
|
122
|
-
|
|
130
|
+
revela,基于当前 deck plan 和 narrative make deck。
|
|
123
131
|
```
|
|
124
132
|
|
|
125
|
-
|
|
133
|
+
8. Review 生成后的 deck,检查 traceability、diagnostics,并做定向修改。
|
|
126
134
|
|
|
127
135
|
```text
|
|
128
|
-
|
|
136
|
+
revela,review 生成好的 deck。
|
|
129
137
|
```
|
|
130
138
|
|
|
131
|
-
|
|
139
|
+
9. QA 通过后导出 PDF。
|
|
132
140
|
|
|
133
141
|
```text
|
|
134
|
-
|
|
142
|
+
revela,把 deck export 成 PDF。
|
|
135
143
|
```
|
|
136
144
|
|
|
137
|
-
|
|
145
|
+
10. QA 通过后导出可编辑 PPTX。
|
|
138
146
|
|
|
139
147
|
```text
|
|
140
|
-
|
|
148
|
+
revela,把 deck export 成 PPTX。
|
|
141
149
|
```
|
|
142
150
|
|
|
143
151
|
## Review Deck
|
package/lib/log.ts
CHANGED
|
@@ -1,28 +1,39 @@
|
|
|
1
|
-
import { Logger } from "tslog"
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
|
-
* Revela
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* Set REVELA_DEBUG=1 to enable debug-level output (minLevel 2).
|
|
10
|
-
* Default minLevel is 3 (info) in production.
|
|
2
|
+
* Revela logger facade.
|
|
3
|
+
* Keep this module dependency-free so lightweight runtime tools can load from
|
|
4
|
+
* Codex Git marketplace checkouts that do not have package dependencies
|
|
5
|
+
* installed. Logging is intentionally silent by default because Revela often
|
|
6
|
+
* runs over stdio protocols where stderr noise is user-visible.
|
|
11
7
|
*/
|
|
12
|
-
|
|
8
|
+
type LogMethod = (message?: unknown, ...args: unknown[]) => void
|
|
9
|
+
|
|
10
|
+
export interface RevelaLogger {
|
|
11
|
+
silly: LogMethod
|
|
12
|
+
trace: LogMethod
|
|
13
|
+
debug: LogMethod
|
|
14
|
+
info: LogMethod
|
|
15
|
+
warn: LogMethod
|
|
16
|
+
error: LogMethod
|
|
17
|
+
fatal: LogMethod
|
|
18
|
+
getSubLogger(input?: { name?: string }): RevelaLogger
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const noop: LogMethod = () => {}
|
|
22
|
+
|
|
23
|
+
function createNoopLogger(_name = "revela"): RevelaLogger {
|
|
24
|
+
return {
|
|
25
|
+
silly: noop,
|
|
26
|
+
trace: noop,
|
|
27
|
+
debug: noop,
|
|
28
|
+
info: noop,
|
|
29
|
+
warn: noop,
|
|
30
|
+
error: noop,
|
|
31
|
+
fatal: noop,
|
|
32
|
+
getSubLogger: (input?: { name?: string }) => createNoopLogger(input?.name),
|
|
33
|
+
}
|
|
34
|
+
}
|
|
13
35
|
|
|
14
|
-
export const log =
|
|
15
|
-
name: "revela",
|
|
16
|
-
minLevel,
|
|
17
|
-
type: "json",
|
|
18
|
-
hideLogPositionForProduction: true,
|
|
19
|
-
overwrite: {
|
|
20
|
-
transportJSON: (_logObj: unknown) => {
|
|
21
|
-
// Silenced: revela runs as an OpenCode plugin; writing to stderr
|
|
22
|
-
// pollutes the host terminal. Logs are intentionally suppressed.
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
})
|
|
36
|
+
export const log: RevelaLogger = createNoopLogger()
|
|
26
37
|
|
|
27
38
|
/**
|
|
28
39
|
* Create a child logger for a specific sub-module.
|
package/lib/runtime/index.ts
CHANGED
|
@@ -7,14 +7,10 @@ import { computeNarrativeHash } from "../narrative-state/hash"
|
|
|
7
7
|
import { compileNarrativeVault } from "../narrative-vault/compile"
|
|
8
8
|
import { runNarrativeMarkdownQa, type MarkdownQaOptions } from "../narrative-vault/markdown-qa"
|
|
9
9
|
import { readDeckPlanArtifact } from "../narrative-state/deck-plan-artifact"
|
|
10
|
-
import { exportToPdf } from "../pdf/export"
|
|
11
|
-
import { exportToPptx } from "../pptx/export"
|
|
12
|
-
import { assertExportQAPassed } from "../qa/export-gate"
|
|
13
|
-
import { formatArtifactQAReport, runArtifactQA } from "../qa/artifact"
|
|
14
10
|
import { extractDesignClasses } from "../design/designs"
|
|
15
11
|
import { recordRenderedArtifact, workspaceRelative } from "../workspace-state/rendered-artifacts"
|
|
12
|
+
import type { ReviewDeckOpenInput, ReviewDeckReadInput } from "./review"
|
|
16
13
|
export { bindResearchFindings, evaluateResearchFindings, researchSave, researchTargets } from "./research"
|
|
17
|
-
export { reviewDeckOpen, reviewDeckRead } from "./review"
|
|
18
14
|
export { storyRead } from "./story"
|
|
19
15
|
|
|
20
16
|
export interface RuntimeWorkspaceInput {
|
|
@@ -91,6 +87,7 @@ export function createDeckFoundation(input: RuntimeDeckFoundationInput) {
|
|
|
91
87
|
}
|
|
92
88
|
|
|
93
89
|
export async function runDeckQa(input: RuntimeFileInput) {
|
|
90
|
+
const { formatArtifactQAReport, runArtifactQA } = await import("../qa/artifact")
|
|
94
91
|
const workspaceRoot = root(input.workspaceRoot)
|
|
95
92
|
const filePath = resolve(workspaceRoot, input.file)
|
|
96
93
|
let vocabulary
|
|
@@ -113,6 +110,8 @@ export async function runDeckQa(input: RuntimeFileInput) {
|
|
|
113
110
|
}
|
|
114
111
|
|
|
115
112
|
export async function exportPdf(input: RuntimeFileInput) {
|
|
113
|
+
const { exportToPdf } = await import("../pdf/export")
|
|
114
|
+
const { assertExportQAPassed } = await import("../qa/export-gate")
|
|
116
115
|
const workspaceRoot = root(input.workspaceRoot)
|
|
117
116
|
const filePath = resolve(workspaceRoot, input.file)
|
|
118
117
|
await assertExportQAPassed(filePath, { workspaceRoot })
|
|
@@ -127,6 +126,8 @@ export async function exportPdf(input: RuntimeFileInput) {
|
|
|
127
126
|
}
|
|
128
127
|
|
|
129
128
|
export async function exportPptx(input: RuntimeFileInput & { speakerNotes?: Array<string | null | undefined> }) {
|
|
129
|
+
const { exportToPptx } = await import("../pptx/export")
|
|
130
|
+
const { assertExportQAPassed } = await import("../qa/export-gate")
|
|
130
131
|
const workspaceRoot = root(input.workspaceRoot)
|
|
131
132
|
const filePath = resolve(workspaceRoot, input.file)
|
|
132
133
|
await assertExportQAPassed(filePath, { workspaceRoot })
|
|
@@ -140,6 +141,16 @@ export async function exportPptx(input: RuntimeFileInput & { speakerNotes?: Arra
|
|
|
140
141
|
return { ok: true, ...result }
|
|
141
142
|
}
|
|
142
143
|
|
|
144
|
+
export async function reviewDeckRead(input: ReviewDeckReadInput) {
|
|
145
|
+
const review = await import("./review")
|
|
146
|
+
return review.reviewDeckRead(input)
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export async function reviewDeckOpen(input: ReviewDeckOpenInput) {
|
|
150
|
+
const review = await import("./review")
|
|
151
|
+
return review.reviewDeckOpen(input)
|
|
152
|
+
}
|
|
153
|
+
|
|
143
154
|
export function designList() {
|
|
144
155
|
seedBuiltinDesigns()
|
|
145
156
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "revela",
|
|
3
|
-
"version": "0.1.0+codex.
|
|
3
|
+
"version": "0.1.0+codex.20260524121829",
|
|
4
4
|
"description": "Use Revela in Codex to build trusted, traceable narrative decision artifacts from local sources and research.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "cyber-dash-tech",
|
package/plugins/revela/.mcp.json
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mcpServers": {
|
|
3
3
|
"revela": {
|
|
4
|
-
"command": "
|
|
5
|
-
"args": [
|
|
6
|
-
"--eval",
|
|
7
|
-
"const fs = await import('fs');\nconst path = await import('path');\nconst { pathToFileURL } = await import('url');\nconst candidates = [];\nconst home = process.env.HOME || '';\nconst marketplaceNames = ['revela', 'revela-local'];\ncandidates.push(path.resolve(process.cwd(), 'bin/revela.ts'));\nconst configPath = path.join(home, '.codex', 'config.toml');\nif (fs.existsSync(configPath)) {\n const text = fs.readFileSync(configPath, 'utf-8');\n const sections = text.split(/\\n(?=\\s*\\[)/);\n for (const marketplaceName of marketplaceNames) {\n const section = sections.find((item) => item.trimStart().startsWith(`[marketplaces.${marketplaceName}]`));\n const match = section?.match(/^\\s*source\\s*=\\s*\"([^\"]+)\"/m);\n if (match) candidates.push(path.join(match[1], 'bin/revela.ts'));\n }\n}\nfor (const marketplaceName of marketplaceNames) {\n const cacheRoot = path.join(home, '.codex', 'plugins', 'cache', marketplaceName, 'revela');\n if (fs.existsSync(cacheRoot)) {\n for (const version of fs.readdirSync(cacheRoot).sort().reverse()) candidates.push(path.join(cacheRoot, version, 'bin/revela.ts'));\n }\n}\nconst cli = candidates.find((candidate) => fs.existsSync(candidate));\nif (!cli) {\n console.error(`Could not locate Revela CLI. Checked: ${candidates.join(', ')}`);\n process.exit(1);\n}\nprocess.env.REVELA_CLI_COMMAND = 'mcp';\nawait import(pathToFileURL(cli).href);"
|
|
8
|
-
]
|
|
4
|
+
"command": "npx",
|
|
5
|
+
"args": ["-y", "@cyber-dash-tech/revela@0.17.10", "mcp"]
|
|
9
6
|
}
|
|
10
7
|
}
|
|
11
8
|
}
|
|
@@ -33,14 +33,27 @@ export function resolveRevelaRuntime(options: ResolveRuntimeOptions): ResolveRun
|
|
|
33
33
|
|
|
34
34
|
const marketplaceName = marketplaceNameFromPluginRoot(pluginRoot)
|
|
35
35
|
if (marketplaceName) {
|
|
36
|
-
const
|
|
36
|
+
const homeDir = options.homeDir ?? env.HOME
|
|
37
|
+
const source = marketplaceSourceFromCodexConfig(marketplaceName, homeDir)
|
|
37
38
|
if (source) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
if (looksLikeLocalPath(source)) {
|
|
40
|
+
const result = runtimeAt(source, "codex-marketplace", diagnostics)
|
|
41
|
+
if (result.ok) return result
|
|
42
|
+
diagnostics.push(`Marketplace ${marketplaceName} local source did not contain lib/runtime/index.ts: ${source}`)
|
|
43
|
+
} else {
|
|
44
|
+
diagnostics.push(`Marketplace ${marketplaceName} source is not a local path: ${source}`)
|
|
45
|
+
}
|
|
41
46
|
} else {
|
|
42
47
|
diagnostics.push(`Marketplace ${marketplaceName} was not found in Codex config.`)
|
|
43
48
|
}
|
|
49
|
+
const clone = marketplaceCloneRoot(marketplaceName, homeDir)
|
|
50
|
+
if (clone) {
|
|
51
|
+
const result = fullRepoRuntimeAt(clone, "codex-marketplace", diagnostics)
|
|
52
|
+
if (result.ok) return result
|
|
53
|
+
diagnostics.push(`Marketplace ${marketplaceName} clone did not contain a complete Revela runtime: ${clone}`)
|
|
54
|
+
} else {
|
|
55
|
+
diagnostics.push(`Marketplace ${marketplaceName} clone was not found in Codex temp marketplaces.`)
|
|
56
|
+
}
|
|
44
57
|
} else {
|
|
45
58
|
diagnostics.push(`Could not infer marketplace name from plugin root: ${pluginRoot}`)
|
|
46
59
|
}
|
|
@@ -60,6 +73,17 @@ function runtimeAt(root: string, source: ResolveRuntimeResult["source"], diagnos
|
|
|
60
73
|
: { ok: false, source: "missing", diagnostics }
|
|
61
74
|
}
|
|
62
75
|
|
|
76
|
+
function fullRepoRuntimeAt(root: string, source: ResolveRuntimeResult["source"], diagnostics: string[]): ResolveRuntimeResult {
|
|
77
|
+
const repoRoot = resolve(root)
|
|
78
|
+
const runtimePath = join(repoRoot, "lib", "runtime", "index.ts")
|
|
79
|
+
const hasRuntime = existsSync(runtimePath)
|
|
80
|
+
const hasDesigns = existsSync(join(repoRoot, "designs"))
|
|
81
|
+
const hasDomains = existsSync(join(repoRoot, "domains"))
|
|
82
|
+
return hasRuntime && hasDesigns && hasDomains
|
|
83
|
+
? { ok: true, repoRoot, runtimePath, source, diagnostics }
|
|
84
|
+
: { ok: false, source: "missing", diagnostics }
|
|
85
|
+
}
|
|
86
|
+
|
|
63
87
|
function findSourceCheckoutRoot(pluginRoot: string): string | undefined {
|
|
64
88
|
let current = resolve(pluginRoot)
|
|
65
89
|
for (let i = 0; i < 6; i++) {
|
|
@@ -95,6 +119,16 @@ function marketplaceSourceFromCodexConfig(marketplaceName: string, homeDir: stri
|
|
|
95
119
|
return match?.[1]
|
|
96
120
|
}
|
|
97
121
|
|
|
122
|
+
function marketplaceCloneRoot(marketplaceName: string, homeDir: string | undefined): string | undefined {
|
|
123
|
+
if (!homeDir) return undefined
|
|
124
|
+
const candidate = join(homeDir, ".codex", ".tmp", "marketplaces", marketplaceName)
|
|
125
|
+
return existsSync(candidate) ? candidate : undefined
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function looksLikeLocalPath(source: string): boolean {
|
|
129
|
+
return !/^[a-z][a-z0-9+.-]*:\/\//i.test(source)
|
|
130
|
+
}
|
|
131
|
+
|
|
98
132
|
function sectionBody(text: string, sectionName: string): string | undefined {
|
|
99
133
|
const lines = text.split(/\r?\n/)
|
|
100
134
|
const header = `[${sectionName}]`
|
|
@@ -18,12 +18,24 @@ Use this skill when the user asks to make, generate, or update a Revela deck.
|
|
|
18
18
|
|
|
19
19
|
1. Call `revela_compile_narrative` and `revela_markdown_qa`.
|
|
20
20
|
2. Report narrative and Markdown diagnostics, but treat only malformed/unsafe files and technical artifact validity as hard blockers.
|
|
21
|
-
3. Call `revela_read_deck_plan
|
|
22
|
-
4.
|
|
23
|
-
5.
|
|
24
|
-
6.
|
|
25
|
-
7.
|
|
26
|
-
8.
|
|
21
|
+
3. Call `revela_read_deck_plan` as the required deck-plan preflight before any HTML generation.
|
|
22
|
+
4. If `deck-plan/` is missing or incomplete, author or repair `deck-plan/index.md` and `deck-plan/slides/*.md` before calling `revela_create_deck_foundation`.
|
|
23
|
+
5. Report deck-plan diagnostics before artifact generation, including stale narrative hashes, missing slide projections, missing evidence trace, caveats, or malformed plan files.
|
|
24
|
+
6. Do not start HTML generation from narrative alone unless the user explicitly asks for a throwaway diagnostic smoke deck.
|
|
25
|
+
7. For new HTML files, call `revela_create_deck_foundation`.
|
|
26
|
+
8. Read active design guidance with `revela_design_list` and `revela_design_read` when choosing layouts/components. If the user asks to switch designs persistently, call `revela_design_activate`; if they ask for a one-off design, read that design by name and pass `designName` to `revela_create_deck_foundation`.
|
|
27
|
+
9. Patch slides into the foundation between Revela slide markers. Preserve positive 1-based `data-slide-index` values.
|
|
28
|
+
10. Generate chapter by chapter. Keep the HTML valid after each write.
|
|
29
|
+
11. After every HTML write, call `revela_run_deck_qa` and repair hard errors before review or export.
|
|
30
|
+
|
|
31
|
+
## Generated Visual Assets
|
|
32
|
+
|
|
33
|
+
- Codex may use the `imagegen` skill for deck-level visual assets when a slide's visual intent calls for an image or diagram and no suitable workspace/source asset exists.
|
|
34
|
+
- Prefer `imagegen` for flow diagrams, framework diagrams, process visuals, system relationship maps, journey maps, before/after schematics, conceptual illustrations, abstract heroes, chapter dividers, background textures, non-evidence metaphor visuals, and visual drafts.
|
|
35
|
+
- Do not use generated images for source evidence, factual screenshots, real people, real places, real products, logos, data charts, tables, or visuals that need verifiable factual accuracy.
|
|
36
|
+
- If the visual needs exact editable text, precise data, axes, code, tables, or strict structure, build it with HTML/CSS, ECharts, or `data-table` instead of `imagegen`.
|
|
37
|
+
- Generated images are artifact-level visuals only. Do not treat them as evidence, source materials, quote support, or factual proof.
|
|
38
|
+
- If a generated image is referenced by deck HTML, move or copy the final asset into the workspace, preferably under `assets/<topic>/media/` or the project's existing asset directory. Deck HTML must reference a workspace-relative local path, never Codex's default generated-image path.
|
|
27
39
|
|
|
28
40
|
## QA Repair Loop
|
|
29
41
|
|
|
@@ -19,6 +19,15 @@ Use this skill when the user asks to review, inspect, diagnose, or refine a gene
|
|
|
19
19
|
8. Separate technical blockers from narrative/evidence diagnostics.
|
|
20
20
|
9. Pure visual/layout/export fixes may patch artifacts directly when the user asks for a change. Meaning changes must update `revela-narrative/` first.
|
|
21
21
|
|
|
22
|
+
## Generated Visual Assets
|
|
23
|
+
|
|
24
|
+
- For Review Comment or Apply Fix requests such as adding an image, replacing a cover visual, creating a concept illustration, making a media block visual, or turning a slide idea into a flow/framework diagram, Codex may use the `imagegen` skill.
|
|
25
|
+
- Prefer `imagegen` for flow diagrams, framework diagrams, process visuals, system relationship maps, journey maps, before/after schematics, conceptual illustrations, abstract heroes, chapter dividers, background textures, non-evidence metaphor visuals, and visual drafts.
|
|
26
|
+
- Do not use generated images for source evidence, factual screenshots, real people, real places, real products, logos, data charts, tables, or visuals that need verifiable factual accuracy. Use workspace/source assets instead, or report the missing asset.
|
|
27
|
+
- If the visual needs exact editable text, precise data, axes, code, tables, or strict structure, patch the deck with HTML/CSS, ECharts, or `data-table` instead of `imagegen`.
|
|
28
|
+
- Generated images are artifact-level visual patches only. Do not add them to evidence, source materials, narrative support, or factual trace.
|
|
29
|
+
- If a generated image is referenced by deck HTML, move or copy the final asset into the workspace, preferably under `assets/<topic>/media/` or the project's existing asset directory. Deck HTML must reference a workspace-relative local path, never Codex's default generated-image path.
|
|
30
|
+
|
|
22
31
|
## QA Notes
|
|
23
32
|
|
|
24
33
|
- `revela_review_deck_read` is read-only: it must not mutate deck HTML, `revela-narrative/`, `deck-plan/`, assets, or compatibility state.
|