From d99c04f9dd5561c12cc68c3083bf79d908e1e276 Mon Sep 17 00:00:00 2001 From: robgruen Date: Mon, 23 Nov 2026 11:53:30 -0800 Subject: [PATCH 1/2] Enable Knowledge Base Adds docs manifest, routing index, and sync workflow. --- .github/copilot-instructions.md | 19 ++++++++++++ .github/knowledge-base.json | 10 +++++++ .../knowledge-base-issue-artifact.yml | 15 ++++++++++ .github/workflows/knowledge-base.yml | 29 +++++++++++++++++++ AGENTS.md | 17 +++++++++++ docs/index.md | 8 +++++ 6 files changed, 98 insertions(+) create mode 100644 .github/knowledge-base.json create mode 100644 .github/workflows/knowledge-base-issue-artifact.yml create mode 100644 .github/workflows/knowledge-base.yml create mode 100644 AGENTS.md create mode 100644 docs/index.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 34eb577095..095aabc95d 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -3,3 +3,22 @@ Please load the following file as your global context: [CLAUDE.md](../ts/CLAUDE.md) + + + +## Knowledge Base + +### Purpose + +This repository uses the Knowledge Base at [https://github.com/microsoft/TypeAgent](https://github.com/microsoft/TypeAgent) on branch `main`. + +### Required behavior + +1. Before changing code, read `docs/index.md` from that branch. +2. Use the index to open only the knowledge files relevant to the task. +3. If the index is unavailable, stop and report that the Knowledge Base could not be loaded. + +### Source of truth + +Generated knowledge tracks the code. When the knowledge and code disagree, trust the code. + diff --git a/.github/knowledge-base.json b/.github/knowledge-base.json new file mode 100644 index 0000000000..73b23a2648 --- /dev/null +++ b/.github/knowledge-base.json @@ -0,0 +1,10 @@ +{ + "schema": "2.0", + "docs_system": "TypeAgent", + "working_repos": [ + { + "repo": "self" + } + ] +} + diff --git a/.github/workflows/knowledge-base-issue-artifact.yml b/.github/workflows/knowledge-base-issue-artifact.yml new file mode 100644 index 0000000000..0d641387b4 --- /dev/null +++ b/.github/workflows/knowledge-base-issue-artifact.yml @@ -0,0 +1,15 @@ +name: Attach Knowledge Base artifact + +on: + issues: + types: [opened] + +permissions: + contents: read + issues: write + +jobs: + attach: + uses: github/agentic-knowledge-base/.github/workflows/attach-issue-artifact-on-open.yml@main + # Guided setup maps KB_ISSUE_ARTIFACT_WRITE_PAT here. + secrets: {} diff --git a/.github/workflows/knowledge-base.yml b/.github/workflows/knowledge-base.yml new file mode 100644 index 0000000000..17d8a3a7df --- /dev/null +++ b/.github/workflows/knowledge-base.yml @@ -0,0 +1,29 @@ +# Keeps the Knowledge Base in sync with the codebase. +# +# Runs daily, when an issue closes, or when started manually. The reusable workflow reads +# .github/knowledge-base.json, updates the knowledge docs, and opens a pull +# request if anything changed. +# +# To change the schedule, edit the cron expression below. + +name: Update Knowledge Base + +on: + schedule: + - cron: "0 8 * * *" + issues: + types: [closed] + workflow_dispatch: {} + +permissions: + actions: read + contents: write + issues: write + pull-requests: write + copilot-requests: write + +jobs: + update-knowledge-base: + uses: github/agentic-knowledge-base/.github/workflows/knowledge-base-engine.lock.yml@main + # Guided setup adds GH_TOKEN or GH_AW_GITHUB_TOKEN here when this repository needs them. + secrets: {} diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000000..3e060b57c2 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,17 @@ + +## Knowledge Base + +### Purpose + +This repository uses the Knowledge Base at [https://github.com/microsoft/TypeAgent](https://github.com/microsoft/TypeAgent) on branch `main`. + +### Required behavior + +1. Before changing code, read `docs/index.md` from that branch. +2. Use the index to open only the knowledge files relevant to the task. +3. If the index is unavailable, stop and report that the Knowledge Base could not be loaded. + +### Source of truth + +Generated knowledge tracks the code. When the knowledge and code disagree, trust the code. + diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000000..d2cafca804 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,8 @@ +# microsoft/TypeAgent + +> Routing index for the knowledge base. Copilot reads this file to decide +> which docs to open for a given task. Keep entries short — one line per doc. + +| When working on | Topics | Read | +|---|---|---| +| Any task in this repo | general | (no docs yet — the sync workflow will populate this table after merge) | From b01eef9bb0a1f81282c10b6fa8b39fe39fde64cc Mon Sep 17 00:00:00 2001 From: Robert Gruen Date: Mon, 23 Nov 2026 16:04:53 -0800 Subject: [PATCH 2/2] Fix Knowledge Base workflow copyright headers Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/knowledge-base-issue-artifact.yml | 3 +++ .github/workflows/knowledge-base.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/knowledge-base-issue-artifact.yml b/.github/workflows/knowledge-base-issue-artifact.yml index 0d641387b4..cfcb023ec3 100644 --- a/.github/workflows/knowledge-base-issue-artifact.yml +++ b/.github/workflows/knowledge-base-issue-artifact.yml @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + name: Attach Knowledge Base artifact on: diff --git a/.github/workflows/knowledge-base.yml b/.github/workflows/knowledge-base.yml index 17d8a3a7df..040ca557c8 100644 --- a/.github/workflows/knowledge-base.yml +++ b/.github/workflows/knowledge-base.yml @@ -1,3 +1,6 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + # Keeps the Knowledge Base in sync with the codebase. # # Runs daily, when an issue closes, or when started manually. The reusable workflow reads