2.0 KiB
2.0 KiB
AGENTS.md - Context & Directives for AI Agents
This file defines the operating context for Sisyphus, OpenCode, and Gemini agents working on Web Utils 2026.
1. Core Philosophy: Client-Side First
CRITICAL RULE: Do NOT implement server-side logic for tasks that can be done in the browser.
- Client-Side (Frontend): Generators (UUID, Password), Formatters (JSON, XML), Encoders (Base64), Unit Converters.
- Server-Side (Backend): Image processing, Video manipulation, Heavy file conversion, scraping (if CORS blocked).
2. Architecture Constraints
Backend (FastAPI)
- Stateless: NEVER store persistent user data.
- File Handling: ALWAYS use
app.core.cleanuputils. Files must go tobackend/temp_uploadsand be cleaned up. - Registry: New tools must be registered in
app.core.registryto be visible to the frontend.
Frontend (Vue 3)
- State: Use Vue Composition API (
<script setup lang="ts">). - Styling: Use Tailwind CSS utility classes. Avoid custom CSS files unless necessary.
- API: Use
axiosfor backend communication.
3. Project Structure Awareness
backend/app/main.py: Application entry point.backend/app/tools/: Where server-side tool logic resides.frontend/src/views/: Main pages.frontend/src/components/: Shared components.
4. Coding Standards
Python (Backend)
- Use type hints for everything (Pydantic models).
- Follow PEP 8.
- Use
async deffor route handlers.
TypeScript (Frontend)
- Strict mode enabled.
- No
anytypes unless absolutely necessary (and commented). - Use
<script setup>syntax.
5. Deployment Context
- The project is designed to be containerizable.
- Frontend is served statically in production, but runs on Vite dev server during development.
6. Common Tasks & patterns
- Adding a new Tool:
- Determine if Frontend-only or Backend-required.
- If Backend: Create router in
backend/app/tools/, register inmain.pyandregistry.py. - Frontend: Create view in
views/, add route inrouter/.