agentpack-cli 0.1.12 → 0.1.14

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.
@@ -150,10 +150,10 @@ active -> parked task park
150
150
  parked -> active task switch/resume
151
151
  active -> blocked task block
152
152
  blocked -> active task unblock/resume
153
- active -> verifying task update-verification
153
+ active -> verifying task verify
154
154
  verifying -> active verification found more work
155
- verifying -> completed verification passed
156
- active -> completed small/docs task accepted directly
155
+ verifying -> completed task finalize
156
+ active -> completed task finalize --status accepted
157
157
  active -> abandoned task abandon
158
158
  parked -> abandoned stale parked task is discarded
159
159
  blocked -> abandoned blocked task is discarded
@@ -163,7 +163,7 @@ Closed statuses are `completed` and `abandoned`. Closed passports remain inspect
163
163
 
164
164
  ## CLI Shape
165
165
 
166
- Target first CLI surface:
166
+ Current CLI surface:
167
167
 
168
168
  ```bash
169
169
  agentpack task start "Fix checkout discount bug" \
@@ -173,6 +173,7 @@ agentpack task start "Fix checkout discount bug" \
173
173
 
174
174
  agentpack task list
175
175
  agentpack task status
176
+ agentpack task handoff
176
177
  agentpack task passport
177
178
  agentpack task switch task_20260518_source_cleanup
178
179
  agentpack task update --next "Run focused regression tests" --write-scope tests/checkout.test.ts --risk medium
@@ -180,21 +181,28 @@ agentpack task audit
180
181
  agentpack task park
181
182
  agentpack task block --reason "Waiting for API decision"
182
183
  agentpack task verify --status passed --evidence evt_... --summary "Focused checks passed"
183
- agentpack task close
184
+ agentpack task finalize
185
+ agentpack task --help
184
186
  ```
185
187
 
186
188
  `resume` and MCP `load_context` read the current passport automatically when one exists, then show the broader repo-level ledger below it.
187
189
 
190
+ The normal human-facing sequence is: start the task, keep status/scope/next actions current, record verification with evidence, print a handoff when another agent or chat may continue, then finalize only after verification is final.
191
+
188
192
  `task start` creates a new current passport only when there is no current task, the current task is closed, or the current task is parked. If the current task is active, blocked, or verifying, Agentpack asks you to park or close it first so unrelated work does not silently overwrite the handoff pointer. Invalid risk values are rejected instead of being treated as unknown.
189
193
 
190
194
  `task status` prints a short current-task view without scanning source-cache status. Use it for a quick human check before reaching for `task audit`.
191
195
 
196
+ `task handoff` prints a compact current-passport handoff for switching chats, clients, worktrees, or agents. It includes objective, constraints, write scope, next actions, verification, drift, and audit summary without dumping the full passport JSON.
197
+
192
198
  `task audit` is a diagnostic pass for continuity risk. It checks the current passport for branch/head drift, missing next actions, open verification, closed-current-task anomalies, and source-cache metadata drift. Metadata warnings are shown separately so stale source records do not look like action-required task failures.
193
199
 
194
200
  `task update` patches the current passport without changing lifecycle status. It can add objective, constraints, write scope, next actions, tags, and risk after the task has already started. List fields append and deduplicate; omitted fields are preserved. Empty or no-op updates fail, and unknown risk values are rejected.
195
201
 
196
202
  `task verify` updates the verification state. Without flags it marks verification as `pending`; with `--status`, `--evidence`, and `--summary` it links verification to recorded evidence so the audit warning can become a reviewed result. `task update-verification` remains available as a compatibility alias.
197
203
 
204
+ `task finalize` is the compact end-of-task ritual. It closes the current task only after verification is already `passed`, `failed`, or `accepted`, or when that final status is passed explicitly with `--status`. It refuses to close unknown or pending verification by default. `task close` remains available for explicit manual closure.
205
+
198
206
  ## Role Lanes
199
207
 
200
208
  Roles are coordination lanes inside one passport, not separate tasks.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentpack-cli",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "Local task-state ledger for AI coding agents.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -29,7 +29,7 @@ try {
29
29
 
30
30
  const toolsResponse = await client.request("tools/list", {});
31
31
  const toolNames = toolsResponse.result?.tools?.map((tool) => tool.name).sort() || [];
32
- for (const expected of ["load_context", "record_decision", "record_source", "resume", "source_status", "task_audit", "task_update", "task_update_verification"]) {
32
+ for (const expected of ["load_context", "record_decision", "record_source", "resume", "source_status", "task_audit", "task_finalize", "task_handoff", "task_update", "task_update_verification"]) {
33
33
  assertIncludes(toolNames, expected, `tools/list includes ${expected}`);
34
34
  }
35
35
 
@@ -71,6 +71,12 @@ try {
71
71
  "Complete smoke verification"
72
72
  ]);
73
73
 
74
+ const taskHandoff = await client.request("tools/call", {
75
+ name: "task_handoff",
76
+ arguments: {}
77
+ });
78
+ assertMatch(taskHandoff.result?.content?.[0]?.text || "", /MCP smoke verification \[active\]/, "task_handoff reports the active task");
79
+
74
80
  const evidence = await client.request("tools/call", {
75
81
  name: "attach_evidence",
76
82
  arguments: {
@@ -102,6 +108,12 @@ try {
102
108
  });
103
109
  assertMatch(taskUpdate.result?.content?.[0]?.text || "", /Updated task .*/, "task_update updates the current passport");
104
110
 
111
+ const taskFinalize = await client.request("tools/call", {
112
+ name: "task_finalize",
113
+ arguments: {}
114
+ });
115
+ assertMatch(taskFinalize.result?.content?.[0]?.text || "", /Finalized task .* \(passed\)/, "task_finalize closes a verified task");
116
+
105
117
  const resume = await client.request("tools/call", {
106
118
  name: "resume",
107
119
  arguments: {
@@ -114,7 +126,7 @@ try {
114
126
 
115
127
  console.log("MCP server OK");
116
128
  console.log(`Tools: ${toolNames.join(", ")}`);
117
- console.log("Flow: initialize -> tools/list -> record_decision -> record_source -> source_status -> task_audit -> task_update_verification -> task_update -> resume");
129
+ console.log("Flow: initialize -> tools/list -> record_decision -> record_source -> source_status -> task_audit -> task_handoff -> task_update_verification -> task_update -> task_finalize -> resume");
118
130
  } catch (error) {
119
131
  console.error("MCP smoke failed");
120
132
  console.error(error instanceof Error ? error.message : String(error));