steering-principles — Claude Code rule: what it does, how to install
steering-principles defines standards for project memory files, capturing architecture patterns without cluttering context with exhaustive file catalogs.
MIT ★ 3,774 updated 2026-10-22
.claude/rules/steering-principles.mdWhat steering-principles does
This rule treats steering documents as project memory rather than full specifications. If new code follows established patterns, steering files should remain untouched. The instructions focus on organizational conventions and import strategies while forbidding component-by-component listings.
The framework covers product.md, tech.md, structure.md, and custom topics. Sensitive data like database URLs, credentials, or internal IPs must stay out. Each document targets a single domain and typically stays within 100-200 lines.
Updates are additive by default. Agents must preserve existing user sections, add an updated_at timestamp, and explain why changes occurred. Tooling directories like .cursor/ or .claude/ are explicitly excluded from project memory.
What it helps with
- Keep context memory files within maintainable 100-200 line limits
- Record architectural standards without enumerating every file in the tree
- Prevent credentials and internal IP addresses from leaking into context files
- Preserve custom user sections when automated updates touch documentation
Example prompts for the agent
- Create a structure.md file following steering-principles standards
- Review tech.md and remove detailed lists of every single dependency
- Update product.md additively, keeping custom notes and adding updated_at
How to install steering-principles
Manually: put the files in place
.claude/rules/steering-principles.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/steering-principles.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/steering-principles.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/steering-principles.mdManually: put the files in place
.clinerules/steering-principles.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about steering-principles
How do I install steering-principles in Claude Code?
Place the instructions into .claude/rules/steering-principles.md inside your repository.
What does steering-principles do?
It enforces guidelines for memory files so agents focus on high-level patterns instead of granular component lists.
What information is prohibited in steering files?
Do not include passwords, API keys, internal IP addresses, complete file trees, or details of agent folders like .claude/.
Source text
steering-principles.md · MIT
# Steering Principles Steering files are **project memory**, not exhaustive specifications. --- ## Content Granularity ### Golden Rule > "If new code follows existing patterns, steering shouldn't need updating." ### ✅ Document - Organizational patterns (feature-first, layered) - Naming conventions (PascalCase rules) - Import strategies (absolute vs relative) - Architectural decisions (state management) - Technology standards (key frameworks) ### ❌ Avoid - Complete file listings - Every component description - All dependencies - Implementation details - Agent-specific tooling directories (e.g. `.cursor/`, `.gemini/`, `.claude/`) - Detailed documentation of `.kiro/` metadata directories (settings, automation) ### Example Comparison **Bad** (Specification-like): ```markdown - /components/Button.tsx - Primary button with variants - /components/Input.tsx - Text input with validation - /components/Modal.tsx - Modal dialog ... (50+ files) ``` **Good** (Project Memory): ```markdown ## UI Components (`/components/ui/`) Reusable, design-system aligned primitives - Named by function (Button, Input, Modal) - Export component + TypeScript interface - No business logic ``` --- ## Security Never include: - API keys, passwords, credentials - Database URLs, internal IPs - Secrets or sensitive data --- ## Quality Standards - **Single domain**: One topic per file - **Concrete examples**: Show patterns with code - **Explain rationale**: Why decisions were made - **Maintainable size**: 100-200 lines typical --- ## Preservation (when updating) - Preserve user sections and custom examples - Additive by default (add, don't replace) - Add `updated_at` timestamp - Note why changes were made --- ## Notes - Templates are starting points, customize as needed - Follow same granularity principles as core steering - All steering files loaded as project memory - Light references to `.kiro/specs/` and `.kiro/steering/` are acceptable; avoid other `.kiro/` directories - Custom files equally important as core files --- ## File-Specific Focus - **product.md**: Purpose, value, business context (not exhaustive features) - **tech.md**: Key frameworks, standards, conventions (not all dependencies) - **structure.md**: Organization patterns, naming rules (not directory trees) - **Custom files**: Specialized patterns (API, testing, security, etc.)
© gotalab · MIT · gotalab/cc-sdd