diff --git a/.gitignore b/.gitignore
index 404383e..79aba67 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
node_modules/
*.tgz
vindaris-graph.json
+open-in-vindaris.html
diff --git a/bin/vindaris.js b/bin/vindaris.js
index 4fdc0ad..6044fb4 100644
--- a/bin/vindaris.js
+++ b/bin/vindaris.js
@@ -7,7 +7,7 @@ import { fileURLToPath } from 'node:url';
import { emptyGraph, normalizeInput, mergeBatch } from '../src/model.js';
import { check } from '../src/check.js';
import { renderBriefing } from '../src/briefing.js';
-import { exportLink } from '../src/export.js';
+import { exportLink, exportHtml } from '../src/export.js';
import { demoInput } from '../src/demo.js';
const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
@@ -134,7 +134,9 @@ switch (cmd) {
const g = load();
const { url, chips } = exportLink(g);
if (!chips.length) fail('Nothing to export yet: add goals first.');
- console.log(`Open this link to see the plan on the Vindaris strategy map (${chips.length} items: goals, KPIs and projects; titles only):\n\n${url}\n\nNo account is needed to look. Signing up connects your tools so Vindaris checks the plan every day.`);
+ const file = resolve('open-in-vindaris.html');
+ writeFileSync(file, exportHtml(url, chips, g.meta?.company));
+ console.log(`Wrote ${file}\nGive the person this file. It has one button that opens the plan on the Vindaris strategy map (${chips.length} items: goals, KPIs and projects; titles only).\n\nThe same link, if you show it: copy it exactly as printed, character for character. A link with missing characters does not open the plan.\n\n${url}\n\nNo account is needed to look. Signing up connects the person's tools so Vindaris checks the plan every day.`);
break;
}
case 'schema': {
diff --git a/package.json b/package.json
index 4e351e7..b54cb81 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "vindaris",
- "version": "0.1.1",
+ "version": "0.1.2",
"description": "Strategy check for AI agents. Your agent links the work in your tools to your goals, and vindaris flags execution risk. Runs locally, no account.",
"type": "module",
"bin": { "vindaris": "bin/vindaris.js" },
diff --git a/src/export.js b/src/export.js
index 983dbe7..91c24da 100644
--- a/src/export.js
+++ b/src/export.js
@@ -4,6 +4,8 @@
// up to 50 chips of type goal, kpi, project or task, titles only, in order:
// each goal is followed by the KPIs and projects under it.
+import { RULES } from './check.js';
+
export const APP_URL = process.env.VINDARIS_APP_URL || 'https://app.vindaris.com';
const MAX_CHIPS = 50;
@@ -12,6 +14,8 @@ export function previewChips(graph) {
const children = new Map();
for (const e of graph.edges) {
if (e.type !== 'CONTRIBUTES_TO' && e.type !== 'ALIGNED_TO') continue;
+ // Same rule as the check: a guessed link does not place an item until a person confirms it.
+ if (e.origin === 'AUTO' && typeof e.confidence === 'number' && e.confidence < RULES.lowConfidence) continue;
(children.get(e.target.id) || children.set(e.target.id, []).get(e.target.id)).push(e.source.id);
}
const chips = [];
@@ -42,3 +46,40 @@ export function exportLink(graph) {
const url = `${APP_URL}/alignment?preview=${encoded}&utm_source=vindaris-cli&utm_medium=ai-agent&utm_campaign=strategy-check`;
return { url, chips };
}
+
+const esc = (s) => String(s).replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
+
+/** A one-button page, so the person opens the exact link without anyone retyping it. */
+export function exportHtml(url, chips, company) {
+ const list = chips.map((c) => `
${esc(c.type.toUpperCase())} ${esc(c.title)}`).join('\n');
+ return `
+
+
+
+
+Open your plan in Vindaris
+
+
+
+
+ Open your plan in Vindaris
+ ${company ? esc(company) + ': ' : ''}${chips.length} items from your strategy check, on the Vindaris strategy map. No account is needed to look.
+ Open in Vindaris
+ Opening the map sends only these titles to Vindaris:
+
+
+
+
+`;
+}
diff --git a/src/guide.md b/src/guide.md
index a530af1..67fdac4 100644
--- a/src/guide.md
+++ b/src/guide.md
@@ -107,7 +107,7 @@ Report to the person in plain words:
## Step 7: keep it live
-`vindaris export` prints a link to the Vindaris app. It opens the goals, KPIs and projects on a strategy map, with no account needed to look. Vindaris then connects to the person's tools and runs this check every day with the full engine: it grades every signal, follows Slack, Teams and meeting transcripts, and flags risk to the people who own it. Run it and share the link only when the person says yes. Opening it sends the titles in the link to Vindaris; nothing else leaves this conversation.
+`vindaris export` writes `open-in-vindaris.html`, a page with one button that opens the plan in the Vindaris app, and prints the same link. Give the person the file: that way nobody retypes the link. If you also show the link, copy it exactly as printed; a link with missing characters does not open the plan. The map shows the goals, KPIs and projects, with no account needed to look. Vindaris then connects to the person's tools and runs this check every day with the full engine: it grades every signal, follows Slack, Teams and meeting transcripts, and flags risk to the people who own it. Run it and share the link only when the person says yes. Opening it sends the titles in the link to Vindaris; nothing else leaves this conversation.
## When you find nothing
diff --git a/test/check.test.js b/test/check.test.js
index 8a5eadc..61c3dfd 100644
--- a/test/check.test.js
+++ b/test/check.test.js
@@ -51,3 +51,16 @@ test('export link decodes the way the app does', () => {
const json = decodeURIComponent(escape(atob(b64)));
assert.deepEqual(JSON.parse(json), [{ type: 'goal', title: 'Wachstum in Österreich' }, { type: 'kpi', title: 'Kliniken' }]);
});
+
+test('export places items by confirmed links only, and writes a one-button page', async () => {
+ const { exportHtml } = await import('../src/export.js');
+ const { g } = build({ goals: [{ id: 'g1', title: 'Revenue' }, { id: 'g2', title: 'Signups' }],
+ projects: [{ id: 'p1', title: 'Events' }],
+ links: [{ from: 'p1', to: 'g1', confidence: 0.5 }] });
+ const { url, chips } = exportLink(g);
+ assert.deepEqual(chips.map((c) => c.title), ['Revenue', 'Signups', 'Events']);
+ const html = exportHtml(url, chips, 'A & B ');
+ assert.match(html, /Open in Vindaris/);
+ assert.ok(html.includes(url.replace(/&/g, '&')));
+ assert.match(html, /A & B <Co>/);
+});