arkaos 2.48.0 → 2.50.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/VERSION +1 -1
- package/config/hooks/stop.sh +34 -0
- package/config/hooks/user-prompt-submit.sh +20 -0
- package/core/governance/__pycache__/compliance_telemetry.cpython-313.pyc +0 -0
- package/core/governance/__pycache__/meta_tag_check.cpython-313.pyc +0 -0
- package/core/governance/meta_tag_check.py +63 -0
- package/departments/brand/skills/design-system/SKILL.md +178 -6
- package/departments/brand/skills/primal-audit/SKILL.md +78 -5
- package/departments/brand/workflows/audit.yaml +118 -0
- package/departments/brand/workflows/design-system.yaml +122 -0
- package/package.json +1 -1
- package/pyproject.toml +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.50.0
|
package/config/hooks/stop.sh
CHANGED
|
@@ -162,6 +162,38 @@ try:
|
|
|
162
162
|
except Exception:
|
|
163
163
|
pass
|
|
164
164
|
|
|
165
|
+
# PR30 v2.49.0 — Meta-tag soft block. Mirrors the KB cite-check
|
|
166
|
+
# pipeline. Records whether the closing message carried the required
|
|
167
|
+
# [arka:meta] one-liner; persists result to /tmp/arkaos-meta/<session>.json
|
|
168
|
+
# so the next UserPromptSubmit can surface a nudge if missing.
|
|
169
|
+
meta_passed = True
|
|
170
|
+
meta_reason = "trivial"
|
|
171
|
+
meta_suggestion: str | None = None
|
|
172
|
+
try:
|
|
173
|
+
from core.governance.meta_tag_check import check_meta_tag
|
|
174
|
+
mr = check_meta_tag(last)
|
|
175
|
+
meta_passed = mr.passed
|
|
176
|
+
meta_reason = mr.reason
|
|
177
|
+
meta_suggestion = mr.suggestion
|
|
178
|
+
if safe_sid:
|
|
179
|
+
prev_umask = os.umask(0o077)
|
|
180
|
+
try:
|
|
181
|
+
meta_dir = Path("/tmp/arkaos-meta")
|
|
182
|
+
meta_dir.mkdir(parents=True, exist_ok=True)
|
|
183
|
+
meta_path = meta_dir / f"{safe_sid}.json"
|
|
184
|
+
meta_path.write_text(
|
|
185
|
+
json.dumps({
|
|
186
|
+
"passed": mr.passed,
|
|
187
|
+
"reason": mr.reason,
|
|
188
|
+
"suggestion": mr.suggestion,
|
|
189
|
+
}),
|
|
190
|
+
encoding="utf-8",
|
|
191
|
+
)
|
|
192
|
+
finally:
|
|
193
|
+
os.umask(prev_umask)
|
|
194
|
+
except Exception:
|
|
195
|
+
pass
|
|
196
|
+
|
|
165
197
|
entry = {
|
|
166
198
|
"ts": datetime.now(timezone.utc).isoformat(),
|
|
167
199
|
"session_id": session_id,
|
|
@@ -178,6 +210,8 @@ entry = {
|
|
|
178
210
|
"kb_cite_reason": cite_reason,
|
|
179
211
|
"kb_cite_count": cite_count,
|
|
180
212
|
"kb_cite_topic_score": cite_topic_score,
|
|
213
|
+
"meta_tag_check_passed": meta_passed,
|
|
214
|
+
"meta_tag_check_reason": meta_reason,
|
|
181
215
|
"mode": "warn",
|
|
182
216
|
}
|
|
183
217
|
|
|
@@ -393,11 +393,31 @@ if [ -n "$SESSION_ID" ]; then
|
|
|
393
393
|
fi
|
|
394
394
|
fi
|
|
395
395
|
|
|
396
|
+
# ─── Meta-tag nudge (PR30 v2.49.0) ───────────────────────────────────────
|
|
397
|
+
# Mirror of the KB citation nudge but for the [arka:meta] one-liner
|
|
398
|
+
# contract. One-shot; deleted after read.
|
|
399
|
+
_META_TAG_NUDGE=""
|
|
400
|
+
if [ -n "$SESSION_ID" ]; then
|
|
401
|
+
_META_FILE="/tmp/arkaos-meta/${SESSION_ID}.json"
|
|
402
|
+
if [ -f "$_META_FILE" ]; then
|
|
403
|
+
if command -v jq &>/dev/null; then
|
|
404
|
+
_META_PASSED=$(jq -r '.passed' "$_META_FILE" 2>/dev/null)
|
|
405
|
+
_META_SUGGEST=$(jq -r '.suggestion // ""' "$_META_FILE" 2>/dev/null)
|
|
406
|
+
if [ "$_META_PASSED" = "false" ] && [ -n "$_META_SUGGEST" ] && [ "$_META_SUGGEST" != "null" ]; then
|
|
407
|
+
_META_TAG_NUDGE="[arka:suggest] ${_META_SUGGEST}"
|
|
408
|
+
fi
|
|
409
|
+
fi
|
|
410
|
+
rm -f "$_META_FILE" 2>/dev/null
|
|
411
|
+
fi
|
|
412
|
+
fi
|
|
413
|
+
|
|
396
414
|
# ─── Output ──────────────────────────────────────────────────────────────
|
|
397
415
|
_OUT_CONTEXT="${_ARKA_GREETING:-}${_SYNC_NOTICE:-}${_ROUTE_REMINDER}${_WORKFLOW_DIRECTIVE} $python_result"
|
|
398
416
|
[ -n "$_HYGIENE" ] && _OUT_CONTEXT="$_OUT_CONTEXT $_HYGIENE"
|
|
399
417
|
[ -n "$_KB_CITE_NUDGE" ] && _OUT_CONTEXT="$_OUT_CONTEXT
|
|
400
418
|
$_KB_CITE_NUDGE"
|
|
419
|
+
[ -n "$_META_TAG_NUDGE" ] && _OUT_CONTEXT="$_OUT_CONTEXT
|
|
420
|
+
$_META_TAG_NUDGE"
|
|
401
421
|
[ -n "$_ARKA_CONTEXT_HITS" ] && _OUT_CONTEXT="$_OUT_CONTEXT
|
|
402
422
|
$_ARKA_CONTEXT_HITS"
|
|
403
423
|
# Escape for JSON
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""[arka:meta] one-liner soft-block check (PR30 v2.49.0).
|
|
2
|
+
|
|
3
|
+
Response-side classifier. Inspects an assistant response for the
|
|
4
|
+
``[arka:meta] kb=N research=X persona=Y gap=Z critic=W`` one-liner
|
|
5
|
+
established by the session-start hook in PR12 v2.34.0.
|
|
6
|
+
|
|
7
|
+
Soft-block contract — never raises. Hooks consume MetaTagResult and
|
|
8
|
+
decide whether to surface a suggestion. Mirrors the shape of
|
|
9
|
+
``core.governance.kb_cite_check`` (PR18 v2.40.0).
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import re
|
|
15
|
+
from dataclasses import dataclass
|
|
16
|
+
|
|
17
|
+
_META_TAG_RE: re.Pattern[str] = re.compile(r"\[arka:meta\]", re.IGNORECASE)
|
|
18
|
+
_BYPASS_DEFAULTS: tuple[str, ...] = ("[arka:trivial]",)
|
|
19
|
+
_TRIVIAL_WORD_THRESHOLD: int = 15
|
|
20
|
+
_SUGGESTION_TEXT: str = (
|
|
21
|
+
"Meta-tag missing — end substantive responses with a single "
|
|
22
|
+
"`[arka:meta] kb=N research=X persona=Y gap=Z critic=W` line. "
|
|
23
|
+
"Fields: kb=N (notes consulted), research=X (MCPs invoked or "
|
|
24
|
+
"'none'), persona=Y (advisor or 'orchestrator'), gap=Z (KB gap "
|
|
25
|
+
"or 'none'), critic=W (passed|failed|skipped)."
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass(frozen=True)
|
|
30
|
+
class MetaTagResult:
|
|
31
|
+
"""Verdict of a meta-tag check. Immutable; safe to log as JSON."""
|
|
32
|
+
passed: bool
|
|
33
|
+
reason: str
|
|
34
|
+
suggestion: str | None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def check_meta_tag(
|
|
38
|
+
response_text: str,
|
|
39
|
+
*,
|
|
40
|
+
bypass_markers: tuple[str, ...] = _BYPASS_DEFAULTS,
|
|
41
|
+
) -> MetaTagResult:
|
|
42
|
+
"""Classify whether a response carries the [arka:meta] one-liner.
|
|
43
|
+
|
|
44
|
+
Order matters: a SHORT response *with* the tag still counts as
|
|
45
|
+
`present` — the trivial-length bypass only short-circuits when
|
|
46
|
+
the tag genuinely isn't there.
|
|
47
|
+
"""
|
|
48
|
+
text = response_text or ""
|
|
49
|
+
if _has_bypass_marker(text, bypass_markers):
|
|
50
|
+
return MetaTagResult(True, "trivial", None)
|
|
51
|
+
if _META_TAG_RE.search(text):
|
|
52
|
+
return MetaTagResult(True, "present", None)
|
|
53
|
+
if _is_trivial_length(text):
|
|
54
|
+
return MetaTagResult(True, "trivial", None)
|
|
55
|
+
return MetaTagResult(False, "missing", _SUGGESTION_TEXT)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _has_bypass_marker(text: str, markers: tuple[str, ...]) -> bool:
|
|
59
|
+
return any(marker in text for marker in markers)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _is_trivial_length(text: str) -> bool:
|
|
63
|
+
return len(text.split()) < _TRIVIAL_WORD_THRESHOLD
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: brand/design-system
|
|
3
3
|
description: >
|
|
4
|
-
|
|
4
|
+
Production design system specification: tokens, atoms, molecules, organisms,
|
|
5
|
+
templates, and pages — with WCAG AA conformance and Storybook export contract.
|
|
5
6
|
allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Agent, WebFetch, WebSearch]
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -21,12 +22,183 @@ does not replace the vault.
|
|
|
21
22
|
|
|
22
23
|
# Design System — `/brand design-system`
|
|
23
24
|
|
|
24
|
-
> **
|
|
25
|
+
> **Lead:** Sofia D. (UX Designer) + Isabel (Visual Designer) | **Framework:** Atomic Design (Brad Frost) + Design Tokens + WCAG 2.2 AA
|
|
25
26
|
|
|
26
|
-
## What
|
|
27
|
+
## What ships
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
A production design system in 5 deliverables:
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
1. **`design-tokens.json`** — semantic token layer
|
|
32
|
+
2. **Component catalog** — atoms → molecules → organisms → templates → pages
|
|
33
|
+
3. **WCAG 2.2 AA conformance report** — pass / waiver per component
|
|
34
|
+
4. **Storybook story stubs** — one story per component, ready to drop into Storybook
|
|
35
|
+
5. **Integration guide** — how to wire the system into a Vue/React/Vanilla project
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
## Token JSON schema
|
|
38
|
+
|
|
39
|
+
The token system has a **two-layer architecture**: raw primitives + semantic aliases. Semantic tokens reference primitives; surfaces reference semantic tokens. Never reference primitives directly in components.
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"$schema": "https://design-tokens.github.io/community-group/format/",
|
|
44
|
+
"primitive": {
|
|
45
|
+
"color": {
|
|
46
|
+
"neutral": {
|
|
47
|
+
"0": { "$value": "#FFFFFF", "$type": "color" },
|
|
48
|
+
"50": { "$value": "#FAFAFA", "$type": "color" },
|
|
49
|
+
"100": { "$value": "#F4F4F5", "$type": "color" },
|
|
50
|
+
"900": { "$value": "#18181B", "$type": "color" },
|
|
51
|
+
"1000":{ "$value": "#0A0A0A", "$type": "color" }
|
|
52
|
+
},
|
|
53
|
+
"accent": {
|
|
54
|
+
"500": { "$value": "#00FF88", "$type": "color" }
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"size": {
|
|
58
|
+
"0": { "$value": "0", "$type": "dimension" },
|
|
59
|
+
"1": { "$value": "4px", "$type": "dimension" },
|
|
60
|
+
"2": { "$value": "8px", "$type": "dimension" },
|
|
61
|
+
"4": { "$value": "16px", "$type": "dimension" }
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"semantic": {
|
|
65
|
+
"color": {
|
|
66
|
+
"background": { "$value": "{primitive.color.neutral.1000}", "$type": "color" },
|
|
67
|
+
"surface": { "$value": "{primitive.color.neutral.900}", "$type": "color" },
|
|
68
|
+
"text": { "$value": "{primitive.color.neutral.50}", "$type": "color" },
|
|
69
|
+
"accent": { "$value": "{primitive.color.accent.500}", "$type": "color" }
|
|
70
|
+
},
|
|
71
|
+
"space": {
|
|
72
|
+
"compact": { "$value": "{primitive.size.2}", "$type": "dimension" },
|
|
73
|
+
"default": { "$value": "{primitive.size.4}", "$type": "dimension" },
|
|
74
|
+
"generous": { "$value": "{primitive.size.6}", "$type": "dimension" }
|
|
75
|
+
},
|
|
76
|
+
"radius": { "$value": "{primitive.size.2}", "$type": "dimension" },
|
|
77
|
+
"motion": {
|
|
78
|
+
"duration": {
|
|
79
|
+
"fast": { "$value": "150ms", "$type": "duration" },
|
|
80
|
+
"base": { "$value": "250ms", "$type": "duration" },
|
|
81
|
+
"slow": { "$value": "400ms", "$type": "duration" }
|
|
82
|
+
},
|
|
83
|
+
"easing": {
|
|
84
|
+
"standard": { "$value": "cubic-bezier(0.4, 0, 0.2, 1)", "$type": "cubicBezier" }
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Required token groups: `color`, `space`, `typography`, `radius`, `elevation`, `motion`, `border`. Each group must have at minimum 3 semantic tokens. Primitives are reusable; semantics are intentional.
|
|
92
|
+
|
|
93
|
+
## Atomic Design 5-Level Component Manifest
|
|
94
|
+
|
|
95
|
+
Each component is documented with: name, level, props, slots, accessibility notes, Storybook story stub.
|
|
96
|
+
|
|
97
|
+
### Level 1 — Atoms (10-15 required)
|
|
98
|
+
Indivisible UI primitives. Examples:
|
|
99
|
+
|
|
100
|
+
| Component | Props | A11y notes |
|
|
101
|
+
|---|---|---|
|
|
102
|
+
| Button | `variant` (primary/secondary/ghost), `size`, `disabled`, `loading` | role=button, aria-busy on loading, keyboard-actionable |
|
|
103
|
+
| Input | `type`, `value`, `placeholder`, `disabled`, `invalid` | aria-invalid on invalid, aria-describedby for error |
|
|
104
|
+
| Label | `htmlFor`, `required` | explicit for association required |
|
|
105
|
+
| Icon | `name`, `size`, `decorative` | role=img + aria-label OR aria-hidden when decorative |
|
|
106
|
+
| Avatar | `src`, `alt`, `fallback`, `size` | alt required unless decorative |
|
|
107
|
+
| Badge | `variant`, `count` | aria-live polite when count changes |
|
|
108
|
+
| Spinner | `size`, `label` | role=status + aria-label |
|
|
109
|
+
| Switch | `checked`, `disabled` | role=switch + aria-checked |
|
|
110
|
+
| Checkbox | `checked`, `indeterminate`, `disabled` | aria-checked tri-state support |
|
|
111
|
+
| Link | `href`, `external`, `variant` | rel=noopener for external |
|
|
112
|
+
|
|
113
|
+
### Level 2 — Molecules (8-12 required)
|
|
114
|
+
Composed pairs of atoms with one task focus. Examples:
|
|
115
|
+
|
|
116
|
+
| Component | Composes | A11y notes |
|
|
117
|
+
|---|---|---|
|
|
118
|
+
| FormField | Label + Input + ErrorMessage | aria-describedby chain |
|
|
119
|
+
| SearchBar | Input + Button + Icon | role=search, aria-label on form |
|
|
120
|
+
| Card | Heading + Body + optional Footer | semantic landmark when standalone |
|
|
121
|
+
| NavItem | Icon + Label + (Badge) | aria-current when active |
|
|
122
|
+
| Tab | Label + (Icon) + (Badge) | role=tab, aria-selected |
|
|
123
|
+
| Toast | Icon + Body + DismissButton | role=status or alert, dismissible |
|
|
124
|
+
| Tooltip | Anchor + Content | aria-describedby on anchor |
|
|
125
|
+
| Breadcrumb | Link[] + separator | nav landmark, aria-current on last |
|
|
126
|
+
|
|
127
|
+
### Level 3 — Organisms (6-10 required)
|
|
128
|
+
Complete sections of UI. Examples:
|
|
129
|
+
|
|
130
|
+
| Component | Composes | A11y notes |
|
|
131
|
+
|---|---|---|
|
|
132
|
+
| NavBar | Logo + NavItem[] + Avatar | nav landmark, skip-link target |
|
|
133
|
+
| HeroSection | Heading + Body + CTA + (Media) | one h1 per page rule |
|
|
134
|
+
| CardGrid | Card[] with layout | role=list when semantic, gap-aware |
|
|
135
|
+
| Dialog | Header + Body + Footer + FocusTrap | role=dialog, aria-labelledby, focus trap |
|
|
136
|
+
| DataTable | Header + Row[] with sort/filter | proper th scope, aria-sort |
|
|
137
|
+
| Sidebar | NavItem[] + collapse | nav landmark, persisted state |
|
|
138
|
+
| EmptyState | Icon + Heading + Body + (CTA) | role=region |
|
|
139
|
+
|
|
140
|
+
### Level 4 — Templates (3-5 required)
|
|
141
|
+
Page-level layouts with content slots. Examples: DashboardTemplate, ContentTemplate, MarketingTemplate, AuthTemplate, SettingsTemplate.
|
|
142
|
+
|
|
143
|
+
### Level 5 — Pages (2-3 required, production examples)
|
|
144
|
+
Production-ready pages with real content. Examples: LandingPage, DashboardHome, SettingsAccount.
|
|
145
|
+
|
|
146
|
+
## WCAG 2.2 AA Gates
|
|
147
|
+
|
|
148
|
+
Every component must pass:
|
|
149
|
+
|
|
150
|
+
| Criterion | Check | Tool |
|
|
151
|
+
|---|---|---|
|
|
152
|
+
| 1.4.3 Contrast (Minimum) | Body text ≥ 4.5:1 against background; large text ≥ 3:1 | manual + axe |
|
|
153
|
+
| 1.4.11 Non-text Contrast | UI components and graphical objects ≥ 3:1 against adjacent colors | manual + axe |
|
|
154
|
+
| 2.1.1 Keyboard | All functionality available via keyboard | manual |
|
|
155
|
+
| 2.4.7 Focus Visible | Visible focus indicator on all interactive elements | manual |
|
|
156
|
+
| 2.5.8 Target Size (Minimum) | Pointer targets ≥ 24×24 CSS pixels | manual |
|
|
157
|
+
| 4.1.2 Name, Role, Value | All UI components expose accessible name and role to AT | axe + screen reader |
|
|
158
|
+
| 4.1.3 Status Messages | Status updates announced without focus change | screen reader |
|
|
159
|
+
|
|
160
|
+
Components failing any criterion either remediate or document a **permanent waiver** with concrete user-impact rationale. Waivers require Quality Gate approval.
|
|
161
|
+
|
|
162
|
+
## Storybook Export Contract
|
|
163
|
+
|
|
164
|
+
Each component must ship one `.stories.{ts,mdx}` file with:
|
|
165
|
+
|
|
166
|
+
- **Default** story — props at defaults, single state visible
|
|
167
|
+
- **AllVariants** story — every variant prop combination
|
|
168
|
+
- **Interactive** story — controls (Storybook args) exposed for every prop
|
|
169
|
+
- **A11y** story — screen-reader narration sample + keyboard nav sequence
|
|
170
|
+
|
|
171
|
+
Story stubs use the CSF3 format:
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
175
|
+
import { Button } from './Button';
|
|
176
|
+
|
|
177
|
+
const meta: Meta<typeof Button> = {
|
|
178
|
+
component: Button,
|
|
179
|
+
parameters: { a11y: { test: 'error' } },
|
|
180
|
+
argTypes: {
|
|
181
|
+
variant: { control: 'select', options: ['primary', 'secondary', 'ghost'] },
|
|
182
|
+
size: { control: 'select', options: ['sm', 'md', 'lg'] },
|
|
183
|
+
disabled: { control: 'boolean' },
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
export default meta;
|
|
187
|
+
|
|
188
|
+
type Story = StoryObj<typeof Button>;
|
|
189
|
+
export const Default: Story = { args: { variant: 'primary', size: 'md' } };
|
|
190
|
+
export const AllVariants: Story = { /* render all variants in a grid */ };
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Integration Guide (delivery artifact)
|
|
194
|
+
|
|
195
|
+
A standalone markdown explaining:
|
|
196
|
+
- How to install token files (CSS variables / JSON / Tailwind config)
|
|
197
|
+
- How to import components in Vue / React / Vanilla
|
|
198
|
+
- How to extend the system (adding tokens, adding components, namespacing)
|
|
199
|
+
- How to run the WCAG audit locally (`npx axe-core --tags wcag2aa`)
|
|
200
|
+
- How to update Storybook stories when components change
|
|
201
|
+
|
|
202
|
+
## Output → Obsidian: `WizardingCode/Brand/DesignSystems/<project>-<date>/`
|
|
203
|
+
|
|
204
|
+
Delivers: `design-tokens.json` + component catalog (markdown with screenshots / mermaid hierarchy) + WCAG report + Storybook stubs + integration guide.
|
|
@@ -40,12 +40,51 @@ does not replace the vault.
|
|
|
40
40
|
|
|
41
41
|
1. **Gather** — Collect all brand assets: website, social, packaging, internal docs
|
|
42
42
|
2. **Map** — Fill each of the 7 elements with what currently exists
|
|
43
|
-
3. **Score** —
|
|
44
|
-
4. **Gaps** — Identify
|
|
45
|
-
5. **Recommend** — Specific
|
|
46
|
-
6. **Benchmark** — Compare against competitors' Primal Codes
|
|
43
|
+
3. **Score** — Apply the per-element rubric below (3 points each across 7 elements = 21 total)
|
|
44
|
+
4. **Gaps** — Identify weak elements and the specific sub-criterion that failed
|
|
45
|
+
5. **Recommend** — Specific remediation per gap, ranked by leverage
|
|
46
|
+
6. **Benchmark** — Compare against 3-5 competitors' Primal Codes
|
|
47
47
|
|
|
48
|
-
## Scoring
|
|
48
|
+
## Per-Element Scoring Rubric (3 sub-criteria each)
|
|
49
|
+
|
|
50
|
+
Each element is scored 0-3. Mark each sub-criterion present (1) or absent (0); sum to the element score.
|
|
51
|
+
|
|
52
|
+
### 1. Creation Story (max 3)
|
|
53
|
+
- [ ] **Origin moment is named** — a specific event, year, person, or pain point that triggered the brand
|
|
54
|
+
- [ ] **Consistency across surfaces** — the same story appears on About page, founder bio, key talks
|
|
55
|
+
- [ ] **Emotional anchor present** — a stakes-laden tension the founder needed to resolve
|
|
56
|
+
|
|
57
|
+
### 2. Creed (max 3)
|
|
58
|
+
- [ ] **Belief is stated, not implied** — explicit "we believe…" or "we exist because…" sentence
|
|
59
|
+
- [ ] **Belief has a counter-position** — the creed names what it rejects, not just what it affirms
|
|
60
|
+
- [ ] **Belief shapes product decisions** — at least one shipped feature can be traced to the creed
|
|
61
|
+
|
|
62
|
+
### 3. Icons (max 3)
|
|
63
|
+
- [ ] **Symbol is consistent** — same logo / mark across all primary surfaces
|
|
64
|
+
- [ ] **Symbol carries meaning** — the mark is decoded by users (Apple = bite, Nike = motion)
|
|
65
|
+
- [ ] **Sub-icons reinforce** — secondary visual language (palette, type, photography style) supports the primary symbol
|
|
66
|
+
|
|
67
|
+
### 4. Rituals (max 3)
|
|
68
|
+
- [ ] **Repeated user action defines the brand** — unboxing, onboarding, daily check-in, signature gesture
|
|
69
|
+
- [ ] **The ritual is named or recognizable** — users can describe the ritual back without prompting
|
|
70
|
+
- [ ] **The ritual is protected** — the brand resists altering it; the ritual has loadbearing weight
|
|
71
|
+
|
|
72
|
+
### 5. Non-Adherents (max 3)
|
|
73
|
+
- [ ] **Opposition is named** — competitors, mindsets, or status-quo positions explicitly called out
|
|
74
|
+
- [ ] **Identity is sharpened by contrast** — what the brand REFUSES is as clear as what it offers
|
|
75
|
+
- [ ] **Tribal lines are visible to outsiders** — adopting the brand signals belonging in a recognizable in-group
|
|
76
|
+
|
|
77
|
+
### 6. Sacred Lexicon (max 3)
|
|
78
|
+
- [ ] **3+ proprietary terms in active use** — words coined or claimed by the brand that customers repeat
|
|
79
|
+
- [ ] **Vocabulary is taught** — onboarding, docs, or messaging explicitly introduce the lexicon
|
|
80
|
+
- [ ] **Outsiders cannot fake fluency** — using the lexicon correctly signals real adherence
|
|
81
|
+
|
|
82
|
+
### 7. Leader (max 3)
|
|
83
|
+
- [ ] **A named human embodies the brand** — founder, CEO, public face with personal voice
|
|
84
|
+
- [ ] **Leader carries the creed** — public statements consistently align with the brand's belief
|
|
85
|
+
- [ ] **Leader is accessible** — direct contact channel exists (writing, podcast, social presence, AMAs)
|
|
86
|
+
|
|
87
|
+
## 21-Point Index
|
|
49
88
|
|
|
50
89
|
| Score | Rating | Meaning |
|
|
51
90
|
|-------|--------|---------|
|
|
@@ -54,4 +93,38 @@ does not replace the vault.
|
|
|
54
93
|
| 10-13 | Developing | Foundation exists, significant gaps |
|
|
55
94
|
| 0-9 | Underdeveloped | Major brand building needed |
|
|
56
95
|
|
|
96
|
+
## Evidence Citation Contract
|
|
97
|
+
|
|
98
|
+
Every per-criterion score MUST cite specific asset evidence. Format:
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
Creation Story (2/3)
|
|
102
|
+
✓ Origin moment named — "Founded 2018 in a coffee shop after the third
|
|
103
|
+
failed deploy" (About page, 2nd paragraph)
|
|
104
|
+
✓ Consistency across surfaces — same story on About + founder LinkedIn
|
|
105
|
+
+ S2 podcast appearance
|
|
106
|
+
✗ Emotional anchor present — origin reads as biography, no stakes-laden
|
|
107
|
+
tension. Suggested remediation: rewrite to surface the cost of the
|
|
108
|
+
problem (what was at risk if this didn't exist).
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
A score without evidence is a score without weight. Self-critique phase rejects any unjustified marks.
|
|
112
|
+
|
|
113
|
+
## Competitor Benchmark Template
|
|
114
|
+
|
|
115
|
+
For each of 3-5 competitors, complete the same 21-point rubric and compute relative position:
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
| Brand | Creation | Creed | Icons | Rituals | Non-Adherents | Lexicon | Leader | Total |
|
|
119
|
+
|-------|----------|-------|-------|---------|---------------|---------|--------|-------|
|
|
120
|
+
| Ours | 2 | 3 | 2 | 1 | 0 | 2 | 3 | 13/21 |
|
|
121
|
+
| CompA | 3 | 3 | 3 | 3 | 2 | 3 | 2 | 19/21 |
|
|
122
|
+
| CompB | 1 | 2 | 2 | 1 | 1 | 1 | 1 | 9/21 |
|
|
123
|
+
| CompC | 2 | 2 | 3 | 2 | 2 | 2 | 1 | 14/21 |
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Output **strategic gaps** (where we trail the leader) vs **deliberate non-positions** (where we choose not to compete). Mark each gap with leverage rating: high / medium / low — to be ranked into the remediation plan.
|
|
127
|
+
|
|
57
128
|
## Output → Obsidian: `WizardingCode/Brand/Audits/PRIMAL-AUDIT-<brand>-<date>.md`
|
|
129
|
+
|
|
130
|
+
Includes: per-element scoring with citations, 21-point index, competitor benchmark, ranked remediation plan with leverage ratings, and concrete next-7-days actions for the top 3 gaps.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
id: brand-audit
|
|
2
|
+
name: Brand Audit
|
|
3
|
+
description: Diagnose an existing brand against the 7 Primal Code elements with competitor benchmark
|
|
4
|
+
department: brand
|
|
5
|
+
tier: enterprise
|
|
6
|
+
command: "/brand audit"
|
|
7
|
+
requires_branch: false
|
|
8
|
+
requires_spec: false
|
|
9
|
+
quality_gate_required: true
|
|
10
|
+
|
|
11
|
+
phases:
|
|
12
|
+
- id: brief
|
|
13
|
+
name: Audit Brief
|
|
14
|
+
description: Define brand under audit, audience, competitors to benchmark against
|
|
15
|
+
agents:
|
|
16
|
+
- agent_id: brand-director-valentina
|
|
17
|
+
role: Frame audit scope, identify the 3-5 competitor brands for benchmark
|
|
18
|
+
gate:
|
|
19
|
+
type: user_approval
|
|
20
|
+
description: User confirms brand-under-audit and competitor set
|
|
21
|
+
|
|
22
|
+
- id: asset-gather
|
|
23
|
+
name: Asset Gathering
|
|
24
|
+
description: Collect all live brand assets (logo, palette, type, voice samples, taglines, web/social proof points)
|
|
25
|
+
agents:
|
|
26
|
+
- agent_id: brand-director-valentina
|
|
27
|
+
role: Catalog the brand surface area, flag missing assets
|
|
28
|
+
- agent_id: visual-designer-isabel
|
|
29
|
+
role: Extract visual tokens from existing materials
|
|
30
|
+
parallel: true
|
|
31
|
+
gate:
|
|
32
|
+
type: auto
|
|
33
|
+
outputs:
|
|
34
|
+
- type: document
|
|
35
|
+
format: markdown
|
|
36
|
+
obsidian_path: "WizardingCode/Brand/Audits/Assets/"
|
|
37
|
+
description: Asset inventory with file references
|
|
38
|
+
|
|
39
|
+
- id: seven-element-mapping
|
|
40
|
+
name: Primal 7-Element Mapping
|
|
41
|
+
description: Score each Primal element (Creation Story, Creed, Icons, Rituals, Sacred Words, Non-Believers, Leader) against evidence
|
|
42
|
+
agents:
|
|
43
|
+
- agent_id: brand-strategist-mateus
|
|
44
|
+
role: Score Creation Story, Creed, Sacred Words, Non-Believers, Leader against asset evidence
|
|
45
|
+
parallel: true
|
|
46
|
+
- agent_id: ux-designer-sofia-d
|
|
47
|
+
role: Score Icons and Rituals against UI/interaction evidence
|
|
48
|
+
parallel: true
|
|
49
|
+
gate:
|
|
50
|
+
type: auto
|
|
51
|
+
|
|
52
|
+
- id: scoring
|
|
53
|
+
name: 21-Point Scoring
|
|
54
|
+
description: Aggregate per-element scores into a 21-point Primal Code Index (3 points per element across 7 elements)
|
|
55
|
+
agents:
|
|
56
|
+
- agent_id: brand-strategist-mateus
|
|
57
|
+
role: Compute the 21-point Primal Code Index, identify gaps
|
|
58
|
+
gate:
|
|
59
|
+
type: user_approval
|
|
60
|
+
description: User reviews the 21-point scoring before benchmark phase
|
|
61
|
+
outputs:
|
|
62
|
+
- type: document
|
|
63
|
+
format: markdown
|
|
64
|
+
obsidian_path: "WizardingCode/Brand/Audits/Scoring/"
|
|
65
|
+
description: 21-point Primal Code Index with per-element evidence
|
|
66
|
+
|
|
67
|
+
- id: competitor-benchmark
|
|
68
|
+
name: Competitor Benchmark
|
|
69
|
+
description: Run the same 21-point scoring on 3-5 competitor brands; compute relative position
|
|
70
|
+
agents:
|
|
71
|
+
- agent_id: brand-strategist-mateus
|
|
72
|
+
role: Benchmark competitor scores, compute relative position
|
|
73
|
+
- agent_id: strategy-director-tomas
|
|
74
|
+
role: Strategic context — which gaps are wins to close, which are deliberate non-positions
|
|
75
|
+
parallel: true
|
|
76
|
+
gate:
|
|
77
|
+
type: user_approval
|
|
78
|
+
description: User approves the benchmark results before remediation ranking
|
|
79
|
+
|
|
80
|
+
- id: self-critique
|
|
81
|
+
name: Self-Critique
|
|
82
|
+
description: Stress-test the audit — are scores defensible by evidence? Are gaps actionable?
|
|
83
|
+
agents:
|
|
84
|
+
- agent_id: brand-director-valentina
|
|
85
|
+
role: Verify each score has a concrete asset citation, each gap has a measurable target
|
|
86
|
+
gate:
|
|
87
|
+
type: auto
|
|
88
|
+
|
|
89
|
+
- id: quality-gate
|
|
90
|
+
name: Quality Gate
|
|
91
|
+
model_override: opus
|
|
92
|
+
description: Mandatory quality review
|
|
93
|
+
agents:
|
|
94
|
+
- agent_id: cqo-marta
|
|
95
|
+
role: Orchestrate quality review
|
|
96
|
+
- agent_id: copy-director-eduardo
|
|
97
|
+
role: Audit prose quality, no clichés, defensible scoring language
|
|
98
|
+
parallel: true
|
|
99
|
+
- agent_id: tech-director-francisca
|
|
100
|
+
role: Visual evidence completeness, accessibility findings, file format integrity
|
|
101
|
+
parallel: true
|
|
102
|
+
gate:
|
|
103
|
+
type: quality_gate
|
|
104
|
+
required_verdict: APPROVED
|
|
105
|
+
|
|
106
|
+
- id: delivery
|
|
107
|
+
name: Audit Report & Recommendations
|
|
108
|
+
description: Compile audit report with ranked remediation recommendations
|
|
109
|
+
agents:
|
|
110
|
+
- agent_id: brand-director-valentina
|
|
111
|
+
role: Compile audit report — 21-point index, gap analysis, ranked remediation plan
|
|
112
|
+
gate:
|
|
113
|
+
type: auto
|
|
114
|
+
outputs:
|
|
115
|
+
- type: document
|
|
116
|
+
format: markdown
|
|
117
|
+
obsidian_path: "WizardingCode/Brand/Audits/"
|
|
118
|
+
description: Complete brand audit with 21-point index + competitor benchmark + ranked recommendations
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
id: brand-design-system
|
|
2
|
+
name: Design System Specification
|
|
3
|
+
description: Production design system from tokens to Storybook components (Atomic Design + WCAG AA)
|
|
4
|
+
department: brand
|
|
5
|
+
tier: enterprise
|
|
6
|
+
command: "/brand design-system"
|
|
7
|
+
requires_branch: false
|
|
8
|
+
requires_spec: false
|
|
9
|
+
quality_gate_required: true
|
|
10
|
+
|
|
11
|
+
phases:
|
|
12
|
+
- id: brief
|
|
13
|
+
name: Design System Brief
|
|
14
|
+
description: Define product surface, platforms, accessibility floor, integration target
|
|
15
|
+
agents:
|
|
16
|
+
- agent_id: brand-director-valentina
|
|
17
|
+
role: Frame system scope (web / mobile / multi-product), confirm accessibility floor (WCAG AA minimum)
|
|
18
|
+
gate:
|
|
19
|
+
type: user_approval
|
|
20
|
+
description: User confirms scope, platforms, and accessibility floor
|
|
21
|
+
|
|
22
|
+
- id: token-design
|
|
23
|
+
name: Token Design
|
|
24
|
+
description: Define design tokens (color, typography, spacing, radius, elevation, motion) as JSON
|
|
25
|
+
agents:
|
|
26
|
+
- agent_id: visual-designer-isabel
|
|
27
|
+
role: Color palette with semantic tokens, typography scale, spacing rhythm, radius/elevation/motion tokens
|
|
28
|
+
gate:
|
|
29
|
+
type: user_approval
|
|
30
|
+
description: User approves the token system before component build
|
|
31
|
+
outputs:
|
|
32
|
+
- type: document
|
|
33
|
+
format: json
|
|
34
|
+
obsidian_path: "WizardingCode/Brand/DesignSystems/Tokens/"
|
|
35
|
+
description: design-tokens.json with full semantic layer
|
|
36
|
+
|
|
37
|
+
- id: atom-molecule-organism
|
|
38
|
+
name: Atom, Molecule, Organism
|
|
39
|
+
description: Build the lower three Atomic Design levels — primitives, composed pairs, complete sections
|
|
40
|
+
agents:
|
|
41
|
+
- agent_id: ux-designer-sofia-d
|
|
42
|
+
role: Atoms (button, input, label, icon), molecules (form field, card header, nav item)
|
|
43
|
+
parallel: true
|
|
44
|
+
- agent_id: visual-designer-isabel
|
|
45
|
+
role: Organisms (nav bar, hero, card grid, dialog) with token application
|
|
46
|
+
parallel: true
|
|
47
|
+
gate:
|
|
48
|
+
type: auto
|
|
49
|
+
|
|
50
|
+
- id: template-page
|
|
51
|
+
name: Templates & Pages
|
|
52
|
+
description: Complete Atomic Design — page templates with content placeholders, plus 2-3 production page examples
|
|
53
|
+
agents:
|
|
54
|
+
- agent_id: ux-designer-sofia-d
|
|
55
|
+
role: Page templates (landing, dashboard, settings, empty state)
|
|
56
|
+
- agent_id: visual-designer-isabel
|
|
57
|
+
role: Production page examples with real content
|
|
58
|
+
parallel: true
|
|
59
|
+
gate:
|
|
60
|
+
type: user_approval
|
|
61
|
+
description: User approves the template set before accessibility audit
|
|
62
|
+
|
|
63
|
+
- id: accessibility-audit
|
|
64
|
+
name: WCAG AA Audit
|
|
65
|
+
description: Full WCAG 2.2 AA audit on every component — contrast, focus, semantics, ARIA, keyboard
|
|
66
|
+
agents:
|
|
67
|
+
- agent_id: wcag-auditor
|
|
68
|
+
role: WCAG 2.2 AA conformance audit on every atom/molecule/organism/template
|
|
69
|
+
- agent_id: ux-designer-sofia-d
|
|
70
|
+
role: Remediate failures, document permanent waivers with rationale
|
|
71
|
+
parallel: true
|
|
72
|
+
gate:
|
|
73
|
+
type: user_approval
|
|
74
|
+
description: User approves the conformance report (zero AA failures required)
|
|
75
|
+
outputs:
|
|
76
|
+
- type: document
|
|
77
|
+
format: markdown
|
|
78
|
+
obsidian_path: "WizardingCode/Brand/DesignSystems/Accessibility/"
|
|
79
|
+
description: WCAG AA conformance report — every component pass/waiver
|
|
80
|
+
|
|
81
|
+
- id: self-critique
|
|
82
|
+
name: Self-Critique
|
|
83
|
+
description: Stress-test the system — naming consistency, token coverage, scale integrity, edge-case components
|
|
84
|
+
agents:
|
|
85
|
+
- agent_id: brand-director-valentina
|
|
86
|
+
role: Verify naming consistency, token coverage, scale integrity, edge-case components
|
|
87
|
+
gate:
|
|
88
|
+
type: auto
|
|
89
|
+
|
|
90
|
+
- id: quality-gate
|
|
91
|
+
name: Quality Gate
|
|
92
|
+
model_override: opus
|
|
93
|
+
description: Mandatory quality review
|
|
94
|
+
agents:
|
|
95
|
+
- agent_id: cqo-marta
|
|
96
|
+
role: Orchestrate quality review
|
|
97
|
+
- agent_id: copy-director-eduardo
|
|
98
|
+
role: Component naming, prop names, docstring clarity, no AI clichés in copy
|
|
99
|
+
parallel: true
|
|
100
|
+
- agent_id: tech-director-francisca
|
|
101
|
+
role: Token schema integrity, accessibility compliance, Storybook contract correctness
|
|
102
|
+
parallel: true
|
|
103
|
+
gate:
|
|
104
|
+
type: quality_gate
|
|
105
|
+
required_verdict: APPROVED
|
|
106
|
+
|
|
107
|
+
- id: delivery
|
|
108
|
+
name: Design System Delivery
|
|
109
|
+
description: Compile the design system — tokens JSON + component catalog + WCAG report + Storybook story stubs
|
|
110
|
+
agents:
|
|
111
|
+
- agent_id: brand-director-valentina
|
|
112
|
+
role: Compile the design system package and write the integration guide
|
|
113
|
+
- agent_id: shadcn-padronizer
|
|
114
|
+
role: Optional shadcn/ui alignment for code-side parity
|
|
115
|
+
optional: true
|
|
116
|
+
gate:
|
|
117
|
+
type: auto
|
|
118
|
+
outputs:
|
|
119
|
+
- type: document
|
|
120
|
+
format: markdown
|
|
121
|
+
obsidian_path: "WizardingCode/Brand/DesignSystems/"
|
|
122
|
+
description: Complete design system — design-tokens.json + component catalog + accessibility report + Storybook stubs + integration guide
|
package/package.json
CHANGED