docs
Copilot instructions101 starsChanged 4 months agoApache-2.0View on GitHub
IMPORTANT: When using GitHub Copilot, always select the most powerful AI model available (e.g., GPT-5.1 Codex, Gemini 3 Pro Claude 4.5, or the latest advanced model) to ensure the most comprehensive, most human-understandable documentation with examples, tips, notes, analogies and so on. The Layer5 Docs website is a Hugo-based documentation site that serves as the primary documentation resource for Layer5 products, hosted at https://github.com/layer5io/docs and live at https://docs.layer5.io. It provides comprehensive documentation for Layer5 Cloud, Kanvas, and related products, offering…
- Deletes or force-pushes
- Installs packages
We split this copilot-instructions.md into the rules it gives an agent
47 rules. About 0 are common, 39 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈39
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 5
IMPORTANT: When using GitHub Copilot, always select the most powerful AI model available (e.g., GPT-5.1 Codex, Gemini 3 Pro Claude 4.5, or …
- Distinctive: line 25
Never delete or modify working code unless absolutely necessary
- Distinctive: line 30
Follow the existing code style and patterns in the repository
- Distinctive: line 31
Ensure proper indentation and formatting in templates and content
- Distinctive: line 32
Write clean, readable, self-documenting code with minimal comments unless necessary for complex logic
- Distinctive: line 36
Always validate changes work before considering them complete
- Very specific: line 38
Run the site locally: make site or hugo server -D -F
- Distinctive: line 39
Test changes incrementally and iteratively
- Distinctive: line 68
Don't fork this repo.
- Distinctive: line 69
Create a branch and pull request in this repo.
- Distinctive: line 70
Don't mark your pull request as draft.
- Distinctive: line 108
Use a professional yet approachable tone
- Distinctive: line 111
Use American English spelling and grammar
- Distinctive: line 114
All documentation content is written in Markdown
- Very specific: line 115
Place content files in appropriate directories under content/en/
- Distinctive: line 127
Use the project's custom shortcodes for enhanced content:
- Very specific: line 141
Use the following syntax: !alt text or <img src="" alt="" />
- Distinctive: line 142
Always provide complete image paths for subpages
- Very specific: line 143
Add data-modal="false" to prevent images from opening in a modal
- Distinctive: line 144
Always include descriptive alt text for accessibility and SEO
- Distinctive: line 147
No external images: Use local assets only
- Distinctive: line 149
No sensitive data: Never include API keys, credentials, or personal information
- Distinctive: line 155
Follow Go template syntax conventions
- Distinctive: line 156
Use partials for reusable template components
- Distinctive: line 158
Use Hugo's built-in functions when possible
- Distinctive: line 162
Follow existing CSS class naming conventions
- Distinctive: line 163
Ensure responsive design is maintained
- Distinctive: line 164
Use theme variables when possible
- Very specific: line 170
Images: Always include descriptive alt text
- Distinctive: line 171
Interactive elements: Ensure keyboard navigation support
- Distinctive: line 172
ARIA labels: Use when semantic HTML is insufficient
- Distinctive: line 174
Semantic HTML: Use appropriate HTML5 elements
- Distinctive: line 179
Follow Conventional Commits format:
- Distinctive: line 203
Ensure CI checks pass before requesting review
- Distinctive: line 207
Use descriptive, kebab-case names:
- Very specific: line 215
Check hugo.toml for configuration issues
- Distinctive: line 218
Verify Hugo extended version is installed
- Distinctive: line 222
Check for unclosed shortcodes
- Distinctive: line 223
Verify file paths are correct and case-sensitive
- Very specific: line 226
Ensure Go is installed (required): go version
- Very specific: line 227
Check Node.js version matches .nvmrc
- Distinctive: line 232
Never commit secrets, API keys, or credentials
- Distinctive: line 233
Use environment variables for sensitive configuration
- Distinctive: line 234
Keep dependencies up to date
- Distinctive: line 235
Follow CSP headers and security configurations
- Distinctive: line 250
All contributions must adhere to the Layer5 Code of Conduct.
- Distinctive: line 254
Before submitting a PR, verify:
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Coding Agent Instructions for Layer5 Docs
AI Model Selection
IMPORTANT: When using GitHub Copilot, always select the most powerful AI model available (e.g., GPT-5.1 Codex, Gemini 3 Pro Claude 4.5, or the latest advanced model) to ensure the most comprehensive, most human-understandable documentation with examples, tips, notes, analogies and so on.
Project Overview
The Layer5 Docs website is a Hugo-based documentation site that serves as the primary documentation resource for Layer5 products, hosted at https://github.com/layer5io/docs and live at https://docs.layer5.io. It provides comprehensive documentation for Layer5 Cloud, Kanvas, and related products, offering tutorials, guides, and reference materials for users and contributors in the cloud native ecosystem.
Technology Stack
- Framework: Hugo (extended version with SCSS support)
- Theme: Docsy (Google's documentation theme)
- Language: Go templates, HTML, CSS/SCSS, JavaScript
- Content: Markdown with Hugo shortcodes
- Package Manager: npm
- Node Version: See
.nvmrc - Build System: Hugo CLI, Make
Core Principles
1. Minimal, Surgical Changes
- Make the smallest possible changes to accomplish the goal
- Never delete or modify working code unless absolutely necessary
- Focus on precise, targeted modifications rather than wholesale rewrites
- Preserve existing patterns and conventions unless explicitly changing them
2. Code Quality Standards
- Follow the existing code style and patterns in the repository
- Ensure proper indentation and formatting in templates and content
- Write clean, readable, self-documenting code with minimal comments unless necessary for complex logic
- Maintain accessibility standards (WCAG 2.1)
3. Testing and Validation
- Always validate changes work before considering them complete
- Build the site and verify rendered content:
make buildorhugo - Run the site locally:
make siteorhugo server -D -F - Test changes incrementally and iteratively
Project Structure
docs/
├── .github/ # GitHub configuration and workflows
├── assets/ # Site assets (CSS, JS, images)
├── charts/ # Chart files
├── content/
│ └── en/ # English content
│ ├── cloud/ # Layer5 Cloud documentation
│ ├── kanvas/ # Kanvas documentation
│ ├── contributing/ # Contribution guidelines
│ └── videos/ # Video content
├── data/ # Hugo data files
├── layouts/ # Hugo templates and layouts
│ ├── _default/ # Default layouts
│ ├── partials/ # Partial templates
│ └── shortcodes/ # Custom shortcodes
├── static/ # Static assets
├── hugo.toml # Hugo configuration
├── package.json # npm dependencies
├── Makefile # Build automation
└── CONTRIBUTING.md # Contribution guidelinesDevelopment Workflow
- Don't fork this repo.
- Create a branch and pull request in this repo.
- Don't mark your pull request as draft.
Setup
# Install dependencies (required for fresh clone)
make setup
# or
npm installDevelopment
# Start development server with drafts and future content
make site
# or
hugo server -D -FBuilding
# Build for production
make build
# or
hugo
# Clean and rebuild
make cleanDocker Development
# Run with Docker (requires Docker Desktop 4.24+ or Docker Compose 2.22+)
make dockerContent Guidelines
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"
- Use American English spelling and grammar
Markdown Content
- All documentation content is written in Markdown
- Place content files in appropriate directories under
content/en/ - Include proper frontmatter with metadata:
---
title: "Page Title"
description: "Short description for SEO (150-160 chars)"
weight: 10 # Optional: controls ordering in navigation
---Hugo Shortcodes
Use the project's custom shortcodes for enhanced content:
{{< alert type="success" title="Note" >}} Your Note {{< /alert >}}Alert types:
type="danger": Critical alerts (security-related or breaking changes)type="info": General informational contenttype="warning": Important warnings that need attentiontype="note": Neutral notes and tipstype="success": Positive outcomes or confirmations
Image Guidelines
- Use the following syntax:
or<img src="" alt="" /> - Always provide complete image paths for subpages
- Add
data-modal="false"to prevent images from opening in a modal - Always include descriptive alt text for accessibility and SEO
Content Restrictions
- No external images: Use local assets only
- No placeholder text: Provide complete, production-ready content
- No sensitive data: Never include API keys, credentials, or personal information
- Use proper capitalization: "Meshery" not "meshery", "Kanvas" not "canvas", "Layer5" not "layer5"
Template Guidelines
Hugo Templates
- Follow Go template syntax conventions
- Use partials for reusable template components
- Maintain consistent indentation in templates
- Use Hugo's built-in functions when possible
Styling
- SCSS files are located in
assets/ - Follow existing CSS class naming conventions
- Ensure responsive design is maintained
- Use theme variables when possible
Accessibility
Required Standards: WCAG 2.1 Level AA
- Images: Always include descriptive
alttext - Interactive elements: Ensure keyboard navigation support
- ARIA labels: Use when semantic HTML is insufficient
- Color contrast: Maintain at least 4.5:1 ratio for text
- Semantic HTML: Use appropriate HTML5 elements
Git Workflow
Commit Messages
Follow Conventional Commits format:
<type>(<scope>): <subject>Types:
feat: New feature or contentfix: Bug fix or correctiondocs: Documentation changesstyle: Formatting changes (no logic change)refactor: Code refactoringchore: Build process, tooling, dependencies
Examples:
feat(cloud): add workspace documentation
fix(kanvas): correct broken link in navigation
docs(contributing): update setup instructionsPull Requests
- Submit all changes as PRs to the
masterbranch - Reference related issues in PR description
- Ensure CI checks pass before requesting review
- Sign-off commits with
git commit -s
Branch Naming
Use descriptive, kebab-case names:
feat/add-cloud-security-docsfix/navigation-broken-linkdocs/update-contributing-guide
Troubleshooting
Build Errors
- Check
hugo.tomlfor configuration issues - Clear cache:
hugo --cleanDestinationDir - Reinstall dependencies:
rm -rf node_modules && npm install - Verify Hugo extended version is installed
Content Issues
- Validate Markdown syntax and frontmatter
- Check for unclosed shortcodes
- Verify file paths are correct and case-sensitive
Development Server Issues
- Ensure Go is installed (required):
go version - Check Node.js version matches
.nvmrc - Verify Hugo extended version is installed
Security Best Practices
- Never commit secrets, API keys, or credentials
- Use environment variables for sensitive configuration
- Keep dependencies up to date
- Follow CSP headers and security configurations
Community and Resources
Documentation
- Layer5 Community Handbook: https://layer5.io/community/handbook
- Layer5 Documentation: https://docs.layer5.io
- Hugo Documentation: https://gohugo.io/documentation/
Getting Help
- Layer5 Slack: https://slack.layer5.io
- Discussion Forum: https://discuss.layer5.io
- GitHub Issues: https://github.com/layer5io/docs/issues
Code of Conduct
All contributions must adhere to the Layer5 Code of Conduct.
Summary Checklist for Contributions
Before submitting a PR, verify:
Content Quality
- Content is clear, accurate, and complete
- Proper frontmatter is included
- Images have descriptive alt text
- Links are valid and accessible
- Capitalization is correct (Meshery, Kanvas, Layer5)
- American English spelling and grammar
Technical Quality
- Build completes successfully (
make build) - Site renders correctly locally (
make site) - Changes are minimal and surgical
- No placeholder content or sensitive data
- Responsive design is maintained
Accessibility
- All images have alt text
- Proper heading hierarchy
- Keyboard navigation works
- Color contrast meets WCAG standards
Git
- Commit messages follow Conventional Commits
- Commits are signed off (
git commit -s) - PR references related issues
Example Documentation Page
---
title: "Getting Started with Layer5 Cloud"
description: "Learn how to set up your Layer5 Cloud account and start managing your cloud native infrastructure with ease."
weight: 1
---
# Getting Started with Layer5 Cloud
This guide walks you through setting up your Layer5 Cloud account and exploring key features.
## Prerequisites
Before you begin, ensure you have:
- A GitHub or Google account for authentication
- Basic familiarity with cloud native concepts
## Creating Your Account
1. Visit [Layer5 Cloud](https://cloud.layer5.io)
2. Click **Sign Up** and choose your authentication method
3. Complete your profile setup
{{< alert type="info" title="Tip" >}}
You can link multiple authentication providers to a single account.
{{< /alert >}}
## Next Steps
- [Explore Workspaces](/cloud/spaces/workspaces/)
- [Learn about Organizations](/cloud/identity/organizations/)
- [Set up API Tokens](/cloud/security/tokens/)This document serves as the primary reference for GitHub Copilot when assisting with contributions to the Layer5 Documentation site. Always prioritize minimal changes, maintain existing patterns, and ensure quality through building and testing.
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- proposals/claude.mdCLAUDE.md
- chrome-devtools-axiSkill
- gh-axiSkill
- lavishSkill
- quota-axiSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

