From 1752edf2b2c2caaef76679185bdd7dcb96c9b4aa Mon Sep 17 00:00:00 2001 From: Marc Klose Date: Tue, 7 Apr 2026 11:41:24 +0300 Subject: [PATCH] feat: initialize agent workflow documentation --- .agents/GEMINI-template.md | 138 ++++++++++ .agents/rules/frontend.md | 45 ++++ .agents/workflows/create-rules.md | 163 ++++++++++++ .agents/workflows/execute.md | 113 +++++++++ .agents/workflows/plan-feature.md | 407 ++++++++++++++++++++++++++++++ .agents/workflows/prime.md | 81 ++++++ GEMINI.md | 118 +++++++++ 7 files changed, 1065 insertions(+) create mode 100644 .agents/GEMINI-template.md create mode 100644 .agents/rules/frontend.md create mode 100644 .agents/workflows/create-rules.md create mode 100644 .agents/workflows/execute.md create mode 100644 .agents/workflows/plan-feature.md create mode 100644 .agents/workflows/prime.md create mode 100644 GEMINI.md diff --git a/.agents/GEMINI-template.md b/.agents/GEMINI-template.md new file mode 100644 index 0000000..f4c520d --- /dev/null +++ b/.agents/GEMINI-template.md @@ -0,0 +1,138 @@ +# GEMINI.md Template + +A flexible template for creating global rules. Adapt sections based on your project type. + +--- + +# GEMINI.md + +This file provides guidance to Gemini when working with code in this repository. + +## Project Overview + + + +{Project description and purpose} + +--- + +## Tech Stack + + + +| Technology | Purpose | +| ---------- | --------------- | +| {tech} | {why it's used} | + +--- + +## Commands + + + +```bash +# Development +{dev-command} + +# Build +{build-command} + +# Test +{test-command} + +# Lint +{lint-command} +``` + +--- + +## Project Structure + + + +``` +{root}/ +├── {dir}/ # {description} +├── {dir}/ # {description} +└── {dir}/ # {description} +``` + +--- + +## Architecture + + + +{Describe the architectural approach and data flow} + +--- + +## Code Patterns + + + +### Naming Conventions + +- {convention} + +### File Organization + +- {pattern} + +### Error Handling + +- {approach} + +--- + +## Testing + + + +- **Run tests**: `{test-command}` +- **Test location**: `{test-directory}` +- **Pattern**: {describe test approach} + +--- + +## Validation + + + +```bash +{validation-commands} +``` + +--- + +## Key Files + + + +| File | Purpose | +| -------- | ------------- | +| `{path}` | {description} | + +--- + +## On-Demand Context + + + +| Topic | File | +| ------- | -------- | +| {topic} | `{path}` | + +--- + +## Notes + + + +- {note} diff --git a/.agents/rules/frontend.md b/.agents/rules/frontend.md new file mode 100644 index 0000000..13cd78e --- /dev/null +++ b/.agents/rules/frontend.md @@ -0,0 +1,45 @@ +--- +trigger: model_decision +description: Applied when creating or modifying frontend components, Next.js pages, Tailwind styling, and UI logic in the app/ or components/ directories to ensure strict TypeScript usage, consistent design patterns, and responsive best practices. +--- + +# Frontend Rules + +This document outlines the coding standards and best practices for the frontend of the Teklifsat Platform. + +## TypeScript & Types + +- **Never use `any`**: Always define proper interfaces or types for your data. If a type is truly unknown, use `unknown` and type guards. +- **Strict Typing**: Enable and follow strict TypeScript rules. +- **Component Props**: Always define an interface or type for component props, even if empty. + +## React & Next.js + +- **Functional Components**: Use functional components with arrow functions. +- **Hooks**: Use standard hooks (`useState`, `useEffect`, `useMemo`, `useCallback`) appropriately. +- **App Router Design**: + - Default to Server Components (`'use server'`) for data fetching. + - Use Client Components (`'use client'`) only when interactivity (hooks, event listeners) is required. + - Keep Client Components at the leaves of your component tree. +- **File Naming**: Use `kebab-case` for file and directory names. + +## Styling & UI + +- **Tailwind CSS**: Use Tailwind for all styling. Avoid inline styles or custom CSS classes unless absolutely necessary. +- **Dynamic Classes**: Always use the `cn` utility from `lib/utils.ts` for conditional or dynamic class merging. +- **Radix UI**: Use Radix UI primitives for complex accessible components (Modals, Dropdowns, etc.). +- **Icons**: Use `Lucide` as the primary icon set. +- **Responsive Design**: Mobile-first approach is mandatory. Use Tailwind's responsive prefixes (`sm:`, `md:`, `lg:`, etc.). +- **Theme Consistency**: Use the CSS variables defined in `globals.css` for colors, spacing, and other design tokens. + +## State Management + +- Use React context or appropriate libraries when state needs to be shared across many components. +- Prefer local state for component-specific data. +- Leverage Supabase Realtime for live updates where necessary. + +## Performance & SEO + +- **Image Optimization**: Use the Next.js `Image` component for all images. +- **Semantic HTML**: Use proper semantic tags (`
`, `