k-ruoka-mcp: Instructions file for GitHub Copilot

.github/copilot-instructions.md

k-ruoka-mcp copilot-instructions.md is an instructions file for GitHub Copilot from nikosavola/k-ruoka-mcp. It costs 903 tokens per session, scanned A, original, Apache-2.0.

Code-review instructions for Copilot in an MCP server that manages one K-Ruoka shopping cart through a real Chrome browser. MCP connects an AI assistant to external tools; K-Ruoka is a Finnish grocery service.

In plain words
What is it for?
Use them when reviewing changes to cart reads and writes, browser automation, identifier handling, mutation checks, or tests.
Why use it?
They explain which unusual cart behaviours are intentional, helping reviewers avoid reporting correct logic as bugs and catch mistakes such as confusing product and cart-item IDs.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file. Also seen: mentions AGENTS.md.

This is nikosavola/k-ruoka-mcp's own configuration. It tells GitHub Copilot how to work on k-ruoka-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything k-ruoka-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to nikosavola/k-ruoka-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nikosavola/k-ruoka-mcp/main/.github/copilot-instructions.md
Clone the repo
git clone --depth 1 https://github.com/nikosavola/k-ruoka-mcp

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for k-ruoka-mcp copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/nikosavola/k-ruoka-mcp/copilot-instructions/github.svg)](https://agentmods.dev/instructions/nikosavola/k-ruoka-mcp/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/nikosavola/k-ruoka-mcp/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/nikosavola/k-ruoka-mcp/copilot-instructions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for k-ruoka-mcp copilot-instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/nikosavola/k-ruoka-mcp/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/nikosavola/k-ruoka-mcp/copilot-instructions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 903 This file is loaded in full into every session.
When invoked 903 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00903 $0.00903
Opus 5 $0.00451 $0.00451
Sonnet 5 $0.00181 $0.00181
Haiku 4.5 $0.00090 $0.00090

Measured 9d ago against content hash 56b9cdfc9194, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

k-ruoka-mcp copilot-instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/copilot-instructions.md · 61 lines

How it starts

The opening of the file, as written. The whole thing — 61 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Copilot code review instructions

k-ruoka-mcp is an MCP server that manages one K-Plussa account's K-Ruoka shopping cart. There is no public API, so it drives a real installed Chrome over CDP and issues each /kr-api/ call as a same-origin fetch() from inside the loaded page. See AGENTS.md for the full picture; this file is the subset relevant to reviewing a diff.

Do not flag these as bugs

  • No status-code check on mutations. K-Ruoka answers 200 with the cart unchanged for an unknown item id, and inserts a placeholder for an unknown EAN. Mutations are verified by result (confirm_amount, confirm_absent in browser/basket.rs), not by HTTP status. A PR that adds a status check in place of these guards is removing correctness, not adding it.
  • The basket id is re-read on every write, never cached. That is deliberate: the guards read the basket the write itself returned, so a stale cached id would pass the guard while mutating the wrong cart.
  • itemId used interchangeably with EAN would be a real bug, not a style nit: they are different identifiers. itemId exists only once an item is in the cart; update_cart_item / remove_from_cart take the cart's item_id; add_to_cart takes an EAN.
  • The browser profile directory is never deleted on failure, including in recovery and retry paths. It holds a real login. A block should relaunch against the same profile; only an AuthExpired result should trigger re-login.
  • The User-Agent never contains HeadlessChrome. Do not suggest restoring a default/stealth user agent string; that substring alone is what triggers Cloudflare's block, per K_RUOKA_USER_AGENT's doc comment.
  • Requests are throttled to one per 500 ms, process-wide, on purpose (being gentle on K-Ruoka's servers). Don't suggest parallelizing or removing this for "performance."

Testing

  • KrApi (browser/session.rs) is the seam between the server and K-Ruoka. New logic should be reachable through MockApi (tests/support/mod.rs) rather than requiring a real browser; flag a PR that adds Chrome-dependent logic with no hermetic test path.
  • Recovery and readiness policy belongs in pure functions (plan_recovery, should_replace, clearance_step) precisely so it can be tested without Chrome. A PR that inlines new policy decisions into the Chrome-driving code instead of one of these functions is harder to test and should be flagged.
  • Tests gated #[ignore] (test-live, test-account) hit the real site or mutate the real cart. Do not suggest removing an #[ignore], and treat a PR that does as a request needing explicit sign-off, not a routine change.

Read the full file on GitHub · 61 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 61 lines · 903 tokens per session scan A 56b9cdfc9194

Subscribe to this mod's changes

k-ruoka-mcp copilot-instructions.md is an instructions file published in the GitHub repository nikosavola/k-ruoka-mcp (1 stars, last pushed 27d ago), licensed Apache-2.0. It adds 903 tokens to every session, about $0.0045 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories