PMGM7023 Chap.7 Working Inside GitHub Copilot CLI
Working Inside GitHub Copilot CLI
The boundary comes before the task
The course requires all coursework to be completed with GitHub Copilot CLI, and the first tutorial spends its time on control rather than on analysis. Starting the tool from wherever a terminal happens to open usually means starting in your home directory, which grants the widest possible reach.
The instruction is to change directory into the course folder first and start the session there, so the working boundary contains only the materials for this task.
Permission mode is the second control. The default requires approval for each action, which is slower and shows exactly what is about to happen before it happens.
Approving a class of actions for a session is reasonable once the pattern is familiar, and approving everything is reasonable only where nothing important can be damaged. For assessed work on data you cannot easily recreate, per-action approval costs seconds and removes a whole class of accidents.
Point at the file you mean
A reference to a specific file gives the system the actual content.
Without one it works from a guess about what you meant, and a guess that happens to be plausible is the hardest kind to notice. Precision about what should be read is itself an analytical judgement, and it also keeps the working session small.
Why a long session degrades
A session fills with instructions, your messages, the replies, and everything read or returned along the way, and the space available is finite.
As it fills, older material is summarised: the goals and decisions survive, the exact wording and numbers may not. That is the mechanism behind a session that starts repeating itself, loses a constraint set an hour earlier, or answers about the wrong file.
Four controls follow from that. Check what is currently occupying the session when answers start drifting.
Summarise the older material when the current task genuinely continues the previous one, re-attaching any file whose details still matter. Start a fresh session when the task has changed, since carrying an old analysis into a new question is how a constraint from a previous dataset silently reappears.
Roll back a single turn when one step went wrong, rather than arguing with the result across several more.
The record is the deliverable
Tutorial work is submitted as a Markdown file and graded on whether the work is there, so what you leave behind is assessed rather than incidental.
A session summarised three times can still produce a correct final answer while no longer containing the intermediate outputs that show how it was reached. Save outputs as you go and keep the requests that produced them beside the results.
Sessions are saved automatically, so leaving cleanly and resuming later is the normal way to work across several days.
The second tutorial asks you to write a standing instruction and save it so it applies across your work. It is graded, and it is also the change that most improves every later session, provided every clause in it would visibly change an answer.
What this chapter covers
- 01
Trusted folder and permission mode as the first two decisions
- 02
Pointing at files rather than describing them
- 03
How a working session degrades, and the four controls for it
- 04
Keeping a record that can be submitted and checked
A standing instruction that would change an answer
- 2Fix the audience and the level of explanation.
- 4Impose a shape on every reply and make figures traceable.
- 4State a working boundary and a stopping condition.
Key terms
- Trusted Folder
- A trusted folder is the directory a session is started in and the limit of what it may read or change without a further approval.
- Session Compaction
- Session compaction is the automatic summarising of older conversation once the working space fills. Goals and decisions are preserved while exact details may be lost.
- File Reference
- A file reference points the system at specific content instead of a description of it, so the reply is built on the actual file rather than on an assumption about it.
- Slash Command
- A slash command is a built-in text shortcut that runs one predefined action in a session, such as inspecting current usage or starting a fresh conversation.
Working Inside GitHub Copilot CLI FAQ
Why start Copilot CLI in a specific folder?
Because the folder you start in is the boundary of what can be read or changed without a further approval. Launching from a default location usually means starting in your home directory, which grants the widest possible reach for no benefit. Starting in the course folder keeps the materials, the data and the output together and makes any request to go outside it visible before it happens.
My session started answering about the wrong dataset. What went wrong?
The earlier task is still present in the working session and its file is still the most specific thing available. Summarising has kept the goals and dropped the details, so the constraint you set earlier may also have gone. Start a fresh session for the new task, point explicitly at the current file, and restate the one constraint that matters rather than correcting the answer repeatedly inside the old session.
Exam move
Set up the course folder and your standing instruction in the first week and treat both as fixed infrastructure. Save every tutorial output as you produce it rather than at the end, and keep the request beside the result. Before each tutorial, decide which permission mode the exercise justifies and stay with it.
Working through Working Inside GitHub Copilot CLI in PMGM7023? Sia is AskSia’s AI Management tutor — ask any PMGM7023 Working Inside GitHub Copilot CLI question and get a clear, step-by-step explanation grounded in how PMGM7023 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.