pi-do-always 0.16.0 → 0.18.0
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.
|
@@ -1033,7 +1033,8 @@ export default function doAlwaysExtension(pi: ExtensionAPI) {
|
|
|
1033
1033
|
const base = renderPrompt(task.prompt, ctx);
|
|
1034
1034
|
const enabled = task.questionnaire ?? questionnaireEnabled;
|
|
1035
1035
|
if (isPlanTask(task) && enabled && !base.includes("```plan")) {
|
|
1036
|
-
|
|
1036
|
+
// Prepend so the LLM sees the instruction first (more reliable in long sessions)
|
|
1037
|
+
return `${PLAN_OUTPUT_INSTRUCTION}\n\n${base}`;
|
|
1037
1038
|
}
|
|
1038
1039
|
return base;
|
|
1039
1040
|
}
|
|
@@ -2979,6 +2980,7 @@ export default function doAlwaysExtension(pi: ExtensionAPI) {
|
|
|
2979
2980
|
{ value: "list", label: "list" },
|
|
2980
2981
|
{ value: "list-details", label: "list-details" },
|
|
2981
2982
|
{ value: "replan", label: "replan" },
|
|
2983
|
+
{ value: "questionnaire", label: "questionnaire (toggle)" },
|
|
2982
2984
|
...visible.map((t, i) => ({ value: t.name, label: `${i + 1}. ${t.name}` })),
|
|
2983
2985
|
].filter((c) => c.value.toLowerCase().includes(p));
|
|
2984
2986
|
return matches.length > 0 ? matches : null;
|
|
@@ -3039,6 +3041,18 @@ export default function doAlwaysExtension(pi: ExtensionAPI) {
|
|
|
3039
3041
|
return;
|
|
3040
3042
|
}
|
|
3041
3043
|
|
|
3044
|
+
// Toggle the questionnaire on/off for the rest of this session.
|
|
3045
|
+
if (arg.toLowerCase() === "questionnaire") {
|
|
3046
|
+
questionnaireEnabled = !questionnaireEnabled;
|
|
3047
|
+
ctx.ui.notify(
|
|
3048
|
+
questionnaireEnabled
|
|
3049
|
+
? "do-always: questionnaire enabled (plan proposals will be offered)"
|
|
3050
|
+
: "do-always: questionnaire disabled (plan proposals will not be offered)",
|
|
3051
|
+
"info",
|
|
3052
|
+
);
|
|
3053
|
+
return;
|
|
3054
|
+
}
|
|
3055
|
+
|
|
3042
3056
|
if (arg.toLowerCase() === "list-details") {
|
|
3043
3057
|
// Display only — the description is metadata; selecting a task injects just its prompt.
|
|
3044
3058
|
// Render with the current context so what is shown is what gets injected.
|
|
@@ -1565,11 +1565,15 @@ export function formatCommitReviewPrompt(commits: SelectedCommit[]): string {
|
|
|
1565
1565
|
* place so every Plan prompt shares the same contract.
|
|
1566
1566
|
*/
|
|
1567
1567
|
export const PLAN_OUTPUT_INSTRUCTION =
|
|
1568
|
-
"
|
|
1569
|
-
|
|
1570
|
-
"
|
|
1571
|
-
"
|
|
1572
|
-
|
|
1568
|
+
"Plan block (required):\n" +
|
|
1569
|
+
"End your reply with a fenced code block tagged plan (\`\`\`plan) containing ONLY the JSON object — nothing else:\n" +
|
|
1570
|
+
'{"summary":"one-line summary","tiers":[{"id":"P0","label":"Critical","items":[{"title":"short action","detail":"where and why (file:line if known)"}]}]}\n' +
|
|
1571
|
+
"Rules:\n" +
|
|
1572
|
+
"- One tier per priority level, most urgent first (P0, P1, P2, …)\n" +
|
|
1573
|
+
"- Each item must be one concrete, independently doable action\n" +
|
|
1574
|
+
"- Use an empty \"tiers\" array when no action is needed\n" +
|
|
1575
|
+
"- The fenced block must contain ONLY the JSON — no explanation, no comments, no text after the closing }\n" +
|
|
1576
|
+
"- The plan block must be the very last thing in your reply\n";
|
|
1573
1577
|
|
|
1574
1578
|
/** One concrete action item proposed by a Plan run. */
|
|
1575
1579
|
export interface PlanItem {
|