docs: introduce progressive documentation path
This commit is contained in:
parent
6aad159fe8
commit
bff852ab4b
|
|
@ -14,6 +14,9 @@ All notable changes to John Slop are recorded here. The format follows
|
|||
rules plus the complete embedded replacement-character set.
|
||||
- Documented Cargo's required `--path .` syntax when installing all binaries
|
||||
from a local source checkout.
|
||||
- Restructured the README and documentation index as a progressive path from
|
||||
quickstart to usage guides, with engineering detail in a dedicated advanced
|
||||
guide.
|
||||
- Adopted the measured three-package Cargo workspace. Shared package metadata,
|
||||
dependency requirements, and lint policy now use workspace inheritance while
|
||||
the reusable core remains isolated from CLI, async, and LSP dependencies.
|
||||
|
|
|
|||
148
README.md
148
README.md
|
|
@ -4,120 +4,98 @@
|
|||

|
||||

|
||||
|
||||
John Slop is an early-stage, local-first linter for concrete signs of low-effort
|
||||
or insufficiently reviewed text and source code. It reports explainable
|
||||
heuristics for human review; it does not prove AI authorship or identify a
|
||||
model.
|
||||
John Slop is a local-first linter for concrete signs of low-effort or
|
||||
insufficiently reviewed text and source code. It reports explainable evidence
|
||||
for human review; it does not prove AI authorship or identify a model.
|
||||
|
||||
Today, the detector reads UTF-8 files, directories, ZIP archives, and common
|
||||
ZIP-based office documents. Eleven conservative, configurable rules cover
|
||||
copied assistant scaffolding, generic style residue, source-code placeholders,
|
||||
tutorial narration, and configured non-ASCII characters. Rules retain exact
|
||||
source spans, apply path/content scopes, and feed a bounded, explainable
|
||||
low-care evidence score. The detector renders plain or graphical Miette diagnostics,
|
||||
concise records, or versioned JSON Lines. The formatter applies only configured
|
||||
Unicode-to-ASCII replacements, supports check/diff modes, and requires explicit
|
||||
opt-in for atomic file writes. The stdio LSP publishes those same replacement
|
||||
findings and versioned quick fixes in editors without writing files.
|
||||
## Quickstart
|
||||
|
||||
## Install and quick start
|
||||
|
||||
Rust 1.98.1 or newer is required.
|
||||
|
||||
Install directly from the upstream Git repository:
|
||||
Rust 1.98.1 or newer is required. Install from the upstream Git repository:
|
||||
|
||||
```sh
|
||||
cargo install --git https://git.dandaedre.com/idle-org/john_slop \
|
||||
--locked --all-features
|
||||
```
|
||||
|
||||
When you already have a local checkout, Cargo requires its path explicitly:
|
||||
Or install a checkout from its repository root:
|
||||
|
||||
```sh
|
||||
cargo install --path . --locked --all-features
|
||||
```
|
||||
|
||||
For development without installing, run the binaries through Cargo:
|
||||
Scan a document or source directory:
|
||||
|
||||
```sh
|
||||
cargo run --bin john-slop -- path/to/document path/to/source-directory
|
||||
cargo run --bin john-slop-fmt -- path/to/document
|
||||
cargo run --bin john-slop-fmt -- --check path/to/document
|
||||
cargo run --bin john-slop-lsp
|
||||
john-slop path/to/document path/to/source-directory
|
||||
```
|
||||
|
||||
Use `--fail-score 0..100` to make the detector exit with status `1` when a
|
||||
document reaches a chosen evidence threshold. The score measures configured
|
||||
signals, not the probability that AI wrote the content. The former
|
||||
`--fail-confidence` spelling remains an alias for migration.
|
||||
Diagnostics are colored Miette reports by default. Make the command fail when a
|
||||
document reaches a chosen low-care evidence score with `--fail-score 0..100`:
|
||||
|
||||
Formatter file mode prints transformed text without modifying the source. Use
|
||||
`--write` explicitly for atomic in-place replacement, or pipe editor buffers
|
||||
through `john-slop-fmt` over stdin/stdout.
|
||||
```sh
|
||||
john-slop --fail-score 40 path/to/document
|
||||
```
|
||||
|
||||
The detector defaults to colored graphical Miette diagnostics. Select
|
||||
`--output human`, `--output concise`, or `--output json` for uncolored plain or
|
||||
machine-readable output.
|
||||
Preview configured Unicode-to-ASCII replacements, or check them in automation:
|
||||
|
||||
Editors start `john-slop-lsp` over stdio. It tracks open snapshots with full
|
||||
document synchronization, reports configured ASCII replacements, and offers
|
||||
quick fixes whose result matches the formatter. See the editor guide for Helix
|
||||
and Vim setup.
|
||||
```sh
|
||||
john-slop-fmt path/to/document
|
||||
john-slop-fmt --check path/to/document
|
||||
```
|
||||
|
||||
## What it reports
|
||||
Formatting is read-only unless `--write` is explicit. Start the editor server
|
||||
with `john-slop-lsp`; the [editor guide](docs/editors.md) has ready-to-use Helix
|
||||
and Vim configuration.
|
||||
|
||||
John Slop looks for configured, reviewable evidence such as copied assistant
|
||||
scaffolding, knowledge-cutoff disclaimers, stock filler, unfinished source-code
|
||||
placeholders, tutorial narration, and Unicode punctuation covered by the ASCII
|
||||
replacement catalog. Every result includes the matching source span, rule ID,
|
||||
severity, message, and remediation help.
|
||||
## Overview
|
||||
|
||||
The low-care evidence score aggregates those configured signals. It is not an
|
||||
AI-authorship probability, and a clean result does not prove human authorship or
|
||||
good quality. Legitimate transcripts, tutorials, multilingual text, and
|
||||
typographic punctuation can match. Review the source context before acting.
|
||||
John Slop provides three binaries backed by the same configuration and source
|
||||
spans:
|
||||
|
||||
## Configuration and operation
|
||||
- `john-slop` detects copied assistant scaffolding, generic style residue,
|
||||
source placeholders, tutorial narration, and configured non-ASCII characters.
|
||||
- `john-slop-fmt` previews, checks, or explicitly applies safe configured ASCII
|
||||
replacements.
|
||||
- `john-slop-lsp` publishes replacement diagnostics and quick fixes over stdio
|
||||
without writing editor-owned files.
|
||||
|
||||
Configuration precedence is embedded defaults, platform user `config.toml`, an
|
||||
optional named `<name>.toml`, explicit `--config`, then CLI flags. Replacement
|
||||
and heuristic tables merge by stable ID. Commented [base and named sample
|
||||
configs](examples/config/) demonstrate disabling entries and overriding rules.
|
||||
The detector accepts UTF-8 files, directories, ZIP archives, and common
|
||||
ZIP-based office documents. Each finding includes its source span, stable rule
|
||||
ID, severity, message, and remediation help. A bounded evidence score aggregates
|
||||
configured signals; it is not the probability that AI wrote the content.
|
||||
|
||||
The detector accepts files, directories, stdin, ZIPs, and ZIP-based office
|
||||
documents. Its stable exit statuses are `0` below the selected threshold, `1`
|
||||
at or above it, and `2` for usage, configuration, or input failure. The
|
||||
formatter is read-only unless `--write` is explicit; the LSP never writes files.
|
||||
Analysis is local and deterministic, with no network requests or telemetry.
|
||||
False positives remain possible—especially in transcripts, tutorials,
|
||||
multilingual text, and intentional typography—so findings are prompts for
|
||||
review, not verdicts.
|
||||
|
||||
Analysis is local, deterministic, and makes no network request or telemetry
|
||||
submission. Input text appears only in process memory and requested output.
|
||||
Archive limits, strict UTF-8 handling, and non-followed symlinks constrain
|
||||
untrusted inputs, but John Slop is not a sandbox or malware scanner.
|
||||
## Learn progressively
|
||||
|
||||
## Documentation
|
||||
Start with the guide closest to what you want to do:
|
||||
|
||||
- [Runnable Rust examples](examples/README.md)
|
||||
- [Expected-failure Miette diagnostic showcase](examples/README.md#expected-failure-diagnostic-showcase)
|
||||
- [Documentation index](docs/README.md)
|
||||
- [Command-line usage and current capabilities](docs/usage.md)
|
||||
- [Helix and Vim formatter/LSP setup](docs/editors.md)
|
||||
- [Human, Miette, concise, and JSON output contracts](docs/output.md)
|
||||
- [Architecture and public library API](docs/architecture.md)
|
||||
- [Layered configuration](docs/configuration.md)
|
||||
- [Commented base and named configuration examples](examples/config/)
|
||||
- [Heuristics, evidence scoring, and applicability](docs/heuristics.md)
|
||||
- [Evaluation corpus and current metrics](docs/evaluation.md)
|
||||
- [Limitations and responsible interpretation](docs/limitations.md)
|
||||
- [Development, tests, features, and coverage](docs/development.md)
|
||||
- [Performance benchmarks](docs/benchmarks.md)
|
||||
- [Dependency and binary review](docs/dependencies.md)
|
||||
- [Design decision records](docs/decisions/)
|
||||
- [Contributing](CONTRIBUTING.md), [security](SECURITY.md), and
|
||||
[release procedure](docs/releasing.md)
|
||||
- [Background reading](docs/background.md)
|
||||
- [Ambiguous and invisible Unicode data sources](docs/unicode-confusables.md)
|
||||
1. [Use the CLI and understand exit statuses](docs/usage.md).
|
||||
2. [Read or integrate the available output formats](docs/output.md).
|
||||
3. [Configure rules, replacements, and layered overrides](docs/configuration.md),
|
||||
with [commented configuration examples](examples/config/).
|
||||
4. [Run the Rust and expected-failure examples](examples/README.md).
|
||||
5. [Connect the formatter and LSP to Helix or Vim](docs/editors.md).
|
||||
6. [Understand the heuristics and evidence score](docs/heuristics.md), then
|
||||
review the [interpretation limits](docs/limitations.md).
|
||||
|
||||
The ordered implementation plan lives in [tasks.md](tasks.md), and contribution
|
||||
rules live in [AGENTS.md](AGENTS.md).
|
||||
The [documentation index](docs/README.md) offers the same guided path with a
|
||||
little more context.
|
||||
|
||||
## Advanced topics
|
||||
|
||||
Architecture, the public library API, evaluation results, performance,
|
||||
dependency policy, design decisions, Unicode research, development, and release
|
||||
engineering are collected in the [advanced guide](docs/advanced.md).
|
||||
|
||||
## Project
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md) to work on the project and
|
||||
[SECURITY.md](SECURITY.md) to report a vulnerability. The ordered implementation
|
||||
plan lives in [tasks.md](tasks.md), and agent contribution rules live in
|
||||
[AGENTS.md](AGENTS.md).
|
||||
|
||||
John Slop is distributed under the [MIT license](LICENSE).
|
||||
|
|
|
|||
|
|
@ -1,50 +1,37 @@
|
|||
# John Slop documentation
|
||||
|
||||
The root [README](../README.md) is the short project overview. These guides hold
|
||||
the details needed to use, embed, and develop John Slop:
|
||||
The root [README](../README.md) gets you from installation to a first scan. Move
|
||||
through these guides as your needs grow; you do not need to understand the
|
||||
internals to use the tools.
|
||||
|
||||
- [Runnable Rust examples](../examples/README.md) demonstrate in-memory
|
||||
analysis, streaming path input, and shared replacement planning.
|
||||
- [Usage](usage.md) documents accepted inputs, detector output, exit statuses,
|
||||
formatter modes, and the LSP protocol contract.
|
||||
- [Editor setup](editors.md) provides working Helix (`hx`) and Vim formatter/LSP
|
||||
configuration and validation steps.
|
||||
- [Output contracts](output.md) specifies human and concise presentation plus
|
||||
the versioned JSON Lines schema and partial-error records.
|
||||
- [Architecture](architecture.md) describes module boundaries, shared domain
|
||||
values, input safety, and the reusable library facade.
|
||||
- [LSP framework and protocol decision](decisions/0003-lsp-framework-and-protocol.md)
|
||||
records the selected server crate, stable protocol scope, and synchronization
|
||||
assumptions.
|
||||
- [Configuration](configuration.md) documents schema version 1, source
|
||||
precedence, stable-ID merges, validation, and inspection commands.
|
||||
- [Commented configuration examples](../examples/config/) provide user-wide and
|
||||
named partial overlays ready to copy.
|
||||
- [Heuristics and evidence scoring](heuristics.md) documents rule execution,
|
||||
applicability, evidence damping, normalization, and score interpretation.
|
||||
- [Evaluation corpus](evaluation.md) records fixture provenance, per-rule
|
||||
precision/recall, aggregate false positives, and benchmark caveats.
|
||||
- [Limitations](limitations.md) covers false positives, evasion, domain shift,
|
||||
score semantics, evaluation limits, and operational boundaries.
|
||||
- [Development](development.md) covers the supported Rust version, feature
|
||||
matrix, snapshots, coverage, badges, and CI quality gates.
|
||||
- [Performance benchmarks](benchmarks.md) defines scaling workloads and the
|
||||
evidence required before introducing parallelism.
|
||||
- [Dependency and binary review](dependencies.md) records feature choices,
|
||||
advisory/license policy, unsafe boundaries, and release-size measurements.
|
||||
- [Release procedure](releasing.md) defines tagged reproducible packaging,
|
||||
checksums, build provenance, and CycloneDX SBOM generation.
|
||||
- [Background](background.md) collects external context on observable signs of
|
||||
low-care AI-assisted writing.
|
||||
- [Ambiguous and invisible Unicode references](unicode-confusables.md) records
|
||||
Gitea's locale-aware catalog, its upstream, and safe adoption boundaries.
|
||||
- [Decision records](decisions/) preserve durable product and engineering
|
||||
choices, including evidence-score semantics and input limits.
|
||||
- [Crate-boundary experiment](experiments/crate-boundary.md) records the measured
|
||||
workspace split, original recommendation, and subsequent adoption decision.
|
||||
- [Workspace architecture decision](decisions/0004-supported-cargo-workspace.md)
|
||||
records the supported package boundaries, inheritance policy, and accepted
|
||||
release cost.
|
||||
## Start using it
|
||||
|
||||
Release-hardening contracts remain specified in [tasks.md](../tasks.md) and
|
||||
[AGENTS.md](../AGENTS.md) until that milestone lands.
|
||||
1. [Usage](usage.md) covers accepted inputs, detector options, stable exit
|
||||
statuses, formatter modes, and the LSP command.
|
||||
2. [Output](output.md) explains graphical Miette reports, plain human output,
|
||||
concise records, versioned JSON Lines, and partial input errors.
|
||||
3. [Configuration](configuration.md) documents source precedence, named
|
||||
profiles, stable-ID merges, validation, and inspection commands. Start from
|
||||
the [commented examples](../examples/config/).
|
||||
|
||||
## Put it into practice
|
||||
|
||||
4. [Runnable examples](../examples/README.md) demonstrate in-memory analysis,
|
||||
streaming path input, shared replacement planning, and an expected-failure
|
||||
diagnostic showcase.
|
||||
5. [Editor setup](editors.md) provides working Helix (`hx`) and Vim formatter
|
||||
and LSP configurations with validation steps.
|
||||
6. [Heuristics and evidence scoring](heuristics.md) explains what each rule
|
||||
contributes and how the bounded score is calculated.
|
||||
7. [Limitations](limitations.md) covers false positives, evasion, domain shift,
|
||||
score semantics, and safe interpretation.
|
||||
|
||||
## Go deeper
|
||||
|
||||
The [advanced guide](advanced.md) is the single entry point for architecture,
|
||||
the public library API, evaluation, benchmarks, dependencies, design records,
|
||||
research references, development, security, and releases.
|
||||
|
||||
Project work is tracked in [tasks.md](../tasks.md), while contribution policy is
|
||||
defined in [CONTRIBUTING.md](../CONTRIBUTING.md) and
|
||||
[AGENTS.md](../AGENTS.md).
|
||||
|
|
|
|||
|
|
@ -0,0 +1,56 @@
|
|||
# Advanced concepts and project internals
|
||||
|
||||
This guide collects material that is useful after the normal CLI,
|
||||
configuration, output, and editor workflows are familiar. The root
|
||||
[README](../README.md) and [documentation path](README.md) remain the best entry
|
||||
points for day-to-day use.
|
||||
|
||||
## Detection model and evaluation
|
||||
|
||||
- [Heuristics and evidence scoring](heuristics.md) describes applicability,
|
||||
occurrence damping, normalization, and why the score is not authorship
|
||||
confidence.
|
||||
- [Evaluation](evaluation.md) records corpus provenance, per-rule measurements,
|
||||
aggregate false positives, and the limits of the current metrics.
|
||||
- [Limitations](limitations.md) covers evasion, domain shift, interpretation,
|
||||
and operational boundaries.
|
||||
|
||||
## Architecture and embedding
|
||||
|
||||
- [Architecture and public API](architecture.md) describes the Cargo workspace,
|
||||
module boundaries, shared domain values, streaming input, and reusable facade.
|
||||
- [Output contracts](output.md) specifies human presentation and the versioned
|
||||
JSON Lines schema for downstream integrations.
|
||||
- [Decision records](decisions/) preserve the reasoning behind core contracts,
|
||||
input limits, the LSP protocol, and the supported workspace.
|
||||
- [Crate-boundary experiment](experiments/crate-boundary.md) contains the
|
||||
measurements that preceded the workspace decision.
|
||||
|
||||
## Performance, dependencies, and safety
|
||||
|
||||
- [Performance benchmarks](benchmarks.md) defines representative workloads and
|
||||
the evidence required before adding parallel execution.
|
||||
- [Dependency and binary review](dependencies.md) records feature choices,
|
||||
advisory and license policy, unsafe boundaries, and release-size measurements.
|
||||
- [Security policy](../SECURITY.md) explains supported versions and private
|
||||
vulnerability reporting.
|
||||
|
||||
## Research references
|
||||
|
||||
- [Background](background.md) collects external context on observable signs of
|
||||
low-care AI-assisted writing.
|
||||
- [Ambiguous and invisible Unicode references](unicode-confusables.md) records
|
||||
Gitea's locale-aware catalog, its upstream source, and safe adoption
|
||||
boundaries.
|
||||
|
||||
## Development and release engineering
|
||||
|
||||
- [Development](development.md) covers the Rust toolchain, feature matrix,
|
||||
tests, snapshots, coverage, badges, and CI gates.
|
||||
- [Contributing](../CONTRIBUTING.md) explains the patch workflow and review
|
||||
expectations; [AGENTS.md](../AGENTS.md) defines repository-specific rules for
|
||||
coding agents.
|
||||
- [Release procedure](releasing.md) defines tagged reproducible packaging,
|
||||
checksums, provenance, and CycloneDX SBOM generation.
|
||||
- [Implementation plan](../tasks.md) records completed milestones and deferred
|
||||
product work.
|
||||
8
tasks.md
8
tasks.md
|
|
@ -426,7 +426,7 @@ locked all-feature graph. Formatting and all-feature rustdoc also passed.
|
|||
|
||||
## Milestone 17 — Progressive documentation entry points
|
||||
|
||||
- [ ] Restructure the root README around an immediately runnable quickstart and
|
||||
- [x] Restructure the root README around an immediately runnable quickstart and
|
||||
a concise product overview, then present the user-facing guides in a natural
|
||||
learning order. Move the dense engineering, evaluation, security, and design
|
||||
navigation behind a dedicated advanced guide and align the documentation
|
||||
|
|
@ -438,6 +438,12 @@ without duplicating their full guides; common next steps are ordered by likely
|
|||
need; advanced reference material remains discoverable through one clear entry
|
||||
point; all local Markdown links resolve and documentation checks pass.
|
||||
|
||||
Accepted on 2026-09-29 after the root README was reduced to a quickstart,
|
||||
three-binary overview, and six-step learning path; the documentation index now
|
||||
mirrors that progression; and `docs/advanced.md` groups the deeper conceptual
|
||||
and engineering material. Every repository-local Markdown link resolves, and
|
||||
formatting, line-length, and all-feature rustdoc checks pass.
|
||||
|
||||
## Deferred by design
|
||||
|
||||
- Statistical or model-based authorship classification.
|
||||
|
|
|
|||
Loading…
Reference in New Issue