playbook-ai 1.4.1 → 1.5.0

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,21 @@
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.5.0] — 2026-05-27
6
+
7
+ ### Strategy
8
+ - **New `/future` command** — scenario planning via three futures (The Win, The Unraveling, The Headwind). Reads project context silently, runs a short intake, then writes three past-tense narratives rewound month by month to today. Synthesizes them via quadrant analysis to surface double-confirmed critical actions, swing-state decisions, and failure drivers. Output is one screen: a thesis, 3 load-bearing decisions (ordered by when they must be made), 3 anti-patterns to avoid (with why they're tempting and the early signal you're sliding in), and your move this week. Full narratives available in appendix on request. Ends with an optional 30-day ClickUp or WORK_LOG check-in. The third scenario (The Headwind) is the one most people skip — it surfaces external forces you need to be resilient against, not just what you did right or wrong.
9
+
10
+ ## [1.4.3] — 2026-05-25
11
+
12
+ ### Performance
13
+ - **`/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`.
14
+
15
+ ## [1.4.2] — 2026-05-17
16
+
17
+ ### Reliability
18
+ - **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).
19
+
5
20
  ## [1.4.1] — 2026-05-03
6
21
 
7
22
  ### 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.5.0
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
 
@@ -0,0 +1,181 @@
1
+ Scenario planning via three futures. Rewinds each path month by month to today, synthesizes the decisions that mattered most, and delivers a one-screen action guide with a clear first move.
2
+
3
+ ---
4
+
5
+ ## Pre-flight: Read context
6
+
7
+ Silently read the following before doing anything else:
8
+ - `WORK_LOG.md` in the current project
9
+ - `CLAUDE.md` in the current project
10
+ - Recent git log (last 20 commits) if available
11
+ - Any open/in-progress PM tasks if a PM MCP is connected
12
+
13
+ Do not summarize this to the user. Use it to ground the scenarios in the actual project — real constraints, real state, real recent decisions. Generic startup scenarios are useless.
14
+
15
+ ---
16
+
17
+ ## Intake
18
+
19
+ Ask these questions conversationally — not as a numbered list. One at a time, naturally. Use follow-ups where an answer is thin. The goal is enough material to write scenarios that are specific, not vague.
20
+
21
+ **Question 1 — The north star**
22
+ What does massive success look like in concrete terms? Not "we grew a lot" — what's the specific outcome, 12 months from now, that you'd genuinely be proud of? Name it as if it already happened.
23
+
24
+ **Question 2 — The fear**
25
+ What's the specific failure that keeps you up at night? The scenario you'd be embarrassed to explain to someone who believed in you. Be direct.
26
+
27
+ **Question 3 — The constraints**
28
+ What are the hard limits right now? Runway, team size, a deadline that isn't moveable, a dependency you're waiting on. What are you working around?
29
+
30
+ **Timeframe**
31
+ Based on the project context and what the user just described, propose a timeframe. Default is 12 months, but:
32
+ - Shorter (3–6 months) for a specific launch, campaign, or sprint with a hard end date
33
+ - Longer (18–24 months) for platforms, infrastructure, or ventures still finding product-market fit
34
+ - Say: *"Based on what you've described, I'd suggest a [N]-month horizon — does that feel right, or should we adjust?"*
35
+
36
+ Confirm the timeframe before proceeding.
37
+
38
+ ---
39
+
40
+ ## Three scenarios
41
+
42
+ Write all three. Past tense throughout. The narrative voice is: you're explaining what happened to someone who loves you and won't let you bullshit them — honest, specific, no spin. This isn't a case study or a consultant's report. It's a candid debrief.
43
+
44
+ For each scenario, start at the end of the timeframe and rewind month by month to today. Name specific decisions, not themes. Name the moments where the path forked. Name what was done and what wasn't.
45
+
46
+ ---
47
+
48
+ ### Scenario A: The Win
49
+
50
+ Massive success landed. Rewind from the end state to today.
51
+
52
+ What happened? Not just what worked — what *decisions* and *actions* were instrumental? What did you do in month 2 that set up month 8? What did you resist that would have derailed you? What was the moment where it could have gone either way, and what made it go right?
53
+
54
+ Be specific about:
55
+ - The decisions that compounded (small early, large later)
56
+ - The things you *didn't* do that turned out to matter
57
+ - The external factors that helped — and what you did to be positioned to benefit from them
58
+
59
+ ---
60
+
61
+ ### Scenario B: The Unraveling
62
+
63
+ Massive failure. Rewind from the end state to today.
64
+
65
+ What happened? Not just "we ran out of money" or "we lost momentum" — what specific decisions, delays, and patterns led there? What looked reasonable at the time but wasn't? What was done instead of what actually mattered? When did you first know something was wrong, and what did you do (or not do) about it?
66
+
67
+ Be specific about:
68
+ - What was tempting but harmful (the anti-patterns that looked like good ideas)
69
+ - What was delayed past the point of recovery
70
+ - What the earliest warning sign was — before it became obvious
71
+ - What you'd tell yourself in month 2 if you could
72
+
73
+ ---
74
+
75
+ ### Scenario C: The Headwind
76
+
77
+ You did almost everything right. The universe didn't cooperate. Rewind from the end state to today.
78
+
79
+ This is the scenario most people don't think about because it's uncomfortable — you can't control it, and it feels like an excuse. But naming it clearly is the difference between being blindsided and being resilient.
80
+
81
+ What external forces hit that you couldn't have fully predicted? A market shift, a competitor move, a platform change, a regulatory event, a macro condition, a key relationship that fell through. What was the real ceiling on what could be achieved even with strong execution?
82
+
83
+ Be specific about:
84
+ - What you were exposed to that you didn't need to be
85
+ - What resilience you had built — and what you wish you'd built
86
+ - The difference between "bad luck" and "we were fragile in a way we could have fixed"
87
+ - What "doing everything right" actually looked like in this world
88
+
89
+ ---
90
+
91
+ ## Synthesis
92
+
93
+ Do this internally before writing the final output. Do not show the synthesis process to the user — only the output.
94
+
95
+ **Quadrant analysis**
96
+ Classify decisions and actions across the three scenarios:
97
+
98
+ - **Double-confirmed critical** — appears in The Win AND its absence appears in The Unraveling. These are the highest-confidence levers.
99
+ - **Swing-state decisions** — present in The Win but also present (differently executed) in The Unraveling. These are hard calls, not obvious moves. Flag them explicitly.
100
+ - **Failure drivers** — appear in The Unraveling and are absent from The Win. The anti-patterns.
101
+ - **Resilience gaps** — surface from The Headwind. Things within your control that would have changed your exposure to external forces.
102
+
103
+ **Leading indicators**
104
+ For each critical decision or turning point in The Unraveling: what was the *earliest signal* that this was coming? Not month 8 when it was obvious — month 2, when there was still time. Extract these from the narrative, don't ask the user. They're already embedded in the story.
105
+
106
+ **Irreversibility flag**
107
+ Tag each load-bearing decision as:
108
+ - **Hard to reverse** — hiring, pricing model, core tech choices, pivots, strategic commitments
109
+ - **Iterable** — things you can course-correct on without major cost
110
+
111
+ Hard-to-reverse decisions deserve more upfront thought and appear earlier in the output.
112
+
113
+ **Order by when, not importance**
114
+ Sort all output items by *when* the decision needs to be made, not by abstract importance. Timing drives action; importance doesn't.
115
+
116
+ ---
117
+
118
+ ## Output
119
+
120
+ Present the primary output in full. Then offer the appendix.
121
+
122
+ ---
123
+
124
+ **The thesis**
125
+
126
+ One paragraph. The single most important variable — the fork in the road that, more than anything else, separates The Win from The Unraveling. Don't list three things. Name the one.
127
+
128
+ ---
129
+
130
+ **3 load-bearing decisions**
131
+
132
+ The decisions that cascade if you get them wrong or delay them. For each:
133
+ - **The decision** — what it is, stated plainly
134
+ - **When it needs to be made** — a specific window ("before month 3," "within the next 6 weeks"), not "eventually"
135
+ - **Early warning sign** — the earliest signal that this is going wrong, before it's obvious
136
+ - Mark hard-to-reverse decisions with *(irreversible)*
137
+
138
+ Ordered by when, not importance. Three max. If more surfaced, put the rest in the appendix.
139
+
140
+ ---
141
+
142
+ **3 things not to do**
143
+
144
+ From The Unraveling. For each:
145
+ - **The anti-pattern** — what it is
146
+ - **Why it's tempting** — if it weren't tempting, you wouldn't need the warning
147
+ - **The signal you're sliding into it** — the earliest sign, before it becomes entrenched
148
+
149
+ Three max. The most dangerous ones — the ones that looked like good ideas.
150
+
151
+ ---
152
+
153
+ **Your move this week**
154
+
155
+ One or two specific actions, this week. Not "eventually" — this week. These are the entry point into the critical path. Everything else can wait until these are done.
156
+
157
+ ---
158
+
159
+ *Full narratives, complete quadrant synthesis, and everything else the exercise surfaced are in the appendix. Type "show appendix" to read.*
160
+
161
+ ---
162
+
163
+ **Follow-up**
164
+
165
+ After presenting the output, offer one of the following (based on what tools are connected):
166
+ - If ClickUp MCP is connected: *"Want me to create a ClickUp task to review the load-bearing decisions 30 days from now?"*
167
+ - Otherwise: *"Want me to add a reminder to WORK_LOG.md to revisit these decisions in 30 days?"*
168
+
169
+ This is a one-line offer. Don't push it.
170
+
171
+ ---
172
+
173
+ ## Appendix (on request)
174
+
175
+ If the user types "show appendix" or asks to see more:
176
+
177
+ 1. **Full narratives** — all three scenarios in full
178
+ 2. **Quadrant synthesis** — the full classification of every decision/action that surfaced
179
+ 3. **Everything else** — items that didn't make the top 3 in either output section, labeled "worth knowing, not the priority right now"
180
+
181
+ Present the appendix cleanly, clearly separated from the primary output.
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.5.0",
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
  },