From 90e730c2fecc8f516897c225ff4e809f7775cf02 Mon Sep 17 00:00:00 2001 From: Nicholai Date: Thu, 23 Oct 2025 03:06:16 -0600 Subject: [PATCH] coding agent adjustments --- AGENTS.md | 227 +++++++++++++++++++++++++++++++++++++++++++++--------- QWEN.md | 205 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 394 insertions(+), 38 deletions(-) create mode 100644 QWEN.md diff --git a/AGENTS.md b/AGENTS.md index bf61c24..38ef8d5 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,55 +1,206 @@ -# AGENTS.md +# Agents Guide (Single Source of Truth) -This file provides guidance to Opencode when working with code in this repository. +This document is the canonical reference for humans and `Agents` working in this repository. It standardizes stack, structure, workflows, and guardrails so contributions stay consistent and safe. -## Repository Snapshot +## 1) Scope and goals -TypeScript + React 19 (Next.js 15.5.4) site builder for Biohazard VFX studio. Single npm workspace. Deployed to Cloudflare Workers via OpenNext. ESLint + TypeScript strict mode enforced pre-commit. No automated tests; manual QA in Chromium/Safari only. (Sources: package.json, tsconfig.json, README.md) +* Make onboarding fast with a single place to look +* Define conventions so changes are predictable +* Provide exact commands that `Agents` can run without guesswork +* Prevent accidental regressions in routing, theming, SEO, and deployment -## Commands +## 2) Tech stack -| Task | Command | Scope | Source | -|------|---------|-------|--------| -| Dev server | `npm run dev` | Root | package.json:6 | -| Build (Next.js) | `npm run build` | Root | package.json:7 | -| Build (Cloudflare Workers) | `npm run build:open-next` | Root | package.json:8 | -| Lint (ESLint) | `npm run lint` | Root | package.json:10 | -| Type check (TypeScript) | `npm run type-check` | Root | package.json:11 | -| Start production server | `npm run start` | Root | package.json:9 | +* **Framework**: Next.js 15.5.4, React 19, TypeScript +* **Styling**: Tailwind CSS 4, shadcn/ui +* **Animation**: Framer Motion +* **Forms**: react-hook-form + Zod +* **Platform**: Cloudflare Workers via OpenNext +* **Package manager**: npm +* **Node**: LTS 20 or 22 -**Run a single test:** Not applicable; no automated test runner configured. +## 3) Project layout -## Architecture Overview +``` +root +├─ src/ +│ ├─ app/ # App Router pages and layouts +│ │ ├─ (marketing)/ # Example route groups +│ │ ├─ api/ # Route handlers +│ │ └─ layout.tsx # Root layout, see rules below +│ ├─ components/ # Reusable UI +│ ├─ data/ # JSON or TS data objects consumed by pages +│ ├─ lib/ # Utilities, hooks, server actions +│ ├─ styles/ # globals.css, tailwind utilities if applicable +│ └─ types/ # Shared types +├─ public/ # Static assets +├─ next.config.ts +├─ tailwind.config.ts +├─ wrangler.toml # Cloudflare deploy config +└─ package.json +``` -- **Entry point**: `src/app/layout.tsx` (root layout with Navigation & Footer); app routes in `src/app/{route}/page.tsx` (about, contact, portfolio, services). (Source: README.md:61–69, src/app/layout.tsx) -- **Components**: Functional React + Radix UI via shadcn/ui. Primitives in `src/components/ui/`; feature components in `src/components/`. (Source: README.md:70–79, package.json:16–24) -- **Data & utils**: Project and service metadata in `src/data/projects.ts` and `src/data/services.ts`; shared utilities in `src/lib/utils.ts`. (Source: README.md:80–84) -- **Styling**: Tailwind CSS 4 + CSS variables in `src/app/globals.css`; components use `clsx` + `tailwind-merge` for conditional styles. (Source: tsconfig.json, package.json:39) -- **Forms**: `react-hook-form` + Zod validation; e.g., MultiStepForm (contact page). (Source: package.json:14–15, 33, 35) -- **External services**: Instagram Feed component integrates Instagram API via `src/lib/instagram-api.ts`. Remote images from unsplash.com. (Source: next.config.ts:7–13, src/lib/) -- **Deployment**: OpenNext adapter for Cloudflare Workers. Build output in `.open-next/` (worker.js + assets). Domain routes in wrangler.toml. (Source: wrangler.toml, open-next.config.ts, next.config.ts:16–22) +### Import aliases -## Conventions and Rules +* Prefer absolute imports using `@` mapped to `src` via `tsconfig.json` paths. -From CONTRIBUTING.md: +## 4) Authoritative UI system -- **Commit format**: conventional commits (`feat(scope): subject`). Atomic commits. Examples: `feat(portfolio): add project filtering`, `fix(header): resolve mobile menu overflow`. (CONTRIBUTING.md:122–147) -- **Branch strategy**: `main` (production), `develop` (integration), `feature/*`, `fix/*`, `hotfix/*`. Always create from `develop`. (CONTRIBUTING.md:49–54, 57–62) -- **React/Next.js**: Server components by default; client-only where needed. Single responsibility per component. Keep custom CSS minimal. (CONTRIBUTING.md:80–92) -- **TypeScript**: Avoid `any`. Define interfaces for props and API responses. (CONTRIBUTING.md:74–78) +* **Theme**: dark mode is the default. Do not introduce light-first designs without approval. +* **Typography**: default to Geist and Geist Mono via CSS variables. If adding a new font, add it as a variable and document it here before use. +* **Components**: use shadcn/ui primitives. Extend with local wrappers placed in `src/components/ui/`. +* **Spacing and rhythm**: follow Tailwind 4 defaults. Prefer utility classes over custom CSS unless componentized. +* **Animation**: keep motion subtle. Framer Motion only for meaningful transitions. -## CI Hooks That Matter Locally +## 5) Routing and layout rules -From `.gitea/workflows/ci.yml`: +* The **root layout** owns global providers, theme class, `