Skip to content

Commit 4af7aa5

Browse files
committed
add AGENTS.md
1 parent e90e90e commit 4af7aa5

File tree

5 files changed

+212
-1
lines changed

5 files changed

+212
-1
lines changed

.cursorrules

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

.github/copilot-instructions.md

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

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ yarn-error.log*
2626
/.idea
2727

2828
# LLM
29-
llms.txt
29+
llms.txt
30+
/.claude

AGENTS.md

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
# AI Assistant Instructions for evcc Documentation
2+
3+
## Project Overview
4+
5+
This is the documentation repository for evcc (Electric Vehicle Charge Controller).
6+
The documentation is generated from templates and synchronized with the main evcc repository.
7+
8+
## Repository Structure
9+
10+
```
11+
/docs # German documentation (default locale)
12+
/blog # German blog posts (default locale)
13+
/templates # YAML device templates
14+
/i18n/en # English translations
15+
/docusaurus-plugin-content-docs # English docs (maps to /docs)
16+
/docusaurus-plugin-content-blog # English blog (maps to /blog)
17+
/docusaurus-theme-classic # UI strings, navigation
18+
/static # Images, logos, API specs
19+
/src # React components, utilities
20+
```
21+
22+
### Documentation (`/docs`)
23+
24+
Main documentation content.
25+
Most content is **manually written**, except for:
26+
27+
- `docs/devices/*.mdx` - Device lists auto-generated from templates
28+
- `docs/tariffs.mdx` - Tariff providers auto-generated from templates
29+
30+
### Templates (`/templates`)
31+
32+
YAML device templates organized by:
33+
34+
- `nightly/` and `release/` versions
35+
- Language subdirectories (`de/`, `en/`)
36+
- Device categories:
37+
- `charger/` - Wallboxes and charging stations
38+
- `meter/` - Energy meters, inverters, batteries
39+
- `vehicle/` - Vehicle integrations
40+
- `tariff/` - Dynamic tariff and forecast providers
41+
42+
### Internationalization (`/i18n`)
43+
44+
- **German is the default locale** (main content in `/docs` and `/blog`)
45+
- English translations in `/i18n/en/`
46+
- UI strings and navigation labels in `docusaurus-theme-classic/`
47+
- Some blog posts have English versions, others remain German-only
48+
49+
### Content Workflows
50+
51+
#### Template-Generated Content
52+
53+
Only specific device and tariff pages are generated:
54+
55+
1. Templates in `/templates/{version}/{lang}/{category}/`
56+
2. Processed by `src/generateFromTemplate.js`
57+
3. Output to `docs/devices/*.mdx` and `docs/tariffs.mdx`
58+
4. Marked with `<!-- AUTO-GENERATED CONTENT BELOW THIS LINE -->`
59+
60+
#### Manual Content
61+
62+
Everything else is manually maintained:
63+
64+
- Core documentation pages
65+
- Installation guides
66+
- Feature descriptions
67+
- Blog posts
68+
- FAQ and troubleshooting
69+
70+
## Writing Style Guide
71+
72+
### Product Name
73+
74+
- **Always write "evcc" in lowercase** - even at the beginning of sentences
75+
- Never use "EVCC", "Evcc", or other variations
76+
77+
### Language & Tone
78+
79+
- **Be informal and casual** - address readers directly with "you" (English) or "du" (German)
80+
- Write for individual professionals, not businesses
81+
- Avoid corporate or marketing language
82+
- Be concise and direct
83+
84+
### Terminology
85+
86+
#### English
87+
88+
- Use "solar" instead of "PV" or "photovoltaic"
89+
- Use UK English spelling (e.g., "optimise" not "optimize")
90+
- Use abbreviations: "e.g." not "for example"
91+
92+
#### German
93+
94+
- Use "PV-Anlage" with hyphen (follow Duden rules for compound words)
95+
- Be consistent with hyphens: "PV-Überschuss", "PV-Modus"
96+
- Use abbreviations: "z. B." not "beispielsweise"
97+
98+
### Formatting Conventions
99+
100+
#### Headings
101+
102+
- **German**: Use sentence case (e.g., "Häufige Fragen")
103+
- **English**: Use title case (e.g., "Frequently Asked Questions")
104+
105+
#### UI Elements & Technical Terms
106+
107+
- **Bold** for UI elements and modes: **PV-Modus**, **Min+PV**
108+
- `Code formatting` for configuration keys: `residualPower`, `evcc.yaml`
109+
- _Italics_ for technical terms when introducing concepts
110+
111+
#### Lists
112+
113+
- End complete sentences with periods
114+
- Don't use periods for simple fragments
115+
- Be consistent within each list
116+
117+
#### Numbers & Units
118+
119+
- **Always use a space** between number and unit: `11 kW`, `230 V`
120+
- **German**: Use comma for decimals, period for thousands: `1,4 kW`, `11.200 W`
121+
- **English**: Use period for decimals, comma for thousands: `1.4 kW`, `11,200 W`
122+
123+
#### Quotation Marks
124+
125+
- **German**: Use „German quotes“ for actual quotations
126+
- **English**: Use "English quotes" for actual quotations
127+
- Prefer _italics_ over quotes for technical terms
128+
129+
#### Markdown Formatting
130+
131+
- **Put each sentence on a separate line** to improve diff handling
132+
- This doesn't affect the rendered HTML output
133+
- Makes reviewing changes much easier in git
134+
- Use standard **prettier** formatting for final formatting
135+
- Run `npx prettier --write .` to format all files
136+
137+
#### Docusaurus Features
138+
139+
- Use **MDX** format for advanced features (React components in markdown)
140+
- Import components: `import Screenshot from "../../src/components/Screenshot"`
141+
- Tabs for multi-language/multi-platform content: `<Tabs>` and `<TabItem>`
142+
- Admonitions: `:::note`, `:::tip`, `:::info`, `:::warning`, `:::danger`
143+
- Code blocks with syntax highlighting: ` ```yaml `, ` ```javascript `
144+
- Frontmatter for metadata: `sidebar_position`, `title`, `tags`
145+
- Images automatically optimized from `/static/img/`
146+
147+
#### Internal Linking
148+
149+
##### Link Formats
150+
151+
- **Absolute links**: `/docs/features/solar-charging` - Always from root
152+
- **Relative links**: `../features/vehicle` or `./configuration` - For nearby pages
153+
- **Anchors**: `/docs/reference/configuration/site#residualpower` - For specific sections
154+
- **Never include** `.md` or `.mdx` extensions in links
155+
156+
##### German/English Considerations
157+
158+
- **German docs** (`/docs`): Use standard paths like `/docs/features/solar-charging`
159+
- **English docs** (`/i18n/en`): Use the **same paths** - Docusaurus handles locale routing
160+
- Links automatically switch to the current language version
161+
- If English page doesn't exist, link falls back to German
162+
163+
##### Component Import Paths
164+
165+
- **German**: `import Screenshot from "../../src/components/Screenshot"`
166+
- **English**: `import Screenshot from "../../../../../src/components/Screenshot"`
167+
- Path depth differs due to i18n folder structure
168+
169+
##### Best Practices
170+
171+
- Prefer absolute paths (`/docs/...`) for clarity and consistency
172+
- Use relative paths (`../`) only within the same section
173+
- Always test links in both language versions
174+
- Keep anchor names (#section) consistent between translations
175+
- **Create explicit anchors** with `{#anchor-name}` on headings instead of relying on auto-generated ones
176+
- Auto-generated anchors change with heading text and differ between languages
177+
- Example: `### Vehicle Detection {#vehicle}` ensures stable, language-independent linking
178+
179+
### Documentation Best Practices
180+
181+
1. Always check existing documentation before creating new pages
182+
2. Maintain consistency with existing documentation style
183+
3. Use clear, concise language suitable for technical documentation
184+
4. Include code examples where appropriate
185+
5. **Update both German and English versions together** to prevent divergence
186+
6. Test your changes locally with `npm run start` (German) or `npm run start:en` (English)
187+
188+
## Git Workflow
189+
190+
- Main branch: `main`
191+
- Keep commit messages brief and concise
192+
- Reference issues when applicable
193+
- Keep commits focused and atomic
194+
195+
## Common Tasks
196+
197+
- Updating documentation: Edit templates in `/templates` directory
198+
- Adding new features: Create corresponding documentation templates
199+
- Fixing issues: Check both templates and generated output
200+
- Testing: Verify template processing and output formatting
201+
202+
## Important Notes
203+
204+
- This repository is primarily for documentation
205+
- Code changes should be made in the main evcc repository
206+
- Documentation is automatically synchronized with releases
207+
- Always preserve existing template structure and variables

CLAUDE.md

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

0 commit comments

Comments
 (0)