-
Notifications
You must be signed in to change notification settings - Fork 0
chore(root): add basic AGENTS.md #1071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new AGENTS.md file to provide guidelines for AI coding agents working on the repository. The file serves as a quick reference for the project's tech stack, build commands, and coding conventions.
Changes:
- Added comprehensive documentation for agentic coding tools covering tech stack, build/test commands, and code style guidelines
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Can we maybe do this as well? anthropics/claude-code#6235 (comment) (create a CLAUDE.md that references the AGENTS.md) I think without this, CLAUDE won't use it. |
| @@ -0,0 +1,105 @@ | |||
| # AGENTS.md | |||
|
|
|||
| This file contains guidelines for agentic coding agents working on this repository. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This file contains guidelines for agentic coding agents working on this repository. | |
| This file contains guidelines for agentic coding agents working on this repository. | |
| ## Project Overview | |
| GenSpectrum Dashboards Components is a collection of web components for building interactive dashboards that visualize data from [LAPIS](https://github.com/GenSpectrum/LAPIS) instances. The main package is published to npm as `@genspectrum/dashboard-components`. | |
| All component code lives in the `/components/` directory. The root package.json is minimal and only used for tooling (commitlint, release-please). |
|
I also generated the CLAUDE.mdThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. Project OverviewGenSpectrum Dashboards Components is a collection of web components for building interactive dashboards that visualize data from LAPIS instances. The main package is published to npm as All component code lives in the Common CommandsAll commands should be run in the Installationnpm ciMac users: The package-lock.json installs Linux dependencies for the Storybook test runner. On Mac, you need to: npm uninstall @storybook/test-runner
npm install @storybook/test-runner --forceDevelopment# Generate custom elements manifest (required before starting Storybook)
npm run generate-manifest
# Start Lit Storybook (public documentation, port 6006)
npm run storybook
# Start Preact Storybook (development & testing, port 6007)
npm run storybook-preact
# Watch mode for manifest generation
npm run generate-manifest:watchBuilding# Full build (both library and standalone bundle)
npm run build
# Build and create .tgz package
npm run build-and-packTesting# Unit tests
npm run test
# Storybook interaction tests (requires Storybook to be running)
npm run test:storybook # Lit Storybook
npm run test:storybook:preact # Preact Storybook
# Playwright tests (visual regression, CSV snapshots)
npm run test:playwright
npm run test:playwright:update-snapshots # Update snapshotsLinting & Formattingnpm run lint # Run all linters
npm run lint:eslint # ESLint only
npm run lint:lit-analyzer # Lit analyzer only
npm run format # Format code
npm run check-format # Check formatting
npm run check-types # TypeScript type checking
npm run check-dependencies # Check for unused dependenciesRelease# Test changelog generation (requires GitHub PAT)
npm run release-please-dry-run -- --token=<GitHub PAT> --target-branch=<branch-name>ArchitectureThree-Layer Component ArchitectureThe codebase uses a unique three-layer architecture that combines Preact and Lit:
Why this pattern? Preact provides excellent DX with hooks, while Lit provides standards-compliant web components that work anywhere. Directory StructureOperator Pattern (Data Transformation Pipeline)The interface Operator<T> {
evaluate(lapis: string, signal?: AbortSignal): Promise<Dataset<T>>;
}Key operators:
Usage: Query functions in Data FlowEvent SystemInput components fire custom events (e.g., Context InjectionThe Build SystemTwo Build Outputsvite.release.config.ts - Library build:
vite.release-standalone.config.ts - Standalone build:
Package Exports"exports": {
"./components": "./dist/components.js", // Web components (browser only)
"./util": "./dist/util.js" // Utilities (Node.js compatible)
}Testing Strategy
Important: All tests use mocked data. Stories must not issue actual HTTP calls to LAPIS to ensure stable tests in CI. Styling Conventions
Commit ConventionsThis repo uses Conventional Commits for automated releases via Release Please. PR titles must follow this format (we squash-merge, so only the PR title matters):
Valid scopes: Important: If a Development Workflow
Adding New ComponentsWhen adding code for package users:
Naming Conventions
Vite Configuration NoteFor consumers using Vite: There's an issue with the optimizeDeps: {
include: ['leaflet']
} |
Summary
I've been playing around a bit with https://opencode.ai/. The init command gave me this (and some manual fixes). I don't really know how well works, but it's a starting point.
Screenshot
PR Checklist
- [ ] All necessary documentation has been adapted.- [ ] The implemented feature is covered by an appropriate test.