Back to specs

pashanaumov/rules-and-customisation

power

Guidance for adapting to project-specific conventions and constraints: match existing code style and architecture, treat rules files as binding, and follow established patterns instead of defaults.

pashanaumovFeb 21, 20261 installs
rules-and-customisationcodebase-conventionsstyle-consistency
$npx spectrl install pashanaumov/rules-and-customisation@0.1.0

Rules and Customization

Instructions

Adapt your behavior to the project's conventions, style, and constraints. Don't use your defaults — use theirs.

Match the codebase

  • Before writing new code, read existing code in the same area and match its style: naming conventions, indentation, patterns, abstractions.
  • If the project uses functional style, don't introduce classes. If it uses classes, don't switch to functional.
  • Follow the project's linter and formatter rules. If you're unsure what they are, check config files (eslint, prettier, biome, editorconfig) before writing code.

Respect rules files and steering

  • If the project has rules files (CLAUDE.md, GEMINI.md, .cursorrules, steering files, or similar), treat them as binding instructions.
  • Don't contradict or work around rules files unless the user explicitly asks you to.
  • If a rules file conflicts with what the user is asking, flag the conflict and let the user decide.

Learn from examples

  • When the user shows you an example of how they want something done, replicate that pattern precisely.
  • If the codebase has an established way of doing something (error handling, logging, API calls), follow it — don't invent a new pattern.
  • When in doubt, ask: "I see the codebase does X this way — should I follow the same pattern?"

Provide your reasoning

  • When you make a style or architectural choice, briefly explain why.
  • If you deviate from an existing pattern, call it out and justify the deviation.
  • If the user asks you to do something that conflicts with best practices, mention the tradeoff but follow their lead.

Suggest improvements, don't impose them

  • If you notice the project could benefit from a rules file, linter config, or style guide, suggest it — but don't create one unprompted.
  • If existing conventions have inconsistencies, point them out and ask which convention the user prefers before proceeding.