# Agent Instructions This file provides context for AI coding agents (Claude Code, GitHub Copilot, Cursor, Windsurf, etc.) working on this project. ## Project overview This is a **research article template** built with Astro + MDX. It produces interactive, web-native scientific papers with D3.js data visualizations, dark mode support, and PDF export. ### Key paths | What | Where | |------|-------| | Astro app | `app/` | | MDX content | `app/src/content/` (article.mdx, chapters/) | | Components | `app/src/components/` | | HTML embeds (D3 charts) | `app/src/content/embeds/` | | Data files (CSV/JSON) | `app/src/content/assets/data/` | | Styles & CSS variables | `app/src/styles/` | | Scripts (export, import) | `app/scripts/` | ### Tech stack - **Astro 4** with MDX - **D3.js v7** for data visualization (loaded via CDN in embeds) - **Svelte** for interactive components (e.g., Trackio) - **CSS custom properties** for theming (light/dark mode) ## Agent skills Detailed guides for common tasks live in `.ai/skills/`. Read the relevant skill file before starting work: | Skill | File | When to use | |-------|------|-------------| | Create HTML embed | [`.ai/skills/create-html-embed/SKILL.md`](.ai/skills/create-html-embed/SKILL.md) | Creating D3 charts, visualizations, interactive embeds | | Article frontmatter | [`.ai/skills/article-frontmatter/SKILL.md`](.ai/skills/article-frontmatter/SKILL.md) | Configuring title, authors, template variant, DOI, PDF | | Deploy to HF Spaces | [`.ai/skills/deploy-to-hf-spaces/SKILL.md`](.ai/skills/deploy-to-hf-spaces/SKILL.md) | Deploying, pushing, or updating a Hugging Face Space | > **Cursor users**: these skills are auto-detected via a symlink at `.cursor/skills/`. ## Creating HTML embed charts When asked to create a chart, visualization, or D3 embed, read the skill files: 1. **Workflow & quick reference**: `.ai/skills/create-html-embed/SKILL.md` 2. **Full conventions & directives**: `.ai/skills/create-html-embed/directives.md` ### TL;DR - Embeds are self-contained `.html` files in `app/src/content/embeds/` - Structure: single root `