@cubis/foundry 0.3.69 → 0.3.71

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.
Files changed (180) hide show
  1. package/dist/cli/core.js +95 -2
  2. package/dist/cli/core.js.map +1 -1
  3. package/dist/cli/init/execute.js +6 -4
  4. package/dist/cli/init/execute.js.map +1 -1
  5. package/dist/cli/init/prompts.js +5 -0
  6. package/dist/cli/init/prompts.js.map +1 -1
  7. package/mcp/src/cbxConfig/index.ts +6 -1
  8. package/mcp/src/cbxConfig/serviceConfig.ts +38 -3
  9. package/mcp/src/cbxConfig/types.ts +6 -0
  10. package/mcp/src/gateway/config.ts +69 -8
  11. package/mcp/src/gateway/manager.ts +17 -6
  12. package/mcp/src/gateway/types.ts +1 -1
  13. package/mcp/src/server.ts +7 -3
  14. package/mcp/src/tools/playwrightGetStatus.ts +60 -0
  15. package/mcp/src/tools/registry.test.ts +26 -8
  16. package/mcp/src/tools/registry.ts +27 -1
  17. package/mcp/src/upstream/passthrough.ts +29 -5
  18. package/package.json +1 -1
  19. package/src/cli/core.ts +100 -5
  20. package/src/cli/init/execute.ts +14 -5
  21. package/src/cli/init/prompts.ts +5 -0
  22. package/src/cli/init/types.ts +1 -1
  23. package/workflows/powers/ask-questions-if-underspecified/SKILL.md +51 -3
  24. package/workflows/powers/behavioral-modes/SKILL.md +100 -9
  25. package/workflows/skills/agent-design/SKILL.md +198 -0
  26. package/workflows/skills/agent-design/references/clarification-patterns.md +153 -0
  27. package/workflows/skills/agent-design/references/skill-testing.md +164 -0
  28. package/workflows/skills/agent-design/references/workflow-patterns.md +226 -0
  29. package/workflows/skills/deep-research/SKILL.md +25 -20
  30. package/workflows/skills/deep-research/references/multi-round-research-loop.md +73 -8
  31. package/workflows/skills/frontend-design/SKILL.md +37 -32
  32. package/workflows/skills/frontend-design/commands/brand.md +167 -0
  33. package/workflows/skills/frontend-design/references/brand-presets.md +228 -0
  34. package/workflows/skills/generated/skill-audit.json +11 -2
  35. package/workflows/skills/generated/skill-catalog.json +842 -107
  36. package/workflows/skills/playwright-e2e/SKILL.md +21 -5
  37. package/workflows/skills/playwright-e2e/references/locator-trace-flake-checklist.md +28 -0
  38. package/workflows/skills/skills_index.json +803 -100
  39. package/workflows/workflows/agent-environment-setup/manifest.json +65 -9
  40. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/backend-specialist.md +6 -0
  41. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/code-archaeologist.md +7 -0
  42. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/database-architect.md +6 -0
  43. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/debugger.md +7 -0
  44. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/devops-engineer.md +6 -0
  45. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/documentation-writer.md +4 -0
  46. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/frontend-specialist.md +6 -0
  47. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/game-developer.md +1 -0
  48. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/mobile-developer.md +6 -0
  49. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/orchestrator.md +8 -0
  50. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/penetration-tester.md +4 -0
  51. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/performance-optimizer.md +4 -0
  52. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/product-manager.md +1 -0
  53. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/project-planner.md +8 -0
  54. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/qa-automation-engineer.md +1 -0
  55. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/researcher.md +5 -0
  56. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/security-auditor.md +6 -0
  57. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/seo-specialist.md +1 -0
  58. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/sre-engineer.md +6 -0
  59. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/test-engineer.md +5 -0
  60. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/validator.md +1 -0
  61. package/workflows/workflows/agent-environment-setup/platforms/antigravity/agents/vercel-expert.md +1 -0
  62. package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +1 -1
  63. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/backend-specialist.md +6 -0
  64. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/code-archaeologist.md +7 -0
  65. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/database-architect.md +6 -0
  66. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/debugger.md +7 -0
  67. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/devops-engineer.md +6 -0
  68. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/documentation-writer.md +4 -0
  69. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/frontend-specialist.md +6 -0
  70. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/game-developer.md +1 -0
  71. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/mobile-developer.md +6 -0
  72. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/orchestrator.md +8 -0
  73. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/penetration-tester.md +4 -0
  74. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/performance-optimizer.md +4 -0
  75. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/product-manager.md +1 -0
  76. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/project-planner.md +8 -0
  77. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/qa-automation-engineer.md +1 -0
  78. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/researcher.md +5 -0
  79. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/security-auditor.md +6 -0
  80. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/seo-specialist.md +1 -0
  81. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/sre-engineer.md +6 -0
  82. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/test-engineer.md +5 -0
  83. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/validator.md +1 -0
  84. package/workflows/workflows/agent-environment-setup/platforms/claude/agents/vercel-expert.md +1 -0
  85. package/workflows/workflows/agent-environment-setup/platforms/claude/rules/CLAUDE.md +77 -63
  86. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/agent-design/SKILL.md +198 -0
  87. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/agent-design/references/clarification-patterns.md +153 -0
  88. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/agent-design/references/skill-testing.md +164 -0
  89. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/agent-design/references/workflow-patterns.md +226 -0
  90. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/SKILL.md +25 -20
  91. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/references/multi-round-research-loop.md +73 -8
  92. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/frontend-design/SKILL.md +37 -32
  93. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/frontend-design/commands/brand.md +167 -0
  94. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/frontend-design/references/brand-presets.md +228 -0
  95. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/playwright-e2e/SKILL.md +21 -5
  96. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/playwright-e2e/references/locator-trace-flake-checklist.md +28 -0
  97. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/skills_index.json +803 -100
  98. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/backend-specialist.md +6 -0
  99. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/code-archaeologist.md +7 -0
  100. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/database-architect.md +6 -0
  101. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/debugger.md +7 -0
  102. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/devops-engineer.md +6 -0
  103. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/documentation-writer.md +4 -0
  104. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/frontend-specialist.md +6 -0
  105. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/game-developer.md +1 -0
  106. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/mobile-developer.md +6 -0
  107. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/orchestrator.md +8 -0
  108. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/penetration-tester.md +4 -0
  109. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/performance-optimizer.md +4 -0
  110. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/product-manager.md +1 -0
  111. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/project-planner.md +8 -0
  112. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/qa-automation-engineer.md +1 -0
  113. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/researcher.md +5 -0
  114. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/security-auditor.md +6 -0
  115. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/seo-specialist.md +1 -0
  116. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/sre-engineer.md +6 -0
  117. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/test-engineer.md +5 -0
  118. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/validator.md +1 -0
  119. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/vercel-expert.md +1 -0
  120. package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +1 -1
  121. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/backend-specialist.md +5 -0
  122. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/code-archaeologist.md +5 -0
  123. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/database-architect.md +5 -0
  124. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/debugger.md +5 -0
  125. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/devops-engineer.md +5 -0
  126. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/documentation-writer.md +3 -0
  127. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/frontend-specialist.md +5 -0
  128. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/mobile-developer.md +5 -0
  129. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/orchestrator.md +6 -0
  130. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/penetration-tester.md +3 -0
  131. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/performance-optimizer.md +3 -0
  132. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/project-planner.md +6 -0
  133. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/researcher.md +3 -0
  134. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/security-auditor.md +5 -0
  135. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/sre-engineer.md +5 -0
  136. package/workflows/workflows/agent-environment-setup/platforms/copilot/agents/test-engineer.md +3 -0
  137. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +87 -82
  138. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/agent-design/SKILL.md +197 -0
  139. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/agent-design/references/clarification-patterns.md +153 -0
  140. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/agent-design/references/skill-testing.md +164 -0
  141. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/agent-design/references/workflow-patterns.md +226 -0
  142. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/SKILL.md +25 -20
  143. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/references/multi-round-research-loop.md +73 -8
  144. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/frontend-design/SKILL.md +37 -32
  145. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/frontend-design/commands/brand.md +167 -0
  146. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/frontend-design/references/brand-presets.md +228 -0
  147. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/playwright-e2e/SKILL.md +21 -5
  148. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/playwright-e2e/references/locator-trace-flake-checklist.md +28 -0
  149. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/skills_index.json +803 -100
  150. package/workflows/workflows/agent-environment-setup/shared/agents/backend-specialist.md +6 -0
  151. package/workflows/workflows/agent-environment-setup/shared/agents/code-archaeologist.md +7 -0
  152. package/workflows/workflows/agent-environment-setup/shared/agents/database-architect.md +6 -0
  153. package/workflows/workflows/agent-environment-setup/shared/agents/debugger.md +7 -0
  154. package/workflows/workflows/agent-environment-setup/shared/agents/devops-engineer.md +6 -0
  155. package/workflows/workflows/agent-environment-setup/shared/agents/documentation-writer.md +4 -0
  156. package/workflows/workflows/agent-environment-setup/shared/agents/frontend-specialist.md +6 -0
  157. package/workflows/workflows/agent-environment-setup/shared/agents/game-developer.md +1 -0
  158. package/workflows/workflows/agent-environment-setup/shared/agents/mobile-developer.md +6 -0
  159. package/workflows/workflows/agent-environment-setup/shared/agents/orchestrator.md +8 -0
  160. package/workflows/workflows/agent-environment-setup/shared/agents/penetration-tester.md +4 -0
  161. package/workflows/workflows/agent-environment-setup/shared/agents/performance-optimizer.md +4 -0
  162. package/workflows/workflows/agent-environment-setup/shared/agents/product-manager.md +1 -0
  163. package/workflows/workflows/agent-environment-setup/shared/agents/project-planner.md +8 -0
  164. package/workflows/workflows/agent-environment-setup/shared/agents/qa-automation-engineer.md +1 -0
  165. package/workflows/workflows/agent-environment-setup/shared/agents/researcher.md +5 -0
  166. package/workflows/workflows/agent-environment-setup/shared/agents/security-auditor.md +6 -0
  167. package/workflows/workflows/agent-environment-setup/shared/agents/seo-specialist.md +1 -0
  168. package/workflows/workflows/agent-environment-setup/shared/agents/sre-engineer.md +6 -0
  169. package/workflows/workflows/agent-environment-setup/shared/agents/test-engineer.md +5 -0
  170. package/workflows/workflows/agent-environment-setup/shared/agents/validator.md +1 -0
  171. package/workflows/workflows/agent-environment-setup/shared/agents/vercel-expert.md +1 -0
  172. package/workflows/workflows/agent-environment-setup/shared/rules/STEERING.md +27 -4
  173. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/antigravity.md +18 -3
  174. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/claude.md +12 -4
  175. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/codex.md +12 -2
  176. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/copilot.md +13 -3
  177. package/workflows/skills/react-best-practices/docs/AGENTS.md +0 -2934
  178. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/react-best-practices/docs/AGENTS.md +0 -2934
  179. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/AGENTS.md +0 -25
  180. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/react-best-practices/docs/AGENTS.md +0 -2934
@@ -0,0 +1,226 @@
1
+ # Workflow Patterns Reference
2
+
3
+ Load this when choosing or implementing a workflow pattern for a CBX agent or skill.
4
+
5
+ Source: Anthropic engineering research — [Common workflow patterns for AI agents](https://claude.com/blog/common-workflow-patterns-for-ai-agents-and-when-to-use-them) (March 2026).
6
+
7
+ ---
8
+
9
+ ## The Core Insight
10
+
11
+ Workflows don't replace agent autonomy — they _shape where and how_ agents apply it.
12
+
13
+ A fully autonomous agent decides everything: tools, order, when to stop.
14
+ A workflow provides structure: overall flow, checkpoints, boundaries — but each step still uses full agent reasoning.
15
+
16
+ **Start with a single agent call.** If that meets quality bar, you're done. Only add workflow complexity when you can measure the improvement.
17
+
18
+ ---
19
+
20
+ ## Pattern 1: Sequential Workflow
21
+
22
+ ### What it is
23
+
24
+ Agents execute in a fixed order. Each stage processes its input, makes tool calls, then passes results to the next stage.
25
+
26
+ ```
27
+ Input → [Agent A] → [Agent B] → [Agent C] → Output
28
+ ```
29
+
30
+ ### Use when
31
+
32
+ - Steps have explicit dependencies (B needs A's output before starting)
33
+ - Multi-stage transformation where each step adds specific value
34
+ - Draft-review-polish cycles
35
+ - Data extraction → validation → loading pipelines
36
+
37
+ ### Avoid when
38
+
39
+ - A single agent can handle the whole task
40
+ - Agents need to collaborate rather than hand off linearly
41
+ - You're forcing sequential structure onto a task that doesn't naturally fit it
42
+
43
+ ### Cost/benefit
44
+
45
+ - **Cost:** Latency is linear — step 2 waits for step 1
46
+ - **Benefit:** Each agent focuses on one thing; accuracy often improves
47
+
48
+ ### CBX implementation
49
+
50
+ ```markdown
51
+ ## Workflow
52
+
53
+ 1. **[Agent/Step A]** — [what it receives, what it does, what it produces]
54
+ 2. **[Agent/Step B]** — [takes A's output, does X, produces Y]
55
+ 3. **[Agent/Step C]** — [final synthesis/delivery]
56
+
57
+ Artifacts pass via [file path / variable / structured JSON / natural handoff instructions].
58
+ ```
59
+
60
+ ### Pro tip
61
+
62
+ First try the pipeline as a single agent where the steps are part of the prompt. If quality is good enough, you've solved the problem without complexity.
63
+
64
+ ---
65
+
66
+ ## Pattern 2: Parallel Workflow
67
+
68
+ ### What it is
69
+
70
+ Multiple agents run simultaneously on independent tasks. Results are merged or synthesized afterward.
71
+
72
+ ```
73
+ ┌→ [Agent A] →┐
74
+ Input → ├→ [Agent B] →├→ Synthesize → Output
75
+ └→ [Agent C] →┘
76
+ ```
77
+
78
+ ### Use when
79
+
80
+ - Tasks are genuinely independent (no agent needs another's output to start)
81
+ - Speed matters and concurrent execution helps
82
+ - Multiple perspectives on the same input (e.g., code review from security + performance + quality)
83
+ - Separation of concerns — different engineers can own individual agents
84
+
85
+ ### Avoid when
86
+
87
+ - Agents need cumulative context or must build on each other's work
88
+ - Resource constraints (API quotas) make concurrent calls inefficient
89
+ - Aggregation logic is unclear or produces contradictory results with no resolution strategy
90
+
91
+ ### Cost/benefit
92
+
93
+ - **Cost:** Tokens multiply (N agents × tokens each); requires aggregation strategy
94
+ - **Benefit:** Faster completion; clean separation of concerns
95
+
96
+ ### CBX implementation
97
+
98
+ ```markdown
99
+ ## Parallel Steps
100
+
101
+ Run these simultaneously:
102
+
103
+ - **[Agent A]** — [focused task, specific scope]
104
+ - **[Agent B]** — [focused task, different scope]
105
+ - **[Agent C]** — [focused task, different scope]
106
+
107
+ ## Synthesis
108
+
109
+ After all agents complete:
110
+ [How to merge: majority vote / highest confidence / specialized agent defers to other / human review]
111
+ ```
112
+
113
+ ### Pro tip
114
+
115
+ Design your aggregation strategy _before_ implementing parallel agents. Without a clear merge plan, you collect conflicting outputs with no way to resolve them.
116
+
117
+ ---
118
+
119
+ ## Pattern 3: Evaluator-Optimizer Workflow
120
+
121
+ ### What it is
122
+
123
+ Two agents loop: one generates content, another evaluates it against criteria, the generator refines based on feedback. Repeat until quality threshold is met or max iterations reached.
124
+
125
+ ```
126
+ ┌─────────────────────────────────────┐
127
+ ↓ |
128
+ Input → [Generator] → Draft → [Evaluator] → Pass? → Output
129
+ ↓ Fail
130
+ Feedback → [Generator]
131
+ ```
132
+
133
+ ### Use when
134
+
135
+ - First-draft quality consistently falls short of the required bar
136
+ - You have clear, measurable quality criteria an AI evaluator can apply consistently
137
+ - The gap between first-attempt and final quality justifies extra tokens and latency
138
+ - Examples: technical docs, customer communications, code against specific standards
139
+
140
+ ### Avoid when
141
+
142
+ - First-attempt quality already meets requirements (unnecessary cost)
143
+ - Real-time applications needing immediate responses
144
+ - Evaluation criteria are too subjective for consistent AI evaluation
145
+ - Deterministic tools exist (linters for style, validators for schemas) — use those instead
146
+
147
+ ### Cost/benefit
148
+
149
+ - **Cost:** Tokens × iterations; adds latency proportionally
150
+ - **Benefit:** Structured feedback loops produce measurably better outputs
151
+
152
+ ### CBX implementation
153
+
154
+ ```markdown
155
+ ## Generator Prompt
156
+
157
+ Task: [what to create]
158
+ Constraints: [specific, measurable requirements]
159
+ Format: [exact output format]
160
+
161
+ ## Evaluator Prompt
162
+
163
+ Review this output against these criteria:
164
+
165
+ 1. [Criterion A] — Pass/Fail + specific failure note
166
+ 2. [Criterion B] — Pass/Fail + specific failure note
167
+ 3. [Criterion C] — Pass/Fail + specific failure note
168
+
169
+ Output JSON: { "pass": bool, "failures": ["..."], "revision_note": "..." }
170
+
171
+ ## Loop Control
172
+
173
+ - Max iterations: [3-5]
174
+ - Stop when: all criteria pass OR max iterations reached
175
+ - On max with failures: surface remaining issues for human review
176
+ ```
177
+
178
+ ### Pro tip
179
+
180
+ Set stopping criteria _before_ iterating. Define max iterations and specific quality thresholds. Without guardrails, you enter expensive loops where the evaluator finds minor issues and quality plateaus well before you stop.
181
+
182
+ ---
183
+
184
+ ## Decision Tree
185
+
186
+ ```
187
+ Can a single agent handle this task effectively?
188
+ → YES: Don't use workflows. Use a rich single-agent prompt.
189
+ → NO: Continue...
190
+
191
+ Do steps have dependencies (B needs A's output)?
192
+ → YES: Use Sequential
193
+ → NO: Continue...
194
+
195
+ Can steps run independently, and would concurrency help?
196
+ → YES: Use Parallel
197
+ → NO: Continue...
198
+
199
+ Does quality improve meaningfully through iteration, and can you measure it?
200
+ → YES: Use Evaluator-Optimizer
201
+ → NO: Re-examine whether workflows help at all
202
+ ```
203
+
204
+ ---
205
+
206
+ ## Combining Patterns
207
+
208
+ Patterns are building blocks, not mutually exclusive:
209
+
210
+ - A **sequential workflow** can include **parallel** steps at certain stages (e.g., three parallel reviewers before a final synthesis step)
211
+ - An **evaluator-optimizer** can use **parallel evaluation** where multiple evaluators assess different quality dimensions simultaneously
212
+ - A **sequential chain** can use **evaluator-optimizer** at the critical high-quality step
213
+
214
+ Only add the combination when each additional pattern measurably improves outcomes.
215
+
216
+ ---
217
+
218
+ ## Pattern Comparison
219
+
220
+ | | Sequential | Parallel | Evaluator-Optimizer |
221
+ | -------------- | -------------------------------------------- | --------------------------------------- | ------------------------------------ |
222
+ | **When** | Dependencies between steps | Independent tasks | Quality below bar |
223
+ | **Examples** | Extract → validate → load; Draft → translate | Code review (security + perf + quality) | Technical docs, comms, SQL |
224
+ | **Latency** | Linear (each waits for previous) | Fast (concurrent) | Multiplied by iterations |
225
+ | **Token cost** | Linear | Multiplicative | Linear × iterations |
226
+ | **Key risk** | Bottleneck at slow steps | Aggregation conflicts | Infinite loops without stop criteria |
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: deep-research
3
- description: "Use when a task needs multi-round research rather than a quick lookup: iterative search, gap finding, corroboration across sources, contradiction handling, or evidence-led synthesis before planning or implementation."
3
+ description: "Use when a task needs multi-round research rather than a quick lookup: iterative search, gap finding, corroboration across sources, contradiction handling, evidence-led synthesis before planning or implementation. Also use when the user asks for 'deep research', 'latest info', or 'how does X compare to Y publicly'."
4
4
  license: MIT
5
5
  metadata:
6
6
  author: cubis-foundry
7
- version: "1.0"
7
+ version: "1.1"
8
8
  compatibility: Claude Code, Codex, GitHub Copilot
9
9
  ---
10
10
 
@@ -14,23 +14,25 @@ compatibility: Claude Code, Codex, GitHub Copilot
14
14
 
15
15
  You are the specialist for iterative evidence gathering and synthesis.
16
16
 
17
- Your job is to find what is missing, not just summarize the first page of results.
17
+ Your job is to find what is missing, not just summarize the first page of results. Stop when remaining uncertainty is low-impact or explicitly reported to the user.
18
18
 
19
19
  ## When to Use
20
20
 
21
- - The task needs deep web or repo research before planning or implementation.
22
- - The first-pass answer is incomplete, contradictory, or likely stale.
23
- - The user explicitly asks for research, latest information, or public-repo comparison.
21
+ - The task needs deep web or repo research before planning or implementation
22
+ - The first-pass answer is incomplete, contradictory, or likely stale
23
+ - The user explicitly asks for research, latest information, or public-repo comparison
24
+ - Claims are contested or the topic changes fast (AI tooling, frameworks, protocols)
24
25
 
25
26
  ## Instructions
26
27
 
27
28
  ### STANDARD OPERATING PROCEDURE (SOP)
28
29
 
29
- 1. Define the question and what would count as enough evidence.
30
- 2. Run a first pass and identify gaps or contradictions.
30
+ 1. Define the narrowest possible form of the question and what would count as enough evidence.
31
+ 2. Run a first pass and identify gaps, contradictions, and missing facts.
31
32
  3. Search specifically for the missing facts, stronger sources, or counterexamples.
32
- 4. Rank sources by directness, recency, and authority.
33
- 5. Separate sourced facts, informed inference, and unresolved gaps.
33
+ 4. Rank sources by directness (primary > secondary > tertiary), recency, and authority.
34
+ 5. Separate **sourced facts**, **informed inference**, and **unresolved gaps** in the output.
35
+ 6. Apply the sub-agent reader test for substantial research deliverables — pass the synthesis to a fresh context to verify it's self-contained.
34
36
 
35
37
  ### Constraints
36
38
 
@@ -41,19 +43,22 @@ Your job is to find what is missing, not just summarize the first page of result
41
43
 
42
44
  ## Output Format
43
45
 
44
- Provide implementation guidance, code examples, and configuration as appropriate to the task.
46
+ Structure clearly as:
45
47
 
46
- ## References
47
-
48
- | File | Load when |
49
- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------- |
50
- | `references/multi-round-research-loop.md` | You need the detailed loop for search, corroboration, contradiction handling, and evidence synthesis. |
48
+ - **Key findings** — the answer, directly stated
49
+ - **Evidence** — sourced facts with citations ranked by confidence
50
+ - **Inference** what follows logically from the evidence (labeled as inference)
51
+ - **Open questions** what remains unresolved and why it matters
51
52
 
52
- ## Scripts
53
+ ## References
53
54
 
54
- No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
55
+ | File | Load when |
56
+ | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
57
+ | `references/multi-round-research-loop.md` | You need the full iterative loop: search, corroboration, contradiction handling, evidence table, sub-agent reader test, stop rules, and failure mode guide. |
55
58
 
56
59
  ## Examples
57
60
 
58
- - "Help me with deep research best practices in this project"
59
- - "Review my deep research implementation for issues"
61
+ - "Research how Anthropic structures their agent skills compare to what CBX does"
62
+ - "What's the latest on evaluator-optimizer patterns in production agent systems?"
63
+ - "Deep research on OKLCH vs HSL for design systems — what do practitioners actually use?"
64
+ - "Find counterexamples to the claim that parallel agents always improve speed"
@@ -1,15 +1,80 @@
1
1
  # Multi-Round Research Loop
2
2
 
3
- Load this when the research task is broad, unstable, or likely to have conflicting public sources.
3
+ Load this when the research task is broad, unstable, contested, or likely to have conflicting public sources — or when the user explicitly asks for deep or latest research.
4
4
 
5
- ## Loop
5
+ ## The Core Principle
6
6
 
7
- 1. Start with the narrowest question possible.
8
- 2. Record what the first pass did not answer.
9
- 3. Search directly for the missing facts or contradictions.
10
- 4. Prefer primary or official sources when they exist.
11
- 5. Keep a short evidence table: fact, source, confidence, open question.
7
+ Your job is to find what is _missing_, not just summarize the first page of results. Stop when remaining uncertainty is low-impact or explicitly reported back to the user.
8
+
9
+ ---
10
+
11
+ ## The Loop
12
+
13
+ ### Round 1: Define and search broadly
14
+
15
+ 1. **Narrow the question** — State the most specific version of what you're trying to find. Vague questions produce vague results.
16
+ 2. **Search** — Run initial queries across the most likely sources (official docs, engineering blogs, GitHub repos, research papers as appropriate).
17
+ 3. **Record gaps** — What did this pass _not_ answer? What's contradictory? What's suspiciously absent?
18
+
19
+ ### Round 2: Target the gaps
20
+
21
+ 4. **Search directly for the missing facts** — Use specific, targeted queries (not broad topic queries). Prefer: official docs > primary source blog > authoritative community reference > general article.
22
+ 5. **Search for contradictions** — If two sources disagree, search specifically for why. Age, version differences, and context often explain it.
23
+ 6. **Seek counterexamples** — Actively search for "X doesn't work", "X is wrong", "problems with X" — not just confirmation.
24
+
25
+ ### Round 3: Corroborate and synthesize
26
+
27
+ 7. **Cross-verify** unstable claims against at least one independent source.
28
+ 8. **Rank sources** by directness (primary > secondary > tertiary), recency (newer > older for fast-moving topics), and authority (official > community > anecdotal).
29
+ 9. **Write the evidence table** — Track what you found, not just conclusions:
30
+
31
+ | Fact | Source | Confidence | Open question |
32
+ | ------- | ------------ | ------------------- | ------------------------ |
33
+ | [Claim] | [URL or doc] | High / Medium / Low | [What's still uncertain] |
34
+
35
+ ---
12
36
 
13
37
  ## Stop Rule
14
38
 
15
- Stop only when the remaining uncertainty is either low-impact or explicitly reported back to the user.
39
+ Stop when:
40
+
41
+ - Remaining uncertainty is low-impact (won't change the recommendation)
42
+ - OR the question is genuinely unresolvable from public sources (report this explicitly)
43
+ - OR you've completed 3 rounds without new signal (diminishing returns — report what's known and what's not)
44
+
45
+ Do NOT stop after one source when the claim is unstable, contested, or from a secondary source.
46
+
47
+ ---
48
+
49
+ ## Output Format
50
+
51
+ Separate clearly:
52
+
53
+ - **Sourced facts** — you have direct evidence
54
+ - **Informed inference** — logically follows from evidence but not directly stated
55
+ - **Unresolved gaps** — you searched and didn't find it; note what's unknown
56
+
57
+ Do not present inference as fact. Do not present absence of evidence as evidence of absence.
58
+
59
+ ---
60
+
61
+ ## Common Research Failure Modes
62
+
63
+ | Failure | Fix |
64
+ | ------------------------------------- | -------------------------------------------------- |
65
+ | Stopping at first result | Check at least 2-3 sources for any unstable claim |
66
+ | Only finding confirmation | Actively search for counterexamples and criticisms |
67
+ | Treating recent = correct | Cross-check recency with authority and context |
68
+ | Vague queries returning vague results | Restate the question as a specific, narrow query |
69
+ | Reporting uncertainty as fact | Use "inference" or "unknown" tags explicitly |
70
+ | Burying the answer in context | Lead with the finding; evidence follows |
71
+
72
+ ---
73
+
74
+ ## Sub-Agent Reader Test
75
+
76
+ After completing research, if the output will be used by another agent or handed to a human without context:
77
+
78
+ - Pass the research summary to a fresh sub-agent with no conversation history
79
+ - Ask: "What is the main finding?", "What is still uncertain?", "What sources support the key claims?"
80
+ - If the fresh reader gets it wrong, the synthesis has context bleed — revise before delivery
@@ -32,9 +32,10 @@ Guide creation of distinctive, production-grade frontend interfaces that avoid g
32
32
  Before writing code, ask or infer:
33
33
 
34
34
  1. **Purpose** — What problem does this interface solve? Who uses it?
35
- 2. **Tone** — Pick a bold aesthetic direction: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian. There are many flavors. Pick one and commit.
36
- 3. **Constraints** — Technical requirements (framework, performance, a11y level, browser support).
37
- 4. **Differentiation** — What makes this UNFORGETTABLE? What's the one thing someone will remember?
35
+ 2. **Brand** — Is there an existing brand system, style guide, or named brand (e.g. "Anthropic", client guidelines, hex palette) to follow? If yes, load `references/brand-presets.md` and use `/brand` to apply it before choosing aesthetic direction.
36
+ 3. **Tone** — If no brand system exists, pick a bold aesthetic direction: brutally minimal, maximalist chaos, retro-futuristic, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian. There are many flavors. Pick one and commit.
37
+ 4. **Constraints** — Technical requirements (framework, performance, a11y level, browser support).
38
+ 5. **Differentiation** — What makes this UNFORGETTABLE? What's the one thing someone will remember?
38
39
 
39
40
  Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work — the key is intentionality, not intensity.
40
41
 
@@ -167,40 +168,42 @@ Deliver:
167
168
 
168
169
  Load only what the current step needs.
169
170
 
170
- | File | Load when |
171
- | ---------------------------------- | ---------------------------------------------------------------------------------------------------- |
172
- | `references/typography.md` | Task involves font selection, type scale, font loading, or text hierarchy decisions. |
173
- | `references/color-and-contrast.md` | Task involves palette selection, dark mode, OKLCH color, contrast ratios, or tinted neutrals. |
174
- | `references/spatial-design.md` | Task involves grid systems, spacing rhythm, container queries, or layout composition. |
175
- | `references/motion-design.md` | Task involves animation timing, easing curves, staggered reveals, or reduced motion support. |
176
- | `references/interaction-design.md` | Task involves form design, focus management, loading states, or progressive disclosure patterns. |
177
- | `references/responsive-design.md` | Task involves mobile-first design, fluid layouts, container queries, or adaptive interfaces. |
178
- | `references/ux-writing.md` | Task involves button labels, error messages, empty states, or microcopy decisions. |
179
- | `references/ux-psychology.md` | Task involves cognitive load, decision architecture, trust building, or emotional design principles. |
171
+ | File | Load when |
172
+ | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
173
+ | `references/typography.md` | Task involves font selection, type scale, font loading, or text hierarchy decisions. |
174
+ | `references/color-and-contrast.md` | Task involves palette selection, dark mode, OKLCH color, contrast ratios, or tinted neutrals. |
175
+ | `references/spatial-design.md` | Task involves grid systems, spacing rhythm, container queries, or layout composition. |
176
+ | `references/motion-design.md` | Task involves animation timing, easing curves, staggered reveals, or reduced motion support. |
177
+ | `references/interaction-design.md` | Task involves form design, focus management, loading states, or progressive disclosure patterns. |
178
+ | `references/responsive-design.md` | Task involves mobile-first design, fluid layouts, container queries, or adaptive interfaces. |
179
+ | `references/ux-writing.md` | Task involves button labels, error messages, empty states, or microcopy decisions. |
180
+ | `references/ux-psychology.md` | Task involves cognitive load, decision architecture, trust building, or emotional design principles. |
181
+ | `references/brand-presets.md` | Task involves applying existing brand guidelines, a named brand system (e.g. Anthropic), or converting a hex palette into CSS tokens. |
180
182
 
181
183
  ## Commands
182
184
 
183
185
  17 specialized commands for targeted design operations. Each command focuses on a specific design concern and can be applied to a whole page or a specific element.
184
186
 
185
- | Command | Purpose |
186
- | ------------------- | ----------------------------------------------------------------------------------------- |
187
- | `/audit` | Run technical quality checks: accessibility, performance, responsive behavior |
188
- | `/critique` | UX design review: hierarchy, clarity, emotional resonance, user flow |
189
- | `/normalize` | Align with design system standards: tokens, spacing, typography consistency |
190
- | `/polish` | Final pass before shipping: micro-details, alignment, visual refinement |
191
- | `/distill` | Strip to essence: remove unnecessary complexity, simplify without losing character |
192
- | `/clarify` | Improve unclear UX copy: labels, instructions, error messages, empty states |
193
- | `/optimize` | Performance improvements: image sizes, render-blocking, bundle impact |
194
- | `/harden` | Error handling, i18n readiness, edge cases, defensive UI patterns |
195
- | `/animate` | Add purposeful motion: transitions, micro-interactions, state changes |
196
- | `/colorize` | Introduce strategic color: palette refinement, accent placement, contrast fixes |
197
- | `/bolder` | Amplify timid designs: stronger hierarchy, more contrast, bigger gestures |
198
- | `/quieter` | Tone down overwhelming designs: reduce noise, increase whitespace, simplify |
199
- | `/delight` | Add moments of joy: easter eggs, satisfying interactions, personality |
200
- | `/extract` | Pull into reusable components: identify patterns, create component API |
201
- | `/adapt` | Adapt for different devices: responsive breakpoints, touch targets, viewport optimization |
202
- | `/onboard` | Design onboarding flows: first-run experience, empty states, progressive disclosure |
203
- | `/teach-impeccable` | One-time setup: gather project design context, save preferences for future sessions |
187
+ | Command | Purpose |
188
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------- |
189
+ | `/audit` | Run technical quality checks: accessibility, performance, responsive behavior |
190
+ | `/critique` | UX design review: hierarchy, clarity, emotional resonance, user flow |
191
+ | `/normalize` | Align with design system standards: tokens, spacing, typography consistency |
192
+ | `/polish` | Final pass before shipping: micro-details, alignment, visual refinement |
193
+ | `/distill` | Strip to essence: remove unnecessary complexity, simplify without losing character |
194
+ | `/clarify` | Improve unclear UX copy: labels, instructions, error messages, empty states |
195
+ | `/optimize` | Performance improvements: image sizes, render-blocking, bundle impact |
196
+ | `/harden` | Error handling, i18n readiness, edge cases, defensive UI patterns |
197
+ | `/animate` | Add purposeful motion: transitions, micro-interactions, state changes |
198
+ | `/colorize` | Introduce strategic color: palette refinement, accent placement, contrast fixes |
199
+ | `/bolder` | Amplify timid designs: stronger hierarchy, more contrast, bigger gestures |
200
+ | `/quieter` | Tone down overwhelming designs: reduce noise, increase whitespace, simplify |
201
+ | `/delight` | Add moments of joy: easter eggs, satisfying interactions, personality |
202
+ | `/extract` | Pull into reusable components: identify patterns, create component API |
203
+ | `/adapt` | Adapt for different devices: responsive breakpoints, touch targets, viewport optimization |
204
+ | `/onboard` | Design onboarding flows: first-run experience, empty states, progressive disclosure |
205
+ | `/teach-impeccable` | One-time setup: gather project design context, save preferences for future sessions |
206
+ | `/brand` | Apply or enforce a specific brand identity: convert guideline colors to CSS tokens, set typography, verify contrast |
204
207
 
205
208
  Usage: Most commands accept an optional argument to focus on a specific area (e.g., `/audit header`, `/polish checkout-form`).
206
209
 
@@ -212,3 +215,5 @@ Usage: Most commands accept an optional argument to focus on a specific area (e.
212
215
  - "/critique the checkout flow — is the hierarchy clear? Does it build trust?"
213
216
  - "/polish the hero section before we ship."
214
217
  - "I need a color system for a health tech app. No fintech blue, no AI purple."
218
+ - "/brand anthropic — apply Anthropic's brand colors and typography to this interface."
219
+ - "Here's our brand guide with hex values. Apply it to this dashboard — /brand"
@@ -0,0 +1,167 @@
1
+ # /brand
2
+
3
+ Apply or enforce a specific brand identity across a frontend. Works from uploaded brand guidelines, a style guide document, hex palettes, or a named brand system.
4
+
5
+ ## Usage
6
+
7
+ ```
8
+ /brand → Prompt for brand context, then apply
9
+ /brand anthropic → Apply Anthropic's brand system
10
+ /brand <hex-palette> → Build tokens from provided hex values
11
+ /brand <element> → Apply brand to a specific component or section
12
+ ```
13
+
14
+ ## What It Does
15
+
16
+ Converts brand guidelines into a living CSS token system and applies it consistently across the interface. Outputs production-ready tokens plus updated component styles.
17
+
18
+ ## Workflow
19
+
20
+ ### 1. Gather Brand Inputs
21
+
22
+ Ask for (or detect from context):
23
+
24
+ - **Color values** — Primary, secondary, accent hex codes (or link to brand guide)
25
+ - **Typography** — Font families for headings and body. If not specified, choose a pairing that matches the brand's tone
26
+ - **Named brand** — If the user says "Anthropic", "Stripe", "Linear", "Vercel" etc., load known reference patterns from `references/brand-presets.md`
27
+
28
+ ### 2. Convert to OKLCH Tokens
29
+
30
+ Translate all hex values to OKLCH for perceptual uniformity. See `references/brand-presets.md` for the full conversion workflow.
31
+
32
+ ```css
33
+ /* Pattern: convert every color to oklch */
34
+ --brand-[name]: oklch(L% C H);
35
+ ```
36
+
37
+ ### 3. Build Semantic Token Layer
38
+
39
+ Map raw brand tokens to semantic roles. Never reference raw tokens directly in components:
40
+
41
+ ```css
42
+ :root {
43
+ /* Surfaces */
44
+ --color-bg: var(--brand-surface);
45
+ --color-bg-subtle: var(--brand-subtle);
46
+ --color-bg-elevated: var(--brand-elevated);
47
+
48
+ /* Text */
49
+ --color-text: var(--brand-ink);
50
+ --color-text-muted: var(--brand-mid);
51
+
52
+ /* Interactive */
53
+ --color-accent: var(--brand-primary-accent);
54
+ --color-accent-hover: oklch(
55
+ from var(--brand-primary-accent) calc(l - 0.05) c h
56
+ );
57
+
58
+ /* Borders */
59
+ --color-border: var(--brand-subtle);
60
+ --color-border-focus: var(--brand-primary-accent);
61
+ }
62
+ ```
63
+
64
+ ### 4. Apply Typography
65
+
66
+ Set font families from brand guidelines and load them via Google Fonts or system stack:
67
+
68
+ ```css
69
+ @import url("https://fonts.googleapis.com/css2?family=DISPLAY_FONT&family=BODY_FONT&display=swap");
70
+
71
+ :root {
72
+ --font-display: "Display Font", fallback, sans-serif;
73
+ --font-body: "Body Font", fallback, serif;
74
+ }
75
+ ```
76
+
77
+ Apply via element targeting:
78
+
79
+ - Headings, labels, buttons, nav → `var(--font-display)`
80
+ - Body copy, prose, descriptions → `var(--font-body)`
81
+
82
+ ### 5. Output Deliverables
83
+
84
+ Deliver:
85
+
86
+ 1. **Complete token file** — `tokens.css` or `:root {}` block with all brand tokens + semantic layer
87
+ 2. **Typography setup** — Font import + application rules
88
+ 3. **Component overrides** — Button, card, link, input, badge in brand style
89
+ 4. **Dark mode** — Inverted/adapted token values for `prefers-color-scheme: dark`
90
+ 5. **Usage notes** — How to swap the brand accent, where NOT to use accent color, contrast verification
91
+
92
+ ---
93
+
94
+ ## Anthropic Brand Quick-Apply
95
+
96
+ When the user requests Anthropic brand styling, use this preset directly:
97
+
98
+ ```css
99
+ /* ========================================
100
+ ANTHROPIC BRAND TOKENS
101
+ Source: github.com/anthropics/skills
102
+ ======================================== */
103
+ @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400&display=swap");
104
+
105
+ :root {
106
+ /* Neutrals */
107
+ --brand-ink: oklch(10.5% 0.006 85);
108
+ --brand-cream: oklch(98.2% 0.008 85);
109
+ --brand-mid: oklch(72% 0.009 85);
110
+ --brand-subtle: oklch(92% 0.01 85);
111
+
112
+ /* Accents */
113
+ --brand-orange: oklch(65% 0.145 42);
114
+ --brand-blue: oklch(65% 0.09 235);
115
+ --brand-green: oklch(57% 0.09 130);
116
+
117
+ /* Semantic layer */
118
+ --color-bg: var(--brand-cream);
119
+ --color-bg-subtle: var(--brand-subtle);
120
+ --color-text: var(--brand-ink);
121
+ --color-text-secondary: var(--brand-mid);
122
+ --color-accent: var(--brand-orange);
123
+ --color-accent-secondary: var(--brand-blue);
124
+ --color-border: var(--brand-subtle);
125
+
126
+ /* Typography */
127
+ --font-display: "Poppins", Arial, sans-serif;
128
+ --font-body: "Lora", Georgia, serif;
129
+ }
130
+
131
+ @media (prefers-color-scheme: dark) {
132
+ :root {
133
+ --color-bg: var(--brand-ink);
134
+ --color-bg-subtle: oklch(16% 0.008 85);
135
+ --color-text: var(--brand-cream);
136
+ --color-text-secondary: var(--brand-mid);
137
+ --color-border: oklch(22% 0.008 85);
138
+ }
139
+ }
140
+ ```
141
+
142
+ ---
143
+
144
+ ## Accessibility Check After Applying
145
+
146
+ After applying brand tokens, verify:
147
+
148
+ 1. **Text contrast**: `--color-text` on `--color-bg` must pass WCAG AA (4.5:1 normal, 3:1 large)
149
+ 2. **Accent on background**: `--color-accent` used as text or border must meet 3:1 minimum against its background
150
+ 3. **Focus states**: `--color-border-focus` must be visually distinct (3:1 against surrounding colors)
151
+
152
+ For Anthropic's palette: cream `#faf9f5` on near-black `#141413` gives ~18:1 — passes AAA. Orange `#d97757` on cream gives ~3.2:1 — acceptable for large text and UI components, not for small body text.
153
+
154
+ ---
155
+
156
+ ## Tone Alignment
157
+
158
+ After applying brand colors, make sure the _design choices_ match the brand character:
159
+
160
+ | Brand character | Design implication |
161
+ | ------------------------------------ | ---------------------------------------------------------------------------- |
162
+ | Warm, editorial (Anthropic) | Generous whitespace, serif body, soft borders, understated motion |
163
+ | Precise, minimal (Linear, Vercel) | Tight spacing, geometric sans only, sharp edges, instant transitions |
164
+ | Bold, consumer (Spotify, Duolingo) | Color-heavy, large type, playful shapes, expressive animation |
165
+ | Trustworthy, enterprise (Salesforce) | Blue-dominant, structured grids, conservative type, high information density |
166
+
167
+ Color alone doesn't make a branded interface feel right — spacing, motion, and layout personality must match.