Skip to content

Commit df0d1a4

Browse files
authored
Merge pull request #304 from tigrisdata/Xe/AGENTS.md
docs: add AI agent instructions
2 parents 95875e4 + ca9fb07 commit df0d1a4

File tree

4 files changed

+142
-4
lines changed

4 files changed

+142
-4
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ jobs:
2121
- name: Check types + linting + build
2222
run: |
2323
npm install
24-
npm run lint:apidocs
24+
npm run lint
2525
npm run build:apidocs # ensure the api docs generate without errors
26-
npx prettier --check .
27-
npx eslint .
2826
npm run build

AGENTS.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# AGENTS.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with
4+
code in this repository.
5+
6+
## Project Overview
7+
8+
This is the documentation website for Tigris Object Storage, built with
9+
Docusaurus 3. The site contains comprehensive documentation for Tigris'
10+
S3-compatible object storage platform, including API documentation, quickstarts,
11+
guides, and integration examples.
12+
13+
## Architecture
14+
15+
- **Framework**: Docusaurus 3 static site generator
16+
- **Content**: MDX files in `docs/` directory with frontmatter
17+
- **API Documentation**: Auto-generated from OpenAPI/Swagger specs in
18+
`static/api/`
19+
- **Configuration**: Main config in `docusaurus.config.js`, sidebar structure in
20+
`sidebars.js`
21+
- **Styling**: Custom CSS in `src/css/custom.css`
22+
- **Build Output**: Static files generated to `build/` directory
23+
24+
## Development Commands
25+
26+
### Setup
27+
28+
```bash
29+
# Install dependencies
30+
npm install
31+
32+
# Set up local environment configuration
33+
cp .env.local.example .env.local
34+
```
35+
36+
### Development
37+
38+
```bash
39+
# Start development server (includes API docs generation)
40+
npm run dev
41+
42+
# Start development server without API rebuild
43+
npm start
44+
```
45+
46+
### Build & Deploy
47+
48+
```bash
49+
# Build for production (includes API docs generation)
50+
npm run build
51+
52+
# Build API documentation only
53+
npm run build:apidocs
54+
55+
# Serve built site locally
56+
npm run serve
57+
58+
# Clean build cache
59+
npm run clear
60+
```
61+
62+
### Code Quality
63+
64+
```bash
65+
# Lint API documentation, code, and formatting
66+
npm run lint
67+
```
68+
69+
## Content Guidelines
70+
71+
### File Formats
72+
73+
- Use MDX format for all documentation content
74+
- Add `{/* truncate */}` after the first paragraph in blog posts
75+
- Import required components at the top of MDX files when needed
76+
77+
### Interactive Components
78+
79+
- **Tabs**: Use Docusaurus `<Tabs>` and `<TabItem>` components with imports
80+
- **Expandos**: Convert "Begin expando...End expando" patterns to
81+
`<details><summary>` blocks
82+
- **Code Blocks**: Standard Markdown code blocks with language specifiers
83+
84+
### Commit Message Convention
85+
86+
Follow conventional commit format:
87+
88+
- Use lowercase for commit body text
89+
- Examples: `fix: correct header title`, `docs: add new guide`,
90+
`feat: implement feature`
91+
92+
### Attribution Requirements
93+
94+
AI agents must disclose what tool and model they are using in the "Assisted-by"
95+
commit footer with a structure like this:
96+
97+
```text
98+
Assisted-by: [Model Name] via [Tool Name]
99+
```
100+
101+
Example:
102+
103+
```text
104+
Assisted-by: GLM 4.6 via Claude Code
105+
```
106+
107+
```text
108+
Assisted-by: GPT-5-Codex via OpenAI Codex
109+
```
110+
111+
If you don't know which model you are using, make a best guess and at least note
112+
which agent you are using:
113+
114+
```text
115+
Assisted-by: Cursor
116+
```
117+
118+
## Key Directories
119+
120+
- `docs/`: Main documentation content organized by topic
121+
- `static/api/`: OpenAPI specifications for auto-generated API docs
122+
- `src/`: Custom React components and styling
123+
- `blog/`: Blog posts (if present)
124+
- `static/`: Static assets (images, etc.)
125+
126+
## API Documentation
127+
128+
The site includes auto-generated API documentation from YAML specs. The build
129+
process automatically generates these docs before each build and deploy. API
130+
docs are configured through the `docusaurus-plugin-openapi-docs` plugin.
131+
132+
## Environment Configuration
133+
134+
Local development requires copying `.env.local.example` to `.env.local` and
135+
configuring any necessary environment variables.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@AGENTS.md

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@
1515
"vercel-copy-404": "[ \"$VERCEL\" = 1 ] && echo \"copying 404\" && cp build/docs/404.html build/",
1616
"swizzle": "docusaurus swizzle",
1717
"deploy": "docusaurus deploy",
18+
"lint": "npm run lint:apidocs && npm run lint:code && npm run lint:format",
19+
"lint:format": "prettier --check .",
20+
"lint:code": "eslint .",
1821
"lint:apidocs": "redocly lint static/api/extensions/v1/api.yaml",
1922
"clear:apidocs": "docusaurus clean-api-docs all",
2023
"clear": "docusaurus clear",
2124
"clean": "npm run clear && rm -rf node_modules",
2225
"serve": "docusaurus serve",
2326
"write-translations": "docusaurus write-translations",
24-
"write-heading-ids": "docusaurus write-heading-ids"
27+
"write-heading-ids": "docusaurus write-heading-ids",
28+
"format": "prettier -w ."
2529
},
2630
"dependencies": {
2731
"@docusaurus/core": "^3.9.1",

0 commit comments

Comments
 (0)