Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
423 changes: 85 additions & 338 deletions README.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions website/src/content/docs/docs/cli/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ Commands:

Run `fensu <command> --help` for command-specific options.

## Execution model

Core-only `check`, `dupes`, `init`, `rule`, `map`, `skills`, and `--version`
execution is native. Configured Python custom rules launch one compatible Python
host only for the policy metadata or callbacks they require. The native executable
remains the command owner; Python hosting is not a second CLI implementation.

## Version

Both help forms exit `0`:
Expand Down
19 changes: 15 additions & 4 deletions website/src/content/docs/docs/concepts/analyzers/rust.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ domains begin below additional structural grouping directories.

## What it checks

The `rust` pack exposes all 117 implemented rules under `FPRS`. The rules cover:
The `rust` pack exposes all implemented rules under `FPRS`. The rules cover:

- Cargo workspace and dependency policy;
- module ownership, visibility, layout, and import boundaries;
Expand All @@ -62,9 +62,20 @@ warn = []
ignore = ["FPRSH001"]
```

Exact file exceptions and path-scoped ignores work as they do for other analyzers.
Rust exceptions name a Rust source file or `Cargo.toml`; they do not use Python
definition selectors. Inspect any rule and its effective settings with:
Exact file exceptions and path-scoped ignores use the normal configuration keys.
Rust exceptions name an exact `.rs` file or `Cargo.toml`. An exception without
`symbols` covers the file, including findings owned by items; `Cargo.toml`
exceptions must always be file-level.

To narrow a Rust exception, use syntactic item paths within the source file:
`parse`, `Record`, `Record::load`, or `inner::parse`, not Python-style dotted
definition selectors. Modules and macro-generated items are not addressable;
missing or ambiguous names are configuration errors. Each listed symbol must
suppress a fault or the exception is stale. The
[repository guide](https://github.com/sqlstack-io/fensu/blob/main/docs/rust.md#symbol-scoped-exceptions)
details item spans, trait and implementation paths, and ambiguity restrictions.

Inspect any rule and its effective settings with:

```bash
fensu rule FPRSS010 --target rust
Expand Down
10 changes: 9 additions & 1 deletion website/src/content/docs/docs/concepts/architecture-model.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ accidental public surfaces.
## Domains: leaf or branch

Fensu's default layout for product code is **domains built from roles**, not a
flat top level.
flat top level. The default architecture follows SQLBuild Compiler Rules v0.101.1.

- An ownership root (by default the package root, for example
`src/my_package/`) holds only its package protocol modules, deliberate public
Expand All @@ -140,6 +140,14 @@ parts. There is no mandatory subdomain level and no conventional `core/`
ceremony. Loose non-role modules directly at the domain level fault too
(`FFR307`).

Every leaf domain or subdomain requires a direct `main/` boundary containing at
least one meaningful entry module. Branch-domain parents do not need their own
`main/`; their leaf subdomains do. An empty or initializer-only `main/` is not a
substitute for behavior. Move passive-only models, types, constants, exceptions,
or classes into the closest domain whose `main/` behavior owns and uses them.
Fixed role files are siblings of `_helpers/`, not descendants such as
`_helpers/entry/models.py`.

```text
src/my_package/
├── __init__.py # public re-export surface only
Expand Down
14 changes: 9 additions & 5 deletions website/src/content/docs/docs/concepts/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ symbols = ["ProgressCollector.update"]
reason = "The external API invokes this callback positionally."
```

Omit `symbols` only for an ownerless file-level finding:
Omit `symbols` to accept matching-rule findings throughout the exact file:

```toml
[[rule_exceptions]]
Expand All @@ -348,14 +348,18 @@ path = "src/my_package/integrations/compatibility.py"
reason = "This file remains a direct module while the external integration is supported."
```

Omitting `symbols` does not suppress findings owned by functions in that file. If
`symbols` is present, it must be non-empty; `symbols = []` is rejected rather than
silently broadening the exception to file scope.
This file-level form also suppresses matching findings owned by functions or
items in that file, for every analyzer. Include `symbols` when only particular
owners should be exempt. If present, it must be non-empty; `symbols = []` is
rejected rather than silently broadening the exception to file scope.

The rule, repository-relative analyzer source file, and any qualified symbols are exact:
globs, directories, line numbers, and rule prefixes are not accepted. The path and
symbols must exist, and `fensu check` fails if either form becomes stale and
suppresses no fault.
suppresses no fault. Each listed symbol must suppress a fault; missing or ambiguous
symbols are configuration errors. Rust uses item paths such as `Record::load`;
`Cargo.toml` exceptions cannot name symbols. See
[Rust exception selectors](/concepts/analyzers/rust#what-it-checks).

## Path-scoped rule ignores

Expand Down
17 changes: 17 additions & 0 deletions website/src/content/docs/docs/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ fensu --version

Fensu needs Python 3.12 or newer.

The `fensu` distribution provides the Python authoring/API surface and installs the
lockstep `fensu-cli` binary distribution, which owns the `fensu` command. Use that
executable for built-in commands; `python -m fensu` is retired. See the
[CLI execution model](/cli#execution-model) for native commands and custom-rule hosting.

Fensu includes a compiled analysis core. Prebuilt wheels cover Linux (x86_64 and
aarch64), macOS (Intel and Apple silicon), and Windows (x86_64). Where no compatible
wheel is available, `pip` builds from source; this requires Rust 1.95 or newer,
including when installing `fensu-cli` from its source distribution.

## 2. Initialize

[`fensu init`](/cli/init) is the fastest way to start. It detects your layout,
Expand All @@ -39,6 +49,13 @@ run `fensu init --yes --name my_package`; init scaffolds a `src/` package and
`tests/` directory. Pass `--no-skills` only when automation explicitly needs
configuration without repository-local agent guidance.

Existing configuration is preserved: `init` changes nothing when `fensu.toml`
already exists. Use [`fensu skills`](/cli/skills) to install or refresh guidance
for a configured project. See [`fensu init`](/cli/init) for detection and setup
options, or the [Rust](/concepts/analyzers/rust) and
[TypeScript/SvelteKit](/concepts/analyzers/typescript-sveltekit) guides for
language-specific configuration.

Verify that every generated local skill is present and current before calling
onboarding complete:

Expand Down
5 changes: 5 additions & 0 deletions website/src/content/docs/docs/reference/rule-context.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ and configuration. Legacy Python callbacks may ignore the context and walk their
Backend-neutral semantic facts for the current file, computed once and shared by all
rules through a single traversal.

The semantic fact contracts and author-facing models are public Python APIs;
production fact extraction is owned by the native Rust implementation. Raw Python
AST, syntax, and relation artifacts remain lazy CPython capabilities, materialized
only when a custom rule needs those surfaces.

| Call | Returns | Purpose |
| --- | --- | --- |
| `annotations()` | `AnnotationFacts` | Missing parameter, return, local, and variable annotations. |
Expand Down
Loading