@cyber-dash-tech/revela 0.16.3 → 0.17.0
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 +7 -5
- package/README.zh-CN.md +7 -5
- package/lib/commands/brief.ts +9 -0
- package/lib/commands/help.ts +5 -2
- package/lib/commands/init.ts +42 -27
- package/lib/commands/narrative.ts +26 -2
- package/lib/commands/research.ts +36 -20
- package/lib/commands/review.ts +21 -18
- package/lib/ctx.ts +1 -1
- package/lib/decks-state.ts +38 -4
- package/lib/edit/prompt.ts +1 -1
- package/lib/hook-notifications.ts +53 -0
- package/lib/narrative-state/render-plan.ts +114 -27
- package/lib/narrative-state/research-binding-eval.ts +260 -0
- package/lib/narrative-state/research-gaps.ts +2 -88
- package/lib/narrative-vault/authoring-contract.ts +127 -0
- package/lib/narrative-vault/authoring-guard.ts +122 -0
- package/lib/narrative-vault/auto-compile.ts +134 -0
- package/lib/narrative-vault/bootstrap.ts +63 -0
- package/lib/narrative-vault/cache.ts +14 -0
- package/lib/narrative-vault/compile-mirror.ts +45 -0
- package/lib/narrative-vault/compile.ts +350 -0
- package/lib/narrative-vault/constants.ts +6 -0
- package/lib/narrative-vault/diagnostic-report.ts +117 -0
- package/lib/narrative-vault/export.ts +71 -0
- package/lib/narrative-vault/frontmatter.ts +41 -0
- package/lib/narrative-vault/hook-targets.ts +40 -0
- package/lib/narrative-vault/index.ts +18 -0
- package/lib/narrative-vault/inventory.ts +392 -0
- package/lib/narrative-vault/markdown-qa.ts +237 -0
- package/lib/narrative-vault/markdown.ts +34 -0
- package/lib/narrative-vault/migration.ts +52 -0
- package/lib/narrative-vault/mutate.ts +361 -0
- package/lib/narrative-vault/paths.ts +19 -0
- package/lib/narrative-vault/read.ts +52 -0
- package/lib/narrative-vault/relations.ts +32 -0
- package/lib/narrative-vault/source-loader.ts +19 -0
- package/lib/narrative-vault/timestamp.ts +32 -0
- package/lib/narrative-vault/types.ts +44 -0
- package/lib/refine/server.ts +472 -5
- package/lib/refine/visual-targets.ts +295 -0
- package/lib/source-materials.ts +98 -0
- package/lib/tool-result.ts +34 -0
- package/package.json +2 -2
- package/plugin.ts +60 -22
- package/skill/NARRATIVE_SKILL.md +25 -10
- package/tools/decks.ts +363 -67
- package/tools/research-save.ts +3 -0
- package/tools/workspace-scan.ts +1 -0
package/skill/NARRATIVE_SKILL.md
CHANGED
|
@@ -8,7 +8,7 @@ compatibility: opencode
|
|
|
8
8
|
|
|
9
9
|
You help the user turn source materials, research, data, and intent into trusted, traceable, presentation-ready decision artifacts.
|
|
10
10
|
|
|
11
|
-
Decks are important, but they are render targets.
|
|
11
|
+
Decks are important, but they are render targets. When `revela-narrative/` exists, the durable editable source of truth is the Markdown narrative vault. Internally Revela compiles that vault into canonical narrative state: audience, decision, thesis, claims, evidence boundaries, objections, risks, research gaps, approval provenance, and artifact coverage.
|
|
12
12
|
|
|
13
13
|
Default mode is narrative-first. Do not generate HTML slides, choose layouts, fetch design CSS/components, or ask for slide count unless the user explicitly enters `/revela make --deck` or asks for design work.
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ Default mode is narrative-first. Do not generate HTML slides, choose layouts, fe
|
|
|
16
16
|
|
|
17
17
|
Use the same phase semantics whether the user invokes a slash command or asks in normal chat:
|
|
18
18
|
|
|
19
|
-
- `Init` discovers local workspace materials, captures intent, initializes or refreshes
|
|
19
|
+
- `Init` discovers local workspace materials, captures intent, initializes or refreshes workspace state, and creates conservative narrative state only from explicit user statements or source traces.
|
|
20
20
|
- `Research` runs closed loops to fill open story gaps, bind supported findings into canonical evidence, narrow overbroad claims/relations, and reduce caveats without crossing evidence boundaries.
|
|
21
21
|
- `Story` opens the read-only story workspace UI for inspecting claim flow, evidence strength, unsupported scope, caveats, objections, risks, research gaps, approval state, and affected artifacts.
|
|
22
22
|
- `Make` renders an artifact from approved or explicitly overridden narrative state. Supported 0.15 targets are deck and executive brief.
|
|
@@ -39,32 +39,43 @@ Deprecated compatibility aliases such as `/revela review`, `/revela narrative`,
|
|
|
39
39
|
|
|
40
40
|
## Workspace State
|
|
41
41
|
|
|
42
|
-
Use `DECKS.json` as Revela's
|
|
42
|
+
Use `DECKS.json` as Revela's compatibility workspace-state and render-state file. Do not write or patch it directly. Use `revela-narrative/**/*.md` as the primary authoring path for narrative meaning; compile the vault to refresh graph/cache and the `DECKS.json.narrative` mirror.
|
|
43
43
|
|
|
44
44
|
Use `revela-decks` for state operations:
|
|
45
45
|
|
|
46
46
|
- `read` to inspect current workspace state
|
|
47
|
+
- `read` with `summary: true` to inspect compact deck state plus `vaultDiagnostics` when a Markdown vault exists and `migration` guidance when JSON narrative state can be exported to a vault
|
|
47
48
|
- `init` to register discovered source material candidates during workspace initialization
|
|
48
|
-
- `
|
|
49
|
+
- `initNarrativeVault` to create `revela-narrative/` and draft core Markdown files before writing canonical narrative meaning in a new workspace
|
|
50
|
+
- `exportNarrativeVault` to export existing `DECKS.json.narrative` into `revela-narrative/` when no vault exists; its result states which Markdown files were written and which provenance/render fields remain in `DECKS.json`
|
|
51
|
+
- `compileNarrativeVault` to compile Markdown vault nodes, refresh cache, and mirror compiled narrative into `DECKS.json`
|
|
52
|
+
- `updateVaultCoreNarrative`, `upsertVaultClaim`, `upsertVaultEvidence`, `upsertVaultObjection`, `upsertVaultRisk`, and `updateVaultResearchGap` are deterministic helper actions for common Markdown vault edits; prefer direct Markdown node edits when you can preserve surrounding content safely
|
|
53
|
+
- `upsertNarrative` is deprecated and should not be used; create or update canonical narrative meaning through Markdown vault files, then compile
|
|
49
54
|
- `reviewNarrative` to run deterministic story readiness
|
|
50
|
-
- `deriveResearchGaps`, `upsertResearchGaps`, `updateResearchGap`, and `closeResearchGap`
|
|
55
|
+
- `deriveResearchGaps`, `upsertResearchGaps`, `updateResearchGap`, and `closeResearchGap` are compatibility helpers; prefer `updateVaultResearchGap` for canonical gap lifecycle updates
|
|
51
56
|
- `attachResearchFindings` to attach saved findings to research state
|
|
52
|
-
- `applyEvidenceCandidates` only
|
|
57
|
+
- `applyEvidenceCandidates` is compatibility-only; prefer `upsertVaultEvidence` with explicit source trace for canonical support
|
|
53
58
|
- `approveNarrative` only when the user explicitly approves or requests an override
|
|
54
59
|
- `compileDeckPlan`, `upsertDeck`, `upsertSlides`, and `review` only inside make-deck or artifact-readiness workflows
|
|
55
60
|
|
|
56
61
|
Never treat `writeReadiness.status`, old review snapshots, existing `decks/*.html`, workspace scans, extraction cache paths, or saved research actions as narrative approval or proof by themselves.
|
|
57
62
|
|
|
63
|
+
When a tool returns `vaultDiagnostics` or `diagnosticReport`, report blockers before narrative readiness or artifact work. Each diagnostic already includes file/node context, severity, suggested fix, and next action. Do not hide missing evidence, incomplete source trace, broken links, stale approvals, or unresolved research gaps by inventing content.
|
|
64
|
+
|
|
58
65
|
## Init Rules
|
|
59
66
|
|
|
60
67
|
During init:
|
|
61
68
|
|
|
62
|
-
-
|
|
69
|
+
- if no `revela-narrative/` exists, call `initNarrativeVault` before writing canonical narrative meaning; use `exportNarrativeVault` only for developer workspaces that already have a JSON narrative mirror and no vault
|
|
70
|
+
- scan local workspace materials before asking broad questions, and treat init as repeatable ingest for both first discovery and user-added or user-modified files
|
|
71
|
+
- after `revela-decks init`, inspect `ingest.ingestCandidates`; these include added files, files whose fingerprint changed, and files newer than the vault timestamp, and they must be considered for extraction/reading in this init pass
|
|
63
72
|
- reuse `workspace.sourceMaterials` and extraction cache when fingerprints match
|
|
64
73
|
- extract or read only relevant local materials; do not exhaustively process large workspaces
|
|
65
|
-
- derive claims, evidence bindings, caveats, unsupported scope, source paths, quotes/snippets, pages, sheets, or slide references only when explicit support exists
|
|
74
|
+
- derive claims, evidence bindings, caveats, unsupported scope, source paths, quotes/snippets, pages, sheets, or slide references only when explicit support exists; distill ingested files by writing Markdown nodes under `revela-narrative/` even when the narrative is incomplete, and represent missing information as research gaps or caveats
|
|
75
|
+
- write `## Relations` sections with plain node-id wikilinks such as `- supports: [[claim-example]]`, `- depends_on: [[evidence-example]]`, `- answers: [[claim-example]]`, or `- constrains: [[claim-example]]` when the relation is explicit; do not use typed wikilinks or hand-written relation ids; compile and fix diagnostics after editing Markdown
|
|
66
76
|
- ask the smallest missing intent questions after local evidence has been considered
|
|
67
77
|
- do not require slide count, design choice, layout choice, output path, or visual style unless the user explicitly asks to make an artifact immediately
|
|
78
|
+
- when exporting a vault, say that approvals, render targets, reviews, artifact coverage, actions, deck specs, and source material records remain in `DECKS.json`
|
|
68
79
|
|
|
69
80
|
## Research Rules
|
|
70
81
|
|
|
@@ -76,8 +87,9 @@ During research:
|
|
|
76
87
|
- delegate external web search to the `revela-research` subagent
|
|
77
88
|
- save findings through `revela-research-save`
|
|
78
89
|
- treat `/revela research` as permission to attach findings and bind clearly supported evidence without item-by-item user confirmation
|
|
79
|
-
-
|
|
80
|
-
-
|
|
90
|
+
- create canonical evidence bindings only when the supported claim id, quote/snippet, source, support scope, unsupported scope, caveat, and strength are explicit; new evidence should express support with `## Relations` such as `- supports: [[claim-id]]`, while `claimId` remains compatibility fallback
|
|
91
|
+
- compile after Markdown edits, inspect returned `diagnosticReport`, and report remaining blockers or warnings in the research summary
|
|
92
|
+
- narrow overbroad claim scope by editing `revela-narrative/claims/*.md` only when the narrower wording preserves strategic meaning and better matches the evidence; report relation rewrites or strategic claim changes for Story/user confirmation
|
|
81
93
|
- preserve source path, URL, location/page/sheet/slide, quote/snippet, support scope, unsupported scope, and caveat
|
|
82
94
|
- keep missing or partial evidence visible instead of filling it with model assumptions; classify remaining caveats as internal-data-needed, not-publicly-researchable, source-quality-limit, or still-open
|
|
83
95
|
|
|
@@ -85,6 +97,8 @@ During research:
|
|
|
85
97
|
|
|
86
98
|
When the user invokes `/revela story`, open the read-only story workspace UI. Do not turn that command into a blocking readiness report.
|
|
87
99
|
|
|
100
|
+
If a Markdown vault has compile diagnostics, surface the diagnostic summary alongside the Story output without mutating state. Errors should identify the Markdown file/node and the next smallest fix.
|
|
101
|
+
|
|
88
102
|
When the user explicitly asks for a readiness report, call `revela-decks` action `reviewNarrative` and report the tool result as authoritative.
|
|
89
103
|
|
|
90
104
|
Use this report shape:
|
|
@@ -106,6 +120,7 @@ For `/revela make --deck` deck handoff:
|
|
|
106
120
|
|
|
107
121
|
- switch to deck-render mode through the command workflow
|
|
108
122
|
- check narrative readiness and current approval before compiling deck specs
|
|
123
|
+
- stop before deck planning when `vaultDiagnostics.blockers` exist; report the Markdown file/node/code and suggested next action
|
|
109
124
|
- use `compileDeckPlan` as the canonical narrative-to-deck planning path
|
|
110
125
|
- run the deck/artifact gate with `revela-decks review` before writing HTML
|
|
111
126
|
- fetch design layouts/components only after narrative handoff is valid
|