Skip to content

Comments

Make hook wrappers for multiple platforms#50

Merged
nhorton merged 9 commits intomainfrom
claude/document-cli-platforms-WQ085
Jan 16, 2026
Merged

Make hook wrappers for multiple platforms#50
nhorton merged 9 commits intomainfrom
claude/document-cli-platforms-WQ085

Conversation

@nhorton
Copy link
Contributor

@nhorton nhorton commented Jan 16, 2026

No description provided.

This adds a hook wrapper system that allows writing hooks once in Python
and running them on both Claude Code and Gemini CLI platforms.

New files:
- src/deepwork/hooks/wrapper.py: Cross-platform input/output normalization
- src/deepwork/hooks/claude_hook.sh: Shell wrapper for Claude Code
- src/deepwork/hooks/gemini_hook.sh: Shell wrapper for Gemini CLI
- src/deepwork/hooks/policy_check.py: Cross-platform policy evaluation hook
- doc/platform/: Platform-specific hook documentation and learnings

The wrapper system normalizes:
- Event names (Stop ↔ AfterAgent, PreToolUse ↔ BeforeTool)
- Tool names (Write ↔ write_file, Bash ↔ shell)
- Decision values (block → deny for Gemini)

Includes 46 new tests and bumps version to 0.3.0.
@nhorton nhorton force-pushed the claude/document-cli-platforms-WQ085 branch from bd30bdf to 0f7b715 Compare January 16, 2026 16:20
nhorton and others added 5 commits January 16, 2026 09:30
Reverts unintended changes that removed references to structured
questions and the AskUserQuestion tool from standard job commands.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updates the source of truth files in src/deepwork/standard_jobs/ to match
the 'ask structured questions' phrasing that was previously only in the
installed copies.

This ensures future `deepwork install` runs will maintain consistency
between source and installed files.

Changes:
- deepwork_jobs v0.5.0: Added structured questions phrasing to define.md,
  implement.md, job.yml and quality criteria hooks
- deepwork_policy v0.2.0: Added structured questions phrasing to define.md
  and job.yml

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Since only 0.2.0 has been released, merge all changes since then into
the upcoming 0.3.0 release entry.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
nhorton and others added 3 commits January 16, 2026 09:57
- Remove unused imports (pytest, NORMALIZED_TO_TOOL)
- Prefix unused loop variables with underscore
- Remove f-string prefix from string without placeholders

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nhorton nhorton added this pull request to the merge queue Jan 16, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 16, 2026
@nhorton nhorton merged commit feb0ecf into main Jan 16, 2026
6 checks passed
@nhorton nhorton deleted the claude/document-cli-platforms-WQ085 branch January 16, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants