playbook-ai 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable updates to Playbook are documented here. Only impactful changes are listed — new commands, upgraded behavior, and things that make your workflow better. Cosmetic fixes and internal housekeeping are omitted.
4
4
 
5
+ ## [1.4.3] — 2026-05-25
6
+
7
+ ### Performance
8
+ - **`/start` context reduction** — removed redundant `CLAUDE.md` read (already injected automatically into every session via system context). Added daily throttle on the Playbook update check: after the first check of the day, subsequent `/start` calls skip the git fetch + curl + CHANGELOG read entirely. Timestamp stored in `~/.claude/.playbook-last-update-check`.
9
+
10
+ ## [1.4.2] — 2026-05-17
11
+
12
+ ### Reliability
13
+ - **PreCompact hook** — automatically appends a timestamped marker to `WORK_LOG.md` whenever Claude Code hits the context limit and auto-compaction fires. No more silent mid-session state loss. The marker flags that state above the line may be incomplete and prompts starting a new session. Installed via `hooks/precompact-save.sh`; wired into `settings.json` at install time (additive merge for users who already have a settings.json).
14
+
5
15
  ## [1.4.1] — 2026-05-03
6
16
 
7
17
  ### Strategy
package/CLAUDE.md CHANGED
@@ -114,6 +114,11 @@
114
114
  - Propose parallel work when independent tasks can run simultaneously
115
115
  - Never overlap files/tables/workflows between parallel sessions
116
116
 
117
+ ## Writing Style
118
+ - **No em dashes.** Use a colon, a comma, or restructure the sentence.
119
+ - Avoid AI writing tells: "delve," "leverage," "utilize," "comprehensive," "robust," "nuanced," "crucial," "pivotal," "it's worth noting," "in conclusion"
120
+ - No filler openers: "Certainly!", "Of course!", "Great question!", "Absolutely!"
121
+
117
122
  ## Plugins
118
123
  - **Frontend Design** (`frontend-design@claude-plugins-official`) is installed by default. It generates distinctive, production-grade frontend interfaces with bold typography, unique color palettes, and creative layouts. No action needed — it's active automatically.
119
124
  - **Code Review Agents** (`code-review@claude-plugins-official`) is recommended for PR-based workflows. Install with: `/plugin install code-review@claude-plugins-official`. It runs multiple specialized review agents in parallel (comment analysis, test coverage, silent failure detection, type design, code quality, simplification) with confidence-based scoring.
package/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.1
1
+ 1.4.3
package/commands/end.md CHANGED
@@ -12,11 +12,13 @@ Session closeout. Do everything needed so the user can walk away without taking
12
12
  - Update "Known Issues / Next Steps" — remove anything completed, add anything new discovered, reprioritize if needed. Be explicit about what's next and what's blocked
13
13
  - If any task is partially done, document exactly where it was left off and what remains
14
14
 
15
- 3. **Trim WORK_LOG.md if needed.** Count the number of dated session entries (lines matching `## YYYY-MM-DD` or `### YYYY-MM-DD`). If there are more than 100 sessions:
15
+ 3. **Compress WORK_LOG.md if needed.** Count the number of entries — dated session headers (`## YYYY-MM-DD` or `### YYYY-MM-DD`) plus any existing `## Compressed:` blocks. If the total exceeds 100:
16
+ - Read the 10 oldest entries (whether raw sessions or prior compressed blocks)
17
+ - Summarize each to 2-3 bullets: what was done, what changed, what was decided
18
+ - Replace those 10 entries with a single block at the bottom: `## Compressed: [earliest date] – [latest date]` followed by the bullet summaries
16
19
  - Keep the Overall State / header section intact
17
- - Keep the 100 most recent session entries
18
- - Remove everything older those sessions have served their purpose and the important bits should already be captured in Overall State and auto-memory
19
- - Do NOT archive to a separate file — just delete. Git history has the full log if ever needed.
20
+ - Result: you drop from 101+ entries to ~92, with history preserved in compressed form
21
+ - This fires roughly once every 9-10 sessions not every session after the limit
20
22
 
21
23
  4. **Update PM tool** (if MCP is connected). Mark completed tasks as done. Update in-progress tasks with status notes. Create new tasks for anything discovered during the session that needs tracking.
22
24
 
package/commands/start.md CHANGED
@@ -1,5 +1,3 @@
1
- Read CLAUDE.md to understand the project rules and conventions.
2
-
3
1
  Read WORK_LOG.md **efficiently** — do NOT read the entire file if it's long:
4
2
  - Read the **first 30 lines** (Overall State, current status headers)
5
3
  - Read the **most recent session section** only (the first dated session entry)
@@ -17,7 +15,8 @@ Before anything else, silently check if a newer version of Playbook is available
17
15
  ### Pre-flight (silent — no output to user)
18
16
 
19
17
  1. Check if `~/.claude/.playbook-version` exists. If not, skip the update check entirely.
20
- 2. Read the installed version from `~/.claude/.playbook-version`.
18
+ 2. **Daily throttle:** Check if `~/.claude/.playbook-last-update-check` exists and contains today's date (format: `YYYY-MM-DD`). If it does, skip the entire update check and go straight to the normal briefing. If not (file missing or date is old), proceed and write today's date to that file after the check completes — whether or not an update was found.
19
+ 3. Read the installed version from `~/.claude/.playbook-version`.
21
20
  3. Try to fetch the latest version:
22
21
  - **If git is available and `~/.claude/.playbook/` is a git repo:** Run `git -C ~/.claude/.playbook fetch origin main --quiet` then read `VERSION` from the fetched main branch using `git -C ~/.claude/.playbook show origin/main:VERSION`.
23
22
  - **If git is not available or fails:** Use `curl -sf https://raw.githubusercontent.com/bluemax713/playbook/main/VERSION` to get the latest version.
package/install.sh CHANGED
@@ -80,6 +80,49 @@ else
80
80
  echo " Installed settings.json"
81
81
  fi
82
82
 
83
+ # Install hooks script
84
+ mkdir -p "$CLAUDE_DIR/hooks"
85
+ cp "$PLAYBOOK_DIR/hooks/precompact-save.sh" "$CLAUDE_DIR/hooks/precompact-save.sh"
86
+ chmod +x "$CLAUDE_DIR/hooks/precompact-save.sh"
87
+ echo " Installed hook: precompact-save"
88
+
89
+ # Merge PreCompact hook into existing settings.json (additive — won't overwrite existing hooks)
90
+ python3 - << 'EOF'
91
+ import json, os, sys
92
+
93
+ settings_path = os.path.expanduser("~/.claude/settings.json")
94
+ if not os.path.exists(settings_path):
95
+ sys.exit(0)
96
+
97
+ with open(settings_path) as f:
98
+ settings = json.load(f)
99
+
100
+ hook_command = "bash ~/.claude/hooks/precompact-save.sh"
101
+
102
+ # Check if already wired up
103
+ existing = settings.get("hooks", {}).get("PreCompact", [])
104
+ for group in existing:
105
+ for h in group.get("hooks", []):
106
+ if h.get("command") == hook_command:
107
+ print(" PreCompact hook already configured — skipping")
108
+ sys.exit(0)
109
+
110
+ # Add it
111
+ if "hooks" not in settings:
112
+ settings["hooks"] = {}
113
+ if "PreCompact" not in settings["hooks"]:
114
+ settings["hooks"]["PreCompact"] = []
115
+ settings["hooks"]["PreCompact"].append({
116
+ "hooks": [{"type": "command", "command": hook_command}]
117
+ })
118
+
119
+ with open(settings_path, "w") as f:
120
+ json.dump(settings, f, indent=2)
121
+ f.write("\n")
122
+
123
+ print(" Wired PreCompact hook into settings.json")
124
+ EOF
125
+
83
126
  # Copy tech_stack.md template (won't overwrite if exists — user populates this)
84
127
  if [ -f "$CLAUDE_DIR/tech_stack.md" ]; then
85
128
  echo " tech_stack.md already exists — skipping"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "playbook-ai",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Operating playbook for non-technical founders working with Claude Code",
5
5
  "bin": {
6
6
  "playbook-ai": "bin/cli.js"
package/settings.json CHANGED
@@ -2,6 +2,18 @@
2
2
  "env": {
3
3
  "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
4
4
  },
5
+ "hooks": {
6
+ "PreCompact": [
7
+ {
8
+ "hooks": [
9
+ {
10
+ "type": "command",
11
+ "command": "bash ~/.claude/hooks/precompact-save.sh"
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ },
5
17
  "enabledPlugins": {
6
18
  "frontend-design@claude-plugins-official": true
7
19
  },