SShortSingh.
Back to feed

A Single Markdown File Can Make GitHub Copilot Follow Your Codebase Rules

0
·57 views

GitHub Copilot's output improves less from better prompt phrasing and more from a committed instructions file at .github/copilot-instructions.md, which is prepended to every request. Unlike generic advice such as 'write clean code,' effective rules must be durable, specific, and checkable — for example, flagging that datetime.utcnow() returns a naive datetime rather than vaguely saying 'handle timezones correctly.' The article recommends keeping the file short, ideally under ten rules, since a bloated instruction file dilutes the rules that matter and adds overhead to every interaction. Rules should also avoid duplicating what automated tools like linters already enforce, reserving the file for non-obvious, codebase-specific facts the model cannot infer from source code alone. The author extends the pattern to infrastructure-as-code contexts like Terraform, Kubernetes, and GitHub Actions, where subtle mistakes are costlier and harder to catch in review.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Experienced Teams Gain From AI Coding Tools While Unsupervised Use Breaks Apps

A team behind the Walletverse crypto wallet argues that AI coding tools help experienced engineers but can quietly destabilize applications built without rigorous oversight. They cite Google's claim that AI generates more than a quarter of its new code, which engineers then review before acceptance. Google's DORA research found AI amplifies existing team strengths and weaknesses, with weak testing and version control leading to instability. Security researchers have repeatedly found flaws such as missing access rules and exposed keys in publicly shared vibe-coded apps. The piece contrasts this with 'vibe engineering,' the practice of experienced developers using AI while remaining accountable for shipped code.

0
ProgrammingDEV Community ·

Retail, OEM and Volume Windows Licenses: How They Differ and Why It Matters

Windows licenses come in three main types, and each behaves differently when it comes to activation and transferring between machines. Retail licenses are bought separately from any computer, can be moved to a new PC, but may only be active on one device at a time. OEM licenses are preinstalled by manufacturers and stored in the motherboard firmware, so they activate automatically but are generally tied to that hardware and do not transfer when it is replaced. Volume licenses, used by organisations through KMS or MAK activation, are not intended for home PCs, and secondhand business laptops carrying them often show activation errors or expiry warnings. Users can identify their license channel by running the slmgr /dli command in an administrator terminal and checking the Description line before attempting any activation fix.

0
ProgrammingDEV Community ·

Krisp Voice Isolation Targets Background Speech That Confuses Voice AI Agents

Voice agents often misbehave not because of the language model or voice output but because speech-to-text picks up a second person talking nearby. Standard STT is built to capture all speech, so it cannot tell which words belong to the caller and which come from a bystander. This leads to wrong transcripts, false interruptions, and broken turn-taking. Krisp's Voice Isolation API and SDK sits at the front of the pipeline and passes through only the main speaker's voice. In the reviewer's test, background speech that had produced 331 words of spurious transcript dropped to zero, though the tool adds a small cost on clean phone audio and is limited to a US-only API region.

0
ProgrammingDEV Community ·

Unreported values should not be recorded as zero in clinical evidence tables

A DEV Community article argues that a recorded zero, an unreported value, and an unchecked entry are distinct and should stay separate when pulling numbers from clinical papers. It presents a small Python example using synthetic teaching records to show how each status is validated and displayed. The author stresses that a reported zero must keep its source locator, while an "unreported" status only means no value was found in the material reviewed, not that an event did not occur. The piece recommends keeping the paper identifier, locator, access level, and review status with each extracted value to support handoffs. The example is explicitly illustrative and does not describe findings from real trials.