Skip to content

Instantly share code, notes, and snippets.

@malarkey
Created April 8, 2026 11:58
Show Gist options
  • Select an option

  • Save malarkey/3834149866c0dcd436ed14c84f411b2b to your computer and use it in GitHub Desktop.

Select an option

Save malarkey/3834149866c0dcd436ed14c84f411b2b to your computer and use it in GitHub Desktop.
AGENTS.md project brief
# AGENTS.md## Overview
- This is an Eleventy project.
- Follow existing patterns in templates, styles, and naming.
- Make the smallest change that solves the problem cleanly.
- Don’t write new code unless absolutely necessary.
## Structure
- `src/` contains all source files.
- `src/_includes/` contains layouts and partials.
- `src/css/` contains global and component styles.
- `src/js/` contains small progressive-enhancement scripts.
## Working approach
- Don’t refactor unrelated code.
- Reuse existing patterns before creating new ones.
## HTML
- Don’t add unnecessary wrapper elements.
- Reuse existing partials where possible.
- Use semantic HTML elements.
## CSS
- Extend existing styles before creating new ones.
- Follow the global AGENTS.md for formatting and style rules.
- Keep selectors shallow and readable.
- Place media queries at the end of stylesheets.
- Use `.alt-*` for variations and `.item-*` for content types when needed.
## JavaScript
- Always use progressive enhancement.
- Don’t use JavaScript if HTML and CSS can solve the problem.
- Keep scripts small and vanilla.
- Scope behaviour to the relevant component or page.
## Eleventy
- Don’t duplicate already defined logic.
- Reuse existing collections, data files, and filters.
- Check if the content fits an existing collection before creating a new one.
## Verification
- Run the local build before finishing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment