@staff0rd/assist 0.441.0 → 0.442.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/commands/sessions/web/bundle.js +2 -2
- package/dist/index.js +41 -18
- package/package.json +1 -1
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.442.1",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -437,6 +437,7 @@ var assistConfigSchema = z2.strictObject({
|
|
|
437
437
|
enabled: z2.boolean().default(false),
|
|
438
438
|
root: z2.string().optional(),
|
|
439
439
|
install: z2.union([z2.boolean(), z2.string()]).default(true),
|
|
440
|
+
commitBeforeManualChecks: z2.boolean().default(false),
|
|
440
441
|
copy: z2.array(z2.string()).default([
|
|
441
442
|
".env",
|
|
442
443
|
"settings.local.json",
|
|
@@ -6641,8 +6642,27 @@ function formatPromptComment(entry) {
|
|
|
6641
6642
|
${entry.text}`;
|
|
6642
6643
|
}
|
|
6643
6644
|
|
|
6645
|
+
// src/commands/backlog/buildManualCheckLines.ts
|
|
6646
|
+
function buildManualCheckLines(manualChecks, commitBeforeManualChecks) {
|
|
6647
|
+
if (manualChecks.length > 0) {
|
|
6648
|
+
return [
|
|
6649
|
+
"",
|
|
6650
|
+
...commitBeforeManualChecks ? [
|
|
6651
|
+
"Once verify passes, run /commit to commit the work before asking the user to perform the manual checks below."
|
|
6652
|
+
] : [],
|
|
6653
|
+
"Before marking this phase as done, ask the user to perform these manual checks:",
|
|
6654
|
+
...manualChecks.map((c) => `- ${c}`),
|
|
6655
|
+
"",
|
|
6656
|
+
"Wait for the user to confirm all manual checks pass before proceeding."
|
|
6657
|
+
];
|
|
6658
|
+
}
|
|
6659
|
+
return [];
|
|
6660
|
+
}
|
|
6661
|
+
|
|
6644
6662
|
// src/commands/backlog/buildAuthoredPhasePrompt.ts
|
|
6645
|
-
function buildAuthoredPhasePrompt(item, phaseNumber, phase
|
|
6663
|
+
function buildAuthoredPhasePrompt(item, phaseNumber, phase, options2 = {
|
|
6664
|
+
commitBeforeManualChecks: false
|
|
6665
|
+
}) {
|
|
6646
6666
|
const manualChecks = phase.manualChecks ?? [];
|
|
6647
6667
|
const needsConfirmation = manualChecks.length > 0;
|
|
6648
6668
|
const confirmSuffix = needsConfirmation ? " and the user confirms" : "";
|
|
@@ -6653,7 +6673,7 @@ function buildAuthoredPhasePrompt(item, phaseNumber, phase) {
|
|
|
6653
6673
|
"Focus ONLY on this phase. Do not work on other phases.",
|
|
6654
6674
|
"If you need to modify backlog items, run `assist backlog --help` to discover available commands.",
|
|
6655
6675
|
"When you have completed all tasks for this phase, run /verify to check your work.",
|
|
6656
|
-
...buildManualCheckLines(manualChecks),
|
|
6676
|
+
...buildManualCheckLines(manualChecks, options2.commitBeforeManualChecks),
|
|
6657
6677
|
"",
|
|
6658
6678
|
`Post concise comments for any notable findings or changes using \`assist backlog comment ${formatItemId(item.id)} "<text>"\`.`,
|
|
6659
6679
|
"",
|
|
@@ -6686,24 +6706,14 @@ function buildJiraStartedLines(item, phaseNumber) {
|
|
|
6686
6706
|
`As your first step, before any implementation, run \`/jira started ${item.jiraKey}\` to assign the issue to yourself and transition it to In Progress.`
|
|
6687
6707
|
];
|
|
6688
6708
|
}
|
|
6689
|
-
function buildManualCheckLines(manualChecks) {
|
|
6690
|
-
if (manualChecks.length > 0) {
|
|
6691
|
-
return [
|
|
6692
|
-
"",
|
|
6693
|
-
"Before marking this phase as done, ask the user to perform these manual checks:",
|
|
6694
|
-
...manualChecks.map((c) => `- ${c}`),
|
|
6695
|
-
"",
|
|
6696
|
-
"Wait for the user to confirm all manual checks pass before proceeding."
|
|
6697
|
-
];
|
|
6698
|
-
}
|
|
6699
|
-
return [];
|
|
6700
|
-
}
|
|
6701
6709
|
function formatTasks(phase) {
|
|
6702
6710
|
return phase.tasks.map((t) => `- ${t.task}`).join("\n");
|
|
6703
6711
|
}
|
|
6704
6712
|
|
|
6705
6713
|
// src/commands/backlog/buildReviewPrompt.ts
|
|
6706
|
-
function buildReviewPrompt(item, phaseNumber
|
|
6714
|
+
function buildReviewPrompt(item, phaseNumber, options2 = {
|
|
6715
|
+
commitBeforeManualChecks: false
|
|
6716
|
+
}) {
|
|
6707
6717
|
const acLines = item.acceptanceCriteria.map((ac, i) => `${i + 1}. ${ac}`).join("\n");
|
|
6708
6718
|
const itemId2 = formatItemId(item.id);
|
|
6709
6719
|
return [
|
|
@@ -6724,6 +6734,10 @@ function buildReviewPrompt(item, phaseNumber) {
|
|
|
6724
6734
|
"",
|
|
6725
6735
|
`Post concise comments for any notable findings or changes using \`assist backlog comment ${itemId2} "<text>"\`.`,
|
|
6726
6736
|
"",
|
|
6737
|
+
...options2.commitBeforeManualChecks ? [
|
|
6738
|
+
"Before asking the user to confirm manual checks, run /commit to commit the work (it is fine if there is nothing new to commit).",
|
|
6739
|
+
""
|
|
6740
|
+
] : [],
|
|
6727
6741
|
"After all criteria pass, ask the user to confirm any manual checks",
|
|
6728
6742
|
"(e.g. end-to-end behaviour they need to verify themselves).",
|
|
6729
6743
|
"Wait for the user to confirm before proceeding.",
|
|
@@ -6748,10 +6762,13 @@ function buildReviewPrompt(item, phaseNumber) {
|
|
|
6748
6762
|
// src/commands/backlog/buildPhasePrompt.ts
|
|
6749
6763
|
var REVIEW_PHASE_NAME = "Review";
|
|
6750
6764
|
function buildPhasePrompt(item, phaseNumber, phase) {
|
|
6765
|
+
const commitBeforeManualChecks = loadConfig().worktree?.commitBeforeManualChecks ?? false;
|
|
6751
6766
|
if (phase.name === REVIEW_PHASE_NAME) {
|
|
6752
|
-
return buildReviewPrompt(item, phaseNumber);
|
|
6767
|
+
return buildReviewPrompt(item, phaseNumber, { commitBeforeManualChecks });
|
|
6753
6768
|
}
|
|
6754
|
-
return buildAuthoredPhasePrompt(item, phaseNumber, phase
|
|
6769
|
+
return buildAuthoredPhasePrompt(item, phaseNumber, phase, {
|
|
6770
|
+
commitBeforeManualChecks
|
|
6771
|
+
});
|
|
6755
6772
|
}
|
|
6756
6773
|
|
|
6757
6774
|
// src/commands/backlog/watchForMarker.ts
|
|
@@ -26509,6 +26526,7 @@ function dismissSession(sessions, id) {
|
|
|
26509
26526
|
var DISABLED = {
|
|
26510
26527
|
enabled: false,
|
|
26511
26528
|
install: true,
|
|
26529
|
+
commitBeforeManualChecks: false,
|
|
26512
26530
|
copy: [".env", "settings.local.json", ".claude/settings.local.json"]
|
|
26513
26531
|
};
|
|
26514
26532
|
function worktreeConfigFor(cwd) {
|
|
@@ -29934,6 +29952,11 @@ var sessionsConfigHelp = [
|
|
|
29934
29952
|
setter: "assist config set worktree.install true -g --repo",
|
|
29935
29953
|
note: "per-worktree dep install: true auto-detects the package manager, or give an explicit command; false to skip"
|
|
29936
29954
|
},
|
|
29955
|
+
{
|
|
29956
|
+
key: "worktree.commitBeforeManualChecks",
|
|
29957
|
+
setter: "assist config set worktree.commitBeforeManualChecks true -g --repo",
|
|
29958
|
+
note: "phase prompts run /commit before asking the user to perform manual checks, so work is not left uncommitted in a reapable worktree (default off)"
|
|
29959
|
+
},
|
|
29937
29960
|
{
|
|
29938
29961
|
key: "worktree.copy",
|
|
29939
29962
|
setter: "assist config set worktree.copy .env,.claude/settings.local.json -g --repo",
|