From fa32a58f6e9e44f2a510b2866d51492e2c71954a Mon Sep 17 00:00:00 2001 From: kochetkov-ma Date: Sun, 9 Aug 2026 16:14:43 +0100 Subject: [PATCH] v5.2.4: reconcile three drifted hook helpers - pruneStale symlink hardening, safeSegment numeric ids, recordTouched dedupe --- .claude-plugin/marketplace.json | 10 ++++----- .../skills/teams-setup/scripts/trace-ops.sh | 2 +- .../assets/think-short-prompt-counter.mjs | 2 +- .../assets/think-short-prompt.md | 2 +- .../assets/think-short-session.mjs | 2 +- RELEASE-NOTES.md | 21 +++++++++++++++++++ brewcode/.claude-plugin/plugin.json | 2 +- .../skills/teams-setup/scripts/trace-ops.sh | 2 +- brewcode/README.md | 2 +- brewcode/agents/agent-creator.md | 2 +- brewcode/agents/bash-expert.md | 2 +- brewcode/agents/bc-rules-organizer.md | 2 +- brewcode/agents/hook-creator.md | 2 +- brewcode/agents/skill-creator.md | 2 +- brewcode/docs/commands.md | 2 +- brewcode/docs/file-tree.md | 6 +++--- brewcode/package.json | 4 ++-- .../assets/semble-first.md.template | 2 +- .../semble-setup/assets/semble-prefetch.mjs | 2 +- .../semble-setup/assets/semble-session.mjs | 2 +- .../semble-setup/assets/semble-stats.mjs | 2 +- .../semble-setup/assets/sembleignore.template | 2 +- .../references/artifact-metadata.md | 2 +- .../skills/teams-setup/scripts/trace-ops.sh | 2 +- brewdoc/.claude-plugin/plugin.json | 2 +- brewdoc/README.md | 2 +- brewdoc/docs/commands.md | 2 +- .../docsync-setup/assets/docsync-gate.mjs | 2 +- .../docsync-setup/assets/docsync-track.mjs | 5 +++-- .../docsync-setup/assets/docsync-watch.mjs | 2 +- .../references/agent-audit.md | 2 +- .../memory-sync-setup/references/hard-sync.md | 2 +- .../references/memory-guide.md | 2 +- brewtools/.claude-plugin/plugin.json | 2 +- .../assets/think-short-prompt-counter.mjs | 2 +- .../assets/think-short-prompt.md | 2 +- .../assets/think-short-session.mjs | 2 +- brewtools/README.md | 2 +- brewtools/agents/deploy-admin.md | 2 +- brewtools/agents/ssh-admin.md | 2 +- brewtools/agents/text-optimizer.md | 2 +- brewtools/hooks/hardmode-guard.mjs | 2 +- brewtools/hooks/lib/manager-state.mjs | 2 +- .../assets/agent-deadline-cleanup.mjs | 2 +- .../assets/agent-deadline-guard.mjs | 2 +- .../assets/agent-router.mjs | 11 +++++++--- .../assets/think-short-prompt-counter.mjs | 2 +- .../assets/think-short-prompt.md | 2 +- .../assets/think-short-session.mjs | 2 +- .../assets/think-short-task.mjs | 2 +- brewui/.claude-plugin/plugin.json | 2 +- brewui/README.md | 2 +- 52 files changed, 88 insertions(+), 61 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 0913f18..53bb3da 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -6,13 +6,13 @@ }, "metadata": { "description": "Claude Code plugin suite: brewcode for infinite task execution, brewdoc for documentation tools, brewtools for text utilities, brewui for UI/visual/creative tools", - "version": "5.2.3" + "version": "5.2.4" }, "plugins": [ { "name": "brewcode", "description": "Brewcode - full-featured development platform for Claude Code: infinite focus tasks, prompt optimization, skill/agent creation, quorum reviews, rules management", - "version": "5.2.3", + "version": "5.2.4", "category": "productivity", "keywords": [ "brewcode", @@ -46,7 +46,7 @@ { "name": "brewdoc", "description": "Brewdoc - Claude Code documentation tools: my-claude installation docs, memory sync, md-to-pdf conversion", - "version": "5.2.3", + "version": "5.2.4", "category": "productivity", "keywords": [ "brewdoc", @@ -72,7 +72,7 @@ { "name": "brewtools", "description": "Brewtools - universal utilities for Claude Code: text optimization, humanization, secrets scanning", - "version": "5.2.3", + "version": "5.2.4", "category": "productivity", "keywords": [ "brewtools", @@ -100,7 +100,7 @@ { "name": "brewui", "description": "Placeholder for future UI/visual/creative tools (currently empty, installable)", - "version": "5.2.3", + "version": "5.2.4", "category": "productivity", "keywords": [ "ui", diff --git a/.codex/plugins/brewcode/skills/teams-setup/scripts/trace-ops.sh b/.codex/plugins/brewcode/skills/teams-setup/scripts/trace-ops.sh index 56d6247..cd2f008 100755 --- a/.codex/plugins/brewcode/skills/teams-setup/scripts/trace-ops.sh +++ b/.codex/plugins/brewcode/skills/teams-setup/scripts/trace-ops.sh @@ -1,5 +1,5 @@ #!/bin/sh -# brewcode-meta: version=5.2.3 generated_by=brewcode:teams-setup +# brewcode-meta: version=5.2.4 generated_by=brewcode:teams-setup set -eu USAGE="Usage: trace-ops.sh [args...]" diff --git a/.codex/plugins/brewtools/skills/think-short-setup/assets/think-short-prompt-counter.mjs b/.codex/plugins/brewtools/skills/think-short-setup/assets/think-short-prompt-counter.mjs index fe7a7b9..20ee2ea 100644 --- a/.codex/plugins/brewtools/skills/think-short-setup/assets/think-short-prompt-counter.mjs +++ b/.codex/plugins/brewtools/skills/think-short-setup/assets/think-short-prompt-counter.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewtools:think-short-setup +// brewcode-meta: version=5.2.4 generated_by=brewtools:think-short-setup /** * think-short — UserPromptSubmit hook (self-contained, no plugin-root deps). * diff --git a/.codex/plugins/brewtools/skills/think-short-setup/assets/think-short-prompt.md b/.codex/plugins/brewtools/skills/think-short-setup/assets/think-short-prompt.md index 99524fe..ed0d030 100644 --- a/.codex/plugins/brewtools/skills/think-short-setup/assets/think-short-prompt.md +++ b/.codex/plugins/brewtools/skills/think-short-setup/assets/think-short-prompt.md @@ -1,4 +1,4 @@ - + Be terse. Lead with results. Use ASCII unless the requested artifact requires other text. Think short: keep internal reasoning minimal and do not narrate exploration. Search before opening large files. Prefer focused edits and parallel read-only checks. diff --git a/.codex/plugins/brewtools/skills/think-short-setup/assets/think-short-session.mjs b/.codex/plugins/brewtools/skills/think-short-setup/assets/think-short-session.mjs index 027d506..f213e8b 100644 --- a/.codex/plugins/brewtools/skills/think-short-setup/assets/think-short-session.mjs +++ b/.codex/plugins/brewtools/skills/think-short-setup/assets/think-short-session.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewtools:think-short-setup +// brewcode-meta: version=5.2.4 generated_by=brewtools:think-short-setup /** * think-short — SessionStart hook (self-contained, no plugin-root deps). * diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index c445e55..df9bd0f 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -2,6 +2,27 @@ --- +## v5.2.4 (2026-08-09) + +> Docs: [agent-router-setup](https://doc-claude.brewcode.app/brewtools/skills/agent-router-setup/) | [agent-deadline-setup](https://doc-claude.brewcode.app/brewtools/skills/agent-deadline-setup/) | [docsync-setup](https://doc-claude.brewcode.app/brewdoc/skills/docsync-setup/) + +> Three helper functions lived as copies in two hook assets each, and the copies had drifted apart — behaviour depended on which hook reached the code first. All three pairs reconciled onto the correct version. + +### brewtools + +#### Fixed + +- **`pruneStale()` in `agent-router.mjs` followed planted symlinks.** The `agent-deadline-guard.mjs` copy `lstat`s each entry and unlinks a non-directory outright; the router copy fell straight through to a recursive `rmSync`, which would delete *through* a symlink planted in the state directory. The defensive branch is now in both, and the owner check applies only to real directories +- **`safeSegment()` in `agent-router.mjs` returned `null` for a numeric session id.** The `agent-deadline` copies coerce finite numbers to a string; the router did not, so a numeric id produced no segment at all. Coercion ported over — a numeric session id is a real input, not an edge case + +### brewdoc + +#### Fixed + +- **`recordTouched()` rewrote state on every touch for a consumer that never read it.** `docsync-track.mjs` re-wrote the entry each time while `docsync-watch.mjs` early-returned when the path was already recorded. The consumer settles it: `docsync-gate.mjs:128` iterates `st.touched` as bare path strings and re-reads freshness from the file itself at gate time (`docsync-gate.mjs:132-138`), so no touch timestamp is ever read — neither the first nor the latest. `track` now dedupes like `watch`, dropping an atomic state rewrite per touched file + +--- + ## v5.2.3 (2026-08-09) > Docs: [semble-setup](https://doc-claude.brewcode.app/brewcode/skills/semble-setup/) diff --git a/brewcode/.claude-plugin/plugin.json b/brewcode/.claude-plugin/plugin.json index e6a26df..5cfc436 100644 --- a/brewcode/.claude-plugin/plugin.json +++ b/brewcode/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "brewcode", - "version": "5.2.3", + "version": "5.2.4", "description": "Brewcode - full-featured development platform for Claude Code: infinite focus tasks, prompt optimization, skill/agent creation, quorum reviews, rules management", "author": { "name": "Maksim Kochetkov", diff --git a/brewcode/.codex/skills/teams-setup/scripts/trace-ops.sh b/brewcode/.codex/skills/teams-setup/scripts/trace-ops.sh index 56d6247..cd2f008 100755 --- a/brewcode/.codex/skills/teams-setup/scripts/trace-ops.sh +++ b/brewcode/.codex/skills/teams-setup/scripts/trace-ops.sh @@ -1,5 +1,5 @@ #!/bin/sh -# brewcode-meta: version=5.2.3 generated_by=brewcode:teams-setup +# brewcode-meta: version=5.2.4 generated_by=brewcode:teams-setup set -eu USAGE="Usage: trace-ops.sh [args...]" diff --git a/brewcode/README.md b/brewcode/README.md index 6a5488f..ddad7f2 100644 --- a/brewcode/README.md +++ b/brewcode/README.md @@ -4,7 +4,7 @@ | Field | Value | |-------|-------| -| Version | 5.2.3 | +| Version | 5.2.4 | | Skills | 9 | | Agents | 5 | | Hooks | 2 | diff --git a/brewcode/agents/agent-creator.md b/brewcode/agents/agent-creator.md index 1b067a0..28a5f98 100644 --- a/brewcode/agents/agent-creator.md +++ b/brewcode/agents/agent-creator.md @@ -6,7 +6,7 @@ maxTurns: 80 color: cyan tools: Read, Write, Edit, Glob, Grep, Bash, Agent, WebFetch, WebSearch, AskUserQuestion doc_type: llm -version: "5.2.3" +version: "5.2.4" generated_by: "brewcode" last_updated: "2026-08-09" --- diff --git a/brewcode/agents/bash-expert.md b/brewcode/agents/bash-expert.md index dbe55aa..2e4439e 100644 --- a/brewcode/agents/bash-expert.md +++ b/brewcode/agents/bash-expert.md @@ -6,7 +6,7 @@ maxTurns: 60 color: green tools: Read, Write, Edit, Glob, Grep, Bash, WebFetch doc_type: llm -version: "5.2.3" +version: "5.2.4" generated_by: "brewcode" last_updated: "2026-08-09" --- diff --git a/brewcode/agents/bc-rules-organizer.md b/brewcode/agents/bc-rules-organizer.md index 44fae20..7664b88 100644 --- a/brewcode/agents/bc-rules-organizer.md +++ b/brewcode/agents/bc-rules-organizer.md @@ -5,7 +5,7 @@ model: haiku maxTurns: 60 tools: Read, Write, Edit, Glob, Grep, Bash, Agent doc_type: llm -version: "5.2.3" +version: "5.2.4" generated_by: "brewcode" last_updated: "2026-08-09" --- diff --git a/brewcode/agents/hook-creator.md b/brewcode/agents/hook-creator.md index f53ff90..299854d 100644 --- a/brewcode/agents/hook-creator.md +++ b/brewcode/agents/hook-creator.md @@ -6,7 +6,7 @@ maxTurns: 80 color: yellow tools: Read, Write, Edit, Glob, Grep, Bash, WebFetch, WebSearch doc_type: llm -version: "5.2.3" +version: "5.2.4" generated_by: "brewcode" last_updated: "2026-08-09" --- diff --git a/brewcode/agents/skill-creator.md b/brewcode/agents/skill-creator.md index 5249ac2..a5e6d64 100644 --- a/brewcode/agents/skill-creator.md +++ b/brewcode/agents/skill-creator.md @@ -6,7 +6,7 @@ maxTurns: 80 color: green tools: Read, Write, Edit, Glob, Grep, Bash, Agent, AskUserQuestion doc_type: llm -version: "5.2.3" +version: "5.2.4" generated_by: "brewcode" last_updated: "2026-08-09" --- diff --git a/brewcode/docs/commands.md b/brewcode/docs/commands.md index 3a7d2dc..87fca0b 100644 --- a/brewcode/docs/commands.md +++ b/brewcode/docs/commands.md @@ -6,7 +6,7 @@ description: Detailed description of all brewcode plugin commands # BC Plugin Commands -> **ver:** 5.2.3 | **Author:** Maksim Kochetkov | **License:** MIT +> **ver:** 5.2.4 | **Author:** Maksim Kochetkov | **License:** MIT ## Naming diff --git a/brewcode/docs/file-tree.md b/brewcode/docs/file-tree.md index 3be9e95..7475da2 100644 --- a/brewcode/docs/file-tree.md +++ b/brewcode/docs/file-tree.md @@ -4,7 +4,7 @@ description: Complete file tree of the brewcode plugin with descriptions # Brewcode Plugin - File Tree -> Version: 5.2.3 | Files: 149 | Directories: 44 (excludes the generated `.codex/` mirror; no dotfiles, `__pycache__`, or `node_modules` exist under `brewcode/`) +> Version: 5.2.4 | Files: 149 | Directories: 44 (excludes the generated `.codex/` mirror; no dotfiles, `__pycache__`, or `node_modules` exist under `brewcode/`) ## Plugin Structure @@ -12,7 +12,7 @@ description: Complete file tree of the brewcode plugin with descriptions brewcode/ # Plugin root directory │ ├── .claude-plugin/ # Claude Code plugin configuration -│ └── plugin.json # Manifest (name, version 5.2.3, skills/ reference) +│ └── plugin.json # Manifest (name, version 5.2.4, skills/ reference) │ ├── hooks/ # Node.js scripts for Claude Code events │ ├── hooks.json # Binds 2 events (UserPromptSubmit, SessionStart) @@ -101,7 +101,7 @@ brewcode/ # Plugin root directory │ ├── README.md # Components, commands, agents, hooks, architecture, flow diagrams ├── INSTALL.md # Installation: plugin-dir, marketplace, embedding, troubleshooting -└── package.json # npm: claude-plugin-brewcode@5.2.3, build/publish scripts +└── package.json # npm: claude-plugin-brewcode@5.2.4, build/publish scripts ``` ## Target Project Structure diff --git a/brewcode/package.json b/brewcode/package.json index f467a25..e7b27e0 100644 --- a/brewcode/package.json +++ b/brewcode/package.json @@ -1,6 +1,6 @@ { "name": "claude-plugin-brewcode", - "version": "5.2.3", + "version": "5.2.4", "description": "Infinite task execution with automatic handoff for Claude Code", "keywords": [ "claude-code", @@ -36,6 +36,6 @@ }, "claude-plugin": { "name": "brewcode", - "version": "5.2.3" + "version": "5.2.4" } } diff --git a/brewcode/skills/semble-setup/assets/semble-first.md.template b/brewcode/skills/semble-setup/assets/semble-first.md.template index c6cf48f..98c03b9 100644 --- a/brewcode/skills/semble-setup/assets/semble-first.md.template +++ b/brewcode/skills/semble-setup/assets/semble-first.md.template @@ -3,7 +3,7 @@ paths: - "**/*" description: semble-first — one semantic search, then read the exact line; rg stays for exact matching doc_type: llm -version: "5.2.3" +version: "5.2.4" generated_by: "brewcode:semble-setup" --- diff --git a/brewcode/skills/semble-setup/assets/semble-prefetch.mjs b/brewcode/skills/semble-setup/assets/semble-prefetch.mjs index b53aa23..b0afdaf 100644 --- a/brewcode/skills/semble-setup/assets/semble-prefetch.mjs +++ b/brewcode/skills/semble-setup/assets/semble-prefetch.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewcode:semble-setup +// brewcode-meta: version=5.2.4 generated_by=brewcode:semble-setup /** * brewcode:semble-setup — UserPromptSubmit hook (self-contained, installed into * a project). It runs alongside the advisory hooks, it does not replace them. diff --git a/brewcode/skills/semble-setup/assets/semble-session.mjs b/brewcode/skills/semble-setup/assets/semble-session.mjs index 4021575..09aeca6 100644 --- a/brewcode/skills/semble-setup/assets/semble-session.mjs +++ b/brewcode/skills/semble-setup/assets/semble-session.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewcode:semble-setup +// brewcode-meta: version=5.2.4 generated_by=brewcode:semble-setup /** * brewcode:semble-setup — SessionStart hook (self-contained, installed into a project). * diff --git a/brewcode/skills/semble-setup/assets/semble-stats.mjs b/brewcode/skills/semble-setup/assets/semble-stats.mjs index 9ad0771..029138c 100644 --- a/brewcode/skills/semble-setup/assets/semble-stats.mjs +++ b/brewcode/skills/semble-setup/assets/semble-stats.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewcode:semble-setup +// brewcode-meta: version=5.2.4 generated_by=brewcode:semble-setup /** * brewcode:semble-setup — PostToolUse / PostToolUseFailure hook (self-contained, * installed into a project). PURE OBSERVER. diff --git a/brewcode/skills/semble-setup/assets/sembleignore.template b/brewcode/skills/semble-setup/assets/sembleignore.template index 6e65445..cece0fe 100644 --- a/brewcode/skills/semble-setup/assets/sembleignore.template +++ b/brewcode/skills/semble-setup/assets/sembleignore.template @@ -1,4 +1,4 @@ -# brewcode-meta: version=5.2.3 generated_by=brewcode:semble-setup +# brewcode-meta: version=5.2.4 generated_by=brewcode:semble-setup # brewcode:semble — managed file. Regenerate with # semble-guidance.sh install --part ignore --force # Edit it freely: any change makes it `user_modified`, and the installer then diff --git a/brewcode/skills/setup-status/references/artifact-metadata.md b/brewcode/skills/setup-status/references/artifact-metadata.md index 670b99a..061992f 100644 --- a/brewcode/skills/setup-status/references/artifact-metadata.md +++ b/brewcode/skills/setup-status/references/artifact-metadata.md @@ -1,6 +1,6 @@ --- doc_type: llm -version: "5.2.3" +version: "5.2.4" generated_by: "brewcode" last_updated: "2026-08-09" --- diff --git a/brewcode/skills/teams-setup/scripts/trace-ops.sh b/brewcode/skills/teams-setup/scripts/trace-ops.sh index 56d6247..cd2f008 100755 --- a/brewcode/skills/teams-setup/scripts/trace-ops.sh +++ b/brewcode/skills/teams-setup/scripts/trace-ops.sh @@ -1,5 +1,5 @@ #!/bin/sh -# brewcode-meta: version=5.2.3 generated_by=brewcode:teams-setup +# brewcode-meta: version=5.2.4 generated_by=brewcode:teams-setup set -eu USAGE="Usage: trace-ops.sh [args...]" diff --git a/brewdoc/.claude-plugin/plugin.json b/brewdoc/.claude-plugin/plugin.json index de9f74a..954c3a4 100644 --- a/brewdoc/.claude-plugin/plugin.json +++ b/brewdoc/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "brewdoc", - "version": "5.2.3", + "version": "5.2.4", "description": "Brewdoc - Claude Code documentation tools: my-claude installation docs, memory-sync generator", "author": { "name": "Maksim Kochetkov", diff --git a/brewdoc/README.md b/brewdoc/README.md index 19c03c7..102ef6e 100644 --- a/brewdoc/README.md +++ b/brewdoc/README.md @@ -4,7 +4,7 @@ | Field | Value | |-------|-------| -| Version | 5.2.3 | +| Version | 5.2.4 | | Skills | 5 | | Agents | 0 | | Hooks | 0 | diff --git a/brewdoc/docs/commands.md b/brewdoc/docs/commands.md index 881dd03..5ba8dd3 100644 --- a/brewdoc/docs/commands.md +++ b/brewdoc/docs/commands.md @@ -4,7 +4,7 @@ description: Detailed description of all brewdoc plugin commands # Brewdoc Plugin Commands -> **Version:** 5.2.3 | **Author:** Maksim Kochetkov | **License:** MIT +> **Version:** 5.2.4 | **Author:** Maksim Kochetkov | **License:** MIT ## Quick Reference diff --git a/brewdoc/skills/docsync-setup/assets/docsync-gate.mjs b/brewdoc/skills/docsync-setup/assets/docsync-gate.mjs index 2e291a9..e8f3b67 100644 --- a/brewdoc/skills/docsync-setup/assets/docsync-gate.mjs +++ b/brewdoc/skills/docsync-setup/assets/docsync-gate.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewdoc:docsync-setup +// brewcode-meta: version=5.2.4 generated_by=brewdoc:docsync-setup /** * docsync-gate — Stop hook (self-contained, project-local) * diff --git a/brewdoc/skills/docsync-setup/assets/docsync-track.mjs b/brewdoc/skills/docsync-setup/assets/docsync-track.mjs index dc1fcee..67abb5e 100644 --- a/brewdoc/skills/docsync-setup/assets/docsync-track.mjs +++ b/brewdoc/skills/docsync-setup/assets/docsync-track.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewdoc:docsync-setup +// brewcode-meta: version=5.2.4 generated_by=brewdoc:docsync-setup /** * docsync-track — PostToolUse:Write|Edit|MultiEdit hook (self-contained, project-local) * @@ -53,7 +53,8 @@ function recordTouched(cwd, sessionId, rel) { const disk = readJson(statePath(cwd), null); const st = (!disk || disk.session_id !== sessionId) ? { session_id: sessionId, touched: [], asked: false } : disk; if (!Array.isArray(st.touched)) st.touched = []; - if (!st.touched.includes(rel)) st.touched.push(rel); + if (st.touched.includes(rel)) return; // already recorded, skip write + st.touched.push(rel); writeJsonAtomic(statePath(cwd), st); } diff --git a/brewdoc/skills/docsync-setup/assets/docsync-watch.mjs b/brewdoc/skills/docsync-setup/assets/docsync-watch.mjs index 2d35ed0..5af6d3e 100644 --- a/brewdoc/skills/docsync-setup/assets/docsync-watch.mjs +++ b/brewdoc/skills/docsync-setup/assets/docsync-watch.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewdoc:docsync-setup +// brewcode-meta: version=5.2.4 generated_by=brewdoc:docsync-setup /** * docsync-watch — PostToolUse:Read hook (self-contained, project-local) * diff --git a/brewdoc/skills/memory-sync-setup/references/agent-audit.md b/brewdoc/skills/memory-sync-setup/references/agent-audit.md index 731517c..f74fb58 100644 --- a/brewdoc/skills/memory-sync-setup/references/agent-audit.md +++ b/brewdoc/skills/memory-sync-setup/references/agent-audit.md @@ -1,4 +1,4 @@ - + # Agent and Skill Re-Audit The standing best-practice audit `/memory-sync` runs on EVERY agent file and EVERY skill file, on EVERY run, at diff --git a/brewdoc/skills/memory-sync-setup/references/hard-sync.md b/brewdoc/skills/memory-sync-setup/references/hard-sync.md index af1735f..028a1ad 100644 --- a/brewdoc/skills/memory-sync-setup/references/hard-sync.md +++ b/brewdoc/skills/memory-sync-setup/references/hard-sync.md @@ -1,4 +1,4 @@ - + # Hard Sync The two aggressive DELETION passes of `/memory-sync`. Cited by the emitted skill's Phase 2 batch prompt at diff --git a/brewdoc/skills/memory-sync-setup/references/memory-guide.md b/brewdoc/skills/memory-sync-setup/references/memory-guide.md index 95fac02..bb07840 100644 --- a/brewdoc/skills/memory-sync-setup/references/memory-guide.md +++ b/brewdoc/skills/memory-sync-setup/references/memory-guide.md @@ -1,4 +1,4 @@ - + # Memory Guide Where a fact BELONGS, how to compress it, and what never gets written at all. Cited by every `/memory-sync` diff --git a/brewtools/.claude-plugin/plugin.json b/brewtools/.claude-plugin/plugin.json index c32575c..37848c3 100644 --- a/brewtools/.claude-plugin/plugin.json +++ b/brewtools/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "brewtools", - "version": "5.2.3", + "version": "5.2.4", "description": "Brewtools - universal utilities for Claude Code: text optimization, humanization, secrets scanning", "author": { "name": "Maksim Kochetkov", diff --git a/brewtools/.codex/skills/think-short-setup/assets/think-short-prompt-counter.mjs b/brewtools/.codex/skills/think-short-setup/assets/think-short-prompt-counter.mjs index fe7a7b9..20ee2ea 100644 --- a/brewtools/.codex/skills/think-short-setup/assets/think-short-prompt-counter.mjs +++ b/brewtools/.codex/skills/think-short-setup/assets/think-short-prompt-counter.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewtools:think-short-setup +// brewcode-meta: version=5.2.4 generated_by=brewtools:think-short-setup /** * think-short — UserPromptSubmit hook (self-contained, no plugin-root deps). * diff --git a/brewtools/.codex/skills/think-short-setup/assets/think-short-prompt.md b/brewtools/.codex/skills/think-short-setup/assets/think-short-prompt.md index 99524fe..ed0d030 100644 --- a/brewtools/.codex/skills/think-short-setup/assets/think-short-prompt.md +++ b/brewtools/.codex/skills/think-short-setup/assets/think-short-prompt.md @@ -1,4 +1,4 @@ - + Be terse. Lead with results. Use ASCII unless the requested artifact requires other text. Think short: keep internal reasoning minimal and do not narrate exploration. Search before opening large files. Prefer focused edits and parallel read-only checks. diff --git a/brewtools/.codex/skills/think-short-setup/assets/think-short-session.mjs b/brewtools/.codex/skills/think-short-setup/assets/think-short-session.mjs index 027d506..f213e8b 100644 --- a/brewtools/.codex/skills/think-short-setup/assets/think-short-session.mjs +++ b/brewtools/.codex/skills/think-short-setup/assets/think-short-session.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewtools:think-short-setup +// brewcode-meta: version=5.2.4 generated_by=brewtools:think-short-setup /** * think-short — SessionStart hook (self-contained, no plugin-root deps). * diff --git a/brewtools/README.md b/brewtools/README.md index e2ff5ea..aed8a2c 100644 --- a/brewtools/README.md +++ b/brewtools/README.md @@ -4,7 +4,7 @@ | Field | Value | |-------|-------| -| Version | 5.2.3 | +| Version | 5.2.4 | | Skills | 12 | | Agents | 3 | | Hooks | 2 | diff --git a/brewtools/agents/deploy-admin.md b/brewtools/agents/deploy-admin.md index b6af838..e2171eb 100644 --- a/brewtools/agents/deploy-admin.md +++ b/brewtools/agents/deploy-admin.md @@ -5,7 +5,7 @@ model: inherit maxTurns: 80 tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, WebFetch, WebSearch doc_type: llm -version: "5.2.3" +version: "5.2.4" generated_by: "brewtools" last_updated: "2026-08-09" --- diff --git a/brewtools/agents/ssh-admin.md b/brewtools/agents/ssh-admin.md index 4c7ef7f..769afb0 100644 --- a/brewtools/agents/ssh-admin.md +++ b/brewtools/agents/ssh-admin.md @@ -5,7 +5,7 @@ model: inherit maxTurns: 80 tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, WebFetch, WebSearch doc_type: llm -version: "5.2.3" +version: "5.2.4" generated_by: "brewtools" last_updated: "2026-08-09" --- diff --git a/brewtools/agents/text-optimizer.md b/brewtools/agents/text-optimizer.md index 3ca5b17..25e38d9 100644 --- a/brewtools/agents/text-optimizer.md +++ b/brewtools/agents/text-optimizer.md @@ -7,7 +7,7 @@ color: magenta tools: Read, Write, Edit, Glob, Grep, Bash, WebFetch, AskUserQuestion skills: brewtools:text-optimize doc_type: llm -version: "5.2.3" +version: "5.2.4" generated_by: "brewtools" last_updated: "2026-08-09" --- diff --git a/brewtools/hooks/hardmode-guard.mjs b/brewtools/hooks/hardmode-guard.mjs index 1e19bf0..2db940f 100644 --- a/brewtools/hooks/hardmode-guard.mjs +++ b/brewtools/hooks/hardmode-guard.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewtools:manager-setup +// brewcode-meta: version=5.2.4 generated_by=brewtools:manager-setup // brewtools:manager-setup — HARD wall guard (PreToolUse, matcher "*"). // // SELF-CONTAINED — copied into /.claude/brewtools/manager/ by diff --git a/brewtools/hooks/lib/manager-state.mjs b/brewtools/hooks/lib/manager-state.mjs index c18c458..853eba7 100644 --- a/brewtools/hooks/lib/manager-state.mjs +++ b/brewtools/hooks/lib/manager-state.mjs @@ -1,4 +1,4 @@ -// brewcode-meta: version=5.2.3 generated_by=brewtools:manager-setup +// brewcode-meta: version=5.2.4 generated_by=brewtools:manager-setup // brewtools:manager-setup — Manager mode state resolver/writer. // State shape: { hard:boolean, level:'strict'|'balanced', mode:'full' } // + artifact metadata written by writeState: version/generated_by/last_updated. diff --git a/brewtools/skills/agent-deadline-setup/assets/agent-deadline-cleanup.mjs b/brewtools/skills/agent-deadline-setup/assets/agent-deadline-cleanup.mjs index b777692..a764729 100644 --- a/brewtools/skills/agent-deadline-setup/assets/agent-deadline-cleanup.mjs +++ b/brewtools/skills/agent-deadline-setup/assets/agent-deadline-cleanup.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewtools:agent-deadline-setup +// brewcode-meta: version=5.2.4 generated_by=brewtools:agent-deadline-setup /** * agent-deadline — SubagentStop hook (self-contained, Node built-ins only). * diff --git a/brewtools/skills/agent-deadline-setup/assets/agent-deadline-guard.mjs b/brewtools/skills/agent-deadline-setup/assets/agent-deadline-guard.mjs index 7d5988c..9c69fe6 100644 --- a/brewtools/skills/agent-deadline-setup/assets/agent-deadline-guard.mjs +++ b/brewtools/skills/agent-deadline-setup/assets/agent-deadline-guard.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewtools:agent-deadline-setup +// brewcode-meta: version=5.2.4 generated_by=brewtools:agent-deadline-setup /** * agent-deadline — PreToolUse hook (self-contained, Node built-ins only). * diff --git a/brewtools/skills/agent-router-setup/assets/agent-router.mjs b/brewtools/skills/agent-router-setup/assets/agent-router.mjs index f3a4de4..bd937d8 100755 --- a/brewtools/skills/agent-router-setup/assets/agent-router.mjs +++ b/brewtools/skills/agent-router-setup/assets/agent-router.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewtools:agent-router-setup +// brewcode-meta: version=5.2.4 generated_by=brewtools:agent-router-setup /** * agent-router - PreToolUse hook for the `Agent` tool (Node built-ins only, ESM). * @@ -402,6 +402,10 @@ function pruneStale() { const p = path.join(STATE_ROOT, name); try { const st = lstatSync(p); // lstat, never stat: do not follow a planted symlink + if (!st.isDirectory()) { + if (st.mtimeMs < cutoff) rmSync(p, { force: true }); // unlink the link itself + continue; + } if (UID !== null && st.uid !== UID) continue; if (st.mtimeMs >= cutoff) continue; rmSync(p, { recursive: true, force: true }); @@ -412,8 +416,9 @@ function pruneStale() { } function safeSegment(s) { - if (typeof s !== 'string') return null; - const clean = s.replace(/[^A-Za-z0-9._-]/g, '_').slice(0, 128); + const raw = typeof s === 'number' && Number.isFinite(s) ? String(s) : s; + if (typeof raw !== 'string') return null; + const clean = raw.replace(/[^A-Za-z0-9._-]/g, '_').slice(0, 128); return clean && clean !== '.' && clean !== '..' ? clean : null; } diff --git a/brewtools/skills/think-short-setup/assets/think-short-prompt-counter.mjs b/brewtools/skills/think-short-setup/assets/think-short-prompt-counter.mjs index 244bf21..e4018ee 100644 --- a/brewtools/skills/think-short-setup/assets/think-short-prompt-counter.mjs +++ b/brewtools/skills/think-short-setup/assets/think-short-prompt-counter.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewtools:think-short-setup +// brewcode-meta: version=5.2.4 generated_by=brewtools:think-short-setup /** * think-short — UserPromptSubmit hook (self-contained, no plugin-root deps). * diff --git a/brewtools/skills/think-short-setup/assets/think-short-prompt.md b/brewtools/skills/think-short-setup/assets/think-short-prompt.md index 45dbf6f..88251ce 100644 --- a/brewtools/skills/think-short-setup/assets/think-short-prompt.md +++ b/brewtools/skills/think-short-setup/assets/think-short-prompt.md @@ -1,4 +1,4 @@ - + Be terse. Results first, no preamble/filler/sycophancy. ASCII only. Think short: minimal internal reasoning, no exploring aloud. Grep before Read. Edit over Write. Parallel calls in one message. diff --git a/brewtools/skills/think-short-setup/assets/think-short-session.mjs b/brewtools/skills/think-short-setup/assets/think-short-session.mjs index 027d506..f213e8b 100644 --- a/brewtools/skills/think-short-setup/assets/think-short-session.mjs +++ b/brewtools/skills/think-short-setup/assets/think-short-session.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewtools:think-short-setup +// brewcode-meta: version=5.2.4 generated_by=brewtools:think-short-setup /** * think-short — SessionStart hook (self-contained, no plugin-root deps). * diff --git a/brewtools/skills/think-short-setup/assets/think-short-task.mjs b/brewtools/skills/think-short-setup/assets/think-short-task.mjs index 0353749..140b04f 100644 --- a/brewtools/skills/think-short-setup/assets/think-short-task.mjs +++ b/brewtools/skills/think-short-setup/assets/think-short-task.mjs @@ -1,5 +1,5 @@ #!/usr/bin/env node -// brewcode-meta: version=5.2.3 generated_by=brewtools:think-short-setup +// brewcode-meta: version=5.2.4 generated_by=brewtools:think-short-setup /** * think-short — PreToolUse hook for Task|Agent (self-contained, no plugin-root deps). * diff --git a/brewui/.claude-plugin/plugin.json b/brewui/.claude-plugin/plugin.json index 4b9346b..5f44a10 100644 --- a/brewui/.claude-plugin/plugin.json +++ b/brewui/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "brewui", - "version": "5.2.3", + "version": "5.2.4", "description": "Brewui -- placeholder for future UI/visual/creative tools", "author": { "name": "Maksim Kochetkov", diff --git a/brewui/README.md b/brewui/README.md index 35c31b4..9d0b129 100644 --- a/brewui/README.md +++ b/brewui/README.md @@ -4,7 +4,7 @@ | Field | Value | |-------|-------| -| Version | 5.2.3 | +| Version | 5.2.4 | | Skills | 0 | ## Install