This commit is contained in:
Harivansh Rathi 2026-03-09 12:34:45 -07:00
parent 43c6b56dfa
commit bf9bfe38f7
2 changed files with 29 additions and 32 deletions

View file

@ -83,8 +83,8 @@ describe("buildSystemPrompt", () => {
});
});
describe("SOUL.md context", () => {
test("adds persona guidance when SOUL.md is present", () => {
describe("context files", () => {
test("adds soul guidance when SOUL.md is present", () => {
const prompt = buildSystemPrompt({
contextFiles: [
{
@ -95,17 +95,13 @@ describe("buildSystemPrompt", () => {
skills: [],
});
expect(prompt).toContain("SOUL.md** defines your personality and tone");
expect(prompt).toContain("SOUL.md** is who you are");
expect(prompt).toContain("## /tmp/project/SOUL.md");
});
test("adds companion context guidance for tools and bootstrap files", () => {
test("adds bootstrap guidance when BOOTSTRAP.md is present", () => {
const prompt = buildSystemPrompt({
contextFiles: [
{
path: "/home/node/.pi/workspace/TOOLS.md",
content: "# Tools\n\nUse ~/.pi/apps",
},
{
path: "/home/node/.pi/workspace/BOOTSTRAP.md",
content: "# Bootstrap\n\nDo the setup",
@ -114,12 +110,22 @@ describe("buildSystemPrompt", () => {
skills: [],
});
expect(prompt).toContain(
"TOOLS.md** is your environment reference",
);
expect(prompt).toContain(
"BOOTSTRAP.md** is your onboarding checklist",
);
expect(prompt).toContain("BOOTSTRAP.md** has tasks to do first");
});
test("includes file contents in context section", () => {
const prompt = buildSystemPrompt({
contextFiles: [
{
path: "/home/node/.pi/workspace/USER.md",
content: "# User\n\nLikes coffee.",
},
],
skills: [],
});
expect(prompt).toContain("USER.md** is what you know about your user");
expect(prompt).toContain("Likes coffee.");
});
});
});