Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,17 @@
}
]
}
],
"SubagentStop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "python -m deepwork.hooks.rules_check"
}
]
}
]
}
}
15 changes: 15 additions & 0 deletions .claude/skills/add_platform.add_capabilities/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ hooks:

If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

SubagentStop:
- hooks:
- type: prompt
prompt: |
Verify the capability additions meet ALL criteria:
1. Any new hooks from the platform (for slash commands only) are added to src/deepwork/schemas/job_schema.py
2. All existing adapters in src/deepwork/adapters.py are updated with the new hook fields
(set to None/null if the platform doesn't support that hook)
3. Only hooks available on slash command definitions are added (not general CLI hooks)
4. job_schema.py remains valid Python with no syntax errors
5. adapters.py remains consistent - all adapters have the same hook fields
6. If no new hooks are needed, document why in a comment

If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

---

# add_platform.add_capabilities
Expand Down
19 changes: 19 additions & 0 deletions .claude/skills/add_platform.implement/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,25 @@ hooks:

If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

SubagentStop:
- hooks:
- type: command
command: ".deepwork/jobs/add_platform/hooks/run_tests.sh"
- type: prompt
prompt: |
Verify the implementation meets ALL criteria:
1. Platform adapter class is added to src/deepwork/adapters.py
2. Templates exist in src/deepwork/templates/<platform>/ with appropriate command structure
3. Tests exist for all new functionality
4. Test coverage is 100% for new code (run: uv run pytest --cov)
5. All tests pass
6. README.md is updated with:
- New platform listed in supported platforms
- Installation instructions for the platform
- Any platform-specific notes

If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

---

# add_platform.implement
Expand Down
16 changes: 16 additions & 0 deletions .claude/skills/add_platform.research/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ hooks:

If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

SubagentStop:
- hooks:
- type: prompt
prompt: |
Verify the research output meets ALL criteria:
1. Both files exist in doc/platforms/<platform>/: cli_configuration.md and hooks_system.md
2. Each file has a comment at the top with:
- Last updated date
- Source URL where the documentation was obtained
3. cli_configuration.md covers how the platform's CLI is configured
4. hooks_system.md covers hooks available for slash command definitions ONLY
5. No extraneous documentation (only these two specific topics)
6. Documentation is comprehensive enough to implement the platform

If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

---

# add_platform.research
Expand Down
14 changes: 14 additions & 0 deletions .claude/skills/add_platform.verify/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ hooks:

If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

SubagentStop:
- hooks:
- type: prompt
prompt: |
Verify the installation meets ALL criteria:
1. Platform-specific directories/files are added to the deepwork repo as needed
2. Running `deepwork install --platform <platform>` completes without errors
3. Expected command files are created in the platform's command directory
4. Command file content matches the templates and job definitions
5. Established DeepWork jobs (deepwork_jobs, deepwork_rules) are installed correctly
6. The platform can be used alongside existing platforms without conflicts

If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

---

# add_platform.verify
Expand Down
11 changes: 11 additions & 0 deletions .claude/skills/commit.commit_and_push/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ hooks:
4. Changes were pushed to remote
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

SubagentStop:
- hooks:
- type: prompt
prompt: |
Verify the commit is ready:
1. Changed files list was reviewed by the agent
2. Files match what was modified during this session (or unexpected changes were investigated)
3. Commit was created with appropriate message
4. Changes were pushed to remote
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

---

# commit.commit_and_push
Expand Down
10 changes: 10 additions & 0 deletions .claude/skills/commit.lint/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ hooks:
3. No remaining lint errors
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

SubagentStop:
- hooks:
- type: prompt
prompt: |
Verify the linting is complete:
1. ruff format was run successfully
2. ruff check was run successfully (with --fix)
3. No remaining lint errors
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

---

# commit.lint
Expand Down
10 changes: 10 additions & 0 deletions .claude/skills/commit.review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ hooks:
3. All identified issues were addressed or documented as intentional
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

SubagentStop:
- hooks:
- type: prompt
prompt: |
Verify the code review is complete:
1. Changed files were identified
2. Sub-agent reviewed the code for general issues, DRY opportunities, naming clarity, and test coverage
3. All identified issues were addressed or documented as intentional
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

---

# commit.review
Expand Down
11 changes: 11 additions & 0 deletions .claude/skills/commit.test/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ hooks:
4. Test output shows passing status
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

SubagentStop:
- hooks:
- type: prompt
prompt: |
Verify the tests are passing:
1. Latest code was pulled from the branch
2. All tests completed successfully
3. No test failures or errors remain
4. Test output shows passing status
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

---

# commit.test
Expand Down
31 changes: 31 additions & 0 deletions .claude/skills/deepwork_jobs.define/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,37 @@ hooks:

If criteria are NOT met OR the promise tag is missing, respond with:
{"ok": false, "reason": "**AGENT: TAKE ACTION** - [which criteria failed and why]"}
SubagentStop:
- hooks:
- type: prompt
prompt: |
You must evaluate whether Claude has met all the below quality criteria for the request.

## Quality Criteria

1. **User Understanding**: Did the agent fully understand the user's workflow by asking structured questions?
2. **Structured Questions Used**: Did the agent ask structured questions (using the AskUserQuestion tool) to gather user input?
3. **Document Detection**: For document-oriented workflows, did the agent detect patterns and offer doc spec creation?
4. **doc spec Created (if applicable)**: If a doc spec was needed, was it created in `.deepwork/doc_specs/[doc_spec_name].md` with proper quality criteria?
5. **doc spec References**: Are document outputs properly linked to their doc specs using `{file, doc_spec}` format?
6. **Valid Against doc spec**: Does the job.yml conform to the job.yml doc spec quality criteria (valid identifier, semantic version, concise summary, rich description, complete steps, valid dependencies)?
7. **Clear Inputs/Outputs**: Does every step have clearly defined inputs and outputs?
8. **Logical Dependencies**: Do step dependencies make sense and avoid circular references?
9. **Concise Summary**: Is the summary under 200 characters and descriptive?
10. **Rich Description**: Does the description provide enough context for future refinement?
11. **Valid Schema**: Does the job.yml follow the required schema (name, version, summary, steps)?
12. **File Created**: Has the job.yml file been created in `.deepwork/jobs/[job_name]/job.yml`?

## Instructions

Review the conversation and determine if ALL quality criteria above have been satisfied.
Look for evidence that each criterion has been addressed.

If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
all criteria appear to be met, respond with: {"ok": true}

If criteria are NOT met OR the promise tag is missing, respond with:
{"ok": false, "reason": "**AGENT: TAKE ACTION** - [which criteria failed and why]"}
---

# deepwork_jobs.define
Expand Down
28 changes: 28 additions & 0 deletions .claude/skills/deepwork_jobs.implement/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,34 @@ hooks:

If criteria are NOT met OR the promise tag is missing, respond with:
{"ok": false, "reason": "**AGENT: TAKE ACTION** - [which criteria failed and why]"}
SubagentStop:
- hooks:
- type: prompt
prompt: |
You must evaluate whether Claude has met all the below quality criteria for the request.

## Quality Criteria

1. **Directory Structure**: Is `.deepwork/jobs/[job_name]/` created correctly?
2. **Complete Instructions**: Are ALL step instruction files complete (not stubs or placeholders)?
3. **Specific & Actionable**: Are instructions tailored to each step's purpose, not generic?
4. **Output Examples**: Does each instruction file show what good output looks like?
5. **Quality Criteria**: Does each instruction file define quality criteria for its outputs?
6. **Ask Structured Questions**: Do step instructions that gather user input explicitly use the phrase "ask structured questions"?
7. **Sync Complete**: Has `deepwork sync` been run successfully?
8. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?
9. **Rules Considered**: Has the agent thought about whether rules would benefit this job? If relevant rules were identified, did they explain them and offer to run `/deepwork_rules.define`? Not every job needs rules - only suggest when genuinely helpful.

## Instructions

Review the conversation and determine if ALL quality criteria above have been satisfied.
Look for evidence that each criterion has been addressed.

If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
all criteria appear to be met, respond with: {"ok": true}

If criteria are NOT met OR the promise tag is missing, respond with:
{"ok": false, "reason": "**AGENT: TAKE ACTION** - [which criteria failed and why]"}
---

# deepwork_jobs.implement
Expand Down
31 changes: 31 additions & 0 deletions .claude/skills/deepwork_jobs.learn/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,37 @@ hooks:

If criteria are NOT met OR the promise tag is missing, respond with:
{"ok": false, "reason": "**AGENT: TAKE ACTION** - [which criteria failed and why]"}
SubagentStop:
- hooks:
- type: prompt
prompt: |
You must evaluate whether Claude has met all the below quality criteria for the request.

## Quality Criteria

1. **Conversation Analyzed**: Did the agent review the conversation for DeepWork job executions?
2. **Confusion Identified**: Did the agent identify points of confusion, errors, or inefficiencies?
3. **Instructions Improved**: Were job instructions updated to address identified issues?
4. **Instructions Concise**: Are instructions free of redundancy and unnecessary verbosity?
5. **Shared Content Extracted**: Is lengthy/duplicated content extracted into referenced files?
6. **doc spec Reviewed (if applicable)**: For jobs with doc spec outputs, were doc spec-related learnings identified?
7. **doc spec Updated (if applicable)**: Were doc spec files updated with improved quality criteria or structure?
8. **Bespoke Learnings Captured**: Were run-specific learnings added to AGENTS.md?
9. **File References Used**: Do AGENTS.md entries reference other files where appropriate?
10. **Working Folder Correct**: Is AGENTS.md in the correct working folder for the job?
11. **Generalizable Separated**: Are generalizable improvements in instructions, not AGENTS.md?
12. **Sync Complete**: Has `deepwork sync` been run if instructions were modified?

## Instructions

Review the conversation and determine if ALL quality criteria above have been satisfied.
Look for evidence that each criterion has been addressed.

If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
all criteria appear to be met, respond with: {"ok": true}

If criteria are NOT met OR the promise tag is missing, respond with:
{"ok": false, "reason": "**AGENT: TAKE ACTION** - [which criteria failed and why]"}
---

# deepwork_jobs.learn
Expand Down
23 changes: 23 additions & 0 deletions .claude/skills/deepwork_jobs.review_job_spec/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,29 @@ hooks:

If criteria are NOT met OR the promise tag is missing, respond with:
{"ok": false, "reason": "**AGENT: TAKE ACTION** - [which criteria failed and why]"}
SubagentStop:
- hooks:
- type: prompt
prompt: |
You must evaluate whether Claude has met all the below quality criteria for the request.

## Quality Criteria

1. **Sub-Agent Used**: Was a sub-agent spawned to provide unbiased review?
2. **All doc spec Criteria Evaluated**: Did the sub-agent assess all 9 quality criteria?
3. **Findings Addressed**: Were all failed criteria addressed by the main agent?
4. **Validation Loop Complete**: Did the review-fix cycle continue until all criteria passed?

## Instructions

Review the conversation and determine if ALL quality criteria above have been satisfied.
Look for evidence that each criterion has been addressed.

If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
all criteria appear to be met, respond with: {"ok": true}

If criteria are NOT met OR the promise tag is missing, respond with:
{"ok": false, "reason": "**AGENT: TAKE ACTION** - [which criteria failed and why]"}
---

# deepwork_jobs.review_job_spec
Expand Down
Loading