stravinsky 0.2.52__py3-none-any.whl → 0.4.18__py3-none-any.whl

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.

Potentially problematic release.


This version of stravinsky might be problematic. Click here for more details.

Files changed (58) hide show
  1. mcp_bridge/__init__.py +1 -1
  2. mcp_bridge/auth/token_store.py +113 -11
  3. mcp_bridge/cli/__init__.py +6 -0
  4. mcp_bridge/cli/install_hooks.py +1265 -0
  5. mcp_bridge/cli/session_report.py +585 -0
  6. mcp_bridge/config/MANIFEST_SCHEMA.md +305 -0
  7. mcp_bridge/config/README.md +276 -0
  8. mcp_bridge/config/hook_config.py +249 -0
  9. mcp_bridge/config/hooks_manifest.json +138 -0
  10. mcp_bridge/config/rate_limits.py +222 -0
  11. mcp_bridge/config/skills_manifest.json +128 -0
  12. mcp_bridge/hooks/HOOKS_SETTINGS.json +175 -0
  13. mcp_bridge/hooks/README.md +215 -0
  14. mcp_bridge/hooks/__init__.py +119 -60
  15. mcp_bridge/hooks/edit_recovery.py +42 -37
  16. mcp_bridge/hooks/git_noninteractive.py +89 -0
  17. mcp_bridge/hooks/keyword_detector.py +30 -0
  18. mcp_bridge/hooks/manager.py +8 -0
  19. mcp_bridge/hooks/notification_hook.py +103 -0
  20. mcp_bridge/hooks/parallel_execution.py +111 -0
  21. mcp_bridge/hooks/pre_compact.py +82 -183
  22. mcp_bridge/hooks/rules_injector.py +507 -0
  23. mcp_bridge/hooks/session_notifier.py +125 -0
  24. mcp_bridge/{native_hooks → hooks}/stravinsky_mode.py +51 -16
  25. mcp_bridge/hooks/subagent_stop.py +98 -0
  26. mcp_bridge/hooks/task_validator.py +73 -0
  27. mcp_bridge/hooks/tmux_manager.py +141 -0
  28. mcp_bridge/hooks/todo_continuation.py +90 -0
  29. mcp_bridge/hooks/todo_delegation.py +88 -0
  30. mcp_bridge/hooks/tool_messaging.py +267 -0
  31. mcp_bridge/hooks/truncator.py +21 -17
  32. mcp_bridge/notifications.py +151 -0
  33. mcp_bridge/prompts/multimodal.py +24 -3
  34. mcp_bridge/server.py +214 -49
  35. mcp_bridge/server_tools.py +445 -0
  36. mcp_bridge/tools/__init__.py +22 -18
  37. mcp_bridge/tools/agent_manager.py +220 -32
  38. mcp_bridge/tools/code_search.py +97 -11
  39. mcp_bridge/tools/lsp/__init__.py +7 -0
  40. mcp_bridge/tools/lsp/manager.py +448 -0
  41. mcp_bridge/tools/lsp/tools.py +637 -150
  42. mcp_bridge/tools/model_invoke.py +208 -106
  43. mcp_bridge/tools/query_classifier.py +323 -0
  44. mcp_bridge/tools/semantic_search.py +3042 -0
  45. mcp_bridge/tools/templates.py +32 -18
  46. mcp_bridge/update_manager.py +589 -0
  47. mcp_bridge/update_manager_pypi.py +299 -0
  48. stravinsky-0.4.18.dist-info/METADATA +468 -0
  49. stravinsky-0.4.18.dist-info/RECORD +88 -0
  50. stravinsky-0.4.18.dist-info/entry_points.txt +5 -0
  51. mcp_bridge/native_hooks/edit_recovery.py +0 -46
  52. mcp_bridge/native_hooks/todo_delegation.py +0 -54
  53. mcp_bridge/native_hooks/truncator.py +0 -23
  54. stravinsky-0.2.52.dist-info/METADATA +0 -204
  55. stravinsky-0.2.52.dist-info/RECORD +0 -63
  56. stravinsky-0.2.52.dist-info/entry_points.txt +0 -3
  57. /mcp_bridge/{native_hooks → hooks}/context.py +0 -0
  58. {stravinsky-0.2.52.dist-info → stravinsky-0.4.18.dist-info}/WHEEL +0 -0
@@ -0,0 +1,305 @@
1
+ # Stravinsky Manifest Schema Documentation
2
+
3
+ ## Overview
4
+
5
+ The manifest files (`hooks_manifest.json` and `skills_manifest.json`) track version information, integrity, and metadata for all Stravinsky-provided hooks and skills. These manifests enable:
6
+
7
+ - **Integrity Verification**: Detect unauthorized or accidental modifications
8
+ - **Update Management**: Determine which files need updating during package upgrades
9
+ - **User Customization**: Distinguish between official Stravinsky files and user modifications
10
+ - **Dependency Tracking**: Understand hook dependencies and required relationships
11
+
12
+ ## File Locations
13
+
14
+ ```
15
+ mcp_bridge/config/
16
+ ├── hooks_manifest.json # Official hook metadata
17
+ ├── skills_manifest.json # Slash command metadata
18
+ └── MANIFEST_SCHEMA.md # This documentation
19
+ ```
20
+
21
+ ## Manifest Structure
22
+
23
+ ### Common Fields
24
+
25
+ Both manifests share these top-level fields:
26
+
27
+ | Field | Type | Purpose |
28
+ |-------|------|---------|
29
+ | `schema_version` | string | Manifest format version (e.g., "1.0.0") |
30
+ | `manifest_version` | string | Stravinsky package version this manifest was generated for |
31
+ | `description` | string | Brief description of manifest purpose |
32
+ | `generated_date` | ISO 8601 | Timestamp when manifest was created/updated |
33
+ | `schema` | object | Field definitions and their meanings |
34
+ | `[items]` | object | Collection of hooks or skills with metadata |
35
+ | `usage` | object | Integration notes for `update_manager.py` |
36
+
37
+ ### hooks_manifest.json Schema
38
+
39
+ Each hook entry has these fields:
40
+
41
+ ```json
42
+ {
43
+ "hook_name": {
44
+ "version": "0.2.63",
45
+ "source": "mcp_bridge/hooks/hook_name.py",
46
+ "description": "Brief description of hook purpose",
47
+ "hook_type": "PreToolUse|PostToolUse|UserPromptSubmit|Notification|SubagentStop|PreCompact|package|manager|session_idle|session_manager",
48
+ "checksum": "sha256_first_12_chars",
49
+ "lines_of_code": 150,
50
+ "updatable": true,
51
+ "priority": "critical|high|medium|low",
52
+ "required": true,
53
+ "dependencies": ["manager.py", "other_hook.py"]
54
+ }
55
+ }
56
+ ```
57
+
58
+ ### skills_manifest.json Schema
59
+
60
+ Each skill entry has these fields:
61
+
62
+ ```json
63
+ {
64
+ "skill_name": {
65
+ "file_path": "strav.md or str/search.md",
66
+ "description": "Description from skill frontmatter",
67
+ "category": "core|research|implementation|architecture",
68
+ "checksum": "sha256_first_12_chars",
69
+ "lines_of_code": 200,
70
+ "updatable": true,
71
+ "priority": "critical|high|medium|low",
72
+ "agent_type": "explore|dewey|frontend|delphi|stravinsky|implementation_lead|code_reviewer",
73
+ "blocking": true,
74
+ "requires_auth": true,
75
+ "version_first_added": "0.1.0",
76
+ "notes": "Additional context or special considerations"
77
+ }
78
+ }
79
+ ```
80
+
81
+ ## Field Definitions
82
+
83
+ ### `version`
84
+ Semantic version of the hook/skill implementation. Format: `X.Y.Z` (e.g., `0.2.63`).
85
+
86
+ ### `source` / `file_path`
87
+ Absolute path (hooks) or relative path from `.claude/commands/` (skills).
88
+
89
+ ### `description`
90
+ One-line functional description of what the hook/skill does.
91
+
92
+ ### `hook_type` (hooks only)
93
+ Claude Code hook type that this hook implements:
94
+ - **PreToolUse**: Runs before tool execution (can block with exit code 2)
95
+ - **PostToolUse**: Runs after tool completes
96
+ - **UserPromptSubmit**: Runs when user submits prompt
97
+ - **Notification**: Runs on notification events
98
+ - **SubagentStop**: Runs when agent completes
99
+ - **PreCompact**: Runs before context compaction
100
+ - **package**: Module/package initialization
101
+ - **manager**: Hook management infrastructure
102
+ - **session_idle**: Session idle detection
103
+
104
+ ### `category` (skills only)
105
+ Skill category for organization:
106
+ - **core**: Essential orchestration features
107
+ - **research**: Documentation and code search
108
+ - **implementation**: Development workflows (test, review, deploy)
109
+ - **architecture**: Strategic advice and complex debugging
110
+
111
+ ### `checksum`
112
+ SHA-256 hash (first 12 characters) for integrity verification.
113
+
114
+ **How to verify/generate:**
115
+ ```bash
116
+ # Generate checksum
117
+ sha256sum mcp_bridge/hooks/hook_name.py | awk '{print substr($1,1,12)}'
118
+
119
+ # Verify file hasn't been modified
120
+ sha256sum -c <<< "checksum_value mcp_bridge/hooks/hook_name.py"
121
+ ```
122
+
123
+ ### `updatable`
124
+ - **true**: Official Stravinsky file - can be auto-updated by `update_manager.py`
125
+ - **false**: User customization or user-provided hook - skip during updates
126
+
127
+ **CRITICAL**: User hooks from `.claude/hooks/` should ALWAYS have `updatable: false` in the internal manifest comparison.
128
+
129
+ ### `priority`
130
+ Update urgency level:
131
+ - **critical**: Security fixes, core functionality - update immediately
132
+ - **high**: New features, important improvements - include in next release
133
+ - **medium**: Enhancements, can batch with other updates
134
+ - **low**: Optional improvements, can defer
135
+
136
+ ### `required`
137
+ - **true**: Hook is essential for core functionality and cannot be disabled
138
+ - **false**: Optional hook that provides enhanced behavior but isn't critical
139
+
140
+ ### `blocking` (skills only)
141
+ - **true**: Skill blocks execution until completion
142
+ - **false**: Skill runs asynchronously in background
143
+
144
+ ### `agent_type` (skills only)
145
+ Primary agent spawned by this skill:
146
+ - **stravinsky**: Task orchestration
147
+ - **explore**: Codebase search
148
+ - **dewey**: Documentation research
149
+ - **delphi**: Strategic architecture advisor
150
+ - **frontend**: UI/UX design
151
+ - **implementation_lead**: Coordinates implementation
152
+ - **code_reviewer**: Quality analysis
153
+
154
+ ### `requires_auth` (skills only)
155
+ - **true**: Skill requires OAuth setup (Gemini or OpenAI)
156
+ - **false**: Skill works without authentication
157
+
158
+ ### `dependencies`
159
+ List of other files this hook/skill depends on:
160
+ - Hooks typically depend on `manager.py`
161
+ - Some hooks depend on other hooks they coordinate with
162
+ - Skills may list dependent tools or agents
163
+
164
+ ## Integration with update_manager.py
165
+
166
+ The `update_manager.py` module should use these manifests to:
167
+
168
+ ### 1. Version Checking
169
+ ```python
170
+ # Load installed manifest
171
+ installed_manifest = load_manifest("hooks_manifest.json")
172
+
173
+ # Compare with remote version
174
+ if installed_manifest.version < remote_manifest.version:
175
+ # Updates available
176
+ pass
177
+ ```
178
+
179
+ ### 2. Integrity Verification
180
+ ```python
181
+ # Before updating, verify file hasn't been locally modified
182
+ current_checksum = compute_sha256(file_path)
183
+ expected_checksum = manifest[hook_name].checksum
184
+
185
+ if current_checksum != expected_checksum and manifest[hook_name].updatable:
186
+ # Local modifications detected - warn user or skip
187
+ skip_update(hook_name)
188
+ ```
189
+
190
+ ### 3. Selective Updates
191
+ ```python
192
+ # Only update files marked updatable=true
193
+ for hook_name, hook_info in manifest.items():
194
+ if hook_info.updatable and should_update(hook_info.priority):
195
+ update_hook(hook_name, new_version)
196
+ ```
197
+
198
+ ### 4. Dependency Resolution
199
+ ```python
200
+ # Ensure dependencies are met before updating
201
+ for dependency in hook_info.dependencies:
202
+ if not is_dependency_installed(dependency):
203
+ error("Missing dependency: " + dependency)
204
+ ```
205
+
206
+ ## Usage Examples
207
+
208
+ ### Checking Hook Status
209
+ ```bash
210
+ # Find all critical hooks needing updates
211
+ jq '.hooks | to_entries[] | select(.value.priority == "critical")' \
212
+ mcp_bridge/config/hooks_manifest.json
213
+
214
+ # Check if a hook is required
215
+ jq '.hooks.parallel_enforcer.required' \
216
+ mcp_bridge/config/hooks_manifest.json
217
+ ```
218
+
219
+ ### Verifying File Integrity
220
+ ```bash
221
+ # Verify all hooks match expected checksums
222
+ python -c "
223
+ import json
224
+ from pathlib import Path
225
+
226
+ with open('mcp_bridge/config/hooks_manifest.json') as f:
227
+ manifest = json.load(f)
228
+
229
+ for hook_name, info in manifest['hooks'].items():
230
+ file_path = info['source']
231
+ if Path(file_path).exists():
232
+ # Compute checksum and compare
233
+ pass
234
+ "
235
+ ```
236
+
237
+ ### Listing Available Skills
238
+ ```bash
239
+ # Extract all skills with their agents
240
+ jq '.skills | to_entries[] | {name: .key, agent: .value.agent_type, blocking: .value.blocking}' \
241
+ mcp_bridge/config/skills_manifest.json
242
+ ```
243
+
244
+ ## Best Practices
245
+
246
+ ### For Stravinsky Maintainers
247
+
248
+ 1. **Update on Release**: Regenerate manifests when releasing a new version
249
+ 2. **Verify Checksums**: Ensure all checksums are current and accurate
250
+ 3. **Document Changes**: Add notes to skills when updating functionality
251
+ 4. **Priority Assignment**: Use priority levels consistently across releases
252
+ 5. **Dependency Tracking**: Keep dependency lists current and accurate
253
+
254
+ ### For Package Users
255
+
256
+ 1. **Don't Modify Manifests**: Let `update_manager.py` handle manifest updates
257
+ 2. **Preserve Customizations**: Don't modify hooks marked as required=true without good reason
258
+ 3. **Check Auth Requirements**: Ensure OAuth is configured for skills requiring authentication
259
+ 4. **Monitor Critical Updates**: Subscribe to updates for hooks marked priority=critical
260
+
261
+ ### For Developers
262
+
263
+ 1. **Custom Hooks**: Create custom hooks in `.claude/hooks/` (not in package)
264
+ 2. **Hook Testing**: Always test hooks with sample input before deploying
265
+ 3. **Checksum Calculation**: Update checksums when modifying hook files
266
+ 4. **Dependency Management**: Clearly document all hook dependencies
267
+
268
+ ## Schema Evolution
269
+
270
+ ### Version 1.0.0 (Current)
271
+ - Initial manifest format
272
+ - Hook and skill metadata tracking
273
+ - Integrity verification via checksums
274
+ - Priority-based update strategy
275
+
276
+ ### Future Versions
277
+ - Will be tracked in `schema_version`
278
+ - Backward compatibility maintained where possible
279
+ - Migration guides provided for breaking changes
280
+
281
+ ## Troubleshooting
282
+
283
+ ### Checksum Mismatch
284
+ **Problem**: Hook has been modified locally
285
+ **Solution**:
286
+ - If intentional: Update manifest checksum or move to custom hooks
287
+ - If accidental: Restore original file from package
288
+
289
+ ### Missing Dependencies
290
+ **Problem**: Hook dependency is not installed
291
+ **Solution**: Ensure all required hooks in `dependencies` list are installed
292
+
293
+ ### Update Failures
294
+ **Problem**: `update_manager.py` fails to update a hook
295
+ **Solution**:
296
+ - Check file permissions
297
+ - Verify checksum hasn't changed unexpectedly
298
+ - Check for read-only files
299
+
300
+ ## Related Files
301
+
302
+ - `mcp_bridge/cli/install_hooks.py` - Hook installation script
303
+ - `mcp_bridge/config/hooks.py` - Hook configuration utilities
304
+ - `mcp_bridge/hooks/manager.py` - Hook execution manager
305
+ - `.claude/settings.json` - Claude Code hook configuration
@@ -0,0 +1,276 @@
1
+ # Stravinsky Configuration & Manifest System
2
+
3
+ ## Overview
4
+
5
+ The `mcp_bridge/config/` directory contains:
6
+
7
+ 1. **hooks_manifest.json** - Version tracking for 32 official hooks
8
+ 2. **skills_manifest.json** - Metadata for 16 slash commands/skills
9
+ 3. **MANIFEST_SCHEMA.md** - Detailed schema documentation
10
+ 4. **hooks.py** - Hook configuration utilities
11
+ 5. **README.md** - This file
12
+
13
+ ## Quick Start
14
+
15
+ ### For Users
16
+ No action needed. Manifests are automatically managed by the Stravinsky package.
17
+
18
+ ### For Maintainers
19
+ When releasing a new version:
20
+
21
+ ```bash
22
+ # 1. Update version in pyproject.toml and mcp_bridge/__init__.py
23
+ # 2. Regenerate manifests (if hooks/skills changed)
24
+ python scripts/generate_manifests.py
25
+
26
+ # 3. Commit changes
27
+ git add mcp_bridge/config/*.json
28
+ git commit -m "chore: update manifests for v0.3.X"
29
+ ```
30
+
31
+ ## File Descriptions
32
+
33
+ ### hooks_manifest.json
34
+ Tracks all 32 official hooks provided by Stravinsky:
35
+
36
+ - **Core execution hooks** (3): `parallel_execution`, `stravinsky_mode`, `todo_delegation`
37
+ - **Context hooks** (6): `context`, `todo_continuation`, `todo_enforcer`, `directory_context`, `rules_injector`, `pre_compact`
38
+ - **Tool enhancement hooks** (6): `tool_messaging`, `edit_recovery`, `truncator`, `empty_message_sanitizer`, `comment_checker`, `compaction`
39
+ - **Agent lifecycle hooks** (4): `notification_hook`, `subagent_stop`, `session_recovery`, `task_validator`
40
+ - **Advanced optimization** (5): `preemptive_compaction`, `parallel_enforcer`, `auto_slash_command`, `agent_reminder`, `budget_optimizer`
41
+ - **Execution context** (3): `keyword_detector`, `git_noninteractive`, `session_idle`, `session_notifier`, `tmux_manager`
42
+
43
+ **Key Metrics:**
44
+ - 9 required hooks (critical path)
45
+ - 23 optional hooks (enhanced behavior)
46
+ - 2 critical priority, 11 high, 12 medium, 7 low
47
+
48
+ ### skills_manifest.json
49
+ Tracks all 16 slash commands (skills):
50
+
51
+ **Core Skills (4):**
52
+ - `/strav` - Task orchestration
53
+ - `/strav:loop` - Continuation loop management
54
+ - `/strav:cancel-loop` - Loop cancellation
55
+ - `/version` - Diagnostic info
56
+
57
+ **Implementation Skills (4):**
58
+ - `/commit` - Git commit orchestration
59
+ - `/review` - Code review
60
+ - `/verify` - Testing and deployment verification
61
+ - `/publish` - PyPI deployment
62
+
63
+ **Research Skills (7):**
64
+ - `/dewey` - Documentation research
65
+ - `/index` - Semantic search indexing
66
+ - `/str:index` - Detailed semantic indexing
67
+ - `/str:search` - Semantic code search
68
+ - `/str:start_filewatch` - File watching
69
+ - `/str:stop_filewatch` - Stop file watching
70
+ - `/str:stats` - Index statistics
71
+
72
+ **Architecture Skills (1):**
73
+ - `/delphi` - Strategic advisor
74
+
75
+ **Key Metrics:**
76
+ - 6 blocking skills (immediate execution)
77
+ - 10 async skills (background execution)
78
+ - All skills marked updatable=true (user customizable)
79
+
80
+ ## Integration with update_manager.py
81
+
82
+ The manifests enable smart update workflows:
83
+
84
+ ### Version Checking
85
+ ```python
86
+ # Load manifest from installed package
87
+ manifest = load_manifest_from_package()
88
+
89
+ # Compare with remote version
90
+ if manifest.manifest_version < remote_version:
91
+ # Updates available
92
+ show_update_notification()
93
+ ```
94
+
95
+ ### Integrity Verification
96
+ ```python
97
+ # Before updating a hook, verify it hasn't been modified
98
+ current_hash = compute_sha256(hook_file)
99
+ expected_hash = manifest[hook_name].checksum
100
+
101
+ if current_hash != expected_hash:
102
+ # User has customized this hook
103
+ if manifest[hook_name].updatable:
104
+ warn_about_modifications()
105
+ ```
106
+
107
+ ### Selective Updates
108
+ ```python
109
+ # Only update files marked updatable=true
110
+ # Respect user customizations in .claude/hooks/
111
+ for hook_name, hook_info in manifest.hooks.items():
112
+ if hook_info.updatable and hook_info.priority in ["critical", "high"]:
113
+ update_hook(hook_name)
114
+ ```
115
+
116
+ ### Dependency Resolution
117
+ ```python
118
+ # Ensure all dependencies are installed
119
+ for dependency in hook_info.dependencies:
120
+ if not is_installed(dependency):
121
+ error(f"Missing dependency: {dependency}")
122
+ ```
123
+
124
+ ## Manifest Fields Reference
125
+
126
+ ### Hook Entry
127
+ ```json
128
+ {
129
+ "hook_name": {
130
+ "version": "0.2.63",
131
+ "source": "mcp_bridge/hooks/hook_name.py",
132
+ "description": "What this hook does",
133
+ "hook_type": "PreToolUse|PostToolUse|UserPromptSubmit|...",
134
+ "checksum": "sha256_first_12_chars",
135
+ "lines_of_code": 150,
136
+ "updatable": true,
137
+ "priority": "critical|high|medium|low",
138
+ "required": true,
139
+ "dependencies": ["manager.py"]
140
+ }
141
+ }
142
+ ```
143
+
144
+ ### Skill Entry
145
+ ```json
146
+ {
147
+ "skill_name": {
148
+ "file_path": "strav.md or str/search.md",
149
+ "description": "What this skill does",
150
+ "category": "core|research|implementation|architecture",
151
+ "checksum": "sha256_first_12_chars",
152
+ "lines_of_code": 200,
153
+ "updatable": true,
154
+ "priority": "critical|high|medium|low",
155
+ "agent_type": "explore|dewey|frontend|...",
156
+ "blocking": true,
157
+ "requires_auth": true,
158
+ "version_first_added": "0.1.0"
159
+ }
160
+ }
161
+ ```
162
+
163
+ See **MANIFEST_SCHEMA.md** for complete field documentation.
164
+
165
+ ## Checksum Verification
166
+
167
+ ### Generate Checksums
168
+ ```bash
169
+ # For a single file
170
+ sha256sum mcp_bridge/hooks/parallel_execution.py | awk '{print substr($1,1,12)}'
171
+
172
+ # For all hooks
173
+ for f in mcp_bridge/hooks/*.py; do
174
+ echo "$(basename $f): $(sha256sum $f | awk '{print substr($1,1,12)}')"
175
+ done
176
+ ```
177
+
178
+ ### Verify File Integrity
179
+ ```bash
180
+ # Check if a file has been modified
181
+ current=$(sha256sum mcp_bridge/hooks/parallel_execution.py | awk '{print substr($1,1,12)}')
182
+ expected=$(jq -r '.hooks.parallel_execution.checksum' mcp_bridge/config/hooks_manifest.json)
183
+
184
+ if [ "$current" != "$expected" ]; then
185
+ echo "File has been modified locally"
186
+ fi
187
+ ```
188
+
189
+ ## Update Strategy
190
+
191
+ ### Priority Levels
192
+ - **critical**: Security, core functionality - update immediately
193
+ - **high**: New features, important improvements - include in next release
194
+ - **medium**: Enhancements - can batch together
195
+ - **low**: Optional improvements - can defer
196
+
197
+ ### Update Workflow
198
+ 1. Check `manifest_version` against installed version
199
+ 2. If newer version available, proceed to verify step
200
+ 3. For each hook/skill:
201
+ - Compute current checksum
202
+ - Compare with manifest checksum
203
+ - If modified: warn user or skip (respect customizations)
204
+ - If unmodified and priority is high/critical: update
205
+ 4. After updates, recompute checksums
206
+ 5. Update manifest with new version
207
+
208
+ ## Best Practices
209
+
210
+ ### For Stravinsky Maintainers
211
+ 1. **Always update manifests on release** - Use `scripts/generate_manifests.py`
212
+ 2. **Document hook changes** - Update descriptions if functionality changes
213
+ 3. **Keep checksums current** - Run verification script before commits
214
+ 4. **Track dependencies** - Add any new hook dependencies to manifest
215
+ 5. **Test manifest generation** - Validate JSON before commit
216
+
217
+ ### For Package Users
218
+ 1. **Don't edit manifests manually** - Let automated tools manage them
219
+ 2. **Preserve customizations** - Store custom hooks in `.claude/hooks/` instead
220
+ 3. **Check authentication** - Skills requiring auth need OAuth setup
221
+ 4. **Review update notes** - Read manifest notes for important context
222
+
223
+ ### For Hook Developers
224
+ 1. **Add to manifest immediately** - New hooks must be in manifest
225
+ 2. **Include checksum** - Use `sha256sum | awk '{print substr($1,1,12)}'`
226
+ 3. **Document dependencies** - List all other hooks/modules needed
227
+ 4. **Test locally** - Verify hook works before adding to manifest
228
+ 5. **Update version field** - Bump manifest version on release
229
+
230
+ ## Troubleshooting
231
+
232
+ ### Manifest JSON is invalid
233
+ ```bash
234
+ # Validate JSON syntax
235
+ python -m json.tool mcp_bridge/config/hooks_manifest.json > /dev/null
236
+ ```
237
+
238
+ ### Checksums don't match
239
+ ```bash
240
+ # Regenerate checksums
241
+ python scripts/generate_manifests.py --recalc-checksums
242
+ ```
243
+
244
+ ### Missing hooks in manifest
245
+ ```bash
246
+ # List all hooks not in manifest
247
+ diff <(ls mcp_bridge/hooks/*.py | sed 's/.*\///' | sort) \
248
+ <(jq -r '.hooks | keys[]' mcp_bridge/config/hooks_manifest.json | sort)
249
+ ```
250
+
251
+ ### Update fails for a hook
252
+ 1. Check file permissions: `ls -l mcp_bridge/hooks/hook_name.py`
253
+ 2. Verify checksum: Compare current vs manifest
254
+ 3. Check dependencies: Ensure all are installed
255
+ 4. Review logs: Look for error messages in update output
256
+
257
+ ## Related Files
258
+
259
+ - `mcp_bridge/__init__.py` - Package version
260
+ - `mcp_bridge/hooks/manager.py` - Hook execution system
261
+ - `mcp_bridge/cli/install_hooks.py` - Hook installation
262
+ - `.claude/settings.json` - Hook configuration
263
+ - `pyproject.toml` - Package metadata
264
+
265
+ ## Version History
266
+
267
+ ### v1.0.0 (Current)
268
+ - Initial manifest schema
269
+ - 32 hooks tracked
270
+ - 16 skills tracked
271
+ - SHA-256 checksum verification
272
+ - Priority-based update strategy
273
+
274
+ ## Questions?
275
+
276
+ See **MANIFEST_SCHEMA.md** for detailed documentation.