github / github/copilot-cli

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

Offen
#4,204 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

area:agents area:configuration
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginnen Sie damit, die bestehende Erkennung von .agents/skills sowie die aktuellen Loader für Instructions, Agents und Hooks einschließlich der Behandlung von COPILOT_HOME und der Ausgabe von /help nachzuverfolgen. Überprüfen Sie anschließend die Erkennung für einfache Ordner und benutzerbezogene Pfade, und dokumentieren Sie dann die genau unterstützten Speicherorte sowie das deterministische Verhalten ohne partielles Laden innerhalb einer Pfadfamilie.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
github, shell
Bereich
cli, developer-experience
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
52/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.