RepoRefit / Developer tools
Rule reference
Each finding names a rule ID. This page explains what the rule checks, why it matters and how to fix it.
MD-001 Heading structure
Tool: Markdown Checker
- What is checked
- Finds skipped heading levels and empty headings in each Markdown file. Front matter and code blocks are ignored.
- Why it matters
- Skipped heading levels (an h1 followed by an h3) break the outline that readers, screen readers and AI tools use to navigate a document.
- How to fix
- Lower the heading by one level at a time, or add the missing parent heading.
MD-003 Relative links and anchors in Markdown
Tool: Markdown Checker
- What is checked
- Checks relative file targets of Markdown links, images and link reference definitions, and #anchors that point to Markdown headings. Raw HTML links are not checked yet. Links inside code blocks and inline code are ignored.
- Why it matters
- A relative link to a file or anchor that does not exist sends readers and coding assistants to nothing, and they may guess instead.
- How to fix
- Correct the path or anchor, or remove the link. External links are not fetched, so only local targets are checked.
MD-002 Exact duplicate paragraphs
Tool: Token Checker
- What is checked
- Finds paragraphs (and list-item paragraphs) of 40+ characters that are identical after collapsing whitespace. Case, numbers, negations and paths stay significant. Code blocks are not compared.
- Why it matters
- The same paragraph in two instruction files is read twice by the assistant: it costs tokens and the copies drift apart over time.
- How to fix
- Keep one copy where every tool reads it (for example the root file) and delete the repeat, or import the shared file once.
AI-001 AI instruction files
Tool: Token Checker · Agent Rules
- What is checked
- Finds AGENTS.md / AGENTS.override.md (Codex), CLAUDE.md / CLAUDE.local.md / .claude/rules (Claude Code) and GEMINI.md (Gemini CLI) in the project.
- Why it matters
- Instruction files are read by different tools in different scopes. A file that one tool never reads, or that an override hides, gives a false sense of control.
- How to fix
- Put rules in the file each tool actually reads for that folder, and remove or merge overrides you do not intend.
AI-002 Token estimate
Tool: Token Checker
- What is checked
- Estimates the size of every instruction file and of each active set. Estimate method rr-estimate-v1 (see the report), not a model tokenizer and not usage or cost.
- Why it matters
- Every instruction file in the active context is sent with each request. Large or repeated context uses tokens and dilutes the rules that matter.
- How to fix
- Shorten long files, move rarely needed detail into files that are loaded only when relevant, and remove repeats (see MD-002).
AI-003 Active instructions per working folder
Tool: Token Checker
- What is checked
- Lists the files each platform loads at start for a working folder, following the platform profile. Home-directory files, settings and on-demand loading are not visible.
- Why it matters
- Some context is loaded only under conditions (paths, folders or tool settings). Without knowing that, a rule may silently not apply.
- How to fix
- Check which files are conditional for your tool and folder, and keep must-follow rules in always-loaded files.
AI-004 Instruction imports
Tool: Token Checker · Agent Rules
- What is checked
- Checks "@path" imports in Claude Code and Gemini CLI instruction files (code spans and fenced code skipped): missing targets, cycles and depth limits.
- Why it matters
- An import that points to a missing file, or a loop of imports, leaves part of the instructions unread.
- How to fix
- Fix the import path or add the file, and break import loops so each file is included once.
SEC-001 Credential patterns
Tool: Secret Scanner
- What is checked
- Looks for well-known key and token formats in readable text files. Values are masked and never checked online.
- Why it matters
- Keys and tokens committed to a repository can be copied by anyone with read access, including from old commits and forks.
- How to fix
- Remove the value, load it from an environment variable or secret store, and rotate the key: deleting it from the file is not enough.
SEC-002 Sensitive files
Tool: Secret Scanner
- What is checked
- Lists files whose names usually hold secrets (.env, private keys, cloud credentials, registry tokens) and checks the root .gitignore. In a ZIP or folder, whether Git tracks them is unknown.
- Why it matters
- Files such as .env, private keys and credential files often hold secrets even when no known pattern is visible.
- How to fix
- Add them to .gitignore, remove them from the repository history if they were committed, and keep an example file without values.
DEP-001 Pinned dependency versions
Tool: Dependency Check
- What is checked
- Reads exact versions from npm package-lock.json, pnpm-lock.yaml and Python requirements*.txt on your device. Ranges, local paths and URLs are listed as excluded.
- Why it matters
- Knowing which packages and versions are pinned is the basis of any vulnerability or licence review.
- How to fix
- Commit the lockfile your package manager creates so every install resolves the same versions.
DEP-002 Known vulnerabilities (OSV)
Tool: Dependency Check
- What is checked
- Looks up only the packages you select on OSV (osv.dev), sending ecosystem, name and exact version.
- Why it matters
- Known vulnerabilities in pinned versions are a common way in. The lookup sends only package names and versions to OSV, and only after you agree.
- How to fix
- Upgrade to a fixed version shown in the advisory, or remove the package if it is unused.
MCP-001 MCP config structure
Tool: MCP Config Check
- What is checked
- Parses MCP client configs as data (Claude Code .mcp.json, Cursor, VS Code, Gemini CLI, Claude Desktop, Codex config.toml) and checks required fields and types. No server is started.
- Why it matters
- An MCP server entry that cannot be parsed or has no command or URL fails at start-up, and the assistant quietly loses that tool.
- How to fix
- Fix the JSON or TOML syntax and give every server a command or a URL.
MCP-002 Risky MCP settings
Tool: MCP Config Check
- What is checked
- Flags inline secrets, shell pipelines, privileged commands, unpinned auto-installed packages and plain-HTTP remote URLs.
- Why it matters
- MCP servers run with your permissions. Inline tokens, downloads piped into a shell, unpinned packages and plain HTTP endpoints widen what can go wrong.
- How to fix
- Reference secrets through environment variables, pin package versions, use HTTPS and avoid piping downloads into a shell.
AGT-001 Skill files (SKILL.md)
Tool: Agent Rules
- What is checked
- Checks SKILL.md front matter: name and description present, name in lowercase-hyphen form (max 64) matching its folder, description up to 1024 characters, non-empty body.
- Why it matters
- Agent Skills are found by their front matter. A missing name or description, or a name that does not match the folder, makes the skill hard to find or unused.
- How to fix
- Add name and description in the front matter, use lowercase words joined by hyphens, and match the folder name.
AGT-002 Conflicting conventions
Tool: Agent Rules
- What is checked
- Compares instruction files for clearly worded package-manager (npm, pnpm, yarn, bun) and indentation (spaces, tabs) rules. Results are candidates for review.
- Why it matters
- When two instruction files ask for different package managers or indentation, the assistant has to guess which one wins.
- How to fix
- Choose one convention, state it in one shared file and remove the conflicting line.
DUP-001 Duplicated code blocks
Tool: Code Duplicates
- What is checked
- Compares source files (JS/TS, Python, Go, Rust, Java, Kotlin, C#, PHP, Ruby, Swift) line by line after trimming; blank lines, comments and bracket-only lines are skipped. A block is 6 or more meaningful lines.
- Why it matters
- Copied blocks of code have to be fixed in every copy; missing one is a common source of bugs.
- How to fix
- Move the shared lines into a function or module and call it from each place.
ARC-001 Import cycles
Tool: Architecture Check
- What is checked
- Reads static imports (import/export from, side-effect import, require) in JS/TS/Vue/Svelte files. Type-only and dynamic imports are ignored; package names and path aliases are not resolved.
- Why it matters
- Modules that import each other in a loop can load half-initialised values and make the code hard to split or test.
- How to fix
- Move the shared part into a separate module both can import, or reverse one of the imports.
ARC-002 Broken relative imports
Tool: Architecture Check
- What is checked
- Resolves relative imports (./, ../) against the project's file list, trying the usual extensions and index files.
- Why it matters
- A relative import that matches no file fails at build or run time, often only on a clean checkout.
- How to fix
- Correct the path or add the missing file. Files generated during the build can be ignored.
OPS-001 CI and reproducible installs
Tool: Deploy Readiness
- What is checked
- Looks for CI configuration (GitHub Actions, GitLab CI, CircleCI, Azure Pipelines, Jenkins, Bitbucket, Travis, Buildkite, Cloud Build) and a lockfile next to the root package.json.
- Why it matters
- Without CI, nobody checks that the project still installs and builds on a clean machine; without a lockfile, installs can differ.
- How to fix
- Add a CI workflow that installs, builds and tests on every pull request, and commit the lockfile.
OPS-002 Tests
Tool: Deploy Readiness
- What is checked
- Checks for a "test" script in package.json (the npm placeholder does not count) and for test files (*.test.*, *.spec.*, test_*.py, *_test.go, tests/ or __tests__/ folders).
- Why it matters
- With no test command or test files, neither people nor coding assistants can confirm a change is safe.
- How to fix
- Add a real "test" script and tests for the main flows.
OPS-003 Dockerfile settings
Tool: Deploy Readiness
- What is checked
- Reads each Dockerfile: base images pinned to a tag or digest, a non-root USER in the final stage, no ADD of remote URLs, and a .dockerignore.
- Why it matters
- Unpinned base images change under you, containers running as root widen the impact of a bug, and missing .dockerignore files copy secrets into images.
- How to fix
- Pin base images to a tag or digest, switch to a non-root USER, avoid ADD with URLs and add a .dockerignore.