brand-intent 0.1.7 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -43,7 +43,6 @@ npx brand-intent init
43
43
  ## Documentation
44
44
 
45
45
  - [Specification](SPEC.md): formal grammar for all five file types
46
- - [Design Decisions](DESIGN.md): reasoning behind the framework
47
46
  - [intent.stoll.studio](https://intent.stoll.studio): project landing page
48
47
 
49
48
  ## License
package/cli/index.mjs CHANGED
@@ -60,26 +60,9 @@ function copyDirRecursive(src, dest) {
60
60
  }
61
61
 
62
62
  function scaffoldExample(targetDir) {
63
- const brandSrc = join(PKG_ROOT, 'brands', 'krume');
64
- const exampleDest = join(targetDir, 'examples', 'krume');
65
-
66
- copyDirRecursive(brandSrc, exampleDest);
67
-
68
- const layers = [
69
- { layer: 'formats', file: 'instagram-4-5-feed-portrait.format' },
70
- { layer: 'purposes', file: 'daily-bread.purpose' },
71
- { layer: 'compositions', file: 'editorial.composition' },
72
- ];
73
-
74
- for (const { layer, file } of layers) {
75
- const src = join(PKG_ROOT, layer, file);
76
- if (existsSync(src)) {
77
- const dest = join(exampleDest, layer, file);
78
- mkdirSync(dirname(dest), { recursive: true });
79
- copyFileSync(src, dest);
80
- }
81
- }
82
-
63
+ const src = join(PKG_ROOT, 'examples', 'krume');
64
+ const dest = join(targetDir, 'examples', 'krume');
65
+ copyDirRecursive(src, dest);
83
66
  console.log(' \u2713 examples/krume/ \u2014 reference implementation (identity, brand, format, purpose, composition)');
84
67
  }
85
68
 
@@ -153,6 +136,14 @@ const targetDir = resolve(cwd, folder.trim() || '.');
153
136
  if (targetDir !== cwd) {
154
137
  mkdirSync(targetDir, { recursive: true });
155
138
  }
139
+ console.log('\n This will:');
140
+ console.log(' \u2014 Copy the Krume bakery reference into examples/krume/');
141
+ console.log(' \u2014 Install the Brand Intent skill for your AI agent\n');
142
+ const proceed = await ask(' Proceed? (Y/n) ');
143
+ if (proceed.trim().toLowerCase() === 'n') {
144
+ closeRl();
145
+ process.exit(0);
146
+ }
156
147
  console.log('');
157
148
 
158
149
  scaffoldExample(targetDir);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brand-intent",
3
- "version": "0.1.7",
3
+ "version": "0.2.0",
4
4
  "description": "An open file format specification for making brand intent machine-readable.",
5
5
  "author": "Christophe Stoll <christophe@stoll.studio>",
6
6
  "license": "MIT",
@@ -26,9 +26,6 @@
26
26
  "files": [
27
27
  "cli/",
28
28
  "skills/",
29
- "brands/",
30
- "formats/",
31
- "purposes/",
32
- "compositions/"
29
+ "examples/"
33
30
  ]
34
31
  }
@@ -10,7 +10,7 @@ description: Generate and validate on-brand content using Brand Intent files
10
10
  > If `$ARGUMENTS` is "example": scaffold the Krume bakery reference implementation into `examples/krume/` and explain what each file does.
11
11
  > If `$ARGUMENTS` names a purpose (e.g. "daily-bread", "event", "quote"): compose context from the five layers and generate content for that purpose.
12
12
  > If `$ARGUMENTS` is "validate": read the most recent generated or provided content and run the validation checklist against the brand files.
13
- > If `$ARGUMENTS` is empty: discover all `.identity`, `.brand`, `.purpose` files in the project, summarize the brand voice and list available purposes.
13
+ > If `$ARGUMENTS` is empty: find the active brand (see File Discovery below), summarize the brand voice and list available purposes.
14
14
 
15
15
  You are working in a project that uses **Brand Intent**, an open file format for encoding brand identity, expression intent, and content composition rules across five composable layers. This skill teaches you how to read, compose, and validate Brand Intent files.
16
16
 
@@ -128,17 +128,28 @@ After generating or reviewing content, validate against these rules in order:
128
128
 
129
129
  ## File Discovery
130
130
 
131
- Brand Intent files follow this structure:
131
+ A Brand Intent brand lives in its own folder, named after the brand:
132
132
 
133
133
  ```
134
- brandname.identity
135
- brandname.brand
136
- formats/*.format
137
- purposes/*.purpose
138
- compositions/*.composition
134
+ brandname/
135
+ ├── brandname.identity
136
+ ├── brandname.brand
137
+ ├── formats/*.format
138
+ ├── purposes/*.purpose
139
+ └── compositions/*.composition
139
140
  ```
140
141
 
141
- To find the active brand, look for the `.identity` and `.brand` files at the project root. There is exactly one of each per project.
142
+ ### Finding the active brand
143
+
144
+ A **brand folder** is a directory that contains both a `*.identity` and a `*.brand` file whose base name matches the folder name. To find the active brand:
145
+
146
+ 1. Search the project for brand folders, but **skip anything under `examples/`** — those are reference material, not the user's real brand.
147
+ 2. **If exactly one non-example brand folder exists**, use it silently. That is the active brand.
148
+ 3. **If multiple exist**, ask the user which brand they want to work on. Don't guess.
149
+ 4. **If none exist but an example brand does** (e.g. `examples/krume/`), treat the example as the active brand — the user is in learning mode. Before doing work, say one line: *"Working with the Krume example brand — run `/brand-intent onboard` when you want to create your own."* Then proceed normally.
150
+ 5. **If nothing exists at all**, suggest running `/brand-intent onboard` to create a brand, or `npx brand-intent init` to scaffold the Krume example.
151
+
152
+ Explicit references to an example brand (e.g. "show me the Krume example", "how does Krume handle headlines?") always reach into `examples/` directly, regardless of what the active brand is.
142
153
 
143
154
  ## Onboarding: Create a New Brand
144
155
 
@@ -200,13 +211,15 @@ Ask the user to confirm or adjust. Iterate until they're happy.
200
211
 
201
212
  ### File Generation
202
213
 
203
- Once confirmed, generate these files at the project root:
214
+ Once confirmed, create a folder named after the brand ID and generate these files inside it:
215
+
216
+ 1. **`[brandid]/[brandid].identity`** — essence, promise, tagline, archetype, voice (register, persona, rhythm, always/never), pillars, audience blocks, anti-audience blocks. Follow the structure of the Krume reference.
204
217
 
205
- 1. **`[brandid].identity`** — essence, promise, tagline, archetype, voice (register, persona, rhythm, always/never), pillars, audience blocks, anti-audience blocks. Follow the structure of the Krume reference.
218
+ 2. **`[brandid]/[brandid].brand`** — id, name, language, locale, brand-colors, at least one theme (mapping semantic slots to color references), font blocks, typography blocks (headline, body, caption, label at minimum), spacing, dividers. Use `$name` references for theme colors.
206
219
 
207
- 2. **`[brandid].brand`** — id, name, language, locale, brand-colors, at least one theme (mapping semantic slots to color references), font blocks, typography blocks (headline, body, caption, label at minimum), spacing, dividers. Use `$name` references for theme colors.
220
+ 3. **`[brandid]/purposes/starter.purpose`** — a starter purpose with slots that have on-brand sample content derived from the identity. Samples must be in the brand's language and respect voice rules.
208
221
 
209
- 3. **`purposes/starter.purpose`** — a starter purpose with slots that have on-brand sample content derived from the identity. Samples must be in the brand's language and respect voice rules.
222
+ The brand folder sits at the project root (or wherever the user invoked the skill). If a folder with that name already exists and contains brand files, stop and ask before overwriting.
210
223
 
211
224
  ### Rules
212
225
 
File without changes
File without changes