Skip to content

Rename /goal/hunt: quarry, verdict vocabulary, trophy card writer #2092

@Hmbown

Description

@Hmbown

Rename /goal/hunt and ship the recovery-state vocabulary v0.8.45 needs.

You declare a quarry — what you're after. The whale gets a target. Each session-completion path returns a verdict: hunting, hunted, wounded, or escaped. v0.8.45's theme is interruptible, recoverable agentic work — without wounded and escaped you only have done-or-nothing. /hunt ships the vocabulary; the judge that decides verdicts lands in v0.8.46 (wired to the existing verifier preview) and the full jurisdiction system lands in v0.9.0.

Why now (v0.8.45 fit)

  • v0.8.45's milestone is "interruptible, recoverable agentic work across providers."
  • wounded and escaped are recovery-state vocabulary. Goal mode today can only complete-or-not — a session interrupted by network loss, a partial fix, an aborted hunt all collapse into the same nothing. After this issue they have distinct verdicts the runtime can act on.
  • Trophy cards are the recovery artifact. A hunted session leaves a deterministic, machine-readable record at ~/.codewhale/trophies/<date>-<slug>.md that the next session can pick up.
  • /goal exists today (crates/tui/src/commands/goal.rs, 183 lines, 5 localizations including mubiao). The rename is mechanical; the verdict + trophy additions are bounded.

Why the rename

Whales hunt — orcas cooperatively, sperm whales solo on giant squid, humpbacks via bubble-net. "Hunt" is more concrete than "goal" (a goal is something you set; a hunt is something you do) and it slots into the existing Constitution → Statutes → Regulations → Verdicts prompt hierarchy. The vocabulary also gives v0.8.46 verifier preview, the rest of the v0.8.x line, and the v0.9.0 judge a shared dialect.

In scope (v0.8.45 MVP)

  • Rename /goal/hunt. /goal stays as a back-compat alias for one cycle; deprecation notice in v0.8.48 per the rename-pass milestone.
  • Quarry — primary surface is /hunt <text>. Stored on the session as a frozen header turn. <session_goal> block in crates/tui/src/prompts.rs:777 becomes <quarry> (keep <session_goal> as alias for one cycle).
  • Verdict enum replacing the bool goal_completed:
    pub enum HuntVerdict {
        Hunting,             // default in-progress
        Hunted,              // declared done
        Wounded(String),     // partial — reason text
        Escaped(String),     // interrupted / abandoned — reason text
    }
  • Slash subcommands: /hunt <text>, /hunt done, /hunt wounded <reason>, /hunt escaped <reason>, /hunt clear, /hunt (status).
  • Trophy card writer. On hunted: write a markdown card to ~/.codewhale/trophies/<YYYY-MM-DD>-<slug>.md with quarry, turns, files touched (from working set), tests added (from diff), elapsed, sub-agents that helped (whale species names), final assistant message.
  • Theme + palette. mode_goal palette slot renames to mode_hunt; mode_goal kept as deprecated alias one cycle. theme_qa_audit.rs updated.
  • Localization. All 5 existing locales updated (EN/JA/ZH/PT/ES). HomeGoalModeTipHomeHuntModeTip; old id kept aliased one cycle.
  • Backward compat. Existing config keys, session files, and any persisted goal_* fields keep their names this cycle; rename pass in v0.8.48.

Out of scope (defer)

Acceptance

  • /hunt <text> opens hunt mode with the quarry visible in the transcript header until verdict.
  • /hunt done produces a trophy card on disk at the path above. Card has every field listed.
  • /hunt wounded "ran out of API budget" and /hunt escaped "user cancelled" produce no trophy and log the verdict to the session timeline.
  • /goal <text> still works as a back-compat alias; emits a one-line deprecation notice in the response ("/goal is now /hunt; this alias is removed in v0.8.48").
  • mubiao Chinese alias still works.
  • prompts.rs still wires the quarry into the system prompt (renamed block).
  • All 5 locales updated; unit test asserts every MessageId::HomeHuntModeTip translation exists.
  • Trophy card structure has a unit test (every field present, valid path).
  • cargo test --workspace --all-features --locked and the three parity gates green.

Notes

  • This is the bridge issue. v0.8.46's verifier-preview (already in scope for that milestone) consumes the verdict enum; v0.9.0's full judge fills in the jurisdiction policies. The vocabulary defined here is the contract those later milestones build on.
  • Whales do hunt — naming the mode after the act, not the abstraction, fits the rest of the whale theming (species sub-agent names, pods, etc.).

Existing issues this resolves on PR merge

Related (not closed yet — these resolve when the verifier and jurisdiction layers ship in v0.8.46 / v0.9.0):

Slate item 19/19. Tracking doc: .private/issue-slate.md (maintainer-only).

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestrustPull requests that update rust code

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions