@abhishek944/pi-tasks 0.8.1 → 0.8.3
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 +2 -2
- package/dist/tools.js +4 -4
- package/dist/tracking.js +2 -2
- package/dist/ui/panel.js +1 -1
- package/docs/REFERENCE.md +1 -1
- package/docs/USAGE_GUIDE.md +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ The coordination model is intentionally small: a work is the overall outcome, a
|
|
|
17
17
|
## Install
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
pi install npm:@abhishek944/pi-tasks@0.8.
|
|
20
|
+
pi install npm:@abhishek944/pi-tasks@0.8.3
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
Restart Pi or run `/reload`.
|
|
@@ -36,7 +36,7 @@ WorkUpdate workId="W1" status="completed"
|
|
|
36
36
|
|
|
37
37
|
Run `/works` to inspect full `workInfo` and `taskInfo` in an interactive overlay.
|
|
38
38
|
|
|
39
|
-
Pi reports approximate task progress through the existing `TodoCreate`/`TodoUpdate` tools using optional `completionPercent` (an integer from 0 to 100, or `null` for unknown). Work progress is the equal average of non-cancelled tasks, rounded down—not the fraction of finished tasks. For example, task values 100, 40, 0, 0 give work progress 35%. A missing estimate makes work progress unknown (`—`); blocked tasks retain their estimate. Completed tasks are 100%; reporting 100 without completed status is rejected. These percentages are estimates, not time predictions. The floating panel keeps percentages in a reserved right-hand column so long names cannot hide them. Existing keyboard controls are unchanged.
|
|
39
|
+
Pi reports approximate task progress through the existing `TodoCreate`/`TodoUpdate` tools using optional `completionPercent` (an integer from 0 to 100, or `null` for unknown). Work progress is the equal average of non-cancelled tasks, rounded down—not the fraction of finished tasks. For example, task values 100, 40, 0, 0 give work progress 35%. A missing estimate makes work progress unknown (`—`); blocked tasks retain their estimate. Completed tasks are 100%; reporting 100 without completed status is rejected. For longer tasks, the guidance asks Pi to include interim estimates after roughly 5–10 meaningful working steps or a milestone, rather than waiting until completion. Estimates remain optional and must be supported by evidence; this is guidance, not an enforced schedule. These percentages are estimates, not time predictions. The floating panel keeps percentages in a reserved right-hand column so long names cannot hide them. Existing keyboard controls are unchanged.
|
|
40
40
|
|
|
41
41
|
The panel defaults to the floating top-right layout. Its top border centers the current repository's Git branch and staged/unstaged/untracked file counts, refreshed asynchronously with a one-second cache. Clean repositories show `clean`. In fullscreen TUI mode, its title bar has clickable Copy, Open, and Minimize/Maximize actions, and you can scroll overflowing rows directly with the mouse wheel. Open runs `cursor .` in the current session directory (the Cursor CLI must be on PATH). Open `/works` to inspect every row or copy from the keyboard. Use `/works-panel minimize`, `/works-panel maximize`, or `/works-panel open` when mouse input is unavailable. In `/works`, press `o` to open Cursor. Switch layouts with `/works-panel floating`, `/works-panel widget`, or `/works-panel off`.
|
|
42
42
|
|
package/dist/tools.js
CHANGED
|
@@ -90,11 +90,11 @@ export function registerTaskTools(pi, state) {
|
|
|
90
90
|
pi.registerTool({
|
|
91
91
|
name: "TodoCreate",
|
|
92
92
|
label: "TodoCreate",
|
|
93
|
-
description: `Create a todo under an existing work, optionally reporting approximate completionPercent (0 for known unstarted work, null for unknown). taskInfo must contain enough detailed context, scope, constraints, expected outcome, and verification guidance to execute the task without guessing. ${DETAILS_GUIDANCE}`,
|
|
93
|
+
description: `Create a todo under an existing work, optionally reporting approximate completionPercent (0 for known unstarted work, null for unknown). For longer tasks, use TodoUpdate for interim estimates after roughly 5–10 meaningful working steps or a milestone; do not wait until completion. taskInfo must contain enough detailed context, scope, constraints, expected outcome, and verification guidance to execute the task without guessing. ${DETAILS_GUIDANCE}`,
|
|
94
94
|
promptSnippet: "Create detailed todos under the current work before implementation",
|
|
95
95
|
promptGuidelines: [
|
|
96
96
|
"Use TodoCreate only under an existing work and only for actionable main-conversation work; never use it during /ask or /btw.",
|
|
97
|
-
"Keep taskInfo detailed, current, and self-contained.
|
|
97
|
+
"Keep taskInfo detailed, current, and self-contained. completionPercent is optional; estimate from actual progress, use null when unknown, and do not infer partial completion just from status. For longer tasks, report interim estimates through TodoUpdate after roughly 5–10 meaningful working steps or a milestone.",
|
|
98
98
|
DETAILS_GUIDANCE,
|
|
99
99
|
],
|
|
100
100
|
parameters: Type.Object({
|
|
@@ -133,9 +133,9 @@ export function registerTaskTools(pi, state) {
|
|
|
133
133
|
pi.registerTool({
|
|
134
134
|
name: "TodoUpdate",
|
|
135
135
|
label: "TodoUpdate",
|
|
136
|
-
description: `Update a todo's name, detailed information, status, or completionPercent.
|
|
136
|
+
description: `Update a todo's name, detailed information, status, or completionPercent. For longer tasks, include an optional completionPercent estimate after roughly 5–10 meaningful working steps or a milestone, not just at completion or in status-only updates. Explain evidence and remaining work in taskInfo; use null when unknown and never increase a percentage without evidence. Blocking retains progress. Reserve completed/100 for verified completion. ${DETAILS_GUIDANCE}`,
|
|
137
137
|
promptSnippet: "Keep todo status and detailed context synchronized with active work",
|
|
138
|
-
promptGuidelines: ["Use TodoUpdate immediately before and after working on a todo in the main conversation; never update tracking during /ask or /btw.", "
|
|
138
|
+
promptGuidelines: ["Use TodoUpdate immediately before and after working on a todo in the main conversation; never update tracking during /ask or /btw.", "During longer tasks, include an evidence-based completionPercent estimate after roughly 5–10 meaningful working steps or a milestone; do not wait until completion or only update status. Estimates remain optional: use null when unknown, and leave a percentage unchanged if there is no new evidence. Explain evidence and remaining work in taskInfo; only verified completed tasks may reach 100. Work completion is calculated automatically from tasks.", DETAILS_GUIDANCE],
|
|
139
139
|
parameters: Type.Object({
|
|
140
140
|
taskId: Type.String(),
|
|
141
141
|
taskName: Type.Optional(NameSchema),
|
package/dist/tracking.js
CHANGED
|
@@ -10,13 +10,13 @@ Before implementation, investigation, or any other requested work:
|
|
|
10
10
|
2. If no suitable work exists, create one with WorkCreate. Otherwise use WorkUpdate to refresh its detailed workInfo and mark it active.
|
|
11
11
|
3. Create or update the work's todos so they match the requested scope. Keep taskInfo detailed and self-contained.
|
|
12
12
|
4. Mark the todo being attempted active with TodoUpdate before doing that work.
|
|
13
|
-
5.
|
|
13
|
+
5. completionPercent on TodoCreate/TodoUpdate is optional. When estimating, use an approximate integer from 0 to 100 based on actual work and verification, not elapsed time or a fixed mapping from status. Use 0 for genuinely unstarted tasks and null when unknown. Never invent progress to make a work look further along.
|
|
14
14
|
|
|
15
15
|
During and after the attempt:
|
|
16
16
|
- When available, use MonitorCreate only when a command should continue in the background; inspect it with MonitorList and do not poll it with shell sleep loops.
|
|
17
17
|
- When available, use LoopCreate only when work needs a future or repeated wake. Do not create a loop for ordinary synchronous work.
|
|
18
18
|
- A loop or monitor does not replace work and todo status. Update the related todo when its result is known.
|
|
19
|
-
-
|
|
19
|
+
- During longer tasks, include an evidence-based completionPercent estimate in TodoUpdate after roughly 5–10 meaningful working steps or a milestone. Do not wait until completion or only update status when an estimate is possible. Explain the evidence and remaining work in taskInfo. Estimates remain optional: use null when unknown, and leave a percentage unchanged if there is no new evidence. Keep estimates current, including after scope changes. Work completion is derived as the equal average of non-cancelled task percentages; any unknown child makes it unknown. Do not set an independent work percentage.
|
|
20
20
|
- Mark the todo completed, blocked, or cancelled as appropriate and update taskInfo with important current context. Only use completed/100 after verification. Blocking retains the last percentage; it does not erase completed effort. Reopening a completed task needs a fresh estimate (otherwise it becomes unknown).
|
|
21
21
|
- Percentages are approximate completion, not ETA or proof. Never mark a parent complete to conceal unfinished tasks, and never change statuses merely because a percentage looks complete.
|
|
22
22
|
- Keep the work active while required todos remain, blocked when progress cannot continue, and completed only when its required todos are complete.
|
package/dist/ui/panel.js
CHANGED
|
@@ -179,7 +179,7 @@ class TasksPanel {
|
|
|
179
179
|
let title = "Works";
|
|
180
180
|
if (this.placement === "floating" && hasOverflow) {
|
|
181
181
|
title += this.tui.mode === "fullscreen"
|
|
182
|
-
? ` · ${range}
|
|
182
|
+
? ` · ${range}`
|
|
183
183
|
: ` · ${range} · latest · /works for all`;
|
|
184
184
|
}
|
|
185
185
|
const header = this.renderHeader(title, innerWidth, leftPad.length);
|
package/docs/REFERENCE.md
CHANGED
|
@@ -26,7 +26,7 @@ The public list shape assembles each work with `tasks: Todo[]`; tasks are stored
|
|
|
26
26
|
|
|
27
27
|
### Completion progress
|
|
28
28
|
|
|
29
|
-
`TodoCreate` and `TodoUpdate` accept optional `completionPercent`: an integer from 0 through 100, or `null` to clear an obsolete estimate. Omission preserves an existing estimate on updates. The AI reports approximate progress based on completed effort and verification, explaining the evidence and remaining scope in `taskInfo`; status alone never implies an arbitrary partial percentage. No new tool or extra model call is added.
|
|
29
|
+
`TodoCreate` and `TodoUpdate` accept optional `completionPercent`: an integer from 0 through 100, or `null` to clear an obsolete estimate. Omission preserves an existing estimate on updates. For longer tasks, the guidance asks the AI to include interim estimates in `TodoUpdate` after roughly 5–10 meaningful working steps or a milestone, not just at completion or in status-only updates. The AI reports approximate progress based on completed effort and verification, explaining the evidence and remaining scope in `taskInfo`; status alone never implies an arbitrary partial percentage. Estimates remain optional; use `null` when unknown and do not increase a percentage without new evidence. This cadence is guidance, not a runtime timer or enforced tool-call count. No new tool or extra model call is added.
|
|
30
30
|
|
|
31
31
|
- Completed tasks normalize to 100%; explicit partial progress with completed status is rejected. Explicit 100 requires completed status. Completion remains an agent assertion after verification, not an independent extension proof.
|
|
32
32
|
- Moving a partial task to blocked retains its progress. Reopening a completed task without a new estimate becomes unknown rather than retaining 100%.
|
package/docs/USAGE_GUIDE.md
CHANGED
|
@@ -8,8 +8,9 @@ For every normal request that starts or continues work, Pi should:
|
|
|
8
8
|
2. Create or update the relevant work and mark it active.
|
|
9
9
|
3. Create or update detailed todos for the requested scope.
|
|
10
10
|
4. Mark the current todo active before starting it.
|
|
11
|
-
5.
|
|
12
|
-
6.
|
|
11
|
+
5. During longer tasks, report interim progress after roughly 5–10 meaningful working steps or a milestone, when an estimate is possible.
|
|
12
|
+
6. Mark the todo completed, blocked, or cancelled after the attempt.
|
|
13
|
+
7. Complete the work only when its required todos are complete.
|
|
13
14
|
|
|
14
15
|
The extension applies this guidance across all loaded skills and does not skip work merely because it looks small. It does not update tracking during `/ask`, `/btw`, or BTW side threads.
|
|
15
16
|
|
|
@@ -66,7 +67,7 @@ TodoDelete taskId="T1"
|
|
|
66
67
|
|
|
67
68
|
### Completion percentages
|
|
68
69
|
|
|
69
|
-
Pi
|
|
70
|
+
During longer tasks, Pi should include a `completionPercent` estimate in `TodoUpdate` after roughly 5–10 meaningful working steps or a milestone, rather than waiting until completion or only updating status. Explain the evidence and remaining work in `taskInfo`. Estimates remain optional: use `null` when unknown, and leave a percentage unchanged if there is no new evidence. This is model-facing guidance, not an enforced schedule or an automatic percentage increase. These are approximate AI-reported values, not a fixed percentage for each status and not a time prediction. Use an integer 0–100 or `null` for unknown. Completed status means verified completion and displays 100%; 100 without completed status is rejected. Partial progress requires reopening a completed task; reopening without a fresh estimate makes it unknown. Blocking retains the current estimate.
|
|
70
71
|
|
|
71
72
|
Work progress averages all non-cancelled tasks equally and rounds down. Tasks at 100%, 40%, 0%, 0% produce 35% work completion, not 25% based on finished-task counts. If any eligible task lacks an estimate, the work displays `—`. No eligible tasks also means unknown unless the work itself is verified complete. A completed parent never hides unfinished task progress. Existing sessions retain their records; legacy completed tasks display 100%, while other missing estimates remain unknown.
|
|
72
73
|
|