playbook-ai 1.4.0 → 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 +15 -0
- package/CLAUDE.md +5 -0
- package/VERSION +1 -1
- package/commands/chess.md +65 -13
- package/commands/end.md +6 -4
- package/commands/start.md +2 -3
- package/install.sh +43 -0
- package/package.json +1 -1
- package/settings.json +12 -0
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.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
|
+
|
|
15
|
+
## [1.4.1] — 2026-05-03
|
|
16
|
+
|
|
17
|
+
### Strategy
|
|
18
|
+
- **`/chess` System Mode** — `/chess` now has two modes. Human Mode is unchanged (parallel Opus 4.6 session, move-tree analysis, adversary modeling). New System Mode handles the case where there's no human adversary but a technical plan needs rigorous stress-testing. System Mode runs inline on Sonnet, enumerates every assumption in the plan, attacks each one, and produces verdicts (✅ / ⚠️ / ❌) plus a minimal list of required changes. Escalates to Opus 4.6 inline (no parallel session) for genuinely complex systems. Pre-flight now routes to three paths: Human Mode, System Mode, or `/plan`.
|
|
19
|
+
|
|
5
20
|
## [1.4.0] — 2026-05-01
|
|
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.4.3
|
package/commands/chess.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
Adversarial strategy analysis
|
|
1
|
+
Adversarial strategy analysis and technical stress-testing. Two modes: Human Mode (opponent-modeled, branch-traced) for situations with a real adversary; System Mode (assumption-attack, failure-traced) for technical plans with no human counterparty. Intake runs in the primary session (Sonnet). Human Mode generates a parallel Opus 4.6 handoff; System Mode runs inline.
|
|
2
2
|
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
## Pre-flight:
|
|
5
|
+
## Pre-flight: Route the situation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Three routes. Assess before doing anything else.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- Does the outcome depend on what that adversary does in response to your moves?
|
|
11
|
-
- Are the stakes material — money, a key relationship, legal exposure, or a make-or-break decision?
|
|
9
|
+
**Route 1 — Human Mode:** There's a real adversary — a person or party with competing interests and their own move set. The outcome depends on what they do in response to your moves. Stakes are material (money, a key relationship, legal exposure, a make-or-break decision). → Confirm to the user and proceed to Human Mode intake.
|
|
12
10
|
|
|
13
|
-
**
|
|
11
|
+
**Route 2 — System Mode:** No human adversary, but there IS a technical plan, implementation, or system being challenged. The question is: what could break, and how does the system respond to each move? → Confirm to the user and proceed to System Mode intake.
|
|
14
12
|
|
|
15
|
-
**
|
|
13
|
+
**Route 3 — /plan:** No adversary, no system to stress-test. This is a pure tradeoffs decision or planning question. → Tell the user: *"/plan is the right tool here — this is a tradeoffs decision, not a strategic scenario."* Offer to invoke /plan instead.
|
|
16
14
|
|
|
17
15
|
**Borderline:** Name what makes it ambiguous. Ask the user to confirm before proceeding.
|
|
18
16
|
|
|
19
|
-
The pre-flight runs on Sonnet. Do not begin intake until the
|
|
17
|
+
The pre-flight runs on Sonnet. Do not begin intake until the route is confirmed.
|
|
20
18
|
|
|
21
19
|
---
|
|
22
20
|
|
|
23
|
-
##
|
|
21
|
+
## Human Mode
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
### Intake: Build the chess brief
|
|
24
|
+
|
|
25
|
+
Run in the primary session on Sonnet. Ask these questions conversationally — not as a numbered list. Group related questions naturally. Use follow-ups where the answer is thin. The goal is a complete picture before the chess engine runs.
|
|
26
26
|
|
|
27
27
|
**The situation**
|
|
28
28
|
- What is the decision, negotiation, or situation you're navigating?
|
|
@@ -53,7 +53,7 @@ Once intake is complete, read the summary back to the user and confirm it's accu
|
|
|
53
53
|
|
|
54
54
|
---
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
### Generate the handoff prompt
|
|
57
57
|
|
|
58
58
|
Compile everything from intake into a self-contained chess brief. Fill in all [BRACKETS] with real values — current date, actual repo path (use the current working directory), and a short topic slug derived from the situation (e.g., `hilldun-negotiation`, `board-vote`, `vendor-renewal`).
|
|
59
59
|
|
|
@@ -65,7 +65,7 @@ Present the completed handoff prompt to the user in a clearly labeled block:
|
|
|
65
65
|
|
|
66
66
|
---
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
#### Handoff prompt (embed verbatim — this is what runs in the parallel session)
|
|
69
69
|
|
|
70
70
|
---
|
|
71
71
|
|
|
@@ -166,3 +166,55 @@ End of handoff prompt.
|
|
|
166
166
|
After presenting the handoff prompt to the user, say:
|
|
167
167
|
|
|
168
168
|
> *"Open a new terminal, paste the block above, and watch the chess engine work. When it's done, use the return prompt to bring the debrief back into this session."*
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## System Mode
|
|
173
|
+
|
|
174
|
+
### Intake: Build the stress-test brief
|
|
175
|
+
|
|
176
|
+
If the system, plan, and constraints are already established in the conversation, skip directly to the stress-test. Only ask for information that's genuinely missing.
|
|
177
|
+
|
|
178
|
+
If context is thin, ask conversationally — not as a numbered list. Use follow-ups where the answer is thin. The goal is a complete picture before the stress-test runs.
|
|
179
|
+
|
|
180
|
+
**The system**
|
|
181
|
+
- What are you trying to build, fix, or change?
|
|
182
|
+
- What does the current system look like? (components, dependencies, environment, constraints)
|
|
183
|
+
- What's already been decided or built that the plan must work around?
|
|
184
|
+
|
|
185
|
+
**The plan**
|
|
186
|
+
- What's the sequence of moves you're planning?
|
|
187
|
+
- What outcome are you trying to guarantee?
|
|
188
|
+
- What's an acceptable failure mode vs. an unacceptable one?
|
|
189
|
+
|
|
190
|
+
Once you have sufficient context, proceed directly — no need to read it back unless something is ambiguous.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
### System stress-test framework
|
|
195
|
+
|
|
196
|
+
Default: run inline on Sonnet. Escalate to Opus 4.6 inline (no parallel session) when the system is complex enough that a shallow pass would miss real risks — multiple interacting services, deep dependency chains, complex state machines. Surface your reasoning in chat as you go.
|
|
197
|
+
|
|
198
|
+
**Step 1 — Map the assumptions**
|
|
199
|
+
|
|
200
|
+
List every assumption embedded in the plan. These are the places where "this works if..." is implicit. Be exhaustive — surface assumptions about environment, dependencies, timing, state, permissions, behavior under failure. Name them all before attacking any.
|
|
201
|
+
|
|
202
|
+
**Step 2 — Attack each vector**
|
|
203
|
+
|
|
204
|
+
Work through the assumption list. For each one:
|
|
205
|
+
- **State the risk:** what breaks if this assumption is wrong?
|
|
206
|
+
- **Reason through the system's response:** how does the environment, dependency, or component actually behave in this case? Trace the actual mechanics, not the happy path.
|
|
207
|
+
- **Verdict:**
|
|
208
|
+
- ✅ — assumption holds, no change needed
|
|
209
|
+
- ⚠️ → [specific mitigation] — risk is real but manageable; state the required change
|
|
210
|
+
- ❌ — plan-breaker; must resolve before building
|
|
211
|
+
|
|
212
|
+
Don't pad. If an assumption clearly holds, say so and move on. Depth where there's actual risk.
|
|
213
|
+
|
|
214
|
+
**Step 3 — Surface what changed**
|
|
215
|
+
|
|
216
|
+
List only the changes the stress-test produced. Not every risk — only the ones with a ⚠️ or ❌ verdict that require action. For each: what changes, and why.
|
|
217
|
+
|
|
218
|
+
**Step 4 — Ready to build?**
|
|
219
|
+
|
|
220
|
+
State clearly: the plan is sound as-is / the plan needs these N changes before it's sound. If changes are needed, offer to incorporate them and proceed.
|
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. **
|
|
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
|
-
-
|
|
18
|
-
-
|
|
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.
|
|
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
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
|
},
|