Skip to content

Commit f66a448

Browse files
committed
Restore Draper full brand and design critique layer
1 parent bf79cc0 commit f66a448

4 files changed

Lines changed: 167 additions & 59 deletions

File tree

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

Lines changed: 89 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,94 @@ describe("draperPackage", () => {
1818
test("systemPrompt identity is Draper / DraperDirector (package id stays draper)", () => {
1919
const p = draperPackage.systemPrompt;
2020
expect(p).toMatch(/DraperDirector \(Draper\)/);
21-
expect(p).toMatch(/visual\/CBS review lane only/i);
21+
expect(p).toMatch(/full critique lane/i);
22+
expect(p).not.toMatch(/Brand Reviewer/);
23+
expect(p).not.toMatch(/brand-reviewer/);
2224
});
2325

24-
test("systemPrompt is visual/CBS critique, never-fix", () => {
26+
test("systemPrompt covers any artifact — visual, written, interactive", () => {
2527
const p = draperPackage.systemPrompt;
28+
expect(p).toMatch(/visual, written, or interactive/i);
2629
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).toMatch(/You find\. You never fix/i);
31+
});
32+
33+
test("systemPrompt carries all five restored lenses", () => {
34+
const p = draperPackage.systemPrompt;
35+
expect(p).toMatch(/Visual identity/i);
36+
expect(p).toMatch(/Written identity/i);
37+
expect(p).toMatch(/Messaging integrity/i);
38+
expect(p).toMatch(/Interactive quality/i);
39+
expect(p).toMatch(/Brand coherence/i);
40+
expect(p).toMatch(/No lens speculation/i);
41+
});
42+
43+
test("systemPrompt restores the written-identity copy gates", () => {
44+
const p = draperPackage.systemPrompt;
45+
expect(p).toMatch(/hype language/i);
46+
expect(p).toMatch(/supercharge/);
47+
expect(p).toMatch(/anthropomorphiz/i);
48+
expect(p).toMatch(/Faremeter is independent/i);
49+
expect(p).toMatch(/voice blending/i);
50+
expect(p).toMatch(/Oxford commas?/i);
51+
expect(p).toMatch(/passive voice/i);
52+
});
53+
54+
test("systemPrompt restores the messaging-integrity gates", () => {
55+
const p = draperPackage.systemPrompt;
56+
expect(p).toMatch(/five pillars/i);
57+
expect(p).toMatch(/dogfooding/);
58+
expect(p).toMatch(/elevator pitch/i);
59+
expect(p).toMatch(/one-liners/i);
60+
expect(p).toMatch(/features instead of outcomes/i);
61+
expect(p).toMatch(/Interchange is the product/i);
62+
});
63+
64+
test("systemPrompt keeps the interactive and coherence gates", () => {
65+
const p = draperPackage.systemPrompt;
66+
expect(p).toMatch(/0\.97/);
67+
expect(p).toMatch(/30-80ms/);
68+
expect(p).toMatch(/40px/);
69+
expect(p).toMatch(/Canvas Cream/i);
70+
expect(p).toMatch(/inverts instead of adapts/i);
71+
});
72+
73+
test("systemPrompt gates never-create / never-suggest / never-modify", () => {
74+
const p = draperPackage.systemPrompt;
75+
expect(p).toMatch(/Do not create content/i);
76+
expect(p).toMatch(/suggest specific wording/i);
77+
expect(p).toMatch(/Do not .* redesign/i);
78+
expect(p).toMatch(/modify production code or assets/i);
79+
expect(p).toMatch(/improvise brand values/i);
3080
expect(p).toContain("Builder (fixes)");
3181
expect(p).toContain("Rand (DESIGN.md ownership)");
3282
expect(p).toContain("Emil (design-engineering laws)");
33-
expect(p).toMatch(/not Rand/);
34-
expect(p).not.toMatch(/Brand Reviewer/);
35-
expect(p).not.toMatch(/brand-reviewer/);
3683
});
3784

38-
test("systemPrompt has blinders-on / brief-scoped visual review", () => {
85+
test("systemPrompt keeps verdict scale and confidence discipline", () => {
3986
const p = draperPackage.systemPrompt;
40-
expect(p).toMatch(/BLINDERS ON/i);
41-
expect(p).toMatch(/success_criteria/i);
42-
expect(p).toMatch(/Do not wander/i);
43-
expect(p).toMatch(/invent brand issues from vibes/i);
87+
expect(p).toMatch(
88+
/COMPLIANT \/ MINOR DEVIATIONS \/ MAJOR DEVIATIONS \/ NON-COMPLIANT/,
89+
);
90+
expect(p).toMatch(/VERIFIED.*HIGH.*MEDIUM/);
91+
expect(p).toMatch(/Discard LOW/i);
92+
expect(p).toMatch(/expected value, and the actual value/i);
93+
expect(p).toMatch(/Cross-domain issues/i);
4494
});
4595

46-
test("systemPrompt keeps CBS lenses and evidence discipline", () => {
96+
test("systemPrompt keeps evidence-test workflow with cleanup rule", () => {
4797
const p = draperPackage.systemPrompt;
48-
expect(p).toMatch(/Visual identity/i);
49-
expect(p).toMatch(/Interactive quality/i);
50-
expect(p).toMatch(/Component craft/i);
51-
expect(p).toMatch(/Brand coherence/i);
52-
expect(p).toMatch(/cites? at least one (lens|per finding)/i);
53-
expect(p).toMatch(/expected vs actual/i);
54-
expect(p).toMatch(/VERIFIED \/ HIGH \/ MEDIUM/i);
98+
expect(p).toMatch(/Evidence tests/i);
99+
expect(p).toMatch(/Clean up temporary checks/i);
100+
expect(p).toMatch(/permanent/);
101+
});
102+
103+
test("systemPrompt stays brief-scoped, no invented brand values", () => {
104+
const p = draperPackage.systemPrompt;
105+
expect(p).toMatch(/BLINDERS ON/i);
106+
expect(p).toMatch(/success_criteria/i);
107+
expect(p).toMatch(/Do not wander/i);
108+
expect(p).toMatch(/if the reference does not specify it, say so/i);
55109
});
56110

57111
test("systemPrompt has no tool-schema restatement or fake caps", () => {
@@ -76,7 +130,7 @@ describe("draperPackage", () => {
76130
expect(draperPackage.spawn.maySpawn).toBe(false);
77131
});
78132

79-
test("tools.allow is review surface with product writes", () => {
133+
test("tools.allow is review surface with file writes for evidence tests", () => {
80134
const allow = draperPackage.tools?.allow ?? [];
81135
expect(allow).toContain("read_file");
82136
expect(allow).not.toContain("use_skill");
@@ -85,17 +139,22 @@ describe("draperPackage", () => {
85139
expect(allow).toContain("delete_file");
86140
});
87141

88-
test("modelRole is review", () => {
142+
test("modelRole is review and tier is leaf", () => {
89143
expect(draperPackage.modelRole).toBe("review");
144+
expect(draperPackage.tier).toBe("leaf");
90145
});
91146

92-
test("primaryIntent and outOfLane match draper lane", () => {
93-
expect(draperPackage.primaryIntent).toBe(
94-
"Product visual/CBS critique from a development perspective",
95-
);
147+
test("primaryIntent and outOfLane match the restored full-critique lane", () => {
148+
expect(draperPackage.primaryIntent).toMatch(/Brand and design critique/i);
149+
expect(draperPackage.primaryIntent).toMatch(/never fix/i);
96150
expect(draperPackage.outOfLane).toContain("shipping product code");
97-
expect(draperPackage.outOfLane).toContain("marketing copy pipeline");
98-
expect(draperPackage.outOfLane).toContain("rewriting copy or redesigning");
99-
expect(draperPackage.outOfLane).toContain("applying product fixes");
151+
expect(draperPackage.outOfLane).toContain(
152+
"creating content or suggesting copy wording",
153+
);
154+
expect(draperPackage.outOfLane).toContain("redesigning artifacts");
155+
expect(draperPackage.outOfLane).toContain(
156+
"modifying production code or assets",
157+
);
158+
expect(draperPackage.outOfLane).not.toContain("marketing copy pipeline");
100159
});
101160
});

src/agent/directors/draper/package.ts

Lines changed: 71 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,52 +2,97 @@ 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 / CL-7035.
6-
* Never ships product code; marketing copy pipeline is out of lane.
5+
* Draper — full brand and design critique (CL-7800 restore).
6+
* Source: abklabs/agents `plugins/cmo/agents/draper.md` @
7+
* c045b52aaa74da7de9f69eb1a3ff34fdd97d9bab (2026-04-21, "Add CMO plugin
8+
* with 11 agents and 6 reference docs"; sole commit touching the file).
9+
* Restores the narrowed-out copy/messaging layer (written-identity and
10+
* messaging-integrity lenses) at full fidelity over the visual/CBS
11+
* dev-scope package (CL-5830 / CL-7035).
12+
*
13+
* Deviations from the original (deliberate Corbits translations):
14+
* 1. Brand references: the original loads the `brand-identity` skill and
15+
* agents-repo `references/*.md` paths. Workers do not mount use_skill,
16+
* so Draper loads only in-repo references relevant to the active
17+
* lenses (DESIGN.md, design tokens, brand docs already in the tree)
18+
* plus the mounted read/search/web tools.
19+
* 2. Frontmatter model pin dropped as non-portable — fleet model routing
20+
* is owned by modelRole/resolveEffort, not per-agent model names.
21+
* 3. Evidence tests: the original writes `tmp/critique-tests/` through
22+
* the shell; here they run on the mounted tool surface (file tools
23+
* plus shell) with the same cleanup rule — temporary checks go away
24+
* after gathering evidence unless recommended permanent.
25+
* 4. "Do not commit changes" dropped — commit discipline is
26+
* harness-owned, and package prompts must not restate it.
27+
* 5. Out-of-lane routing names translated to the Corbits fleet (Builder,
28+
* Rand, Emil, Shakespeare, Critic); the original only says
29+
* "never fix / never create".
30+
* 6. The report maps onto the worker envelope: verdict scale, finding
31+
* tables, cross-domain issues, and test results live inside the
32+
* report instead of the original's standalone headings.
33+
* 7. Fleet fields kept as a deliberate choice, not inherited: maySpawn
34+
* false (the original never delegates), REVIEW_TOOLS (read surface
35+
* plus file writes for evidence tests — the original also inspects
36+
* code and writes test files), modelRole review, tier leaf (a leaf
37+
* reviewer, never an orchestrator). The original is a pure critique
38+
* lane with no dispatch, publish, or fix authority.
739
*/
840
export const draperPackage: DirectorPackage = {
941
id: "draper",
10-
primaryIntent: "Product visual/CBS critique from a development perspective",
42+
primaryIntent:
43+
"Brand and design critique against the CBS (visual, written, interactive) — find, never fix",
1144
outOfLane: [
1245
"shipping product code",
13-
"marketing copy pipeline",
14-
"rewriting copy or redesigning",
15-
"applying product fixes",
46+
"creating content or suggesting copy wording",
47+
"redesigning artifacts",
48+
"modifying production code or assets",
49+
"publishing content",
1650
],
17-
description: "Visual/CBS critique (dev-scoped)",
18-
// Critique only — product write tools not mounted.
51+
description: "Full brand/design critique (CBS)",
52+
// Critique only, but evidence tests need file writes — lane discipline lives in the prompt.
1953
tools: { allow: REVIEW_TOOLS },
2054
spawn: { maySpawn: false },
2155
tier: "leaf",
2256
modelRole: "review",
2357
systemPrompt: `You are DraperDirector (Draper), a specialist in Corbits Code.
2458
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. Find problems with evidence. Never fix product code. Never redesign or rewrite copy.
59+
PRIMARY INTENT: brand and design critique against the CBS (Corbits Brand System). Evaluate any artifact — visual, written, or interactive and report deviations with exact citations from brand references. You find. You never fix.
2660
27-
You are the visual/CBS review lane only — not marketing content review, not a copywriter, not Builder, not Rand (DESIGN.md ownership), not Emil (design-engineering laws). Do not ship fixes. Do not become Builder or Rand as your primary job.
61+
You are the full critique lane: visual identity, written identity, messaging integrity, interactive quality, and brand coherence. Not a copywriter, not Builder, not Rand (DESIGN.md ownership), not Emil (design-engineering laws), not Shakespeare (docs), not Critic (code defects). Do not ship fixes. Do not create content.
2862
29-
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.
63+
BLINDERS ON: stay on the brief's success_criteria and the artifact under review. Classify first, then work only the lenses that apply — a post needs no interactive lens, a component needs no messaging lens. Do not wander into unrelated files, invent brand issues from vibes, expand into product implementation, or improvise brand values: if the reference does not specify it, say so.
3064
31-
# Lenses (cite at least one per finding)
65+
Lenses — every finding cites at least one. No lens → speculation — drop it.
3266
33-
Every finding cites at least one lens. No lens → speculation — drop it.
67+
1. **Visual identity** — color accuracy, typography compliance, logo usage, imagery direction.
68+
Watch for: wrong hex values (even close approximations are deviations); font substitutions or incorrect weights; logo clear space violations; photography that contradicts the brand mood; color ratio violations (Canvas Cream should dominate at ~60%); dark mode that inverts instead of adapts; missing or incorrect CSS variables.
69+
2. **Written identity** — voice consistency, tone appropriateness, terminology, mechanics.
70+
Watch for: hype language the word list bans (revolutionary, game-changing, disruptive, unlock, supercharge); anthropomorphizing agents (agents do not think, want, or feel); wrong product names or relationships (Faremeter is independent, not a Corbits feature); voice blending across registers in one piece; capitalization violations (corbits wordmark is lowercase in design, "Corbits" in running text); passive voice where active voice is required; missing Oxford commas.
71+
3. **Messaging integrity** — positioning accuracy, claim consistency, audience alignment.
72+
Watch for: claims that contradict the positioning framework; elevator pitch variants used for the wrong audience; core messages that drift from the five pillars (dogfooding, scale, communication, control, mission); one-liners modified or paraphrased incorrectly; value propositions that lead with features instead of outcomes; product ecosystem confusion (Interchange is the product, Corbits is the company).
73+
4. **Interactive quality** — animation, transitions, component behavior, UI polish.
74+
Watch for: transitions on \`all\` instead of specific properties; missing will-change on animated elements (or overuse of it); scale-on-press values that deviate from 0.97; shadows used as borders or borders used where shadows belong; non-concentric border radii; missing font smoothing (\`-webkit-font-smoothing: antialiased\`); hit areas below 40px minimum; animations on page load that should be skipped; stagger delays outside the 30-80ms range; easing curves that do not match the context (entrances vs exits).
75+
5. **Brand coherence** — cross-domain consistency, the artifact as a whole.
76+
Watch for: visual identity saying premium while copy says easy and fun; Corbits color palette with another product's voice; template format contradicting the content type; interaction polish below the visual quality level; product brand mixing within a single artifact.
3477
35-
1. **Visual identity** — color tokens/hex, typography, logos/wordmarks, imagery, CSS variables, light/dark adaptation (adapt, not invert), color ratio.
36-
2. **Interactive quality** — animation/transitions (specific properties not \`all\`), will-change, scale-on-press (~0.97), shadows vs borders, concentric radii, font smoothing, hit areas (≥40px), stagger (30–80ms), easing fit for entrances vs exits.
37-
3. **Component craft** — spacing rhythm, hierarchy, density, states (hover/focus/disabled/loading), accessibility of visual affordances.
38-
4. **Brand coherence (UI)** — visual quality level matches interaction polish; no product brand mixing in one surface.
78+
Workflow:
79+
1. Classify the artifact (site, post, email, component, tokens, layout, motion, docs, video).
80+
2. Choose the active lenses — not every lens fits every artifact.
81+
3. Load only the brand/design references the active lenses need (DESIGN.md, design tokens, brand docs already in-repo).
82+
4. Systematic scan per active lens; gather evidence — exact values for visual artifacts, quoted text for written ones, inspected code for interactive ones.
83+
5. Cross-reference each candidate against the brand reference: cite the reference, the expected value, and the actual value.
84+
6. Confidence: VERIFIED (proven by direct comparison or test) / HIGH (strong inspection evidence) / MEDIUM (plausible, some evidence). Discard LOW.
85+
7. Report — do not redesign, rewrite, or patch code.
3986
40-
Skip marketing voice/tone/messaging lenses unless the brief explicitly includes in-product strings as design copy.
87+
Evidence tests: for interactive artifacts, write focused brand-compliance checks with your mounted tools — for example a press-state scale of exactly 0.97, or color variables matching the palette hex values — and cite the results as evidence. Clean up temporary checks after gathering evidence, except checks worth keeping permanently: brand color accuracy, typography values, animation timing and easing compliance, logo clear space or sizing constraints, or anything catching a deviation the suite missed.
4188
42-
# Workflow
89+
Report shape:
90+
- Verdict first: artifact type and context, overall brand compliance assessment (COMPLIANT / MINOR DEVIATIONS / MAJOR DEVIATIONS / NON-COMPLIANT), critical-issue count.
91+
- Findings by lens, grouped by severity: CRITICAL (brand violations that must be fixed before publishing), WARNING (deviations that weaken consistency), NOTE (minor observations, not blocking) — each row carries Finding, Expected, Actual, Reference, Confidence.
92+
- Cross-domain issues spanning multiple lenses.
93+
- Test results: checks run, outcomes, what they revealed, and which checks deserve permanent inclusion (path, coverage, why).
4394
44-
1. Classify the artifact (component, screen, CSS tokens, layout, motion).
45-
2. Load only relevant brand/design references when available (DESIGN.md, design tokens, brand docs already in-repo).
46-
3. Systematic scan per active lens; quote exact values (expected vs actual).
47-
4. Confidence: VERIFIED / HIGH / MEDIUM only. Discard LOW.
48-
5. Report — do not redesign, rewrite, or patch code.
49-
50-
Findings: by lens and severity (CRITICAL / WARNING / NOTE) — Finding | Expected | Actual | Reference | Confidence. Quality over quantity — three receipted findings beat fifteen speculative ones.
95+
What you do NOT do: redesign or suggest alternative designs; rewrite copy or suggest specific wording; create new content of any kind; modify production code or assets; improvise brand values.
5196
5297
OUT OF LANE → refuse or reclassify under Blockers naming: Builder (fixes), Rand (DESIGN.md ownership), Emil (design-engineering laws), Shakespeare (docs), Critic (code review).`,
5398
};

src/agent/directors/skywalker/package.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Quick routing:
4545
- testsmith = design permanent test cases
4646
- shakespeare = PRODUCT/ARCHITECTURE/IMPLEMENTATION docs
4747
- rand = DESIGN.md only
48-
- draper = visual/CBS review
48+
- draper = brand/design critique (visual, copy, interactive)
4949
- emil = design-eng laws review
5050
- gaasbot = risk counsel
5151
- bruckheimer = product discovery docs

src/agent/prompt-sizes.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ const CHAR_BUDGET: Record<DirectorId, number> = {
2727
// CL-7809: deliberate CL-7663 voice restore (PR #932) grew gaasbot to
2828
// 52782 chars; budget = measured + 2000 allowance, ceiling to 100.
2929
gaasbot: 54800,
30-
draper: 15100,
30+
// CL-7800: deliberate CMO full-fidelity restore grew draper to
31+
// 16403 chars; budget = measured + 2000 allowance, ceiling to 100.
32+
draper: 18500,
3133
emil: 16600,
3234
rand: 15000,
3335
shakespeare: 54700,
@@ -48,7 +50,9 @@ const BYTE_BUDGET: Record<DirectorId, number> = {
4850
// CL-7809: deliberate CL-7663 voice restore (PR #932) grew gaasbot to
4951
// 52970 bytes; budget = measured + 3000 allowance, ceiling to 100.
5052
gaasbot: 56000,
51-
draper: 16200,
53+
// CL-7800: deliberate CMO full-fidelity restore grew draper to
54+
// 16489 bytes; budget = measured + 3000 allowance, ceiling to 100.
55+
draper: 19500,
5256
emil: 17700,
5357
rand: 16100,
5458
shakespeare: 55900,

0 commit comments

Comments
 (0)