diff --git a/CHANGELOG.md b/CHANGELOG.md index f71c9870..893b3f39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [0.6.5] - 2026-03-18 + +### Added + +- **Safety guardrails you can turn on with one command.** Say "be careful" or "safety mode" and `/careful` will warn you before any destructive command — `rm -rf`, `DROP TABLE`, force-push, `kubectl delete`, and more. You can override every warning. Common build artifact cleanups (`rm -rf node_modules`, `dist`, `.next`) are whitelisted. +- **Lock edits to one folder with `/freeze`.** Debugging something and don't want Claude to "fix" unrelated code? `/freeze` blocks all file edits outside a directory you choose. Hard block, not just a warning. Run `/unfreeze` to remove the restriction without ending your session. +- **`/guard` activates both at once.** One command for maximum safety when touching prod or live systems — destructive command warnings plus directory-scoped edit restrictions. +- **You can now see which skills you use and how often.** Every skill invocation is logged locally to `~/.gstack/analytics/skill-usage.jsonl`. Run `bun run analytics` to see your top skills, per-repo breakdown, and how often safety hooks actually catch something. Data stays on your machine. +- **Weekly retros now include skill usage.** `/retro` shows which skills you used during the retro window alongside your usual commit analysis and metrics. + ## [0.6.4.1] - 2026-03-18 ### Added diff --git a/TODOS.md b/TODOS.md index 4c8433ae..be017eae 100644 --- a/TODOS.md +++ b/TODOS.md @@ -484,34 +484,17 @@ Shipped as `/design-consultation` on garrytan/design branch. Renamed from `/setu ## Safety & Observability -### On-demand hook skills (/careful, /freeze, /guard) +### On-demand hook skills (/careful, /freeze, /guard) — SHIPPED -**What:** Three new skills that use Claude Code's session-scoped PreToolUse hooks to add safety guardrails on demand. +~~**What:** Three new skills that use Claude Code's session-scoped PreToolUse hooks to add safety guardrails on demand.~~ -**Why:** Anthropic's internal skill best practices recommend on-demand hooks for safety. Claude Code already handles destructive command permissions, but these add an explicit opt-in layer for high-risk sessions (touching prod, debugging live systems). +Shipped as `/careful`, `/freeze`, `/guard`, and `/unfreeze` in v0.6.5. Includes hook fire-rate telemetry (pattern name only, no command content) and inline skill activation telemetry. -**Skills:** -- `/careful` — PreToolUse hook on Bash tool. Warns (not blocks) before destructive commands: `rm -rf`, `DROP TABLE`, `git push --force`, `git reset --hard`, `kubectl delete`, `docker system prune`. Uses `permissionDecision: "ask"` so user can override. -- `/freeze` — PreToolUse hook on Edit/Write tools. Restricts file edits to a user-specified directory. Great for debugging without accidentally "fixing" unrelated code. -- `/guard` — meta-skill composing `/careful` + `/freeze` into one command. +### Skill usage telemetry — SHIPPED -**Implementation notes:** Use `${CLAUDE_SKILL_DIR}` (not `${SKILL_DIR}`) for script paths in hook commands. Pure bash JSON parsing (no jq dependency). Freeze dir storage: `${CLAUDE_PLUGIN_DATA}/freeze-dir.txt` with `~/.gstack/freeze-dir.txt` fallback. Ensure trailing `/` on freeze dir paths to prevent `/src` matching `/src-old`. +~~**What:** Track which skills get invoked, how often, from which repo.~~ -**Effort:** M (human) / S (CC) -**Priority:** P3 -**Depends on:** None - -### Skill usage telemetry - -**What:** Track which skills get invoked, how often, from which repo. - -**Why:** Enables finding undertriggering skills and measuring adoption. Anthropic uses a PreToolUse hook for this; simpler approach is appending JSONL from the preamble. - -**Context:** Add to `generatePreamble()` in `scripts/gen-skill-docs.ts`. Append to `~/.gstack/analytics/skill-usage.jsonl` with skill name, timestamp, and repo name. `mkdir -p` ensures the directory exists. - -**Effort:** S (human) / S (CC) -**Priority:** P3 -**Depends on:** None +Shipped in v0.6.5. TemplateContext in gen-skill-docs.ts bakes skill name into preamble telemetry line. Analytics CLI (`bun run analytics`) for querying. /retro integration shows skills-used-this-week. ## Completed diff --git a/VERSION b/VERSION index f4362155..ef5e4454 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.6.4.1 +0.6.5