@staff0rd/assist 0.154.2 → 0.155.1

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.
Files changed (2) hide show
  1. package/dist/index.js +42 -36
  2. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -6,11 +6,12 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.154.2",
9
+ version: "0.155.1",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
13
13
  assist: "./dist/index.js",
14
+ a: "./dist/index.js",
14
15
  ast: "./dist/index.js"
15
16
  },
16
17
  files: [
@@ -203,11 +204,40 @@ async function del(id) {
203
204
 
204
205
  // src/commands/backlog/done/index.ts
205
206
  import chalk3 from "chalk";
206
- async function done(id) {
207
- const name = setStatus(id, "done");
208
- if (name) {
209
- console.log(chalk3.green(`Completed item #${id}: ${name}`));
207
+
208
+ // src/commands/backlog/addComment.ts
209
+ function addComment(item, text, phase) {
210
+ const entry = {
211
+ text,
212
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
213
+ type: "comment",
214
+ ...phase !== void 0 && { phase }
215
+ };
216
+ if (!item.comments) item.comments = [];
217
+ item.comments.push(entry);
218
+ }
219
+ function addPhaseSummary(item, text, phase) {
220
+ const entry = {
221
+ text,
222
+ phase,
223
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
224
+ type: "summary"
225
+ };
226
+ if (!item.comments) item.comments = [];
227
+ item.comments.push(entry);
228
+ }
229
+
230
+ // src/commands/backlog/done/index.ts
231
+ async function done(id, summary) {
232
+ const result = loadAndFindItem(id);
233
+ if (!result) return;
234
+ result.item.status = "done";
235
+ if (summary) {
236
+ const phase = result.item.currentPhase ?? 0;
237
+ addPhaseSummary(result.item, summary, phase);
210
238
  }
239
+ saveBacklog(result.items);
240
+ console.log(chalk3.green(`Completed item #${id}: ${result.item.name}`));
211
241
  }
212
242
 
213
243
  // src/commands/backlog/next.ts
@@ -333,9 +363,9 @@ function buildReviewPrompt(item, phaseIndex) {
333
363
  "Wait for the user to confirm before proceeding.",
334
364
  "",
335
365
  "Once the user confirms:",
336
- `1. Run: assist backlog done ${item.id}`,
366
+ `1. Run: assist backlog done ${item.id} "<summary>"`,
337
367
  "2. Run: /commit",
338
- `3. Run: assist backlog phase-done ${item.id} ${phaseIndex} "<summary>"`
368
+ `3. Run: assist backlog phase-done ${item.id} ${phaseIndex} "done"`
339
369
  ].filter((line) => line !== void 0).join("\n");
340
370
  }
341
371
 
@@ -385,30 +415,6 @@ async function handleIncompletePhase() {
385
415
  import { writeFileSync as writeFileSync2 } from "fs";
386
416
  import { join as join2 } from "path";
387
417
  import chalk5 from "chalk";
388
-
389
- // src/commands/backlog/addComment.ts
390
- function addComment(item, text, phase) {
391
- const entry = {
392
- text,
393
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
394
- type: "comment",
395
- ...phase !== void 0 && { phase }
396
- };
397
- if (!item.comments) item.comments = [];
398
- item.comments.push(entry);
399
- }
400
- function addPhaseSummary(item, text, phase) {
401
- const entry = {
402
- text,
403
- phase,
404
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
405
- type: "summary"
406
- };
407
- if (!item.comments) item.comments = [];
408
- item.comments.push(entry);
409
- }
410
-
411
- // src/commands/backlog/phaseDone.ts
412
418
  var PHASE_STATUS_FILE = ".assist-phase-status.json";
413
419
  function getPhaseStatusPath() {
414
420
  return join2(process.cwd(), PHASE_STATUS_FILE);
@@ -425,14 +431,14 @@ function phaseDone(id, phase, summary) {
425
431
  })
426
432
  );
427
433
  const result = loadAndFindItem(id);
428
- if (result) {
429
- addPhaseSummary(result.item, summary, phaseIndex);
430
- saveBacklog(result.items);
431
- }
432
434
  if (result?.item.status === "done") {
433
435
  console.log(chalk5.dim(`Item #${id} already done, skipping phase advance.`));
434
436
  return;
435
437
  }
438
+ if (result) {
439
+ addPhaseSummary(result.item, summary, phaseIndex);
440
+ saveBacklog(result.items);
441
+ }
436
442
  setCurrentPhase(id, phaseIndex + 1);
437
443
  console.log(chalk5.green(`Phase ${phase} of item #${id} marked as complete.`));
438
444
  }
@@ -3397,7 +3403,7 @@ function registerShowCommands(cmd) {
3397
3403
  }
3398
3404
  function registerStatusCommands(cmd) {
3399
3405
  cmd.command("start <id>").description("Set a backlog item to in-progress").action(start);
3400
- cmd.command("done <id>").description("Set a backlog item to done").action(done);
3406
+ cmd.command("done <id> [summary]").description("Set a backlog item to done").action(done);
3401
3407
  cmd.command("delete <id>").alias("remove").description("Delete a backlog item").action(del);
3402
3408
  }
3403
3409
  function registerWebCommand(cmd) {
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.154.2",
3
+ "version": "0.155.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
7
  "assist": "./dist/index.js",
8
+ "a": "./dist/index.js",
8
9
  "ast": "./dist/index.js"
9
10
  },
10
11
  "files": [