Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 10.3 KB

copilot-instructions.md

File metadata and controls

55 lines (33 loc) · 10.3 KB

Copilot Instructions

Repository-wide instructions for GitHub Copilot.

Read AGENTS.md first. It routes every standing repository rule to its canonical document. When performing code review, load and follow the fleet-code-review skill in .github/skills/fleet-code-review/SKILL.md. Then load every language, documentation, or workflow skill that it selects for the changed files. GitHub Copilot reads these files from the pull request's head branch, so review the instructions in that tree.

Do not duplicate rules from AGENTS.md, GOVERNANCE.md, CODESTYLE.md, or WORKFLOW.md here. This file contains only Copilot-specific bootstrap and output requirements.

Commit Messages and Pull Request Titles

Use an imperative subject of at most 72 characters with no trailing period. The limit measures the authored title, and the (#N) suffix a squash merge appends sits outside it. Use US English and title case, lowercasing only the short bind words .github/skills/comment-and-doc-style/SKILL.md lists, a list that is exhaustive. A Co-Authored-By: line is allowed unless the user disallows it or the repository's rules say otherwise. Never include a link to the agent's session, such as a Claude-Session: trailer, which nothing overrides. Do not put a release-bump magnitude in the title. The full contract is in GOVERNANCE.md "Pull Request Title and Commit Message Conventions".

Reviewing Carried Fleet Content

Follow the fidelity declared for the file. A byte-locked reference to shared infrastructure that this repository does not carry is intentional, not a broken link. Raise substantive defects in canonical content, but locate the fix at its canonical source instead of proposing a local edit.

.github/skills/, and in the hub .claude-plugin/fleet-skills/, are generated by the hub's scripts/build_dist.py from its .agents/skills/. So a defect in either is fixed in the source or the generator and never in the copy. An include region is the text between the marker lines <!-- include: <path> > <heading> --> and <!-- /include --> that every copy carries as its authored source does. A defect inside one is fixed in the hub under the heading that key names. That is because the region is generated from that heading's body. It is also because the key's path resolves against the hub's root rather than this repository's copy of the same file. Where that heading's body is itself a region, the fix sits one hop further, under the heading its own key names. Post no review comment on a file under .github/skills/ or, in the hub, .claude-plugin/fleet-skills/. When the pull request changes the file the fix belongs in, comment on that file instead, and otherwise state the finding in the review summary.

GitHub Copilot Review Runbook

For every review:

  1. Read the full pull request diff and count its changed files.
  2. Follow .github/skills/fleet-code-review/SKILL.md and every skill it selects.
  3. Publish every supported finding. Never suppress a finding or place it in a low-confidence or hidden findings block.
  4. Use an inline comment when a changed line can anchor the finding. Use the review body only when no valid inline anchor exists.

The review automation is scripts/pr_review.py, run from a hub checkout. Use its status, wait, attest, comment, and reply --resolve commands instead of reconstructing GraphQL queries or copying review identifiers by hand. Use comment for a suppressed-finding answer in the pull request conversation. Its status gate verifies the current head, diff coverage, output shape, inline threads, body-only findings, and required checks.

GOVERNANCE.md "PR Review Etiquette" states when a review covers the current head and its full diff, and when to re-run the loop. A round reporting partial coverage of the diff blocks the merge, and so does a refusal. So does a head that no coverage statement, file table, or attested local pass covers. The pr-review-conduct Skill's Merge Gate states every case that blocks the merge, and the exceptions to the cases named here.

Review effort is user-controlled. The automation observes Lite, Balanced, or Max, including an inherited Default (<level>), and never selects or changes the setting. Effort does not determine coverage or completion. A request can complete without a copilot_work_started event, so absence of that event is not a stalled-review verdict. When wait returns PENDING with requested=yes, report the state and rerun wait for another bounded interval by default. Read that field as acceptance of the request rather than as delivery of a round. Do not clear the request on that first timeout, because it may still be active. Where a second bounded wait times out as well, read the pending set. In that case, clear it only where no human or team reviewer is requested alongside the bot, and rerun wait. That rerun then has nothing outstanding to defer to and requests afresh. Where it finds no reviewer node id to request with, it polls instead and says so on its own auto-request line. The clear replaces that set rather than adding to it, and nothing restores a request it drops. So a stall on a pull request that has a human or team reviewer requested goes to the maintainer. So does one still pending after the wait that follows a clear. That clear is a recovery step the script does not implement, and docs/pr-reviewer-reference.md, in the hub checkout the script is run from, carries it. This recovery replaces only the review request and never changes the effort setting. A wait ending REQUEST_NOT_RECORDED, exit 40, is a different state and takes none of this recovery. The request returned success and left neither a pending reviewer nor a review-request event. That is how an exhausted Copilot allowance has shown itself. So clearing and requesting again does not clear this state, and it goes to the maintainer.

Disproved Claims

A disproof is proof about this repository, and the thread it was written in is not where the next round looks. GOVERNANCE.md "PR Review Etiquette", which routes to the pr-review-conduct Skill, closes a false finding by disproving it in the thread. The disproof is addressed to the reviewer so the reviewer does not raise the same thing again. While the pull request is open, the thread is the right place for it. Afterwards it is the wrong one. The pull request merges, and the next round begins with no memory of the last. The second occurrence then reaches a maintainer with no way to tell it from a first. Each entry below is a claim that was tested against this repository and found false, kept so the proof is read rather than built twice.

An entry names the claim, what was run or read to disprove it, the revision it was proved against, and what ends it. A disproof is true of one tree at one revision. So an entry whose subject moves is deleted by the change that moves it rather than edited to look current. That is the same sweep the GOVERNANCE.md "Documentation Style Conventions" rule already requires of prose asserting a behavior that has changed underneath it. This is deliberately not a list to append to. That is because an entry outliving the code it was proved against becomes a reason not to check. That outcome is strictly worse than proving the claim a second time.

The record answers a repeated claim and never dismisses a new one. An entry is cited only where the revision it names is still what the tree carries. The reply carries the proof re-read rather than a pointer to the entry. That is because a reviewer that cannot open this file learns nothing from being pointed at it. Judge a finding on its merits first and match it against this record second. The reason is that reading it the other way round is how a real finding gets closed by a stale proof.

The entries are this repository's own. Each names a file and a revision. A repository holding a copy of this file therefore carries the shape and the rules above rather than these findings. That repository deletes an entry whose subject it does not carry and records what it has proved itself. An entry is never about hub-hosted machinery, the tooling a repository reaches rather than carries per GOVERNANCE.md "Hub-Hosted Tooling". A repository without that tooling has nothing to re-check such a claim against, so a constraint on that tooling is recorded in that tooling's code.

  • "The agent check branches" in STANDUP.md section 0 is a subject-verb disagreement, and should read "The agent checks branches". Raised as a suppressed finding against a line the change under review only touched as diff context.
    • Disproved by - reading the sentence against the snippet it describes. The subject is the noun phrase "the agent check", meaning the check for the signing agent. And "branches" is its verb, which is what the if [ ... = ssh ]; then ssh-add -L; else gpg --list-secret-keys; fi line does. The proposed reading needs "branches" as a plural noun. And the paragraph is section 0, before a repository exists, where the alternatives it names are the SSH and GPG forms rather than refs.
    • Proved against - the paragraph following the agent snippet in STANDUP.md section 0 on develop at 676a2bd, unchanged since 77be3a3.
    • Delete when - the sentence is reworded for any reason, since the entry is about this phrasing rather than about the rule it states.
  • Git accepts an attached -c<name>=<value> or -C<dir> global option. Raised as a P1 in both review rounds of the change that made host-setup/agent-safety/claude/gh-write-guard.py read an attached -c.
    • Disproved by - running git -cfoo.bar=1 status and git -C. status on git 2.47.3. Both print unknown option and the usage text for the separate -c <name>=<value> and -C <path> forms. Git exits without running the subcommand, so an attached spelling never reaches a repository.
    • Proved against - git 2.47.3 and develop at ac78916f.
    • Delete when - the guard stops reading an attached -c or -C, or a git release accepts either attached form.

When in Doubt

Stop and report the uncertainty. Do not guess at an instruction, suppress a possible finding, or claim coverage that the review did not perform.