Skip to content

Commit 1801774

Browse files
nhortonclaude
andcommitted
Add meta-command architecture for job entry points
Each job now generates a single user-facing meta-command (e.g., /deepwork_jobs) that interprets user intent and routes to appropriate hidden step commands. Key changes: - Add `exposed` field to job.yml steps (default: false = hidden) - Step commands are hidden by default (underscore prefix: _job.step.md) - Steps with `exposed: true` remain visible (e.g., deepwork_jobs.learn.md) - New meta-command templates for Claude and Gemini - Generator creates meta-command first, then step commands User experience: - Before: /deepwork_jobs.define - After: /deepwork_jobs define a new job Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b6bc46b commit 1801774

47 files changed

Lines changed: 1234 additions & 727 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

.claude/commands/add_platform.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
description: Add a new AI platform to DeepWork with adapter, templates, and tests
3+
---
4+
5+
# add_platform
6+
7+
You are executing the **add_platform** job. Add a new AI platform to DeepWork with adapter, templates, and tests
8+
9+
A workflow for adding support for a new AI platform (like Cursor, Windsurf, etc.) to DeepWork.
10+
11+
This job guides you through four phases:
12+
1. **Research**: Capture the platform's CLI configuration and hooks system documentation
13+
2. **Add Capabilities**: Update the job schema and adapters with any new hook events
14+
3. **Implement**: Create the platform adapter, templates, tests (100% coverage), and README updates
15+
4. **Verify**: Ensure installation works correctly and produces expected files
16+
17+
The workflow ensures consistency across all supported platforms and maintains
18+
comprehensive test coverage for new functionality.
19+
20+
**Important Notes**:
21+
- Only hooks available on slash command definitions should be captured
22+
- Each existing adapter must be updated when new hooks are added (typically with null values)
23+
- Tests must achieve 100% coverage for any new functionality
24+
- Installation verification confirms the platform integrates correctly with existing jobs
25+
26+
27+
## Available Steps
28+
29+
This job has 4 step(s):
30+
31+
### research
32+
**Research Platform Documentation**: Capture CLI configuration and hooks system documentation for the new platform
33+
- Command: `_add_platform.research`
34+
### add_capabilities
35+
**Add Hook Capabilities**: Update job schema and adapters with any new hook events the platform supports
36+
- Command: `_add_platform.add_capabilities`
37+
- Requires: research
38+
### implement
39+
**Implement Platform Support**: Add platform adapter, templates, tests with 100% coverage, and README documentation
40+
- Command: `_add_platform.implement`
41+
- Requires: research, add_capabilities
42+
### verify
43+
**Verify Installation**: Set up platform directories and verify deepwork install works correctly
44+
- Command: `_add_platform.verify`
45+
- Requires: implement
46+
47+
## Instructions
48+
49+
Determine what the user wants to do and route to the appropriate step.
50+
51+
1. **Analyze user intent** from the text that follows `/add_platform`
52+
53+
2. **Match intent to a step**:
54+
- research: Capture CLI configuration and hooks system documentation for the new platform
55+
- add_capabilities: Update job schema and adapters with any new hook events the platform supports
56+
- implement: Add platform adapter, templates, tests with 100% coverage, and README documentation
57+
- verify: Set up platform directories and verify deepwork install works correctly
58+
59+
3. **Invoke the matched step** using the Skill tool:
60+
```
61+
Skill: <step_command_name>
62+
```
63+
64+
4. **If intent is ambiguous**, ask the user which step they want:
65+
- Present the available steps as numbered options
66+
- Use AskUserQuestion to let them choose
67+
68+
**Critical**: You MUST invoke the step using the Skill tool. Do not copy/paste the step's instructions. The Skill tool invocation ensures the step's quality validation hooks fire.
69+
70+
## Context Files
71+
72+
- Job definition: `.deepwork/jobs/add_platform/job.yml`

.claude/commands/deepwork_jobs.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
description: DeepWork job management commands
3+
---
4+
5+
# deepwork_jobs
6+
7+
You are executing the **deepwork_jobs** job. DeepWork job management commands
8+
9+
Core commands for managing DeepWork jobs. These commands help you define new multi-step
10+
workflows and learn from running them.
11+
12+
The `define` command guides you through an interactive process to create a new job by
13+
asking structured questions about your workflow, understanding each step's inputs and outputs,
14+
and generating all necessary files.
15+
16+
The `learn` command reflects on conversations where DeepWork jobs were run, identifies
17+
confusion or inefficiencies, and improves job instructions. It also captures bespoke
18+
learnings specific to the current run into AGENTS.md files in the working folder.
19+
20+
21+
## Available Steps
22+
23+
This job has 3 step(s):
24+
25+
### define
26+
**Define Job Specification**: Create the job.yml specification file by understanding workflow requirements
27+
- Command: `_deepwork_jobs.define`
28+
### implement
29+
**Implement Job Steps**: Generate instruction files for each step based on the job.yml specification
30+
- Command: `_deepwork_jobs.implement`
31+
- Requires: define
32+
### learn
33+
**Learn from Job Execution**: Reflect on conversation to improve job instructions and capture learnings
34+
- Command: `deepwork_jobs.learn`
35+
36+
## Instructions
37+
38+
Determine what the user wants to do and route to the appropriate step.
39+
40+
1. **Analyze user intent** from the text that follows `/deepwork_jobs`
41+
42+
2. **Match intent to a step**:
43+
- define: Create the job.yml specification file by understanding workflow requirements
44+
- implement: Generate instruction files for each step based on the job.yml specification
45+
- learn: Reflect on conversation to improve job instructions and capture learnings
46+
47+
3. **Invoke the matched step** using the Skill tool:
48+
```
49+
Skill: <step_command_name>
50+
```
51+
52+
4. **If intent is ambiguous**, ask the user which step they want:
53+
- Present the available steps as numbered options
54+
- Use AskUserQuestion to let them choose
55+
56+
**Critical**: You MUST invoke the step using the Skill tool. Do not copy/paste the step's instructions. The Skill tool invocation ensures the step's quality validation hooks fire.
57+
58+
## Context Files
59+
60+
- Job definition: `.deepwork/jobs/deepwork_jobs/job.yml`

0 commit comments

Comments
 (0)