diff options
| author | Yuriy Andamasov <yuriy@andamasov.com> | 2026-05-07 14:46:50 +0300 |
|---|---|---|
| committer | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-07 15:38:27 +0300 |
| commit | 9d84dabbe420f77ea61e125544556c7769bfb20b (patch) | |
| tree | 32a9a321e758714b8e9dbe6c7402e04b856b054d | |
| parent | f950ab61911b9b7cd5e6bd7d87ad7f9efd6c1be5 (diff) | |
| download | vyos-documentation-9d84dabbe420f77ea61e125544556c7769bfb20b.tar.gz vyos-documentation-9d84dabbe420f77ea61e125544556c7769bfb20b.zip | |
general: T8595: switch CLAUDE.md to AGENTS.md (+ Copilot symlink)
| l---------[-rw-r--r--] | .github/copilot-instructions.md | 81 | ||||
| -rw-r--r-- | AGENTS.md (renamed from CLAUDE.md) | 2 |
2 files changed, 2 insertions, 81 deletions
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 30fa5800..be77ac83 100644..120000 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,80 +1 @@ -## VyOS Documentation Project - -This is VyOS user documentation written in reStructuredText (RST) and built with Sphinx. - -### Review Scope - -When reviewing pull requests, only flag issues **introduced by the PR's changes**. Do not flag pre-existing issues in unchanged lines. Compare against the base branch to determine what was actually changed. - -### RST Heading Hierarchy - -All files must use this heading order: - -``` -##### (Title — one per file, with overline) -***** (Chapters) -===== (Sections) ------ (Subsections) -^^^^^ (Subsubsections) -""""" (Paragraphs) -``` - -### Line Length - -Maximum 80 characters per line. Exception: content inside `.. code-block::` directives is **exempt** — they render with `<pre>` tags and preserve source formatting. Do not flag long lines inside code blocks. - -### Linter Suppression Markers - -`.. stop_vyoslinter` and `.. start_vyoslinter` are RST comments used to suppress CI linter checks. Key conventions: - -- When used **inside an indented directive** (`.. cfgcmd::`, `.. opcmd::`, list items), markers should match the surrounding indentation to stay within the block. -- When used **at top level** (outside any directive), markers are placed at column 0. -- Both patterns exist in this repo. Do not flag either placement as incorrect. -- They must always appear in pairs (stop then start). A missing `start_vyoslinter` is a real issue. -- A `stop_vyoslinter` that covers a large section is acceptable when the content requires it (e.g., files full of real debug output with production IPs). - -### IP Address Rules - -The CI linter checks IP addresses. These are **allowed without suppression** — do not flag them: - -- RFC 5737 documentation addresses: `192.0.2.0/24`, `198.51.100.0/24`, `203.0.113.0/24` -- RFC 3849 documentation IPv6: `2001:db8::/32` -- RFC 1918 private ranges: `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16` -- Loopback (`127.0.0.0/8`), link-local (`169.254.0.0/16`), `0.0.0.0/0` - -Real public IPs (e.g., `8.8.8.8`) require `stop/start_vyoslinter` suppression. Do not suggest replacing them with documentation addresses if the example intentionally uses real IPs. - -### TODO Markers - -`.. TODO::` directives serve two purposes in this repo: - -1. **Tracking markers** on pages that need `cfgcmd`/`opcmd` conversion (these are intentionally added). -2. **Stale markers** on pages that already have full content (these should be removed). - -A PR that removes some TODOs and adds others is not contradictory — the intent matters. - -### VyOS Directives - -- `.. cfgcmd::` for configuration mode commands -- `.. opcmd::` for operational mode commands -- Do not convert these to plain `.. code-block::` — they are tracked for command coverage. - -### YAML in Code Blocks - -Ansible playbook examples in `.. code-block::` use RST indentation (typically 4 spaces from the directive). The YAML indentation within the block may differ from standalone YAML files. Verify carefully before flagging YAML as invalid — count spaces from the code-block's own indentation base, not from column 0. - -### Page Structure - -Configuration pages follow this order: Theory, Configuration (cfgcmd), Examples, Known Issues, Debugging. - -### Known False Positives - -Do **not** flag the following — they have been verified as correct or intentional: - -- **Markdown tables rendering with `||`**: Diff views may show table pipes as double-pipes. Check the raw source file before flagging. -- **`stop/start_vyoslinter` at column 0 inside directives**: This is one of two accepted patterns. The other is indented markers matching the directive. Both are valid. -- **RFC 1918 addresses without linter suppression**: Private IPs (`10.x`, `172.16.x`, `192.168.x`) are allowed. Do not suggest adding `stop/start_vyoslinter` around them. -- **Long lines inside `.. code-block::`**: Code blocks are exempt from the 80-character line limit. -- **Pre-existing typos or grammar issues in unchanged lines**: Only flag issues introduced by the current PR's diff. If a typo exists on an unchanged line, it is out of scope. -- **Ansible YAML indentation in RST code blocks**: YAML inside `.. code-block::` is indented relative to the directive, not column 0. Verify from the code-block's indentation base before flagging as invalid. -- **Adding `.. TODO::` while removing others**: Tracking TODOs on pages needing `cfgcmd` conversion is intentional. Removing stale TODOs on completed pages is also intentional. Both can happen in the same PR. +../AGENTS.md
\ No newline at end of file @@ -1,4 +1,4 @@ -# CLAUDE.md +# AGENTS.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
