# computerlovetech/ryni architecture

> Architecture diagram of the GitHub repository computerlovetech/ryni, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/computerlovetech/ryni
- Repository: https://github.com/computerlovetech/ryni

## Overview

Rýni is a Rust harness linter. Its main workflow accepts a project or file, discovers Markdown inputs, parses documents, runs link, Agent Skills, and project-wide convention checks, then reports findings and optionally applies explicitly requested fixes. The graph preserves documented configuration packs, preview checks, structured output, and CLI capabilities. Some internal links are supported by the library excerpt or SOURCE INDEX; README-documented behavior is cited there. Unsampled CLI and reporting details are represented only at the documented capability level.

Main entry points: [`src/lib.rs`](https://github.com/computerlovetech/ryni/blob/main/src/lib.rs) (Check engine), [`src/main.rs`](https://github.com/computerlovetech/ryni/blob/main/src/main.rs) (CLI commands), [`src/rules/markdown.rs`](https://github.com/computerlovetech/ryni/blob/main/src/rules/markdown.rs) (Local link checks), [`src/document.rs`](https://github.com/computerlovetech/ryni/blob/main/src/document.rs) (Document parsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Command entry"]
  node_cli["CLI commands<br/>[main.rs]"]
  node_api["Check engine<br/>[lib.rs]"]
end

subgraph group_scan["Scan and analysis"]
  node_discovery["Input discovery<br/>[discovery.rs]"]
  node_settings["Settings and packs<br/>[settings.rs]"]
  node_document["Document parsing<br/>[document.rs]"]
  node_source["Source snapshots<br/>[source.rs]"]
  node_filesystem["Target filesystem<br/>[filesystem.rs]"]
end

subgraph group_rules["Rule checks"]
  node_rule_registry["Rule registry<br/>[registry.rs]"]
  node_markdown["Local link checks<br/>[markdown.rs]"]
  node_skill["Skill metadata checks<br/>[skill.rs]"]
  node_project["Project conventions<br/>[project.rs]"]
end

subgraph group_results["Results and edits"]
  node_diagnostic["Findings<br/>[diagnostic.rs]"]
  node_fix["Fix application<br/>[fix.rs]"]
  node_report["Check report<br/>[report.rs]"]
  node_output["Text and JSON output<br/>[output.rs]"]
end

node_user(("Engineer"))
node_project_files[("Project files")]

node_user -->|"runs check"| node_cli
node_cli -.->|"starts scan"| node_api
node_api -->|"discovers inputs"| node_discovery
node_api -->|"resolves settings"| node_settings
node_api -->|"parses sources"| node_document
node_document -->|"stores snapshot"| node_source
node_api -->|"runs checks"| node_markdown
node_api -->|"runs checks"| node_skill
node_api -->|"checks project"| node_project
node_markdown -->|"reads links"| node_document
node_skill -->|"reads metadata"| node_document
node_markdown -->|"inspects targets"| node_filesystem
node_project -->|"checks required files"| node_filesystem
node_api -->|"selects rules"| node_rule_registry
node_settings -->|"selects rules"| node_rule_registry
node_api -->|"collects findings"| node_diagnostic
node_api -->|"builds report"| node_report
node_report -.->|"formats results"| node_output
node_cli -.->|"prints results"| node_output
node_cli -.->|"applies requested fixes"| node_fix
node_fix -->|"rewrites files"| node_project_files
node_markdown -->|"checks link targets"| node_project_files
node_project -->|"emits findings"| node_diagnostic

click node_cli "https://github.com/computerlovetech/ryni/blob/main/src/main.rs"
click node_api "https://github.com/computerlovetech/ryni/blob/main/src/lib.rs"
click node_discovery "https://github.com/computerlovetech/ryni/blob/main/src/discovery.rs"
click node_settings "https://github.com/computerlovetech/ryni/blob/main/src/settings.rs"
click node_document "https://github.com/computerlovetech/ryni/blob/main/src/document.rs"
click node_source "https://github.com/computerlovetech/ryni/blob/main/src/source.rs"
click node_rule_registry "https://github.com/computerlovetech/ryni/blob/main/src/registry.rs"
click node_markdown "https://github.com/computerlovetech/ryni/blob/main/src/rules/markdown.rs"
click node_skill "https://github.com/computerlovetech/ryni/blob/main/src/rules/skill.rs"
click node_project "https://github.com/computerlovetech/ryni/blob/main/src/rules/project.rs"
click node_filesystem "https://github.com/computerlovetech/ryni/blob/main/src/filesystem.rs"
click node_diagnostic "https://github.com/computerlovetech/ryni/blob/main/src/diagnostic.rs"
click node_fix "https://github.com/computerlovetech/ryni/blob/main/src/fix.rs"
click node_report "https://github.com/computerlovetech/ryni/blob/main/src/report.rs"
click node_output "https://github.com/computerlovetech/ryni/blob/main/src/output.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_api toneBlue
class node_discovery,node_settings,node_document,node_source,node_filesystem,node_project_files toneAmber
class node_rule_registry,node_markdown,node_skill,node_project toneMint
class node_diagnostic,node_fix,node_report,node_output toneRose
class node_user toneIndigo
```

## Components

### Command entry

- [CLI commands](https://github.com/computerlovetech/ryni/blob/main/src/main.rs): `src/main.rs`
- [Check engine](https://github.com/computerlovetech/ryni/blob/main/src/lib.rs): `src/lib.rs`

### Scan and analysis

- [Input discovery](https://github.com/computerlovetech/ryni/blob/main/src/discovery.rs): `src/discovery.rs`
- [Settings and packs](https://github.com/computerlovetech/ryni/blob/main/src/settings.rs): `src/settings.rs`
- [Document parsing](https://github.com/computerlovetech/ryni/blob/main/src/document.rs): `src/document.rs`
- [Source snapshots](https://github.com/computerlovetech/ryni/blob/main/src/source.rs): `src/source.rs`
- [Target filesystem](https://github.com/computerlovetech/ryni/blob/main/src/filesystem.rs): `src/filesystem.rs`

### Rule checks

- [Rule registry](https://github.com/computerlovetech/ryni/blob/main/src/registry.rs): `src/registry.rs`
- [Local link checks](https://github.com/computerlovetech/ryni/blob/main/src/rules/markdown.rs): `src/rules/markdown.rs`
- [Skill metadata checks](https://github.com/computerlovetech/ryni/blob/main/src/rules/skill.rs): `src/rules/skill.rs`
- [Project conventions](https://github.com/computerlovetech/ryni/blob/main/src/rules/project.rs): `src/rules/project.rs`

### Results and edits

- [Findings](https://github.com/computerlovetech/ryni/blob/main/src/diagnostic.rs): `src/diagnostic.rs`
- [Fix application](https://github.com/computerlovetech/ryni/blob/main/src/fix.rs): `src/fix.rs`
- [Check report](https://github.com/computerlovetech/ryni/blob/main/src/report.rs): `src/report.rs`
- [Text and JSON output](https://github.com/computerlovetech/ryni/blob/main/src/output.rs): `src/output.rs`

### Other components

- **Engineer**
- **Project files**

## Connections

- Engineer → CLI commands: runs check (evidence: `README.md`)
- CLI commands → Check engine: starts scan
- Check engine → Input discovery: discovers inputs (evidence: `src/lib.rs`)
- Check engine → Settings and packs: resolves settings (evidence: `src/lib.rs`)
- Check engine → Document parsing: parses sources (evidence: `src/lib.rs`)
- Document parsing → Source snapshots: stores snapshot (evidence: `src/document.rs`)
- Check engine → Local link checks: runs checks (evidence: `src/lib.rs`)
- Check engine → Skill metadata checks: runs checks (evidence: `src/lib.rs`)
- Check engine → Project conventions: checks project (evidence: `src/lib.rs`)
- Local link checks → Document parsing: reads links (evidence: `src/rules/markdown.rs`)
- Skill metadata checks → Document parsing: reads metadata (evidence: `src/rules/skill.rs`)
- Local link checks → Target filesystem: inspects targets (evidence: `src/rules/markdown.rs`)
- Project conventions → Target filesystem: checks required files (evidence: `src/rules/project.rs`)
- Check engine → Rule registry: selects rules (evidence: `src/lib.rs`)
- Settings and packs → Rule registry: selects rules (evidence: `src/settings.rs`)
- Check engine → Findings: collects findings (evidence: `src/lib.rs`)
- Check engine → Check report: builds report (evidence: `src/lib.rs`)
- Check report → Text and JSON output: formats results
- CLI commands → Text and JSON output: prints results
- CLI commands → Fix application: applies requested fixes
- Fix application → Project files: rewrites files (evidence: `src/fix.rs`)
- Local link checks → Project files: checks link targets (evidence: `src/rules/markdown.rs`)
- Project conventions → Findings: emits findings (evidence: `src/rules/project.rs`)
