|
| 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 | +``` |
0 commit comments