Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions agents/copilot-studio-architect.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Knowledge components live in `capabilities\knowledge\` (source-backed sources) a
The **authoritative knowledge-source schema** — every source kind (public website, SharePoint,
OneDrive, uploaded file), the exact YAML shapes and fields, `targetKind` rules, filename conventions,
and SharePoint/OneDrive URL normalization — lives in a single shared reference,
`reference/knowledge-schema.md`. Read it and follow it exactly; the `/add-knowledge` command uses the
`reference/knowledge-schema.md`. Read it and follow it exactly; the `add-knowledge` skill uses the
same file, so the two never drift. Resolve its path via the plugin root: read
`path.join(os.homedir(), '.copilot-studio-cli', 'plugin-paths.json')` to get `pluginRoot` for the
current `mcs-assistant` plugin, then read `path.join(pluginRoot, 'reference', 'knowledge-schema.md')`.
Expand Down Expand Up @@ -201,7 +201,7 @@ procedures.
The **authoritative skill schema** — the inline and upload variants, the exact YAML shapes and
fields, the `behaviors/` file layout, anchor/sidecar rules, folder naming, and schema-name
conventions — lives in a single shared reference, `reference/skill-schema.md`. Read it and follow it
exactly; the `/add-skill` command and its importer use the same file, so the three never drift.
exactly; the `add-skill` skill and its importer use the same file, so the three never drift.
Resolve its path via the plugin root: read
`path.join(os.homedir(), '.copilot-studio-cli', 'plugin-paths.json')` to get `pluginRoot` for the
current `mcs-assistant` plugin, then read `path.join(pluginRoot, 'reference', 'skill-schema.md')`.
Expand Down
6 changes: 3 additions & 3 deletions reference/knowledge-schema.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Knowledge Source Schema (authoritative)

**Single source of truth** for how knowledge sources are represented in a modern Copilot Studio
**agentic-loop** agent (`capabilities/knowledge`). Both the `/add-knowledge` command and the
**agentic-loop** agent (`capabilities/knowledge`). Both the `add-knowledge` skill and the
`copilot-studio-architect` agent consult this file — edit the schema **here only** so the two never
drift.

Expand Down Expand Up @@ -205,8 +205,8 @@ Require an absolute HTTPS URL with no embedded username or password before apply
## Optional: verifying a SharePoint/OneDrive link before adding

You can pre-check that a SharePoint/OneDrive link is valid and readable **without downloading the
file**, using a single Microsoft Graph call (`GET /shares/{id}/driveItem`). The `/add-knowledge`
command exposes this as an **opt-in** step backed by `scripts/verify-knowledge-access.bundle.js`.
file**, using a single Microsoft Graph call (`GET /shares/{id}/driveItem`). The `add-knowledge`
skill exposes this as an **opt-in** step backed by `scripts/verify-knowledge-access.bundle.js`.

- **What it proves:** the author can read the item (`200`), or Graph denied it (`403` — either no
access *or* the link doesn't resolve; the `/shares` endpoint returns `403` for both, and rarely a
Expand Down
6 changes: 3 additions & 3 deletions reference/skill-schema.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Agent Skill Schema (authoritative)

**Single source of truth** for how agent skills are represented in a modern Copilot Studio
**CLI agentic-loop** agent (`behaviors/`). The `/add-skill` command, the `scripts/add-skill.js`
**CLI agentic-loop** agent (`behaviors/`). The `add-skill` skill, the `scripts/add-skill.js`
importer, and the `copilot-studio-architect` agent all consult this file — edit the schema **here
only** so the three never drift.

Expand Down Expand Up @@ -30,12 +30,12 @@ A skill is always `kind: InlineAgentSkill`, but it is materialized in one of two
| Variant | Where the skill text lives | Marker | Emitted by |
|---|---|---|---|
| **Inline** | Embedded in the component's `content:` block | no `authoringSource` | `copilot-studio-architect` when authoring a new skill from an idea |
| **Upload** | A real `SKILL.md` file on disk, plus optional payload files | `authoringSource: Upload` | `/add-skill` import (`scripts/add-skill.js`), and a portal upload |
| **Upload** | A real `SKILL.md` file on disk, plus optional payload files | `authoringSource: Upload` | `add-skill` skill import (`scripts/add-skill.js`), and a portal upload |

> **Open question — variant selection.** The platform accepts both, but there is currently no
> documented rule for *when* an author should prefer one over the other, and no verified statement
> that they are functionally equivalent at runtime. Until that is confirmed, keep using the variant
> each producer already emits (architect → inline; `/add-skill` → upload) and do not convert between
> each producer already emits (architect → inline; `add-skill` → upload) and do not convert between
> them. Resolve this before relying on cross-variant behavior.

## File layout
Expand Down
5 changes: 3 additions & 2 deletions commands/add-knowledge.md → skills/add-knowledge/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Add a knowledge source (public website, SharePoint, OneDrive, or a locally uploaded file) to a locally-cloned Copilot Studio agentic-loop agent by writing the modern capabilities/knowledge YAML.
name: add-knowledge
description: Add a knowledge source (public website, SharePoint, OneDrive, or a locally uploaded file) to a locally-cloned Copilot Studio agentic-loop agent by writing the modern capabilities/knowledge YAML. Use when the user asks to add, attach, or ground a knowledge source (a public website, SharePoint or OneDrive link, or an uploaded file) on a locally-cloned Copilot Studio agent.
argument-hint: A URL (website / SharePoint / OneDrive) or a local file path, plus an optional name/description
allowed-tools: Read, Write, Glob, Grep, Bash(mkdir *), Bash(cp *), Bash(powershell *Copy-Item*), Bash(node *verify-knowledge-access.bundle.js*)
---
Expand Down Expand Up @@ -37,7 +38,7 @@ installed plugin directory.

1. Auto-discover the cloned agent with `Glob: **/settings.mcs.yml`. A cloned agentic-loop workspace
contains `settings.mcs.yml` at its root. **Never hardcode an agent name.**
2. If none is found, tell the user this command needs a **locally-cloned agentic-loop agent** (clone
2. If none is found, tell the user this skill needs a **locally-cloned agentic-loop agent** (clone
one with `pac copilot clone`, or use `/migrate`). Stop.
3. If several are found, ask the user which agent to add the knowledge to.
4. Read the agent's **`schemaName`** from `settings.mcs.yml` (e.g. `crbab_guitarcoach_dcF_b3`) — it is
Expand Down
7 changes: 4 additions & 3 deletions commands/add-skill.md → skills/add-skill/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
description: Add an Agent Skill to a Copilot Studio agent - uploaded from your drive (a SKILL.md or .zip) or picked from the Power CAT "Cat Agent Skills" gallery - then optionally import it into a cloned agent workspace under behaviors/.
name: add-skill
description: Add an Agent Skill to a Copilot Studio agent - uploaded from your drive (a SKILL.md or .zip) or picked from the Power CAT "Cat Agent Skills" gallery - then optionally import it into a cloned agent workspace under behaviors/. Use when the user asks to add, import, upload, or install an Agent Skill (from a local SKILL.md/.zip or the Cat Agent Skills gallery) into a Copilot Studio agent.
argument-hint: Optional skill name/slug or a local path to a SKILL.md / .zip
allowed-tools: Bash(node *add-skill.js*), Read, Glob, Grep
---
Expand All @@ -18,7 +19,7 @@ folder), then optionally *import* it into a cloned Copilot Studio agent workspac
the **portal-style `.mcs.yml` companions** (an anchor `skill.mcs.yml` plus per-file sidecars for
bundle skills) so the on-disk layout matches a Copilot Studio portal import. Import only
materializes files on disk; **publishing to the cloud is done from the VS Code Copilot Studio
extension** (Agent Changes view / sync push) afterward - this command never pushes.
extension** (Agent Changes view / sync push) afterward - this skill never pushes.

Initial request: $ARGUMENTS

Expand Down Expand Up @@ -178,7 +179,7 @@ Tell the user, concisely:
- If imported: the `behaviors/<name>/` path created, the `.mcs.yml` companions written (or that it
fell back to a bare skill, with the reason from `warnings`), and any other warnings; and that
**publishing to the cloud is the next step, done from the VS Code Copilot Studio extension** (Agent
Changes view / sync push) - this command does not push.
Changes view / sync push) - this skill does not push.

## Error handling

Expand Down
Loading