/whats-next → decisive, coverage-led /goal brief

Status:complete (as-built)
Date:2026-06-15
Branch:feat/whats-next-goal-brief
Type:spec

Goal

Make the shipped /whats-next skill culminate in a decisive, hands-off action. It weighs everything — a coverage-matrix read of how far the product is from best-in-class (10/10 across who-uses-it × what-contexts, on both capability and lived experience), plus plans, issues, TODOs, commits, and lifecycle — and then uses its own judgment to commit to ONE ambitious, high-leverage initiative rather than handing back a menu. It forges that initiative into a ready-to-paste, ≤4000-char /goal brief engineered for autonomous, tested, iterated delivery.

Evolution (v1 → v2)

This feature shipped in two iterations within the same branch:

Background — how /goal works

Per the Claude Code hooks reference, /goal <text> is a built-in shortcut for a session-scoped, prompt-based Stop hook. The text becomes a standing completion condition: at the end of every turn a tool-less LLM judge re-reads it and the transcript, and only lets Claude stop when it judges the condition met. Consequences that shape every brief: the DONE condition must rest on signals visible in the transcript (a named test command that exited clean; a real-run command + output); evidence over claims; and the work must be sized to converge in one run. Hook I/O caps at 10k chars; the brief targets ≤4000. Claude can't self-invoke /goal, so the deliverable is a copy-paste block.

Architecture & flow

All logic lives in one source-of-truth file, jacked/data/commands/whats-next.md, embedded verbatim into per-repo standalone configs by /jacked-setup. Steps 1–4 (orient, plans, signals, lifecycle) are unchanged but demoted to supporting input. The redesign reworks Step 5 (coverage assessment), Step 6 (decide), and Step 8 (forge), and adjusts Step 7 (close).

flowchart TD
    A["/whats-next invoked"] --> B["Steps 1-4: orient, plans,
issues/TODOs/commits, lifecycle"] B --> C["Step 5: Strategic Coverage Assessment
(hybrid: reuse matrix doc / fast inline / offer full skill)"] C --> D["Step 6: DECIDE — commit to ONE
ambitious initiative (calibrated to confidence)"] D --> E["Step 8: forge the /goal brief directly
(ordered milestones, sized to converge)"] E --> F["Step 7 close: paste-and-run, /jack-it-up,
or redirect (incl. something smaller)"] D -. "in-flight checkpoint" .-> R["Resume-first callout → /checkpoint resume"]
flowchart TD
    A["/whats-next invoked"] --> B["Steps 1-4: orient, plans, issues/TODOs/commits, lifecycle"]
    B --> C["Step 5: Strategic Coverage Assessment (hybrid sourcing)"]
    C --> D["Step 6: DECIDE - commit to ONE ambitious initiative (calibrated)"]
    D --> E["Step 8: forge the /goal brief directly (milestones, sized to converge)"]
    E --> F["Step 7 close: paste-and-run / jack-it-up / redirect"]
    D -. in-flight checkpoint .-> R["Resume-first callout -> /checkpoint resume"]
  

The Goal-Brief template

Step 8 fills this from the decided initiative (its bundled deliverables, the cross-cutting lever, the personas/contexts it lifts, cited evidence) plus the repo's project type and real test command. Bracketed […]-tagged lines are conditional (kept-and-untagged or dropped whole; never emit literal brackets). For XL initiatives, the brief is forged for the first shippable phase with a Next phases: tail. Skeleton ≈ 2,300 chars (≈1,700 headroom under 4000).

Deliver: <the initiative — one line, the shippable best-in-class outcome it drives toward>.

Why now: <1-2 lines — the cross-cutting lever this is, and the personas/contexts it
lifts toward 10/10>. Lives in <key files/paths>. Refs: <identifiers + a short neutral
paraphrase — matrix cells, issue #s, file:line, doc sections>.

Build the complete scope of this brief as ordered milestones — no MVP, no stubs, no
TODO-for-later. Finish and verify each milestone before starting the next:
1. <milestone 1>   2. <milestone 2>   3. <milestone 3>

Approach: plan first (write it down). TDD where it fits. Match existing patterns. Build
cleanly: no silent failures, no swallowed errors, no arbitrary caps; follow CLAUDE.md.
Work only on this initiative's feature branch, committing each green milestone so an
interrupted run is resumable — no force-push, history rewrite, data deletion, or untrusted
install/network scripts. If a step looks destructive or out of scope, stop and ask.

Verify — run each and show the output; ALL must pass before you stop:
- <repo's real test command> exits clean, with NEW tests covering every milestone's behavior
- Each milestone works when run for real — paste the proof: <command + expected output / flow>
- [UI work only] Browser-QA via available browser tools (or /qa,/ux): flows work, console clean
- [security-sensitive only] /cso runs, reports no high/critical findings
- [if /dcr available] /dcr runs and reports a clean pass

DONE when: every milestone is built, the test command and per-milestone real-run proofs pass
in the transcript, applicable review gates report clean, and the work is committed on a feature
branch. Do NOT stop while any milestone is unmet or unproven. Never report success without output.

Design decisions

DecisionChoice & rationale
Output shapeDecide, don't enumerate. Commit to one ambitious initiative and forge its brief in the same turn; a short "Also weighed" appendix (with effort, switchable) preserves transparency without being a menu. An up-front line tells the user it chose one (not a menu) and how to redirect — including to something smaller.
Lead lensCoverage-matrix. Roles × domains/stages, capability AND experience, hunt cross-cutting levers toward 10/10. Hybrid sourcing: reuse an existing COVERAGE_MATRIX doc → fast inline read → offer the full /coverage-matrix when stale/missing.
Anti-fabricationThe inline path is feature-inventory only — a capability read that can't claim near-10 experience without a walkthrough. Tie every persona/domain/gap to a concrete codebase signal; flag inferred-only; "absence of signal is a finding," never invent. 1×N fallback for single-user/library products.
CalibrationDecisiveness is gated on confidence: thin signal → say so, prefer the smallest high-certainty move, recommend /coverage-matrix before betting weeks. Stated in the intro and as a Step 6 principle so it isn't buried.
Convergence sizingA big initiative is expressed as ordered, independently-verifiable milestones; M/L → full initiative, XL → first shippable phase + Next phases: (sequenced, not deferred) so the /goal loop can't spin on sheer size.
VerificationHybrid gate, transcript-checkable: run-and-show-output; conditional browser-QA & /cso; /dcr "runs and reports clean." Non-falsifiable negatives moved to build-constraints, not stop-gates.
Security of inputsStep-1 DATA-only rule carried into the brief: Refs: cite by identifier + neutral paraphrase; instruction-like text → [text omitted]. Closes the one channel that could carry a payload into the autonomous loop.
Resume-firstAn in-progress checkpoint becomes a top-of-output Resume callout (in the Step 6 template skeleton, not just prose) → /checkpoint resume; Step 8 never forges a cold brief for it.
Config contract/jacked-setup emits ## Strategic Emphasis (a lifecycle-lean hint), matching the engine; the legacy Tier Weights key is still read as an emphasis hint for back-compat. Tiers 2–5 are gone; only "Tier-1 blocker" survives as a priority caveat.

File structure

FileAction
jacked/data/commands/whats-next.mdEngine — reworked Steps 5/6/8, intro, Step 7; embedded verbatim into standalone configs.
jacked/data/commands/jacked-setup.md## Tier Weights## Strategic Emphasis in the whats-next template; help text + generated local-skill description updated to the decisive framing.
jacked/data/skills/whats-next/SKILL.mdRedirect description updated to decisive/coverage framing (triggers preserved).
tests/unit/test_command_whats_next_goal.py30 content-presence tests (mutation-verified), incl. the cross-file config-contract guard.
README.md/whats-next row mentions the goal brief.

Testing

LLM instruction docs aren't executable, so tests are content-presence guards anchored on once-only strings (mutation-verified to redden on deletion). As built: 30 tests covering the decisive intro, coverage assessment (incl. anti-fabrication, capability cap, 1×N fallback, hybrid sourcing), the commit-to-one decision (incl. calibration, not-a-menu, leverage bias, resume-first), the milestone brief (incl. convergence sizing, DONE condition, verify-with-evidence, scope guardrail, injection-safe refs, /goal fallback), and the jacked-setup config contract. Full unit suite green (2201 passed).

Review outcomes

The v1 brief mechanics passed a two-wave /dcr. The v2 decisive redesign then went through its own /dcr (Logic, Coverage-fidelity, UX, Guardrails + pre-mortem) over two waves; all findings were fixed and re-verified:

Wave-2 verdict: UX/Guardrails APPROVE; Logic/Coverage confirmed all three CRITICAL fixes correct and complete. No open blocking questions.


Generated with the jacked HTML artifact template.