Skip to content

Commit dd91b52

Browse files
nhortonclaude
andcommitted
Document job type classification (standard, library, bespoke)
Add AGENTS.md with comprehensive documentation of the three job types and their locations. Update CLAUDE.md to reference the classification and align the project structure documentation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 53bd81e commit dd91b52

2 files changed

Lines changed: 106 additions & 10 deletions

File tree

AGENTS.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# DeepWork - Agent Instructions
2+
3+
This file contains critical instructions for AI agents working on this codebase.
4+
5+
## CRITICAL: Job Type Classification
6+
7+
When creating or modifying jobs in this repository, you MUST understand which type of job you are working with. There are exactly **three types of jobs**, each with a specific location and purpose.
8+
9+
### 1. Standard Jobs (`src/deepwork/standard_jobs/`)
10+
11+
**What they are**: Core jobs that are part of the DeepWork framework itself. These get automatically installed to every target repository when users run `deepwork install`.
12+
13+
**Location**: `src/deepwork/standard_jobs/[job_name]/`
14+
15+
**Current standard jobs**:
16+
- `deepwork_jobs` - Core job management (define, implement, learn)
17+
- `deepwork_rules` - Rules enforcement system
18+
19+
**Editing rules**:
20+
- Source of truth is ALWAYS in `src/deepwork/standard_jobs/`
21+
- NEVER edit the installed copies in `.deepwork/jobs/` directly
22+
- After editing, run `deepwork install --platform claude` to sync
23+
24+
### 2. Library Jobs (`library_jobs/`)
25+
26+
**What they are**: Example or reusable jobs that any repository is welcome to use, but are NOT auto-installed. Users must explicitly copy or import these into their projects.
27+
28+
**Location**: `library_jobs/[job_name]/`
29+
30+
**Examples** (potential):
31+
- Competitive research workflows
32+
- Code review processes
33+
- Documentation generation
34+
- Release management
35+
36+
**Editing rules**:
37+
- Edit directly in `library_jobs/[job_name]/`
38+
- These are templates/examples for users to adopt
39+
- Should be well-documented and self-contained
40+
41+
### 3. Bespoke/Repo Jobs (`.deepwork/jobs/`)
42+
43+
**What they are**: Jobs that are ONLY for this specific repository (the DeepWork repo itself). These are not distributed to users and exist only for internal development workflows.
44+
45+
**Location**: `.deepwork/jobs/[job_name]/` (but NOT if the job also exists in `src/deepwork/standard_jobs/`)
46+
47+
**Identifying bespoke jobs**: A job in `.deepwork/jobs/` is bespoke ONLY if it does NOT have a corresponding directory in `src/deepwork/standard_jobs/`.
48+
49+
**Editing rules**:
50+
- Edit directly in `.deepwork/jobs/[job_name]/`
51+
- These are private to this repository
52+
- Run `deepwork sync` after changes to regenerate skills
53+
54+
## IMPORTANT: When Creating New Jobs
55+
56+
Before creating any new job, you MUST determine which type it should be. **If there is any ambiguity**, ask the user a structured question to clarify:
57+
58+
```
59+
Which type of job should this be?
60+
1. Standard Job - Part of the DeepWork framework, auto-installed to all users
61+
2. Library Job - Reusable example that users can optionally adopt
62+
3. Bespoke Job - Only for this repository's internal workflows
63+
```
64+
65+
### Decision Guide
66+
67+
| Question | If Yes → |
68+
|----------|----------|
69+
| Should this be installed automatically when users run `deepwork install`? | Standard Job |
70+
| Is this a reusable pattern that other repos might want to copy? | Library Job |
71+
| Is this only useful for developing DeepWork itself? | Bespoke Job |
72+
73+
## File Structure Summary
74+
75+
```
76+
deepwork/
77+
├── src/deepwork/standard_jobs/ # Standard jobs (source of truth)
78+
│ ├── deepwork_jobs/
79+
│ └── deepwork_rules/
80+
├── library_jobs/ # Library/example jobs
81+
│ └── [example_job]/
82+
└── .deepwork/jobs/ # Installed standard jobs + bespoke jobs
83+
├── deepwork_jobs/ # ← Installed copy, NOT source of truth
84+
├── deepwork_rules/ # ← Installed copy, NOT source of truth
85+
└── [bespoke_job]/ # ← Source of truth for bespoke only
86+
```

claude.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ deepwork/
4242
│ │ ├── claude/
4343
│ │ ├── gemini/
4444
│ │ └── copilot/
45-
│ ├── standard_jobs/ # Built-in job definitions
46-
│ │ └── deepwork_jobs/
45+
│ ├── standard_jobs/ # Built-in job definitions (auto-installed)
46+
│ │ ├── deepwork_jobs/
47+
│ │ └── deepwork_rules/
4748
│ ├── schemas/ # Job definition schemas
4849
│ └── utils/ # Utilities (fs, git, yaml, validation)
50+
├── library_jobs/ # Reusable example jobs (not auto-installed)
4951
├── tests/ # Test suite
5052
├── doc/ # Documentation
5153
└── doc/architecture.md # Detailed architecture document
@@ -182,16 +184,24 @@ my-project/
182184
6. **No Auto-Commit**: DO NOT automatically commit changes to git. Let the user review and commit changes themselves.
183185
7. **Documentation Sync**: CRITICAL - When making implementation changes, always update `doc/architecture.md` and `README.md` to reflect those changes. The architecture document must stay in sync with the actual codebase (terminology, file paths, structure, behavior, etc.).
184186

185-
## CRITICAL: Editing Standard Jobs
187+
## CRITICAL: Job Types and Where to Edit
188+
189+
**See `AGENTS.md` for the complete job classification guide.** This repository has THREE types of jobs:
190+
191+
| Type | Location | Purpose |
192+
|------|----------|---------|
193+
| **Standard Jobs** | `src/deepwork/standard_jobs/` | Framework core, auto-installed to users |
194+
| **Library Jobs** | `library_jobs/` | Reusable examples users can adopt |
195+
| **Bespoke Jobs** | `.deepwork/jobs/` (if not in standard_jobs) | This repo's internal workflows only |
196+
197+
### Editing Standard Jobs
186198

187199
**Standard jobs** (like `deepwork_jobs` and `deepwork_rules`) are bundled with DeepWork and installed to user projects. They exist in THREE locations:
188200

189201
1. **Source of truth**: `src/deepwork/standard_jobs/[job_name]/` - The canonical source files
190202
2. **Installed copy**: `.deepwork/jobs/[job_name]/` - Installed by `deepwork install`
191203
3. **Generated skills**: `.claude/skills/[job_name].[step].md` - Generated from installed jobs
192204

193-
### Editing Workflow for Standard Jobs
194-
195205
**NEVER edit files in `.deepwork/jobs/` or `.claude/skills/` for standard jobs directly!**
196206

197207
Instead, follow this workflow:
@@ -205,13 +215,13 @@ Instead, follow this workflow:
205215

206216
3. **Verify** the changes propagated correctly to all locations
207217

208-
### How to Identify Standard Jobs
218+
### How to Identify Job Types
209219

210-
Standard jobs are defined in `src/deepwork/standard_jobs/`. Currently:
211-
- `deepwork_jobs` - Core job management commands (define, implement, refine)
212-
- `deepwork_rules` - Rules enforcement system
220+
- **Standard jobs**: Exist in `src/deepwork/standard_jobs/` (currently: `deepwork_jobs`, `deepwork_rules`)
221+
- **Library jobs**: Exist in `library_jobs/`
222+
- **Bespoke jobs**: Exist ONLY in `.deepwork/jobs/` with no corresponding standard_jobs entry
213223

214-
If a job exists in `src/deepwork/standard_jobs/`, it is a standard job and MUST be edited there.
224+
**When creating a new job, always clarify which type it should be.** If uncertain, ask the user.
215225

216226
## Success Metrics
217227

0 commit comments

Comments
 (0)