feat(ultraplan-local): v2.1.0 — dynamic quality-gated interview

Replace hardcoded Q1-Q8 in /ultrabrief-local with a section-driven
completeness loop (Phase 3) and a draft/review/revise loop with
brief-reviewer as stop-gate (Phase 4). Quality drives the interview,
not a question counter.

brief-reviewer now emits a machine-readable JSON block with per-dimension
scores (1-5) and detail arrays alongside the existing prose report;
planning-orchestrator continues to consume the prose verdict unchanged.

Phase 4 gate: all dimensions >= 4 AND research_plan = 5. On fail, a
targeted follow-up is generated from the weakest dimension's detail
field and the draft is re-reviewed. Max 3 review iterations bound cost;
exhaustion writes brief.md with brief_quality: partial and an explicit
Brief Quality section. Force-stop surfaces per-dimension findings before
the user chooses continue or partial.

Not breaking. /ultrabrief-local [--quick] <task> interface unchanged.
--quick now means compact start with escalation, not a max-N cap.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Kjell Tore Guttormsen 2026-04-18 09:43:43 +02:00
commit 1634197853
8 changed files with 501 additions and 120 deletions

View file

@ -4,6 +4,61 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [2.1.0] - 2026-04-18
### Changed — Dynamic, quality-gated interview in `/ultrabrief-local`
The Phase 3 interview is no longer a hardcoded Q1Q8 list with a numeric
cap (34 questions in `--quick`, 58 in default). It is now a
**section-driven completeness loop**: the command maintains per-section
state (Intent, Goal, Success Criteria, Research Plan, and five optional
sections), picks the next question from the section with the weakest
signal, and keeps probing until all four required sections meet an
initial-signal gate. Quality drives the loop, not a counter.
Phase 4 adds a **draft → brief-reviewer → revise** loop. The brief is
drafted in memory, written to `brief.md.draft`, reviewed by the
`brief-reviewer` agent as a stop-gate, and only renamed to `brief.md`
after all five dimensions pass (`completeness/consistency/testability/
scope_clarity ≥ 4` and `research_plan == 5`). If the gate fails, a
targeted follow-up is generated from the weakest dimension's detail
field and the draft is re-reviewed. The loop is capped at 3 review
iterations to bound cost; exhaustion writes the brief with
`brief_quality: partial` and an explicit `## Brief Quality` section.
Force-stop path: when the user says "stop" during Phase 4, the current
review findings are surfaced with per-dimension scores before asking
whether to continue or accept a partial brief. No silent exits.
Not breaking. The `/ultrabrief-local [--quick] <task>` interface is
unchanged from the outside; only internals change. `--quick` now means
"start compact, escalate if gates fail" rather than "max 4 questions".
### Added
- **JSON output from `brief-reviewer`** — the agent now emits a final
fenced `json` block with per-dimension `score` (15) and `detail`
arrays (`gaps`, `issues`, `weak_criteria`, `unclear_sections`,
`invalid_topics`) alongside the existing prose report. The JSON block
is mandatory; empty arrays and `score: 5` are required when a
dimension passes cleanly. `planning-orchestrator` continues to use
the prose verdict unchanged.
- **`brief_quality` frontmatter field** on task briefs — `complete`
(default) when the Phase 4 gate passed, or `partial` when the
iteration cap was hit or the user force-stopped with known issues.
`planning-orchestrator` can inspect this to decide how heavily to
weight brief sections as assumptions.
- **`review_iterations` and `brief_quality` in ultrabrief-stats** —
recorded per run for telemetry.
### Changed
- Hard rule added: `/ultrabrief-local` never writes `brief.md` while the
review gate is pending. The draft lives in `brief.md.draft` until the
loop terminates.
- Hard rule added: no hard cap on Phase 3 questions; the brief-review
gate is the only loop bound (3-iteration cap) and is in Phase 4.
## [2.0.0] - 2026-04-18
### Breaking — Four-command pipeline with dedicated brief step