Skip to content

Commit 03d1f31

Browse files
committed
chore: add repo agent guidelines
1 parent 1f0b08c commit 03d1f31

File tree

2 files changed

+79
-0
lines changed

2 files changed

+79
-0
lines changed

AGENT.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# AGENT Guidelines
2+
3+
Welcome! This repository hosts the Involution Hell documentation site, built with Next.js App Router, Fumadocs UI, TypeScript, and Tailwind CSS. Follow the instructions below whenever you contribute changes.
4+
5+
## General workflow
6+
7+
- Prefer `pnpm` for all Node.js commands (`pnpm install`, `pnpm dev`, `pnpm build`, etc.).
8+
- Keep changes focused and provide helpful descriptions in commits and PR messages.
9+
- When adding dependencies, ensure they are compatible with Node.js 18+.
10+
11+
## Coding standards
12+
13+
- Follow existing patterns in the codebase; align new components with the established structure under `app/` and `components/`.
14+
- Use TypeScript (`.ts` / `.tsx`) and Tailwind CSS utility classes for styling unless a file already uses a different approach.
15+
- Avoid unnecessary abstractions; keep components small, composable, and accessible.
16+
- Do not wrap imports in `try/catch` blocks.
17+
18+
## Documentation & content
19+
20+
- All documentation lives under `app/docs/` (folder-as-book). Each Markdown/MDX file **must** retain a frontmatter block with at least a `title`.
21+
- Place images referenced by a document inside the document’s sibling `*.assets/` folder. Use the provided image migration scripts if needed.
22+
- Prefer relative links within the docs unless cross-referencing an external resource.
23+
24+
## Testing & validation
25+
26+
- Run relevant scripts before submitting changes. Common checks include:
27+
- `pnpm dev` for local verification.
28+
- `pnpm build` for production validation when you touch runtime logic.
29+
- `pnpm lint:images` when you add or move media assets.
30+
31+
## PR expectations
32+
33+
- Summarize user-facing changes clearly.
34+
- Mention any new scripts, configuration, or docs that reviewers should be aware of.
35+
36+
For additional details, consult `README.md` and `CONTRIBUTING.md`.

LLM.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# LLM Playbook
2+
3+
This guide distills the key information an autonomous agent or ChatGPT-style assistant needs when working in this repository.
4+
5+
## Project summary
6+
7+
- **Stack:** Next.js (App Router) + TypeScript + Tailwind CSS + Fumadocs UI.
8+
- **Purpose:** Collaborative knowledge base for students, served from `app/docs/` content.
9+
- **Configs of interest:**
10+
- `source.config.ts` – Fumadocs sources and structure.
11+
- `mdx-components.tsx` – custom MDX components available to docs.
12+
- `components/` – reusable UI building blocks.
13+
14+
## Common tasks
15+
16+
### Updating content
17+
18+
1. Edit or add Markdown/MDX files under `app/docs/`.
19+
2. Preserve the frontmatter block with at least `title` and include optional metadata (`description`, `date`, `tags`).
20+
3. Place referenced media inside `<doc>.assets/` and run `pnpm lint:images` if assets change.
21+
22+
### Implementing UI logic
23+
24+
1. Add shared pieces to `components/` or page-specific pieces under the relevant `app/` route folder.
25+
2. Use Tailwind utilities for styling; follow existing responsive patterns.
26+
3. Ensure server/client boundaries are respected (declare `"use client"` only when necessary).
27+
28+
## Useful commands
29+
30+
- `pnpm install` – install dependencies (Node.js 18+ required).
31+
- `pnpm dev` – start the development server at <http://localhost:3000>.
32+
- `pnpm build` – run the production build (use when changing runtime code or config).
33+
- `pnpm lint:images` – validate documentation images.
34+
35+
## Review checklist
36+
37+
- [ ] Frontmatter present on new/edited docs.
38+
- [ ] Assets live beside their documents.
39+
- [ ] Components match surrounding code style and naming.
40+
- [ ] Necessary scripts/tests executed and mentioned in the report.
41+
- [ ] PR summary explains user-visible changes and follow-up steps if any.
42+
43+
For deeper details, read `README.md`, `README.en.md`, and `CONTRIBUTING.md`.

0 commit comments

Comments
 (0)