Files
oh-my-pi/packages/coding-agent/test/plan-mode/plan-mode-approved-prompt.test.ts
T
can1357 a21a542afd refactor(prompt-templates): migrated prompt utilities to pi-utils package
- Extracted prompt rendering and formatting utilities from coding-agent to centralized pi-utils package with new API surface (prompt.render, prompt.format, prompt.registerHelper).
- Migrated parseFrontmatter utility from coding-agent to pi-utils package; updated 8 files to import from @oh-my-pi/pi-utils.
- Removed 170-line prompt-format.ts module and consolidated 192 lines of Handlebars helper registrations into pi-utils prompt module.
- Updated 60+ files across coding-agent and typescript-edit-benchmark to use new prompt.render() and prompt.format() API from pi-utils.
- Simplified prompt-templates.ts by delegating core functionality to pi-utils while retaining custom helper registrations (jtdToTypeScript, jsonStringify, etc.).
2026-04-08 05:47:35 +02:00

17 lines
565 B
TypeScript

import { describe, expect, it } from "bun:test";
import planModeApprovedPrompt from "@oh-my-pi/pi-coding-agent/prompts/system/plan-mode-approved.md" with {
type: "text",
};
import { prompt } from "@oh-my-pi/pi-utils";
describe("plan-mode-approved prompt", () => {
it("includes final plan artifact path in injected execution prompt", () => {
const rendered = prompt.render(planModeApprovedPrompt, {
planContent: "1. Do work",
finalPlanFilePath: "local://WP_MIGRATION_PLAN.md",
});
expect(rendered).toContain("local://WP_MIGRATION_PLAN.md");
});
});