Repository navigation
Bootstrap scoped agent knowledge for the SDK - #55865
Conversation
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 8c3ce608-a6d0-4f7b-b9c6-ab133d7996de
|
Azure Pipelines: Successfully started running 1 pipeline(s). 2 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
Adds a new scoped knowledge base under .github/memory/ (with an index + focused canonical docs) and refactors the root Copilot instructions and review guidance to reference it, alongside introducing an update-docs skill to keep AI/contributor artifacts in sync after code changes.
Changes:
- Introduces
.github/memory/with anINDEX.mdloading map plus focused docs for architecture, API surfaces, conventions, file map, testing strategy, and known issues. - Adds an
update-docsskill that defines a maintenance workflow/checklist for memory + other contributor/agent artifacts. - Updates
.github/copilot-instructions.mdand thecode-reviewskill to point at the new memory system (including new references torun-tests).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/skills/update-docs/SKILL.md | Adds a documentation/memory maintenance checklist skill. |
| .github/skills/code-review/SKILL.md | Expands “stale AI context” review guidance to include .github/memory/*.md and .claude skills. |
| .github/memory/ARCHITECTURE.md | Adds a canonical architecture/ownership/flow map. |
| .github/memory/API_MAP.md | Adds a canonical map of user-facing and extension surfaces and where they’re defined. |
| .github/memory/CONVENTIONS.md | Adds a canonical conventions/dependency/framework constraints summary with pointers to owners. |
| .github/memory/FILE_MAP.md | Adds a navigation/ownership-oriented directory map for the repo. |
| .github/memory/INDEX.md | Adds the “read first” loading map for the memory knowledge base. |
| .github/memory/KNOWN_ISSUES.md | Adds durable gotchas/workarounds for common repo pitfalls. |
| .github/memory/TESTING_STRATEGY.md | Adds test strategy + canonical sources map for testing guidance ownership. |
| .github/copilot-instructions.md | Refactors root instructions to defer details to memory docs and reference run-tests/incremental-test. |
|
@copilot resolve the merge conflicts in this pull request |
Co-authored-by: mthalman <[email protected]>
Resolved the merge conflicts by merging |
| @@ -1,2 +1,2 @@ | |||
| # Agent Instructions | |||
|
|
|||
There was a problem hiding this comment.
Consider moving to AGENTS.md, potentially in a follow-up PR.
| ## Generated Files Are Easy to Edit Accidentally | ||
|
|
||
| **Affected area:** `.xlf`, `.github/workflows/*.lock.yml`, generated man pages, Verify snapshots | ||
|
|
||
| **Description:** Manual edits drift from their source or are overwritten. Verify also | ||
| creates `*.received.*` files on mismatch that must not be committed. | ||
|
|
||
| **Workaround:** Edit `.resx` and regenerate XLF; change manpage content in `dotnet/docs`; | ||
| regenerate workflow locks through their owning workflow; inspect received snapshots and | ||
| promote only intentional output to `*.verified.*`. See the | ||
| [root generated-file guardrails](../copilot-instructions.md#do-not-hand-edit-generated-files) | ||
| and [`snapshot-based-testing.md`](../../documentation/project-docs/snapshot-based-testing.md). |
There was a problem hiding this comment.
We should add a hook that blocks editing these. Out of scope of this PR though.
Problem
Agent guidance in
dotnet/sdkis spread across root instructions, area-specific files, skills, and contributor documentation. Repository-wide context is repeatedly embedded in always-loaded instructions, making it expensive to load, difficult to navigate, and prone to becoming inconsistent as the repository evolves.There is also no defined ownership or maintenance workflow for durable agent knowledge.
Related to #55185
Fix
Introduce a scoped knowledge base under
.github/memory/with an index that tells agents what context exists and when to load it.Repository-wide architecture, file locations, public surfaces, conventions, testing strategy, and durable gotchas now have focused canonical documents. Root Copilot instructions retain only always-needed orientation and guardrails, linking to detailed context on demand.
An
update-docsskill defines documentation ownership and ensures relevant memory, instructions, skills, agent definitions, and contributor documentation are reviewed after code changes. Code-review guidance now checks these artifacts for drift.Dependency
This change assumes #55787 merges first and uses the
run-testscontract introduced there.