Commit graph

632 commits

Author SHA1 Message Date
8ea692bc60 chore(voyage): release v5.0.2 — operator-driven annotation HTML (scripts/annotate.mjs) v5.0.2
v5.0.0 added a read-only HTML render. v5.0.1 deleted that and pointed at
/playground document-critique, which pre-generates Claude's suggestions
and asks the operator to approve/reject them. The operator asked for the
opposite — a surface where THEY drive every annotation. v5.0.2 lands it.

scripts/annotate.mjs (~430 lines, zero deps) takes any artifact .md and
writes a self-contained HTML next to it. The HTML renders the document
with line numbers, lets the operator click any line to add their own
note (inline textarea, save with Cmd+Enter or button), keeps a sidebar
of all notes (editable + deletable + persisted in localStorage per
artifact path), and exposes Copy Prompt to gather every note into one
structured prompt. Operator copies, pastes back, Claude revises the .md.

The three producing commands now run annotate.mjs at their last step and
print the file:// link with explicit "Click any line to add YOUR OWN note"
instructions. The v5.0.1 /playground document-critique line is gone.

npm test green: 516 tests, 514 pass, 0 fail, 2 skipped.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 14:04:28 +02:00
2e0892cdaf chore(voyage): release v5.0.1 — drop standalone HTML render; print literal /playground document-critique invocation v5.0.1
The v5.0.0 stop-gap had /trekbrief, /trekplan, and /trekreview each render
a read-only {artifact}.html (via scripts/render-artifact.mjs) AND print a
vague "run the /playground plugin" instruction. In practice the read-only
HTML was redundant with what /playground produces and the instruction
wasn't copy-paste-ready — the operator had to guess the right invocation.

v5.0.1 deletes scripts/render-artifact.mjs + its test + npm run render,
and makes each producing command end with a single boxed, literal,
copy-paste-ready line:

    /playground build a document-critique playground for {artifact_path}

One paste from the operator launches the official playground skill's
document-critique template, which builds an interactive HTML — artifact
on the left, per-line Approve/Reject/Comment cards on the right, Copy
Prompt button at the bottom. Mark suggestions, click Copy Prompt, paste
back, Claude revises the .md. Doc-consistency test pins the literal
invocation so the prose cannot soften back into vagueness.

npm test green: 503 tests, 501 pass, 0 fail, 2 skipped.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 13:24:32 +02:00
916d30f63e chore(voyage): release v5.0.0 — remove bespoke playground + /trekrevise + Handover 8; render produced artifacts to HTML + link, annotate via /playground v5.0.0
The v4.2/v4.3 bespoke playground SPA (~388 KB), the /trekrevise command,
Handover 8 (annotation → revision), the supporting lib/ modules
(anchor-parser, annotation-digest, markdown-write, revision-guard), the
Playwright e2e suite, and the @playwright/test / @axe-core/playwright
devDeps are removed. A browser walkthrough found the playground borderline
unusable, and it duplicated the official /playground plugin's
document-critique / diff-review templates.

In their place: scripts/render-artifact.mjs — a small, zero-dependency
renderer that turns a brief/plan/review .md into a self-contained,
design-system-styled, zero-network .html (frontmatter folded into a
<details> block). /trekbrief, /trekplan, and /trekreview call it on their
last step and print the file:// link; to annotate, run /playground
(document-critique) on the .md and paste the generated prompt back.

Resolves the v4.3.1-deferred findings as moot (their target files are
deleted). npm test green: 509 tests, 507 pass, 0 fail, 2 skipped.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-12 14:05:07 +02:00
0f197f6ff6 chore(voyage): release v4.3.0 — finalize version-sync + docs (3 re-review findings deferred to v4.3.1) v4.3.0
Bumps .claude-plugin/plugin.json 4.2.0 -> 4.3.0 (package.json, package-lock.json,
and the README badge were already at 4.3.0). Updates the v4.3.0 CHANGELOG entry with
the verified test count (711 pass / 0 fail / 2 skipped, 713 total), a "Re-review
remediation (Sesjon 13-18)" note covering the 11-finding cycle Waves 1-3 closed, and
a "Known issues — deferred to v4.3.1" subsection listing the 3 new findings the Sesjon
18 re-review surfaced in the remediation code (87069b35 SECURITY_INJECTION defense-in-
depth, 4cc3bfc9 PLAN_EXECUTE_DRIFT, c6c64a58 MISSING_TEST). Updates root CLAUDE.md
(voyage v4.0.0 -> v4.3.0, seven-command + playground), root README + plugin README
(test count, Known-limitations note, fixes the stale "trekplan@" install snippet ->
"voyage@"), root marketplace.json (voyage description), and plugin CLAUDE.md (Playground
paragraph). A plan-critic-reviewed Wave-4 remediation plan for the 3 deferred findings
is ready (.claude/plans/, gitignored).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 21:08:48 +02:00
0810f0c4fa test(voyage): regenerate pixel-diff baseline + clean a11y baseline (post-remediation) 2026-05-10 21:49:26 +02:00
ffabd7820e test(voyage): Group C.8 SC6 round-trip via readAndUpdate (1bc37231) 2026-05-10 21:48:21 +02:00
35d28a52f3 test(voyage): Group B fleet-grid CSS parity assertion (99707f51) 2026-05-10 21:46:18 +02:00
4bee1f2f7e test(voyage): convert SC2 a11y spec to absolute 0-violation assertion (09132940) 2026-05-10 21:44:31 +02:00
b202d6542c test(voyage): add Group D XSS injection runtime guard (1d3591d4) 2026-05-10 21:42:52 +02:00
8ae51cda30 fix(voyage): remove dead console.log else-branches + announce drag-drop fallback (809a225e) 2026-05-10 21:26:24 +02:00
412b4561f5 fix(voyage): inline screenshot gallery loads docs/screenshots/ PNGs (31d28f65) 2026-05-10 21:25:01 +02:00
9909ce1066 fix(voyage): dashboard reads fm.plan_critic + orchestrator doc-consistency (906f155d, bee33a69) 2026-05-10 21:21:02 +02:00
4910999198 fix(voyage): resolve 4 color-contrast WCAG violations in light theme (09132940) 2026-05-10 21:18:53 +02:00
48ab3c9de3 fix(voyage): move sidebar toggle outside aria-hidden region (09132940) 2026-05-10 21:16:52 +02:00
c08bde0649 fix(voyage): sanitize bodyHtml via DOMPurify in renderArtifact (1d3591d4) 2026-05-10 21:14:50 +02:00
6eaa230953 fix(voyage): sync package-lock.json version to 4.3.0 (d94dfaf1) 2026-05-10 21:05:33 +02:00
36d0e97da7 revert(voyage): remove three-tier-context scope creep (1e8d2bf2) 2026-05-10 21:05:05 +02:00
5f26de2f0d fix(voyage): inject plan_critic via Phase 9 readAndUpdate (906f155d) 2026-05-10 21:03:54 +02:00
13a83e5a95 docs(marketplace): update root README with voyage v4.3
Step 34 of v4.3 plan — Wave 8 docs (3-doc-niv mandate, marketplace landing):

- Voyage card bumped from v4.2.0 to v4.3.0
- New v4.3.0 paragraph above v4.2.0 paragraph: dashboard-sentrisk
  rebuild, file://-loader (webkitdirectory + drag-drop + URL-parameter),
  anchor-rendering modent (block-boundary + parseAnchor sync + gutter-
  badge + sidebar-rail + J/K keyboard), A11Y panel fra DS-primitives,
  screenshots-spor convention, path-traversal filter, DOMPurify-vendoring,
  test pyramid Groups A-D (672 -> 705 pass), WCAG-baseline'd defer-til-v4.4.

Cross-plugin-boundary commit: koordinert med plugins/voyage/CLAUDE.md +
README.md + CHANGELOG.md + package.json (Step 33).
2026-05-10 18:30:54 +02:00
ea4005960c docs(voyage): bump v4.3.0 + update CLAUDE.md + README.md + CHANGELOG.md
Step 33 of v4.3 plan — Wave 8 docs (3-doc-niv mandate):

- package.json: version 4.2.0 -> 4.3.0
- CHANGELOG.md: v4.3.0 entry dated 2026-05-10 with Added/Changed/Fixed/
  Deferred-to-v4.4/Notes covering Wave 0-8 leveranser (dashboard-sentrisk
  layout, file://-loader 3 entry points, anchor-rendering modent, A11Y
  panel fra DS-primitives, screenshots-spor convention, DOMPurify ven-
  doring, voyage-scope DS-tokens, test pyramid Groups A-D, Playwright
  devDeps).
- CLAUDE.md: nytt 'Playground (v4.3)' avsnitt under Architecture som
  beskriver dashboard-modell, file-loader, anchor-rendering, A11Y panel,
  screenshots-spor, security hardening, og test pyramid.
- README.md: version badge 3.4.1 -> 4.3.0; '/trekrevise — Annotation
  playground' avsnitt utvidet med v4.3 rebuild-detaljer og pekere til
  playground/README.md + sc1-checklist-verification.md.

Test count: 705 pass / 0 fail / 2 skipped (npm test).
doc-consistency.test.mjs: 42/42 pass.
2026-05-10 18:29:45 +02:00
12637f3dbd docs(voyage): write playground/README.md with v4.3 architecture + URL-parameter
Step 32 of v4.3 plan — Wave 8 docs:
- v4.3 dashboard-sentrisk arkitektur (fleet-grid + drill-down)
- Bruksveier: webkitdirectory-velger, drag-drop, URL-parameter ?project=
- Discoverability for .claude/projects/ (open/xdg-open/explorer)
- Annotation-flow + window.__voyage hooks
- Begrensninger (FF150-Win, no FSA, design/ out-of-scope, baseline'd WCAG)
- Bundle-strrelse breakdown
- Test-suite oversikt (Groups A-D)

NEW file (eksisterte ikke i v4.2 per plan-critic finding 13).
2026-05-10 18:25:37 +02:00
59cab69bf4 verify(voyage): SC1 10-element checklist + Playwright baseline screenshots
Step 31 of v4.3 plan — Wave 7 SC1 authoritative verification:

- docs/sc1-checklist-verification.md: per-element pass/fail med evidens
  (Group A test referanser + manuell side-by-side mot llm-security-
  playground). 8 av 10 PASS bokstavelig, 2 PASS-redef (Element 4
  onboarding-grid -> fleet-grid, Element 6 screenshots-spor -> hooks +
  docs-konvensjon) per scope-guardian Assumptions 21+22 (operator-
  signed-off ved sesjon-start).
- tests/e2e/snapshots/voyage-playground-light.png (1280x900 light theme)
- tests/e2e/snapshots/voyage-playground-dark.png (1280x900 dark theme)
- tests/e2e/snapshots/a11y-baseline.json: WCAG-violations baseline
  (aria-hidden-focus + color-contrast) defer-til-v4.4

Pixel-diff-spec (Step 30) sammenlikner mot baseline med maxDiffPixelRatio
0.02. Wave 7 = VERIFICATION ONLY; HTML FROZEN; faktisk a11y-fix deferred
til v4.4.
2026-05-10 18:24:29 +02:00
067d9ab245 test(voyage): add e2e Playwright + axe-core specs (a11y + network) [skip-docs]
Step 30 of v4.3 plan — Wave 7 Group D:
- voyage-playground-a11y.spec.mjs (3 tests): light + dark theme axe-core
  scans (compared against baseline JSON, fails only on NEW or GROWN
  violations) + pixel-diff smoke for SC1 (light + dark, 1280x900,
  maxDiffPixelRatio=0.02).
- voyage-playground-network.spec.mjs (1 test): SC7 authoritative gate via
  page.on('request') instrument — verifies zero external (http/https/ws)
  requests during page load.
- playwright.config.mjs: snapshotPathTemplate routes to tests/e2e/snapshots/
  (matches Step 31 expected_paths).

Baseline policy: HTML is FROZEN in Sesjon 6 (Wave 7 = verification, not
fix). Existing critical/serious WCAG violations (aria-hidden-focus +
color-contrast) recorded in tests/e2e/snapshots/a11y-baseline.json as
delta-baseline. Actual a11y fix deferred to v4.4.

Verify: npm run test:e2e -> 4 passed (3 a11y + 1 network).
2026-05-10 18:22:52 +02:00
5820478f71 test(voyage): add Group B (structure) + Group C (annotation export schema) tests [skip-docs]
Step 29 of v4.3 plan — Wave 7:
- Group B (9 tests): DS-token classes (badge--scope-voyage, guide-panel,
  fleet-grid), theme-toggle wiring (data-action, wireThemeToggle,
  localStorage), sidebar-tab keyboard pattern (role=tablist,
  aria-selected, J/K/Esc), anchor-ID format mirror.
- Group C (7 tests, +1 vs original): export-bundle JSON parse, required
  keys, per-annotation field validation, empty-export edge case,
  annotation_digest order-independence, SHA-256 16-hex-char validity
  (SC6 / SC-GAP-3), fixture plan anchor format.
- Fixtures: tests/fixtures/playground/v43-export-bundle.json +
  v43-plan-pre-annotate.md (ANN-0001 + ANN-0002, revision: 0).

Test count: 689 → 705 pass / 0 fail / 2 skipped.
2026-05-10 18:18:24 +02:00
deca35a28f test(voyage): extend playground tests with Group A static-HTML assertions [skip-docs]
Step 28 of v4.3 plan — Wave 7 Group A: 17 new static-HTML grep assertions
covering SC1 10-element checklist (one test per element), SC3 webkitdirectory
+ drag-drop attributes, SC6 export-bundle markers (buildAnnotatedMarkdown,
filename pattern, Blob + clipboard flows), and SC7 tag-level no-CDN checks
(every <script src> + <link href> must be local).

Test count: 672 → 689 pass / 0 fail / 2 skipped.
2026-05-10 18:15:53 +02:00
b88c120680 feat(voyage): add Playwright + @axe-core/playwright devDependencies
Step 27 of v4.3 plan — adds Playwright 1.59.1 + axe-core/playwright 4.10.2
as devDependencies, npm script test:e2e, and playwright.config.mjs with
file:// baseURL pointing at playground/. Chromium browser binary installed
to ~/Library/Caches/ms-playwright/.

Trace: SC2 (WCAG verifikasjon krever browser-driver), research/04
Recommendation security; brief Constraint linje 64 (zero new deps i
playground/) er OK fordi Playwright er devDependency på voyage-plugin-rot,
ikke i playground/.
2026-05-10 18:13:29 +02:00
cd6bca978f feat(voyage): implement path-traversal + symlink/dotfile filter on loaded files 2026-05-10 18:05:35 +02:00
6293775f30 feat(voyage): implement HTML-comment indirect prompt injection mitigation (Sec T4) 2026-05-10 18:03:37 +02:00
fc8c9eecdd feat(voyage): vendor DOMPurify >=3.1.1 + sanitize annotation-content 2026-05-10 18:01:30 +02:00
e839ba2a7a feat(voyage): implement screenshots-spor convention (window.__hooks + docs/screenshots/) 2026-05-10 17:58:56 +02:00
b70b480d0d feat(voyage): build A11Y-panel from DS-primitives (greenfield) 2026-05-10 17:56:49 +02:00
df0e7837af feat(voyage): implement two-opacity pattern (active/inactive/resolved) 2026-05-10 17:53:43 +02:00
224517f205 feat(voyage): implement J/K keyboard navigation + Esc + aria-live announces
Step 20 of v4.3 playground plan. Document-level keydown handler:
  - J = next annotation (next sorted-by-line draft, wraps)
  - K = prev annotation (wraps)
  - ] = toggle sidebar visibility
  - Escape = clear active anchor + sidebar list selection

Active annotation gets yellow-tint (Step 18 setActiveAnchor) and the
matching gutter-badge receives focus + scrollIntoView. Aria-live region
announces position + target: "Annotering 3 av 7: <target> — <snippet>".

Skips input/textarea/select/contenteditable so playground never steals
keystrokes from form fields. Modifier keys (Ctrl/Alt/Meta) pass through
to browser shortcuts. Wired in init() after dashboard nav.

Trace: SC2 (WCAG AA keyboard), SC6, research/04 Dim 2 + Insight 5 +
Recommendation keyboard-navigation.
2026-05-10 17:10:59 +02:00
6db7c72511 feat(voyage): implement hidden-by-default sidebar-rail with ordered list + filter + jumplist count
Step 19 of v4.3 playground plan. Sidebar now default aria-hidden=true
(translateX collapses panel, leaves 40px FAB rail). FAB toggle has
data-action=toggle-sidebar for keyboard binding (] in Step 20).

New annotation-list section in sidebar panel:
  - filter radiogroup: Alle (default), Åpne (unresolved), Resolved
  - voyage-jumplist ordered list with numbered badges matching the
    gutter-badge ordering (sorted by line ASC)
  - aria-live jumplist count: "X av N" (filtered/total)
  - click list-item -> setActiveAnchor + scrollIntoView + data-active

renderAnnotationList wires into mountRender so list refreshes on every
render. Filter state (voyageFilterState) persists across renders within
the session.

Trace: SC6, research/04 Dim 1 (hidden-by-default) + Insight 1 +
Recommendation sidebar/navigation.
2026-05-10 17:09:26 +02:00
84f41014f9 feat(voyage): replace pencil-icon with numbered-badge gutter + yellow-tint highlight
Step 18 of v4.3 playground plan. Replaces v4.2 Gesture 2 pencil-icon
hover-reveal with numbered circular badges in the left gutter (one per
anchored paragraph; ordering matches sidebar jumplist). 2-3px accent stripe
extends right from the badge into the gutter. Yellow-tint highlight
(rgba 255, 235, 59, 0.25 — Google Docs pattern) applies to the anchored
paragraph when an annotation is active. Body text never reflowed or
recolored. Gesture 1 (text-select adder) and Gesture 3 (page-level note)
remain for new annotation creation.

CSS uses --color-scope-voyage token for badge background and stripe.
JS adds injectAnchorBadges() + setActiveAnchor() and rewires mountRender.

Trace: SC1 + SC6, research/04 Insight 3 + Recommendation marker-design.
2026-05-10 17:06:59 +02:00
75130fe979 feat(voyage): implement block-boundary-fallback for code-fence/table/list anchors
Step 17 of v4.3 playground plan. Pure function relocateAnchorsToBlockBoundaries
(text, anchors) detects atomic markdown blocks (fenced code, tables, deeply
nested lists) and relocates anchor-comment insertion to the line BEFORE block
opening rather than inside the block. Pure markdown-text -> markdown-text
transform (no DOM, no markdown-it dependency).

Companion test tests/integration/annotation-block-boundary.test.mjs extracts
the function via balanced-brace scan and exercises it through Function() —
7 unit tests covering empty anchors, outside-block stays, fenced-code
relocation, table relocation, deeply-nested list relocation, mixed
inside/outside, and shape contract.

Trace: SC6, research/04 Dim 3 (Notion block-level fallback), plan-critic
major #6 (DOM-vs-no-DOM contradiction resolved via pure-function design).
2026-05-10 17:04:27 +02:00
3973be2a90 feat(voyage): sync browser-side anchor-parser regex with Node-side allowlist
Step 16 of v4.3 playground plan. Mirror lib/parsers/anchor-parser.mjs
ANCHOR_LINE_RE + ATTR_RE + ID_RE constants verbatim into voyage-playground.html
inline-script (file COLON COLON  scheme compat — no ES-module). parseAnchor(line)
validates id matches ANN-NNNN, target non-empty, line positive integer,
snippet ≤80c, intent in {fix,change,question,block}.

Trace: SC6, research/02 Sec T4, plan-critic blocker B4 + scope-guardian DEP-3.
Cross-file regex sync verified by static-grep test.
2026-05-10 17:01:14 +02:00
946eb7ab0f feat(voyage): implement drill-down + back-nav + URL-parameter project
Step 15 (v4.3 Sesjon 3 — Wave 3) — wires the dashboard fleet-tiles
to a drill-down view with breadcrumb update + back-to-dashboard
navigation + browser back/forward restoration via popstate.

renderArtifactDetail(artifactKey) renders the chosen artifact into
the #voyage-detail slot using renderPageShell + renderArtifact:
  - brief / plan / review → markdown render
  - progress              → JSON pretty-print in <pre>
  - research              → list of all research-briefs
  - missing entry         → "Artifact mangler" placeholder

Click delegation on .fleet-tile[data-artifact] triggers detail render
+ pushDetailURL (?artifact=<key>); data-action=back-to-dashboard
returns to the dashboard view + pushDashboardURL. Topbar breadcrumb
gets a third segment for detail views.

URL-parameter deep-linking: at page-load, ?project=<basePath>
surfaces a guide-panel hint explaining that webkitdirectory requires
a user-gesture; the hint links to the same Last prosjektmappe button
that wireProjectLoader already exposes. popstate handler restores
the view-state on browser back/forward (no-op when no project loaded).

Test additions (4): renderArtifactDetail function, URLSearchParams
presence, data-action=back-to-dashboard attribute, popstate listener.
2026-05-10 16:46:13 +02:00
a479f47b4e feat(voyage): implement dashboard via fleet-grid + fleet-tile with status vocabulary
Step 14 (v4.3 Sesjon 3 — Wave 3) — adds renderDashboard pipeline that
turns a ProjectArtifacts struct (produced by loadProjectDirectory in
Step 13) into a fleet-grid of fleet-tiles, one per artifact-type
(brief / plan / review / research / progress).

Status vocabulary: complete, in-progress, blocked, missing, stale
Severity mapping: missing → critical, blocked → high, in-progress
+ stale → medium, complete → low. Severity drives DS color tokens
via [data-severity] attribute selectors.

When loadProjectDirectory completes, dashboard takes over the main
stage (paste-flow elements hidden); topbar updates with project
breadcrumb. Step 13's pipeline already calls renderDashboard via
graceful-fallback, so wiring is automatic.

Test additions (4): fleet-grid + fleet-tile presence, renderDashboard
function declaration, status vocabulary completeness.
2026-05-10 16:43:22 +02:00
68842cf773 docs(voyage): add three-tier ecosystem context brief
New docs/three-tier-context.md (110 lines) documents Voyage's position as
Tier 1 in a three-tier ecosystem with upstream consumers (app-creator,
app-factory; both currently in private incubation). The brief identifies
upstream-consumed contracts (brief.md format, /trekplan CLI, handover
schemas), prescribes stability principles, and explicitly preserves
Voyage's runtime agnosticism — no imports, no detection, no special cases.
Awareness without coupling.

CLAUDE.md § Architecture: 2-line callout pointing to the brief, following
the existing "opt-in upstream architect plugin" precedent.

No Voyage behavior change. Documentation-only.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-10 16:29:28 +02:00
64e27d875a test(voyage): re-localize skip-link assertions to Norwegian (Step 10) 2026-05-10 16:20:53 +02:00
2bf766673d feat(voyage): implement loadProjectDirectory pipeline (validate + classify + read) 2026-05-10 16:19:28 +02:00
974835537a feat(voyage): add drag-drop with webkitGetAsEntry + Firefox 150 Win guard 2026-05-10 16:18:23 +02:00
e04915882e feat(voyage): add webkitdirectory primary project-loader 2026-05-10 16:17:13 +02:00
820ebf0f02 feat(voyage): add A11Y skip-link + aria-label foundations 2026-05-10 16:16:18 +02:00
7c468097cf feat(voyage): implement page-shell pattern (eyebrow + title + lede + meta) 2026-05-10 16:15:25 +02:00
0eb56edb6d feat(voyage): implement renderTopbar with badge--scope-voyage and breadcrumb 2026-05-10 16:15:02 +02:00
109a17e044 feat(voyage): add theme toggle button + delegated handler 2026-05-10 10:29:27 +02:00
79e5609a0e feat(voyage): port theme-bootstrap IIFE from llm-security; set data-theme dark default 2026-05-10 10:28:03 +02:00
ee1f4055c9 refactor(voyage): fix CSS link-order + replace literal pixel font-sizes 2026-05-10 10:27:24 +02:00