You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5348d27
Browse filesBrowse the repository at this point in the historyBrowse files
Update ad generation logic to support company and product concepts. Adjusted the ad run structure to include a minimum of three company ads followed by one to three product ads. Enhanced documentation to reflect changes in ad generation, including updates to the README and context definitions. Updated package dependencies for improved functionality.
Branda turns one Brand domain into a fixed Ad Run of on-brand images. This glossary names the planning, rendering, and Gallery concepts shared by the browser and server modules.
3
+
Branda turns one Brand domain into a bounded Ad Run of on-brand company and Product images. This glossary names the planning, rendering, and Gallery concepts shared by the browser and server modules.
4
4
5
5
## Language
6
6
7
7
**Brand**:
8
8
The organization or product whose public site supplies the identity and source material for an Ad Run.
9
9
10
10
**Brief**:
11
-
The normalized Brand facts and descriptive visual attributes used throughout one Ad Run.
11
+
The normalized Brand facts and descriptive visual attributes used throughout one Ad Run. Its palette comes from the extracted styleguide, and its font family is present only when the styleguide identifies a referenced Google Font.
12
12
_Avoid_: Prompt, brand data
13
13
14
+
**Product**:
15
+
A distinct offering fact-grounded in the Brand's public site. Products are extracted through Context.dev `web.extract` using JSON Schema generated from a Zod schema.
16
+
_Avoid_: Invented offering, generic product
17
+
14
18
**Creative Direction**:
15
19
A named visual treatment with a dedicated prompt implementation.
16
20
_Avoid_: Style, template
17
21
18
22
**Planned Concept**:
19
-
One Creative Direction paired with Brand-grounded copy and an Image Model for an Ad Slot.
23
+
One Creative Direction paired with fact-grounded copy, a company-or-Product subject, and an Image Model for an Ad Slot.
20
24
_Avoid_: Creative Direction
21
25
26
+
**Company Planned Concept**:
27
+
A Planned Concept whose subject is the Brand as a company.
28
+
29
+
**Product Planned Concept**:
30
+
A Planned Concept whose subject is one extracted Product.
31
+
22
32
**Ad Run**:
23
-
A set of exactly six Planned Concepts generated together from one Brief.
33
+
An ordered set of four to six Planned Concepts generated together from one Brief: exactly three Company Planned Concepts followed by one to three Product Planned Concepts for distinct Products.
24
34
_Avoid_: Campaign, batch
25
35
26
36
**Ad Slot**:
@@ -35,21 +45,25 @@ A catalogued image generator with a placement tier and declared raster-logo capa
35
45
_Avoid_: Provider
36
46
37
47
**Gallery**:
38
-
The browser view of an Ad Run and the current state of its six Ad Slots.
48
+
The browser view of an Ad Run and the current state of its four to six Ad Slots.
39
49
40
50
## Relationships
41
51
42
-
- A **Brand** supplies exactly one **Brief** for an **Ad Run**.
43
-
- An **Ad Run** contains exactly six distinct **Planned Concepts**.
52
+
- A **Brand** supplies exactly one **Brief** and one to three distinct extracted **Products** for an **Ad Run**.
53
+
- An **Ad Run** contains exactly three **Company Planned Concepts** followed by one to three **Product Planned Concepts**.
54
+
- Each **Product Planned Concept** targets a different extracted **Product**.
44
55
- A **Planned Concept** selects exactly one **Creative Direction** and one **Image Model**.
56
+
- Every **Planned Concept** in an **Ad Run** uses a distinct **Creative Direction** and **Image Model**.
57
+
- The three **Company Planned Concepts** use the three primary **Image Models**; the **Product Planned Concepts** use one to three secondary **Image Models**.
45
58
- Each **Planned Concept** owns exactly one **Ad Slot**.
46
59
- An **Ad Slot** may produce one **Rendered Ad** at a time.
47
60
- A **Gallery** presents exactly one active **Ad Run**.
48
61
49
62
## Module map
50
63
51
-
-`src/lib/ad-run-policy.ts` owns the fixed Ad Run size and shared field limits.
64
+
-`src/lib/ad-run-policy.ts` owns Ad Run composition, ordering, and shared field limits.
52
65
-`src/lib/ad-run.ts` owns Ad Run validation and canonical HTTP codecs.
66
+
-`src/lib/context.ts` owns Context.dev Brand/styleguide research and fact-grounded Product extraction through `web.extract` and a Zod-derived JSON Schema.
53
67
-`src/lib/generate/planner.ts` owns Brand research policy and produces validated Ad Runs.
54
68
-`src/lib/generate/renderer.ts` owns Image Model retry and raster-logo downgrade behavior.
55
69
-`src/lib/public-raster.ts` owns DNS-pinned loading of untrusted public raster URLs.
@@ -58,9 +72,10 @@ The browser view of an Ad Run and the current state of its six Ad Slots.
58
72
## Example dialogue
59
73
60
74
> **Dev:** "Can two Ad Slots in an Ad Run use the same Creative Direction?"
61
-
> **Domain expert:** "No. Every Planned Concept uses a distinct Creative Direction and Image Model, although a failed Ad Slot may retry its same plan."
75
+
> **Domain expert:** "No. Every Planned Concept uses a distinct Creative Direction and Image Model. The first three advertise the company with primary models; the remaining one to three each advertise a distinct extracted Product with secondary models. A failed Ad Slot may retry its same plan."
62
76
63
77
## Flagged ambiguities
64
78
65
79
- "concept" previously meant both a reusable visual treatment and a run-specific plan; use **Creative Direction** for the reusable treatment and **Planned Concept** for the copy-and-model assignment.
66
80
- "creative" previously meant both a plan and its image; use **Planned Concept** before rendering and **Rendered Ad** after rendering.
81
+
- "product" means a fact-grounded **Product** extracted from the Brand's site, not a generic object inferred solely for an image composition.
0 commit comments