Copilot code review, pull request summaries, Spaces and Spark
Lesson coming
Custom instructions, prompt files and Copilot Chat's commands
Lesson coming
Sample questions
Try each one before opening the answer. Every option is explained, with the GitHub documentation page that proves it.
Question 1 · choose 1
In VS Code agent mode, a developer wants Copilot to read through forty large CI log files to find the root cause of a flaky test, but without filling the main chat's context and degrading the rest of the session. Which approach fits?
AStart a new chat session for each log file and copy the conclusions back by hand
BAsk the agent to compact the conversation before and after it reads the logs
CDelegate the analysis to a subagent that has its own context window and reports back
DSwitch the session to plan mode so that the logs are read with read-only tools
Show the answer and why
AStart a new chat session for each log file and copy the conclusions back by hand
Incorrect
This loses continuity and manual copying is what delegation avoids.
BAsk the agent to compact the conversation before and after it reads the logs
Incorrect
Compaction manages the length of the main conversation; it does not keep the log analysis out of the main context.
CDelegate the analysis to a subagent that has its own context window and reports back
Correct
Subagents work in an isolated context window and return the final result, which suits processing large amounts of information.
DSwitch the session to plan mode so that the logs are read with read-only tools
Incorrect
Plan mode drafts a plan; it does not keep the reading out of the main context.
Subagents run delegated tasks in an isolated context window within the chat session, work without pausing for user feedback, and return the final result to the main session. They suit tasks that would clutter the main context, such as processing large amounts of information. In VS Code you enable the runSubagent tool to use them.
A maintainer edits .github/copilot-instructions.md on a feature branch to make Copilot code review stricter about error handling, and opens a pull request from that branch into main. Which instructions does Copilot use when it reviews this pull request?
AThe version on main, because instructions only apply after they are merged
BThe version on the feature branch, so the change can be tested in the same pull request
CBoth versions merged together, with the main branch winning on conflicts
DNeither version, because changed instruction files are skipped for safety
Show the answer and why
AThe version on main, because instructions only apply after they are merged
Incorrect
Copilot reads instructions from the head branch, not the base branch.
BThe version on the feature branch, so the change can be tested in the same pull request
Correct
Copilot reads repository custom instructions, agent instructions and skills from the head branch, the branch with the changes.
CBoth versions merged together, with the main branch winning on conflicts
Incorrect
There is no merge of the two versions; the head branch's files are used.
DNeither version, because changed instruction files are skipped for safety
Incorrect
Instruction files are not skipped; the head branch's version is used.
When reviewing a pull request, Copilot reads repository custom instructions, agent instructions and agent skills from the head branch (the branch with your changes), not the base branch. You can therefore test changes to them in the same pull request without merging them first.
A team builds a Copilot Space for API questions. They want Copilot to always weigh one short style guide on every question, while also answering from a large documentation repository. How should they add each source?
AAttach the style guide as an individual file and the documentation as a repository
BPaste both into the Space's instructions, because sources are only used when named in a prompt
CAdd both as repositories, because repositories are always fully loaded into the context window
DUpload the style guide as an image so that it is not truncated, and link the repository
Show the answer and why
AAttach the style guide as an individual file and the documentation as a repository
Correct
An attached file's full contents are considered for every query, while an attached repository is searched for relevant content, which suits large collections.
BPaste both into the Space's instructions, because sources are only used when named in a prompt
Incorrect
Sources are used to ground answers; the instructions field describes focus, not storage for documents.
CAdd both as repositories, because repositories are always fully loaded into the context window
Incorrect
An attached repository is searched for the most relevant content, not loaded in full.
DUpload the style guide as an image so that it is not truncated, and link the repository
Incorrect
Uploading as an image adds nothing; attaching the file directly is how it gets full consideration.
When you attach a repository to a Copilot Space, Copilot does not load the entire project; it searches and retrieves the most relevant content, which suits large-scale use. When you attach an individual file, its full contents are loaded into Copilot's context and considered for every query, which suits a document Copilot should consistently prioritize.
A developer has typed two lines of notes into a pull request description, then asks Copilot to generate a summary there, expecting the notes to shape it. The summary ignores them. What does the documentation recommend?
AMove the notes into a review comment, because Copilot reads comments before the description
BAsk for the summary in Copilot Chat with the notes pasted in, then use the commit message instead
CEnable custom instructions for pull requests so that the existing text is included
DStart with a blank description, generate the summary, then review it and add your own context
Show the answer and why
AMove the notes into a review comment, because Copilot reads comments before the description
Incorrect
Copilot's summary is built from the changes; moving notes to a comment does not feed them in.
BAsk for the summary in Copilot Chat with the notes pasted in, then use the commit message instead
Incorrect
This is not the documented approach for pull request summaries.
CEnable custom instructions for pull requests so that the existing text is included
Incorrect
No such setting exists for pull request summaries.
DStart with a blank description, generate the summary, then review it and add your own context
Correct
Copilot does not take existing description content into account, so the guidance is to start blank, then review the summary and add context.
To generate a summary, select Copilot actions in the description (or comment) field header and click Summary. Copilot does not take into account any existing content in the description, so start with a blank description for best results. Review the generated summary carefully and add any additional context before saving.
A team wants a reusable Markdown prompt for generating React forms that developers run on demand from chat. Which file name and location follow the convention for repository prompt files?
A.github/copilot-instructions.md
B.github/prompts/new-react-form.prompt.md
C.github/instructions/react.instructions.md
D.github/agents/react.agent.md
Show the answer and why
A.github/copilot-instructions.md
Incorrect
This is the repository-wide custom instructions file, applied automatically rather than on demand.
B.github/prompts/new-react-form.prompt.md
Correct
Repository prompt files use the .prompt.md extension and are typically stored in .github/prompts/.
C.github/instructions/react.instructions.md
Incorrect
This is a path-specific custom instructions file.
D.github/agents/react.agent.md
Incorrect
.github/agents holds custom agent profiles.
Prompt files are reusable, standalone Markdown templates for focused interactions. Repository prompt files use the .prompt.md extension and are typically stored in .github/prompts/. Unlike custom instructions, which apply automatically, a prompt file is invoked for a specific interaction.
A developer wants to try GitHub Spark to build an app from a natural-language description. According to the plans comparison, which plans include Spark today?
ACopilot Free and Copilot Student
BCopilot Pro and Copilot Business
CCopilot Pro+ and Copilot Enterprise
DCopilot Max and Copilot Business only
Show the answer and why
ACopilot Free and Copilot Student
Incorrect
Spark is not included in the free plans.
BCopilot Pro and Copilot Business
Incorrect
Spark is not included in Pro or Business.
CCopilot Pro+ and Copilot Enterprise
Correct
The plans tables list GitHub Spark (public preview) as included only in Copilot Pro+ and Copilot Enterprise.
DCopilot Max and Copilot Business only
Incorrect
Spark is listed as not included in Max or Business.
The plans comparison lists GitHub Spark (public preview) under other features. Among individual plans it is included only in Copilot Pro+, and among organization plans only in Copilot Enterprise. Spark usage consumes AI credits.
A student on Copilot Free wants to collect course notes and a repository into a Copilot Space. Can she create one?
ANo, Spaces require Copilot Enterprise
BNo, Spaces require an organization to own them
CYes, but only after an administrator enables the Spaces policy
DYes; any Copilot license, Free included, can use Spaces
Show the answer and why
ANo, Spaces require Copilot Enterprise
Incorrect
Spaces are not limited to Enterprise.
BNo, Spaces require an organization to own them
Incorrect
Spaces can belong to a personal account.
CYes, but only after an administrator enables the Spaces policy
Incorrect
Free users have no administrator; anyone with a Copilot license can use Spaces.
DYes; any Copilot license, Free included, can use Spaces
Correct
The documentation states that anyone with a Copilot license, including Copilot Free, can create and use Spaces.
Anyone with a Copilot license, including Copilot Free, can create and use Copilot Spaces. Spaces can belong to a personal account or an organization. Questions in a space consume AI credits; for Copilot Free users they count toward the monthly chat limit.
A developer wants Copilot cloud agent to work on a branch so she can review the diff and iterate before any pull request exists. Which way of starting the task gives that by default?
AAssigning the issue to Copilot from the issue's Assignees menu
BStarting the task with a prompt from the Agents tab
CCreating a new repository with a prompt
DRequesting a review from Copilot on an existing pull request
Show the answer and why
AAssigning the issue to Copilot from the issue's Assignees menu
Incorrect
Assigning an issue always creates a pull request.
BStarting the task with a prompt from the Agents tab
Correct
Starting with a prompt works on a branch by default, so you can review and iterate before opening a pull request.
CCreating a new repository with a prompt
Incorrect
Seeding a repository creates a draft pull request with scaffolded code.
DRequesting a review from Copilot on an existing pull request
Incorrect
That asks for code review, not a coding task.
There are several ways to start a Copilot cloud agent task. Assigning an issue always creates a pull request. Starting with a prompt (Agents tab, agents page or panel, dashboard, or /task in Copilot Chat) works on a branch by default, so you can review, steer and iterate before you open a pull request. Seeding a new repository creates a draft pull request.