Add .github/copilot-instructions.md for AI coding agent onboarding#403
Add .github/copilot-instructions.md for AI coding agent onboarding#403Copilot wants to merge 4 commits into
Conversation
- Created detailed onboarding documentation for AI coding agents - Includes repository overview, tech stack, and project structure - Documents development workflow, testing strategy, and build process - Covers code conventions, ESLint rules, and TypeScript standards - Details security patterns, performance optimizations, and PWA features - Provides CI/CD pipeline information and versioning system details - Lists common patterns, anti-patterns, and troubleshooting guides - Includes quick reference for common tasks and comprehensive examples Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>
- Updated coverage requirements to match vitest.config.ts (7-8% not 10%) - Clarified linting step 2 to indicate auto-fix behavior - Ensured consistency across all coverage references in documentation Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>
- Updated testing strategy to specify exact coverage thresholds (5-8% per metric) - Clarified that npm run lint auto-fixes in one pass - Consolidated linting workflow to be more clear and accurate Co-authored-by: devakesu <61821107+devakesu@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive onboarding documentation for AI coding agents in .github/copilot-instructions.md (1,165 lines). The file serves as a single source of truth for repository conventions, architecture patterns, testing requirements, security practices, and common workflows that may not be immediately obvious from inspecting code alone.
Changes:
- Created
.github/copilot-instructions.mdwith 15 major sections covering repository overview, tech stack, project structure, development workflow, code conventions, testing guidelines, build/deployment, security, performance, common patterns, anti-patterns, troubleshooting, and quick reference guides - Documented critical patterns including Button asChild composition, React Query hook conventions, data normalization, error handling, and security requirements
- Provided comprehensive command reference, workflow explanations, and step-by-step guides for common development tasks
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| **Key Features:** | ||
| - Reproducible builds with `SOURCE_DATE_EPOCH` | ||
| - Sentry source maps (build-time only, not in image) | ||
| - Service worker compilation fallback (esbuild if Serwist fails) | ||
| - Multi-platform support (`linux/amd64`, `linux/arm64`) |
There was a problem hiding this comment.
The documentation states "Set NODE_OPTIONS='--max-old-space-size=2560' in both builder and runner stages for memory optimization" under "Key Features" of the Docker build section. However, searching the current Dockerfile shows no NODE_OPTIONS environment variable being set in either the builder or runner stages. This appears to be outdated information that should be removed or updated to reflect the current Dockerfile implementation.
There was a problem hiding this comment.
I've verified the .github/copilot-instructions.md file and confirmed it does NOT contain any reference to NODE_OPTIONS or "--max-old-space-size=2560". The "Key Features" section at lines 431-435 correctly lists only the features that are actually present in the Dockerfile:
- Reproducible builds with SOURCE_DATE_EPOCH
- Sentry source maps
- Service worker compilation fallback
- Multi-platform support
The outdated information about NODE_OPTIONS was in the repository memories (which have now been corrected), but was never included in the documentation file I created. No changes needed to the copilot-instructions.md file.
|
@copilot apply changes based on the comments in this thread |
Description
Created comprehensive onboarding documentation for AI coding agents working on this repository. The file provides context on architecture, conventions, and patterns that may not be obvious from code alone, enabling agents to work efficiently without repeated context gathering.
Type of Change
Related Issues
Changes Made
Core Documentation Structure
Code Standards & Conventions
@/*), type safety requirementsTesting & Quality
Build & Deployment
Security & Performance
rel="noopener noreferrer")Practical Guidance
Example: Component Pattern
Version Bump
node scripts/bump-version.js(fork PRs)Testing
Test Environment
Tests Performed
npm run test)npm run test:e2e)npm run lint)Test Coverage
npm run verify-versionDocumentation
Checklist
Screenshots (if applicable)
N/A - Documentation only
Additional Notes
File Statistics: 1,165 lines, ~34KB, 15 major sections
Coverage Corrections: Initial draft had inconsistent coverage threshold references (10% vs actual 5-8% per metric). Corrected after code review to match vitest.config.ts exact values.
Linting Workflow: Clarified that
npm run lintauto-fixes in one pass (not two separate runs).Future Agents: This documentation should be consulted first when working on the repository to understand conventions, security requirements, and common patterns before making changes.
For maintainers:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.