|
1 | 1 | import { describe, expect, test } from "bun:test"; |
2 | | -import { implementPackage } from "./package.js"; |
| 2 | +import { buildDirectorPackage } from "./package.js"; |
3 | 3 |
|
4 | | -describe("implementPackage", () => { |
| 4 | +describe("buildDirectorPackage", () => { |
5 | 5 | test("id matches directory / registry id", () => { |
6 | | - expect(implementPackage.id).toBe("implement"); |
| 6 | + expect(buildDirectorPackage.id).toBe("build"); |
7 | 7 | }); |
8 | 8 |
|
9 | 9 | test("systemPrompt is non-empty and not a Placeholder", () => { |
10 | | - expect(implementPackage.systemPrompt.length).toBeGreaterThan(0); |
11 | | - expect(implementPackage.systemPrompt.startsWith("Placeholder")).toBe(false); |
| 10 | + expect(buildDirectorPackage.systemPrompt.length).toBeGreaterThan(0); |
| 11 | + expect(buildDirectorPackage.systemPrompt.startsWith("Placeholder")).toBe(false); |
12 | 12 | }); |
13 | 13 |
|
14 | 14 | test("systemPrompt mentions PRIMARY INTENT", () => { |
15 | | - expect(implementPackage.systemPrompt).toContain("PRIMARY INTENT"); |
| 15 | + expect(buildDirectorPackage.systemPrompt).toContain("PRIMARY INTENT"); |
16 | 16 | }); |
17 | 17 |
|
18 | 18 | test("spawn.maySpawn is false (leaf)", () => { |
19 | | - expect(implementPackage.spawn.maySpawn).toBe(false); |
| 19 | + expect(buildDirectorPackage.spawn.maySpawn).toBe(false); |
20 | 20 | }); |
21 | 21 |
|
22 | 22 | test("tools.allow includes product write tools", () => { |
23 | | - const allow = implementPackage.tools?.allow ?? []; |
| 23 | + const allow = buildDirectorPackage.tools?.allow ?? []; |
24 | 24 | expect(allow).toContain("write_file"); |
25 | 25 | expect(allow).toContain("edit_file"); |
26 | 26 | expect(allow).toContain("delete_file"); |
27 | 27 | }); |
28 | 28 |
|
29 | 29 | test("report.requiredSections includes Summary, Findings, Blockers, Paths", () => { |
30 | | - const sections = implementPackage.report.requiredSections; |
| 30 | + const sections = buildDirectorPackage.report.requiredSections; |
31 | 31 | expect(sections).toContain("Summary"); |
32 | 32 | expect(sections).toContain("Findings"); |
33 | 33 | expect(sections).toContain("Blockers"); |
34 | 34 | expect(sections).toContain("Paths"); |
35 | 35 | }); |
36 | 36 |
|
37 | 37 | test("modelRole is implement", () => { |
38 | | - expect(implementPackage.modelRole).toBe("implement"); |
| 38 | + expect(buildDirectorPackage.modelRole).toBe("implement"); |
39 | 39 | }); |
40 | 40 |
|
41 | 41 | test("optionalSkills order is style, philosophy, typescript", () => { |
42 | | - expect(implementPackage.optionalSkills).toEqual(["style", "philosophy", "typescript"]); |
| 42 | + expect(buildDirectorPackage.optionalSkills).toEqual(["style", "philosophy", "typescript"]); |
43 | 43 | }); |
44 | 44 |
|
45 | 45 | test("systemPrompt has DONE GATE for success_criteria", () => { |
46 | | - const prompt = implementPackage.systemPrompt; |
| 46 | + const prompt = buildDirectorPackage.systemPrompt; |
47 | 47 | expect(prompt).toContain("DONE GATE"); |
48 | 48 | expect(prompt).toContain("success_criteria"); |
49 | 49 | expect(prompt).toMatch(/[Ss]top when/); |
50 | 50 | }); |
51 | 51 |
|
52 | 52 | test("systemPrompt has VERIFY language", () => { |
53 | | - const prompt = implementPackage.systemPrompt; |
| 53 | + const prompt = buildDirectorPackage.systemPrompt; |
54 | 54 | expect(prompt).toContain("VERIFY"); |
55 | 55 | expect(prompt).toMatch(/typecheck|tests/); |
56 | 56 | expect(prompt).toContain("Blockers"); |
57 | 57 | }); |
58 | 58 |
|
59 | 59 | test("systemPrompt has REPORT MAP for criteria and Paths", () => { |
60 | | - const prompt = implementPackage.systemPrompt; |
| 60 | + const prompt = buildDirectorPackage.systemPrompt; |
61 | 61 | expect(prompt).toContain("REPORT MAP"); |
62 | 62 | expect(prompt).toMatch(/success_criteria.*pass|fail|blocked/s); |
63 | 63 | expect(prompt).toMatch(/Paths must list files touched/); |
64 | 64 | }); |
65 | 65 |
|
66 | 66 | test("systemPrompt has API CONTRACT for sync/async preservation", () => { |
67 | | - const prompt = implementPackage.systemPrompt; |
| 67 | + const prompt = buildDirectorPackage.systemPrompt; |
68 | 68 | expect(prompt).toContain("API CONTRACT"); |
69 | 69 | expect(prompt).toMatch(/sync/i); |
70 | 70 | expect(prompt).toMatch(/Promise|async/); |
|
0 commit comments