Current Version: 1.5 Design: design/no-variable-guessing.design.md v1.5 Session: a9bec472-1706-4019-8cfd-5ba988a71662 Full history: changelog/no-variable-guessing.changelog.md
Core Principle: Do not guess local paths, values, symbols, configuration, or environment details; verify them from checked scope and report non-findings as scoped observations.
This rule owns local lookup mechanics, inspected-scope declaration discipline, project-specific non-guessing behavior, and local negative-result reporting.
A checked local path/value is not automatically the right reusable default for shared artifacts.
Required guidance:
- keep exact local values scoped to the checked local context
- do not let local observations silently become shared portable contracts
- defer broader portability and anti-hardcoding defaults to
portable-implementation-and-hardcoding-control.md
Use actual values from actual local sources before referring to them as known.
Required guidance:
- use
Readfor file contents - use
Globor other appropriate tools to verify file existence - use
Grepto verify project-specific references when needed - ask the user when the value cannot be verified from the checked scope
When reporting a local result, make the checked scope legible.
Required guidance:
- name the files, directories, or search scope when the result matters
- distinguish “I checked X” from broader claims about the whole project/environment
- keep local observations anchored to the inspected scope
A local non-finding is not proven absence.
Required guidance:
- say "not found in checked scope" when the search boundary matters
- avoid stronger wording like "does not exist" unless the checked scope is sufficient
- do not treat a limited local non-finding as proof that the user is wrong
Project-specific contradiction requires project-specific contrary evidence.
Required guidance:
- if a path, env var, or config key was not found, state what was checked
- if a stronger contradiction is needed, gather stronger evidence first
- do not guess default values or hidden config locations to fill the gap
| Reference Type | Required Action |
|---|---|
| File paths and symbols | verify paths before reference, read file contents before quoting values, and verify symbol/reference existence before presence/absence claims |
| Configuration values | read actual config sources directly; do not assume environment defaults when project-specific config is expected |
| Common local sources | .env*, package.json, tsconfig.json, config.yaml/json, Docker/Compose configs, project source files, and search results |
Treat references as verification-required when any trigger appears:
| Trigger | Typical Signal | Required Action |
|---|---|---|
| project-specific path/symbol | file path, import path, class/function name | verify existence with tools before reference |
| runtime/config value | env var, port, endpoint base URL, config key | read actual config source before use |
| cross-reference claim | "updated everywhere", "all references fixed" | verify affected locations before claiming completion |
| ambiguous source of truth | multiple candidate files or conflicting values | preserve uncertainty and ask/verify before proceeding |
| negative local claim | "there is no X", "X does not exist" | determine whether only scoped non-finding or strong absence is justified |
| git-state file classification | "untracked", "new file", "working tree is clean/dirty" | keep git state scoped as local evidence only and check governed repo surfaces before classifying file meaning |
Verification status labels:
- ✅ Verified
⚠️ Unverified- ❌ Not Found In Checked Scope
Preferred shapes:
- "I checked
backend/.envanddocker-compose.ymland found ..." - "I checked
src/config/**and did not findDATABASE_URLthere." - "I found both
config.jsonandconfig.yaml; I cannot yet tell which one is authoritative." - "I checked git working state and saw the file is untracked, but that is only a local observation; I still need to check governed repo surfaces before classifying what the file means."
Avoid:
- "The project uses X" when only one limited file was checked
- "That variable does not exist" when only a partial scope was searched
- "You are mistaken" when the only evidence is a limited local non-finding
File not found: I could not find that path in the checked scope. If you want, I can search a broader location or you can point me to the intended file.
Multiple possibilities: I found multiple candidate config files. I need either a broader check or your guidance on which one is authoritative.
Partial information: I found the route path, but not the base URL in the files checked so far.
| Metric | Target |
|---|---|
| Path and value verification | High |
| Inspected-scope clarity | High |
| Unsupported local absence claims | 0 critical cases |
| Guessing incidents | 0 critical cases |
| Local contradiction from scoped non-finding alone | 0 critical cases |
Related rules:
- evidence-grounded-burden-of-proof.md - owns burden-of-proof thresholds and the distinction between scoped non-finding and stronger absence
- zero-hallucination.md - owns verify-first factual discipline for technical claims
- accurate-communication.md - owns the communication shape for scoped evidence reporting
- anti-sycophancy.md - owns disagreement posture when local evidence conflicts with a claim
- document-consistency.md - keeps references and names aligned
- portable-implementation-and-hardcoding-control.md - owns portable shared defaults and anti-hardcoding discipline beyond local checked-scope lookup