Skip to content

Commit b4750fa

Browse files
authored
Add AGENTS.md with LLM contribution guidelines
This document provides guidelines for Large Language Models contributing to the Layer5 website, covering content generation, code contributions, and community alignment. Signed-off-by: Lee Calcote <lee.calcote@layer5.io>
1 parent 26fbfaa commit b4750fa

1 file changed

Lines changed: 141 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# AGENTS.md
2+
3+
This document provides instructions for Large Language Models (LLMs) contributing to the Layer5 website, hosted at https://github.com/layer5io/layer5, built with Gatsby.js. These guidelines ensure consistency, quality, and alignment with the project's goals of promoting cloud native infrastructure management through clear documentation and user-friendly content.
4+
5+
## Project Overview
6+
7+
The Layer5 website (https://layer5.io) is a Gatsby.js-based static site that serves as the primary interface for the Layer5 community. It showcases projects like Meshery, Kanvas, and Cloud Native Patterns, and provides resources for contributors, users, and cloud native enthusiasts. The site emphasizes clean design, fast performance, and accessibility.
8+
9+
## Instructions for LLMs
10+
11+
### 1. Content Generation Guidelines
12+
13+
- **Tone and Style**: Use a professional yet approachable tone. Content should be clear, concise, and welcoming to both technical and non-technical audiences. Align with Layer5's mission of empowering engineers to "expect more from their infrastructure."
14+
- **Markdown Usage**: All content must be written in Markdown, adhering to Gatsby's content structure (e.g., MDX files in `src/pages` or `src/content`).
15+
- **Frontmatter**: Include appropriate frontmatter in MDX files. Example:
16+
17+
```yaml
18+
---
19+
title: "Page Title"
20+
path: "/path/to/page"
21+
date: "2025-09-23"
22+
description: "Short description for SEO."
23+
---
24+
```
25+
- **SEO Optimization**: Ensure all generated content includes meta descriptions, relevant keywords (e.g., "cloud native," "Meshery," "service mesh"), and proper heading structures (H1, H2, etc.).
26+
- **Consistency**: Use American English spelling and grammar. Follow the Layer5 Writing Style Guide for terminology (e.g., "Meshery" not "meshery").
27+
28+
### 2. Code Contributions
29+
30+
- **Gatsby.js Structure**: Familiarize yourself with the repository structure:
31+
- `src/components`: Reusable React components.
32+
- `src/pages`: Page templates and MDX content.
33+
- `gatsby-config.js`: Site metadata and plugins.
34+
- `gatsby-node.js`: Dynamic page generation logic.
35+
- **React Components**: When generating components, use functional components with modern JavaScript (ES6+). Example:
36+
37+
```jsx
38+
import React from 'react';
39+
40+
const MyComponent = ({ title }) => (
41+
<div className="my-component">
42+
<h2>{title}</h2>
43+
</div>
44+
);
45+
46+
export default MyComponent;
47+
```
48+
- **Styling**: Use CSS modules or styled-components as per the project's conventions. Prefer Tailwind CSS classes if integrated. Example:
49+
50+
```jsx
51+
<div className="bg-blue-500 text-white p-4">Content</div>
52+
```
53+
- **Accessibility**: Ensure all components meet WCAG 2.1 standards (e.g., alt text for images, ARIA labels where needed).
54+
55+
### 3. Contribution Workflow
56+
57+
- **Pull Requests**: All changes must be submitted as pull requests (PRs) to the `master` branch. Follow the Layer5 Contributing Guidelines.
58+
- **Commit Messages**: Use clear, descriptive commit messages following the Conventional Commits format:
59+
60+
```
61+
feat: add new Meshery feature page
62+
fix: correct broken link in footer
63+
docs: update AGENTS.md with LLM instructions
64+
```
65+
- **Testing**: Ensure generated code passes `make setup` and `make site` without errors. Test for responsiveness across devices.
66+
- Verifying your fix: The website takes a long time to build. Don't interrupt the build when checking terminal output. Don't hail victory on a fix before you have ACTUALLY verified the solution. Wait for the website to be running, for you to actually \`curl\` a page and verify rendered content.
67+
68+
### 4. Content Restrictions
69+
70+
- **No External Images**: Do not include external image URLs in Markdown or components. Use local assets in `src/images`.
71+
- **No Placeholder Text**: Avoid placeholders like `[Your Name]` or `[Insert Content]`. Provide complete, usable content.
72+
- **No Sensitive Data**: Do not include API keys, credentials, or personal information in generated content.
73+
74+
### 5. Specific Tasks for LLMs
75+
76+
- **Documentation Updates**: Generate or update MDX files in `src/content` for tutorials, blog posts, or project documentation. Ensure alignment with Layer5's Documentation Guidelines.
77+
- **Blog Posts**: Create blog posts about cloud native topics, Meshery features, or community events. Example structure:
78+
79+
```markdown
80+
---
81+
title: "Exploring Meshery's New Features in 2025"
82+
path: "/blog/meshery-new-features-2025"
83+
date: "2025-09-23"
84+
description: "Discover the latest updates to Meshery, the cloud native management platform."
85+
---
86+
# Exploring Meshery's New Features in 2025
87+
## Introduction
88+
Meshery continues to evolve as the leading platform for...
89+
```
90+
- **Component Generation**: Create reusable React components for UI elements like buttons, cards, or modals, ensuring they match the site's design system.
91+
92+
### 6. Validation and Testing
93+
94+
- **Linting**: Run `npm run lint` to ensure code adheres to ESLint and Prettier rules.
95+
- **Build Testing**: Verify that `gatsby build` completes successfully.
96+
- **Preview**: Test changes locally with `gatsby develop` and check for visual/functional issues.
97+
98+
### 7. Community Alignment
99+
100+
- **CNCF Code of Conduct**: All contributions must adhere to the CNCF Code of Conduct.
101+
- **Engage with MeshMates**: For guidance, reference the MeshMates program in the Layer5 Community Handbook.
102+
103+
## Example Contribution
104+
105+
Below is an example of a new MDX page for the Layer5 website:
106+
107+
```markdown
108+
---
109+
title: "Getting Started with Meshery"
110+
path: "/learn/getting-started"
111+
date: "2025-09-23"
112+
description: "A beginner's guide to setting up Meshery for cloud native management."
113+
---
114+
# Getting Started with Meshery
115+
Meshery is an open-source cloud native management platform that simplifies...
116+
117+
## Installation
118+
1. Install Meshery CLI using:
119+
```bash
120+
curl -L https://meshery.io/install | bash -
121+
```
122+
123+
2. Verify installation:
124+
125+
```bash
126+
mesheryctl system check
127+
```
128+
129+
## Next Steps
130+
131+
Explore Meshery Docs for advanced configurations.
132+
133+
```
134+
135+
## Troubleshooting
136+
- **Build Errors**: Check `gatsby-config.js` for plugin misconfigurations.
137+
- **Content Issues**: Validate MDX syntax using `npm run develop`.
138+
- **Community Support**: Reach out via the [Layer5 Slack](https://slack.layer5.io) for assistance.
139+
140+
By following these guidelines, LLMs can contribute high-quality content and code to the Layer5 website, enhancing its role as a hub for the cloud native community.
141+
```

0 commit comments

Comments
 (0)