Initial commit of the Flutter Cursor Generator project, including the core generator tool, project brief schema, example project setup, and CI configuration. Added README documentation outlining repository structure, quick start guide, and detailed descriptions of features and architecture pillars.

This commit is contained in:
2026-05-12 22:29:55 +05:30
commit 6dfb9a8aa5
72 changed files with 4542 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
# .cursor/custom/ — project-specific overrides
This directory is never modified by `dart run cursor_gen` or `--refresh`.
Use it for team-only rules, vendor SDK notes, or policies that should not live in the shared template repo.
## Examples you might add
- `rules/domain-conventions.mdc` — money as integer cents, id prefixes, Firestore paths
- `rules/experiment-flags.mdc` — how feature flags are read in this codebase
See `rules/sample-domain-conventions.mdc` for a sample rule file and `CURSOR:CUSTOM` marker usage preserved on refresh.
@@ -0,0 +1,20 @@
---
description: "Sample project-specific conventions (replace with your own)"
alwaysApply: true
---
# Sample domain conventions
This file demonstrates **Pillar 2** overrides: content here is outside generated rules.
## Example policy
- Prefer `Money` value types over raw `double` for prices when you introduce them.
# CURSOR:CUSTOM
## Team-only notes (preserved across `cursor_gen --refresh`)
- Replace this block with rules your generator output should not overwrite.
# CURSOR:CUSTOM:END
+130
View File
@@ -0,0 +1,130 @@
# =============================================================================
# project-brief.yaml — SINGLE REFERENCE EXAMPLE for cursor_gen
# Copy to your Flutter repo root, edit values, then: dart run 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.0"
# -----------------------------------------------------------------------------
# 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: []
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
# =============================================================================