-
Notifications
You must be signed in to change notification settings - Fork 3
Comparing changes
Open a pull request
base repository: Unsupervisedcom/deepwork
base: main
head repository: Unsupervisedcom/deepwork
compare: pre-release
- 8 commits
- 35 files changed
- 3 contributors
Commits on Apr 15, 2026
-
feat: add tool requirements policy enforcement system
Introduces a PreToolUse hook-based policy system that evaluates tool calls against RFC 2119-style requirements defined in .deepwork/tool_requirements/*.yml. Policies are checked via an HTTP sidecar server (spawned alongside the MCP server) using Haiku for semantic evaluation. Failed checks can be appealed via a new appeal_tool_requirement MCP tool. Approvals are cached with a 1-hour TTL. Key features: - Policy files with tools, match (param regex), requirements, extends (inheritance) - no_exception rules that cannot be appealed - Fail-closed: hook denies if MCP sidecar is unreachable - Loop prevention: appeal tool calls skip the hook - Multi-instance support via PID-keyed + session-keyed port files - Evaluator encapsulated behind ABC for future swap to direct API calls Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9416577 - Browse repository at this point
Copy the full SHA 9416577View commit details -
fix: address code review findings
- engine.py: rename loop variable `f` to `failure` for clarity - sidecar.py: move `import asyncio` to module level, fix event loop leak with try/finally, fix inaccurate comment, add session_id validation - evaluator.py: change `continue` to `break` on raw JSON array parse, filter non-dict items in _extract_json_array - discovery.py: fix double-name warning message, remove dead code - test_engine.py: add type hints to MockEvaluator.evaluate, remove unused imports - test_tool_requirements_hook.py: remove redundant test Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 291ab6c - Browse repository at this point
Copy the full SHA 291ab6cView commit details -
docs: update documentation for tool requirements system
- doc/mcp_interface.md: add appeal_tool_requirement as tool #12, bump count - doc/architecture.md: add tool_requirements/ package and hook to structure - CLAUDE.md: add tool_requirements/ and hook to project structure appendix - src/deepwork/hooks/README.md: add tool_requirements.py to files table - CHANGELOG.md: add tool requirements feature to Unreleased Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0944b53 - Browse repository at this point
Copy the full SHA 0944b53View commit details -
fix: address round-2 review findings
- evaluator.py: fix comment accuracy, extract _filter_dicts to reduce DRY - discovery.py: fix diamond inheritance by copying visited set per parent - test_engine.py: remove redundant @pytest.mark.asyncio decorators, fix dict type annotation, replace internal cache access with call_count - test_evaluator.py: add tests for HaikuSubprocessEvaluator, deduplication, non-dict filtering, and invalid bracket JSON Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for feb32d5 - Browse repository at this point
Copy the full SHA feb32d5View commit details -
docs: add DW-REQ-012 requirement spec and test traceability
- Create DW-REQ-012-tool-requirements.md with 12 sub-requirements covering policy format, discovery, inheritance, matching, evaluation, check flow, appeal, caching, hook, sidecar, multi-instance, and startup - Add PLUG-REQ-001.15 for the PreToolUse hook registration - Add requirement ID references to all test module docstrings - Add THIS TEST VALIDATES traceability comments to critical tests Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2174e03 - Browse repository at this point
Copy the full SHA 2174e03View commit details -
fix: address round-3 review findings
- DW-REQ-012.5.3: make SHOULD violation criterion concrete and testable - PLUG-REQ-001: fix section ordering (001.14 before 001.15) - test_engine.py: use two-level REQ ID format (DW-REQ-012.6 not 012.6.3) - test_hook.py: use two-level REQ ID format, fix traceability comment placement - test_evaluator.py: move tests to correct class, remove redundant decorators Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9358aee - Browse repository at this point
Copy the full SHA 9358aeeView commit details -
fix: address round-4 review findings
- test_tool_requirements_hook.py: move import to module level (DRY) - test_evaluator.py: add missing blank line between classes (E302) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 012f0af - Browse repository at this point
Copy the full SHA 012f0afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0e2ed75 - Browse repository at this point
Copy the full SHA 0e2ed75View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...pre-release