@cyber-dash-tech/revela 0.18.16 → 0.19.1
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 +45 -31
- package/README.zh-CN.md +45 -31
- package/assets/img/lucent-01.jpg +0 -0
- package/assets/img/lucent-02.jpg +0 -0
- package/assets/img/lucent-03.jpg +0 -0
- package/assets/img/lucent-dark-01.jpg +0 -0
- package/assets/img/lucent-dark-02.jpg +0 -0
- package/assets/img/lucent-dark-03.jpg +0 -0
- package/assets/img/monet-01.jpg +0 -0
- package/assets/img/monet-02.jpg +0 -0
- package/assets/img/monet-03.jpg +0 -0
- package/assets/img/starter-01.jpg +0 -0
- package/assets/img/starter-02.jpg +0 -0
- package/assets/img/starter-03.jpg +0 -0
- package/assets/img/summit-01.jpg +0 -0
- package/assets/img/summit-02.jpg +0 -0
- package/assets/img/summit-03.jpg +0 -0
- package/designs/lucent/DESIGN.md +76 -0
- package/designs/lucent/design.css +283 -0
- package/designs/lucent-dark/DESIGN.md +278 -0
- package/designs/lucent-dark/assets/card-lens.jpg +0 -0
- package/designs/lucent-dark/assets/closing-background.jpg +0 -0
- package/designs/lucent-dark/assets/cover-background.jpg +0 -0
- package/designs/lucent-dark/assets/report-visual.jpg +0 -0
- package/designs/lucent-dark/assets/soft-texture.jpg +0 -0
- package/designs/lucent-dark/assets/toc-orb.png +0 -0
- package/designs/lucent-dark/design.css +417 -0
- package/designs/monet/DESIGN.md +14 -0
- package/designs/monet/assets/card-lens.jpg +0 -0
- package/designs/monet/assets/closing-background.jpg +0 -0
- package/designs/monet/assets/cover-background.jpg +0 -0
- package/designs/monet/assets/report-visual.jpg +0 -0
- package/designs/monet/assets/soft-texture.jpg +0 -0
- package/designs/monet/assets/toc-orb.png +0 -0
- package/designs/monet/design.css +340 -0
- package/designs/starter/DESIGN.md +14 -0
- package/designs/starter/assets/card-lens.jpg +0 -0
- package/designs/starter/assets/closing-background.jpg +0 -0
- package/designs/starter/assets/cover-background.jpg +0 -0
- package/designs/starter/assets/report-visual.jpg +0 -0
- package/designs/starter/assets/soft-texture.jpg +0 -0
- package/designs/starter/assets/toc-orb.png +0 -0
- package/designs/starter/design.css +322 -0
- package/designs/summit/DESIGN.md +18 -0
- package/designs/summit/assets/card-lens.jpg +0 -0
- package/designs/summit/assets/closing-background.jpg +0 -0
- package/designs/summit/assets/cover-background.jpg +0 -0
- package/designs/summit/assets/report-visual.jpg +0 -0
- package/designs/summit/assets/soft-texture.jpg +0 -0
- package/designs/summit/assets/toc-orb.png +0 -0
- package/designs/summit/design.css +334 -0
- package/lib/commands/designs-new.ts +13 -25
- package/lib/commands/designs-preview.ts +3 -8
- package/lib/deck-html/foundation.ts +8 -8
- package/lib/design/designs.ts +317 -14
- package/lib/narrative-state/deck-plan-artifact.ts +40 -3
- package/lib/page-templates/built-in-preview.html +373 -0
- package/lib/page-templates/contracts.ts +2 -0
- package/lib/page-templates/css.ts +2 -0
- package/lib/page-templates/foundation.ts +41 -0
- package/lib/page-templates/index.ts +6 -0
- package/lib/page-templates/registry.ts +3 -0
- package/lib/page-templates/render.ts +1202 -0
- package/lib/page-templates/templates/agenda.ts +4 -0
- package/lib/page-templates/templates/chart-takeaways.ts +4 -0
- package/lib/page-templates/templates/claim-supporting-visual.ts +4 -0
- package/lib/page-templates/templates/closing.ts +4 -0
- package/lib/page-templates/templates/cover.ts +4 -0
- package/lib/page-templates/templates/executive-summary.ts +4 -0
- package/lib/page-templates/templates/index.ts +19 -0
- package/lib/page-templates/templates/key-message-evidence.ts +4 -0
- package/lib/page-templates/templates/metric-highlight.ts +4 -0
- package/lib/page-templates/templates/problem-context.ts +4 -0
- package/lib/page-templates/templates/process-steps.ts +4 -0
- package/lib/page-templates/templates/recommendation-decision.ts +4 -0
- package/lib/page-templates/templates/risks-tradeoffs.ts +4 -0
- package/lib/page-templates/templates/section-divider.ts +4 -0
- package/lib/page-templates/templates/shared.ts +11 -0
- package/lib/page-templates/templates/table-comparison.ts +4 -0
- package/lib/page-templates/templates/timeline-roadmap.ts +4 -0
- package/lib/page-templates/vocabulary.ts +158 -0
- package/lib/prompt-builder.ts +5 -5
- package/lib/qa/artifact.ts +66 -1
- package/lib/qa/compliance.ts +5 -1
- package/lib/runtime/index.ts +99 -3
- package/package.json +7 -15
- package/plugins/revela/.codex-plugin/plugin.json +1 -1
- package/plugins/revela/hooks/revela_guard.ts +35 -0
- package/plugins/revela/hooks/revela_post_write_notice.ts +4 -4
- package/plugins/revela/mcp/revela-server.ts +104 -6
- package/plugins/revela/skills/revela/SKILL.md +1 -1
- package/plugins/revela/skills/revela-design/SKILL.md +22 -16
- package/plugins/revela/skills/revela-helper/SKILL.md +1 -1
- package/plugins/revela/skills/revela-make-deck/SKILL.md +25 -16
- package/designs/lucent/preview.html +0 -529
- package/designs/monet/preview.html +0 -190
- package/designs/starter/preview.html +0 -335
- package/designs/summit/preview.html +0 -186
|
@@ -26,6 +26,16 @@ export async function runPreWriteChecks(input: string): Promise<HookResult> {
|
|
|
26
26
|
].join("\n"))
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
const protectedDesignCssTargets = extractProtectedDesignCssPatchTargets(input)
|
|
30
|
+
if (protectedDesignCssTargets.length > 0) {
|
|
31
|
+
messages.push([
|
|
32
|
+
"Revela design CSS patches are blocked outside the design draft workflow.",
|
|
33
|
+
`Protected target(s): ${protectedDesignCssTargets.map((target) => `\`${target}\``).join(", ")}`,
|
|
34
|
+
"Create or edit designs under `.revela/drafts/designs/<name>/design.css`, then validate and install the draft.",
|
|
35
|
+
"Deck-local `decks/_revela-design/**/design.css` files are render snapshots and should be regenerated, not patched.",
|
|
36
|
+
].join("\n"))
|
|
37
|
+
}
|
|
38
|
+
|
|
29
39
|
const deckTargets = extractDeckHtmlPatchTargets(input)
|
|
30
40
|
if (deckTargets.length > 0) {
|
|
31
41
|
const pluginRoot = resolve(process.env.PLUGIN_ROOT || dirname(dirname(fileURLToPath(import.meta.url))))
|
|
@@ -74,6 +84,31 @@ export function extractNarrativeCachePatchTargets(input: string): string[] {
|
|
|
74
84
|
return [...targets].sort((a, b) => a.localeCompare(b))
|
|
75
85
|
}
|
|
76
86
|
|
|
87
|
+
export function extractProtectedDesignCssPatchTargets(input: string): string[] {
|
|
88
|
+
const targets = new Set<string>()
|
|
89
|
+
for (const patch of patchPayloads(input)) {
|
|
90
|
+
const pattern = /(?:^\*\*\* Update File: |^\*\*\* Add File: |^\*\*\* Delete File: |^\*\*\* Move to: )([^\r\n]*design\.css)\s*$/gm
|
|
91
|
+
let match: RegExpExecArray | null
|
|
92
|
+
while ((match = pattern.exec(patch))) {
|
|
93
|
+
const target = match[1].trim().replace(/\\/g, "/")
|
|
94
|
+
if (isAllowedDesignDraftCssTarget(target)) continue
|
|
95
|
+
if (isProtectedDesignCssTarget(target)) targets.add(target)
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return [...targets].sort((a, b) => a.localeCompare(b))
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function isAllowedDesignDraftCssTarget(target: string): boolean {
|
|
102
|
+
return /(^|\/)\.revela\/drafts\/designs\/[^/]+\/design\.css$/.test(target)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function isProtectedDesignCssTarget(target: string): boolean {
|
|
106
|
+
return /(^|\/)designs\/[^/]+\/design\.css$/.test(target)
|
|
107
|
+
|| /(^|\/)decks\/_revela-design\/[^/]+\/design\.css$/.test(target)
|
|
108
|
+
|| /(^|\/)_revela-design\/[^/]+\/design\.css$/.test(target)
|
|
109
|
+
|| /(^|\/)\.config\/revela\/designs\/[^/]+\/design\.css$/.test(target)
|
|
110
|
+
}
|
|
111
|
+
|
|
77
112
|
function patchPayloads(input: string): string[] {
|
|
78
113
|
try {
|
|
79
114
|
const parsed = JSON.parse(input)
|
|
@@ -71,16 +71,16 @@ function titleFromDeckHtml(absolutePath: string): string {
|
|
|
71
71
|
|
|
72
72
|
export function formatDeckWebsiteCardHandoffNotice(workspaceRoot: string, target: string): string {
|
|
73
73
|
const absolutePath = resolve(workspaceRoot, target)
|
|
74
|
-
const deckUrl = pathToFileURL(absolutePath).href
|
|
75
74
|
const title = titleFromDeckHtml(absolutePath)
|
|
75
|
+
const httpUrlTemplate = `http://127.0.0.1:<port>/${target}`
|
|
76
76
|
return [
|
|
77
77
|
"**Deck website card ready**",
|
|
78
78
|
"",
|
|
79
|
-
`Artifact QA passed for \`${target}\`.
|
|
79
|
+
`Artifact QA passed for \`${target}\`. Do not open the deck file directly. Start a read-only local static server from the workspace root, then reply with this standalone deck link so Codex renders an Open in Browser website card the user can click:`,
|
|
80
80
|
"",
|
|
81
|
-
`[${title}](${
|
|
81
|
+
`[${title}](${httpUrlTemplate})`,
|
|
82
82
|
"",
|
|
83
|
-
`
|
|
83
|
+
`Replace \`<port>\` with the actual localhost port. Keep \`file://\` only for non-Codex surfaces that allow direct local-file navigation.`,
|
|
84
84
|
].join("\n")
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -13,6 +13,13 @@ type RuntimeModule = {
|
|
|
13
13
|
readDeckPlan(input?: any): any
|
|
14
14
|
upsertDeckPlanSlide(input: any): any
|
|
15
15
|
createDeckFoundation(input: any): any
|
|
16
|
+
listPageTemplates(): any
|
|
17
|
+
renderTemplateSlide(input: any): any
|
|
18
|
+
addTemplateSlide(input: any): any
|
|
19
|
+
renderTemplateScaffold(input: any): any
|
|
20
|
+
addTemplateScaffold(input: any): any
|
|
21
|
+
pageTemplateFoundation(input: any): any
|
|
22
|
+
pageTemplateVocabulary(input: any): any
|
|
16
23
|
runDeckQa(input: any): Promise<any>
|
|
17
24
|
exportPdf(input: any): Promise<any>
|
|
18
25
|
exportPptx(input: any): Promise<any>
|
|
@@ -25,6 +32,7 @@ type RuntimeModule = {
|
|
|
25
32
|
designActivate(input: any): any
|
|
26
33
|
designCreate(input: any): any
|
|
27
34
|
designValidate(input: any): any
|
|
35
|
+
designPreview(input: any): any
|
|
28
36
|
designDraftCreate(input: any): any
|
|
29
37
|
designDraftValidate(input: any): any
|
|
30
38
|
designDraftInstall(input: any): any
|
|
@@ -94,6 +102,71 @@ const tools = [
|
|
|
94
102
|
overwrite: booleanProp("Whether create mode may overwrite an existing file."),
|
|
95
103
|
}, ["outputPath", "title", "language"]),
|
|
96
104
|
},
|
|
105
|
+
{
|
|
106
|
+
name: "revela_list_page_templates",
|
|
107
|
+
description: "List built-in Revela page templates with semantic fields, content rules, and template QA contracts.",
|
|
108
|
+
inputSchema: objectSchema({}),
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "revela_render_template_slide",
|
|
112
|
+
description: "Render one built-in page template into a stable Revela slide HTML skeleton using the active/requested design.",
|
|
113
|
+
inputSchema: objectSchema({
|
|
114
|
+
workspaceRoot: stringProp("Optional workspace root."),
|
|
115
|
+
designName: stringProp("Optional design name. Defaults to the active design."),
|
|
116
|
+
templateId: requiredStringProp("Built-in template id, such as timeline-roadmap."),
|
|
117
|
+
slideIndex: requiredNumberProp("Positive 1-based slide index."),
|
|
118
|
+
content: objectProp("Template content fields. The built-in template renderer owns the HTML skeleton."),
|
|
119
|
+
}, ["templateId", "slideIndex", "content"]),
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "revela_page_template_foundation",
|
|
123
|
+
description: "Read the built-in template foundation for custom design authoring: scaffold HTML, CSS hooks, slots, and contract notes.",
|
|
124
|
+
inputSchema: objectSchema({
|
|
125
|
+
templateId: requiredStringProp("Built-in template id, such as timeline-roadmap."),
|
|
126
|
+
}, ["templateId"]),
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: "revela_page_template_vocabulary",
|
|
130
|
+
description: "Read machine-readable classes, slots, editable regions, replaceable regions, and contract notes for one page template.",
|
|
131
|
+
inputSchema: objectSchema({
|
|
132
|
+
templateId: requiredStringProp("Built-in template id, such as timeline-roadmap."),
|
|
133
|
+
}, ["templateId"]),
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: "revela_render_template_scaffold",
|
|
137
|
+
description: "Render one built-in page template scaffold with stable editable slots using minimal seed content.",
|
|
138
|
+
inputSchema: objectSchema({
|
|
139
|
+
workspaceRoot: stringProp("Optional workspace root."),
|
|
140
|
+
designName: stringProp("Optional design name. Defaults to the active design."),
|
|
141
|
+
templateId: requiredStringProp("Built-in template id, such as timeline-roadmap."),
|
|
142
|
+
slideIndex: requiredNumberProp("Positive 1-based slide index."),
|
|
143
|
+
seed: objectProp("Optional scaffold seed fields. This is not the final authoring interface."),
|
|
144
|
+
}, ["templateId", "slideIndex"]),
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "revela_add_template_scaffold",
|
|
148
|
+
description: "Render and append one built-in page template scaffold into an existing Revela deck HTML file between slide markers.",
|
|
149
|
+
inputSchema: objectSchema({
|
|
150
|
+
workspaceRoot: stringProp("Optional workspace root."),
|
|
151
|
+
outputPath: requiredStringProp("Workspace-relative HTML deck path."),
|
|
152
|
+
designName: stringProp("Optional design name. Defaults to the active design."),
|
|
153
|
+
templateId: requiredStringProp("Built-in template id, such as timeline-roadmap."),
|
|
154
|
+
slideIndex: requiredNumberProp("Positive 1-based slide index."),
|
|
155
|
+
seed: objectProp("Optional scaffold seed fields. LLM should bounded-edit the inserted slide after scaffold creation."),
|
|
156
|
+
}, ["outputPath", "templateId", "slideIndex"]),
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: "revela_add_template_slide",
|
|
160
|
+
description: "Compatibility path: render and append one built-in page template slide from full content JSON into an existing deck HTML file.",
|
|
161
|
+
inputSchema: objectSchema({
|
|
162
|
+
workspaceRoot: stringProp("Optional workspace root."),
|
|
163
|
+
outputPath: requiredStringProp("Workspace-relative HTML deck path."),
|
|
164
|
+
designName: stringProp("Optional design name. Defaults to the active design."),
|
|
165
|
+
templateId: requiredStringProp("Built-in template id, such as timeline-roadmap."),
|
|
166
|
+
slideIndex: requiredNumberProp("Positive 1-based slide index."),
|
|
167
|
+
content: objectProp("Template content fields. Prefer scaffold-first flow for new deck creation."),
|
|
168
|
+
}, ["outputPath", "templateId", "slideIndex", "content"]),
|
|
169
|
+
},
|
|
97
170
|
{
|
|
98
171
|
name: "revela_run_deck_qa",
|
|
99
172
|
description: "Run Revela artifact QA on a generated HTML deck.",
|
|
@@ -171,15 +244,16 @@ const tools = [
|
|
|
171
244
|
},
|
|
172
245
|
{
|
|
173
246
|
name: "revela_design_create",
|
|
174
|
-
description: "Create and validate a local Revela design package from complete DESIGN.md and preview.html content.",
|
|
247
|
+
description: "Create and validate a local Revela design package from complete DESIGN.md, design.css, and optional legacy preview.html content.",
|
|
175
248
|
inputSchema: objectSchema({
|
|
176
249
|
name: requiredStringProp("Design name in kebab-case."),
|
|
177
250
|
base: stringProp("Optional base design used as structural scaffold."),
|
|
178
251
|
designMd: requiredStringProp("Complete DESIGN.md content."),
|
|
179
|
-
|
|
252
|
+
designCss: stringProp("Complete design.css content. Required for CSS-native designs; omitted only for legacy compatibility."),
|
|
253
|
+
previewHtml: stringProp("Optional legacy preview.html content. Current design previews are generated with revela_design_preview."),
|
|
180
254
|
assets: designAssetsProp(),
|
|
181
255
|
overwrite: booleanProp("Whether to replace an existing local design package. Defaults to false."),
|
|
182
|
-
}, ["name", "designMd"
|
|
256
|
+
}, ["name", "designMd"]),
|
|
183
257
|
},
|
|
184
258
|
{
|
|
185
259
|
name: "revela_design_validate",
|
|
@@ -194,10 +268,11 @@ const tools = [
|
|
|
194
268
|
name: requiredStringProp("Design name in kebab-case."),
|
|
195
269
|
base: stringProp("Optional base design used as structural scaffold."),
|
|
196
270
|
designMd: requiredStringProp("Complete DESIGN.md content."),
|
|
197
|
-
|
|
271
|
+
designCss: stringProp("Complete design.css content. Required for CSS-native designs; omitted only for legacy compatibility."),
|
|
272
|
+
previewHtml: stringProp("Optional legacy preview.html content. Current design previews are generated with revela_design_preview."),
|
|
198
273
|
assets: designAssetsProp(),
|
|
199
274
|
overwrite: booleanProp("Whether to replace an existing workspace draft. Defaults to false."),
|
|
200
|
-
}, ["name", "designMd"
|
|
275
|
+
}, ["name", "designMd"]),
|
|
201
276
|
},
|
|
202
277
|
{
|
|
203
278
|
name: "revela_design_draft_validate",
|
|
@@ -207,6 +282,15 @@ const tools = [
|
|
|
207
282
|
name: requiredStringProp("Design draft name to validate."),
|
|
208
283
|
}, ["name"]),
|
|
209
284
|
},
|
|
285
|
+
{
|
|
286
|
+
name: "revela_design_preview",
|
|
287
|
+
description: "Generate a workspace-local preview for a draft, installed, or built-in Revela design using the built-in page template preview fixture plus the design.css file.",
|
|
288
|
+
inputSchema: objectSchema({
|
|
289
|
+
workspaceRoot: stringProp("Optional workspace root."),
|
|
290
|
+
name: requiredStringProp("Design name to preview."),
|
|
291
|
+
source: enumProp(["draft", "installed", "builtin"], "Optional source. Defaults to draft when present, otherwise installed/builtin."),
|
|
292
|
+
}, ["name"]),
|
|
293
|
+
},
|
|
210
294
|
{
|
|
211
295
|
name: "revela_design_draft_install",
|
|
212
296
|
description: "Install a validated workspace-local Revela design draft into the user-level design registry.",
|
|
@@ -392,10 +476,12 @@ async function handle(req: JsonRpcRequest): Promise<any | undefined> {
|
|
|
392
476
|
bootLog("request", { id: req.id, method: req.method })
|
|
393
477
|
if (req.method === "initialize") {
|
|
394
478
|
bootLog("initialize-received", { id: req.id, protocolVersion: req.params?.protocolVersion })
|
|
479
|
+
const runtimeInfo = await runtime()
|
|
480
|
+
const doctor = runtimeInfo.doctor({})
|
|
395
481
|
return result(req.id, {
|
|
396
482
|
protocolVersion: req.params?.protocolVersion || "2024-11-05",
|
|
397
483
|
capabilities: { tools: {} },
|
|
398
|
-
serverInfo: { name: "revela", version:
|
|
484
|
+
serverInfo: { name: "revela", version: doctor.version },
|
|
399
485
|
})
|
|
400
486
|
}
|
|
401
487
|
if (req.method === "tools/list") {
|
|
@@ -421,6 +507,13 @@ async function callTool(name: string, args: any): Promise<any> {
|
|
|
421
507
|
if (name === "revela_read_deck_plan") return r.readDeckPlan(args)
|
|
422
508
|
if (name === "revela_upsert_deck_plan_slide") return r.upsertDeckPlanSlide(args)
|
|
423
509
|
if (name === "revela_create_deck_foundation") return r.createDeckFoundation(args)
|
|
510
|
+
if (name === "revela_list_page_templates") return r.listPageTemplates()
|
|
511
|
+
if (name === "revela_render_template_slide") return r.renderTemplateSlide(args)
|
|
512
|
+
if (name === "revela_add_template_slide") return r.addTemplateSlide(args)
|
|
513
|
+
if (name === "revela_page_template_foundation") return r.pageTemplateFoundation(args)
|
|
514
|
+
if (name === "revela_page_template_vocabulary") return r.pageTemplateVocabulary(args)
|
|
515
|
+
if (name === "revela_render_template_scaffold") return r.renderTemplateScaffold(args)
|
|
516
|
+
if (name === "revela_add_template_scaffold") return r.addTemplateScaffold(args)
|
|
424
517
|
if (name === "revela_run_deck_qa") return r.runDeckQa(args)
|
|
425
518
|
if (name === "revela_export_pdf") return r.exportPdf(args)
|
|
426
519
|
if (name === "revela_export_pptx") return r.exportPptx(args)
|
|
@@ -435,6 +528,7 @@ async function callTool(name: string, args: any): Promise<any> {
|
|
|
435
528
|
if (name === "revela_design_validate") return r.designValidate(args)
|
|
436
529
|
if (name === "revela_design_draft_create") return r.designDraftCreate(args)
|
|
437
530
|
if (name === "revela_design_draft_validate") return r.designDraftValidate(args)
|
|
531
|
+
if (name === "revela_design_preview") return r.designPreview(args)
|
|
438
532
|
if (name === "revela_design_draft_install") return r.designDraftInstall(args)
|
|
439
533
|
if (name === "revela_design_pack") return r.designPack(args)
|
|
440
534
|
if (name === "revela_design_install_archive") return r.designInstallArchive(args)
|
|
@@ -496,6 +590,10 @@ function arrayProp(description: string) {
|
|
|
496
590
|
return { type: "array", items: { type: "string" }, description }
|
|
497
591
|
}
|
|
498
592
|
|
|
593
|
+
function objectProp(description: string) {
|
|
594
|
+
return { type: "object", description, additionalProperties: true }
|
|
595
|
+
}
|
|
596
|
+
|
|
499
597
|
function stringOrArrayProp(description: string) {
|
|
500
598
|
return {
|
|
501
599
|
anyOf: [
|
|
@@ -29,7 +29,7 @@ Use this skill as the main Revela entrypoint in Codex. It should inspect intent
|
|
|
29
29
|
- `spec.md` exists but source support, material review, or findings are missing: use `revela-research`.
|
|
30
30
|
- `spec.md` and sufficient findings exist but `deck-plan.md` is missing or needs normal authoring: use `revela-research` Planning Handoff.
|
|
31
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, annotate, diagnose, QA, or refine: use Codex Browser's native browsing/annotation flow. If the deck was not just generated, reply with the existing deck as a website card/link and use native annotations after
|
|
32
|
+
- Existing deck artifact and the user asks to review, annotate, diagnose, QA, or refine: use Codex Browser's native browsing/annotation flow. If the deck was not just generated, start a read-only local static server from the workspace root, reply with the existing deck as a localhost website card/link, and use native annotations after the user opens it; route export requests to `revela-export`.
|
|
33
33
|
- Existing deck artifact and the user asks for PDF, PPTX, or PNG output: use `revela-export`.
|
|
34
34
|
- If the next step is still ambiguous after inspection, ask the smallest missing question and recommend the safest next specialist skill.
|
|
35
35
|
|
|
@@ -9,35 +9,39 @@ Use this skill when the user asks to create, customize, edit, validate, package,
|
|
|
9
9
|
|
|
10
10
|
## Contract
|
|
11
11
|
|
|
12
|
-
- Designs define deck visual systems: rules, foundation, layouts, components, chart rules, and
|
|
12
|
+
- Designs define deck visual systems: rules, foundation, layouts, components, chart rules, and page-template foundation styling.
|
|
13
|
+
- CSS-native designs include `design.css` as the executable visual source. `DESIGN.md` explains the design contract; `design.css` styles the stable template DOM classes.
|
|
13
14
|
- Designs should define executable visual contracts, not only mood, fonts, and palettes. Capture grid/safe-area, spacing scale, type scale, surface behavior, chart tokens, component states, and preview fixtures in the design package.
|
|
14
15
|
- Designs may include package-owned `assets/**` such as cover or closing backgrounds; design tools surface these as design elements, not source evidence.
|
|
15
16
|
- When the user uploads or provides logo, cover, closing, background, texture, brand image, or similar design material, store it inside the design package with `revela_design_draft_create.assets`; use paths under `assets/**` only.
|
|
16
|
-
-
|
|
17
|
+
- Design previews are generated from Revela's built-in page-template preview plus the draft or installed `design.css`.
|
|
17
18
|
- Default authoring is workspace draft first, then validate, then install only when appropriate.
|
|
18
19
|
- Direct user-level creation is reserved for explicit create/install-now requests.
|
|
19
20
|
- Shareable design archives are `.tar` or `.tar.gz`; install archives only from trusted local paths.
|
|
20
21
|
- Do not use domain tools for visual design work.
|
|
21
|
-
- Do not
|
|
22
|
+
- Do not write `decks/*.html` while authoring a design. Use `revela_design_preview` to generate a workspace-local design preview.
|
|
22
23
|
|
|
23
24
|
## Required Tools
|
|
24
25
|
|
|
25
26
|
For status, inspection, activation, or selection:
|
|
26
27
|
|
|
27
28
|
1. Call `revela_design_list`.
|
|
28
|
-
2. Call `revela_design_read`, `revela_design_inventory`, `revela_design_read_layout`, or `
|
|
29
|
+
2. Call `revela_design_read`, `revela_design_inventory`, `revela_design_read_layout`, `revela_design_read_component`, or `revela_page_template_foundation` as needed.
|
|
29
30
|
3. Call `revela_design_activate` only when the user asks to use a design.
|
|
30
31
|
|
|
31
32
|
For new or edited designs:
|
|
32
33
|
|
|
33
34
|
1. Call `revela_design_list`.
|
|
34
35
|
2. Read the requested base design or active design with `revela_design_read`.
|
|
35
|
-
3.
|
|
36
|
-
4. Call `
|
|
37
|
-
5.
|
|
38
|
-
6.
|
|
39
|
-
7. Call `
|
|
40
|
-
8. Call `
|
|
36
|
+
3. Call `revela_design_inventory` and inspect its `pageTemplates` summary.
|
|
37
|
+
4. Call `revela_page_template_foundation` for any built-in page templates the design should style or preview.
|
|
38
|
+
5. Draft complete `DESIGN.md` and complete `design.css` content.
|
|
39
|
+
6. Call `revela_design_draft_create` with `designCss`; when uploaded or local design material exists, pass `assets: [{ path: "assets/...", contentBase64|content|sourcePath }]` so the files are written into the draft package.
|
|
40
|
+
7. Call `revela_design_draft_validate`.
|
|
41
|
+
8. Call `revela_design_preview` for the draft, start a read-only local static server from the returned `browserHandoff.serveRoot`, and reply with the resulting localhost preview link for the user to open in Codex Browser.
|
|
42
|
+
9. If validation or preview review fails, revise the draft content and repeat draft create/validate/preview.
|
|
43
|
+
10. Call `revela_design_draft_install` only after the draft validates and the user intent is to install it.
|
|
44
|
+
11. Call `revela_design_activate` only when the user asks to make it active.
|
|
41
45
|
|
|
42
46
|
For sharing or installing design archives:
|
|
43
47
|
|
|
@@ -53,22 +57,23 @@ Use `revela_design_create` only when the user explicitly requests direct local c
|
|
|
53
57
|
|
|
54
58
|
- Use a kebab-case design name.
|
|
55
59
|
- `DESIGN.md` must include valid frontmatter and complete design marker sections.
|
|
60
|
+
- `design.css` should be present for CSS-native designs and is the only executable CSS source for package-owned template styling.
|
|
56
61
|
- Include design rules, foundation guidance, at least one layout, and at least one component.
|
|
57
62
|
- In `@design:foundation`, document the design contract: grid columns or layout rails, safe area, spacing/baseline scale, typography scale, surfaces/borders/shadows, and chart tokens when charts are supported.
|
|
63
|
+
- Use page-template foundation as the starting point for built-in template styling. Style template classes, but do not remove structural classes or `data-template-slot` semantics.
|
|
58
64
|
- Layouts must declare stable slots and use grid/flex structure as the source of alignment. Avoid one-off absolute positioning that bypasses the declared layout contract.
|
|
59
65
|
- Components should describe normal, dense, and long-copy behavior where relevant. Chart, table, media, and source-note components need stable container dimensions.
|
|
60
66
|
- Optional assets must live under `assets/**`; reference them as package-relative paths like `assets/cover-background.png`.
|
|
61
67
|
- `DESIGN.md` may reference package assets in rules, layouts, or components with `assets/...`; do not reference workspace `assets/` media manifest entries for design-owned visuals.
|
|
62
|
-
- `
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
- Preview should behave like a design test fixture: include normal content, dense content, mixed-language text where relevant, chart/table examples when supported, readable media, and source-note behavior.
|
|
68
|
+
- `revela_design_preview` must generate the visual preview; do not hand-write package `preview.html` for ordinary CSS-native design drafts.
|
|
69
|
+
- Do not open `file://` preview URLs in Codex Browser. Use the returned `browserHandoff` fields to serve the preview over `http://127.0.0.1:<port>/preview.html` and let the user click the link.
|
|
70
|
+
- If design assets are present, the generated preview should visibly use the saved `assets/...` files when the design CSS references them.
|
|
71
|
+
- Generated preview should show the built-in page templates with normal, dense, chart/table, timeline, image, and source-note-like states.
|
|
67
72
|
- Preserve source inspiration and limitations explicitly; do not copy copyrighted design text or assets into the package.
|
|
68
73
|
|
|
69
74
|
## Outputs
|
|
70
75
|
|
|
71
|
-
- Design draft path/status or installed design name.
|
|
76
|
+
- Design draft path/status, generated preview path/status, or installed design name.
|
|
72
77
|
- Archive path/status when packaging or installing a shareable design.
|
|
73
78
|
- Asset metadata surfaced by read/inventory tools when `assets/**` exists.
|
|
74
79
|
- Saved asset paths and intended uses, for example `assets/cover-background.png -> cover hero background`.
|
|
@@ -80,5 +85,6 @@ Use `revela_design_create` only when the user explicitly requests direct local c
|
|
|
80
85
|
|
|
81
86
|
- Do not write `deck-plan.md`.
|
|
82
87
|
- Do not write `decks/*.html`.
|
|
88
|
+
- Do not patch `decks/_revela-design/**/design.css`; those files are regenerated deck-local snapshots.
|
|
83
89
|
- Do not install or activate a design unless the user requested that outcome.
|
|
84
90
|
- Do not invent licenses, asset provenance, or brand permissions.
|
|
@@ -46,7 +46,7 @@ Report:
|
|
|
46
46
|
- `spec.md` exists but no `researches/`: run `revela-research`.
|
|
47
47
|
- Research exists but no `deck-plan.md`: continue `revela-research` to the Planning Handoff.
|
|
48
48
|
- Valid `deck-plan.md` but no deck artifact: run `revela-make-deck`.
|
|
49
|
-
- Existing deck artifact: surface the HTML deck as a website card/link for Codex Browser native annotation, or run `revela-export` for PDF/PPTX/PNG.
|
|
49
|
+
- Existing deck artifact: start a read-only local static server from the workspace root and surface the HTML deck as a localhost website card/link for Codex Browser native annotation, or run `revela-export` for PDF/PPTX/PNG.
|
|
50
50
|
|
|
51
51
|
## Must Not
|
|
52
52
|
|
|
@@ -13,9 +13,11 @@ Use this skill when the user asks to make, generate, render, or update a Revela
|
|
|
13
13
|
- Local materials, material reviews, `researches/`, `assets/`, and user intent provide source context.
|
|
14
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.
|
|
15
15
|
- Active/requested design tools define valid layouts, slots, components, nesting hints, structure contracts, and HTML writing rules.
|
|
16
|
+
- Built-in page template tools define semantic page templates, foundation/scaffold HTML, editable slots, stable DOM contracts, and template QA contracts.
|
|
17
|
+
- Deck-local `decks/_revela-design/**/design.css` files are generated design snapshots. Do not patch them during deck making; regenerate the deck foundation or enter the design workflow instead.
|
|
16
18
|
- Active/requested domain guidance may inform communication framing, but it is not source evidence.
|
|
17
19
|
- Generated artifacts live under `decks/*.html`.
|
|
18
|
-
- After final Artifact QA passes, reply with the generated HTML deck as a standalone website link/card that
|
|
20
|
+
- After final Artifact QA passes, reply with the generated HTML deck as a standalone localhost website link/card that the user can click to open in Codex Browser for native browsing and annotation.
|
|
19
21
|
- Do not require a Narrative Vault before generating a deck.
|
|
20
22
|
- This skill does not own normal plan authoring; `revela-research` owns source preparation and `deck-plan.md` planning handoff.
|
|
21
23
|
- `deck-plan.md` is required for normal deck generation.
|
|
@@ -43,15 +45,19 @@ Before render preflight:
|
|
|
43
45
|
1. Call `revela_design_list`.
|
|
44
46
|
2. Call `revela_design_read` with `section: "rules"` for the active/requested design.
|
|
45
47
|
3. Call `revela_design_inventory`.
|
|
46
|
-
4.
|
|
48
|
+
4. Call `revela_list_page_templates` when the deck-plan uses `template` fields or when adding a new page.
|
|
49
|
+
5. For each template used in the current batch, call `revela_page_template_foundation` before creating or editing scaffold HTML.
|
|
50
|
+
6. Review each component's `contract` field. Components with structure contracts must be planned from structured content and rendered with the required internal DOM/classes, not simplified freehand markup.
|
|
47
51
|
|
|
48
52
|
Before HTML writing:
|
|
49
53
|
|
|
50
54
|
1. Call `revela_read_deck_plan`.
|
|
51
55
|
2. Read the returned `htmlWritingBatches`.
|
|
52
|
-
3.
|
|
53
|
-
4.
|
|
54
|
-
5.
|
|
56
|
+
3. For new slides with `template`, call `revela_render_template_scaffold` or `revela_add_template_scaffold`, then bounded-edit only the inserted slide's `data-template-slot` regions.
|
|
57
|
+
4. Use `revela_render_template_slide` / `revela_add_template_slide` only as a compatibility path for existing full `Template Content` JSON plans.
|
|
58
|
+
5. For legacy slides without `template`, call `revela_design_read_layout` for each layout used in the current batch.
|
|
59
|
+
6. For legacy slides without `template`, call `revela_design_read_component` for each component used in the current batch. For contract components, treat the returned CSS/HTML as executable grammar and preserve the required root, descendant, item, and alternating classes.
|
|
60
|
+
7. Fetch chart rules before creating or modifying ECharts.
|
|
55
61
|
|
|
56
62
|
## Plan Preflight And Repair
|
|
57
63
|
|
|
@@ -63,6 +69,7 @@ Allowed plan repairs are limited to technical diagnostics from `revela_read_deck
|
|
|
63
69
|
- Invalid or missing `sourceLinks` field structure, without adding new unsupported source links.
|
|
64
70
|
- Layout, slot, component, or `children` names that do not match `revela_design_inventory`.
|
|
65
71
|
- Component nesting fixes such as using `box.children` when the selected component model requires nested semantic groups.
|
|
72
|
+
- Missing or misspelled built-in `template` ids reported by `revela_read_deck_plan`.
|
|
66
73
|
|
|
67
74
|
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.
|
|
68
75
|
|
|
@@ -76,16 +83,18 @@ Use this phase when the user asks to make, generate, render, or update an HTML d
|
|
|
76
83
|
2. Read `htmlWritingBatches` before any HTML write. `revela_read_deck_plan` is QA/diagnostics, not a writer.
|
|
77
84
|
3. For new HTML files, call `revela_create_deck_foundation`.
|
|
78
85
|
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.
|
|
79
|
-
5.
|
|
80
|
-
6.
|
|
81
|
-
7.
|
|
82
|
-
8.
|
|
83
|
-
9.
|
|
84
|
-
10.
|
|
85
|
-
11.
|
|
86
|
-
12.
|
|
87
|
-
13.
|
|
88
|
-
14.
|
|
86
|
+
5. For template slides, use the deck-plan `template` to create a scaffold with `revela_add_template_scaffold`; use `Template Content` only as seed or compatibility input, not as the final authoring interface.
|
|
87
|
+
6. After scaffold insertion, bounded-edit the current slide HTML: preserve `.slide`, `.slide-canvas`, `data-template`, required template classes, and `data-template-slot` semantics.
|
|
88
|
+
7. Visual slots may be replaced by image, chart, table, or diagram containers only when the replacement keeps a clear semantic container for QA and export.
|
|
89
|
+
8. A single HTML write/edit/apply_patch may add or rewrite at most 5 slide sections.
|
|
90
|
+
9. If a chapter is longer than 5 slides, use the consecutive batch parts returned by `revela_read_deck_plan`.
|
|
91
|
+
10. Patch slides into the foundation between Revela slide markers.
|
|
92
|
+
11. Preserve positive 1-based `data-slide-index` values.
|
|
93
|
+
12. Every slide must have exactly one direct `.slide-canvas` child.
|
|
94
|
+
13. Keep the HTML valid after each write.
|
|
95
|
+
14. After every HTML write, call `revela_run_deck_qa` and repair hard errors before continuing or export.
|
|
96
|
+
15. After the final `revela_run_deck_qa` passes with zero hard errors, do not open the deck file directly. Start a read-only local static server from the workspace root and reply with a standalone Markdown link to the generated HTML deck artifact so the user can click it open in Codex Browser.
|
|
97
|
+
16. Use the exact `http://127.0.0.1:<port>/decks/<file>.html` URL for the card, replacing `<port>` with the actual localhost port. Keep `file://` only for non-Codex surfaces that allow direct local-file navigation.
|
|
89
98
|
|
|
90
99
|
## Outputs
|
|
91
100
|
|
|
@@ -101,7 +110,7 @@ Use this phase when the user asks to make, generate, render, or update an HTML d
|
|
|
101
110
|
- Do not write a new `deck-plan.md` when it is missing.
|
|
102
111
|
- Do not use design inventory names, slots, or components that were not returned by the active/requested design tools.
|
|
103
112
|
- Do not use a slot that does not belong to the selected layout.
|
|
104
|
-
- Do not
|
|
113
|
+
- Do not delete template required classes or slots during bounded edits. If the required structure cannot be satisfied, choose a simpler valid template/component or stop with the contract issue.
|
|
105
114
|
- Do not patch more than 5 slide sections in one HTML write.
|
|
106
115
|
- Do not invent source links, quotes, URLs, page references, caveats, or licenses.
|
|
107
116
|
- Do not write remote image candidates directly into deck HTML; save them as workspace assets first.
|