SIGN IN SIGN UP

feat(vibe): add first-class Mistral Vibe support (#1480)

* feat(vibe): add first-class Mistral Vibe support

Register the mistral-vibe origin and wire plan-review gate, annotate-last, and installer surfacing. Origin in AGENT_CONFIG/PromptRuntime/PLAN_TOOL_NAMES; gate resolves newest plan from $VIBE_HOME/plans by mtime and fails open; annotate-last session discovery; installer three-layer skip + managed hook block (sh) / manual instructions (ps1/cmd); apps/vibe artifacts + skills; docs + freshness guard.

* fix(vibe): match Vibe 2.25+ hook reality; transcript-pinned plans; uninstall coverage

Addresses the #1480 review against current Vibe upstream:

- Installer: drop the enable_experimental_hooks config.toml leg (hooks are
  stable in Vibe 2.25+, and the old flag+pre_tool combo was never valid on
  any single version). Hook command is argv-only with the absolute binary
  path (unquoted heredoc now interpolates PLANNOTATOR_BIN), so it runs
  under shell and shell-free executors. Detection requires an existing
  VIBE home, so a stray 'vibe' binary never creates ~/.vibe.
- Gate: detect the Vibe origin from the hook payload (pre_tool +
  exit_plan_mode), no baked env prefix; PLANNOTATOR_ORIGIN stays as the
  manual override. Pin the plan by scanning transcript_path for the last
  write_file/edit targeting the plans dir (kills cross-session
  cross-serve on the global dir), fall back to newest-by-mtime within a
  10-minute freshness window, else fail open. The awk managed-marker
  comment now tells the truth about a missing end marker.
- annotate-last: the index-absent fallback filters candidate sessions by
  meta.json working_directory instead of picking the newest across all
  projects.
- Uninstaller: strip the managed hooks.toml block by markers and remove
  the Vibe skill dirs, so plannotator uninstall leaves no hook invoking a
  deleted binary.
- Tests: vibe-plan.test.ts saves/restores VIBE_HOME in beforeEach/afterEach;
  new resolver and uninstall coverage; install.test.ts asserts the
  argv-only command and the absence of the config leg.
- Docs: PLANNOTATOR_SKIP_VIBE_INSTALL row in the marketing env-vars doc;
  AGENTS.md row updated for the new hook shape.

* chore: drop the .pr-desc-*.md gitignore entry

* fix(uninstall): honor dry-run and report the Vibe hooks.toml rewrite

cleanupVibeHooks rewrote hooks.toml even under --dry-run and never
reported the change. It now records the planned rewrite on dry-run,
reports the removal on a real run, and keeps the file's CRLF line
endings. The installer's hooks.toml.bak is left alone: it is a copy of
the user's pre-install file, not something Plannotator owns.

* fix(install): Windows installers detect Vibe by its home and skip Vibe skills

install.ps1 and install.cmd counted a vibe binary on PATH as Vibe
detected and then created the Vibe skills directory. Detection now
requires the Vibe home to exist, matching install.sh.

The apps/vibe skills run PLANNOTATOR_ORIGIN=mistral-vibe plannotator ...,
a POSIX env-prefix. On Windows, Vibe's shell tool runs it through Git
Bash when it can find one and falls back to PowerShell otherwise, where
that syntax fails. The Windows installers therefore no longer copy the
Vibe skills and write nothing under the Vibe home; Vibe still loads the
shell-neutral core skills from ~/.agents/skills.

* docs(vibe): fix --skip-vibe help, add mistral-vibe origin row and apps/vibe to project structure

* fix(vibe): compare the plans dir by realpath when pinning a plan from the transcript

isInsidePlansDir compared dirname strings exactly, so a symlinked
VIBE_HOME (or a symlinked segment in the transcript path) or a
non-normalized path such as plans//x.md missed the pin and fell back to
newest-by-mtime. Both sides are now resolved and realpath'd, falling
back to the resolved path when realpath fails.

* docs(install): /plannotator-last is not supported for Vibe on Windows yet

The Windows notes claimed every shared command works for Vibe through
~/.agents/skills. Review and annotate do, without a Vibe origin label,
but /plannotator-last without PLANNOTATOR_ORIGIN takes the Claude Code
transcript path, so it fails or could read a Claude session in the same
project.

* install: print the Vibe section only when Vibe is detected; type skipInstall.vibe

---------

Co-authored-by: Michael Ramos <mdramos8@gmail.com>
J
Julien Tanay committed
bdf122f4c9b8fce38603b656d62608c289dc773d
Parent: 39f3f45
Committed by GitHub <noreply@github.com> on 9/24/2026, 7:39:32 PM