Skip to content

Rules catalog

Sextant ships seven built-in rules covering size, complexity, duplication, and tests. They’re embedded in the binary and load automatically — no .sextant/rules/ entries required.

Rule idSeverityLanguagesSummary
builtin.size.file-lengthwarnallFile exceeds line-count thresholds.
builtin.size.fn-lengthwarnrust, python, go, java, ts/tsx/jsFunction body too long.
builtin.size.param-countwarnrust, python, go, java, ts/tsx/jsToo many parameters on one function.
builtin.complexity.cyclomaticwarnrust, python, go, java, ts/tsx/jsToo many independent control-flow paths.
builtin.complexity.nestingwarnrust, python, go, java, ts/tsx/jsDeeply nested control structures.
builtin.duplication.tokenswarnrust, python, go, java, ts/tsx/jsRepeated structurally-identical code.
builtin.tests.pub-fn-untestedinforust, ts/tsx/jsPublic function or exported declaration never mentioned in a test, in-file or in a conventional peer test file.

All seven are file-scope, so they fire in both diff and whole-file mode (with diff-mode filtering findings to changed lines). Tune their thresholds in .sextant/config.toml.

Authoring rules covers the full schema for .sextant/rules/<name>.md files — regex, ast, and llm evaluators, frontmatter fields, validation flow.

For curated rule sets shipped by another team (or another repo of yours), see Rule packs. Packs are hash-locked, agent-resistant bundles installed via sextant rules add github:owner/repo@tag. The first shipped pack is the TypeScript pack.