chore(voyage): release v5.0.1 — drop standalone HTML render; print literal /playground document-critique invocation

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>
This commit is contained in:
Kjell Tore Guttormsen 2026-05-13 13:24:32 +02:00
commit 2e0892cdaf
15 changed files with 206 additions and 563 deletions

View file

@ -483,30 +483,35 @@ If the validator returns errors, report them to the user and offer to
re-enter Phase 4 with the validator's hints in scope. If only warnings,
note them in the final report.
**Render to HTML + link (annotation via /playground):** after `brief.md`
is final, render it to a self-contained HTML view in the same directory:
**Report — single block, printed verbatim** (substitute the bracketed
fields, but keep the structure and the `/playground` invocation literal —
operators copy-paste that line directly into Claude). The `/playground`
command points at the official `claude-plugins-official` `playground`
skill, which loads its `document-critique` template, reads the brief,
generates per-line suggestions, and writes a single self-contained HTML
file that opens in the browser. The HTML has the brief on the left
(nicely formatted, line-numbered), suggestion cards on the right
(Approve / Reject / Comment), and a "Copy Prompt" button at the bottom
that gathers everything marked into one prompt. Paste that prompt back
into Claude — Claude then revises `brief.md` freehand from the notes.
```bash
node ${CLAUDE_PLUGIN_ROOT}/scripts/render-artifact.mjs "{PROJECT_DIR}/brief.md"
```
This writes `{PROJECT_DIR}/brief.html` — zero-network, design-system-styled
(frontmatter folded into a `<details>` block). If it exits non-zero, surface
a one-line warning and continue — the rendered view is a convenience, not a
gate.
Report:
```
Brief written: {PROJECT_DIR}/brief.md
Brief rendered: file://{abs path to brief.html}
Brief written: {PROJECT_DIR}/brief.md
Review iterations: {1..3}
Final quality: {complete | partial}
Validator: {PASS | warnings(N)}
Final quality: {complete | partial}
Validator: {PASS | warnings(N)}
Research topics identified: {N}
To annotate: open brief.html, then run the `/playground` plugin
(document-critique template) on brief.md and paste the generated
prompt back here. Claude revises brief.md freehand from your notes.
────────────────────────────────────────────────────────────────────
To review and annotate this brief, copy and paste this into Claude:
/playground build a document-critique playground for {PROJECT_DIR}/brief.md
That builds a self-contained HTML file with the brief on the left,
per-line approve/reject/comment annotations on the right, and a
"Copy Prompt" button at the bottom. Copy the generated prompt, paste
it back here, and Claude revises brief.md from your notes.
────────────────────────────────────────────────────────────────────
```
## Phase 5 — Auto-orchestration opt-in (if research_topics > 0)

View file

@ -769,28 +769,32 @@ If the user asks questions or requests changes:
- Show what changed
- Re-present the summary
### Render to HTML + link (annotation via /playground)
### Print the annotation invocation
After `plan.md` is final, render it to a self-contained HTML view in the
same project directory and print the `file://` link:
```bash
node ${CLAUDE_PLUGIN_ROOT}/scripts/render-artifact.mjs "{plan_path}"
```
This writes `{plan_dir}/plan.html` — a zero-network, design-system-styled
page (frontmatter folded into a `<details>` block, code fences in styled
`<pre>`). Print:
After the plan summary, print this block **verbatim** (substituting only
`{plan_path}` with the absolute path). The `/playground` command must
appear literally — operators copy-paste it directly into Claude. It
points at the official `claude-plugins-official` `playground` skill,
which loads its `document-critique` template, reads `plan.md`, generates
per-line suggestions, and writes a single self-contained HTML file that
opens in the browser. The HTML has the plan on the left (nicely
formatted, line-numbered), suggestion cards on the right (Approve /
Reject / Comment), and a "Copy Prompt" button at the bottom that gathers
everything marked into one prompt. Paste that prompt back into Claude —
Claude then revises `plan.md` freehand from the notes.
```
Plan rendered: file://{abs path to plan.html}
To annotate: open it, then run the `/playground` plugin
(document-critique template) on plan.md and paste the generated
prompt back here. Claude revises plan.md freehand from your notes.
```
────────────────────────────────────────────────────────────────────
To review and annotate this plan, copy and paste this into Claude:
If `render-artifact.mjs` exits non-zero, surface a one-line warning and
continue — the rendered view is a convenience, not a gate.
/playground build a document-critique playground for {plan_path}
That builds a self-contained HTML file with the plan on the left,
per-line approve/reject/comment annotations on the right, and a
"Copy Prompt" button at the bottom. Copy the generated prompt, paste
it back here, and Claude revises plan.md from your notes.
────────────────────────────────────────────────────────────────────
```
## Phase 11 — Handoff

View file

@ -262,17 +262,6 @@ Append a stats line to `${CLAUDE_PLUGIN_DATA}/trekreview-stats.jsonl`
If `${CLAUDE_PLUGIN_DATA}` is unset or not writable, skip stats silently.
Never let stats failures block the main workflow.
**Render to HTML + link (annotation via /playground):** after `review.md`
is final, render it to a self-contained HTML view in the same directory:
```bash
node ${CLAUDE_PLUGIN_ROOT}/scripts/render-artifact.mjs "{review_path}"
```
This writes `{project_dir}/review.html` — zero-network, design-system-styled.
If it exits non-zero, surface a one-line warning and continue — the rendered
view is a convenience, not a gate.
## Phase 8.5 — Validate-only mode (`--validate`)
When `mode == validate`:
@ -293,7 +282,6 @@ After the write succeeds, print:
**Brief:** {brief_path}
**Project:** {project_dir}
**Review:** {review_path}
**Rendered:** file://{abs path to review.html}
**Scope:** {before_sha}..{after_sha} ({reviewed_files_count} files)
**Verdict:** {BLOCK | WARN | ALLOW}
@ -308,12 +296,20 @@ After the write succeeds, print:
...
{up to 5 highest-severity findings}
You can:
- Read the full review at {review_path} (or open review.html in a browser)
────────────────────────────────────────────────────────────────────
To review and annotate this review, copy and paste this into Claude:
/playground build a document-critique playground for {review_path}
That builds a self-contained HTML file with the review on the left,
per-line approve/reject/comment annotations on the right, and a
"Copy Prompt" button at the bottom. Copy the generated prompt, paste
it back here, and Claude revises review.md from your notes.
────────────────────────────────────────────────────────────────────
You can also:
- Feed BLOCKER + MAJOR findings into a follow-up plan:
/trekplan --brief {review_path}
- Annotate: run the `/playground` plugin (document-critique template) on
review.md and paste the generated prompt back here
- Re-run with `--quick` for a faster correctness-only pass
- Re-run with `--since <ref>` to narrow scope
```