Skip to content

Bootstrap scoped agent knowledge for the SDK - #55865

Merged
mthalman merged 2 commits into
mainfrom
mthalman-bootstrap-sdk-knowledge
Aug 28, 2026
Merged

mthalman merged 2 commits into
mainfrom
mthalman-bootstrap-sdk-knowledge

Conversation

@mthalman

@mthalman mthalman commented Aug 19, 2026 •

Copy link
Copy Markdown
Member

Problem

Agent guidance in dotnet/sdk is 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-docs skill 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-tests contract introduced there.

Co-authored-by: Copilot App <[email protected]>

Copilot-Session: 8c3ce608-a6d0-4f7b-b9c6-ab133d7996de
Copilot AI lite review requested due to automatic review settings August 19, 2026 18:55
@mthalman
mthalman requested a review from lbussell as a code owner August 19, 2026 18:55
@azure-pipelines

Copy link
Copy Markdown
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 an INDEX.md loading map plus focused docs for architecture, API surfaces, conventions, file map, testing strategy, and known issues.
  • Adds an update-docs skill that defines a maintenance workflow/checklist for memory + other contributor/agent artifacts.
  • Updates .github/copilot-instructions.md and the code-review skill to point at the new memory system (including new references to run-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.

Comment thread .github/copilot-instructions.md Resolved
Comment thread .github/memory/TESTING_STRATEGY.md Resolved
Comment thread .github/memory/KNOWN_ISSUES.md Resolved
@mthalman

Copy link
Copy Markdown
Member Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved the merge conflicts by merging origin/main and preserving both the scoped memory guidance and the updated build/test guidance in .github/copilot-instructions.md. Addressed in commit e6ca55d.

@@ -1,2 +1,2 @@
# Agent Instructions

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider moving to AGENTS.md, potentially in a follow-up PR.

Comment on lines +68 to +79
## 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).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a hook that blocks editing these. Out of scope of this PR though.

@mthalman
mthalman merged commit 6b759ed into main Aug 28, 2026
17 checks passed
@mthalman
mthalman deleted the mthalman-bootstrap-sdk-knowledge branch August 28, 2026 18:04
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Aug 29, 2026

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — e6ca55df Deployed Aug 28, 2026 by mthalman via pre_activation #1625
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants