Skip to content

Commit 2491918

Browse files
committed
Merge branch 'claude/refactor-git-operations-2WxqO' of https://github.com/Unsupervisedcom/deepwork into claude/refactor-git-operations-2WxqO
2 parents 0b97b8e + 2faed41 commit 2491918

32 files changed

Lines changed: 1533 additions & 43 deletions

File tree

.claude/settings.json

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,46 @@
9494
"Bash(node:*)",
9595
"Bash(npm:*)",
9696
"Bash(npx:*)",
97-
"Edit(./**)"
97+
"Edit(./**)",
98+
"Read(./.deepwork/tmp/**)",
99+
"Edit(./.deepwork/tmp/**)",
100+
"Write(./.deepwork/tmp/**)",
101+
"Skill(commit)",
102+
"Skill(commit.review)",
103+
"Skill(commit.test)",
104+
"Skill(commit.lint)",
105+
"Skill(commit.commit_and_push)",
106+
"Skill(deepwork_jobs)",
107+
"Skill(deepwork_jobs.define)",
108+
"Skill(deepwork_jobs.review_job_spec)",
109+
"Skill(deepwork_jobs.implement)",
110+
"Skill(deepwork_jobs.learn)",
111+
"Skill(add_platform)",
112+
"Skill(add_platform.research)",
113+
"Skill(add_platform.add_capabilities)",
114+
"Skill(add_platform.implement)",
115+
"Skill(add_platform.verify)",
116+
"Skill(update)",
117+
"Skill(update.job)",
118+
"Skill(manual_tests)",
119+
"Skill(manual_tests.run_not_fire_tests)",
120+
"Skill(manual_tests.run_fire_tests)",
121+
"Skill(deepwork_rules)",
122+
"Skill(deepwork_rules.define)"
98123
]
99124
},
100125
"hooks": {
126+
"SessionStart": [
127+
{
128+
"matcher": "",
129+
"hooks": [
130+
{
131+
"type": "command",
132+
"command": "src/deepwork/hooks/check_version.sh"
133+
}
134+
]
135+
}
136+
],
101137
"UserPromptSubmit": [
102138
{
103139
"matcher": "",
@@ -119,6 +155,17 @@
119155
}
120156
]
121157
}
158+
],
159+
"SubagentStop": [
160+
{
161+
"matcher": "",
162+
"hooks": [
163+
{
164+
"type": "command",
165+
"command": "python -m deepwork.hooks.rules_check"
166+
}
167+
]
168+
}
122169
]
123170
}
124171
}

.claude/skills/add_platform.add_capabilities/SKILL.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@ hooks:
1818
1919
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
2020
21+
SubagentStop:
22+
- hooks:
23+
- type: prompt
24+
prompt: |
25+
Verify the capability additions meet ALL criteria:
26+
1. Any new hooks from the platform (for slash commands only) are added to src/deepwork/schemas/job_schema.py
27+
2. All existing adapters in src/deepwork/adapters.py are updated with the new hook fields
28+
(set to None/null if the platform doesn't support that hook)
29+
3. Only hooks available on slash command definitions are added (not general CLI hooks)
30+
4. job_schema.py remains valid Python with no syntax errors
31+
5. adapters.py remains consistent - all adapters have the same hook fields
32+
6. If no new hooks are needed, document why in a comment
33+
34+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
35+
2136
---
2237

2338
# add_platform.add_capabilities

.claude/skills/add_platform.implement/SKILL.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,25 @@ hooks:
2222
2323
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
2424
25+
SubagentStop:
26+
- hooks:
27+
- type: command
28+
command: ".deepwork/jobs/add_platform/hooks/run_tests.sh"
29+
- type: prompt
30+
prompt: |
31+
Verify the implementation meets ALL criteria:
32+
1. Platform adapter class is added to src/deepwork/adapters.py
33+
2. Templates exist in src/deepwork/templates/<platform>/ with appropriate command structure
34+
3. Tests exist for all new functionality
35+
4. Test coverage is 100% for new code (run: uv run pytest --cov)
36+
5. All tests pass
37+
6. README.md is updated with:
38+
- New platform listed in supported platforms
39+
- Installation instructions for the platform
40+
- Any platform-specific notes
41+
42+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
43+
2544
---
2645

2746
# add_platform.implement

.claude/skills/add_platform.research/SKILL.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@ hooks:
1919
2020
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
2121
22+
SubagentStop:
23+
- hooks:
24+
- type: prompt
25+
prompt: |
26+
Verify the research output meets ALL criteria:
27+
1. Both files exist in doc/platforms/<platform>/: cli_configuration.md and hooks_system.md
28+
2. Each file has a comment at the top with:
29+
- Last updated date
30+
- Source URL where the documentation was obtained
31+
3. cli_configuration.md covers how the platform's CLI is configured
32+
4. hooks_system.md covers hooks available for slash command definitions ONLY
33+
5. No extraneous documentation (only these two specific topics)
34+
6. Documentation is comprehensive enough to implement the platform
35+
36+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
37+
2238
---
2339

2440
# add_platform.research

.claude/skills/add_platform.verify/SKILL.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ hooks:
1717
1818
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
1919
20+
SubagentStop:
21+
- hooks:
22+
- type: prompt
23+
prompt: |
24+
Verify the installation meets ALL criteria:
25+
1. Platform-specific directories/files are added to the deepwork repo as needed
26+
2. Running `deepwork install --platform <platform>` completes without errors
27+
3. Expected command files are created in the platform's command directory
28+
4. Command file content matches the templates and job definitions
29+
5. Established DeepWork jobs (deepwork_jobs, deepwork_rules) are installed correctly
30+
6. The platform can be used alongside existing platforms without conflicts
31+
32+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
33+
2034
---
2135

2236
# add_platform.verify

.claude/skills/commit.commit_and_push/SKILL.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ hooks:
1414
4. Changes were pushed to remote
1515
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
1616
17+
SubagentStop:
18+
- hooks:
19+
- type: prompt
20+
prompt: |
21+
Verify the commit is ready:
22+
1. Changed files list was reviewed by the agent
23+
2. Files match what was modified during this session (or unexpected changes were investigated)
24+
3. Commit was created with appropriate message
25+
4. Changes were pushed to remote
26+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
27+
1728
---
1829

1930
# commit.commit_and_push

.claude/skills/commit.lint/SKILL.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ hooks:
1313
3. No remaining lint errors
1414
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
1515
16+
SubagentStop:
17+
- hooks:
18+
- type: prompt
19+
prompt: |
20+
Verify the linting is complete:
21+
1. ruff format was run successfully
22+
2. ruff check was run successfully (with --fix)
23+
3. No remaining lint errors
24+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
25+
1626
---
1727

1828
# commit.lint

.claude/skills/commit.review/SKILL.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ hooks:
1313
3. All identified issues were addressed or documented as intentional
1414
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
1515
16+
SubagentStop:
17+
- hooks:
18+
- type: prompt
19+
prompt: |
20+
Verify the code review is complete:
21+
1. Changed files were identified
22+
2. Sub-agent reviewed the code for general issues, DRY opportunities, naming clarity, and test coverage
23+
3. All identified issues were addressed or documented as intentional
24+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
25+
1626
---
1727

1828
# commit.review

.claude/skills/commit.test/SKILL.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ hooks:
1414
4. Test output shows passing status
1515
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
1616
17+
SubagentStop:
18+
- hooks:
19+
- type: prompt
20+
prompt: |
21+
Verify the tests are passing:
22+
1. Latest code was pulled from the branch
23+
2. All tests completed successfully
24+
3. No test failures or errors remain
25+
4. Test output shows passing status
26+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
27+
1728
---
1829

1930
# commit.test

.claude/skills/deepwork_jobs.define/SKILL.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,37 @@ hooks:
3434
3535
If criteria are NOT met OR the promise tag is missing, respond with:
3636
{"ok": false, "reason": "**AGENT: TAKE ACTION** - [which criteria failed and why]"}
37+
SubagentStop:
38+
- hooks:
39+
- type: prompt
40+
prompt: |
41+
You must evaluate whether Claude has met all the below quality criteria for the request.
42+
43+
## Quality Criteria
44+
45+
1. **User Understanding**: Did the agent fully understand the user's workflow by asking structured questions?
46+
2. **Structured Questions Used**: Did the agent ask structured questions (using the AskUserQuestion tool) to gather user input?
47+
3. **Document Detection**: For document-oriented workflows, did the agent detect patterns and offer doc spec creation?
48+
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?
49+
5. **doc spec References**: Are document outputs properly linked to their doc specs using `{file, doc_spec}` format?
50+
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)?
51+
7. **Clear Inputs/Outputs**: Does every step have clearly defined inputs and outputs?
52+
8. **Logical Dependencies**: Do step dependencies make sense and avoid circular references?
53+
9. **Concise Summary**: Is the summary under 200 characters and descriptive?
54+
10. **Rich Description**: Does the description provide enough context for future refinement?
55+
11. **Valid Schema**: Does the job.yml follow the required schema (name, version, summary, steps)?
56+
12. **File Created**: Has the job.yml file been created in `.deepwork/jobs/[job_name]/job.yml`?
57+
58+
## Instructions
59+
60+
Review the conversation and determine if ALL quality criteria above have been satisfied.
61+
Look for evidence that each criterion has been addressed.
62+
63+
If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
64+
all criteria appear to be met, respond with: {"ok": true}
65+
66+
If criteria are NOT met OR the promise tag is missing, respond with:
67+
{"ok": false, "reason": "**AGENT: TAKE ACTION** - [which criteria failed and why]"}
3768
---
3869

3970
# deepwork_jobs.define

0 commit comments

Comments
 (0)