@staff0rd/assist 0.643.1 → 0.643.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/claude/commands/draft.md +2 -2
- package/claude/commands/refine.md +1 -1
- package/dist/commands/sessions/web/bundle.js +384 -384
- package/dist/index.js +25 -7
- 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.643.
|
|
9
|
+
version: "0.643.3",
|
|
10
10
|
type: "module",
|
|
11
11
|
main: "dist/index.js",
|
|
12
12
|
bin: {
|
|
@@ -8853,16 +8853,21 @@ function buildReviewPhase() {
|
|
|
8853
8853
|
};
|
|
8854
8854
|
}
|
|
8855
8855
|
|
|
8856
|
+
// src/commands/backlog/appendReviewPhase.ts
|
|
8857
|
+
function appendReviewPhase(plan2) {
|
|
8858
|
+
if (plan2.at(-1)?.name === REVIEW_PHASE_NAME) return plan2;
|
|
8859
|
+
return [...plan2, buildReviewPhase()];
|
|
8860
|
+
}
|
|
8861
|
+
|
|
8856
8862
|
// src/commands/backlog/runReview.ts
|
|
8857
8863
|
async function runReview(item, fallbackPlan, spawnOptions) {
|
|
8858
8864
|
const plan2 = await reloadPlan(item.id) ?? fallbackPlan;
|
|
8859
|
-
const
|
|
8860
|
-
const allPhases = [...plan2, reviewPhase];
|
|
8865
|
+
const allPhases = appendReviewPhase(plan2);
|
|
8861
8866
|
let reviewOptions = spawnOptions;
|
|
8862
8867
|
while (true) {
|
|
8863
8868
|
const outcome = await executePhase(
|
|
8864
8869
|
item,
|
|
8865
|
-
|
|
8870
|
+
allPhases.length - 1,
|
|
8866
8871
|
allPhases,
|
|
8867
8872
|
reviewOptions
|
|
8868
8873
|
);
|
|
@@ -10198,7 +10203,7 @@ async function parseStarBody(req) {
|
|
|
10198
10203
|
|
|
10199
10204
|
// src/commands/backlog/resolveRewindPlan.ts
|
|
10200
10205
|
function resolveRewindPlan(item) {
|
|
10201
|
-
return
|
|
10206
|
+
return appendReviewPhase(resolvePlan(item));
|
|
10202
10207
|
}
|
|
10203
10208
|
|
|
10204
10209
|
// src/commands/backlog/web/withReviewPhase.ts
|
|
@@ -14831,7 +14836,10 @@ ${issues}`);
|
|
|
14831
14836
|
// src/commands/backlog/propose/proposedItemSchema.ts
|
|
14832
14837
|
import { z as z6 } from "zod";
|
|
14833
14838
|
var proposedPhaseSchema = z6.strictObject({
|
|
14834
|
-
name: z6.string().trim().min(1, "phase name is required")
|
|
14839
|
+
name: z6.string().trim().min(1, "phase name is required").refine(
|
|
14840
|
+
(name) => name.toLowerCase() !== REVIEW_PHASE_NAME.toLowerCase(),
|
|
14841
|
+
`"${REVIEW_PHASE_NAME}" is owned by the runner and appended to every plan automatically \u2014 remove this phase`
|
|
14842
|
+
),
|
|
14835
14843
|
tasks: z6.array(z6.string().trim().min(1)).min(1, "a phase needs at least one task"),
|
|
14836
14844
|
manualChecks: z6.array(z6.string().trim().min(1)).default([])
|
|
14837
14845
|
});
|
|
@@ -14913,6 +14921,15 @@ async function propose(options2) {
|
|
|
14913
14921
|
console.log(chalk82.green(`Added item ${formatItemId(id)}: ${item.name}`));
|
|
14914
14922
|
}
|
|
14915
14923
|
|
|
14924
|
+
// src/commands/backlog/propose/proposeHelpText.ts
|
|
14925
|
+
var proposeHelpText = `The payload is strict JSON: { name, type, description?, acceptanceCriteria?, phases? }.
|
|
14926
|
+
Each phase is { name, tasks, manualChecks? } and needs at least one task.
|
|
14927
|
+
|
|
14928
|
+
The Review phase is owned by the runner and appended to every plan automatically,
|
|
14929
|
+
so it must not be authored: a phase named "Review" is rejected. Do not add a final
|
|
14930
|
+
phase for verifying acceptance criteria, confirming manual checks, committing or
|
|
14931
|
+
marking the item done \u2014 that is what the appended Review phase does.`;
|
|
14932
|
+
|
|
14916
14933
|
// src/commands/backlog/registerItemCommands.ts
|
|
14917
14934
|
function registerItemCommands(cmd) {
|
|
14918
14935
|
cmd.command("list").alias("ls").description("List all backlog items").option(
|
|
@@ -14931,7 +14948,8 @@ function registerItemCommands(cmd) {
|
|
|
14931
14948
|
).option(
|
|
14932
14949
|
"--confirmed",
|
|
14933
14950
|
"Create the item after its draft has been reviewed in chat (agent use outside a web session)"
|
|
14934
|
-
).
|
|
14951
|
+
).addHelpText("after", `
|
|
14952
|
+
${proposeHelpText}`).action(propose);
|
|
14935
14953
|
cmd.command("add-phase <id> <name>").description("Add a phase to an existing backlog item").option("--task <task...>", "Task description (repeatable)").option(
|
|
14936
14954
|
"--manual-check <check...>",
|
|
14937
14955
|
"Manual check description (repeatable)"
|