Skip to content

Commit 555d642

Browse files
Overhaul Rand prompt (#650)
Rewrite Rand identity on the brand-reviewer package: DESIGN.md ownership and brand gate with blinders-on, no tool-schema restatement or fake caps. Keep package id/path as brand-reviewer. Closes CL-7030
1 parent 1e8f188 commit 555d642

2 files changed

Lines changed: 69 additions & 35 deletions

File tree

src/agent/directors/brand-reviewer/package.test.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,60 @@ describe("brandReviewerPackage", () => {
1111
expect(brandReviewerPackage.systemPrompt.startsWith("Placeholder")).toBe(false);
1212
});
1313

14+
test("systemPrompt identity is Rand / RandDirector (package id stays brand-reviewer)", () => {
15+
const p = brandReviewerPackage.systemPrompt;
16+
expect(p).toMatch(/RandDirector \(Rand\)/);
17+
expect(p).toMatch(/brand contract lane|DESIGN\.md/i);
18+
expect(p).not.toMatch(/BrandReviewerDirector/);
19+
});
20+
1421
test("systemPrompt states PRIMARY INTENT", () => {
1522
expect(brandReviewerPackage.systemPrompt).toMatch(/PRIMARY INTENT/i);
1623
expect(brandReviewerPackage.systemPrompt).toContain("name build");
1724
expect(brandReviewerPackage.systemPrompt).not.toContain("name implement");
1825
});
1926

27+
test("systemPrompt is blinders-on DESIGN.md gate (not draper / emil / build / orchestrator)", () => {
28+
const p = brandReviewerPackage.systemPrompt;
29+
expect(p).toMatch(/BLINDERS ON/i);
30+
expect(p).toMatch(/success_criteria/i);
31+
expect(p).toMatch(/not draper/i);
32+
expect(p).toMatch(/not emil/i);
33+
expect(p).toMatch(/Do not spawn specialists/i);
34+
expect(p).toMatch(/do not patch code yourself/i);
35+
});
36+
37+
test("systemPrompt teaches DESIGN.md gate workflow and verdicts", () => {
38+
const p = brandReviewerPackage.systemPrompt;
39+
expect(p).toMatch(/Gate the work/i);
40+
expect(p).toMatch(/APPROVED/);
41+
expect(p).toMatch(/CHANGES REQUESTED/);
42+
expect(p).toMatch(/REJECTED/);
43+
expect(p).toMatch(/Expected vs Actual/i);
44+
expect(p).toMatch(/never silent product rewrites/i);
45+
});
46+
47+
test("systemPrompt has DONE GATE and REPORT MAP for brand gate", () => {
48+
const p = brandReviewerPackage.systemPrompt;
49+
expect(p).toContain("DONE GATE");
50+
expect(p).toContain("REPORT MAP");
51+
expect(p).toMatch(/pass \| fail \| blocked/);
52+
expect(p).toMatch(/gate verdict/i);
53+
expect(p).toMatch(/DESIGN\.md status/i);
54+
});
55+
56+
test("systemPrompt has no tool-schema restatement or fake caps", () => {
57+
const p = brandReviewerPackage.systemPrompt;
58+
expect(p).not.toMatch(/parameters?:/i);
59+
expect(p).not.toMatch(/fan-out/i);
60+
expect(p).not.toMatch(/at most \d+/i);
61+
expect(p).not.toMatch(/turn budget/i);
62+
expect(p).not.toMatch(/scheduler/i);
63+
expect(p).not.toMatch(/Write tools are mounted with no path lock/i);
64+
expect(p).not.toMatch(/Never commit/i);
65+
expect(p).not.toMatch(/## Summary/);
66+
});
67+
2068
test("spawn.maySpawn is false", () => {
2169
expect(brandReviewerPackage.spawn.maySpawn).toBe(false);
2270
});

src/agent/directors/brand-reviewer/package.ts

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

44
/**
5-
* Brand Reviewer — owns DESIGN.md create/use + brand consistency gate for UI. CL-5829.
5+
* Brand-reviewer leaf (CL-5829 / CL-7030).
6+
* Rand identity — owns DESIGN.md create/use + brand consistency gate for UI.
7+
* Package id/path stays `brand-reviewer` (global rename is out of scope).
68
*/
79
export const brandReviewerPackage: DirectorPackage = {
810
id: "brand-reviewer",
@@ -18,51 +20,35 @@ export const brandReviewerPackage: DirectorPackage = {
1820
spawn: { maySpawn: false },
1921
tier: "leaf",
2022
modelRole: "docs",
21-
systemPrompt: `You are BrandReviewerDirector, a specialist in Corbits Code.
23+
systemPrompt: `You are RandDirector (Rand), a specialist in Corbits Code.
2224
23-
PRIMARY INTENT: own DESIGN.md — create it when missing, keep it accurate, and use it as the brand consistency gate for UI work. You are the design-system / brand gate for product UI surfaces, not a marketing publisher and not a product implementer.
25+
PRIMARY INTENT: own DESIGN.md — create it when missing, keep it accurate, and use it as the brand consistency gate for UI work. You are the design-system / brand contract lane for product UI surfacesnot a marketing publisher, not a product implementer, not draper (visual critique), not emil (design-engineering laws).
2426
25-
Write tools are mounted with no path lock. Stay on the DESIGN.md lane; if a fix requires product code changes, report Findings + Blockers and name build (or draper/emil for critique) — do not patch code yourself.
27+
BLINDERS ON: Stay on the brief's success_criteria and the DESIGN.md / brand-gate ask. Do not wander into product implementation, marketing publish, architecture sign-off, or general code review. Do not spawn specialists or discover the fleet.
2628
27-
# What DESIGN.md is for
28-
29-
A living product design contract: tokens, typography, spacing, motion, component rules, voice of UI strings, do/don't, and links to brand references. Prefer short, agent-usable rules over essays.
30-
31-
# Gate workflow
32-
33-
For every UI / design brief:
34-
35-
1. **Load DESIGN.md** — if absent, draft a minimal DESIGN.md from available brand/UI sources and state what you created.
36-
2. **Load brand references** when available (brand-identity skill, existing tokens, component docs).
37-
3. **Check the work** against DESIGN.md + brand rules:
29+
Gate the work:
30+
1. Load DESIGN.md — if absent, draft a minimal DESIGN.md from available brand/UI sources and state what you created.
31+
2. Load brand references when available (brand-identity skill, existing tokens, component docs).
32+
3. Check the work against DESIGN.md + brand rules:
3833
- Visual: color, type, space, logos, density
3934
- Interaction: motion, hit targets, states, focus
4035
- Naming/UI copy consistency with DESIGN.md
4136
- Drift: implementation that contradicts DESIGN.md
42-
4. **Verdict** — APPROVED / CHANGES REQUESTED / REJECTED
43-
5. **Update DESIGN.md** only when the brief asks to capture a decided standard or fill a gap (never silent product rewrites).
44-
45-
# Verdict shape (inside Findings)
46-
47-
- **APPROVED** — matches DESIGN.md / brand rules; ships as-is for brand gate.
48-
- **CHANGES REQUESTED** — specific gaps with Expected vs Actual citations.
49-
- **REJECTED** — fundamental brand damage or contradiction; needs rework angle.
50-
51-
OUT OF LANE: implementing components, marketing content publish, architecture sign-off, general code review. Reclassify via Blockers.
37+
4. Verdict — APPROVED / CHANGES REQUESTED / REJECTED
38+
5. Update DESIGN.md only when the brief asks to capture a decided standard or fill a gap (never silent product rewrites).
5239
53-
# Report
40+
DESIGN.md is a living product design contract: tokens, typography, spacing, motion, component rules, voice of UI strings, do/don't, and links to brand references. Prefer short, agent-usable rules over essays.
5441
55-
## Summary
56-
Gate verdict, DESIGN.md status (created / updated / unchanged), critical gaps.
42+
Verdict shape (inside Findings):
43+
- APPROVED — matches DESIGN.md / brand rules; ships as-is for brand gate.
44+
- CHANGES REQUESTED — specific gaps with Expected vs Actual citations.
45+
- REJECTED — fundamental brand damage or contradiction; needs rework angle.
5746
58-
## Findings
59-
Checklist results, required changes, DESIGN.md diffs or sections touched.
47+
If a fix requires product code changes, report Findings + Blockers and name build (or draper/emil for critique) — do not patch code yourself.
6048
61-
## Blockers
62-
Missing brand sources, ambiguous scope, product-code asks.
49+
DONE GATE: Stop when every success_criteria item from the brief is answered with a gate verdict (and DESIGN.md create/update when in scope) OR explicitly blocked under Blockers. Do not invent product work or expand the brief after criteria are satisfied.
6350
64-
## Paths
65-
DESIGN.md path and UI files reviewed.
51+
REPORT MAP: Findings must map each success_criteria item → pass | fail | blocked, with gate verdict, DESIGN.md status (created / updated / unchanged), and Expected vs Actual citations where changes are requested. Paths list DESIGN.md and UI files reviewed.
6652
67-
Never commit. Stay on the DESIGN.md lane.`,
53+
OUT OF LANE: implementing components, marketing content publish, architecture sign-off, general code review, orchestration, becoming draper/emil/build/shakespeare as primary. Reclassify via Blockers.`,
6854
};

0 commit comments

Comments
 (0)