54c66efe9b
- Changed CLI usage instructions from `dart run cursor_gen` to `cursor_gen` for global activation. - Updated project-brief.yaml example and README to reflect new command usage. - Added app_context section in project-brief.yaml for theme variants and RBAC roles. - Fixed bundled template resolution for local and global installs to prevent 'Template not found' errors. - Version bump to 1.0.1 with corresponding updates in CHANGELOG and pubspec.yaml.
141 lines
6.4 KiB
YAML
141 lines
6.4 KiB
YAML
# =============================================================================
|
|
# project-brief.yaml — SINGLE REFERENCE EXAMPLE for cursor_gen
|
|
# Copy to your Flutter repo root, edit values, then: cursor_gen
|
|
# Schema / IDE hints: flutter-cursor-templates/generator/brief-schema.json
|
|
# =============================================================================
|
|
#
|
|
# Each section below lists ALLOWED VALUES in comments. Pick ONE value per field
|
|
# (unless the field is a list). Invalid combinations may get validator warnings
|
|
# (e.g. getx_nav without getx).
|
|
#
|
|
# =============================================================================
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Template pin (Pillar 1) — bump when you intentionally upgrade template output
|
|
# -----------------------------------------------------------------------------
|
|
cursor_templates_version: "1.0.1"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# project — identity and rough size (affects rule tone / scaffolding hints)
|
|
# -----------------------------------------------------------------------------
|
|
# scale: small | medium | large
|
|
project:
|
|
name: "Acme Shop"
|
|
package: "com.example.acme_shop"
|
|
description: "Reference e-commerce app — replace with your product summary"
|
|
scale: "large"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# stack — tooling and architecture (drives which .cursor/rules/*.mdc you get)
|
|
# -----------------------------------------------------------------------------
|
|
# state_management: bloc | riverpod | getx | hooks_riverpod
|
|
# routing: gorouter | getx_nav | auto_route
|
|
# (getx_nav is intended with state_management: getx)
|
|
# architecture: clean | feature_first | mvvm | mvc | layered
|
|
# backend: firebase | supabase | rest — or combine with + e.g.:
|
|
# firebase+rest | supabase+rest | firebase+supabase (split on +)
|
|
# auth: firebase_auth | supabase_auth | jwt_rest | oauth2 | none
|
|
# platforms: subset of [ ios, android, web, desktop ]
|
|
# codegen: subset of [ freezed, json_serializable, injectable, retrofit ]
|
|
stack:
|
|
state_management: "bloc"
|
|
routing: "gorouter"
|
|
architecture: "clean"
|
|
backend: "firebase+rest"
|
|
auth: "firebase_auth"
|
|
platforms: ["ios", "android", "web", "desktop"]
|
|
codegen: ["freezed", "json_serializable", "injectable", "retrofit"]
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# environments
|
|
# -----------------------------------------------------------------------------
|
|
# cicd: codemagic | github_actions | fastlane | none
|
|
# flavors: any string names your app uses (e.g. dev, staging, prod)
|
|
environments:
|
|
flavors: ["dev", "staging", "prod"]
|
|
cicd: "github_actions"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# testing
|
|
# -----------------------------------------------------------------------------
|
|
# depth: unit_widget | integration | e2e | full
|
|
# e2e_tool: patrol | maestro
|
|
testing:
|
|
depth: "full"
|
|
e2e_tool: "patrol"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# design — where UI truth lives (referenced in generated project-context rules)
|
|
# -----------------------------------------------------------------------------
|
|
# design.source (validator): figma_mcp | figma_manual | native_ref | html_ref | none
|
|
# figma_url: design file URL when using Figma; can be "" if source is none / native_ref
|
|
design:
|
|
source: "figma_mcp"
|
|
figma_url: "https://www.figma.com/design/REPLACE_ME/Acme-Shop"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# api_docs — machine-readable API contract for agents
|
|
# -----------------------------------------------------------------------------
|
|
# format: openapi | postman | markdown | none
|
|
# path: repo-relative path to spec, or "" if none
|
|
api_docs:
|
|
format: "openapi"
|
|
path: "docs/api/openapi.yaml"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# references — other code the team treats as source of truth
|
|
# -----------------------------------------------------------------------------
|
|
# repos: list of git URLs (can be empty [])
|
|
# local_paths: monorepo packages, e.g. [ "packages/design_system" ]
|
|
references:
|
|
repos:
|
|
- "https://github.com/example/acme-design-tokens"
|
|
local_paths: []
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# app_context — themes & RBAC (mirrored to .cursor/cursor-gen-metadata.json)
|
|
# -----------------------------------------------------------------------------
|
|
# theme_variants: subset of [ light, dark, high_contrast ]; omit section or use [] → loader defaults to [light, dark]
|
|
# roles_enabled / role_names: use named roles when the app has RBAC
|
|
# app_context:
|
|
# theme_variants: ["light", "dark", "high_contrast"]
|
|
# roles_enabled: true
|
|
# role_names: ["customer", "merchant", "admin"]
|
|
|
|
features:
|
|
# modules: high-level feature areas in YOUR lib/ (names are project-specific)
|
|
modules: ["auth", "home", "catalog", "cart", "checkout", "profile", "orders"]
|
|
# special: optional capabilities — include only what you use
|
|
# realtime | push_notifications | deep_linking | offline_first
|
|
special: ["realtime", "push_notifications", "deep_linking", "offline_first"]
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# localization
|
|
# -----------------------------------------------------------------------------
|
|
localization:
|
|
enabled: true
|
|
locales: ["en", "es", "fr"]
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Telemetry (Pillar 6) — local-only generation / usage log under .cursor/
|
|
# -----------------------------------------------------------------------------
|
|
telemetry_opt_in: true
|
|
|
|
# =============================================================================
|
|
# QUICK SWAP CHEATSHEET (same keys; replace values only)
|
|
# =============================================================================
|
|
# Riverpod + feature-first + Supabase:
|
|
# state_management: riverpod
|
|
# routing: gorouter
|
|
# architecture: feature_first
|
|
# backend: supabase
|
|
# auth: supabase_auth
|
|
#
|
|
# GetX + MVC + REST (also enables migration-agent in templates):
|
|
# state_management: getx
|
|
# routing: getx_nav
|
|
# architecture: mvc
|
|
# backend: rest
|
|
# auth: jwt_rest
|
|
# =============================================================================
|