@staff0rd/assist 0.1025.1 → 0.1026.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.
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@staff0rd/assist",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.1026.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -904,6 +904,7 @@ import { z as z6 } from "zod";
|
|
|
904
904
|
// src/shared/adviceFragmentNames.ts
|
|
905
905
|
var adviceFragmentTitles = {
|
|
906
906
|
ask: "Asking for sign-off",
|
|
907
|
+
"ask-check": "Asking for a manual check",
|
|
907
908
|
"ask-question": "Asking questions",
|
|
908
909
|
"assist-global": "Using assist",
|
|
909
910
|
"backlog-ids": "Backlog item IDs",
|
|
@@ -924,6 +925,7 @@ var adviceFragmentTitles = {
|
|
|
924
925
|
};
|
|
925
926
|
var adviceFragmentNames = [
|
|
926
927
|
"ask",
|
|
928
|
+
"ask-check",
|
|
927
929
|
"ask-question",
|
|
928
930
|
"assist-global",
|
|
929
931
|
"backlog-ids",
|
|
@@ -7380,21 +7382,20 @@ async function appendComment(orm, itemId2, text19, opts = {}) {
|
|
|
7380
7382
|
});
|
|
7381
7383
|
}
|
|
7382
7384
|
|
|
7383
|
-
// src/commands/backlog/buildCommentLines.ts
|
|
7384
|
-
function buildCommentLines(comments3) {
|
|
7385
|
-
if (!comments3?.length) return [];
|
|
7386
|
-
return ["", "Comments:", ...comments3.map(formatPromptComment)];
|
|
7387
|
-
}
|
|
7388
|
-
function formatPromptComment(entry) {
|
|
7389
|
-
const id = entry.id !== void 0 ? `#${entry.id} ` : "";
|
|
7390
|
-
const tag = entry.type === "summary" ? "[summary]" : "[comment]";
|
|
7391
|
-
const phase = entry.phase !== void 0 ? ` (phase ${entry.phase})` : "";
|
|
7392
|
-
return `${id}${tag}${phase} ${entry.timestamp}
|
|
7393
|
-
${entry.text}`;
|
|
7394
|
-
}
|
|
7395
|
-
|
|
7396
7385
|
// src/commands/backlog/buildManualCheckLines.ts
|
|
7397
|
-
function buildManualCheckLines(manualChecks, commitBeforePhaseEnd) {
|
|
7386
|
+
function buildManualCheckLines(manualChecks, commitBeforePhaseEnd, askCheck2 = false) {
|
|
7387
|
+
if (manualChecks.length > 0 && askCheck2) {
|
|
7388
|
+
return [
|
|
7389
|
+
"",
|
|
7390
|
+
"Once verify passes, run /commit to commit the work before asking the user to perform the manual checks below.",
|
|
7391
|
+
"Then raise each manual check with `assist ask-check --json - < <file>` as a background task, one check at a time, doing no other work until it returns (see the 'Asking for a manual check' advice for the payload). If it exits non-zero before opening, ask for that check in chat instead.",
|
|
7392
|
+
"Keep your chat summary to a few lines; the check itself carries the steps.",
|
|
7393
|
+
"Manual checks:",
|
|
7394
|
+
...manualChecks.map((c) => `- ${c}`),
|
|
7395
|
+
"",
|
|
7396
|
+
"Wait for every manual check to come back works before proceeding; if one doesn't work, fix it and raise it again."
|
|
7397
|
+
];
|
|
7398
|
+
}
|
|
7398
7399
|
if (manualChecks.length > 0) {
|
|
7399
7400
|
return [
|
|
7400
7401
|
"",
|
|
@@ -7416,6 +7417,40 @@ function buildManualCheckLines(manualChecks, commitBeforePhaseEnd) {
|
|
|
7416
7417
|
return [];
|
|
7417
7418
|
}
|
|
7418
7419
|
|
|
7420
|
+
// src/commands/backlog/buildCommentLines.ts
|
|
7421
|
+
function buildCommentLines(comments3) {
|
|
7422
|
+
if (!comments3?.length) return [];
|
|
7423
|
+
return ["", "Comments:", ...comments3.map(formatPromptComment)];
|
|
7424
|
+
}
|
|
7425
|
+
function formatPromptComment(entry) {
|
|
7426
|
+
const id = entry.id !== void 0 ? `#${entry.id} ` : "";
|
|
7427
|
+
const tag = entry.type === "summary" ? "[summary]" : "[comment]";
|
|
7428
|
+
const phase = entry.phase !== void 0 ? ` (phase ${entry.phase})` : "";
|
|
7429
|
+
return `${id}${tag}${phase} ${entry.timestamp}
|
|
7430
|
+
${entry.text}`;
|
|
7431
|
+
}
|
|
7432
|
+
|
|
7433
|
+
// src/commands/backlog/buildContextLines.ts
|
|
7434
|
+
function buildContextLines(item, phaseNumber, phase) {
|
|
7435
|
+
const ac = item.acceptanceCriteria.map((c, i) => `${i + 1}. ${c}`).join("\n");
|
|
7436
|
+
return [
|
|
7437
|
+
`You are implementing phase ${phaseNumber} of backlog item ${formatItemId(item.id)}: ${item.name}`,
|
|
7438
|
+
"",
|
|
7439
|
+
item.description ? `Description: ${item.description}` : "",
|
|
7440
|
+
"",
|
|
7441
|
+
"Acceptance criteria:",
|
|
7442
|
+
ac,
|
|
7443
|
+
...buildCommentLines(item.comments),
|
|
7444
|
+
"",
|
|
7445
|
+
`Phase ${phaseNumber}: ${phase.name}`,
|
|
7446
|
+
"Tasks:",
|
|
7447
|
+
formatTasks(phase)
|
|
7448
|
+
];
|
|
7449
|
+
}
|
|
7450
|
+
function formatTasks(phase) {
|
|
7451
|
+
return phase.tasks.map((t) => `- ${t.task}`).join("\n");
|
|
7452
|
+
}
|
|
7453
|
+
|
|
7419
7454
|
// src/commands/backlog/buildAuthoredPhasePrompt.ts
|
|
7420
7455
|
function buildAuthoredPhasePrompt(item, phaseNumber, phase, options2 = {
|
|
7421
7456
|
commitBeforePhaseEnd: false
|
|
@@ -7430,7 +7465,11 @@ function buildAuthoredPhasePrompt(item, phaseNumber, phase, options2 = {
|
|
|
7430
7465
|
"Focus ONLY on this phase. Do not work on other phases.",
|
|
7431
7466
|
"If you need to modify backlog items, run `assist backlog --help` to discover available commands.",
|
|
7432
7467
|
"When you have completed all tasks for this phase, run /verify to check your work.",
|
|
7433
|
-
...buildManualCheckLines(
|
|
7468
|
+
...buildManualCheckLines(
|
|
7469
|
+
manualChecks,
|
|
7470
|
+
options2.commitBeforePhaseEnd,
|
|
7471
|
+
options2.askCheck
|
|
7472
|
+
),
|
|
7434
7473
|
"",
|
|
7435
7474
|
`Post concise comments for any notable findings or changes using \`assist backlog comment ${formatItemId(item.id)} "<text>"\`.`,
|
|
7436
7475
|
"",
|
|
@@ -7438,22 +7477,6 @@ function buildAuthoredPhasePrompt(item, phaseNumber, phase, options2 = {
|
|
|
7438
7477
|
"Replace <summary> with a concise summary of what was done in this phase."
|
|
7439
7478
|
].filter((line) => line !== void 0).join("\n");
|
|
7440
7479
|
}
|
|
7441
|
-
function buildContextLines(item, phaseNumber, phase) {
|
|
7442
|
-
const ac = item.acceptanceCriteria.map((c, i) => `${i + 1}. ${c}`).join("\n");
|
|
7443
|
-
return [
|
|
7444
|
-
`You are implementing phase ${phaseNumber} of backlog item ${formatItemId(item.id)}: ${item.name}`,
|
|
7445
|
-
"",
|
|
7446
|
-
item.description ? `Description: ${item.description}` : "",
|
|
7447
|
-
"",
|
|
7448
|
-
"Acceptance criteria:",
|
|
7449
|
-
ac,
|
|
7450
|
-
...buildCommentLines(item.comments),
|
|
7451
|
-
"",
|
|
7452
|
-
`Phase ${phaseNumber}: ${phase.name}`,
|
|
7453
|
-
"Tasks:",
|
|
7454
|
-
formatTasks(phase)
|
|
7455
|
-
];
|
|
7456
|
-
}
|
|
7457
7480
|
function buildStartedLines(item, phaseNumber) {
|
|
7458
7481
|
if (phaseNumber !== 1) return [];
|
|
7459
7482
|
const command = item.jiraKey ? `/jira started ${item.jiraKey}` : item.githubIssue ? `/github started ${item.githubIssue}` : void 0;
|
|
@@ -7463,9 +7486,6 @@ function buildStartedLines(item, phaseNumber) {
|
|
|
7463
7486
|
`As your first step, before any implementation, run \`${command}\` to assign the issue to yourself and transition it to In Progress.`
|
|
7464
7487
|
];
|
|
7465
7488
|
}
|
|
7466
|
-
function formatTasks(phase) {
|
|
7467
|
-
return phase.tasks.map((t) => `- ${t.task}`).join("\n");
|
|
7468
|
-
}
|
|
7469
7489
|
|
|
7470
7490
|
// src/commands/backlog/buildReviewPrompt.ts
|
|
7471
7491
|
function buildReviewPrompt(item, phaseNumber, options2 = {
|
|
@@ -7517,13 +7537,15 @@ function buildReviewPrompt(item, phaseNumber, options2 = {
|
|
|
7517
7537
|
// src/commands/backlog/buildPhasePrompt.ts
|
|
7518
7538
|
var REVIEW_PHASE_NAME = "Review";
|
|
7519
7539
|
function buildPhasePrompt(item, phaseNumber, phase) {
|
|
7520
|
-
const
|
|
7540
|
+
const config = loadConfig();
|
|
7541
|
+
const worktree = config.worktree;
|
|
7521
7542
|
const commitBeforePhaseEnd = worktree?.commitBeforePhaseEnd ?? worktree?.commitBeforeManualChecks ?? false;
|
|
7522
7543
|
if (phase.name === REVIEW_PHASE_NAME) {
|
|
7523
7544
|
return buildReviewPrompt(item, phaseNumber, { commitBeforePhaseEnd });
|
|
7524
7545
|
}
|
|
7525
7546
|
return buildAuthoredPhasePrompt(item, phaseNumber, phase, {
|
|
7526
|
-
commitBeforePhaseEnd
|
|
7547
|
+
commitBeforePhaseEnd,
|
|
7548
|
+
askCheck: config.sessions?.askQuestion === true
|
|
7527
7549
|
});
|
|
7528
7550
|
}
|
|
7529
7551
|
|