Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
148082d
Replace per-skill AI disclosure with a PreToolUse hook
lewing Mar 21, 2026
691492f
Address review: pure shell hook, broader matcher, keep fallback pointer
lewing Mar 21, 2026
d740af9
Use official hook format with bash/powershell keys
lewing Mar 21, 2026
081b325
Soften disclosure wording: reminder, not enforcement
lewing Mar 21, 2026
f750f38
Broaden hook to cover all GitHub interactions, not just gh CLI
lewing Mar 21, 2026
8605e50
Drop MCP tool hook — keep it simple
lewing Mar 21, 2026
44b9d43
Add write-only MCP tool hook alongside shell hook
lewing Mar 21, 2026
1c10b95
Tighten hook: write-only gh subcommands + short message
lewing Mar 21, 2026
5a6fd89
Restore full disclosure section in copilot-instructions.md
lewing Mar 21, 2026
1e2ccaf
Consolidate AI disclosure hooks into a single preToolUse hook
lewing Mar 21, 2026
4d27624
Universal hook format: works on all four agent hosts
lewing Mar 21, 2026
b6477d3
Consolidate back to single hook entry
lewing Mar 21, 2026
540ccbd
Merge branch 'main' into hooks/ai-disclosure
lewing Mar 26, 2026
f9187cb
Merge branch 'main' into hooks/ai-disclosure
lewing Mar 28, 2026
3a45511
Merge branch 'main' into hooks/ai-disclosure
danmoseley Apr 12, 2026
b23db60
Merge branch 'main' into hooks/ai-disclosure
lewing Apr 16, 2026
4212c92
Merge branch 'main' into hooks/ai-disclosure
lewing Apr 16, 2026
658ba6b
Merge branch 'main' into hooks/ai-disclosure
lewing Apr 20, 2026
82d68d6
Merge upstream/main: resolve conflicts
lewing Apr 24, 2026
b4c5f18
Merge branch 'main' into hooks/ai-disclosure
lewing Apr 27, 2026
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
15 changes: 14 additions & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash|PowerShell|create|comment|update|edit|review|push|merge",
"hooks": [
{
"command": "node -e \"let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{try{const i=JSON.parse(d);const a=i.toolArgs||'';const n=i.toolName||'';if(/gh\\s+(pr|issue)\\s+(create|comment|review|edit|merge|close)/.test(a)||/github/i.test(n))process.stderr.write('Include AI-generated content disclosure (> [!NOTE]) per copilot-instructions.md\\n')}catch{}})\""
Comment thread
lewing marked this conversation as resolved.
}
],
"description": "Remind about AI disclosure when posting to GitHub via gh CLI or MCP tools"
}
]
},
"extraKnownMarketplaces": {
"dotnet-arcade-skills": {
"source": {
Expand All @@ -10,4 +23,4 @@
"enabledPlugins": {
"dotnet-dnceng@dotnet-arcade-skills": true
}
}
}
18 changes: 18 additions & 0 deletions .github/hooks/hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash|PowerShell|create|comment|update|edit|review|push|merge",
"hooks": [
Comment thread
lewing marked this conversation as resolved.
{
"command": "node -e \"let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{try{const i=JSON.parse(d);const a=i.toolArgs||'';const n=i.toolName||'';if(/gh\\s+(pr|issue)\\s+(create|comment|review|edit|merge|close)/.test(a)||/github/i.test(n))process.stderr.write('Include AI-generated content disclosure (> [!NOTE]) per copilot-instructions.md\\n')}catch{}})\"",
"bash": "d=; while IFS= read -r l; do d=$d$l; done; case $d in *'gh pr create'*|*'gh pr comment'*|*'gh pr review'*|*'gh pr edit'*|*'gh pr merge'*|*'gh issue create'*|*'gh issue comment'*|*'gh issue edit'*|*'gh issue close'*|*github*) echo 'Include AI-generated content disclosure (> [!NOTE]) per copilot-instructions.md' >&2;; esac; :",
"powershell": "$d = [Console]::In.ReadToEnd(); if ($d -match 'gh (pr|issue) (create|comment|review|edit|merge|close)' -or $d -match 'github') { [Console]::Error.WriteLine('Include AI-generated content disclosure (> [!NOTE]) per copilot-instructions.md') }",
"timeout": 5
}
],
"description": "Remind about AI disclosure when posting to GitHub via gh CLI or MCP tools"
}
]
}
}
2 changes: 0 additions & 2 deletions .github/skills/api-proposal/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,6 @@ Present the complete draft to the user for review. Iterate based on feedback bef

### Phase 5: Publish

> **AI-generated content disclosure:** When posting any content to GitHub (issue body, PR body, comments) under a user's credentials — i.e., the account is **not** a dedicated "copilot" or "bot" account/app — prepend a concise, visible note (e.g. a `> [!NOTE]` alert) indicating the content was AI/Copilot-generated. This applies to the initial proposal, iteration updates, and any follow-up comments posted on the user's behalf. Skip this if the user explicitly asks you to omit it.

#### Step 1: Push and capture commit URL

Commit prototype changes and push the branch to the user's fork (default) or ask for an alternative remote. Capture the commit URL for inclusion in the proposal (e.g., `https://github.com/<owner>/<repo>/commit/<sha>`).
Expand Down
2 changes: 0 additions & 2 deletions .github/skills/code-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ When the environment supports launching sub-agents with different models (e.g.,

When presenting the final review (whether as a PR comment or as output to the user), use the following structure. This ensures consistency across reviews and makes the output easy to scan.

> 📝 **AI-generated content disclosure:** When posting review content to GitHub (PR review comments, PR comments) under a user's credentials — i.e., the account is **not** a dedicated "copilot" or "bot" account/app — you **MUST** include a concise, visible note (e.g. a `> [!NOTE]` alert) indicating the content was AI/Copilot-generated. Skip this if the user explicitly asks you to omit it.

### Structure

```
Expand Down
11 changes: 8 additions & 3 deletions .github/skills/issue-triage/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,9 +450,14 @@ Key points: each section has multiple outcome variants (pick the one that matche

When posting any content to GitHub under a user's credentials (not a dedicated bot account), you **MUST** include a concise, visible note (e.g. a `> [!NOTE]` alert) indicating the content was AI/Copilot-generated. Skip this if the user explicitly asks you to omit it.

- **NEVER** use `gh issue close`, `gh issue edit`, `gh issue comment`, or `gh pr review --approve`/`--request-changes` **unless the user explicitly asks you to** after picking an outcome.

- **Security concerns are out of scope.** Do not assess, discuss, or make recommendations about potential security implications. Security assessment is handled through separate processes.
- **NEVER** use `gh issue close`, `gh issue edit`, `gh issue comment`, or
`gh pr review --approve`/`--request-changes` **unless the user explicitly
asks you to** after picking an outcome.
Comment on lines 451 to +455
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

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

The PR description says the duplicated AI disclosure text was removed from issue-triage/SKILL.md, but this file still contains the per-skill disclosure guidance (line 451). Either remove this line to fully rely on the new PreToolUse hook + .github/copilot-instructions.md, or update the PR description to reflect that issue-triage intentionally keeps the explicit disclosure text.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@copilot please remove the ai disclosure text here too


- **Security concerns are out of scope.** This skill does not assess, discuss, or
make recommendations about potential security implications of issues. If you
believe an issue may have security implications, do not mention this in the
triage report. Security assessment is handled through separate processes.

- **Do not guess area labels.** Always cross-reference with `docs/area-owners.md`.

Expand Down
2 changes: 0 additions & 2 deletions .github/skills/performance-benchmark/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ public class Bench

Post a comment on the PR to trigger EgorBot with your benchmark. The general format is:

> 📝 **AI-generated content disclosure:** When posting benchmark comments to GitHub under a user's credentials — i.e., the account is **not** a dedicated "copilot" or "bot" account/app — you **MUST** include a concise, visible note (e.g. a `> [!NOTE]` alert) indicating the content was AI/Copilot-generated. Skip this if the user explicitly asks you to omit it.

@EgorBot [targets] [options] [BenchmarkDotNet args]

```cs
Expand Down
Loading