github / github/copilot-cli

Add `.agents` discovery for instructions, agents, and hooks in any opened folder

Aperta
#4,204 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

area:agents area:configuration
Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Descrizione

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.md or 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.md or 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
  • /help and docs reflect the exact supported .agents locations
Example prompts or workflows
  1. "Load the repo's coding rules from .agents/instructions automatically."
  2. "Use the release-notes agent from .agents/agents."
  3. "Run the startup hook from .agents/hooks when I open a plain folder like D:\work\MyProjectOutsideGit."
  4. "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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia tracciando la discovery esistente di .agents/skills e gli attuali loader di istruzioni, agenti e hook, inclusa la gestione di COPILOT_HOME e dell’output di /help. Verifica quindi la discovery per le cartelle semplici e i percorsi a livello utente, poi documenta le posizioni esatte supportate e il comportamento deterministico senza caricamento parziale all’interno di una famiglia di percorsi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
github, shell
Ambito
cli, developer-experience
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
52/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.