aitasks 1.3.4 → 1.3.5
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/dist/index.js +46 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1890,7 +1890,7 @@ var require_commander = __commonJS((exports) => {
|
|
|
1890
1890
|
var require_package = __commonJS((exports, module) => {
|
|
1891
1891
|
module.exports = {
|
|
1892
1892
|
name: "aitasks",
|
|
1893
|
-
version: "1.3.
|
|
1893
|
+
version: "1.3.5",
|
|
1894
1894
|
description: "CLI task management tool built for AI agents",
|
|
1895
1895
|
type: "module",
|
|
1896
1896
|
bin: {
|
|
@@ -29426,12 +29426,13 @@ ${reviewRequired ? `3. Submit for review \u2014 you CANNOT mark done directly:
|
|
|
29426
29426
|
\`\`\`bash
|
|
29427
29427
|
aitasks review TASK-001 --agent $AITASKS_AGENT_ID
|
|
29428
29428
|
\`\`\`
|
|
29429
|
-
**
|
|
29429
|
+
**Do not run \`aitasks done\` yourself.** The system will block self-approval.
|
|
29430
29430
|
|
|
29431
|
-
4. **
|
|
29432
|
-
|
|
29431
|
+
4. **IN THIS SAME SESSION, immediately spawn a review sub-agent** with a DIFFERENT agent ID.
|
|
29432
|
+
Do this NOW \u2014 before writing any summary, before moving to any other task, before anything else.
|
|
29433
|
+
The review sub-agent must register first, then inspect and approve or reject:
|
|
29433
29434
|
\`\`\`bash
|
|
29434
|
-
# Review sub-agent registers itself
|
|
29435
|
+
# Review sub-agent registers itself (BEFORE the review was submitted \u2014 or it will be blocked)
|
|
29435
29436
|
aitasks heartbeat --agent <review-agent-id>
|
|
29436
29437
|
|
|
29437
29438
|
# Approve (moves task to done):
|
|
@@ -29440,12 +29441,15 @@ ${reviewRequired ? `3. Submit for review \u2014 you CANNOT mark done directly:
|
|
|
29440
29441
|
# OR reject (sends task back to in_progress with feedback):
|
|
29441
29442
|
aitasks reject TASK-001 --reason "<specific feedback>" --agent <review-agent-id>
|
|
29442
29443
|
\`\`\`
|
|
29443
|
-
|
|
29444
|
-
|
|
29444
|
+
**Your session is NOT complete after submitting for review. You must remain active and drive the
|
|
29445
|
+
review to completion. The task is still incomplete until \`aitasks done\` succeeds.**
|
|
29446
|
+
The system will block approval from any agent that registered after the review was submitted
|
|
29447
|
+
or that submitted the review itself.
|
|
29445
29448
|
|
|
29446
29449
|
5. If rejected: address the feedback, re-check criteria, and repeat from step 3.
|
|
29447
29450
|
|
|
29448
|
-
> The task is only done when \`aitasks done\` completes successfully. \`review\` status means
|
|
29451
|
+
> The task is only done when \`aitasks done\` completes successfully. \`review\` status means
|
|
29452
|
+
> awaiting approval \u2014 it is NOT done. Do not write a final summary until all tasks are \`done\`.` : `3. Mark done (will FAIL if any criterion is unchecked):
|
|
29449
29453
|
\`\`\`bash
|
|
29450
29454
|
aitasks done TASK-001 --agent $AITASKS_AGENT_ID
|
|
29451
29455
|
\`\`\`
|
|
@@ -29490,9 +29494,28 @@ aitasks unclaim TASK-001 --agent $AITASKS_AGENT_ID --reason "Blocked on missing
|
|
|
29490
29494
|
6. If a task needs splitting, create subtasks BEFORE marking parent done.
|
|
29491
29495
|
7. Your evidence strings must be concrete and verifiable \u2014 not vague affirmations.
|
|
29492
29496
|
8. Always provide --desc, at least one --ac, and --agent when creating a task. All three are required.${reviewRequired ? `
|
|
29493
|
-
9. NEVER move a task to done directly. Always submit for review first with \`aitasks review\`, then IMMEDIATELY spawn a review sub-agent with a DIFFERENT agent ID. Do NOT call \`aitasks done\` yourself after submitting for review \u2014 the system blocks self-approval
|
|
29497
|
+
9. NEVER move a task to done directly. Always submit for review first with \`aitasks review\`, then IMMEDIATELY spawn a review sub-agent with a DIFFERENT agent ID in the SAME session. Do NOT call \`aitasks done\` yourself after submitting for review \u2014 the system blocks self-approval.
|
|
29498
|
+
10. **Do not end your session or write a final summary until every task you worked on is in \`done\` status.** If any task is in \`review\`, you must spawn the review sub-agent NOW in this session. Submitting for review and stopping is an incomplete session.` : ""}
|
|
29494
29499
|
|
|
29495
|
-
|
|
29500
|
+
${reviewRequired ? `---
|
|
29501
|
+
|
|
29502
|
+
### Before Ending Your Session
|
|
29503
|
+
|
|
29504
|
+
**Run this check before writing any final summary or concluding your work:**
|
|
29505
|
+
|
|
29506
|
+
\`\`\`bash
|
|
29507
|
+
aitasks list --json # Check that ALL your tasks are in done status
|
|
29508
|
+
\`\`\`
|
|
29509
|
+
|
|
29510
|
+
- Any task in \`done\` \u2192 \u2713 complete
|
|
29511
|
+
- Any task in \`review\` \u2192 you MUST spawn a review sub-agent NOW in this session before stopping
|
|
29512
|
+
- Any task in \`in_progress\` \u2192 continue implementation
|
|
29513
|
+
|
|
29514
|
+
**You are NOT finished until \`aitasks list\` shows every task you worked on as \`done\`.**
|
|
29515
|
+
Submitting tasks for review and then stopping is an incomplete session. The review sub-agent
|
|
29516
|
+
must be spawned and must approve the task in this same session.
|
|
29517
|
+
|
|
29518
|
+
` : ""}---
|
|
29496
29519
|
|
|
29497
29520
|
### Quick Reference
|
|
29498
29521
|
|
|
@@ -30487,16 +30510,18 @@ function completeTask(taskId, agentId) {
|
|
|
30487
30510
|
` + ` A separate review sub-agent must run: aitasks done ${taskId} --agent <review-agent-id>`
|
|
30488
30511
|
};
|
|
30489
30512
|
}
|
|
30490
|
-
|
|
30491
|
-
|
|
30492
|
-
|
|
30493
|
-
|
|
30494
|
-
|
|
30495
|
-
|
|
30513
|
+
if (agentId) {
|
|
30514
|
+
const reviewerRow = db.query(`SELECT first_seen FROM agents WHERE id = ?`).get(agentId);
|
|
30515
|
+
const reviewSubmittedAt = reviewEvent?.created_at ?? 0;
|
|
30516
|
+
if (!reviewerRow || reviewerRow.first_seen > reviewSubmittedAt) {
|
|
30517
|
+
return {
|
|
30518
|
+
task: null,
|
|
30519
|
+
error: `Review agent '${agentId}' was not active before this review was submitted.
|
|
30496
30520
|
` + ` A real review sub-agent must be independently spawned \u2014 it cannot be registered
|
|
30497
30521
|
` + ` moments before approving. The reviewer must have prior activity in the system
|
|
30498
30522
|
` + ` before the review was submitted.`
|
|
30499
|
-
|
|
30523
|
+
};
|
|
30524
|
+
}
|
|
30500
30525
|
}
|
|
30501
30526
|
}
|
|
30502
30527
|
const updated = updateTask(taskId, { status: "done", completed_at: Date.now() });
|
|
@@ -30517,7 +30542,8 @@ function completeTask(taskId, agentId) {
|
|
|
30517
30542
|
});
|
|
30518
30543
|
}
|
|
30519
30544
|
}
|
|
30520
|
-
|
|
30545
|
+
if (agentId)
|
|
30546
|
+
db.run(`UPDATE agents SET current_task = NULL WHERE id = ?`, [agentId]);
|
|
30521
30547
|
return { task: updated };
|
|
30522
30548
|
}
|
|
30523
30549
|
function blockTask(taskId, blockerIds, agentId) {
|
|
@@ -41236,7 +41262,7 @@ var checkCommand = new Command("check").description("Verify an acceptance criter
|
|
|
41236
41262
|
var doneCommand = new Command("done").description("Mark task(s) as complete (all acceptance criteria must be verified) - supports patterns").argument("<taskId...>", "Task ID(s) - can specify multiple or use patterns (e.g., TASK-00*)").option("--agent <agentId>", "Agent ID (or set AITASKS_AGENT_ID)").option("--json", "Output as JSON").action((taskIds, opts) => {
|
|
41237
41263
|
requireInitialized();
|
|
41238
41264
|
const json = isJsonMode(opts.json);
|
|
41239
|
-
const agent =
|
|
41265
|
+
const agent = opts.agent ?? process.env.AITASKS_AGENT_ID;
|
|
41240
41266
|
const allTaskIds = listTasks().map((t) => t.id);
|
|
41241
41267
|
const resolvedIds = resolveTaskIds(taskIds.map((id) => id.toUpperCase()), allTaskIds);
|
|
41242
41268
|
if (resolvedIds.length === 0) {
|
|
@@ -43328,4 +43354,4 @@ program2.parseAsync(process.argv).catch((err) => {
|
|
|
43328
43354
|
process.exit(1);
|
|
43329
43355
|
});
|
|
43330
43356
|
|
|
43331
|
-
//# debugId=
|
|
43357
|
+
//# debugId=1AD83EE12EE8B53364756E2164756E21
|