Project-Aware Hooks Configuration
July 3, 2025 ยท View on GitHub
The session-end-summary.py and sync-docs-to-dart.py hooks are now project-aware and store data locally within each project instead of globally.
Configuration Files
.claude/dart-config.json
Controls Dart integration features:
{
"enable_doc_sync": true,
"default_docs_folder": "holace/Docs",
"workspace": "holace",
"dartboard": "holace/Tasks"
}
enable_doc_sync: Whether to enable automatic reminders for syncing .md files to Dartdefault_docs_folder: Default folder suggestion for Dart document creationworkspace: Your Dart workspace namedartboard: Default dartboard for task creation
.claude/session-summary.json
Controls session end summary behavior:
{
"show_dart_reminders": true,
"show_git_reminders": true,
"custom_reminders": [
"All new tasks must have a Phase parent",
"Run tests before committing",
"Use theme-aware CSS classes"
]
}
show_dart_reminders: Show Dart-specific reminders (auto-detected if not set)show_git_reminders: Show git-related reminderscustom_reminders: Project-specific reminder messages
.claude/sync-config.json (Alternative)
For projects that want to control sync behavior without full Dart config:
{
"dart_sync_enabled": false
}
Data Storage
Pending Syncs
Pending document syncs are now stored in:
- Primary:
<project-root>/.claude/pending-dart-syncs.json - Fallback:
~/.claude/hooks/pending-dart-syncs.json(if project directory is not writable)
The sync file stores up to 50 recent pending syncs with timestamps.
Auto-Detection
If no configuration files exist, the hooks will:
- Check for
.claude/dart-config.jsonin the project - Check for Dart-related content in
~/.claude/CLAUDE.md - Look for
mcp__dart__orDart MCPmentions
Migration from Global Storage
To migrate existing global data to project-specific storage:
- Copy
~/.claude/hooks/pending-dart-syncs.jsonto<project>/.claude/pending-dart-syncs.json - Create appropriate configuration files in your project's
.claudedirectory - The hooks will automatically use project-local storage going forward
Disabling Features
To disable Dart sync for a specific project:
- Create
.claude/dart-config.jsonwith"enable_doc_sync": false - Or create
.claude/sync-config.jsonwith"dart_sync_enabled": false
To disable all session summaries:
- Remove the
session-end-summary.pyhook from your hooks configuration - Or configure the hook to show minimal reminders
Example Setup
For a project using Dart integration:
mkdir -p .claude
cp /path/to/claude-hooks-repo/.claude/dart-config.example.json .claude/dart-config.json
cp /path/to/claude-hooks-repo/.claude/session-summary.example.json .claude/session-summary.json
# Edit the files to match your project settings
For a project without Dart:
mkdir -p .claude
echo '{"dart_sync_enabled": false}' > .claude/sync-config.json
echo '{"show_dart_reminders": false, "show_git_reminders": true}' > .claude/session-summary.json