mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-06 01:54:11 +08:00
- Implemented core memory clustering visualization in core-memory-clusters.js - Added functions for loading, rendering, and managing clusters and their members - Created example hooks configuration in hooks-config-example.json for session management - Developed test script for hooks integration in test-hooks.js - Included error handling and notifications for user interactions
61 lines
1.9 KiB
JSON
61 lines
1.9 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft-07/schema",
|
|
"description": "Example hooks configuration for CCW. Place in .claude/settings.json under 'hooks' key.",
|
|
"hooks": {
|
|
"session-start": [
|
|
{
|
|
"name": "Progressive Disclosure",
|
|
"description": "Injects progressive disclosure index at session start",
|
|
"enabled": true,
|
|
"handler": "internal:context",
|
|
"timeout": 5000,
|
|
"failMode": "silent"
|
|
}
|
|
],
|
|
"session-end": [
|
|
{
|
|
"name": "Update Cluster Metadata",
|
|
"description": "Updates cluster metadata after session ends",
|
|
"enabled": true,
|
|
"command": "ccw core-memory update-cluster --session $SESSION_ID",
|
|
"timeout": 30000,
|
|
"async": true,
|
|
"failMode": "log"
|
|
}
|
|
],
|
|
"file-modified": [
|
|
{
|
|
"name": "Auto Commit Checkpoint",
|
|
"description": "Creates git checkpoint on file modifications",
|
|
"enabled": false,
|
|
"command": "git add . && git commit -m \"[Auto] Checkpoint: $FILE_PATH\"",
|
|
"timeout": 10000,
|
|
"async": true,
|
|
"failMode": "log"
|
|
}
|
|
],
|
|
"context-request": [
|
|
{
|
|
"name": "Dynamic Context",
|
|
"description": "Provides context based on current session cluster",
|
|
"enabled": true,
|
|
"handler": "internal:context",
|
|
"timeout": 5000,
|
|
"failMode": "silent"
|
|
}
|
|
]
|
|
},
|
|
"hookSettings": {
|
|
"globalTimeout": 60000,
|
|
"defaultFailMode": "silent",
|
|
"allowAsync": true,
|
|
"enableLogging": true
|
|
},
|
|
"notes": {
|
|
"handler": "Use 'internal:context' for built-in context generation, or 'command' for external commands",
|
|
"failMode": "Options: 'silent' (ignore errors), 'log' (log errors), 'fail' (abort on error)",
|
|
"variables": "Available: $SESSION_ID, $FILE_PATH, $PROJECT_PATH, $CLUSTER_ID",
|
|
"async": "Async hooks run in background and don't block the main flow"
|
|
}
|
|
}
|