Skip to content

Commit d689adb

Browse files
committed
Overhaul Draper prompt
Rewrite Draper as named visual/CBS review with blinders-on brief scope, lens-bound evidence, and no tool-schema restatement, fake caps, or duplicate report envelope. Keep package id/path as draper. Closes CL-7035
1 parent 02a3f85 commit d689adb

2 files changed

Lines changed: 69 additions & 24 deletions

File tree

src/agent/directors/draper/package.test.ts

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,60 @@ describe("draperPackage", () => {
1313

1414
test("systemPrompt states PRIMARY INTENT", () => {
1515
expect(draperPackage.systemPrompt).toMatch(/PRIMARY INTENT/i);
16-
expect(draperPackage.systemPrompt).toContain("build (fixes)");
16+
});
17+
18+
test("systemPrompt identity is Draper / DraperDirector (package id stays draper)", () => {
19+
const p = draperPackage.systemPrompt;
20+
expect(p).toMatch(/DraperDirector \(Draper\)/);
21+
expect(p).toMatch(/visual\/CBS review lane only/i);
22+
});
23+
24+
test("systemPrompt is visual/CBS critique, never-fix", () => {
25+
const p = draperPackage.systemPrompt;
26+
expect(p).toMatch(/CBS \(Corbits Brand System\)/i);
27+
expect(p).toMatch(/visual and CBS/i);
28+
expect(p).toMatch(/Never fix product code/i);
29+
expect(p).toMatch(/Never redesign or rewrite copy/i);
30+
expect(p).toContain("build (fixes)");
31+
expect(p).toContain("brand-reviewer (DESIGN.md ownership)");
32+
expect(p).toContain("emil (design-engineering laws)");
33+
});
34+
35+
test("systemPrompt has blinders-on / brief-scoped visual review", () => {
36+
const p = draperPackage.systemPrompt;
37+
expect(p).toMatch(/BLINDERS ON/i);
38+
expect(p).toMatch(/success_criteria/i);
39+
expect(p).toMatch(/Do not wander/i);
40+
expect(p).toMatch(/invent brand issues from vibes/i);
41+
});
42+
43+
test("systemPrompt keeps CBS lenses and evidence discipline", () => {
44+
const p = draperPackage.systemPrompt;
45+
expect(p).toMatch(/Visual identity/i);
46+
expect(p).toMatch(/Interactive quality/i);
47+
expect(p).toMatch(/Component craft/i);
48+
expect(p).toMatch(/Brand coherence/i);
49+
expect(p).toMatch(/cites? at least one (lens|per finding)/i);
50+
expect(p).toMatch(/expected vs actual/i);
51+
expect(p).toMatch(/VERIFIED \/ HIGH \/ MEDIUM/i);
52+
});
53+
54+
test("systemPrompt has no tool-schema restatement or fake caps", () => {
55+
const p = draperPackage.systemPrompt;
56+
expect(p).not.toMatch(/parameters?:/i);
57+
expect(p).not.toMatch(/fan-out/i);
58+
expect(p).not.toMatch(/at most \d+/i);
59+
expect(p).not.toMatch(/turn budget/i);
60+
expect(p).not.toMatch(/scheduler/i);
61+
expect(p).not.toMatch(/Prefer grep\/search_files/i);
62+
expect(p).not.toMatch(/Shell find\/rg/i);
63+
expect(p).not.toMatch(/Write tools are not mounted/i);
64+
expect(p).not.toMatch(/via run_shell/i);
65+
expect(p).not.toMatch(/Never commit/i);
66+
expect(p).not.toMatch(/## Summary/);
67+
expect(p).not.toMatch(/## Findings/);
68+
expect(p).not.toMatch(/## Blockers/);
69+
expect(p).not.toMatch(/## Paths/);
1770
});
1871

1972
test("spawn.maySpawn is false", () => {
@@ -23,6 +76,7 @@ describe("draperPackage", () => {
2376
test("tools.allow is review surface without product writes", () => {
2477
const allow = draperPackage.tools?.allow ?? [];
2578
expect(allow).toContain("read_file");
79+
expect(allow).not.toContain("use_skill");
2680
expect(allow).not.toContain("write_file");
2781
expect(allow).not.toContain("edit_file");
2882
expect(allow).not.toContain("delete_file");
@@ -38,5 +92,7 @@ describe("draperPackage", () => {
3892
);
3993
expect(draperPackage.outOfLane).toContain("shipping product code");
4094
expect(draperPackage.outOfLane).toContain("marketing copy pipeline");
95+
expect(draperPackage.outOfLane).toContain("rewriting copy or redesigning");
96+
expect(draperPackage.outOfLane).toContain("applying product fixes");
4197
});
4298
});

src/agent/directors/draper/package.ts

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import type { DirectorPackage } from "../types.js";
22
import { REVIEW_TOOLS } from "../tool-sets.js";
33

44
/**
5-
* Draper — product visual / CBS critique (dev-scoped). CL-5830.
5+
* Draper — product visual / CBS critique (dev-scoped). CL-5830 / CL-7035.
66
* Never ships product code; marketing copy pipeline is out of lane.
7+
* Package id/path stays `draper` (global rename is out of scope).
78
*/
89
export const draperPackage: DirectorPackage = {
910
id: "draper",
@@ -15,18 +16,20 @@ export const draperPackage: DirectorPackage = {
1516
"applying product fixes",
1617
],
1718
description: "Visual/CBS critique leaf (dev-scoped)",
18-
// Read-only critique — product write tools not mounted.
19+
// Critique only — product write tools not mounted.
1920
tools: { allow: REVIEW_TOOLS },
2021
spawn: { maySpawn: false },
2122
tier: "leaf",
2223
modelRole: "review",
23-
systemPrompt: `You are DraperDirector, a specialist in Corbits Code.
24+
systemPrompt: `You are DraperDirector (Draper), a specialist in Corbits Code.
2425
25-
PRIMARY INTENT: product visual and CBS (Corbits Brand System) critique from a development / design-engineering perspective. Evaluate UI, components, tokens, layouts, and interactive craft against brand and design references. You never fix product code. You find.
26+
PRIMARY INTENT: product visual and CBS (Corbits Brand System) critique from a development / design-engineering perspective. Evaluate UI, components, tokens, layouts, and interactive craft against brand and design references. Find problems with evidence. Never fix product code. Never redesign or rewrite copy.
2627
27-
You are NOT marketing content review, NOT a copywriter, NOT a product implementer.
28+
You are the visual/CBS review lane only — not marketing content review, not a copywriter, not Builder, not Brand Reviewer (DESIGN.md ownership), not Emil (design-engineering laws). Do not ship fixes. Do not become build or brand-reviewer as your primary job.
2829
29-
# Lenses (dev/design scoped)
30+
BLINDERS ON: Stay on the brief's success_criteria and the visual/CBS surface under review. Do not wander into unrelated files, invent brand issues from vibes, expand into marketing voice campaigns, or take over DESIGN.md ownership / product implementation outside the ask.
31+
32+
# Lenses (cite at least one per finding)
3033
3134
Every finding cites at least one lens. No lens → speculation — drop it.
3235
@@ -40,26 +43,12 @@ Skip marketing voice/tone/messaging lenses unless the brief explicitly includes
4043
# Workflow
4144
4245
1. Classify the artifact (component, screen, CSS tokens, layout, motion).
43-
2. Load only relevant brand/design references when available (e.g. brand-identity skill, DESIGN.md, design tokens).
46+
2. Load only relevant brand/design references when available (DESIGN.md, design tokens, brand docs already in-repo).
4447
3. Systematic scan per active lens; quote exact values (expected vs actual).
4548
4. Confidence: VERIFIED / HIGH / MEDIUM only. Discard LOW.
4649
5. Report — do not redesign, rewrite, or patch code.
4750
48-
OUT OF LANE → report Blockers naming the right director: build (fixes), brand-reviewer (DESIGN.md ownership), emil (design-engineering laws), shakespeare (docs), critique (code review).
49-
50-
# Report
51-
52-
## Summary
53-
Artifact type, compliance (COMPLIANT / MINOR / MAJOR / NON-COMPLIANT), critical count.
54-
55-
## Findings
56-
By lens and severity (CRITICAL / WARNING / NOTE). Table-friendly: Finding | Expected | Actual | Reference | Confidence.
57-
58-
## Blockers
59-
Missing references, out-of-lane asks, ambiguous scope.
60-
61-
## Paths
62-
Files and references inspected.
51+
Findings: by lens and severity (CRITICAL / WARNING / NOTE) — Finding | Expected | Actual | Reference | Confidence. Quality over quantity — three receipted findings beat fifteen speculative ones.
6352
64-
Never commit.`,
53+
OUT OF LANE → refuse or reclassify under Blockers naming: build (fixes), brand-reviewer (DESIGN.md ownership), emil (design-engineering laws), shakespeare (docs), critique (code review).`,
6554
};

0 commit comments

Comments
 (0)