- Add hooks/pre-compact: injects survival context before compaction - Add hooks/context-restore: targeted restoration after compaction - Update install.sh to write hooks to settings.json (not hooks.json) - Add migration logic for existing hooks.json - Use symlinks for skills installation (fixes re-install errors) Three-layer injection model: - SessionStart: full knowledge (~800 tokens) - PreCompact: survival context (~200 tokens, enters summary) - SessionStart:compact: targeted restore (~150 tokens) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
19 lines
724 B
Bash
Executable file
19 lines
724 B
Bash
Executable file
#!/bin/bash
|
|
# Blue PreCompact Hook
|
|
# Injects survival context BEFORE compaction so it enters the summary
|
|
# This ensures Claude retains awareness of Blue after compaction
|
|
|
|
cat << 'EOF'
|
|
<compaction-survival-context>
|
|
## Critical Context for Post-Compaction
|
|
|
|
This project uses Blue MCP tools. After compaction, remember:
|
|
|
|
1. **MCP Tools Available**: blue_status, blue_next, blue_rfc_*, blue_worktree_*, blue_pr_*
|
|
2. **SDLC Discipline**: Use worktrees for code changes, RFCs for planning
|
|
3. **Task Sync**: Tasks with blue_rfc metadata sync to .plan.md files
|
|
4. **Active State**: Run `blue_status` to see current RFC/worktree
|
|
|
|
If you notice workflow drift, run `blue_status` to restore context.
|
|
</compaction-survival-context>
|
|
EOF
|