feat(flutter-cursor-templates): introduce MCP integration and conventions in project brief
- Added optional MCP integration settings in project-brief.yaml, allowing for environment-based server configurations. - Introduced conventions for strict package imports to enhance code organization and maintainability. - Updated brief schema to validate new MCP properties and ensure correct usage. - Implemented MCP JSON builder to generate .cursor/mcp.json based on project brief settings. - Enhanced resolver to include MCP configuration in generated files when enabled. This update improves integration capabilities and enforces coding standards across the project.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
---
|
||||
description: Semantic colours and theme extensions for {{PROJECT_NAME}}
|
||||
globs: ["lib/**/*.dart", "test/**/*.dart"]
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
# Theming — {{PROJECT_NAME}}
|
||||
|
||||
## Context
|
||||
Theme variants from brief: **{{THEME_SUMMARY}}**.{{HIGH_CONTRAST_NOTE}}
|
||||
|
||||
## Constraints
|
||||
- Prefer **`ThemeExtension`** (or design-system equivalents) for app-specific colours and radii — avoid raw `Color(0xFF...)` in feature code except in central token definitions
|
||||
- Use **`Theme.of(context).colorScheme`** / `TextTheme` for Material-aligned roles where appropriate
|
||||
- **High contrast:** when supported, verify WCAG contrast for text and controls; never rely on colour alone for state (pair with icon or label){{HIGH_CONTRAST_UX_LINE}}
|
||||
- Touch targets: respect platform minimums (e.g. ~48 logical pixels) for interactive widgets
|
||||
|
||||
## Anti-patterns
|
||||
- Hard-coded `Colors.*` scattered across feature widgets instead of theme tokens
|
||||
- Ignoring `MediaQuery.of(context).platformBrightness` / high-contrast modes when the product claims support
|
||||
Reference in New Issue
Block a user