.github/copilot-instructions.md
# GitHub Copilot Instructions Use this file to guide GitHub Copilot in this repository. ## Project Context - Project type: Next.js - Tech stack: Next.js, TypeScript, React, CSS modules - Coding style: Prefer small components, explicit types, accessible UI, and existing project patterns. - AI tool target: Copilot Instructions 生成器 ## Project Commands - Package manager: npm - Test: `npm test` - Build: `npm run build` - Lint: `npm run lint` ## Working Agreement - Read nearby files and reuse established project patterns. - Make small, reviewable changes. - Do not introduce new dependencies unless they clearly reduce complexity. - Keep user-facing text concise and accessible. - Preserve unrelated user changes in the working tree. ## Validation 1. Run `npm run lint` for style and static checks. 2. Run `npm test` for behavior. 3. Run `npm run build` before release or handoff. ## Extra Instructions Before handoff, summarize changed files and mention any checks that could not be run.
使用 Copilot Instructions 生成器创建 .github/copilot-instructions.md,为 GitHub Copilot 提供仓库级指导,帮助它遵循你的架构、命令和审查期待。
Copilot Instructions 写什么
包含稳定约定,例如项目布局、代码风格、测试命令、可访问性期待,以及 Copilot 应复用现有 helper 而不是新造抽象的区域。
团队推广
当指导由团队共享时提交该文件。架构变化时同步审查,避免 Copilot 继续遵循过期假设。
常见问题
文件放在哪里?
常见位置是仓库中的 .github/copilot-instructions.md。
它应该复制 README 吗?
不应该。它应聚焦 AI 编码行为、命令和项目约束。