Skip to content

Commit 8ceaf59

Browse files
committed
Add AGENTS.md file for AI agent discovery of information
1 parent 54c7a11 commit 8ceaf59

File tree

1 file changed

+330
-0
lines changed

1 file changed

+330
-0
lines changed

AGENTS.md

Lines changed: 330 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,330 @@
1+
# Agent Instructions for www.eclipse.org-eclipse
2+
3+
## Repository Overview
4+
5+
This is the **Eclipse Project Website and New & Noteworthy (N&N) Repository**. It contains the public-facing website content for the Eclipse Platform, SWT, JDT, PDE, and Equinox projects, hosted at https://www.eclipse.org/eclipse/.
6+
7+
**Repository Statistics:**
8+
- Size: ~318MB, 3,856 files, 352 directories
9+
- Primary Content: 475 HTML files, 32 Markdown files, 8 shell/Perl scripts
10+
- Languages: Markdown, HTML, JavaScript, CSS, PHP, Bash, Perl
11+
- No build tools required (static website with dynamic JS rendering)
12+
13+
**GitHub Repository:** https://github.com/eclipse-platform/www.eclipse.org-eclipse
14+
15+
## Critical: Trust These Instructions
16+
17+
**Always trust and follow these instructions first.** Only search the codebase if information here is incomplete or appears incorrect. The instructions below have been validated and will save significant exploration time.
18+
19+
## Repository Structure
20+
21+
### Root Directory Files
22+
- `README.md` - Basic repository overview and contribution instructions
23+
- `index.html` - Main Eclipse project landing page
24+
- `project.js` - JavaScript for dynamic page generation and markdown rendering
25+
- `project.css`, `default_style.css` - Styling for the website
26+
- `eclipse.svg` - Eclipse logo
27+
- `Eclipse-website-local-server.launch` - Eclipse launch configuration for local preview
28+
29+
### Key Directories
30+
31+
**`news/`** - New and Noteworthy content (MOST IMPORTANT for contributions)
32+
- `news/4.x-template/` - Template for new releases (DO NOT modify directly)
33+
- `news/4.36/`, `news/4.37/`, `news/4.38/`, `news/4.39/` - Release-specific N&N content
34+
- `news/instructions.md` - Detailed authoring guidelines for N&N entries
35+
- `news/scripts/` - Automation scripts for N&N management
36+
37+
Each release folder (e.g., `news/4.37/`) contains:
38+
- `index.md` - Overview with links to component pages
39+
- `platform.md` - Platform and Equinox news
40+
- `jdt.md` - Java Development Tools news
41+
- `pde.md` - Plug-in Development Environment news
42+
- `platform_isv.md` - New APIs for Platform/SWT/Equinox
43+
- `acknowledgements.md` - Contributors list (auto-generated)
44+
- `images/` - Screenshots and diagrams (PNG format)
45+
46+
**`development/`** - Historical plans, release notes, acknowledgements (20,480 files)
47+
- Mostly legacy HTML/PHP files for older releases
48+
- `development/scripts/readme/` - Scripts for generating README files
49+
50+
**`swt/`** - SWT (Standard Widget Toolkit) documentation
51+
- FAQ, examples, tools, and community pages
52+
53+
**`templates/`** - HTML templates for page generation
54+
55+
**`markdown/`** - Markdown rendering infrastructure
56+
57+
**`.github/workflows/`** - CI/CD automation (see Validation section)
58+
59+
## Content Types and Workflows
60+
61+
### New & Noteworthy (N&N) Entries
62+
63+
**When to Edit:** Adding/modifying features for upcoming Eclipse releases
64+
65+
**Markdown Flavors Supported:**
66+
- Markdown 1.0
67+
- CommonMark 0.31
68+
- GitHub Flavored Markdown 0.29
69+
70+
**File Locations:**
71+
- Edit files in `news/<version>/` where `<version>` is like `4.37`, `4.38`, etc.
72+
- **Never edit** `news/4.x-template/` except to update the template itself
73+
74+
**N&N Entry Structure (Template):**
75+
```markdown
76+
### Feature Title in Title Case
77+
<!-- Optional link(s) to issues or PRs as invisible comment -->
78+
<details>
79+
<summary>Contributors</summary>
80+
81+
- [Contributor Name](https://github.com/username)
82+
</details>
83+
84+
Feature description goes here.
85+
Use active voice ("you" not "the user").
86+
Use backticks for commands: `Quick Fix`, `Ctrl+1`, `Preferences > General > Keys`.
87+
88+
![Descriptive label](images/feature-image.png)
89+
```
90+
91+
**Image Requirements:**
92+
- Format: PNG only
93+
- Location: `news/<version>/images/`
94+
- Naming: lowercase, hyphen-separated (e.g., `terminal-console.png`)
95+
- Size: Crop to focus on feature, avoid excessive size
96+
- Alt text: Add meaningful description
97+
98+
**Style Guidelines:**
99+
- Titles: Title Case, no trailing punctuation
100+
- Descriptions: Complete sentences with punctuation
101+
- Voice: Active voice, say "you" not "the user"
102+
- Emphasis: Use `backticks` for UI elements/commands; prefer **bold** over _italics_
103+
- Line breaks: Start each sentence on new line for easier editing
104+
105+
### Scripts and Automation
106+
107+
**Location:** `news/scripts/`
108+
109+
**1. applyTemplate.sh** - Initialize new release folder
110+
```bash
111+
cd news/scripts
112+
./applyTemplate.sh 4.40 2025-12
113+
```
114+
- Creates `news/4.40/` from template
115+
- Replaces `4.x` with `4.40` and `YYYY-MM` with `2025-12`
116+
- **Exits with error if directory already exists**
117+
118+
**2. Validation Scripts** (Legacy - for HTML files)
119+
- `w3cValidateHtmlFile.sh <file>` - Validates single HTML file via W3C service
120+
- `validateHtmlNewsRepo.sh <news-dir>` - Validates all N&N HTML files
121+
- `validateHtmlDocBundle.sh <doc-repo-path>` - Validates doc bundle HTML
122+
123+
**Note:** Current N&N uses Markdown (not HTML), so HTML validation scripts are for legacy content only.
124+
125+
**3. Perl Scripts** (Legacy - for copying to doc bundles)
126+
- `copyNewsToDocBundle.pl` - Copies HTML news to eclipse.platform.common bundles
127+
- `parseHtml.pl` - Extracts and copies images
128+
- **Requires:** Perl with `HTML::TokeParser::Simple` module
129+
- **Usage:** Only when syncing to separate documentation repositories
130+
131+
## GitHub Actions Workflows
132+
133+
**Location:** `.github/workflows/`
134+
135+
### 1. checkAcknowledgements.yml
136+
- **Trigger:** Pull requests modifying `news/*/acknowledgements.md`
137+
- **Purpose:** Validates contributor name consistency
138+
- **Checks:** Each GitHub profile has only one name variant
139+
- **Action:** Fails if multiple names found for same profile
140+
141+
### 2. generateAcknowledgements.yml
142+
- **Trigger:** Manual workflow dispatch
143+
- **Input:** Eclipse version (e.g., `4.36`)
144+
- **Purpose:** Auto-generates contributor lists from git history
145+
- **Process:**
146+
1. Queries all Eclipse TLP repositories
147+
2. Collects commits between release tags
148+
3. Excludes bot accounts
149+
4. Creates/updates `acknowledgements.md`
150+
5. Opens PR with results
151+
- **Note:** Reuses existing names from acknowledgements file when available
152+
153+
### 3. updateRelease.yml
154+
- **Trigger:** New milestone created with "Release" in description
155+
- **Purpose:** Automatically prepares new release folder
156+
- **Process:**
157+
1. Runs `applyTemplate.sh` with milestone title and date
158+
2. Creates PR for review
159+
- **Example:** Milestone "4.40" due "2025-12-15" → creates `news/4.40/`
160+
161+
## Validation and Testing
162+
163+
**No traditional build or test suite exists.** This is a static website repository with client-side JavaScript rendering.
164+
165+
### Pre-Commit Validation Steps
166+
167+
1. **Markdown Syntax:** Ensure valid Markdown (all flavors supported)
168+
2. **Image References:** Verify all `![...](images/...)` paths exist
169+
3. **Contributor Links:** Validate GitHub profile URLs format: `https://github.com/username`
170+
4. **Backticks for UI:** Use backticks for commands, shortcuts, preference paths
171+
172+
### Local Preview
173+
174+
Use the Eclipse launch configuration:
175+
1. Open in Eclipse IDE
176+
2. Run: `Run Configurations > Eclipse Applications > Eclipse-website-local-server`
177+
3. Requires: Eclipse with Oomph HTTPServer support, Java 21
178+
4. Opens browser to `localhost` serving website content
179+
5. Refresh browser (Ctrl+F5) after changes
180+
181+
**Alternative (without Eclipse):**
182+
- Any HTTP server serving static files works
183+
- JavaScript in `project.js` handles markdown rendering dynamically
184+
- No build step required
185+
186+
### CI Validation
187+
188+
Pull requests trigger:
189+
- `checkAcknowledgements.yml` if modifying acknowledgements
190+
- No other automated checks currently run on PRs
191+
192+
## Common Tasks and Commands
193+
194+
### Creating New Release Folder
195+
```bash
196+
cd news/scripts
197+
./applyTemplate.sh 4.40 2025-12
198+
# Creates news/4.40/ with all template files
199+
# Replaces placeholders automatically
200+
```
201+
202+
### Adding N&N Entry
203+
204+
1. Navigate to appropriate file:
205+
- Platform/Equinox features → `news/<version>/platform.md`
206+
- JDT features → `news/<version>/jdt.md`
207+
- PDE features → `news/<version>/pde.md`
208+
- New APIs → `news/<version>/platform_isv.md`
209+
210+
2. Add entry following template (see N&N Entry Structure above)
211+
212+
3. Add images to `news/<version>/images/` if needed
213+
214+
4. Uncomment section headers if adding to new section
215+
216+
### Validating HTML Files (Legacy)
217+
```bash
218+
cd news/scripts
219+
./w3cValidateHtmlFile.sh ../4.37/index.html
220+
# Uses W3C validator web service
221+
# Requires curl and internet connection
222+
```
223+
224+
### Checking Repository Status
225+
```bash
226+
git status
227+
git diff
228+
# Always check changes before committing
229+
```
230+
231+
## File Type Reference
232+
233+
**Markdown Files (`.md`):**
234+
- Current format for N&N entries (as of 4.36+)
235+
- Rendered dynamically by `project.js`
236+
237+
**HTML Files (`.html`):**
238+
- Legacy N&N entries (pre-4.36)
239+
- Static website pages
240+
- Generated acknowledgements (some versions)
241+
242+
**JavaScript (`.js`):**
243+
- `project.js` - Core website functionality, markdown rendering
244+
245+
**CSS (`.css`):**
246+
- `project.css`, `default_style.css` - Website styling
247+
248+
**Shell Scripts (`.sh`):**
249+
- Automation for release management and validation
250+
251+
**Perl Scripts (`.pl`):**
252+
- Legacy HTML content processing
253+
254+
## Environment Setup
255+
256+
**Required Tools:**
257+
- Git (for version control)
258+
- Text editor (for Markdown/HTML editing)
259+
- Web browser (for preview)
260+
261+
**Optional Tools:**
262+
- Eclipse IDE with Oomph HTTPServer (for launch configuration)
263+
- Java 21 (for Eclipse launch)
264+
- curl (for HTML validation scripts)
265+
- Perl with HTML::TokeParser::Simple (for legacy doc bundle sync)
266+
267+
**No installation/build commands needed** - this is a static content repository.
268+
269+
## Important Constraints
270+
271+
### What NOT to Do
272+
273+
1. **DO NOT modify `news/4.x-template/`** unless updating template itself
274+
2. **DO NOT commit large images** - optimize PNGs before adding
275+
3. **DO NOT use absolute paths** - keep relative paths (e.g., `images/file.png`)
276+
4. **DO NOT add HTML to new N&N entries** - use Markdown (except inline HTML if absolutely necessary)
277+
5. **DO NOT manually edit `acknowledgements.md`** - auto-generated via workflow (except fixing errors)
278+
6. **DO NOT link to GitHub issues in N&N entries** - guidelines prohibit external links
279+
280+
### Section Commenting
281+
282+
Many sections in template files are commented out:
283+
```markdown
284+
<!--
285+
---
286+
## Section Name
287+
-->
288+
```
289+
**When adding first entry to section:** Remove the `<!-- -->` comment markers surrounding the section header.
290+
291+
## Troubleshooting
292+
293+
### applyTemplate.sh fails with "Directory exists"
294+
- **Cause:** Release folder already created
295+
- **Solution:** Choose different version number or manually modify existing folder
296+
297+
### Images not displaying in preview
298+
- **Check:** Image file exists in `news/<version>/images/`
299+
- **Check:** Filename matches exactly (case-sensitive)
300+
- **Check:** Relative path is correct: `images/filename.png`
301+
302+
### Acknowledgements validation fails
303+
- **Cause:** Same GitHub profile has different name variants
304+
- **Solution:** Edit `acknowledgements.md` to use single consistent name
305+
306+
### HTML validation errors (legacy)
307+
- **Check:** W3C validator service is accessible
308+
- **Note:** Only relevant for old HTML files, not current Markdown content
309+
310+
## Key References
311+
312+
- **N&N Instructions:** `news/instructions.md` (comprehensive authoring guide)
313+
- **Script Instructions:** `news/scripts/instructions.txt` (detailed script usage)
314+
- **Contributing Guide:** https://github.com/eclipse-platform/.github/blob/main/CONTRIBUTING.md
315+
- **Eclipse Website:** https://www.eclipse.org/eclipse/
316+
- **Published N&N:** https://www.eclipse.org/eclipse/news/
317+
318+
## Summary for Quick Reference
319+
320+
**Repository Purpose:** Eclipse project website and New & Noteworthy documentation
321+
322+
**Most Common Edits:** Adding entries to `news/<version>/*.md` files
323+
324+
**No Build Required:** Static website with JavaScript rendering
325+
326+
**Validation:** Manual review + automated acknowledgements checking
327+
328+
**Preview:** Use Eclipse launch config or any HTTP server
329+
330+
**Key Principle:** Follow N&N template exactly, use Markdown, optimize images, test locally before PR

0 commit comments

Comments
 (0)