initial commit

This commit is contained in:
pi
2026-04-10 23:12:17 +01:00
commit d64e050fcc
34 changed files with 6954 additions and 0 deletions

20
src/prompts.test.ts Normal file
View File

@@ -0,0 +1,20 @@
import test from "node:test";
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";
const packageRoot = dirname(dirname(fileURLToPath(import.meta.url)));
test("package.json exposes the extension and workflow prompt templates", () => {
const packageJson = JSON.parse(readFileSync(join(packageRoot, "package.json"), "utf8"));
assert.deepEqual(packageJson.pi.extensions, ["./index.ts"]);
assert.deepEqual(packageJson.pi.prompts, ["./prompts/*.md"]);
for (const name of ["implement.md", "scout-and-plan.md", "implement-and-review.md"]) {
const content = readFileSync(join(packageRoot, "prompts", name), "utf8");
assert.match(content, /^---\ndescription:/m);
assert.match(content, /subagent/);
}
});