You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update documentation and version for policy system v2
- Update README.md with v2 policy examples and directory structure
- Update doc/architecture.md with v2 detection modes, action types, and queue system
- Bump version to 0.4.0 in pyproject.toml
- Add changelog entry for v2 policy system features
@@ -243,15 +252,31 @@ Maintain a clean repository with automatic branch management and isolation.
243
252
### 🛡️ Automated Policies
244
253
Enforce project standards and best practices without manual oversight. Policies monitor file changes and automatically prompt your AI assistant to follow specific guidelines when relevant code is modified.
245
254
-**Automatic Triggers**: Detect when specific files or directories are changed to fire relevant policies.
255
+
-**File Correspondence**: Define bidirectional (set) or directional (pair) relationships between files.
256
+
-**Command Actions**: Run idempotent commands (formatters, linters) automatically when files change.
246
257
-**Contextual Guidance**: Instructions are injected directly into the AI's workflow at the right moment.
247
-
-**Common Use Cases**: Keep documentation in sync, enforce security reviews, or automate changelog updates.
248
258
249
-
**Example Policy**:
250
-
```yaml
251
-
# Enforce documentation updates when config changes
The v1 format (`.deepwork.policy.yml`) is still supported for backward compatibility:
1148
+
1149
+
```yaml
1150
+
- name: "Update install guide"
1151
+
trigger: "app/config/**/*"
1152
+
safety: "docs/install_guide.md"
1153
+
instructions: |
1154
+
Configuration files have been modified. Please review docs/install_guide.md.
1155
+
```
1156
+
1071
1157
### Cross-Platform Hook Wrapper System
1072
1158
1073
1159
The `hooks/` module provides a wrapper system that allows writing hooks once in Python and running them on multiple platforms. This normalizes the differences between Claude Code and Gemini CLI hook systems.
0 commit comments