@forgespace/branding-mcp 0.7.0 → 0.8.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 +41 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/lib/branding-core/ai/claude-interpreter.d.ts.map +1 -1
- package/dist/lib/branding-core/ai/claude-interpreter.js +8 -19
- package/dist/lib/branding-core/ai/claude-interpreter.js.map +1 -1
- package/dist/lib/branding-core/exporters/style-dictionary.d.ts +19 -0
- package/dist/lib/branding-core/exporters/style-dictionary.d.ts.map +1 -0
- package/dist/lib/branding-core/exporters/style-dictionary.js +85 -0
- package/dist/lib/branding-core/exporters/style-dictionary.js.map +1 -0
- package/dist/lib/branding-core/generators/brand-voice.d.ts +3 -0
- package/dist/lib/branding-core/generators/brand-voice.d.ts.map +1 -0
- package/dist/lib/branding-core/generators/brand-voice.js +338 -0
- package/dist/lib/branding-core/generators/brand-voice.js.map +1 -0
- package/dist/lib/branding-core/index.d.ts +2 -0
- package/dist/lib/branding-core/index.d.ts.map +1 -1
- package/dist/lib/branding-core/index.js +2 -0
- package/dist/lib/branding-core/index.js.map +1 -1
- package/dist/lib/branding-core/validators/token-schema.d.ts +1 -1
- package/dist/lib/branding-core/validators/token-schema.d.ts.map +1 -1
- package/dist/lib/branding-core/validators/token-schema.js +9 -1
- package/dist/lib/branding-core/validators/token-schema.js.map +1 -1
- package/dist/lib/config.d.ts +3 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +5 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/http-server.d.ts +3 -0
- package/dist/lib/http-server.d.ts.map +1 -0
- package/dist/lib/http-server.js +93 -0
- package/dist/lib/http-server.js.map +1 -0
- package/dist/lib/types.d.ts +27 -1
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/tools/export-design-tokens.d.ts.map +1 -1
- package/dist/tools/export-design-tokens.js +2 -1
- package/dist/tools/export-design-tokens.js.map +1 -1
- package/dist/tools/generate-brand-voice.d.ts +3 -0
- package/dist/tools/generate-brand-voice.d.ts.map +1 -0
- package/dist/tools/generate-brand-voice.js +51 -0
- package/dist/tools/generate-brand-voice.js.map +1 -0
- package/dist/tools/generate-design-system.d.ts.map +1 -1
- package/dist/tools/generate-design-system.js +2 -1
- package/dist/tools/generate-design-system.js.map +1 -1
- package/package.json +21 -3
- package/server.json +41 -0
- package/.env.example +0 -3
- package/.github/CODEOWNERS +0 -1
- package/.github/ISSUE_TEMPLATE/config.yml +0 -8
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -22
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -22
- package/.github/dependabot.yml +0 -17
- package/.github/workflows/ci.yml +0 -55
- package/.github/workflows/codeql.yml +0 -47
- package/.github/workflows/release-automation.yml +0 -56
- package/.github/workflows/secret-scan.yml +0 -13
- package/.github/workflows/security-scan.yml +0 -37
- package/.github/workflows/semgrep.yml +0 -12
- package/.github/workflows/trivy.yml +0 -17
- package/.gitleaks.toml +0 -14
- package/.husky/commit-msg +0 -1
- package/.nvmrc +0 -1
- package/.prettierrc.json +0 -10
- package/CHANGELOG.md +0 -114
- package/CONTRIBUTING.md +0 -203
- package/catalog-info.yaml +0 -16
- package/commitlint.config.cjs +0 -24
- package/data/README.md +0 -13
- package/docs/API.md +0 -110
- package/docs/DATA_SOURCES.md +0 -69
- package/docs/INTEGRATION.md +0 -58
- package/eslint.config.js +0 -52
- package/jest.config.js +0 -40
- package/knip.json +0 -10
- package/src/__tests__/integration/brand-generation.test.ts +0 -84
- package/src/__tests__/integration/mcp-server.test.ts +0 -18
- package/src/__tests__/unit/ai-interpreter.test.ts +0 -172
- package/src/__tests__/unit/border-system.test.ts +0 -77
- package/src/__tests__/unit/color-palette.test.ts +0 -161
- package/src/__tests__/unit/contrast-checker.test.ts +0 -124
- package/src/__tests__/unit/design-system-tool.test.ts +0 -176
- package/src/__tests__/unit/design-tokens.test.ts +0 -184
- package/src/__tests__/unit/favicon-generator.test.ts +0 -80
- package/src/__tests__/unit/gradient-system.test.ts +0 -122
- package/src/__tests__/unit/logo-generator.test.ts +0 -146
- package/src/__tests__/unit/motion-system.test.ts +0 -91
- package/src/__tests__/unit/og-image-generator.test.ts +0 -115
- package/src/__tests__/unit/shadow-system.test.ts +0 -63
- package/src/__tests__/unit/spacing-scale.test.ts +0 -60
- package/src/__tests__/unit/typography-system.test.ts +0 -71
- package/src/index.ts +0 -76
- package/src/lib/branding-core/ai/brand-interpreter.ts +0 -30
- package/src/lib/branding-core/ai/claude-interpreter.ts +0 -76
- package/src/lib/branding-core/ai/intent-applier.ts +0 -59
- package/src/lib/branding-core/ai/keyword-interpreter.ts +0 -95
- package/src/lib/branding-core/ai/prompts.ts +0 -93
- package/src/lib/branding-core/ai/types.ts +0 -36
- package/src/lib/branding-core/documents/html-generator.ts +0 -32
- package/src/lib/branding-core/documents/pdf-generator.ts +0 -21
- package/src/lib/branding-core/exporters/css-variables.ts +0 -71
- package/src/lib/branding-core/exporters/design-tokens.ts +0 -86
- package/src/lib/branding-core/exporters/figma-tokens.ts +0 -87
- package/src/lib/branding-core/exporters/react-theme.ts +0 -69
- package/src/lib/branding-core/exporters/sass-variables.ts +0 -74
- package/src/lib/branding-core/exporters/tailwind-preset.ts +0 -67
- package/src/lib/branding-core/generators/border-system.ts +0 -41
- package/src/lib/branding-core/generators/color-palette.ts +0 -147
- package/src/lib/branding-core/generators/favicon-generator.ts +0 -33
- package/src/lib/branding-core/generators/gradient-system.ts +0 -120
- package/src/lib/branding-core/generators/logo-generator.ts +0 -152
- package/src/lib/branding-core/generators/motion-system.ts +0 -98
- package/src/lib/branding-core/generators/og-image-generator.ts +0 -97
- package/src/lib/branding-core/generators/shadow-system.ts +0 -66
- package/src/lib/branding-core/generators/spacing-scale.ts +0 -29
- package/src/lib/branding-core/generators/typography-system.ts +0 -128
- package/src/lib/branding-core/index.ts +0 -28
- package/src/lib/branding-core/validators/brand-consistency.ts +0 -79
- package/src/lib/branding-core/validators/contrast-checker.ts +0 -37
- package/src/lib/branding-core/validators/token-schema.ts +0 -50
- package/src/lib/config.ts +0 -13
- package/src/lib/logger.ts +0 -12
- package/src/lib/types.ts +0 -236
- package/src/resources/brand-knowledge.ts +0 -60
- package/src/resources/brand-templates.ts +0 -385
- package/src/tools/create-brand-guidelines.ts +0 -94
- package/src/tools/export-design-tokens.ts +0 -52
- package/src/tools/generate-brand-assets.ts +0 -48
- package/src/tools/generate-brand-identity.ts +0 -115
- package/src/tools/generate-color-palette.ts +0 -43
- package/src/tools/generate-design-system.ts +0 -163
- package/src/tools/generate-typography-system.ts +0 -42
- package/src/tools/refine-brand-element.ts +0 -65
- package/src/tools/validate-brand-consistency.ts +0 -32
- package/tsconfig.json +0 -21
package/CHANGELOG.md
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## [Unreleased]
|
|
6
|
-
|
|
7
|
-
## [0.7.0] - 2026-03-07
|
|
8
|
-
|
|
9
|
-
### Added
|
|
10
|
-
|
|
11
|
-
- **Import cycle detection** — `madge --circular` via `npm run check:cycles`
|
|
12
|
-
- **Dead code detection** — knip config with library export exclusions
|
|
13
|
-
- **Security scanning** — Semgrep CE and Trivy integration in CI
|
|
14
|
-
- **Issue templates** — Bug report and feature request templates
|
|
15
|
-
- **Service catalog** — catalog-info.yaml for IDP service discovery
|
|
16
|
-
- **Ecosystem health** — Dependabot config, .nvmrc, CODEOWNERS
|
|
17
|
-
|
|
18
|
-
### Changed
|
|
19
|
-
|
|
20
|
-
- **CI workflows** — Migrated to org-wide reusable workflows for security scans and Node.js setup
|
|
21
|
-
- **Dependency updates** — Bumped lint-staged (15.5.2→16.3.2), actions/setup-node (4→6), actions/checkout (4→6), trufflesecurity/trufflehog (3.93.3→3.93.7), and minor/patch group updates
|
|
22
|
-
|
|
23
|
-
### Removed
|
|
24
|
-
|
|
25
|
-
- Unused dependencies: `culori`, `pdfkit`, `satori`, `sharp`, `@types/pdfkit`
|
|
26
|
-
|
|
27
|
-
## [0.6.2] - 2026-03-07
|
|
28
|
-
|
|
29
|
-
### Fixed
|
|
30
|
-
|
|
31
|
-
- **WCAG contrast compliance** — Secondary (#3B82F6→#2563EB) and accent (#F59E0B→#B45309) colors now pass AA 4.5:1 on white backgrounds. Brand consistency score 75→100
|
|
32
|
-
|
|
33
|
-
## [0.6.1] - 2026-03-06
|
|
34
|
-
|
|
35
|
-
### Changed
|
|
36
|
-
|
|
37
|
-
- **Modern Horn brand templates** — Default Forge Space logo SVGs updated to Modern Horn icon geometry and Sora wordmark (#A78BFA/#8B5CF6/#6D28D9)
|
|
38
|
-
|
|
39
|
-
## [0.6.0] - 2026-03-01
|
|
40
|
-
|
|
41
|
-
### Added
|
|
42
|
-
|
|
43
|
-
- Public type exports from package entry point: `BrandIdentity`, `ColorPalette`, `TypographySystem`, `SpacingScale`, `ShadowSystem`, `BorderSystem`, `MotionSystem`, `GradientSystem`, `LogoOutput`, `BrandStyle`, `ColorHarmony`, `ExportFormat`
|
|
44
|
-
- Enables downstream packages (`@forgespace/brand-guide`) to re-export types without reaching into internal paths
|
|
45
|
-
|
|
46
|
-
## [0.5.0] - 2026-02-28
|
|
47
|
-
|
|
48
|
-
### Added
|
|
49
|
-
|
|
50
|
-
- New MCP tool: `generate_design_system` — complete design system in one call (identity + token export combined)
|
|
51
|
-
- 10 new tests for design system tool (198 total across 16 suites)
|
|
52
|
-
|
|
53
|
-
## [0.4.0] - 2026-02-28
|
|
54
|
-
|
|
55
|
-
### Added
|
|
56
|
-
|
|
57
|
-
- Gradient system generator with 5 style-aware presets (hero, button, card, text, background) across 8 brand styles
|
|
58
|
-
- Multi-variant logo generator: wordmark, monogram, abstract, icon (4 SVG variants per brand)
|
|
59
|
-
- Favicon generator producing 4 sizes (16, 32, 180, 512) with stroke optimization for small sizes
|
|
60
|
-
- OG image templates: default (1200x630), article (1200x630), social (1200x1200) with brand gradient backgrounds
|
|
61
|
-
- New MCP tool: `generate_brand_assets` for favicon and OG image generation from existing brand identity
|
|
62
|
-
- All 6 exporters support gradient tokens (CSS, Tailwind, W3C JSON, Figma, React, Sass)
|
|
63
|
-
- 55 new tests (188 total), 15 test suites
|
|
64
|
-
|
|
65
|
-
### Changed
|
|
66
|
-
|
|
67
|
-
- Logo generator uses brand typography font instead of hardcoded Inter
|
|
68
|
-
- `LogoOutput` now includes `variants` record alongside backward-compatible `svg` field
|
|
69
|
-
- `LogoConfig` accepts optional `style` for style-aware monogram/abstract shapes
|
|
70
|
-
|
|
71
|
-
## [0.3.0] - 2026-02-28
|
|
72
|
-
|
|
73
|
-
### Added
|
|
74
|
-
|
|
75
|
-
- Shadow/elevation system generator with 6 levels (none, sm, md, lg, xl, 2xl), brand-tinted colors, light/dark theme support
|
|
76
|
-
- Border/shape system generator with style-aware radius scales and border widths for all 8 brand styles
|
|
77
|
-
- Motion/animation system generator with duration scales, cubic-bezier easings, and transition presets per brand style
|
|
78
|
-
- New token types in `BrandIdentity`: `shadows`, `borders`, `motion` (backward-compatible, optional)
|
|
79
|
-
- All 6 exporters updated: CSS variables, Tailwind preset, W3C JSON, Figma tokens, React theme, Sass variables now include shadow, border, and motion tokens
|
|
80
|
-
- `generate_brand_identity` tool now includes shadows, borders, and motion in output
|
|
81
|
-
- 36 new tests (133 total), 98.36% statement coverage, 100% function coverage
|
|
82
|
-
|
|
83
|
-
## [0.2.0] - 2026-02-24
|
|
84
|
-
|
|
85
|
-
### Added
|
|
86
|
-
|
|
87
|
-
- AI interpretation layer for natural language brand refinement (`src/lib/branding-core/ai/`)
|
|
88
|
-
- Strategy pattern: keyword (zero-cost), Claude API (Anthropic Messages), and auto (fallback) interpreters
|
|
89
|
-
- `BrandIntent` abstraction decoupling NL understanding from generator execution
|
|
90
|
-
- 20+ color keywords (warm, vibrant, premium, muted, dark, elegant, etc.) with HSL shift values
|
|
91
|
-
- 15+ typography keywords (serif, editorial, dramatic, modern, compact, etc.) with font/scale mapping
|
|
92
|
-
- `intent-applier` module applying HSL hue/saturation/lightness shifts before palette generation
|
|
93
|
-
- Structured Claude prompts with brand context, JSON schema, and design principles
|
|
94
|
-
- Optional `strategy` parameter on `refine_brand_element` tool (keyword/ai/auto)
|
|
95
|
-
- `_interpretation` metadata in refinement responses showing strategy used and reasoning
|
|
96
|
-
- 24 new tests for AI interpreter, intent applier, and strategy selection (97 total)
|
|
97
|
-
|
|
98
|
-
## [0.1.0] - 2026-02-24
|
|
99
|
-
|
|
100
|
-
### Added
|
|
101
|
-
|
|
102
|
-
- Initial project structure with MCP server architecture
|
|
103
|
-
- Color palette generator with 6 harmony modes (complementary, analogous, triadic, split-complementary, tetradic, monochromatic)
|
|
104
|
-
- Typography system generator with modular type scales and curated font pairings
|
|
105
|
-
- Spacing scale generator with geometric progression
|
|
106
|
-
- SVG logo generator with brand colors and initials
|
|
107
|
-
- 6 design token exporters: W3C JSON, CSS custom properties, Tailwind preset, Figma tokens, React theme, Sass variables
|
|
108
|
-
- WCAG contrast checker (AA/AAA compliance)
|
|
109
|
-
- Brand consistency validator with scoring
|
|
110
|
-
- HTML brand guidelines generator
|
|
111
|
-
- 7 MCP tools: generate_brand_identity, generate_color_palette, generate_typography_system, export_design_tokens, create_brand_guidelines, validate_brand_consistency, refine_brand_element
|
|
112
|
-
- 2 MCP resources: brand templates catalog, brand knowledge base
|
|
113
|
-
- Unit and integration test suite
|
|
114
|
-
- CI/CD workflows (lint, test, build, security scan)
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
# Contributing to Branding MCP
|
|
2
|
-
|
|
3
|
-
Thank you for contributing to Branding MCP. This guide covers everything you need to know to submit high-quality contributions.
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
|
|
7
|
-
- [Code of Conduct](#code-of-conduct)
|
|
8
|
-
- [Getting Started](#getting-started)
|
|
9
|
-
- [Development Workflow](#development-workflow)
|
|
10
|
-
- [Code Standards](#code-standards)
|
|
11
|
-
- [Testing Requirements](#testing-requirements)
|
|
12
|
-
- [Pull Request Process](#pull-request-process)
|
|
13
|
-
- [Review Process](#review-process)
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Code of Conduct
|
|
18
|
-
|
|
19
|
-
All contributors are expected to be respectful, constructive, and professional. Harassment or exclusionary behavior will not be tolerated.
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Getting Started
|
|
24
|
-
|
|
25
|
-
### 1. Fork and clone
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
git clone https://github.com/Forge-Space/branding-mcp.git
|
|
29
|
-
cd branding-mcp
|
|
30
|
-
npm install
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### 2. Create a feature branch
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
git checkout -b feat/my-feature
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### 3. Validate your environment
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
npm run validate
|
|
43
|
-
npm test
|
|
44
|
-
npm run build
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Development Workflow
|
|
50
|
-
|
|
51
|
-
### Repository structure
|
|
52
|
-
|
|
53
|
-
Branding MCP is a TypeScript-based MCP server that provides brand identity resources for the Forge Space ecosystem.
|
|
54
|
-
|
|
55
|
-
### Commands
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
npm install # Install dependencies
|
|
59
|
-
npm run build # Build TypeScript to JavaScript
|
|
60
|
-
npm run validate # Validate MCP server configuration
|
|
61
|
-
npm test # Run test suite
|
|
62
|
-
npm run dev # Development mode with watch
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
### Branch flow
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
feature → main
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
This repository uses simplified trunk-based development. Feature branches merge directly to `main` after review.
|
|
72
|
-
|
|
73
|
-
### Commit message format
|
|
74
|
-
|
|
75
|
-
Follow Angular conventional commits:
|
|
76
|
-
|
|
77
|
-
```
|
|
78
|
-
feat(tools): add brand color palette tool
|
|
79
|
-
fix(server): resolve resource loading error
|
|
80
|
-
docs(readme): update usage examples
|
|
81
|
-
refactor(types): simplify brand schema types
|
|
82
|
-
test(tools): add validation tests
|
|
83
|
-
chore(deps): upgrade @modelcontextprotocol/sdk
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
Types: `feat`, `fix`, `docs`, `refactor`, `test`, `perf`, `chore`
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Code Standards
|
|
91
|
-
|
|
92
|
-
### TypeScript
|
|
93
|
-
|
|
94
|
-
- Strict mode enabled
|
|
95
|
-
- No `any` types without justification
|
|
96
|
-
- All functions must have explicit return types
|
|
97
|
-
- Use type imports: `import type { ... }`
|
|
98
|
-
|
|
99
|
-
### Code quality
|
|
100
|
-
|
|
101
|
-
- Functions: maximum 50 lines
|
|
102
|
-
- Cyclomatic complexity: maximum 10
|
|
103
|
-
- Line width: maximum 100 characters
|
|
104
|
-
- No comments unless explicitly requested or documenting complex algorithms
|
|
105
|
-
|
|
106
|
-
### MCP conventions
|
|
107
|
-
|
|
108
|
-
- Follow Model Context Protocol specification
|
|
109
|
-
- Tools must have clear descriptions and schemas
|
|
110
|
-
- Resources must be properly typed
|
|
111
|
-
- Prompts should be concise and actionable
|
|
112
|
-
|
|
113
|
-
### Security
|
|
114
|
-
|
|
115
|
-
- Never commit secrets or credentials
|
|
116
|
-
- Use environment variables for configuration
|
|
117
|
-
- Validate all user inputs
|
|
118
|
-
- Sanitize all outputs
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## Testing Requirements
|
|
123
|
-
|
|
124
|
-
### Coverage targets
|
|
125
|
-
|
|
126
|
-
- Overall coverage: minimum 80%
|
|
127
|
-
- Tool handlers: 100%
|
|
128
|
-
- Edge cases and error conditions required
|
|
129
|
-
|
|
130
|
-
### What to test
|
|
131
|
-
|
|
132
|
-
- Tool handler logic
|
|
133
|
-
- Resource loading and validation
|
|
134
|
-
- Schema validation
|
|
135
|
-
- Error handling and edge cases
|
|
136
|
-
- MCP protocol compliance
|
|
137
|
-
|
|
138
|
-
### What NOT to test
|
|
139
|
-
|
|
140
|
-
- Trivial getters/setters
|
|
141
|
-
- Simple enum definitions
|
|
142
|
-
- Third-party library behavior
|
|
143
|
-
|
|
144
|
-
### Running tests
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
npm test # Run all tests
|
|
148
|
-
npm test -- --coverage # Generate coverage report
|
|
149
|
-
npm test -- --watch # Watch mode
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## Pull Request Process
|
|
155
|
-
|
|
156
|
-
### Before opening a PR
|
|
157
|
-
|
|
158
|
-
Ensure all of the following pass:
|
|
159
|
-
|
|
160
|
-
```
|
|
161
|
-
- [ ] npm run validate passes
|
|
162
|
-
- [ ] npm test passes with all tests green
|
|
163
|
-
- [ ] npm run build succeeds
|
|
164
|
-
- [ ] MCP server starts without errors
|
|
165
|
-
- [ ] No secrets or credentials committed
|
|
166
|
-
- [ ] CHANGELOG.md updated under [Unreleased]
|
|
167
|
-
- [ ] README.md updated if tools or resources changed
|
|
168
|
-
- [ ] Commit messages follow conventional commit format
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
### PR checklist
|
|
172
|
-
|
|
173
|
-
1. Push your branch: `git push origin feat/my-feature`
|
|
174
|
-
2. Open PR targeting `main` branch
|
|
175
|
-
3. Fill in the PR template completely
|
|
176
|
-
4. Link related issues using `Closes #123` syntax
|
|
177
|
-
5. Request review from maintainers
|
|
178
|
-
6. Address all review feedback
|
|
179
|
-
|
|
180
|
-
### PR title format
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
feat(tools): add logo variants tool
|
|
184
|
-
fix(resources): resolve SVG encoding issue
|
|
185
|
-
docs: update tool usage guide
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
## Review Process
|
|
191
|
-
|
|
192
|
-
1. **Automated CI** runs lint, type-check, build, tests, and MCP validation
|
|
193
|
-
2. **Maintainer review** checks code quality, MCP compliance, and standards
|
|
194
|
-
3. **Approval** requires CI passing + at least 1 maintainer approval
|
|
195
|
-
4. **Merge** is done by a maintainer using squash merge to `main`
|
|
196
|
-
|
|
197
|
-
Typical review turnaround: 2-5 business days.
|
|
198
|
-
|
|
199
|
-
---
|
|
200
|
-
|
|
201
|
-
## Questions?
|
|
202
|
-
|
|
203
|
-
Open a [GitHub Discussion](https://github.com/Forge-Space/branding-mcp/discussions) or file an [issue](https://github.com/Forge-Space/branding-mcp/issues).
|
package/catalog-info.yaml
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
apiVersion: backstage.io/v1alpha1
|
|
2
|
-
kind: Service
|
|
3
|
-
metadata:
|
|
4
|
-
name: branding-mcp
|
|
5
|
-
description: MCP server for brand-aware design generation and WCAG validation
|
|
6
|
-
tags:
|
|
7
|
-
- typescript
|
|
8
|
-
- mcp
|
|
9
|
-
- design
|
|
10
|
-
- npm
|
|
11
|
-
spec:
|
|
12
|
-
owner: forge-space
|
|
13
|
-
system: siza
|
|
14
|
-
lifecycle: production
|
|
15
|
-
dependsOn:
|
|
16
|
-
- brand-guide
|
package/commitlint.config.cjs
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends: ['@commitlint/config-conventional'],
|
|
3
|
-
rules: {
|
|
4
|
-
'type-enum': [
|
|
5
|
-
2,
|
|
6
|
-
'always',
|
|
7
|
-
[
|
|
8
|
-
'feat',
|
|
9
|
-
'fix',
|
|
10
|
-
'docs',
|
|
11
|
-
'style',
|
|
12
|
-
'refactor',
|
|
13
|
-
'perf',
|
|
14
|
-
'test',
|
|
15
|
-
'chore',
|
|
16
|
-
'ci',
|
|
17
|
-
'build',
|
|
18
|
-
'revert',
|
|
19
|
-
],
|
|
20
|
-
],
|
|
21
|
-
'header-max-length': [2, 'always', 100],
|
|
22
|
-
'subject-case': [0],
|
|
23
|
-
},
|
|
24
|
-
};
|
package/data/README.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# Knowledge Base
|
|
2
|
-
|
|
3
|
-
This directory contains reference data for brand identity generation.
|
|
4
|
-
|
|
5
|
-
## Structure
|
|
6
|
-
|
|
7
|
-
- `color-theory/` — Color harmony rules, psychology, and accessibility standards
|
|
8
|
-
- `typography/` — Font pairing data, type scale references, and readability guidelines
|
|
9
|
-
- `brand-guidelines-examples/` — Reference brand guides for pattern extraction
|
|
10
|
-
|
|
11
|
-
## Sources
|
|
12
|
-
|
|
13
|
-
All data is sourced from open-licensed references. See `docs/DATA_SOURCES.md` for the complete catalog.
|
package/docs/API.md
DELETED
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
# MCP Tool API Reference
|
|
2
|
-
|
|
3
|
-
## generate_brand_identity
|
|
4
|
-
|
|
5
|
-
Generate a complete brand identity from minimal input.
|
|
6
|
-
|
|
7
|
-
**Parameters:**
|
|
8
|
-
| Name | Type | Required | Description |
|
|
9
|
-
|------|------|----------|-------------|
|
|
10
|
-
| brandName | string | yes | Brand name (1-100 chars) |
|
|
11
|
-
| industry | string | yes | Industry sector |
|
|
12
|
-
| style | BrandStyle | yes | Visual direction |
|
|
13
|
-
| tagline | string | no | Brand tagline |
|
|
14
|
-
| baseColor | hex string | no | Base color preference |
|
|
15
|
-
| harmony | ColorHarmony | no | Color harmony type |
|
|
16
|
-
| theme | ColorTheme | no | Light/dark/both |
|
|
17
|
-
| headingCategory | FontCategory | no | Heading font category |
|
|
18
|
-
| bodyCategory | FontCategory | no | Body font category |
|
|
19
|
-
| scaleRatio | TypeScaleRatio | no | Typography scale ratio |
|
|
20
|
-
|
|
21
|
-
**Returns:** Complete `BrandIdentity` JSON with colors, typography, spacing, and logo.
|
|
22
|
-
|
|
23
|
-
## generate_color_palette
|
|
24
|
-
|
|
25
|
-
Generate a color palette from a base color and harmony.
|
|
26
|
-
|
|
27
|
-
**Parameters:**
|
|
28
|
-
| Name | Type | Required | Description |
|
|
29
|
-
|------|------|----------|-------------|
|
|
30
|
-
| baseColor | hex string | no | Base hex color (#RRGGBB) |
|
|
31
|
-
| harmony | ColorHarmony | no | Harmony type |
|
|
32
|
-
| theme | ColorTheme | no | Neutral scale direction |
|
|
33
|
-
|
|
34
|
-
**Returns:** `ColorPalette` with primary, secondary, accent, neutrals, semantic colors, and WCAG contrast data.
|
|
35
|
-
|
|
36
|
-
## generate_typography_system
|
|
37
|
-
|
|
38
|
-
Generate a typography system with font pairing.
|
|
39
|
-
|
|
40
|
-
**Parameters:**
|
|
41
|
-
| Name | Type | Required | Description |
|
|
42
|
-
|------|------|----------|-------------|
|
|
43
|
-
| headingCategory | FontCategory | no | Heading font type |
|
|
44
|
-
| bodyCategory | FontCategory | no | Body font type |
|
|
45
|
-
| scaleRatio | TypeScaleRatio | no | Modular scale ratio |
|
|
46
|
-
| baseSize | number (12-24) | no | Base font size in px |
|
|
47
|
-
|
|
48
|
-
**Returns:** `TypographySystem` with fonts, scale ratio, and type steps.
|
|
49
|
-
|
|
50
|
-
## export_design_tokens
|
|
51
|
-
|
|
52
|
-
Export a brand identity to various design token formats.
|
|
53
|
-
|
|
54
|
-
**Parameters:**
|
|
55
|
-
| Name | Type | Required | Description |
|
|
56
|
-
|------|------|----------|-------------|
|
|
57
|
-
| brand | string (JSON) | yes | Full BrandIdentity JSON |
|
|
58
|
-
| format | ExportFormat | yes | json, css, tailwind, figma, react, sass |
|
|
59
|
-
|
|
60
|
-
**Returns:** Formatted design tokens string.
|
|
61
|
-
|
|
62
|
-
## create_brand_guidelines
|
|
63
|
-
|
|
64
|
-
Generate a brand guidelines document.
|
|
65
|
-
|
|
66
|
-
**Parameters:**
|
|
67
|
-
| Name | Type | Required | Description |
|
|
68
|
-
|------|------|----------|-------------|
|
|
69
|
-
| brand | string (JSON) | yes | Full BrandIdentity JSON |
|
|
70
|
-
| format | BrandDocFormat | no | html (default) or pdf |
|
|
71
|
-
|
|
72
|
-
**Returns:** HTML brand book document.
|
|
73
|
-
|
|
74
|
-
## validate_brand_consistency
|
|
75
|
-
|
|
76
|
-
Check a brand identity for completeness and accessibility compliance.
|
|
77
|
-
|
|
78
|
-
**Parameters:**
|
|
79
|
-
| Name | Type | Required | Description |
|
|
80
|
-
|------|------|----------|-------------|
|
|
81
|
-
| brand | string (JSON) | yes | Full BrandIdentity JSON |
|
|
82
|
-
|
|
83
|
-
**Returns:** `BrandValidationResult` with score (0-100), validity flag, and issues list.
|
|
84
|
-
|
|
85
|
-
## refine_brand_element
|
|
86
|
-
|
|
87
|
-
Iterate on a specific element of an existing brand.
|
|
88
|
-
|
|
89
|
-
**Parameters:**
|
|
90
|
-
| Name | Type | Required | Description |
|
|
91
|
-
|------|------|----------|-------------|
|
|
92
|
-
| brand | string (JSON) | yes | Full BrandIdentity JSON |
|
|
93
|
-
| element | string | yes | colors, typography, or spacing |
|
|
94
|
-
| feedback | string | yes | Natural language refinement instruction |
|
|
95
|
-
|
|
96
|
-
**Returns:** Updated `BrandIdentity` JSON.
|
|
97
|
-
|
|
98
|
-
## Enums
|
|
99
|
-
|
|
100
|
-
**BrandStyle:** minimal, bold, elegant, playful, corporate, tech, organic, retro
|
|
101
|
-
|
|
102
|
-
**ColorHarmony:** complementary, analogous, triadic, split-complementary, tetradic, monochromatic
|
|
103
|
-
|
|
104
|
-
**ColorTheme:** light, dark, both
|
|
105
|
-
|
|
106
|
-
**FontCategory:** serif, sans-serif, monospace, display, handwriting
|
|
107
|
-
|
|
108
|
-
**TypeScaleRatio:** minor-second, major-second, minor-third, major-third, perfect-fourth, augmented-fourth, perfect-fifth, golden-ratio
|
|
109
|
-
|
|
110
|
-
**ExportFormat:** json, css, tailwind, figma, react, sass
|
package/docs/DATA_SOURCES.md
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# AI Training Data Sources
|
|
2
|
-
|
|
3
|
-
Curated data sources for enhancing the branding MCP's knowledge base and the broader Forge Space ecosystem.
|
|
4
|
-
|
|
5
|
-
## Color Theory & Design
|
|
6
|
-
|
|
7
|
-
| Source | License | Use Case |
|
|
8
|
-
| -------------------------------- | ---------- | -------------------------------------- |
|
|
9
|
-
| culori (color science library) | MIT | Color space conversions, OKLCH support |
|
|
10
|
-
| Open Color (13 hues x 10 shades) | MIT | Curated color palettes reference |
|
|
11
|
-
| Tailwind CSS default palette | MIT | Industry-standard web color scales |
|
|
12
|
-
| Carbon Design System tokens | Apache 2.0 | Enterprise design token patterns |
|
|
13
|
-
|
|
14
|
-
## Typography
|
|
15
|
-
|
|
16
|
-
| Source | License | Use Case |
|
|
17
|
-
| --------------------------- | ---------- | --------------------------------------- |
|
|
18
|
-
| Google Fonts API | Apache 2.0 | Font metadata, pairing data, popularity |
|
|
19
|
-
| Fontpair.co | Free | Curated font pairing combinations |
|
|
20
|
-
| Type Scale (type-scale.com) | Free | Modular scale visualization reference |
|
|
21
|
-
| Typewolf | Free/Paid | Font usage in the wild, trend data |
|
|
22
|
-
|
|
23
|
-
## Accessibility
|
|
24
|
-
|
|
25
|
-
| Source | License | Use Case |
|
|
26
|
-
| ----------------------- | ------- | ----------------------------------- |
|
|
27
|
-
| WCAG 2.1 as JSON (W3C) | W3C | Structured accessibility guidelines |
|
|
28
|
-
| WCAG as JSON (Tenon.io) | MIT | Machine-readable WCAG criteria |
|
|
29
|
-
| A11Y Project Patterns | MIT | Accessible component patterns |
|
|
30
|
-
| ARIA Practices Guide | W3C | ARIA pattern implementations |
|
|
31
|
-
|
|
32
|
-
## Design Tokens
|
|
33
|
-
|
|
34
|
-
| Source | License | Use Case |
|
|
35
|
-
| ---------------------- | ------------ | ------------------------------ |
|
|
36
|
-
| W3C Design Tokens Spec | W3C | Token format standard |
|
|
37
|
-
| Style Dictionary | Apache 2.0 | Token transformation pipelines |
|
|
38
|
-
| Tokens Studio | MIT (plugin) | Figma-to-code token workflows |
|
|
39
|
-
|
|
40
|
-
## Brand Identity
|
|
41
|
-
|
|
42
|
-
| Source | License | Use Case |
|
|
43
|
-
| -------------- | -------- | ------------------------------ |
|
|
44
|
-
| Brandfetch API | Freemium | Brand asset data for reference |
|
|
45
|
-
| Logo.dev | Freemium | Logo generation patterns |
|
|
46
|
-
| Coolors.co | Free | Color palette inspiration |
|
|
47
|
-
|
|
48
|
-
## Component Libraries (for integration)
|
|
49
|
-
|
|
50
|
-
| Source | License | Use Case |
|
|
51
|
-
| ------------------- | ------- | ------------------------------- |
|
|
52
|
-
| shadcn/ui | MIT | Component styling patterns |
|
|
53
|
-
| Radix UI Primitives | MIT | Accessible primitive components |
|
|
54
|
-
| Headless UI | MIT | Unstyled component patterns |
|
|
55
|
-
|
|
56
|
-
## SEO & Web Standards
|
|
57
|
-
|
|
58
|
-
| Source | License | Use Case |
|
|
59
|
-
| --------------------- | ------------ | ------------------------------------ |
|
|
60
|
-
| Schema.org vocabulary | CC BY-SA 3.0 | Structured data for brand pages |
|
|
61
|
-
| Google Lighthouse | Apache 2.0 | Performance scoring for brand assets |
|
|
62
|
-
| web.dev | Apache 2.0 | Web best practices reference |
|
|
63
|
-
|
|
64
|
-
## Security
|
|
65
|
-
|
|
66
|
-
| Source | License | Use Case |
|
|
67
|
-
| ------------------------ | ------------ | ------------------------------------------- |
|
|
68
|
-
| OWASP Cheat Sheet Series | CC BY-SA 4.0 | Security guidelines for brand asset serving |
|
|
69
|
-
| CSP Reference (MDN) | CC BY-SA 2.5 | Content Security Policy for brand assets |
|
package/docs/INTEGRATION.md
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# Ecosystem Integration Guide
|
|
2
|
-
|
|
3
|
-
## mcp-gateway Registration
|
|
4
|
-
|
|
5
|
-
Register branding-mcp as an upstream server in mcp-gateway:
|
|
6
|
-
|
|
7
|
-
```json
|
|
8
|
-
{
|
|
9
|
-
"name": "branding",
|
|
10
|
-
"command": "node",
|
|
11
|
-
"args": ["/path/to/branding-mcp/dist/index.js"],
|
|
12
|
-
"port": 8033,
|
|
13
|
-
"tools": [
|
|
14
|
-
"generate_brand_identity",
|
|
15
|
-
"generate_color_palette",
|
|
16
|
-
"generate_typography_system",
|
|
17
|
-
"export_design_tokens",
|
|
18
|
-
"create_brand_guidelines",
|
|
19
|
-
"validate_brand_consistency",
|
|
20
|
-
"refine_brand_element"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## uiforge-mcp Integration
|
|
26
|
-
|
|
27
|
-
The UI generator can consume brand tokens to ensure generated components match the brand:
|
|
28
|
-
|
|
29
|
-
```typescript
|
|
30
|
-
// In uiforge-mcp, pass brandId to component generation
|
|
31
|
-
const component = await generateComponent({
|
|
32
|
-
type: 'button',
|
|
33
|
-
brandId: 'brand_abc123',
|
|
34
|
-
// Brand tokens auto-applied to colors, fonts, spacing
|
|
35
|
-
});
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## uiforge-webapp Routes
|
|
39
|
-
|
|
40
|
-
New frontend routes for brand management:
|
|
41
|
-
|
|
42
|
-
- `/branding` — Brand dashboard
|
|
43
|
-
- `/branding/new` — Create new brand identity
|
|
44
|
-
- `/branding/:id` — View/edit brand
|
|
45
|
-
- `/branding/:id/export` — Export design tokens
|
|
46
|
-
- `/branding/:id/guidelines` — View brand guidelines
|
|
47
|
-
|
|
48
|
-
## Design Token Flow
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
branding-mcp (generate) → export_design_tokens → format selection
|
|
52
|
-
├── json → W3C Design Tokens → Style Dictionary pipeline
|
|
53
|
-
├── css → CSS custom properties → direct import
|
|
54
|
-
├── tailwind → Tailwind preset → tailwind.config.ts
|
|
55
|
-
├── figma → Figma token format → Tokens Studio sync
|
|
56
|
-
├── react → Theme object → ThemeProvider
|
|
57
|
-
└── sass → SCSS variables → @import
|
|
58
|
-
```
|
package/eslint.config.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
2
|
-
import tsparser from '@typescript-eslint/parser';
|
|
3
|
-
|
|
4
|
-
export default [
|
|
5
|
-
{
|
|
6
|
-
ignores: ['dist/', 'node_modules/', 'coverage/', '*.js', '!eslint.config.js'],
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
files: ['src/**/*.ts'],
|
|
10
|
-
ignores: ['src/__tests__/**'],
|
|
11
|
-
languageOptions: {
|
|
12
|
-
parser: tsparser,
|
|
13
|
-
parserOptions: {
|
|
14
|
-
ecmaVersion: 2022,
|
|
15
|
-
sourceType: 'module',
|
|
16
|
-
project: './tsconfig.json',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
plugins: {
|
|
20
|
-
'@typescript-eslint': tseslint,
|
|
21
|
-
},
|
|
22
|
-
rules: {
|
|
23
|
-
'no-console': 'warn',
|
|
24
|
-
eqeqeq: ['error', 'always'],
|
|
25
|
-
'no-unused-vars': 'off',
|
|
26
|
-
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
27
|
-
'@typescript-eslint/no-floating-promises': 'error',
|
|
28
|
-
'@typescript-eslint/no-explicit-any': 'warn',
|
|
29
|
-
'@typescript-eslint/explicit-function-return-type': ['warn', { allowExpressions: true }],
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
files: ['src/__tests__/**/*.ts'],
|
|
34
|
-
languageOptions: {
|
|
35
|
-
parser: tsparser,
|
|
36
|
-
parserOptions: {
|
|
37
|
-
ecmaVersion: 2022,
|
|
38
|
-
sourceType: 'module',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
plugins: {
|
|
42
|
-
'@typescript-eslint': tseslint,
|
|
43
|
-
},
|
|
44
|
-
rules: {
|
|
45
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
46
|
-
'@typescript-eslint/no-floating-promises': 'off',
|
|
47
|
-
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
48
|
-
'@typescript-eslint/no-unused-vars': 'off',
|
|
49
|
-
'no-console': 'off',
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
];
|