Skip to main content
rule CX Codex

param-source-guard.en — Claude Code rule: what it does, how to install

The param-source-guard.en rule for Claude Code requires every new numeric parameter in code to include a source comment. It tracks limits, thresholds, and windows to ensure they trace back to user input, specs, or measurements.

Apache-2.0 ★ 262 updated 2026-11-17

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/param-source-guard.en.md
Open on GitHub

What param-source-guard.en does

Every new name = number assignment in code needs a comment on the current or previous line explaining itsorigin. Valid markers include words like source, 来源, 实测, 数据, 用户, SPEC, and 沿用 to indicate measurements, user words, specs, or existing settings. Parameters lacking a source are either removed or require asking the user. The check ignores zeros, ones, negative ones, timeouts, ports, and test files.

The rule file is placed at .claude/rules/param-source-guard.en.md for Claude Code, with support for Cursor, GitHub Copilot, Windsurf, and Cline.

What it helps with

  • require a source comment for every new numeric parameter
  • flag limits and thresholds without a valid origin
  • remove or question parameters lacking a source marker
  • skip checks for ports, timeouts, and test files

Example prompts for the agent

  • Add a limit and include a source comment for it
  • Check if this new numeric threshold has a source comment
  • Document where this window size comes from in a comment

How to install param-source-guard.en

Manually: put the files in place

.claude/rules/param-source-guard.en.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about param-source-guard.en

How to install param-source-guard.en in Claude Code?

Place the rule file at .claude/rules/param-source-guard.en.md.

What does param-source-guard.en do?

It enforces source comments for all new numeric parameters in code while exempting ports, timeouts, and test files.

Which markers does the rule recognize?

It detects source markers including source, 来源, 实测, 数据, 用户, SPEC, and 沿用.

Source text

param-source-guard.en.md · Apache-2.0
- Numbers need a source (param-source-guard): every new `name = number` in code (limits, thresholds, windows, …) gets a comment on the same or previous line saying where it comes from — the user's words, data or a measurement, a SPEC, or an existing setting it follows (the words 来源/source/实测/数据/用户/SPEC/沿用 mark it). No source means you made it up: leave the parameter out or ask the user. 0, 1, -1, timeouts, ports and test files are not checked.

© zuiho-kai · Apache-2.0 · zuiho-kai/bothouse

Similar IDE rules

All IDE rules for Agent setup: memory, context, orchestration →

From the same set14

The whole set →
watchvid.en watchvid.en is a Claude Code rule that processes video links through a script and an index of materials to read. It activates when the agent receives a video link. CX Codex +1 ★ 262repo stars dsh-cc-compat.en dsh-cc-compat.en is a Claude Code rule that keeps DSH role switches, tool names, and Stop conversion aligned across sessions. CX Codex +1 ★ 262repo stars codemap-inject.en codemap-inject.en is a Claude Code rule that injects codebase maps into subagent prompts matching map keywords. The subagent reads the map first and lists new symbols to append upon completion. CX Codex +1 ★ 262repo stars choice-ask-guard.en choice-ask-guard.en is a Claude Code rule that checks agent questions against decisions already made and leaves open choices to the user. CX Codex +1 ★ 262repo stars wiki-context.en wiki-context.en is a Claude Code rule that reads relevant wiki hints and lesson entries during a terminal session. CX Codex +1 ★ 262repo stars _head.en _head.en is a Claude Code rule that controls tool call validation through external hooks. It blocks unauthorized bypasses and lets users toggle safety checks on demand. CX Codex +1 ★ 262repo stars dispatch-review-guard.en dispatch-review-guard.en is a Claude Code rule that checks review markers before a task is dispatched to a subagent. CX Codex +1 ★ 262repo stars bash-guard.en The bash-guard.en rule for Claude Code restricts dangerous terminal commands and enforces background task timeouts. CX Codex +1 ★ 262repo stars

Project sponsors

Companies that keep this analytics open