feat(voyage): S6 — v5.5 brief framing enforcement (brief_version 2.2)

Implements the CLAUDE.md cross-cutting invariant "brief framing must match
operator intent" as a controlled brief_version 2.1->2.2 bump (operator option A1).
Three defense layers, version-gated at >=2.2 so existing 2.0/2.1 briefs stay
valid (forward + backward compatible), mirroring the phase_signals >=2.1 gate:

- L1 framing: enum field (preserve|refine|replace|new-direction). Enum-checked
  on any version when present (BRIEF_INVALID_FRAMING); missing at >=2.2 ->
  BRIEF_MISSING_FRAMING. /trekbrief Phase 2.5 collects it BEFORE any brief prose
  (non-skippable, even in --quick).
- L2 memory alignment: new brief-reviewer dimension 6 comparing brief Intent/Goal
  + framing against operator memory for explicit contradictions; degrades to
  score 5 (N/A) when no memory context is supplied. Wired into Phase 4e gate
  (memory_alignment.score >= 4).
- L3 obligatory ## TL;DR (<=5 content lines) at >=2.2; soft cap ->
  BRIEF_TLDR_TOO_LONG warning.

trekreview briefs are exempt from the framing/TL;DR gate. Handover 1 PUBLIC
CONTRACT doc, README "What's new", and the CLAUDE.md invariant + agents table
(brief-reviewer 5->6 dimensions) updated to 2.2 (schema axis only; plugin
version badge + CHANGELOG remain S10).

Iron Law followed: validator tests red->green first. Tests 586 -> 606
(+20, 604 pass / 2 skip). claude plugin validate passes (pre-existing
CLAUDE.md root-context warning unchanged).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqBYc8Ltrk7LipyJmGxXiB
This commit is contained in:
Kjell Tore Guttormsen 2026-06-18 13:09:50 +02:00
commit 736ae55d66
10 changed files with 409 additions and 31 deletions

View file

@ -1,6 +1,6 @@
---
type: trekbrief
brief_version: "2.1"
brief_version: "2.2"
created: {YYYY-MM-DD}
task: "{one-line task description}"
slug: {slug}
@ -10,6 +10,12 @@ research_status: pending # pending | in_progress | complete | skipped
auto_research: false # true if user opted into Claude-managed research
interview_turns: {N}
source: {interview | manual}
# v5.5 — framing: how this brief relates to prior operator intent. REQUIRED at
# brief_version ≥ 2.2. One of: preserve | refine | replace | new-direction.
# AskUserQuestion-validated in /trekbrief Phase 2.5 BEFORE any brief prose is
# written — the first layer of the framing-alignment defense (guards against the
# plan polishing a wrong premise after a rejected iteration).
framing: {preserve | refine | replace | new-direction}
# v5.1 — per-phase effort + model signal (Phase 3.5).
# `effort` ∈ {low, standard, high}. Omit `model:` for `standard` so composition
# falls through to profile resolver. Force-stop alternative is the commented
@ -33,6 +39,15 @@ phase_signals:
> reads it to produce the implementation plan. Every decision in the plan must
> trace back to content in this brief.
## TL;DR
*≤ 5 lines. The framing-anchored one-glance summary: what this brief asks for and
how it relates to prior operator intent (framing: {preserve | refine | replace |
new-direction}). Written FIRST so a reader catches a wrong premise before reading
the full brief. Required at brief_version ≥ 2.2.*
{≤5-line summary.}
## Intent
*Why are we doing this? What is the motivation, user need, or strategic context?