# Changelog

## 0.1.7 (2026-09-30)

- Fix: a rejected `pi.sendUserMessage` promise from `/init` is now caught and reported through the same notify/error path as sync failures (previously an unhandled rejection). Verified against Pi SDK 0.99.2.

## 0.1.6 (2026-09-28)

### Fixed

- `/init` check-mode findings and usage warnings now fall back to
  `console.error` when `ctx.ui` is absent (RPC/print mode) — matching the
  dispatch-failure path, they were previously silently dropped.

## 0.1.5 (2026-09-24)

### Fixed

- **Framework detection from package.json deps now matches exact names, not
  substrings.** `preact` no longer detects React, `vue-router` no longer
  detects Vue, and `next-themes` no longer detects Next.js — the old
  `dep.includes(...)` matchers flagged every lookalike package. Adds `nuxt` →
  Nuxt (same substring-bug class as `next`) and keeps `react-dom` → React and
  exact `sst` → SST. Map-based exact matching; test covers the lookalikes and
  all six real names.

## 0.1.4 (2026-09-22)

### Fixed

- **`/init check` no longer flags missing test/lint/build commands on
  non-Node repos.** Those findings only ever come from package.json scripts;
  cargo/go/python projects were told their test command was missing. They are
  now gated on JS/TS detection, matching what the generation prompt already
  did (it omits those lines when the scripts are absent).
- `/init` reports a prompt-dispatch failure via notify (or console.error when
  no UI) instead of crashing — `pi.sendUserMessage` is now guarded.

### Changed

- README: Pi link now points to github.com/earendil-works/pi (sibling packages).
- Dropped the write-only `scan.root` field.

## 0.1.3 (2026-09-21)

### Docs

- README now documents that `/init` targets `CLAUDE.md` when only
  `CLAUDE.md` exists (behavior since 0.1.2).

## 0.1.2 (2026-09-14)

### Fixed

- **buildInitPrompt always targeted AGENTS.md, even when the scan detected
  CLAUDE.md.** Detection was honored in `/init check` only; the generation
  prompt told the model to write AGENTS.md regardless. The prompt now uses the
  detected context file (`scan.agentsFile`) as the write target, falling back
  to AGENTS.md when no context file exists.

## 0.1.1 (2026-09-12)

### Fixed

- **Handler no longer assumes `ctx`/`ctx.ui` always exist.** `ctx?.cwd ||
  process.cwd()` and optional-chained `ctx?.ui?.notify` — siblings guard, the
  command handler crashed when the context was missing.
- **Prompts used `npm run …` even for pnpm/yarn/bun projects.** The generated
  AGENTS.md now emits the detected package manager's run form
  (`pnpm run test`, `yarn run build`, …); npm stays `npm run …`.
- `/init check` reports WHICH context file was found (`AGENTS.md exists` vs
  `CLAUDE.md exists`) instead of always claiming AGENTS.md.
- Dropped the unused `resolve` import.

## 0.1.0

- Initial release.
- `/init` command: scans repo (package.json, build systems, CI, dirs) and generates or updates `AGENTS.md`.
- `/init force` regenerates from scratch; `/init check` reports without writing.
- Detects npm/pnpm/yarn/bun, make/cargo/go/python/maven/gradle/cmake/elixir, GitHub Actions/GitLab/CircleCI/Azure/Travis.
- Zero dependencies, plain JS.
