SYSTEM INSTRUCTION: All AI agents (Gemini, Claude, ChatGPT, etc.) working on this project MUST read and follow these guidelines. This file is the source of truth for project standards, workflows, and context.
Name: gagne-ton-papa
Description: A solver for the board game "Gagne Ton Papa" (also known as Katamino).
Architecture:
lib/(Rust): Core solver logic, pure Rust, high performance.src/(Rust): TUI application to quickly check the solver's output.lib-wasm/(Rust): WASM bindings exposinglibto the web.web/(React/TypeScript): Frontend application.
- Source of Truth: This file (
agents.md) defines the standards. If you are unsure, check here first. - Continuous Improvement: CRITICAL. You must amend this file (
agents.md) if you discover new patterns, corrections, or user preferences during your interaction. Capture this knowledge for future agents.
- Workflow:
- Draft: Populate a new file in
.prs/(e.g.,.prs/my_feature.md) with the Title, Body, and Prompts Used, usingdocs/PR_DESCRIPTION_TEMPLATE.mdas a base. - Review: Ask the user to review/edit this file.
- Send: Only after user approval, use the content of this file to create the PR.
- Draft: Populate a new file in
- Prompts Sharing: You MUST document the prompts that generated the code in the PR description. Skip resuming requests after a model hits a quota limit.
- Style: Idiomatic Rust. No
unwrap()in production code (useexpectwith context or proper error handling). - Linting: Strict Clippy compliance. No
#[allow(clippy::...)]without a very strong reason. - Testing: High coverage for
lib. Runcargo testbefore submitting.
- Framework: React 18+, TypeScript.
- Build Tool: Vite. Use
npm startfor dev andnpm run buildfor production; output is inweb/dist. - Styling: CSS Modules or Vanilla CSS. NO Tailwind unless explicitly requested.
- UX/UI:
- Target Audience: Children (vibrant, clear, intuitive).
- Responsiveness: Mobile-first or fully responsive.
- Visuals: Distinct borders for game pieces. Premium feel (smooth animations).
- Core:
cd lib && cargo build && cargo test - WASM:
cd lib-wasm && wasm-pack build --target web - Web:
cd web && npm start
- New Feature: Plan -> Implement in
lib-> Expose inlib-wasm-> UI inweb. - Refactor: Ensure tests pass at every step.