Skip to content

Commit b2a320c

Browse files
committed
Add declarative-agent-sample-review skill
1 parent 7f5a10d commit b2a320c

1 file changed

Lines changed: 80 additions & 0 deletions

File tree

  • .github/declarative-agent-sample-review
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
name: declarative-agent-sample-review
3+
description: Review PRs for declarative agent samples (da-* folders) in pnp/copilot-pro-dev-samples. Use when reviewing da-* sample submissions, checking manifest versions, validating README format. Triggers on "review PR", "review this sample", or PR review requests for declarative agent samples.
4+
---
5+
6+
# Declarative Agent Sample Review
7+
8+
Review declarative agent sample PRs (folders starting with `da-`) for compliance with repo guidelines.
9+
10+
## Workflow
11+
12+
1. Checkout PR: `gh pr checkout <number>`
13+
2. Verify sample folder starts with `da-`
14+
3. Run checks below, collecting comments (file, line, issue)
15+
4. Submit all comments in single API call (GitHub limitation)
16+
17+
## Checks
18+
19+
### 1. Manifest Schema Versions
20+
21+
Fetch latest versions from Microsoft Learn docs (never use other samples as reference):
22+
23+
| Manifest | File | Property | Docs |
24+
|----------|------|----------|------|
25+
| App | `appPackage/manifest.json` | `manifestVersion` | learn.microsoft.com/microsoft-365/extensibility/schema |
26+
| Declarative Agent | `appPackage/*DeclarativeAgent.json` | `version` + `$schema` | learn.microsoft.com/microsoft-365-copilot/extensibility/declarative-agent-manifest |
27+
| API Plugin | `appPackage/ai-plugin.json` | `schema_version` | learn.microsoft.com/microsoft-365-copilot/extensibility/api-plugin-manifest |
28+
29+
### 2. m365agents.yml
30+
31+
- **No `projectId`** - auto-generated on provision, must not be committed
32+
- Check both `m365agents.yml` and `m365agents.local.yml`
33+
34+
### 3. README.md
35+
36+
Compare against `templates/README-template.md`:
37+
38+
- **Contributors section** present with actual author names
39+
- **Version history** lists real author (not "Microsoft")
40+
- **Tracking image** uses markdown format at end of file:
41+
```
42+
![](https://m365-visitor-stats.azurewebsites.net/copilot-pro-dev-samples/<sample-folder>)
43+
```
44+
- **URLs** consistent (avoid mixed `en-us/` locales in same file)
45+
- **No trailing `---`** at end
46+
47+
### 4. assets/sample.json
48+
49+
Compare against `templates/sample-template.json`:
50+
51+
- **name**: `pnp-copilot-pro-dev-<sample-folder>`
52+
- **url/downloadUrl**: correct sample folder path
53+
- **authors**: matches actual contributors (verify against PR author)
54+
- **URLs**: consistent locale format
55+
56+
## Submitting Reviews
57+
58+
GitHub API cannot add comments to pending reviews after creation. Collect all comments first.
59+
60+
Get commit SHA:
61+
```bash
62+
gh pr view <PR> --json headRefOid
63+
```
64+
65+
Create `review.json`:
66+
```json
67+
{
68+
"commit_id": "<sha>",
69+
"event": "REQUEST_CHANGES",
70+
"body": "Summary message",
71+
"comments": [
72+
{"path": "file/path", "line": 10, "body": "Issue description"}
73+
]
74+
}
75+
```
76+
77+
Submit:
78+
```bash
79+
gh api repos/pnp/copilot-pro-dev-samples/pulls/<PR>/reviews --method POST --input review.json
80+
```

0 commit comments

Comments
 (0)