Add `.agents` discovery for instructions, agents, and hooks in any opened folder
Chưa có ai nhận issue này.
- 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
Copilot CLI already uses .agents/skills; please extend the same .agents convention to instructions, agents, and hooks in any opened folder, not just Git repos.
Proposed solution
This would let users standardize Copilot customizations under one root, .agents/, for any opened workspace/folder, whether or not it is a Git repository, instead of splitting them across .github/, .claude/, and ~/.copilot/.
This request is specifically about the .agents/ directory tree, not the root AGENTS.md file.
Requested default discovery additions:
<workspace>/.agents/instructions/**/*.instructions.md<workspace>/.agents/agents/*.agent.mdor the equivalent agent-file convention already used by the product<workspace>/.agents/hooks/**/*.json(or the equivalent hook-file convention already used by the product)~/.agents/instructions/**/*.instructions.md~/.agents/agents/*.agent.mdor the equivalent agent-file convention already used by the product~/.agents/hooks/**/*.json(or the equivalent hook-file convention already used by the product)
Note: COPILOT_CUSTOM_INSTRUCTIONS_DIRS already allows additional instruction directories today; this request is to make .agents/instructions a zero-config default. If user-level custom agents or hooks are not already supported, those would be new capability, but the request is still to make .agents the canonical root.
Behavioral expectations:
- Works for any opened folder/workspace, including folders that are not Git repositories
- Works consistently with
COPILOT_HOME - Discovery is documented and deterministic
- No silent partial loading for a path family
/helpand docs reflect the exact supported.agentslocations
Example prompts or workflows
- "Load the repo's coding rules from
.agents/instructionsautomatically." - "Use the release-notes agent from
.agents/agents." - "Run the startup hook from
.agents/hookswhen I open a plain folder like D:\work\MyProjectOutsideGit." - "Keep my user-level instruction files under
~/.agents/instead of splitting them across.copilot/and.github/."
Additional context
Related but distinct: github/copilot-cli#2504 (cwd vs. git-root discovery within Git repos) and github/copilot-cli#1506 (configurable agents folder support). This request is about zero-config .agents defaults for any opened folder, Git or not.
This is additive parity, not a migration away from .copilot or .github.
If it is easier to triage, this could be split into separate issues for instructions / agents / hooks.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách lần theo cơ chế discovery hiện có của .agents/skills và các loader hiện tại cho instruction, agent và hook, bao gồm việc xử lý COPILOT_HOME và đầu ra của /help. Sau đó, xác minh discovery đối với các thư mục thông thường và các đường dẫn cấp người dùng, rồi ghi lại chính xác các vị trí được hỗ trợ và hành vi xác định mà không tải một phần trong một họ đường dẫn.
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, shell
- Lĩnh vực
- cli, developer-experience
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 52/100