Skip to content

Commit 0ce1ee4

Browse files
committed
docs: add detailed agent instructions for testing and spellchecking
- Add section on testing and verifying changes locally - Add spellchecking guidance with dictionary setup - Add documentation versioning guidelines - Reference human-centric guidelines (DCO, PR etiquette) to CONTRIBUTING.md - Add troubleshooting sections Signed-off-by: Jonah Kowall <[email protected]>
1 parent 5072bd1 commit 0ce1ee4

File tree

1 file changed

+94
-4
lines changed

1 file changed

+94
-4
lines changed

AGENTS.md

Lines changed: 94 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ Before making changes, familiarize yourself with:
1919
The CONTRIBUTING.md file contains all necessary information for setting up,
2020
building, linting, and making changes to the documentation.
2121

22+
**For human-centric guidelines** such as DCO (Developer Certificate of Origin)
23+
signing, PR etiquette, and community interaction, refer to [CONTRIBUTING.md](CONTRIBUTING.md)
24+
and the [general contributing guidelines](https://github.com/jaegertracing/jaeger/blob/main/CONTRIBUTING_GUIDELINES.md).
25+
2226
## Agentic Workflow Tips
2327

2428
### Repository Structure
@@ -41,6 +45,79 @@ efficiently:
4145
- **Deployment**: Netlify automatically deploys from the `main` branch
4246
- **Preview**: Netlify creates preview deployments for PRs
4347

48+
### Testing and Verifying Changes
49+
50+
Before submitting a PR, verify your changes locally:
51+
52+
#### 1. Setup (First Time Only)
53+
54+
```bash
55+
npm install
56+
```
57+
58+
This installs all dependencies including the required Hugo version.
59+
60+
#### 2. Run the Site Locally
61+
62+
```bash
63+
make develop
64+
# or
65+
npm run serve
66+
```
67+
68+
This starts a local server at [localhost:1313](http://localhost:1313) with hot
69+
reload. Verify your changes render correctly in the browser.
70+
71+
#### 3. Build the Site
72+
73+
```bash
74+
npm run build
75+
```
76+
77+
Ensure the build completes without errors before submitting a PR.
78+
79+
#### 4. Run All Checks
80+
81+
Run these commands to verify CI will pass:
82+
83+
```bash
84+
npm run check:format # Check code formatting
85+
npm run check:spelling # Run spellcheck
86+
npm run check:links:internal # Check internal links (faster)
87+
npm run check:filenames # Check filename conventions
88+
```
89+
90+
For comprehensive link checking (including external links):
91+
92+
```bash
93+
npm run check:links:all # Check all links (slower, builds site first)
94+
```
95+
96+
#### 5. Fix Common Issues
97+
98+
```bash
99+
npm run fix:format # Auto-fix formatting issues
100+
npm run fix:filenames # Convert underscores to hyphens in filenames
101+
npm run fix # Run both fixes
102+
```
103+
104+
### Spellchecking
105+
106+
The repository uses [cspell](https://cspell.org/) for spellchecking. Configuration
107+
is in `.cspell.yml` with custom dictionaries in the `.cspell/` directory.
108+
109+
If the spellchecker flags a legitimate word (technical term, proper noun, etc.):
110+
111+
1. **For general technical terms**: Add to `.cspell/project-words.txt`
112+
2. **For people's names**: Add to `.cspell/project-names-src.txt`
113+
114+
**Important rules for `project-words.txt`:**
115+
116+
- Words must be sorted alphabetically (case-insensitive)
117+
- One word per line
118+
- The file is case-sensitive, so add the exact casing needed
119+
- Run `sort -c --ignore-case .cspell/project-words.txt` to verify sorting
120+
44121
### Troubleshooting
45122

46123
#### Link Checker Issues
@@ -61,11 +138,24 @@ Common issues:
61138

62139
#### Filename Violations
63140

64-
If CI complains about filename conventions:
141+
Run `npm run fix:filenames` to auto-fix.
65142

66-
```bash
67-
npm run fix:filenames
68-
```
143+
#### Spellcheck Failures
144+
145+
1. Review the flagged words in the output
146+
2. If the word is misspelled, fix it in the content
147+
3. If the word is legitimate, add it to the appropriate dictionary file
148+
4. Ensure `project-words.txt` remains sorted alphabetically
149+
150+
### Documentation Versioning
151+
152+
When making documentation changes:
153+
154+
- **New features/changes**: Edit files in `content/docs/v2/_dev/` (for next release)
155+
- **Fixes for current version**: Apply to both `_dev/` and the most recent version
156+
directory (e.g., `content/docs/v2/2.x/`) so changes appear immediately on the
157+
live site
158+
- **Backporting**: Update older version directories if the fix applies to them
69159

70160
### Additional Resources
71161

0 commit comments

Comments
 (0)