On this page
Architecture
Skryba is one Rust process with three external API boundaries and two durable local artifacts.
input
├─ score ───────────────> detector ensemble ──> SQLite score cache
├─ rewrite/train ───────> Brama generator
│ Brama quality judge
│ detector ensemble ──> SQLite score cache
├─ benchmark ───────────> Brama generator + quality judge
└─ rentahuman ──────────> RentAHuman API
What Skryba owns
- CLI command parsing and local validation;
- detector credentials, provider adapters, selection, normalization, retry spacing, and cache namespacing;
- chunking, candidate generation instructions, quality gating, source fallback, and least-detectable selection;
- the version-1 native GRPO policy and its atomic JSON persistence;
- RentAHuman request validation, idempotency header, and response envelope;
- curated-corpus checksum and word-count verification.
What Skryba does not own
- model serving, provider subscriptions, or direct model credentials: Brama owns inference routing;
- detector vendors' models or verdict semantics beyond normalization;
- RentAHuman's remote order state, worker selection, documents, or recordings;
- desktop workflow interpretation: Skryba Desktop is a process launcher and view over this CLI.
Module boundaries
| Module | Responsibility |
|---|---|
main.rs |
CLI schema, dispatch, input/output files |
detectors.rs |
four provider clients, probability normalization, rate limiting, SQLite cache |
humanizer.rs |
chunking, candidate generation, quality gate, selection |
quality.rs |
judge prompt, schema parsing, weighted score, pass rule |
policy.rs |
strategies, sampling, GRPO/Adam update, policy persistence |
training.rs |
training data readers and training loop |
benchmark.rs |
curated-corpus verification and docs-quality benchmark |
brama.rs |
authenticated /v1/chat/completions client |
rentahuman.rs |
RentAHuman validation, HTTP client, output envelope |
Trust boundaries
Input and local files
Text, policies, corpora, and optional instruction files are untrusted caller input. Paths expand a leading ~. Policy and corpus readers validate structure before use. Humanization ids allow only [A-Za-z0-9_-].
Brama
The source and candidate text cross the Brama boundary for generation or judging. BRAMA_TOKEN authenticates the client. A response is not trusted: completion presence, truncation, judge JSON shape, numeric ranges, and critical errors are checked locally.
Detector APIs
Source and candidate text cross every selected detector boundary. Each result is accepted only when a recognized field normalizes to [0,1]; a partial ensemble is not accepted.
RentAHuman
Source text, instructions, budget, screening material, and language requirements cross this boundary. Skryba validates them before POST. The API's JSON under response is authoritative.
Durable state
The detector cache contains hashes and probabilities, not original text. Policy JSON contains strategy instructions and optimizer state. Neither file contains API keys. Credentials remain in the process environment (or, for Desktop launches, the user's ~/.config/skryba/env).
Maintained as part of the website-owned Skryba documentation corpus.