v0.9.9

Released April 19, 2026 · All releases

Changes

  • Expand refrakt plan init to fully wire the host project for agent use:
  • AGENTS.md is now canonical — full workflow content lives in AGENTS.md at the project root; tool-specific files (CLAUDE.md, .cursorrules, etc.) get one-line pointers to it.
  • Host package.json wiring — adds @refrakt-md/cli + @refrakt-md/plan to devDependencies (pinned to the running plan version) and "plan": "refrakt plan" to scripts. Walks up to find the install root (respects npm/pnpm/yarn/lerna workspaces). Never clobbers existing keys.
  • Claude SessionStart hook — writes .claude/settings.json with a hook that runs the detected package manager's install command if node_modules/.bin/refrakt is missing. Gated on Claude detection (explicit --agent claude or auto-detect seeing CLAUDE.md). PM detection happens at hook execution time by reading the lockfile, so switching package managers later just works.
  • ./plan.sh wrapper script — POSIX script that installs deps on first run and defers to npx refrakt plan "$@". Works in any agent environment where hooks aren't available.
  • Opt-out flags — --no-package-json, --no-hooks, --no-wrapper, and --minimal (all three) for users who want bare scaffolding.
  • Also fixes the esbuild dependency leak in @refrakt-md/plan: the bundleBehaviors helper now lazy-imports esbuild, so non-build plan commands (status, next, update, etc.) no longer fail to load when esbuild isn't installed. esbuild is declared as an optional peer dependency.