github / github/copilot-cli

Support `@include` / `extends` in instruction files to reference external URLs or repos

Đang mở
#2,537 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:configuration
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

### Describe the feature or problem you'd like to solve

Instruction files are currently static and self-contained. There is no way to share common conventions across repos or teams without duplicating files — either manually copying them into every repo or requiring each contributor to set up `~/.copilot/instructions/` locally.

### Proposed solution

Introduce an `extends` or `@include` directive in instruction files (similar to Renovate's extends or ESLint's extends) that allows referencing external instruction files by URL or GitHub path:

```yaml
---
extends:
- "github:mu88/dotfiles/.copilot/instructions/dotnet.instructions.md"
- "https://raw.githubusercontent.com/org/shared/.github/instructions/security.instructions.md"
applyTo: "**/*.cs"
---
```

### Example prompts or workflows

1. A maintainer publishes shared .NET conventions in a dotfiles repo — every project references them with one line, zero duplication.
2. A new contributor clones a repo and immediately gets all team conventions — no local setup required.
3. An org updates shared security guidelines in one place; all repos pick up the change automatically.

### Additional context

`COPILOT_CUSTOM_INSTRUCTIONS_DIRS` already allows pointing to external directories, but requires manual per-machine setup. A declarative `extends` in the instruction file itself would be zero-config for contributors and composable by design.

Note: Organization-level instructions already exist for GitHub organizations. This request addresses the gap for personal account repositories and zero-config contributor onboarding.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách xem xét việc xử lý các tệp chỉ dẫn hiện có và hành vi của COPILOT_CUSTOM_INSTRUCTIONS_DIRS được đề cập trong issue. Xác định cách các đường dẫn GitHub và URL được liệt kê được phân giải, đồng thời xác minh rằng các chỉ dẫn được tham chiếu được áp dụng cùng với các tệp cục bộ, bao gồm các ví dụ YAML front matter được hiển thị ở đây.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
github, markdown, yaml
Lĩnh vực
developer-experience, tooling
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.