Skip to content

Instantly share code, notes, and snippets.

@IgorMing
Created November 24, 2026 00:45
Show Gist options
  • Select an option

  • Save IgorMing/8b8998117f8bc3909ce2bb17c9bb6af6 to your computer and use it in GitHub Desktop.

Select an option

Save IgorMing/8b8998117f8bc3909ce2bb17c9bb6af6 to your computer and use it in GitHub Desktop.
AGENTS.md example file based from my personal chess club project.

CCX — Agent instructions

Member app for Clube Campineiro de Xadrez (Campinas, Brazil). Flutter Web, mobile-first. Backend: Supabase.

People start at the root README (Portuguese). Agents read docs/INDEX.md, then only the file that matches the task. Do not copy the same fact into five places.

Before any implementation

  1. Read docs/INDEX.md and open only the files that match the task.
  2. Locked items do not change. Proposed items are the current truth until the user edits them. TBD means unknown: ask, or ship a visible “Em breve”. Never fill a gap with invented club facts.
  3. v1 has shipped. What to build next is the single TODO card on the project board. Move it to Fazendo as soon as it is the active task, before the next edit. Dev Complete when the code is verified and not published. Done (published) only after main is pushed. Do not start backlog cards.
  4. Tabs stay Início, Meu Clube, Ratings, and Perfil, plus Admin for admin and super_admin. Signed-out visitors see Início only (events, how to join, how to log in) and no bottom bar.
  5. Guests may browse published events and become members from Perfil. Admins can still register a member. Do not call the Supabase client signUp.

Non-negotiables

  • User-facing copy: pt-BR. Code, comments, commits, and docs/ in English.
  • Feature-first Flutter. State: Riverpod. Routing: go_router. Backend: supabase_flutter.
  • Mobile-first web. Design for a phone. On desktop, center a narrow column (max ~480px).
  • Roles admin and super_admin see an Admin tab and admin-only actions. Role member never sees them. Only super_admin edits the club PIX key, the public contact channels, the Meu Clube tab label, anyone’s role, or who appears on Ratings.
  • Row Level Security on every table. Automatic RLS is on: new tables start locked until policies exist. Never disable it. An empty read is a policy problem first. No service-role key in the Flutter client.
  • Hide admin UI and enforce it in RLS and Edge Functions.
  • One board card at a time. Do not implement the next feature “while we are here.”
  • If the user changes a product decision, edit the matching doc in the same session, then code.
  • Commits only when the user asks. Gitflow: feature/ or fix/ off main. Read git log first. One reason per commit.

Stack (locked)

Layer Choice
Client Flutter, Dart 3, Material 3
Target Flutter Web first (mobile viewport)
State flutter_riverpod + riverpod_generator
Routes go_router (StatefulShellRoute tabs)
Backend Supabase (Auth, Postgres, Storage, Edge Functions)
i18n gen-l10n, app_pt.arb is source

Knowledge map

If the task is about… Read
What to build next The TODO card; docs/product/board.md
What already shipped / still out docs/product/mvp-scope.md, docs/product/vision.md
Shop / promotions docs/business/shop.md
Who uses the app docs/product/personas.md
Domain words docs/product/glossary.md
Can / cannot rules docs/business/rules.md, docs/business/roles.md
Guest self-signup docs/business/self-signup.md
Ratings or events docs/business/ratings.md, docs/business/events.md
Architecture / folders docs/architecture/overview.md, docs/architecture/folder-structure.md
Tables / RLS docs/architecture/data-model.md, docs/architecture/rls.md
Why we chose X docs/architecture/decisions.md
UI, tabs, copy docs/ui/design-system.md, docs/ui/navigation-and-screens.md, docs/ui/copy-pt-br.md
Palette / reference images docs/ui/references/ — read these before inventing colors or layouts
How to code here docs/engineering/conventions.md, docs/engineering/agent-workflow.md
What may still change docs/assumptions.md

Every coding task

  1. Classify the change: product, schema, or UI.
  2. Read the matching doc from the map above. If the docs disagree with the user, ask. Do not guess a business rule.
  3. Implement the smallest slice that matches the current card.
  4. Schema changes ship as a migration with policies. Widgets do not call Supabase. Data sources do not build widgets.
  5. Before a screen layout change, look up current practice for that kind of screen and weigh it against this app (phone width, the existing visual language).
  6. Analyze and format. Verify the flow on a mobile viewport, including the empty and error states, and a second screen that shares the same state.
  7. Summarize what was decided and what is still open.

Tools

  • Dart/Flutter: analyze, format, widget tree, logs, and tests on the running app.
  • Supabase: this project only. Schema, policies, and Edge Functions. Leave a migration file. Never paste a service-role key into Dart.
  • Project board: read the TODO card and move it with the work (Fazendo, Dev Complete, Done).
  • GitHub: the app repository. Push only when the user asks to ship.

Product shape the agent must not redraw

  • Guest home: published events, join, and log in. No greeting, no bottom bar. Cold start and logout land here.
  • Signed-in home: upcoming published events, in-person / online filters, optional image, optional inscription (free, or paid with the club PIX key and a proof).
  • Ratings: active listed members. FIDE or CBX, each with classical / rapid / blitz. A missing number is “Sem rating”.
  • Meu Clube: club presentation, contact, and member-only pages. Empty fields are omitted.
  • Perfil: login when signed out; own profile when signed in, including Lichess and Chess.com ids.
  • Admin: members, events, payment proofs, and the club page. Inactive profiles cannot use the app.
  • Out of scope until that card is TODO: a tournaments module, a separate calendar tab, push notifications, chat, and more than one club in the same deployment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment