@qelos/aidev 0.7.0 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,755 +1,755 @@
1
- # @qelos/aidev
2
-
3
- [![npm version](https://img.shields.io/npm/v/%40qelos%2Faidev.svg?style=flat-square)](https://www.npmjs.com/package/@qelos/aidev)
4
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](./LICENSE)
5
- [![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg?style=flat-square)](https://nodejs.org)
6
-
7
- **aidev** turns your tasks into merged code — automatically.
8
-
9
- It polls your task manager (ClickUp, Jira, Linear, Monday.com, Notion, Trello, or local markdown files), checks whether tasks are clear, runs Claude, Cursor, or Windsurf to implement them, pushes a branch, and moves the task to review. All without touching your keyboard.
10
-
11
- ```
12
- Task → AI implements → git push → "in review" → AI resolves code review comments
13
- ```
14
-
15
- ---
16
-
17
- ## Table of Contents
18
-
19
- - [How it works](#how-it-works)
20
- - [Quick start](#quick-start)
21
- - [Commands](#commands)
22
- - [Concurrency lock](#concurrency-lock)
23
- - [Configuration](#configuration)
24
- - [AI agents](#ai-agents)
25
- - [Code review resolution](#code-review-resolution)
26
- - [Auto-merge accepted PRs](#auto-merge-accepted-prs)
27
- - [Dev notes mode](#dev-notes-mode)
28
- - [Local tasks file (`aidev.tasks.json`)](#local-tasks-file-aidevtasksjson)
29
- - [Scheduling](#scheduling)
30
- - [Hooks](#hooks)
31
- - [Logging](#logging)
32
- - [Providers](#providers)
33
- - [Contributing](#contributing)
34
-
35
- ---
36
-
37
- ## How it works
38
-
39
- 1. **Fetch** — pulls all tasks tagged with your configured tag from your task provider
40
- 2. **Filter** — skips done/cancelled tasks and tasks that already have a branch
41
- 3. **Clarify** — in `smart` mode, asks the AI if the task description is clear enough; if not, posts a question as a comment (prefixed with `[aidev]`) and marks the task `pending`
42
- 4. **Wait** — pending tasks are re-checked on the next run; if a human replied or the trigger word is found, implementation proceeds with the conversation as context
43
- 5. **Implement** — checks out a fresh branch (or reuses an existing one), runs your configured AI agent(s), falls back to the next agent if one fails
44
- 6. **Ship** — commits all changes, pushes the branch, posts a comment with the branch name and a PR link, moves the task to your "in review" status
45
- 7. **Review** — checks tasks already in review for unresolved PR code review comments; if found, runs an AI agent to fix code or reply to discussion threads
46
-
47
- ---
48
-
49
- ## Quick start
50
-
51
- ```bash
52
- npm install -g @qelos/aidev
53
- ```
54
-
55
- Navigate to your project and run the interactive setup:
56
-
57
- ```bash
58
- cd my-project
59
- aidev init
60
- ```
61
-
62
- The wizard will ask for your task provider credentials, git settings, and preferred AI agents.
63
-
64
- > **Note:** `aidev init` currently supports **ClickUp, Jira, Linear, Local, and Monday.com**. For **Notion** and **Trello**, create `.env.aidev` manually using `.env.aidev.example` as a template (see [Configuration](#configuration)).
65
- >
66
- > For ClickUp, API keys can be left blank if they are already set as environment variables in your shell. For Jira, Linear, and Monday.com, the wizard requires credentials to be entered directly — to use shell env vars instead, edit `.env.aidev` after init and remove the values you want read from your environment.
67
-
68
- Once configured:
69
-
70
- ```bash
71
- aidev run
72
- ```
73
-
74
- ---
75
-
76
- ## Commands
77
-
78
- | Command | Description |
79
- |---|---|
80
- | `aidev init` | Interactive setup — creates `.env.aidev` |
81
- | `aidev run` | Process open + pending tasks, then check review tasks for unresolved PR comments |
82
- | `aidev run open` | Only open (non-pending) tasks |
83
- | `aidev run pending` | Only pending tasks — check for human replies |
84
- | `aidev run accepted` | Auto-merge PRs for tasks in review with the accepted tag |
85
- | `aidev run tasks` | Publish all entries in `aidev.tasks.json` and exit (no AI run) |
86
- | `aidev tasks add` | Add a new entry to `aidev.tasks.json` (interactive) |
87
- | `aidev tasks ls` | List entries currently queued in `aidev.tasks.json` |
88
- | `aidev tasks update [id]` | Edit a queued entry (interactive if `id` omitted) |
89
- | `aidev tasks remove [id]` | Delete a queued entry (interactive if `id` omitted) |
90
- | `aidev tasks push` | Same as `aidev run tasks` — publish all queued entries and exit |
91
- | `aidev stop` | Stop any running aidev process in the current directory |
92
- | `aidev schedule set` | Interactive cron picker for this directory |
93
- | `aidev schedule set "<expr>"` | Set a specific cron expression |
94
- | `aidev schedule set "<expr>" -e <path>` | Set a schedule that uses a custom env file when it fires |
95
- | `aidev schedule get` | Show the current schedule for this directory |
96
- | `aidev help` | Show command and config reference |
97
-
98
- ### Global flags
99
-
100
- | Flag | Description |
101
- |---|---|
102
- | `-e, --env <path>` | Load config from a custom env file instead of `.env.aidev` |
103
- | `-V, --version` | Print version |
104
-
105
- **Examples**
106
-
107
- ```bash
108
- # Use a shared env file for a staging environment
109
- aidev --env /shared/.env.staging run
110
-
111
- # Only process tasks that are waiting for a reply
112
- aidev run pending
113
-
114
- # Schedule to run every 30 minutes
115
- aidev schedule set "*/30 * * * *"
116
- ```
117
-
118
- ---
119
-
120
- ## Concurrency lock
121
-
122
- `aidev run` writes a PID lock file (`.aidev.lock`) in the current directory when it starts and removes it when it finishes. If a second invocation detects a live process already holding the lock, it logs a warning and exits immediately — preventing two agents from committing to the same branch at the same time.
123
-
124
- ```
125
- $ aidev run
126
- [aidev] aidev is already running in this directory (PID 12345). Use "aidev stop" to terminate it.
127
- ```
128
-
129
- Use `aidev stop` to send `SIGTERM` to the running process and clean up the lock file:
130
-
131
- ```bash
132
- aidev stop
133
- ```
134
-
135
- Stale lock files (left behind by a crash) are detected automatically — the next `aidev run` will overwrite them if the stored PID is no longer alive.
136
-
137
- ---
138
-
139
- ## Configuration
140
-
141
- Run `aidev init` for an interactive setup, or create `.env.aidev` manually using `.env.aidev.example` as a template.
142
-
143
- ### Global env file (`AIDEV_ENV_EXTEND`)
144
-
145
- If you work across multiple projects, you can keep shared settings (API keys, agent list, etc.) in a single global file and reference it from each project's `.env.aidev`:
146
-
147
- ```bash
148
- # ~/.aidev.global
149
- CLICKUP_API_KEY=pk_...
150
- CLICKUP_TEAM_ID=123456
151
- AGENTS=claude,cursor
152
- ```
153
-
154
- ```bash
155
- # my-project/.env.aidev — project-specific values override the global ones
156
- AIDEV_ENV_EXTEND=~/.aidev.global
157
- CLICKUP_TAG=my-project
158
- ```
159
-
160
- **Priority order (highest → lowest):**
161
-
162
- 1. Shell environment variables (e.g. set in `~/.zshrc`) — never overwritten
163
- 2. Local `.env.aidev` values
164
- 3. `AIDEV_ENV_EXTEND` file values (global base)
165
-
166
- `AIDEV_ENV_EXTEND` can be set in two ways:
167
-
168
- - **Per-project** — add `AIDEV_ENV_EXTEND=/path/to/file` inside `.env.aidev`
169
- - **Shell-wide** — `export AIDEV_ENV_EXTEND=~/.aidev.global` in `~/.zshrc` (applies to every project automatically)
170
-
171
- `aidev init` will ask for this path and pre-fill it if the variable is already in your shell environment.
172
-
173
- ### ClickUp
174
-
175
- | Variable | Default | Description |
176
- |---|---|---|
177
- | `CLICKUP_API_KEY` | — | Personal API token — can be set as a shell env var |
178
- | `CLICKUP_TEAM_ID` | — | Workspace / team ID — can be set as a shell env var |
179
- | `CLICKUP_TAG` | — | Tasks with this tag will be picked up (set to `*` to match all tasks) |
180
- | `CLICKUP_PENDING_STATUS` | `pending` | Status name for "waiting for reply" |
181
- | `CLICKUP_IN_REVIEW_STATUS` | `review` | Status set after implementation |
182
- | `ASSIGNEE_TAG` | — | Only process tasks assigned to this user (optional) |
183
- | `THINKING_TAG` | — | Tasks with this tag are analyzed and broken into sub-tasks before execution (optional) |
184
- | `NON_CODE_TAG` | — | Tasks with this tag run without git branching (optional) |
185
- | `NON_CODE_CLICKUP_TEAM_ID` | same as `CLICKUP_TEAM_ID` | Different workspace for non-code tasks (optional) |
186
-
187
- > **Tip:** For ClickUp, API keys and tokens are intentionally omitted from `.env.aidev` if you leave them blank during `aidev init` — they will be read from your shell environment instead. For Jira, Linear, and Monday.com, the wizard requires these values; to use shell env vars, remove the entries from `.env.aidev` after init.
188
-
189
- > **Wildcard tag (`*`):** Set `CLICKUP_TAG=*` (or `JIRA_LABEL=*` / `LINEAR_LABEL=*` / `TRELLO_LABEL=*`) to match **all** tasks regardless of tags/labels. This is useful when the AI dev has its own dedicated user in the task provider and every task assigned to it should be processed.
190
-
191
- ### Jira
192
-
193
- | Variable | Default | Description |
194
- |---|---|---|
195
- | `JIRA_BASE_URL` | — | Jira instance URL (e.g. `https://mycompany.atlassian.net`) |
196
- | `JIRA_EMAIL` | — | Email for Jira authentication |
197
- | `JIRA_API_TOKEN` | — | API token — generate from [Atlassian account settings](https://id.atlassian.com/manage-profile/security/api-tokens) |
198
- | `JIRA_PROJECT` | — | Project key (e.g. `PROJ`) |
199
- | `JIRA_LABEL` | — | Issues with this label will be picked up (set to `*` to match all issues) |
200
- | `JIRA_PENDING_STATUS` | `To Do` | Status name for "waiting for reply" |
201
- | `JIRA_IN_REVIEW_STATUS` | `In Review` | Status set after implementation |
202
- | `NON_CODE_JIRA_PROJECT` | same as `JIRA_PROJECT` | Different project for non-code tasks (optional) |
203
-
204
- ### Linear
205
-
206
- Linear calls them "labels" — the same concept as `CLICKUP_TAG` / `JIRA_LABEL`. Tasks created via `aidev.tasks.json` with `tags` are mapped to Linear labels on the configured team, and missing labels are created automatically. Default status names align with Linear's standard workflow (`Backlog`, `Todo`, `In Progress`, `In Review`, `Done`); if your team renamed those states (e.g. `Triage` instead of `Backlog`), aidev also falls back to matching by Linear's underlying state type.
207
-
208
- | Variable | Default | Description |
209
- |---|---|---|
210
- | `LINEAR_API_KEY` | — | Personal API key from Linear Settings → API |
211
- | `LINEAR_TEAM_ID` | — | Team UUID from your workspace |
212
- | `LINEAR_LABEL` | — | Issues with this label will be picked up (set to `*` to match all issues) |
213
- | `LINEAR_PENDING_STATUS` | `Backlog` | Status name for "waiting for reply" |
214
- | `LINEAR_IN_REVIEW_STATUS` | `In Review` | Status set after implementation |
215
- | `NON_CODE_LINEAR_TEAM_ID` | same as `LINEAR_TEAM_ID` | Different team for non-code tasks (optional) |
216
-
217
- ### Monday.com
218
-
219
- | Variable | Default | Description |
220
- |---|---|---|
221
- | `MONDAY_API_TOKEN` | — | API token from monday.com Developer settings |
222
- | `MONDAY_BOARD_ID` | — | Board ID (from the board URL) |
223
- | `MONDAY_STATUS_COLUMN_ID` | `status` | Column ID for the status field |
224
- | `MONDAY_GROUP_ID` | — | Group ID to filter items (optional) |
225
-
226
- ### Notion
227
-
228
- | Variable | Default | Description |
229
- |---|---|---|
230
- | `NOTION_API_KEY` | — | Integration token from Notion → Settings → My integrations |
231
- | `NOTION_DATABASE_ID` | — | Database ID from the database URL (32-char hex) |
232
- | `NOTION_STATUS_PROPERTY` | `Status` | Name of the status property in the database |
233
- | `NOTION_PENDING_STATUS` | `pending` | Status value for "waiting for reply" |
234
- | `NOTION_IN_REVIEW_STATUS` | `review` | Status value set after implementation |
235
-
236
- ### Trello
237
-
238
- | Variable | Default | Description |
239
- |---|---|---|
240
- | `TRELLO_API_KEY` | — | Developer API key from [trello.com/power-ups/admin](https://trello.com/power-ups/admin) |
241
- | `TRELLO_TOKEN` | — | Auth token generated via Trello's token flow |
242
- | `TRELLO_BOARD_ID` | — | Board ID from the board URL |
243
- | `TRELLO_LABEL` | — | Label name on cards to pick up (set to `*` to match all cards assigned to the token user) |
244
- | `TRELLO_OPEN_LIST` | `To Do` | List name for open/new cards |
245
- | `TRELLO_PENDING_LIST` | `Blocked` | List name for "waiting for reply" |
246
- | `TRELLO_IN_PROGRESS_LIST` | `Doing` | List name for cards being worked on |
247
- | `TRELLO_IN_REVIEW_LIST` | `In Review` | List name for completed cards awaiting review |
248
- | `TRELLO_OPEN_STATUS` | `open` | Semantic status mapped to the open list |
249
- | `TRELLO_PENDING_STATUS` | `pending` | Semantic status mapped to the pending list |
250
- | `TRELLO_IN_REVIEW_STATUS` | `review` | Semantic status mapped to the review list |
251
-
252
- ### Git & GitHub
253
-
254
- | Variable | Default | Description |
255
- |---|---|---|
256
- | `GIT_REMOTE` | auto-detected | Remote name — detected via `git remote get-url origin` if unset |
257
- | `GITHUB_BASE_BRANCH` | `main` | Base branch; new task branches are cut from here |
258
- | `GITHUB_REPO` | — | `owner/repo` — used to generate PR links in comments |
259
-
260
- ### Behaviour
261
-
262
- | Variable | Default | Description |
263
- |---|---|---|
264
- | `AIDEV_ENV_EXTEND` | — | Path to a global env file loaded as the base for this project (see above) |
265
- | `AGENTS` | `claude,cursor` | Comma-separated list of agents in priority order |
266
- | `DEV_NOTES_MODE` | `smart` | When to ask for clarification (`smart` or `always`) |
267
- | `AIDEV_TRIGGER_WORD` | `aidev-continue` | Comment containing this word re-triggers a skipped task |
268
- | `AIDEV_COMMENT_PREFIX` | `[aidev]` | Custom prefix for all aidev comments posted to task providers |
269
- | `AIDEV_HOOKS_PATH` | — | Path to a `.ts` or `.js` module that exports hook functions (see [Hooks](#hooks)) |
270
- | `ACCEPTED_TAG` | `accepted` | Tasks in review with this tag are auto-merged (see [Auto-merge accepted PRs](#auto-merge-accepted-prs)) |
271
- | `DONE_STATUS` | auto-detected | Status to set after auto-merging an accepted PR. When unset, aidev picks the first match of `done`, `closed`, `finish`, `success`, `prod` from the board's statuses |
272
- | `PR_SIGNATURE` | `Automated PR by aidev.` | Custom signature line appended to the PR body |
273
- | `AIDEV_AUTO_COMPRESS` | `true` | Auto-compress older comments when the prompt grows large. Set to `false` / `0` / `no` to opt out |
274
- | `AIDEV_COMPRESS_THRESHOLD` | `12000` | Char-length threshold that triggers compression |
275
-
276
- ---
277
-
278
- ## Hooks
279
-
280
- Set `AIDEV_HOOKS_PATH` in `.env.aidev` to a path relative to the project directory or an absolute path. `aidev init` writes `.aidev/aidev.hooks.ts` and sets `AIDEV_HOOKS_PATH=.aidev/aidev.hooks.ts` by default.
281
-
282
- The module should export an object (or `export default`) whose properties are optional async functions. Only known hook names are used; anything else is ignored. If a hook throws, the current operation stops (for example the whole run after `beforeRun`, or conflict resolution after `beforeResolveConflicts`). If a hook returns an object, it replaces the context for that step (for example append to `context.prompt` in `beforeEachTask` and return the updated context).
283
-
284
- **Hook names**
285
-
286
- | Hook | When | Context notes |
287
- |---|---|---|
288
- | `beforeRun` / `afterRun` | Start / end of `aidev run` | `afterRun` includes `processed` and `skipped` counts |
289
- | `beforeEachTask` / `afterEachTask` | Around each code task implementation | `prompt`, `branchName`, `task`; `afterEachTask` has `success` |
290
- | `beforeResolveConflicts` / `afterResolveConflicts` | Merge conflict resolution with AI | `conflictFiles`, `prompt`; `afterResolveConflicts` has `resolved` |
291
- | `beforeNonCodeTask` / `afterNonCodeTask` | Non-code tasks | `afterNonCodeTask` includes agent `output` |
292
- | `beforeThinkingTask` / `afterThinkingTask` | Thinking-tag tasks (subtask plan) | `beforeThinkingTask` may adjust `subtasks` before steps run |
293
- | `beforeReviewTask` / `afterReviewTask` | Review tasks with unresolved PR comments | `threads`, `prompt`, `branchName`; `afterReviewTask` has `success`, `resolvedCount` |
294
-
295
- **Second argument: `vm`**
296
-
297
- Each hook receives `(context, vm)`. The `vm` object exposes:
298
-
299
- - `runAI(prompt)` — runs the first available configured AI agent
300
- - `postComment(taskId, text)`, `updateStatus(taskId, status)`, `getComments(taskId)` — same family of operations as the task provider
301
- - `log.info` / `log.warn` / `log.error` — prefixed hook logging
302
-
303
- **TypeScript hooks**
304
-
305
- `.ts` hook files are loaded at runtime via [jiti](https://www.npmjs.com/package/jiti) — no TypeScript compiler or toolchain needed. Just write a plain `.ts` file with the hook functions and aidev handles the rest.
306
-
307
- ---
308
-
309
- ## AI agents
310
-
311
- aidev supports multiple AI agents with automatic fallback. The first available agent in the list is used; if it fails, the next one is tried with the previous agent's output as additional context.
312
-
313
- **Supported agents**
314
-
315
- | Agent | Requires |
316
- |---|---|
317
- | `antigravity` | Google **Antigravity** CLI (`agy` or `antigravity`) in PATH — see [Antigravity](https://antigravity.google/download) |
318
- | `claude` | [Claude CLI](https://github.com/anthropics/claude-code) installed and authenticated |
319
- | `cursor` | Cursor **Agent CLI** (`agent`) in PATH — see [Windows](#windows-cursor-agent-cli) below |
320
- | `windsurf` | [Windsurf](https://windsurf.com) installed with CLI available in PATH |
321
-
322
- ### Windows: Cursor Agent CLI
323
-
324
- On Windows, the Cursor IDE (`cursor.exe`) is separate from the headless Agent CLI. The runner uses the `agent` binary. Install it in PowerShell:
325
-
326
- ```powershell
327
- irm 'https://cursor.com/install?win32=true' | iex
328
- ```
329
-
330
- Then ensure `agent` is on your PATH and run `agent --version` to confirm. Without this, the Cursor runner will report as unavailable.
331
-
332
- **Configure agent order in `.env.aidev`:**
333
-
334
- ```bash
335
- # Claude first, fall back to Cursor
336
- AGENTS=claude,cursor
337
-
338
- # Cursor only
339
- AGENTS=cursor
340
-
341
- # Cursor first (useful when working locally with a monitor)
342
- AGENTS=cursor,claude
343
-
344
- # Claude first, then Windsurf, then Cursor
345
- AGENTS=claude,windsurf,cursor
346
-
347
- # Antigravity first, then Claude
348
- AGENTS=antigravity,claude
349
-
350
- # Windsurf only
351
- AGENTS=windsurf
352
- ```
353
-
354
- ---
355
-
356
- ## Trigger word & re-processing
357
-
358
- aidev prefixes every comment it posts with `[aidev]` (configurable via `AIDEV_COMMENT_PREFIX`). This lets it distinguish its own comments from human replies when deciding whether to re-process a task.
359
-
360
- A task is normally skipped when:
361
- - A remote branch already exists for it, **or**
362
- - It is `pending` and no human has replied yet
363
-
364
- To force aidev to pick the task up again, post a comment containing the **trigger word** (default: `aidev-continue`). aidev will reuse the existing branch and continue implementation from where it left off.
365
-
366
- ```bash
367
- # Customise the trigger word in .env.aidev
368
- AIDEV_TRIGGER_WORD=please-retry
369
- ```
370
-
371
- The trigger word match is case-insensitive, so `aidev-continue`, `AIDEV-CONTINUE`, and `Aidev-Continue` all work.
372
-
373
- For pending tasks, a regular human reply (any comment without the configured prefix) also triggers re-processing — the trigger word is an additional explicit mechanism.
374
-
375
- ```bash
376
- # Customise the comment prefix in .env.aidev
377
- AIDEV_COMMENT_PREFIX=[mybot]
378
- ```
379
-
380
- ---
381
-
382
- ## Auto-compress
383
-
384
- For long-running tasks with many comments, the combined prompt (description + conversation history + review threads) can grow past the AI agent's effective context window. When the assembled context exceeds `AIDEV_COMPRESS_THRESHOLD` characters (default `12000`), aidev summarises the older comments via the configured AI agent and keeps only the **latest comment verbatim** — so the agent always sees the user's most recent intent without ambiguity.
385
-
386
- Compressed summaries are cached under `.aidev/sessions/<taskId>.json` and reused across runs; new comments invalidate the cache and trigger a re-summarisation of the delta. The directory is added to `.gitignore` automatically.
387
-
388
- This is **on by default**. To opt out:
389
-
390
- ```bash
391
- # In .env.aidev
392
- AIDEV_AUTO_COMPRESS=false
393
-
394
- # Or raise the threshold instead of disabling
395
- AIDEV_COMPRESS_THRESHOLD=24000
396
- ```
397
-
398
- ---
399
-
400
- ## Non-code tasks
401
-
402
- Tasks tagged with `NON_CODE_TAG` are executed **without git branching** — no checkout, commit, push, or PR creation. The AI agent runs the task directly in the current working directory.
403
-
404
- This is useful for:
405
- - Research or investigation tasks
406
- - Documentation updates that don't go through PR review
407
- - Running scripts or commands
408
- - Any task where you want the AI to act without creating a branch
409
-
410
- ```bash
411
- # In .env.aidev
412
- NON_CODE_TAG=non-code
413
-
414
- # Optionally use a different ClickUp team for non-code tasks
415
- NON_CODE_CLICKUP_TEAM_ID=987654
416
-
417
- # Or a different Jira project
418
- NON_CODE_JIRA_PROJECT=OPS
419
- ```
420
-
421
- Non-code tasks follow the same lifecycle as regular tasks (clarification → implementation → review), except the implementation step skips all git operations. After completion, the task status is moved to your configured "in review" status.
422
-
423
- If `NON_CODE_TAG` is not configured, non-code task processing is disabled entirely.
424
-
425
- ---
426
-
427
- ## Code review resolution
428
-
429
- When `aidev run` executes, it also checks tasks in **review** status for unresolved PR code review comments. If any actionable threads are found, an AI agent is run to address them — either by fixing the code or replying to discussion comments.
430
-
431
- **How it works:**
432
-
433
- 1. Fetches all tasks in your configured "in review" status
434
- 2. For each task, finds the associated PR by branch name (via `gh` CLI)
435
- 3. Fetches unresolved review threads from the PR
436
- 4. Filters out threads where the last comment is from aidev itself (to avoid re-processing)
437
- 5. Runs an AI agent to address the remaining threads — code fixes are committed and pushed, discussion replies are posted directly on the thread
438
- 6. Resolved threads are marked as resolved on GitHub
439
-
440
- This runs automatically as part of every `aidev run` (after processing open/pending tasks). No additional configuration is needed beyond having `gh` CLI installed and authenticated.
441
-
442
- > **Prerequisites:** The [GitHub CLI](https://cli.github.com/) must be installed and authenticated (`gh auth login`). If `gh` is not available, review task processing is silently skipped.
443
-
444
- ---
445
-
446
- ## Auto-merge accepted PRs
447
-
448
- When a task has been reviewed and is ready to merge, tag it with `accepted` (the default — override via `ACCEPTED_TAG`). On the next run, aidev will automatically merge the PR via the GitHub CLI (`gh`), update the task status, and sync your local main branch.
449
-
450
- This feature works out of the box whenever the `gh` CLI is installed and authenticated.
451
-
452
- ```bash
453
- # In .env.aidev (both optional)
454
- # ACCEPTED_TAG=accepted # the tag aidev looks for on review tasks (default: accepted)
455
- # DONE_STATUS=done # status to apply after merge — auto-detected when omitted
456
- ```
457
-
458
- **How it works:**
459
-
460
- 1. Finds all tasks in your "in review" status that have the accepted tag (`accepted` by default)
461
- 2. For each task: merges the PR with squash and deletes the remote branch (`gh pr merge --squash --delete-branch`)
462
- 3. Updates the task status to `DONE_STATUS`. When unset, aidev probes the board for one of `done`, `closed`, `finish`, `success`, `prod` and uses the first match
463
- 4. Checks out the base branch and pulls the latest changes
464
-
465
- **Run it manually:**
466
-
467
- ```bash
468
- aidev run accepted
469
- ```
470
-
471
- **Automatic mode:** Whenever `gh` is available, accepted PRs are also auto-merged at the end of every `aidev run`.
472
-
473
- > **Prerequisites:** The [GitHub CLI](https://cli.github.com/) must be installed and authenticated (`gh auth login`). `aidev init` will prompt you for these settings if it detects `gh` on your PATH.
474
-
475
- ---
476
-
477
- ## Dev notes mode
478
-
479
- Controls when aidev asks the task provider for clarification before implementing.
480
-
481
- | Mode | Behaviour |
482
- |---|---|
483
- | `smart` | Asks the AI whether the task description is clear enough. Only posts a clarification question if it's ambiguous. |
484
- | `always` | Always posts "any dev notes?" before implementing every task. |
485
-
486
- When a question is posted, the task is moved to the configured pending status (e.g. `CLICKUP_PENDING_STATUS`, `JIRA_PENDING_STATUS`, etc.). On the next run, aidev checks whether a human has replied and, if so, includes the reply as context for the AI.
487
-
488
- ---
489
-
490
- ## Local tasks file (`aidev.tasks.json`)
491
-
492
- `aidev.tasks.json` is an **outbound queue** — a JSON file that sits at the root of your project and holds task templates that aidev will publish to your configured provider (ClickUp, Jira, Linear, etc.). It is the opposite direction from the [Local provider](#local-provider): the local provider **stores** tasks on disk, while `aidev.tasks.json` **pushes** tasks to a remote provider.
493
-
494
- Typical uses:
495
-
496
- - **Recurring tasks** — with a `cron` expression, an entry publishes a fresh task on every matching tick (daily standup reminders, weekly reviews, monthly housekeeping).
497
- - **Staged work** — queue a batch of tasks in a commit so they appear in the provider together when `aidev` next runs.
498
- - **AI-authored tasks** — another AI agent or script can append entries to the file; `aidev` will pick them up and create real tickets.
499
-
500
- The file is added to `.gitignore` by `aidev init` — each developer or automation environment maintains their own queue.
501
-
502
- ### File format
503
-
504
- `aidev.tasks.json` is a JSON array of task entries. Each entry has the shape:
505
-
506
- ```ts
507
- interface LocalTask {
508
- id: string; // UUID — generated automatically by "aidev tasks add"
509
- title: string; // required — task title on the remote provider
510
- description: string; // task body / description
511
- type: 'code' | 'non-code'; // routes to the non-code provider when set to 'non-code'
512
- priority?: number; // 1=urgent, 2=high, 3=normal, 4=low
513
- assignee?: string; // currently informational (reserved for future use)
514
- dueDate?: string; // ISO date, e.g. "2026-05-01"
515
- tags?: string[]; // extra tags appended to the provider-configured tag
516
- listId?: string; // override provider list / project ID for this task only
517
- cron?: string; // 5-field cron — if set, the task is re-published on every tick
518
- lastPushedAt?: number; // epoch ms of the last successful push (managed by aidev for cron entries)
519
- }
520
- ```
521
-
522
- **Example** (`aidev.tasks.json`):
523
-
524
- ```json
525
- [
526
- {
527
- "id": "7f3a9c2d-5b1e-4a6f-9d8c-1e2f3a4b5c6d",
528
- "title": "Daily standup notes",
529
- "description": "Post yesterday / today / blockers to the team channel.",
530
- "type": "non-code",
531
- "priority": 3,
532
- "tags": ["standup"],
533
- "cron": "0 9 * * 1-5"
534
- },
535
- {
536
- "id": "2b8e1f7a-4c9d-4e5a-8b6c-9f1e2d3c4b5a",
537
- "title": "Upgrade dependencies",
538
- "description": "Run `npm outdated`, bump minor/patch versions, verify tests pass.",
539
- "type": "code",
540
- "priority": 2,
541
- "tags": ["maintenance"]
542
- }
543
- ]
544
- ```
545
-
546
- ### Lifecycle
547
-
548
- 1. **Every `aidev run`** (regardless of filter) begins by reading `aidev.tasks.json` and attempting to publish each entry via the configured provider's `createTask` API.
549
- 2. **One-shot entries** (no `cron` field) are **removed from the file** after a successful push — they become a real ticket and won't be duplicated on the next run.
550
- 3. **Cron entries** remain in the file. `lastPushedAt` is updated on each successful push; on the next run, aidev checks whether the cron has fired at least once since `lastPushedAt` before republishing. A fresh entry with a cron fires on the first run that matches.
551
- 4. **Failures** are logged and the entry is kept — the next run retries.
552
-
553
- ### Routing
554
-
555
- - `type: 'code'` → published with the code tag (`CLICKUP_TAG` / `JIRA_LABEL` / `LINEAR_LABEL`, etc.) to the primary provider.
556
- - `type: 'non-code'` → published with `NON_CODE_TAG` to the non-code provider (a separate team / project if `NON_CODE_CLICKUP_TEAM_ID`, `NON_CODE_JIRA_PROJECT`, or `NON_CODE_LINEAR_TEAM_ID` is configured, otherwise the primary).
557
- - Per-task `tags` are appended to the resolved default tag.
558
- - Per-task `listId` overrides the provider-default list / project for that single task.
559
-
560
- ### Managing entries
561
-
562
- Use the built-in commands rather than hand-editing JSON (although hand-editing is fine — the file is plain JSON):
563
-
564
- ```bash
565
- aidev tasks add # interactive prompt: title, description, type, priority, due date, tags, list, cron
566
- aidev tasks ls # table of queued entries
567
- aidev tasks update [id] # edit an entry by table ID (interactive picker if no id)
568
- aidev tasks remove [id] # delete an entry by table ID (interactive picker if no id)
569
- aidev tasks push # publish everything now (same as "aidev run tasks") — useful for dry-running or in scripts
570
- ```
571
-
572
- `aidev tasks push` and `aidev run tasks` do the same thing: they only process `aidev.tasks.json` and exit without pulling tasks from the provider or invoking the AI. This is useful when you want to decouple queue publishing from the main AI loop — for example, running `aidev tasks push` from a separate cron entry or CI job.
573
-
574
- ---
575
-
576
- ## Scheduling
577
-
578
- aidev can run on a cron schedule, one entry per project directory.
579
-
580
- ```bash
581
- # Interactive picker
582
- aidev schedule set
583
-
584
- # Or pass an expression directly
585
- aidev schedule set "*/15 * * * *"
586
-
587
- # Run a schedule against a custom env file (so the scheduled run uses
588
- # that config — useful when several env files live alongside one repo)
589
- aidev schedule set "*/15 * * * *" -e /path/to/custom/.env.aidev
590
-
591
- # Check what's scheduled for the current directory
592
- aidev schedule get
593
- ```
594
-
595
- The `-e <path>` option is baked into the scheduled entry itself (the cron
596
- line on Linux, the LaunchAgent plist on macOS, or the Task Scheduler `/tr`
597
- command on Windows), so each run will pick up the right env file without
598
- relying on the shell environment at firing time.
599
-
600
- **Preset options (interactive picker)**
601
-
602
- | Option | Expression |
603
- |---|---|
604
- | Every 15 minutes | `*/15 * * * *` |
605
- | Every 30 minutes | `*/30 * * * *` |
606
- | Every hour | `0 * * * *` |
607
- | Every 5 hours | `0 */5 * * *` |
608
- | Every day at 8am | `0 8 * * *` |
609
-
610
- Each directory gets its own cron entry identified by a `# aidev-cwd:/path` marker — running `schedule set` again replaces the existing entry rather than adding a duplicate.
611
-
612
- ### macOS: Full Disk Access required
613
-
614
- On macOS (Ventura and later), cron jobs are silently blocked unless `/usr/sbin/cron` has Full Disk Access:
615
-
616
- 1. Open **System Settings → Privacy & Security → Full Disk Access**
617
- 2. Click **+** and add `/usr/sbin/cron`
618
- 3. Re-run `aidev schedule set` to apply your schedule
619
-
620
- Without this, cron will appear to be configured but jobs will never fire.
621
-
622
- ---
623
-
624
- ## Logging
625
-
626
- Every run appends to `aidev.log` in your project directory:
627
-
628
- ```
629
- ────────────────────────────────────────────────────────────
630
- 2026-03-06T08:00:00.000Z [run] started
631
- ────────────────────────────────────────────────────────────
632
- 2026-03-06T08:00:00.120Z [info] Fetching tasks (filter: all)...
633
- 2026-03-06T08:00:01.340Z [task] [abc123] "Fix login flow" (status: open)
634
- 2026-03-06T08:00:12.780Z [info] Running claude...
635
- 2026-03-06T08:00:45.210Z [success] Task implemented: branch abc123/fix-login-flow pushed
636
- 2026-03-06T08:00:45.890Z [success] Done. Processed: 1, Skipped: 3
637
- ```
638
-
639
- ANSI colour codes are stripped so the file stays readable in any editor or `tail -f`. `aidev.log` is added to `.gitignore` automatically by `aidev init`.
640
-
641
- To write the log somewhere else, set `AIDEV_LOG_PATH` to an absolute, relative, or `~/`-prefixed path that includes the **file name** (not just the folder). Relative paths are resolved against the project cwd and missing parent directories are created on first write.
642
-
643
- ```bash
644
- AIDEV_LOG_PATH=logs/aidev.log # → <cwd>/logs/aidev.log
645
- AIDEV_LOG_PATH=/var/log/aidev.log # absolute
646
- AIDEV_LOG_PATH=~/aidev/run.log # under your home directory
647
- ```
648
-
649
- ---
650
-
651
- ## Providers
652
-
653
- | Provider | Status | `aidev init` support |
654
- |---|---|---|
655
- | ClickUp | ✅ Implemented | ✅ Interactive wizard |
656
- | Jira | ✅ Implemented | ✅ Interactive wizard |
657
- | Linear | ✅ Implemented | ✅ Interactive wizard |
658
- | Monday.com | ✅ Implemented | ✅ Interactive wizard |
659
- | Local | ✅ Implemented | ✅ Interactive wizard |
660
- | Notion | ✅ Implemented | Manual `.env.aidev` config |
661
- | Trello | ✅ Implemented | Manual `.env.aidev` config |
662
-
663
- > **Notion & Trello:** These providers are fully functional but not yet included in the `aidev init` wizard. To use them, set `PROVIDER=notion` or `PROVIDER=trello` in `.env.aidev` and fill in the required variables from the [Configuration](#configuration) section above.
664
-
665
- The `TaskProvider` interface makes it straightforward to add new providers. See [CONTRIBUTING.md](./CONTRIBUTING.md).
666
-
667
- ### Local provider
668
-
669
- Set `PROVIDER=local` in `.env.aidev` to manage tasks entirely via local markdown files — no external API needed.
670
-
671
- ```bash
672
- aidev init # choose "local" when prompted for provider
673
- ```
674
-
675
- Tasks live in `.aidev/tasks/` under status folders:
676
-
677
- ```
678
- .aidev/tasks/
679
- open/ # new tasks ready for implementation
680
- pending/ # waiting for human reply
681
- progress/ # currently being implemented
682
- review/ # implementation complete, awaiting review
683
- done/ # finished
684
- ```
685
-
686
- **Task file format** (e.g. `.aidev/tasks/open/a1b2c3d4-fix-login-bug.md`):
687
-
688
- ```markdown
689
- ---
690
- title: Fix login page bug
691
- priority: 2
692
- assignee: david
693
- estimated: 2h
694
- tags: frontend, auth
695
- created: 2026-03-12T10:00:00.000Z
696
- ---
697
-
698
- The login form should redirect users to the dashboard after successful authentication.
699
- ```
700
-
701
- The filename must start with a short ID (hex characters) followed by a dash and a slug. The YAML frontmatter carries task metadata; everything after `---` is the task description.
702
-
703
- #### Code vs non-code tasks
704
-
705
- By default, local tasks are treated as **code tasks** — aidev creates a git branch, runs the AI agent, commits, pushes, and opens a PR.
706
-
707
- To mark a task as **non-code** (research, docs, investigation — no git branching), add `type: non-code` to the frontmatter:
708
-
709
- ```markdown
710
- ---
711
- title: Compare OAuth2 providers
712
- type: non-code
713
- tags: research
714
- ---
715
-
716
- Evaluate Auth0, Clerk, and Supabase Auth. Write a recommendation.
717
- ```
718
-
719
- Non-code tasks follow the same lifecycle but skip all git operations. The AI response is posted as a session comment instead of a PR.
720
-
721
- **Session file** (comments) — `.aidev/tasks/open/a1b2c3d4-fix-login-bug.session.md`:
722
-
723
- ```markdown
724
- <!-- aidev session log — append your comments below using "## your-name" as header -->
725
-
726
- ---
727
-
728
- ## aidev — 2026-03-12T10:05:00.000Z
729
-
730
- [aidev] Starting implementation on branch `a1b2c3d4/fix-login-bug`
731
-
732
- ---
733
-
734
- ## david — 2026-03-12T10:10:00.000Z
735
-
736
- Please use the new auth API endpoint for this.
737
- ```
738
-
739
- To add a comment, append a `---` separator followed by a `## your-name` header and your message. aidev parses these entries automatically and uses them as conversation context, just like ClickUp/Jira comments.
740
-
741
- Downloaded task attachments are stored in `.aidev/assets/<task-id>/`, and `aidev init` adds `.aidev/assets/` to `.gitignore` automatically.
742
-
743
- ---
744
-
745
- ## Contributing
746
-
747
- Contributions are welcome — new providers, new AI runners, bug fixes, and docs improvements.
748
-
749
- See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full guide.
750
-
751
- ---
752
-
753
- ## License
754
-
755
- [MIT](./LICENSE)
1
+ # @qelos/aidev
2
+
3
+ [![npm version](https://img.shields.io/npm/v/%40qelos%2Faidev.svg?style=flat-square)](https://www.npmjs.com/package/@qelos/aidev)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](./LICENSE)
5
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg?style=flat-square)](https://nodejs.org)
6
+
7
+ **aidev** turns your tasks into merged code — automatically.
8
+
9
+ It polls your task manager (ClickUp, Jira, Linear, Monday.com, Notion, Trello, or local markdown files), checks whether tasks are clear, runs Claude, Cursor, or Windsurf to implement them, pushes a branch, and moves the task to review. All without touching your keyboard.
10
+
11
+ ```
12
+ Task → AI implements → git push → "in review" → AI resolves code review comments
13
+ ```
14
+
15
+ ---
16
+
17
+ ## Table of Contents
18
+
19
+ - [How it works](#how-it-works)
20
+ - [Quick start](#quick-start)
21
+ - [Commands](#commands)
22
+ - [Concurrency lock](#concurrency-lock)
23
+ - [Configuration](#configuration)
24
+ - [AI agents](#ai-agents)
25
+ - [Code review resolution](#code-review-resolution)
26
+ - [Auto-merge accepted PRs](#auto-merge-accepted-prs)
27
+ - [Dev notes mode](#dev-notes-mode)
28
+ - [Local tasks file (`aidev.tasks.json`)](#local-tasks-file-aidevtasksjson)
29
+ - [Scheduling](#scheduling)
30
+ - [Hooks](#hooks)
31
+ - [Logging](#logging)
32
+ - [Providers](#providers)
33
+ - [Contributing](#contributing)
34
+
35
+ ---
36
+
37
+ ## How it works
38
+
39
+ 1. **Fetch** — pulls all tasks tagged with your configured tag from your task provider
40
+ 2. **Filter** — skips done/cancelled tasks and tasks that already have a branch
41
+ 3. **Clarify** — in `smart` mode, asks the AI if the task description is clear enough; if not, posts a question as a comment (prefixed with `[aidev]`) and marks the task `pending`
42
+ 4. **Wait** — pending tasks are re-checked on the next run; if a human replied or the trigger word is found, implementation proceeds with the conversation as context
43
+ 5. **Implement** — checks out a fresh branch (or reuses an existing one), runs your configured AI agent(s), falls back to the next agent if one fails
44
+ 6. **Ship** — commits all changes, pushes the branch, posts a comment with the branch name and a PR link, moves the task to your "in review" status
45
+ 7. **Review** — checks tasks already in review for unresolved PR code review comments; if found, runs an AI agent to fix code or reply to discussion threads
46
+
47
+ ---
48
+
49
+ ## Quick start
50
+
51
+ ```bash
52
+ npm install -g @qelos/aidev
53
+ ```
54
+
55
+ Navigate to your project and run the interactive setup:
56
+
57
+ ```bash
58
+ cd my-project
59
+ aidev init
60
+ ```
61
+
62
+ The wizard will ask for your task provider credentials, git settings, and preferred AI agents.
63
+
64
+ > **Note:** `aidev init` currently supports **ClickUp, Jira, Linear, Local, Monday.com, and Trello**. For **Notion**, create `.env.aidev` manually using `.env.aidev.example` as a template (see [Configuration](#configuration)).
65
+ >
66
+ > For ClickUp, API keys can be left blank if they are already set as environment variables in your shell. For Jira, Linear, Monday.com, and Trello, the wizard requires credentials to be entered directly — to use shell env vars instead, edit `.env.aidev` after init and remove the values you want read from your environment.
67
+
68
+ Once configured:
69
+
70
+ ```bash
71
+ aidev run
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Commands
77
+
78
+ | Command | Description |
79
+ |---|---|
80
+ | `aidev init` | Interactive setup — creates `.env.aidev` |
81
+ | `aidev run` | Process open + pending tasks, then check review tasks for unresolved PR comments |
82
+ | `aidev run open` | Only open (non-pending) tasks |
83
+ | `aidev run pending` | Only pending tasks — check for human replies |
84
+ | `aidev run accepted` | Auto-merge PRs for tasks in review with the accepted tag |
85
+ | `aidev run tasks` | Publish all entries in `aidev.tasks.json` and exit (no AI run) |
86
+ | `aidev tasks add` | Add a new entry to `aidev.tasks.json` (interactive) |
87
+ | `aidev tasks ls` | List entries currently queued in `aidev.tasks.json` |
88
+ | `aidev tasks update [id]` | Edit a queued entry (interactive if `id` omitted) |
89
+ | `aidev tasks remove [id]` | Delete a queued entry (interactive if `id` omitted) |
90
+ | `aidev tasks push` | Same as `aidev run tasks` — publish all queued entries and exit |
91
+ | `aidev stop` | Stop any running aidev process in the current directory |
92
+ | `aidev schedule set` | Interactive cron picker for this directory |
93
+ | `aidev schedule set "<expr>"` | Set a specific cron expression |
94
+ | `aidev schedule set "<expr>" -e <path>` | Set a schedule that uses a custom env file when it fires |
95
+ | `aidev schedule get` | Show the current schedule for this directory |
96
+ | `aidev help` | Show command and config reference |
97
+
98
+ ### Global flags
99
+
100
+ | Flag | Description |
101
+ |---|---|
102
+ | `-e, --env <path>` | Load config from a custom env file instead of `.env.aidev` |
103
+ | `-V, --version` | Print version |
104
+
105
+ **Examples**
106
+
107
+ ```bash
108
+ # Use a shared env file for a staging environment
109
+ aidev --env /shared/.env.staging run
110
+
111
+ # Only process tasks that are waiting for a reply
112
+ aidev run pending
113
+
114
+ # Schedule to run every 30 minutes
115
+ aidev schedule set "*/30 * * * *"
116
+ ```
117
+
118
+ ---
119
+
120
+ ## Concurrency lock
121
+
122
+ `aidev run` writes a PID lock file (`.aidev.lock`) in the current directory when it starts and removes it when it finishes. If a second invocation detects a live process already holding the lock, it logs a warning and exits immediately — preventing two agents from committing to the same branch at the same time.
123
+
124
+ ```
125
+ $ aidev run
126
+ [aidev] aidev is already running in this directory (PID 12345). Use "aidev stop" to terminate it.
127
+ ```
128
+
129
+ Use `aidev stop` to send `SIGTERM` to the running process and clean up the lock file:
130
+
131
+ ```bash
132
+ aidev stop
133
+ ```
134
+
135
+ Stale lock files (left behind by a crash) are detected automatically — the next `aidev run` will overwrite them if the stored PID is no longer alive.
136
+
137
+ ---
138
+
139
+ ## Configuration
140
+
141
+ Run `aidev init` for an interactive setup, or create `.env.aidev` manually using `.env.aidev.example` as a template.
142
+
143
+ ### Global env file (`AIDEV_ENV_EXTEND`)
144
+
145
+ If you work across multiple projects, you can keep shared settings (API keys, agent list, etc.) in a single global file and reference it from each project's `.env.aidev`:
146
+
147
+ ```bash
148
+ # ~/.aidev.global
149
+ CLICKUP_API_KEY=pk_...
150
+ CLICKUP_TEAM_ID=123456
151
+ AGENTS=claude,cursor
152
+ ```
153
+
154
+ ```bash
155
+ # my-project/.env.aidev — project-specific values override the global ones
156
+ AIDEV_ENV_EXTEND=~/.aidev.global
157
+ CLICKUP_TAG=my-project
158
+ ```
159
+
160
+ **Priority order (highest → lowest):**
161
+
162
+ 1. Shell environment variables (e.g. set in `~/.zshrc`) — never overwritten
163
+ 2. Local `.env.aidev` values
164
+ 3. `AIDEV_ENV_EXTEND` file values (global base)
165
+
166
+ `AIDEV_ENV_EXTEND` can be set in two ways:
167
+
168
+ - **Per-project** — add `AIDEV_ENV_EXTEND=/path/to/file` inside `.env.aidev`
169
+ - **Shell-wide** — `export AIDEV_ENV_EXTEND=~/.aidev.global` in `~/.zshrc` (applies to every project automatically)
170
+
171
+ `aidev init` will ask for this path and pre-fill it if the variable is already in your shell environment.
172
+
173
+ ### ClickUp
174
+
175
+ | Variable | Default | Description |
176
+ |---|---|---|
177
+ | `CLICKUP_API_KEY` | — | Personal API token — can be set as a shell env var |
178
+ | `CLICKUP_TEAM_ID` | — | Workspace / team ID — can be set as a shell env var |
179
+ | `CLICKUP_TAG` | — | Tasks with this tag will be picked up (set to `*` to match all tasks) |
180
+ | `CLICKUP_PENDING_STATUS` | `pending` | Status name for "waiting for reply" |
181
+ | `CLICKUP_IN_REVIEW_STATUS` | `review` | Status set after implementation |
182
+ | `ASSIGNEE_TAG` | — | Only process tasks assigned to this user (optional) |
183
+ | `THINKING_TAG` | — | Tasks with this tag are analyzed and broken into sub-tasks before execution (optional) |
184
+ | `NON_CODE_TAG` | — | Tasks with this tag run without git branching (optional) |
185
+ | `NON_CODE_CLICKUP_TEAM_ID` | same as `CLICKUP_TEAM_ID` | Different workspace for non-code tasks (optional) |
186
+
187
+ > **Tip:** For ClickUp, API keys and tokens are intentionally omitted from `.env.aidev` if you leave them blank during `aidev init` — they will be read from your shell environment instead. For Jira, Linear, and Monday.com, the wizard requires these values; to use shell env vars, remove the entries from `.env.aidev` after init.
188
+
189
+ > **Wildcard tag (`*`):** Set `CLICKUP_TAG=*` (or `JIRA_LABEL=*` / `LINEAR_LABEL=*` / `TRELLO_LABEL=*`) to match **all** tasks regardless of tags/labels. This is useful when the AI dev has its own dedicated user in the task provider and every task assigned to it should be processed.
190
+
191
+ ### Jira
192
+
193
+ | Variable | Default | Description |
194
+ |---|---|---|
195
+ | `JIRA_BASE_URL` | — | Jira instance URL (e.g. `https://mycompany.atlassian.net`) |
196
+ | `JIRA_EMAIL` | — | Email for Jira authentication |
197
+ | `JIRA_API_TOKEN` | — | API token — generate from [Atlassian account settings](https://id.atlassian.com/manage-profile/security/api-tokens) |
198
+ | `JIRA_PROJECT` | — | Project key (e.g. `PROJ`) |
199
+ | `JIRA_LABEL` | — | Issues with this label will be picked up (set to `*` to match all issues) |
200
+ | `JIRA_PENDING_STATUS` | `To Do` | Status name for "waiting for reply" |
201
+ | `JIRA_IN_REVIEW_STATUS` | `In Review` | Status set after implementation |
202
+ | `NON_CODE_JIRA_PROJECT` | same as `JIRA_PROJECT` | Different project for non-code tasks (optional) |
203
+
204
+ ### Linear
205
+
206
+ Linear calls them "labels" — the same concept as `CLICKUP_TAG` / `JIRA_LABEL`. Tasks created via `aidev.tasks.json` with `tags` are mapped to Linear labels on the configured team, and missing labels are created automatically. Default status names align with Linear's standard workflow (`Backlog`, `Todo`, `In Progress`, `In Review`, `Done`); if your team renamed those states (e.g. `Triage` instead of `Backlog`), aidev also falls back to matching by Linear's underlying state type.
207
+
208
+ | Variable | Default | Description |
209
+ |---|---|---|
210
+ | `LINEAR_API_KEY` | — | Personal API key from Linear Settings → API |
211
+ | `LINEAR_TEAM_ID` | — | Team UUID from your workspace |
212
+ | `LINEAR_LABEL` | — | Issues with this label will be picked up (set to `*` to match all issues) |
213
+ | `LINEAR_PENDING_STATUS` | `Backlog` | Status name for "waiting for reply" |
214
+ | `LINEAR_IN_REVIEW_STATUS` | `In Review` | Status set after implementation |
215
+ | `NON_CODE_LINEAR_TEAM_ID` | same as `LINEAR_TEAM_ID` | Different team for non-code tasks (optional) |
216
+
217
+ ### Monday.com
218
+
219
+ | Variable | Default | Description |
220
+ |---|---|---|
221
+ | `MONDAY_API_TOKEN` | — | API token from monday.com Developer settings |
222
+ | `MONDAY_BOARD_ID` | — | Board ID (from the board URL) |
223
+ | `MONDAY_STATUS_COLUMN_ID` | `status` | Column ID for the status field |
224
+ | `MONDAY_GROUP_ID` | — | Group ID to filter items (optional) |
225
+
226
+ ### Notion
227
+
228
+ | Variable | Default | Description |
229
+ |---|---|---|
230
+ | `NOTION_API_KEY` | — | Integration token from Notion → Settings → My integrations |
231
+ | `NOTION_DATABASE_ID` | — | Database ID from the database URL (32-char hex) |
232
+ | `NOTION_STATUS_PROPERTY` | `Status` | Name of the status property in the database |
233
+ | `NOTION_PENDING_STATUS` | `pending` | Status value for "waiting for reply" |
234
+ | `NOTION_IN_REVIEW_STATUS` | `review` | Status value set after implementation |
235
+
236
+ ### Trello
237
+
238
+ | Variable | Default | Description |
239
+ |---|---|---|
240
+ | `TRELLO_API_KEY` | — | Developer API key from [trello.com/power-ups/admin](https://trello.com/power-ups/admin) |
241
+ | `TRELLO_TOKEN` | — | Auth token generated via Trello's token flow |
242
+ | `TRELLO_BOARD_ID` | — | Board ID from the board URL |
243
+ | `TRELLO_LABEL` | — | Label name on cards to pick up (set to `*` to match all cards assigned to the token user) |
244
+ | `TRELLO_OPEN_LIST` | `To Do` | List name for open/new cards |
245
+ | `TRELLO_PENDING_LIST` | `Blocked` | List name for "waiting for reply" |
246
+ | `TRELLO_IN_PROGRESS_LIST` | `Doing` | List name for cards being worked on |
247
+ | `TRELLO_IN_REVIEW_LIST` | `In Review` | List name for completed cards awaiting review |
248
+ | `TRELLO_OPEN_STATUS` | `open` | Semantic status mapped to the open list |
249
+ | `TRELLO_PENDING_STATUS` | `pending` | Semantic status mapped to the pending list |
250
+ | `TRELLO_IN_REVIEW_STATUS` | `review` | Semantic status mapped to the review list |
251
+
252
+ ### Git & GitHub
253
+
254
+ | Variable | Default | Description |
255
+ |---|---|---|
256
+ | `GIT_REMOTE` | auto-detected | Remote name — detected via `git remote get-url origin` if unset |
257
+ | `GITHUB_BASE_BRANCH` | `main` | Base branch; new task branches are cut from here |
258
+ | `GITHUB_REPO` | — | `owner/repo` — used to generate PR links in comments |
259
+
260
+ ### Behaviour
261
+
262
+ | Variable | Default | Description |
263
+ |---|---|---|
264
+ | `AIDEV_ENV_EXTEND` | — | Path to a global env file loaded as the base for this project (see above) |
265
+ | `AGENTS` | `claude,cursor` | Comma-separated list of agents in priority order |
266
+ | `DEV_NOTES_MODE` | `smart` | When to ask for clarification (`smart` or `always`) |
267
+ | `AIDEV_TRIGGER_WORD` | `aidev-continue` | Comment containing this word re-triggers a skipped task |
268
+ | `AIDEV_COMMENT_PREFIX` | `[aidev]` | Custom prefix for all aidev comments posted to task providers |
269
+ | `AIDEV_HOOKS_PATH` | — | Path to a `.ts` or `.js` module that exports hook functions (see [Hooks](#hooks)) |
270
+ | `ACCEPTED_TAG` | `accepted` | Tasks in review with this tag are auto-merged (see [Auto-merge accepted PRs](#auto-merge-accepted-prs)) |
271
+ | `DONE_STATUS` | auto-detected | Status to set after auto-merging an accepted PR. When unset, aidev picks the first match of `done`, `closed`, `finish`, `success`, `prod` from the board's statuses |
272
+ | `PR_SIGNATURE` | `Automated PR by aidev.` | Custom signature line appended to the PR body |
273
+ | `AIDEV_AUTO_COMPRESS` | `true` | Auto-compress older comments when the prompt grows large. Set to `false` / `0` / `no` to opt out |
274
+ | `AIDEV_COMPRESS_THRESHOLD` | `12000` | Char-length threshold that triggers compression |
275
+
276
+ ---
277
+
278
+ ## Hooks
279
+
280
+ Set `AIDEV_HOOKS_PATH` in `.env.aidev` to a path relative to the project directory or an absolute path. `aidev init` writes `.aidev/aidev.hooks.ts` and sets `AIDEV_HOOKS_PATH=.aidev/aidev.hooks.ts` by default.
281
+
282
+ The module should export an object (or `export default`) whose properties are optional async functions. Only known hook names are used; anything else is ignored. If a hook throws, the current operation stops (for example the whole run after `beforeRun`, or conflict resolution after `beforeResolveConflicts`). If a hook returns an object, it replaces the context for that step (for example append to `context.prompt` in `beforeEachTask` and return the updated context).
283
+
284
+ **Hook names**
285
+
286
+ | Hook | When | Context notes |
287
+ |---|---|---|
288
+ | `beforeRun` / `afterRun` | Start / end of `aidev run` | `afterRun` includes `processed` and `skipped` counts |
289
+ | `beforeEachTask` / `afterEachTask` | Around each code task implementation | `prompt`, `branchName`, `task`; `afterEachTask` has `success` |
290
+ | `beforeResolveConflicts` / `afterResolveConflicts` | Merge conflict resolution with AI | `conflictFiles`, `prompt`; `afterResolveConflicts` has `resolved` |
291
+ | `beforeNonCodeTask` / `afterNonCodeTask` | Non-code tasks | `afterNonCodeTask` includes agent `output` |
292
+ | `beforeThinkingTask` / `afterThinkingTask` | Thinking-tag tasks (subtask plan) | `beforeThinkingTask` may adjust `subtasks` before steps run |
293
+ | `beforeReviewTask` / `afterReviewTask` | Review tasks with unresolved PR comments | `threads`, `prompt`, `branchName`; `afterReviewTask` has `success`, `resolvedCount` |
294
+
295
+ **Second argument: `vm`**
296
+
297
+ Each hook receives `(context, vm)`. The `vm` object exposes:
298
+
299
+ - `runAI(prompt)` — runs the first available configured AI agent
300
+ - `postComment(taskId, text)`, `updateStatus(taskId, status)`, `getComments(taskId)` — same family of operations as the task provider
301
+ - `log.info` / `log.warn` / `log.error` — prefixed hook logging
302
+
303
+ **TypeScript hooks**
304
+
305
+ `.ts` hook files are loaded at runtime via [jiti](https://www.npmjs.com/package/jiti) — no TypeScript compiler or toolchain needed. Just write a plain `.ts` file with the hook functions and aidev handles the rest.
306
+
307
+ ---
308
+
309
+ ## AI agents
310
+
311
+ aidev supports multiple AI agents with automatic fallback. The first available agent in the list is used; if it fails, the next one is tried with the previous agent's output as additional context.
312
+
313
+ **Supported agents**
314
+
315
+ | Agent | Requires |
316
+ |---|---|
317
+ | `antigravity` | Google **Antigravity** CLI (`agy` or `antigravity`) in PATH — see [Antigravity](https://antigravity.google/download) |
318
+ | `claude` | [Claude CLI](https://github.com/anthropics/claude-code) installed and authenticated |
319
+ | `cursor` | Cursor **Agent CLI** (`agent`) in PATH — see [Windows](#windows-cursor-agent-cli) below |
320
+ | `windsurf` | [Windsurf](https://windsurf.com) installed with CLI available in PATH |
321
+
322
+ ### Windows: Cursor Agent CLI
323
+
324
+ On Windows, the Cursor IDE (`cursor.exe`) is separate from the headless Agent CLI. The runner uses the `agent` binary. Install it in PowerShell:
325
+
326
+ ```powershell
327
+ irm 'https://cursor.com/install?win32=true' | iex
328
+ ```
329
+
330
+ Then ensure `agent` is on your PATH and run `agent --version` to confirm. Without this, the Cursor runner will report as unavailable.
331
+
332
+ **Configure agent order in `.env.aidev`:**
333
+
334
+ ```bash
335
+ # Claude first, fall back to Cursor
336
+ AGENTS=claude,cursor
337
+
338
+ # Cursor only
339
+ AGENTS=cursor
340
+
341
+ # Cursor first (useful when working locally with a monitor)
342
+ AGENTS=cursor,claude
343
+
344
+ # Claude first, then Windsurf, then Cursor
345
+ AGENTS=claude,windsurf,cursor
346
+
347
+ # Antigravity first, then Claude
348
+ AGENTS=antigravity,claude
349
+
350
+ # Windsurf only
351
+ AGENTS=windsurf
352
+ ```
353
+
354
+ ---
355
+
356
+ ## Trigger word & re-processing
357
+
358
+ aidev prefixes every comment it posts with `[aidev]` (configurable via `AIDEV_COMMENT_PREFIX`). This lets it distinguish its own comments from human replies when deciding whether to re-process a task.
359
+
360
+ A task is normally skipped when:
361
+ - A remote branch already exists for it, **or**
362
+ - It is `pending` and no human has replied yet
363
+
364
+ To force aidev to pick the task up again, post a comment containing the **trigger word** (default: `aidev-continue`). aidev will reuse the existing branch and continue implementation from where it left off.
365
+
366
+ ```bash
367
+ # Customise the trigger word in .env.aidev
368
+ AIDEV_TRIGGER_WORD=please-retry
369
+ ```
370
+
371
+ The trigger word match is case-insensitive, so `aidev-continue`, `AIDEV-CONTINUE`, and `Aidev-Continue` all work.
372
+
373
+ For pending tasks, a regular human reply (any comment without the configured prefix) also triggers re-processing — the trigger word is an additional explicit mechanism.
374
+
375
+ ```bash
376
+ # Customise the comment prefix in .env.aidev
377
+ AIDEV_COMMENT_PREFIX=[mybot]
378
+ ```
379
+
380
+ ---
381
+
382
+ ## Auto-compress
383
+
384
+ For long-running tasks with many comments, the combined prompt (description + conversation history + review threads) can grow past the AI agent's effective context window. When the assembled context exceeds `AIDEV_COMPRESS_THRESHOLD` characters (default `12000`), aidev summarises the older comments via the configured AI agent and keeps only the **latest comment verbatim** — so the agent always sees the user's most recent intent without ambiguity.
385
+
386
+ Compressed summaries are cached under `.aidev/sessions/<taskId>.json` and reused across runs; new comments invalidate the cache and trigger a re-summarisation of the delta. The directory is added to `.gitignore` automatically.
387
+
388
+ This is **on by default**. To opt out:
389
+
390
+ ```bash
391
+ # In .env.aidev
392
+ AIDEV_AUTO_COMPRESS=false
393
+
394
+ # Or raise the threshold instead of disabling
395
+ AIDEV_COMPRESS_THRESHOLD=24000
396
+ ```
397
+
398
+ ---
399
+
400
+ ## Non-code tasks
401
+
402
+ Tasks tagged with `NON_CODE_TAG` are executed **without git branching** — no checkout, commit, push, or PR creation. The AI agent runs the task directly in the current working directory.
403
+
404
+ This is useful for:
405
+ - Research or investigation tasks
406
+ - Documentation updates that don't go through PR review
407
+ - Running scripts or commands
408
+ - Any task where you want the AI to act without creating a branch
409
+
410
+ ```bash
411
+ # In .env.aidev
412
+ NON_CODE_TAG=non-code
413
+
414
+ # Optionally use a different ClickUp team for non-code tasks
415
+ NON_CODE_CLICKUP_TEAM_ID=987654
416
+
417
+ # Or a different Jira project
418
+ NON_CODE_JIRA_PROJECT=OPS
419
+ ```
420
+
421
+ Non-code tasks follow the same lifecycle as regular tasks (clarification → implementation → review), except the implementation step skips all git operations. After completion, the task status is moved to your configured "in review" status.
422
+
423
+ If `NON_CODE_TAG` is not configured, non-code task processing is disabled entirely.
424
+
425
+ ---
426
+
427
+ ## Code review resolution
428
+
429
+ When `aidev run` executes, it also checks tasks in **review** status for unresolved PR code review comments. If any actionable threads are found, an AI agent is run to address them — either by fixing the code or replying to discussion comments.
430
+
431
+ **How it works:**
432
+
433
+ 1. Fetches all tasks in your configured "in review" status
434
+ 2. For each task, finds the associated PR by branch name (via `gh` CLI)
435
+ 3. Fetches unresolved review threads from the PR
436
+ 4. Filters out threads where the last comment is from aidev itself (to avoid re-processing)
437
+ 5. Runs an AI agent to address the remaining threads — code fixes are committed and pushed, discussion replies are posted directly on the thread
438
+ 6. Resolved threads are marked as resolved on GitHub
439
+
440
+ This runs automatically as part of every `aidev run` (after processing open/pending tasks). No additional configuration is needed beyond having `gh` CLI installed and authenticated.
441
+
442
+ > **Prerequisites:** The [GitHub CLI](https://cli.github.com/) must be installed and authenticated (`gh auth login`). If `gh` is not available, review task processing is silently skipped.
443
+
444
+ ---
445
+
446
+ ## Auto-merge accepted PRs
447
+
448
+ When a task has been reviewed and is ready to merge, tag it with `accepted` (the default — override via `ACCEPTED_TAG`). On the next run, aidev will automatically merge the PR via the GitHub CLI (`gh`), update the task status, and sync your local main branch.
449
+
450
+ This feature works out of the box whenever the `gh` CLI is installed and authenticated.
451
+
452
+ ```bash
453
+ # In .env.aidev (both optional)
454
+ # ACCEPTED_TAG=accepted # the tag aidev looks for on review tasks (default: accepted)
455
+ # DONE_STATUS=done # status to apply after merge — auto-detected when omitted
456
+ ```
457
+
458
+ **How it works:**
459
+
460
+ 1. Finds all tasks in your "in review" status that have the accepted tag (`accepted` by default)
461
+ 2. For each task: merges the PR with squash and deletes the remote branch (`gh pr merge --squash --delete-branch`)
462
+ 3. Updates the task status to `DONE_STATUS`. When unset, aidev probes the board for one of `done`, `closed`, `finish`, `success`, `prod` and uses the first match
463
+ 4. Checks out the base branch and pulls the latest changes
464
+
465
+ **Run it manually:**
466
+
467
+ ```bash
468
+ aidev run accepted
469
+ ```
470
+
471
+ **Automatic mode:** Whenever `gh` is available, accepted PRs are also auto-merged at the end of every `aidev run`.
472
+
473
+ > **Prerequisites:** The [GitHub CLI](https://cli.github.com/) must be installed and authenticated (`gh auth login`). `aidev init` will prompt you for these settings if it detects `gh` on your PATH.
474
+
475
+ ---
476
+
477
+ ## Dev notes mode
478
+
479
+ Controls when aidev asks the task provider for clarification before implementing.
480
+
481
+ | Mode | Behaviour |
482
+ |---|---|
483
+ | `smart` | Asks the AI whether the task description is clear enough. Only posts a clarification question if it's ambiguous. |
484
+ | `always` | Always posts "any dev notes?" before implementing every task. |
485
+
486
+ When a question is posted, the task is moved to the configured pending status (e.g. `CLICKUP_PENDING_STATUS`, `JIRA_PENDING_STATUS`, etc.). On the next run, aidev checks whether a human has replied and, if so, includes the reply as context for the AI.
487
+
488
+ ---
489
+
490
+ ## Local tasks file (`aidev.tasks.json`)
491
+
492
+ `aidev.tasks.json` is an **outbound queue** — a JSON file that sits at the root of your project and holds task templates that aidev will publish to your configured provider (ClickUp, Jira, Linear, etc.). It is the opposite direction from the [Local provider](#local-provider): the local provider **stores** tasks on disk, while `aidev.tasks.json` **pushes** tasks to a remote provider.
493
+
494
+ Typical uses:
495
+
496
+ - **Recurring tasks** — with a `cron` expression, an entry publishes a fresh task on every matching tick (daily standup reminders, weekly reviews, monthly housekeeping).
497
+ - **Staged work** — queue a batch of tasks in a commit so they appear in the provider together when `aidev` next runs.
498
+ - **AI-authored tasks** — another AI agent or script can append entries to the file; `aidev` will pick them up and create real tickets.
499
+
500
+ The file is added to `.gitignore` by `aidev init` — each developer or automation environment maintains their own queue.
501
+
502
+ ### File format
503
+
504
+ `aidev.tasks.json` is a JSON array of task entries. Each entry has the shape:
505
+
506
+ ```ts
507
+ interface LocalTask {
508
+ id: string; // UUID — generated automatically by "aidev tasks add"
509
+ title: string; // required — task title on the remote provider
510
+ description: string; // task body / description
511
+ type: 'code' | 'non-code'; // routes to the non-code provider when set to 'non-code'
512
+ priority?: number; // 1=urgent, 2=high, 3=normal, 4=low
513
+ assignee?: string; // currently informational (reserved for future use)
514
+ dueDate?: string; // ISO date, e.g. "2026-05-01"
515
+ tags?: string[]; // extra tags appended to the provider-configured tag
516
+ listId?: string; // override provider list / project ID for this task only
517
+ cron?: string; // 5-field cron — if set, the task is re-published on every tick
518
+ lastPushedAt?: number; // epoch ms of the last successful push (managed by aidev for cron entries)
519
+ }
520
+ ```
521
+
522
+ **Example** (`aidev.tasks.json`):
523
+
524
+ ```json
525
+ [
526
+ {
527
+ "id": "7f3a9c2d-5b1e-4a6f-9d8c-1e2f3a4b5c6d",
528
+ "title": "Daily standup notes",
529
+ "description": "Post yesterday / today / blockers to the team channel.",
530
+ "type": "non-code",
531
+ "priority": 3,
532
+ "tags": ["standup"],
533
+ "cron": "0 9 * * 1-5"
534
+ },
535
+ {
536
+ "id": "2b8e1f7a-4c9d-4e5a-8b6c-9f1e2d3c4b5a",
537
+ "title": "Upgrade dependencies",
538
+ "description": "Run `npm outdated`, bump minor/patch versions, verify tests pass.",
539
+ "type": "code",
540
+ "priority": 2,
541
+ "tags": ["maintenance"]
542
+ }
543
+ ]
544
+ ```
545
+
546
+ ### Lifecycle
547
+
548
+ 1. **Every `aidev run`** (regardless of filter) begins by reading `aidev.tasks.json` and attempting to publish each entry via the configured provider's `createTask` API.
549
+ 2. **One-shot entries** (no `cron` field) are **removed from the file** after a successful push — they become a real ticket and won't be duplicated on the next run.
550
+ 3. **Cron entries** remain in the file. `lastPushedAt` is updated on each successful push; on the next run, aidev checks whether the cron has fired at least once since `lastPushedAt` before republishing. A fresh entry with a cron fires on the first run that matches.
551
+ 4. **Failures** are logged and the entry is kept — the next run retries.
552
+
553
+ ### Routing
554
+
555
+ - `type: 'code'` → published with the code tag (`CLICKUP_TAG` / `JIRA_LABEL` / `LINEAR_LABEL`, etc.) to the primary provider.
556
+ - `type: 'non-code'` → published with `NON_CODE_TAG` to the non-code provider (a separate team / project if `NON_CODE_CLICKUP_TEAM_ID`, `NON_CODE_JIRA_PROJECT`, or `NON_CODE_LINEAR_TEAM_ID` is configured, otherwise the primary).
557
+ - Per-task `tags` are appended to the resolved default tag.
558
+ - Per-task `listId` overrides the provider-default list / project for that single task.
559
+
560
+ ### Managing entries
561
+
562
+ Use the built-in commands rather than hand-editing JSON (although hand-editing is fine — the file is plain JSON):
563
+
564
+ ```bash
565
+ aidev tasks add # interactive prompt: title, description, type, priority, due date, tags, list, cron
566
+ aidev tasks ls # table of queued entries
567
+ aidev tasks update [id] # edit an entry by table ID (interactive picker if no id)
568
+ aidev tasks remove [id] # delete an entry by table ID (interactive picker if no id)
569
+ aidev tasks push # publish everything now (same as "aidev run tasks") — useful for dry-running or in scripts
570
+ ```
571
+
572
+ `aidev tasks push` and `aidev run tasks` do the same thing: they only process `aidev.tasks.json` and exit without pulling tasks from the provider or invoking the AI. This is useful when you want to decouple queue publishing from the main AI loop — for example, running `aidev tasks push` from a separate cron entry or CI job.
573
+
574
+ ---
575
+
576
+ ## Scheduling
577
+
578
+ aidev can run on a cron schedule, one entry per project directory.
579
+
580
+ ```bash
581
+ # Interactive picker
582
+ aidev schedule set
583
+
584
+ # Or pass an expression directly
585
+ aidev schedule set "*/15 * * * *"
586
+
587
+ # Run a schedule against a custom env file (so the scheduled run uses
588
+ # that config — useful when several env files live alongside one repo)
589
+ aidev schedule set "*/15 * * * *" -e /path/to/custom/.env.aidev
590
+
591
+ # Check what's scheduled for the current directory
592
+ aidev schedule get
593
+ ```
594
+
595
+ The `-e <path>` option is baked into the scheduled entry itself (the cron
596
+ line on Linux, the LaunchAgent plist on macOS, or the Task Scheduler `/tr`
597
+ command on Windows), so each run will pick up the right env file without
598
+ relying on the shell environment at firing time.
599
+
600
+ **Preset options (interactive picker)**
601
+
602
+ | Option | Expression |
603
+ |---|---|
604
+ | Every 15 minutes | `*/15 * * * *` |
605
+ | Every 30 minutes | `*/30 * * * *` |
606
+ | Every hour | `0 * * * *` |
607
+ | Every 5 hours | `0 */5 * * *` |
608
+ | Every day at 8am | `0 8 * * *` |
609
+
610
+ Each directory gets its own cron entry identified by a `# aidev-cwd:/path` marker — running `schedule set` again replaces the existing entry rather than adding a duplicate.
611
+
612
+ ### macOS: Full Disk Access required
613
+
614
+ On macOS (Ventura and later), cron jobs are silently blocked unless `/usr/sbin/cron` has Full Disk Access:
615
+
616
+ 1. Open **System Settings → Privacy & Security → Full Disk Access**
617
+ 2. Click **+** and add `/usr/sbin/cron`
618
+ 3. Re-run `aidev schedule set` to apply your schedule
619
+
620
+ Without this, cron will appear to be configured but jobs will never fire.
621
+
622
+ ---
623
+
624
+ ## Logging
625
+
626
+ Every run appends to `aidev.log` in your project directory:
627
+
628
+ ```
629
+ ────────────────────────────────────────────────────────────
630
+ 2026-03-06T08:00:00.000Z [run] started
631
+ ────────────────────────────────────────────────────────────
632
+ 2026-03-06T08:00:00.120Z [info] Fetching tasks (filter: all)...
633
+ 2026-03-06T08:00:01.340Z [task] [abc123] "Fix login flow" (status: open)
634
+ 2026-03-06T08:00:12.780Z [info] Running claude...
635
+ 2026-03-06T08:00:45.210Z [success] Task implemented: branch abc123/fix-login-flow pushed
636
+ 2026-03-06T08:00:45.890Z [success] Done. Processed: 1, Skipped: 3
637
+ ```
638
+
639
+ ANSI colour codes are stripped so the file stays readable in any editor or `tail -f`. `aidev.log` is added to `.gitignore` automatically by `aidev init`.
640
+
641
+ To write the log somewhere else, set `AIDEV_LOG_PATH` to an absolute, relative, or `~/`-prefixed path that includes the **file name** (not just the folder). Relative paths are resolved against the project cwd and missing parent directories are created on first write.
642
+
643
+ ```bash
644
+ AIDEV_LOG_PATH=logs/aidev.log # → <cwd>/logs/aidev.log
645
+ AIDEV_LOG_PATH=/var/log/aidev.log # absolute
646
+ AIDEV_LOG_PATH=~/aidev/run.log # under your home directory
647
+ ```
648
+
649
+ ---
650
+
651
+ ## Providers
652
+
653
+ | Provider | Status | `aidev init` support |
654
+ |---|---|---|
655
+ | ClickUp | ✅ Implemented | ✅ Interactive wizard |
656
+ | Jira | ✅ Implemented | ✅ Interactive wizard |
657
+ | Linear | ✅ Implemented | ✅ Interactive wizard |
658
+ | Monday.com | ✅ Implemented | ✅ Interactive wizard |
659
+ | Local | ✅ Implemented | ✅ Interactive wizard |
660
+ | Notion | ✅ Implemented | Manual `.env.aidev` config |
661
+ | Trello | ✅ Implemented | Interactive wizard |
662
+
663
+ > **Notion:** This provider is fully functional but not yet included in the `aidev init` wizard. To use it, set `PROVIDER=notion` in `.env.aidev` and fill in the required variables from the [Configuration](#configuration) section above.
664
+
665
+ The `TaskProvider` interface makes it straightforward to add new providers. See [CONTRIBUTING.md](./CONTRIBUTING.md).
666
+
667
+ ### Local provider
668
+
669
+ Set `PROVIDER=local` in `.env.aidev` to manage tasks entirely via local markdown files — no external API needed.
670
+
671
+ ```bash
672
+ aidev init # choose "local" when prompted for provider
673
+ ```
674
+
675
+ Tasks live in `.aidev/tasks/` under status folders:
676
+
677
+ ```
678
+ .aidev/tasks/
679
+ open/ # new tasks ready for implementation
680
+ pending/ # waiting for human reply
681
+ progress/ # currently being implemented
682
+ review/ # implementation complete, awaiting review
683
+ done/ # finished
684
+ ```
685
+
686
+ **Task file format** (e.g. `.aidev/tasks/open/a1b2c3d4-fix-login-bug.md`):
687
+
688
+ ```markdown
689
+ ---
690
+ title: Fix login page bug
691
+ priority: 2
692
+ assignee: david
693
+ estimated: 2h
694
+ tags: frontend, auth
695
+ created: 2026-03-12T10:00:00.000Z
696
+ ---
697
+
698
+ The login form should redirect users to the dashboard after successful authentication.
699
+ ```
700
+
701
+ The filename must start with a short ID (hex characters) followed by a dash and a slug. The YAML frontmatter carries task metadata; everything after `---` is the task description.
702
+
703
+ #### Code vs non-code tasks
704
+
705
+ By default, local tasks are treated as **code tasks** — aidev creates a git branch, runs the AI agent, commits, pushes, and opens a PR.
706
+
707
+ To mark a task as **non-code** (research, docs, investigation — no git branching), add `type: non-code` to the frontmatter:
708
+
709
+ ```markdown
710
+ ---
711
+ title: Compare OAuth2 providers
712
+ type: non-code
713
+ tags: research
714
+ ---
715
+
716
+ Evaluate Auth0, Clerk, and Supabase Auth. Write a recommendation.
717
+ ```
718
+
719
+ Non-code tasks follow the same lifecycle but skip all git operations. The AI response is posted as a session comment instead of a PR.
720
+
721
+ **Session file** (comments) — `.aidev/tasks/open/a1b2c3d4-fix-login-bug.session.md`:
722
+
723
+ ```markdown
724
+ <!-- aidev session log — append your comments below using "## your-name" as header -->
725
+
726
+ ---
727
+
728
+ ## aidev — 2026-03-12T10:05:00.000Z
729
+
730
+ [aidev] Starting implementation on branch `a1b2c3d4/fix-login-bug`
731
+
732
+ ---
733
+
734
+ ## david — 2026-03-12T10:10:00.000Z
735
+
736
+ Please use the new auth API endpoint for this.
737
+ ```
738
+
739
+ To add a comment, append a `---` separator followed by a `## your-name` header and your message. aidev parses these entries automatically and uses them as conversation context, just like ClickUp/Jira comments.
740
+
741
+ Downloaded task attachments are stored in `.aidev/assets/<task-id>/`, and `aidev init` adds `.aidev/assets/` to `.gitignore` automatically.
742
+
743
+ ---
744
+
745
+ ## Contributing
746
+
747
+ Contributions are welcome — new providers, new AI runners, bug fixes, and docs improvements.
748
+
749
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for the full guide.
750
+
751
+ ---
752
+
753
+ ## License
754
+
755
+ [MIT](./LICENSE)