pi-do-always 0.17.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
- return `${base}\n\n${PLAN_OUTPUT_INSTRUCTION}`;
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
  }
@@ -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
- "End your reply with a machine-readable plan block: a fenced code block tagged plan (```plan) containing JSON of exactly this shape: " +
1569
- '{"summary":"one-line summary","tiers":[{"id":"P0","label":"Critical","items":[{"title":"short action","detail":"where and why (file:line if known)"}]}]}. ' +
1570
- "One tier per priority level, most urgent first (P0, P1, P2, ...). " +
1571
- "Each item must be one concrete, independently doable action. " +
1572
- 'Use an empty "tiers" array when no action is needed.';
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-do-always",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "type": "module",
5
5
  "description": "Pi extension: /do-always — pick a common task by number, it fills your prompt",
6
6
  "author": {