Skip to content

Gemini Support - #9

Merged
nhorton merged 16 commits into
mainfrom
deepwork/deepwork_jobs-add-platform-20260112
Jan 12, 2026
Merged

Gemini Support#9
nhorton merged 16 commits into
mainfrom
deepwork/deepwork_jobs-add-platform-20260112

Conversation

@nhorton

@nhorton nhorton commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

No description provided.

nhorton and others added 16 commits January 12, 2026 12:19
- Update define step to create job.yml in .deepwork/jobs/[job_name]/ instead of deepwork/[job_name]/
- Update implement step to verify job.yml location instead of copying from work directory
- Update job.yml quality criteria to check correct path
- Update README.md to use correct command names (deepwork_jobs.define, deepwork_jobs.refine)
- Sync changes to all installed files and generated commands
Creates a 4-step workflow for adding new AI platforms to DeepWork:
- research: Capture CLI config and hooks documentation
- add_capabilities: Update schema and adapters with new hooks
- implement: Create adapter, templates, tests (100% coverage)
- verify: Ensure installation works correctly

Each step includes quality validation stop hooks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document Gemini CLI configuration and hooks system:
- cli_configuration.md: TOML command format, discovery, namespacing
- hooks_system.md: No command-level hooks (only global hooks in settings.json)

Key findings:
- Commands stored in .gemini/commands/ (TOML format)
- No hooks available in slash command definitions
- Global hooks exist but cannot be configured per-command

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
No new hooks added to schema - Gemini CLI does not support command-level hooks.

Analysis findings:
- Gemini CLI TOML command files only support 'prompt' and 'description' fields
- Global hooks exist in settings.json but are NOT per-command
- All existing DeepWork hooks (after_agent, before_tool, before_prompt) already
  cover the generic patterns; Gemini just won't support them

Added documentation block in adapters.py explaining hook support by platform.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add full platform support for Gemini CLI:

Adapter (src/deepwork/core/adapters.py):
- GeminiAdapter class with TOML command format
- Subdirectory-based namespacing (job_name/step_id.toml -> /job_name:step_id)
- Empty hook_name_mapping (Gemini has no command-level hooks)
- sync_hooks returns 0 (no-op since hooks are global-only)

Template (src/deepwork/templates/gemini/command-job-step.toml.jinja):
- TOML format with description and prompt fields
- Colon namespacing for command references
- Quality criteria embedded in prompt (since no stop_hooks)

Tests (tests/unit/test_adapters.py):
- 18 new tests for GeminiAdapter
- All adapter tests pass (36 total)
- Full coverage of new GeminiAdapter code

README.md:
- Added Supported Platforms table
- Gemini CLI installation instructions
- Platform-specific notes about hooks and TOML format
- Updated directory structure examples

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Verified Gemini CLI platform integration:
- deepwork install --platform gemini completes successfully
- All 8 TOML command files generated correctly
- Proper directory structure with subdirectory namespacing
- Cross-platform compatibility confirmed (Claude still works)
- Both platforms in .deepwork/config.yml

Generated files:
- .gemini/commands/deepwork_jobs/*.toml (3 files)
- .gemini/commands/deepwork_policy/define.toml
- .gemini/commands/add_platform/*.toml (4 files)

Verification report: deepwork/add_platform/verification_complete.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nhorton
nhorton merged commit d144e01 into main Jan 12, 2026
1 check passed
@nhorton
nhorton deleted the deepwork/deepwork_jobs-add-platform-20260112 branch January 14, 2026 18:22
nhorton added a commit that referenced this pull request Mar 30, 2026
- Add deepschema skill to directory trees in architecture.md and CLAUDE.md
- Add get_named_schemas tool (#9) to architecture.md MCP tools section
- Update hooks README event mapping (add before_model, after_model, SubagentStop)
- Update hooks README tool mapping (add web_fetch, web_search, task)
- Add .deepreview to hooks README files table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
github-merge-queue Bot pushed a commit that referenced this pull request Mar 30, 2026
* inital spec file

* feat: implement DeepSchema system for rich file schemas with validation and review generation

DeepSchemas enrich the DeepReview system with file-level schemas that provide
automatic validation (JSON Schema + bash commands) on writes and synthetic
review rule generation at /review and finished_step time.

- Core module: src/deepwork/deepschema/ (config, discovery, matcher, resolver, review_bridge)
- Write hook: PostToolUse on Write/Edit validates and injects conformance notes
- Multi-source named schema discovery: project-local, standard_schemas/, DEEPWORK_ADDITIONAL_SCHEMAS_FOLDERS env var
- Parent schema inheritance with circular reference detection
- 67 new tests across 6 test files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add standard deepschema for deepschema files, review fixes, test fixture

- Add self-describing DeepSchema in standard_schemas/deepschema/ with JSON
  Schema validation and 8 RFC 2119 requirements for deepschema.yml files
- Move deferred imports to top-level in review/mcp.py and quality_gate.py
  (review finding: DRY violation)
- Remove fragile string splitting for schema error paths (review finding)
- Add without_standard_schemas pytest fixture in conftest.py for clean
  test environments
- Fix tests to account for standard schemas being auto-discovered

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: update documentation to reflect DeepSchema subsystem

Update project structure trees, review pipeline descriptions, quality
gate docs, MCP tool descriptions, and hooks README to include the new
deepschema/ package, standard_schemas/, and write hook.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: symlink job.schema.json into job_yml standard schema, update AGENTS.md

- Replace remote json_schema_path reference with local symlink
- Update AGENTS.md project structure tree for DeepSchema subsystem

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: resolve ruff lint errors (import ordering, unused import)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: gitignore .claude/worktrees/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add get_named_schemas MCP tool for schema discovery

Exposes named DeepSchema info (name, summary, matchers) via an MCP tool
so agents can discover what file schemas are defined in the project.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: route hook context to agent via additionalContext instead of systemMessage

systemMessage is displayed to the user but not the agent, so DeepSchema
conformance notes and validation errors were invisible to the model.
Switch all platforms to use hookSpecificOutput.additionalContext which
is injected into the agent's conversation context.

Also adds YAML file parsing support for JSON Schema validation in the
write hook (from another agent's fix).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: add .deepreview rule for hook output routing to agent

Ensures hooks use additionalContext (agent-visible) instead of
systemMessage (user-only) when the agent needs to act on the output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add /deepschema skill and DeepSchemas section to README

Adds a user-facing skill explaining how to create and manage DeepSchemas
(named and anonymous), plus a README section covering the feature.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add DW-REQ-011 DeepSchema requirements spec, review improvements

- Create formal requirements spec for the DeepSchema subsystem
- Add DW-REQ-006.6 reference to hook_output_routing .deepreview rule
- Update suggest_new_reviews to suggest both DeepSchemas and .deepreview rules
- Replace deepschema_schema.json copy with symlink (matches job_yml pattern)
- Apply ruff format fix to server.py

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: fix stale documentation found during review

- Add deepschema skill to directory trees in architecture.md and CLAUDE.md
- Add get_named_schemas tool (#9) to architecture.md MCP tools section
- Update hooks README event mapping (add before_model, after_model, SubagentStop)
- Update hooks README tool mapping (add web_fetch, web_search, task)
- Add .deepreview to hooks README files table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add deepschema skill to AGENTS.md project structure

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add RFC 2119 review severity logic to DW-REQ-011.8

Captures how reviewers should treat MUST/SHOULD/MAY violations in
DeepSchema compliance reviews, matching the original design intent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ncrmro added a commit that referenced this pull request Mar 31, 2026
* inital spec file

* feat: implement DeepSchema system for rich file schemas with validation and review generation

DeepSchemas enrich the DeepReview system with file-level schemas that provide
automatic validation (JSON Schema + bash commands) on writes and synthetic
review rule generation at /review and finished_step time.

- Core module: src/deepwork/deepschema/ (config, discovery, matcher, resolver, review_bridge)
- Write hook: PostToolUse on Write/Edit validates and injects conformance notes
- Multi-source named schema discovery: project-local, standard_schemas/, DEEPWORK_ADDITIONAL_SCHEMAS_FOLDERS env var
- Parent schema inheritance with circular reference detection
- 67 new tests across 6 test files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add standard deepschema for deepschema files, review fixes, test fixture

- Add self-describing DeepSchema in standard_schemas/deepschema/ with JSON
  Schema validation and 8 RFC 2119 requirements for deepschema.yml files
- Move deferred imports to top-level in review/mcp.py and quality_gate.py
  (review finding: DRY violation)
- Remove fragile string splitting for schema error paths (review finding)
- Add without_standard_schemas pytest fixture in conftest.py for clean
  test environments
- Fix tests to account for standard schemas being auto-discovered

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: update documentation to reflect DeepSchema subsystem

Update project structure trees, review pipeline descriptions, quality
gate docs, MCP tool descriptions, and hooks README to include the new
deepschema/ package, standard_schemas/, and write hook.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: symlink job.schema.json into job_yml standard schema, update AGENTS.md

- Replace remote json_schema_path reference with local symlink
- Update AGENTS.md project structure tree for DeepSchema subsystem

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: resolve ruff lint errors (import ordering, unused import)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: gitignore .claude/worktrees/

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add get_named_schemas MCP tool for schema discovery

Exposes named DeepSchema info (name, summary, matchers) via an MCP tool
so agents can discover what file schemas are defined in the project.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: route hook context to agent via additionalContext instead of systemMessage

systemMessage is displayed to the user but not the agent, so DeepSchema
conformance notes and validation errors were invisible to the model.
Switch all platforms to use hookSpecificOutput.additionalContext which
is injected into the agent's conversation context.

Also adds YAML file parsing support for JSON Schema validation in the
write hook (from another agent's fix).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: add .deepreview rule for hook output routing to agent

Ensures hooks use additionalContext (agent-visible) instead of
systemMessage (user-only) when the agent needs to act on the output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add /deepschema skill and DeepSchemas section to README

Adds a user-facing skill explaining how to create and manage DeepSchemas
(named and anonymous), plus a README section covering the feature.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add DW-REQ-011 DeepSchema requirements spec, review improvements

- Create formal requirements spec for the DeepSchema subsystem
- Add DW-REQ-006.6 reference to hook_output_routing .deepreview rule
- Update suggest_new_reviews to suggest both DeepSchemas and .deepreview rules
- Replace deepschema_schema.json copy with symlink (matches job_yml pattern)
- Apply ruff format fix to server.py

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: fix stale documentation found during review

- Add deepschema skill to directory trees in architecture.md and CLAUDE.md
- Add get_named_schemas tool (#9) to architecture.md MCP tools section
- Update hooks README event mapping (add before_model, after_model, SubagentStop)
- Update hooks README tool mapping (add web_fetch, web_search, task)
- Add .deepreview to hooks README files table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add deepschema skill to AGENTS.md project structure

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: add RFC 2119 review severity logic to DW-REQ-011.8

Captures how reviewers should treat MUST/SHOULD/MAY violations in
DeepSchema compliance reviews, matching the original design intent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant