Skip to content

Commit a418233

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

File tree

1 file changed

+142
-0
lines changed

1 file changed

+142
-0
lines changed

AGENTS.md

Lines changed: 142 additions & 0 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,125 @@ 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+
### Code Quality Checks
105+
106+
Before creating a PR, run the following checks to ensure CI passes:
107+
108+
```bash
109+
npm run check:format # Check code formatting
110+
npm run check:spelling # Run spellcheck
111+
npm run check:links:internal # Check internal links
112+
npm run check:filenames # Check filename conventions
113+
```
114+
115+
To automatically fix issues:
116+
117+
```bash
118+
npm run fix:format # Fix formatting issues
119+
npm run fix:filenames # Fix filename convention violations
120+
```
121+
122+
### Spellchecking
123+
124+
The repository uses [cspell](https://cspell.org/) for spellchecking. Configuration
125+
is in `.cspell.yml` with custom dictionaries in the `.cspell/` directory.
126+
127+
#### Running Spellcheck
128+
129+
```bash
130+
npm run check:spelling
131+
```
132+
133+
This checks all content in `content/` and markdown files in `layouts/`.
134+
135+
#### Adding Words to the Dictionary
136+
137+
If the spellchecker flags a legitimate word (technical term, proper noun, etc.):
138+
139+
1. **For general technical terms**: Add to `.cspell/project-words.txt`
140+
2. **For people's names**: Add to `.cspell/project-names-src.txt`
141+
142+
**Important rules for `project-words.txt`:**
143+
144+
- Words must be sorted alphabetically (case-insensitive)
145+
- One word per line
146+
- The file is case-sensitive, so add the exact casing needed
147+
- Run `sort -c --ignore-case .cspell/project-words.txt` to verify sorting
148+
149+
Example of adding a word:
150+
151+
```bash
152+
# Add the word in the correct alphabetical position
153+
# Then verify the file is properly sorted:
154+
sort -c --ignore-case .cspell/project-words.txt
155+
```
156+
157+
#### Verifying Spellcheck Passes
158+
159+
After adding words:
160+
161+
```bash
162+
npm run check:spelling
163+
```
164+
165+
If no output and exit code 0, the spellcheck passes.
166+
44167
### Troubleshooting
45168

46169
#### Link Checker Issues
@@ -67,6 +190,25 @@ If CI complains about filename conventions:
67190
npm run fix:filenames
68191
```
69192

193+
#### Spellcheck Failures
194+
195+
If spellcheck fails:
196+
197+
1. Review the flagged words in the output
198+
2. If the word is misspelled, fix it in the content
199+
3. If the word is legitimate, add it to the appropriate dictionary file
200+
4. Ensure `project-words.txt` remains sorted alphabetically
201+
202+
### Documentation Versioning
203+
204+
When making documentation changes:
205+
206+
- **New features/changes**: Edit files in `content/docs/v2/_dev/` (for next release)
207+
- **Fixes for current version**: Apply to both `_dev/` and the most recent version
208+
directory (e.g., `content/docs/v2/2.x/`) so changes appear immediately on the
209+
live site
210+
- **Backporting**: Update older version directories if the fix applies to them
211+
70212
### Additional Resources
71213

72214
- [Hugo Documentation](https://gohugo.io/documentation/)

0 commit comments

Comments
 (0)