Skip to content

Commit aaae477

Browse files
committed
[docs] Update AI assistant rules
1 parent 27b44c7 commit aaae477

2 files changed

Lines changed: 99 additions & 190 deletions

File tree

AGENTS.md

Lines changed: 98 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,127 @@
1-
# AGENTS.md
1+
# AGENTS.md for Deckhouse Development Platform
22

3-
This repository contains the Hugo source for the Deckhouse Development Platform documentation website.
3+
This repository contains Hugo-based documentation for the Deckhouse Development Platform.
44

5-
Use this file as a quick entry point. Treat the detailed rules under `.cursor/rules/docs/` as normative when they apply.
5+
## Run the docs site locally
66

7-
## Repo Overview
7+
```bash
8+
make up # start via Docker Compose
9+
make down # stop and remove containers
10+
```
811

9-
- Main documentation content lives under `content/documentation/`.
10-
- Hugo configuration lives under `config/_default/hugo.yaml`.
11-
- Local run instructions live in `README.md`.
12-
- The site uses the shared Hugo module `github.com/deckhouse/hugo-web-product-module`.
12+
- EN: <http://localhost/products/development-platform/documentation/>
13+
- RU: <http://ru.localhost/products/development-platform/documentation/>
1314

14-
## Preferred Workflow
15+
All targets:
1516

16-
Work from the repository root.
17+
| Target | Purpose |
18+
|--------|---------|
19+
| `make up` | Start docs via Docker Compose |
20+
| `make down` | Stop and remove containers |
21+
| `make serve` | Start Hugo dev server locally without Docker |
22+
| `make build` | Build the site to `./public` |
23+
| `make lint-markdown` | Lint Markdown files |
24+
| `make lint-markdown-fix` | Lint and auto-fix Markdown files |
25+
| `make mod` | Clean up Hugo modules (`hugo mod tidy`) |
1726

18-
```bash
19-
make up
20-
make build
21-
make lint-markdown
22-
make down
23-
```
27+
## Editorial policy
28+
29+
The normative style guide and glossary are at **<https://pp.flant.ru/llms.txt>**.
30+
Fetch it before writing or reviewing documentation.
31+
32+
## Documentation style
33+
34+
- Write concise technical text with clear user value.
35+
- No first-level headings (`#`) in documentation files. Minimum level is `##`.
36+
- Prefer short paragraphs and structured lists.
37+
- For emphasis, use **bold**; avoid unnecessary italic.
38+
- Keep instructions actionable and testable.
39+
- In command examples use `d8 k` instead of `kubectl`.
40+
- YAML snippets must be syntactically valid.
41+
- Markdown ordered lists: use `1.` for every item (not `1.`, `2.`, `3.`).
2442

25-
- Use `make up` to start the local docs site.
26-
- Use `make build` to verify the site builds.
27-
- Use `make lint-markdown` before handing off Markdown changes.
28-
- Use `make lint-markdown-fix` only when automatic fixes are useful and safe.
29-
- Use `make down` to stop local containers.
43+
### Inline code
3044

31-
For local preview URLs, follow `README.md` as the source of truth:
45+
Use inline code for: parameters, module names, commands, file paths, HTTP codes.
46+
Do not overuse it for resource type names in narrative text.
47+
Do not wrap values inside YAML files in backticks — YAML values are already code context.
3248

33-
- EN: `http://localhost/products/development-platform/documentation/`
34-
- RU: `http://ru.localhost/products/development-platform/documentation/`
49+
### Links
3550

36-
## Documentation Rules
51+
- Use meaningful link anchors (avoid "here" or "тут").
52+
- Links to project pages must be relative.
53+
- Links to Deckhouse Kubernetes Platform docs must be absolute without domain (`/products/kubernetes-platform/documentation/v1/...`).
3754

38-
When editing documentation pages:
55+
### Code blocks
3956

40-
- Do not use a first-level heading (`# ...`) in documentation files. Start at `##`.
41-
- Always use fenced code blocks with an explicit language tag supported by Hugo/Chroma.
42-
- Use Hugo shortcodes and alerts only as allowed by project rules.
43-
- Keep YAML examples and front matter syntactically valid.
44-
- Use meaningful link text. Avoid generic anchors such as "here" or "тут".
45-
- In command examples, prefer `d8 k` instead of `kubectl`.
57+
Every fenced code block must have an explicit language tag from the Hugo/Chroma list.
58+
If the needed language is absent, use `text` or `plain`.
4659

47-
Primary references:
60+
Common tags: `bash`, `yaml`, `json`, `go`, `go-html-template`, `text`, `plain`.
61+
Full list: see `.cursor/rules/docs/hugo-supported-codeblock-languages.mdc`.
4862

49-
- `.cursor/rules/docs/global-style.mdc`
50-
- `.cursor/rules/docs/hugo-supported-codeblock-languages.mdc`
51-
- `.cursor/rules/docs/hugo-shortcodes.mdc`
52-
- `.cursor/rules/docs/refs-editorial-policy-full.mdc`
63+
### Hugo shortcodes
64+
65+
```go-html-template
66+
{{< alert level="warning" >}}
67+
Message text.
68+
{{< /alert >}}
69+
```
70+
71+
Alert levels: `info`, `warning`, `danger`.
72+
73+
```go-html-template
74+
{{< tabs name="uniq_name" >}}
75+
{{% tab name="Tab 1" %}}Content{{% /tab %}}
76+
{{% tab name="Tab 2" %}}Content{{% /tab %}}
77+
{{< /tabs >}}
78+
```
79+
80+
```go-html-template
81+
{{% details "Summary..." %}}
82+
Markdown content.
83+
{{% /details %}}
84+
```
5385

54-
## Language And Terminology
86+
### Release notes (`content/documentation/release-notes/`)
5587

56-
- Follow the repository glossary and terminology rules exactly.
57-
- Do not replace approved terms with ad hoc synonyms.
58-
- Do not write "платформа Deckhouse" when a specific product name is required.
59-
- Use module names exactly as defined canonically, without humanizing or reformatting them.
60-
- For Russian instructional text, use imperative "вы"-form.
88+
- Under a heading, if the only body content is a single bullet — write plain prose, not a list.
89+
- Keep lists only when there are two or more top-level bullets under the same heading.
6190

62-
Primary references:
91+
## Terminology
6392

64-
- `.cursor/rules/docs/terminology.mdc`
65-
- `.cursor/rules/docs/refs-glossary-full.mdc`
93+
Full glossary: <https://pp.flant.ru/llms.txt> (see "Glossary" section).
6694

67-
## EN/RU Parity
95+
Key rules:
96+
- `K8s` (uppercase K)
97+
- Use "узел", not "нода"
98+
- Use "веб-интерфейс"
99+
- Use `IP-адрес`
100+
- Use "файлы cookie"
101+
- Avoid "платформа Deckhouse"; use explicit product names (e.g. Deckhouse Kubernetes Platform)
102+
- Deckhouse module names must be in lowercase kebab-case.
103+
- Do not translate product names and abbreviations that the glossary keeps in EN (e.g. `RBAC`)
68104

69-
This repository is bilingual.
105+
Mixed EN/RU compound terms use a hyphen: `S3-бакет`, `managed-сервис`, `master-узел`, `HTTP-протокол`.
70106

71-
- Keep EN and RU pages semantically aligned when a paired page exists.
72-
- Russian files must use the `.ru.md` suffix.
73-
- When changing one language, check whether the paired page needs the same update.
74-
- Localized media should follow the project naming pattern, for example `image.png` and `image.ru.png`.
107+
## Russian text style
75108

76-
Primary reference:
109+
In Russian instructional text, always use the imperative вы-form:
110+
- «создайте», not «создаем»
111+
- «нажмите», not «нажимаем»
112+
- «перейдите», not «переходим»
77113

78-
- `.cursor/rules/docs/ru-en-parity.mdc`
114+
This applies to all step-by-step instructions, quickstart guides, and procedural text.
79115

80-
## Specialized Rules
116+
## Front matter
81117

82-
If your change touches one of these areas, read the matching rule file before editing:
118+
Required fields: `title`, `description` (concise, unique, not a copy of title).
83119

84-
- CRD translation files: `.cursor/rules/docs/crd-translation-files.mdc`
85-
- Front matter, links, and media conventions: `.cursor/rules/docs/frontmatter-links-media.mdc`
86-
- OpenAPI `x-doc-*` fields: `.cursor/rules/docs/openapi-x-doc.mdc`
120+
- Related links: use `params.relatedLinks` in front matter; do not add manual "Related links" sections in the Markdown body.
87121

88-
## Notes For Agents
122+
## EN/RU parity
89123

90-
- Keep this file short and practical. Do not duplicate the full policy files into new documents.
91-
- Prefer small, consistent documentation edits over broad rewrites.
92-
- If project instructions conflict, follow the more specific rule file, and treat the full editorial policy and glossary as authoritative.
124+
- Russian files use the `.ru.md` suffix only (not `.RU.md`, `_RU.md`).
125+
- For each change relevant to both languages, update both files.
126+
- Do not leave EN/RU pairs semantically diverged unless the change is intentionally language-specific.
127+
- Localized media: `image1.jpg` (EN) / `image1.ru.jpg` (RU).

CLAUDE.md

Lines changed: 0 additions & 127 deletions
This file was deleted.

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)