Skip to content

Commit 924614d

Browse files
authored
Merge pull request #43731 from github/repo-sync
Repo sync
2 parents 28dc5b5 + 5ad7894 commit 924614d

File tree

82 files changed

+4059
-278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+4059
-278
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ We've expanded the documentation for custom agents in Copilot CLI, adding inform
1616

1717
<hr>
1818

19+
**31 March 2026**
20+
21+
The documentation for Copilot CLI now includes a new reference article about the `~/.copilot` directory, and information on how a Copilot skill can run a script:
22+
23+
* [GitHub Copilot CLI configuration directory](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-config-dir-reference)
24+
* [Creating agent skills for GitHub Copilot CLI](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/create-skills#enabling-a-skill-to-run-a-script)
25+
26+
<hr>
27+
1928
**27 March 2026**
2029

2130
We've introduced a new discovery landing page design for all the top-level doc sets on docs.github.com. The landing pages highlight recommended articles and give users the ability to filter articles by category with a drop down menu. Every article across the site now includes category metadata, making it easier to browse doc sets without relying solely on search. This replaces the previous product-landing layout across 35 doc sets.

content/code-security/tutorials/manage-security-alerts/prioritizing-dependabot-alerts-using-metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ You can customize the default funnel order on the "Alert prioritization" graph t
4545

4646
### 2. Focus on critical and high severity alerts
4747

48-
Start by identifying alerts with the highest severity by using the the `severity-critical` or `severity-high` filters. These vulnerabilities pose the greatest risk and are often prioritized by compliance standards. You can then
48+
Start by identifying alerts with the highest severity by using the `severity-critical` or `severity-high` filters. These vulnerabilities pose the greatest risk and are often prioritized by compliance standards.
4949

5050
### 3. Assess exploitability and reachability
5151

content/contributing/style-guide-and-content-model/contents-of-a-github-docs-article.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,15 @@ Titles can be challenging. Use these general guidelines to help create clear, he
5353

5454
## Intro
5555

56-
The top of every page has an intro that provides context and sets expectations, allowing readers to quickly decide if the page is relevant to them. Intros also are displayed in search results to provide contextual information to help readers choose a result.
56+
Every page and article has an intro which describes what they’re about. The text we use for intros is also displayed within search results, making them important for SEO.
5757

5858
### How to write an intro
5959

60-
* Article intros are one to two sentences long.
61-
* Map topic and category intros are one sentence long.
62-
* API reference intros are one sentence long.
63-
* The intro for an API page should define the feature so that someone knows whether the feature meets their needs without reading the entire article.
64-
* Intros contain a high-level summary of the page’s content, developing the idea presented in a title with more detail.
65-
* Use approachable synonyms of words in the page’s title to help readers understand the article’s purpose differently. Avoid repeating words from the title when possible.
66-
* Intros are relatively evergreen and high-level, so they can scale with future changes to the content on the page without needing to be frequently updated.
67-
* For searchability, include keywords on the page's subject in the intro.
68-
* When a term in the intro has an acronym we’ll use elsewhere in the article, indicate the acronym.
69-
* Intros generally don't contain permissions for any tasks contained within the article.
60+
* Intros should be concise, ideally one sentence long.
61+
* Intros help people know if they’re in the right place for what they need. Let the user know what value is being provided to them, using words they would use and search for.
62+
* Intros are also an invitation to continue reading. A good intro reassures the reader that their time is being well spent.
63+
* If an important term has a related acronym that is generally used in its place, include the acronym in the intro. (Example: Search engine optimization and SEO.)
64+
* Finally, review your intro to ensure it is search engine friendly by including relevant keywords and phrases.
7065

7166
## Permissions statements
7267

content/copilot/reference/copilot-cli-reference/cli-command-reference.md

Lines changed: 319 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,323 @@ Prompt hooks auto-submit text as if the user typed it. They are only supported o
415415
| `errorOccurred` | An error occurs during execution. | No |
416416
| `notification` | Fires asynchronously when the CLI emits a system notification (shell completion, agent completion or idle, permission prompts, elicitation dialogs). Fire-and-forget: never blocks the session. Supports `matcher` regex on `notification_type`. | Optional — can inject `additionalContext` into the session. |
417417

418+
### Hook event input payloads
419+
420+
Each hook event delivers a JSON payload to the hook handler. Two payload formats are supported, selected by the event name used in the hook configuration:
421+
422+
* **camelCase format** — Configure the event name in camelCase (for example, `sessionStart`). Fields use camelCase.
423+
* **{% data variables.product.prodname_vscode_shortname %} compatible format** — Configure the event name in PascalCase (for example, `SessionStart`). Fields use snake_case to match the {% data variables.product.prodname_vscode_shortname %} {% data variables.product.prodname_copilot_short %} extension format.
424+
425+
#### `sessionStart` / `SessionStart`
426+
427+
**camelCase input:**
428+
429+
```typescript
430+
{
431+
sessionId: string;
432+
timestamp: number; // Unix timestamp in milliseconds
433+
cwd: string;
434+
source: "startup" | "resume" | "new";
435+
initialPrompt?: string;
436+
}
437+
```
438+
439+
**{% data variables.product.prodname_vscode_shortname %} compatible input:**
440+
441+
```typescript
442+
{
443+
hook_event_name: "SessionStart";
444+
session_id: string;
445+
timestamp: string; // ISO 8601 timestamp
446+
cwd: string;
447+
source: "startup" | "resume" | "new";
448+
initial_prompt?: string;
449+
}
450+
```
451+
452+
#### `sessionEnd` / `SessionEnd`
453+
454+
**camelCase input:**
455+
456+
```typescript
457+
{
458+
sessionId: string;
459+
timestamp: number;
460+
cwd: string;
461+
reason: "complete" | "error" | "abort" | "timeout" | "user_exit";
462+
}
463+
```
464+
465+
**{% data variables.product.prodname_vscode_shortname %} compatible input:**
466+
467+
```typescript
468+
{
469+
hook_event_name: "SessionEnd";
470+
session_id: string;
471+
timestamp: string; // ISO 8601 timestamp
472+
cwd: string;
473+
reason: "complete" | "error" | "abort" | "timeout" | "user_exit";
474+
}
475+
```
476+
477+
#### `userPromptSubmitted` / `UserPromptSubmit`
478+
479+
**camelCase input:**
480+
481+
```typescript
482+
{
483+
sessionId: string;
484+
timestamp: number;
485+
cwd: string;
486+
prompt: string;
487+
}
488+
```
489+
490+
**{% data variables.product.prodname_vscode_shortname %} compatible input:**
491+
492+
```typescript
493+
{
494+
hook_event_name: "UserPromptSubmit";
495+
session_id: string;
496+
timestamp: string; // ISO 8601 timestamp
497+
cwd: string;
498+
prompt: string;
499+
}
500+
```
501+
502+
#### `preToolUse` / `PreToolUse`
503+
504+
**camelCase input:**
505+
506+
```typescript
507+
{
508+
sessionId: string;
509+
timestamp: number;
510+
cwd: string;
511+
toolName: string;
512+
toolArgs: unknown;
513+
}
514+
```
515+
516+
**{% data variables.product.prodname_vscode_shortname %} compatible input:**
517+
518+
When configured with the PascalCase event name `PreToolUse`, the payload uses snake_case field names to match the {% data variables.product.prodname_vscode_shortname %} {% data variables.product.prodname_copilot_short %} extension format:
519+
520+
```typescript
521+
{
522+
hook_event_name: "PreToolUse";
523+
session_id: string;
524+
timestamp: string; // ISO 8601 timestamp
525+
cwd: string;
526+
tool_name: string;
527+
tool_input: unknown; // Tool arguments (parsed from JSON string when possible)
528+
}
529+
```
530+
531+
#### `postToolUse` / `PostToolUse`
532+
533+
**camelCase input:**
534+
535+
```typescript
536+
{
537+
sessionId: string;
538+
timestamp: number;
539+
cwd: string;
540+
toolName: string;
541+
toolArgs: unknown;
542+
toolResult: {
543+
resultType: "success";
544+
textResultForLlm: string;
545+
}
546+
}
547+
```
548+
549+
**{% data variables.product.prodname_vscode_shortname %} compatible input:**
550+
551+
```typescript
552+
{
553+
hook_event_name: "PostToolUse";
554+
session_id: string;
555+
timestamp: string; // ISO 8601 timestamp
556+
cwd: string;
557+
tool_name: string;
558+
tool_input: unknown;
559+
tool_result: {
560+
result_type: "success" | "failure" | "denied" | "error";
561+
text_result_for_llm: string;
562+
}
563+
}
564+
```
565+
566+
#### `postToolUseFailure` / `PostToolUseFailure`
567+
568+
**camelCase input:**
569+
570+
```typescript
571+
{
572+
sessionId: string;
573+
timestamp: number;
574+
cwd: string;
575+
toolName: string;
576+
toolArgs: unknown;
577+
error: string;
578+
}
579+
```
580+
581+
**{% data variables.product.prodname_vscode_shortname %} compatible input:**
582+
583+
```typescript
584+
{
585+
hook_event_name: "PostToolUseFailure";
586+
session_id: string;
587+
timestamp: string; // ISO 8601 timestamp
588+
cwd: string;
589+
tool_name: string;
590+
tool_input: unknown;
591+
error: string;
592+
}
593+
```
594+
595+
#### `agentStop` / `Stop`
596+
597+
**camelCase input:**
598+
599+
```typescript
600+
{
601+
sessionId: string;
602+
timestamp: number;
603+
cwd: string;
604+
transcriptPath: string;
605+
stopReason: "end_turn";
606+
}
607+
```
608+
609+
**{% data variables.product.prodname_vscode_shortname %} compatible input:**
610+
611+
```typescript
612+
{
613+
hook_event_name: "Stop";
614+
session_id: string;
615+
timestamp: string; // ISO 8601 timestamp
616+
cwd: string;
617+
transcript_path: string;
618+
stop_reason: "end_turn";
619+
}
620+
```
621+
622+
#### `subagentStart`
623+
624+
**Input:**
625+
626+
```typescript
627+
{
628+
sessionId: string;
629+
timestamp: number;
630+
cwd: string;
631+
transcriptPath: string;
632+
agentName: string;
633+
agentDisplayName?: string;
634+
agentDescription?: string;
635+
}
636+
```
637+
638+
#### `subagentStop` / `SubagentStop`
639+
640+
**camelCase input:**
641+
642+
```typescript
643+
{
644+
sessionId: string;
645+
timestamp: number;
646+
cwd: string;
647+
transcriptPath: string;
648+
agentName: string;
649+
agentDisplayName?: string;
650+
stopReason: "end_turn";
651+
}
652+
```
653+
654+
**{% data variables.product.prodname_vscode_shortname %} compatible input:**
655+
656+
```typescript
657+
{
658+
hook_event_name: "SubagentStop";
659+
session_id: string;
660+
timestamp: string; // ISO 8601 timestamp
661+
cwd: string;
662+
transcript_path: string;
663+
agent_name: string;
664+
agent_display_name?: string;
665+
stop_reason: "end_turn";
666+
}
667+
```
668+
669+
#### `errorOccurred` / `ErrorOccurred`
670+
671+
**camelCase input:**
672+
673+
```typescript
674+
{
675+
sessionId: string;
676+
timestamp: number;
677+
cwd: string;
678+
error: {
679+
message: string;
680+
name: string;
681+
stack?: string;
682+
};
683+
errorContext: "model_call" | "tool_execution" | "system" | "user_input";
684+
recoverable: boolean;
685+
}
686+
```
687+
688+
**{% data variables.product.prodname_vscode_shortname %} compatible input:**
689+
690+
```typescript
691+
{
692+
hook_event_name: "ErrorOccurred";
693+
session_id: string;
694+
timestamp: string; // ISO 8601 timestamp
695+
cwd: string;
696+
error: {
697+
message: string;
698+
name: string;
699+
stack?: string;
700+
};
701+
error_context: "model_call" | "tool_execution" | "system" | "user_input";
702+
recoverable: boolean;
703+
}
704+
```
705+
706+
#### `preCompact` / `PreCompact`
707+
708+
**camelCase input:**
709+
710+
```typescript
711+
{
712+
sessionId: string;
713+
timestamp: number;
714+
cwd: string;
715+
transcriptPath: string;
716+
trigger: "manual" | "auto";
717+
customInstructions: string;
718+
}
719+
```
720+
721+
**{% data variables.product.prodname_vscode_shortname %} compatible input:**
722+
723+
```typescript
724+
{
725+
hook_event_name: "PreCompact";
726+
session_id: string;
727+
timestamp: string; // ISO 8601 timestamp
728+
cwd: string;
729+
transcript_path: string;
730+
trigger: "manual" | "auto";
731+
custom_instructions: string;
732+
}
733+
```
734+
418735
### `preToolUse` decision control
419736

420737
The `preToolUse` hook can control tool execution by writing a JSON object to stdout.
@@ -628,7 +945,7 @@ Custom agents are specialized AI agents defined in Markdown files. The filename
628945
| Agent | Default model | Description |
629946
|-------|--------------|-------------|
630947
| `code-review` | claude-sonnet-4.5 | High signal-to-noise code review. Analyzes diffs for bugs, security issues, and logic errors. |
631-
| `critic` | complementary model | Adversarial feedback on proposals, designs, and implementations. Identifies weak points and suggests improvements. Experimental—requires `--experimental`. |
948+
| `critic` | complementary model | Rubber-duck adversarial feedback on proposals, designs, and implementations. Identifies weak points and suggests improvements. Available for Claude models. Experimental—requires `--experimental`. |
632949
| `explore` | claude-haiku-4.5 | Fast codebase exploration. Searches files, reads code, and answers questions. Returns focused answers under 300 words. Safe to run in parallel. |
633950
| `general-purpose` | claude-sonnet-4.5 | Full-capability agent for complex multi-step tasks. Runs in a separate context window. |
634951
| `research` | claude-sonnet-4.6 | Deep research agent. Generates a report based on information in your codebase, in relevant repositories, and on the web. |
@@ -847,7 +1164,7 @@ Feature flags enable functionality that is not yet generally available. Enable f
8471164

8481165
| Flag | Tier | Description |
8491166
|------|------|-------------|
850-
| `CRITIC_AGENT` | experimental | Critic subagent for adversarial feedback on code and designs (Claude and GPT models) |
1167+
| `RUBBER_DUCK_AGENT` | experimental | Rubber-duck subagent for adversarial feedback on code and designs (available for Claude models) |
8511168
| `BACKGROUND_SESSIONS` | experimental | Multiple concurrent sessions with background management |
8521169
| `MULTI_TURN_AGENTS` | experimental | Multi-turn subagent message passing via `write_agent` |
8531170
| `EXTENSIONS` | experimental | Programmatic extensions with custom tools and hooks |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e566c239b96a15dd2d7e2e32b67668227e21f417
1+
ed524424679cf44e46cf94e5beb5b8aa9974b554

0 commit comments

Comments
 (0)