ktg-plugin-marketplace/plugins/voyage/commands
Kjell Tore Guttormsen 4fbc52bbb4 feat(voyage): add commands/trekrevise.md — 7th pipeline command + settings.json scope — v4.2 Step 6 [skip-docs]
Implements Phase 1-8 of /trekrevise (Handover 8 producer):
- Phase 1: parse mode + reject MULTI_ARTIFACT_NOT_SUPPORTED
- Phase 2: read source + check stale .local.bak
- Phase 3: parseAnchors + validateAnchorPlacement (no partial revisions)
- Phase 4: computeAnnotationDigest + non-additive detection
- Phase 5: revisionGuard orchestration (backup -> mutate -> validate -> rollback-on-fail)
- Phase 6: branch on outcome (applied / rolled-back / mutator-failed)
- Phase 7: optional review-gate (advisory, no auto-rollback)
- Phase 8: trekrevise-stats.jsonl + report

Frontmatter: name=trekrevise, model=opus, allowed-tools includes Read/Write/Edit/Bash/Grep/Glob.
Reuses lib/parsers/anchor-parser, lib/parsers/annotation-digest,
lib/util/markdown-write, lib/util/revision-guard, lib/validators/{brief,plan,review}.

settings.json: register new top-level scope trekrevise with
trekrevise-stats.jsonl tracking (mirrors trekplan/trekresearch shape).

Forward-pinning to keep doc-consistency invariants green:
- tests/lib/doc-consistency.test.mjs: known-scopes allowlist += trekrevise
- CLAUDE.md commands table: add /trekrevise row

Plan Step 13 owns the full README/CLAUDE.md/CHANGELOG content sync;
this commit is the implementation milestone, not the doc milestone.

Refs plan.md Step 6 + plan-critic M3.
2026-05-09 15:09:01 +02:00
..
trekbrief.md feat(voyage): document --profile flag in all 6 commands — SC #4 + arv-policy 2026-05-09 09:38:36 +02:00
trekcontinue.md feat(voyage): document --profile flag in all 6 commands — SC #4 + arv-policy 2026-05-09 09:38:36 +02:00
trekendsession.md feat(voyage)!: marketplace handoff — rename plugins/ultraplan-local to plugins/voyage [skip-docs] 2026-05-05 15:37:52 +02:00
trekexecute.md feat(voyage): document --profile flag in all 6 commands — SC #4 + arv-policy 2026-05-09 09:38:36 +02:00
trekplan.md feat(voyage): document --profile flag in all 6 commands — SC #4 + arv-policy 2026-05-09 09:38:36 +02:00
trekresearch.md feat(voyage): add 5 additive profile fields to JSONL stats — SC #11 2026-05-09 09:40:21 +02:00
trekreview.md feat(voyage): document --profile flag in all 6 commands — SC #4 + arv-policy 2026-05-09 09:38:36 +02:00
trekrevise.md feat(voyage): add commands/trekrevise.md — 7th pipeline command + settings.json scope — v4.2 Step 6 [skip-docs] 2026-05-09 15:09:01 +02:00