07-env-example

A project rule for keeping `.env.example`—a sample environment-variable file—in sync with the settings the code actually reads. It also separates basic operator settings from advanced ones and protects the operator's private `.env` file.

In plain words
What is it for?
Use it when changing environment variables, configuration defaults, UI-exposed settings, or deprecated options, and when checking that the sample file documents the current setup.
Why use it?
Configuration examples become misleading when variables are added, renamed, or given new defaults. This rule keeps setup documentation and tests aligned without changing local secrets.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/marcoporcellato/matryca-plumber/07-env-example
Clone the repo
git clone --depth 1 https://github.com/MarcoPorcellato/matryca-plumber

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 821 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00821
Opus 5 $0.00000 $0.00411
Sonnet 5 $0.00000 $0.00164
Haiku 4.5 $0.00000 $0.00082

Measured 3d ago against content hash d11f258d62e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

07-env-example 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 3d 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.

.cursor/rules/07-env-example.mdc · 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.

.env.example maintenance (mandatory)

When you add, rename, or change the default of any environment variable read from os.environ / load_plumber_lint_config_from_environ / UI _ENV_KEY_MAP, update .env.example in the same task — without waiting for the user to ask.

When to update

Trigger Action
New os.environ.get("MATRYCA_…"), _env_int, _map_bool(env, …), or _*_ENV = "…" in src/ Add key to .env.example in the correct tier
Changed Python default (e.g. DEFAULT_*, _map_* fallback, dataclass default) Update Default (code) comment; adjust Template only if the safe install profile should change
New Settings field → _ENV_KEY_MAP in ui_server.py Document under Operator essentials (UI-exposed keys)
Variable becomes deprecated or reserved (not read) Move to deprecated block; add to tests/test_env_example_coverage.py _ALLOWLIST_UNREAD if still listed

Do not edit the operator's local .env unless they explicitly ask.

File structure (two tiers)

[Header + legend]
=== OPERATOR ESSENTIALS ===     ← paths, LLM, thermal, map-reduce, low-priority, basic UI token
=== ADVANCED / HIGH IMPACT ===  ← explicit WARNING banner; mutating lint, compression, MCP, flock, limits, edge
  • Operator essentials: settings mirrored in the Sovereign UI or needed on day one (LOGSEQ_GRAPH_PATH, LLM URL/model, thermal, map-reduce, MATRYCA_PLUMBER_LOW_PRIORITY_MODE, MATRYCA_UI_TOKEN / LAN basics).
  • Advanced / high impact: mutating graph behavior, security surface expansion, diagnostics that leak data, or tuning that can corrupt prompts/cache — prefix section with a clear do not change unless you understand the risk banner.

Per-key comment block (required)

# <What it does — one sentence>. <src/module.py>
# Default (code): <value when unset/empty in Python>
# Template: <value on the line below for new installs; omit line if same as Default (code)>
# Range / notes: <clamps, security, when to enable>  (optional)
KEY=value

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. 3d ago First seen · 61 lines · 0 tokens per session scan A d11f258d62e3

Subscribe to this mod's changes

07-env-example is a cursor rule published in the GitHub repository MarcoPorcellato/matryca-plumber (96 stars, last pushed 3d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 821 tokens. 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-30.