# major-solutions/reqlite architecture

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

- Interactive diagram: https://gitdiagram.com/major-solutions/reqlite
- Repository: https://github.com/major-solutions/reqlite

## Overview

reqlite is a requirements-management engine and Claude Code plugin: users author requirements as linked Markdown files, then run local structural checks and reports, optionally followed by isolated LLM review. The graph preserves distinct authoring, graph analysis, code traceability, review, and project setup capabilities. Edges reflect README statements and the supplied source excerpts or index references; unsampled implementations and hook wiring are not inferred.

Main entry points: [`src/reqlite/cli.py`](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/cli.py) (CLI), [`src/reqlite/review.py`](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/review.py) (Isolated review runner), [`src/reqlite/items.py`](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/items.py) (Item parser), [`src/reqlite/graph.py`](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/graph.py) (Dependency graph)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Requirements model"]
  node_items["Item parser<br/>[items.py]"]
  node_hidden["Hidden-text detection<br/>[hidden.py]"]
  node_graph["Dependency graph<br/>[graph.py]"]
  node_references["Link extraction<br/>[references.py]"]
end

subgraph group_analysis["Local analysis"]
  node_analyses["Structural analyses<br/>[analyses.py]"]
  node_query["Dimension queries<br/>[query.py]"]
  node_check["Integrity and commit check<br/>[check.py]"]
  node_ruleset_check["Ruleset validation<br/>[ruleset_check.py]"]
end

subgraph group_trace["Code traceability"]
  node_fences["Code justification scanner<br/>[fences.py]"]
  node_trace["Observed trace comparison<br/>[trace.py]"]
end

subgraph group_review["Inferential review"]
  node_compile["Context compiler<br/>[compile.py]"]
  node_review["Isolated review runner<br/>[review.py]"]
  node_copilot["Copilot review mode<br/>[copilot.py]"]
  node_parse["Finding parser<br/>[parse.py]"]
end

subgraph group_project["Project integration"]
  node_cli["CLI<br/>[cli.py]"]
  node_scaffold["Project initialization<br/>[scaffold.py]"]
  node_ruleset["Ruleset library"]
  node_hook["Commit hook configuration<br/>[hooks.json]"]
end

node_user(("Engineer"))
node_llm(("Language model"))

node_user -->|"runs commands"| node_cli
node_cli -->|"loads items"| node_items
node_cli -->|"builds graph"| node_graph
node_items -->|"detects hidden text"| node_hidden
node_graph -->|"extracts links"| node_references
node_cli -->|"runs analysis"| node_analyses
node_analyses -->|"evaluates queries"| node_query
node_cli -->|"runs checks"| node_check
node_cli -->|"validates ruleset"| node_ruleset_check
node_cli -->|"initializes project"| node_scaffold
node_scaffold -->|"copies defaults"| node_ruleset
node_cli -->|"compares trace"| node_trace
node_trace -->|"uses code fences"| node_fences
node_cli -->|"starts review"| node_review
node_review -->|"assembles context"| node_compile
node_review -.->|"dispatches optional mode"| node_copilot
node_review -->|"sends review prompt"| node_llm
node_llm -->|"returns findings"| node_parse
node_cli -->|"parses findings"| node_parse
node_hook -.->|"invokes commit check"| node_check
node_user -->|"commits changes"| node_hook

click node_cli "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/cli.py"
click node_items "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/items.py"
click node_hidden "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/hidden.py"
click node_graph "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/graph.py"
click node_references "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/references.py"
click node_scaffold "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/scaffold.py"
click node_ruleset "https://github.com/major-solutions/reqlite/tree/main/src/reqlite/rulesets"
click node_analyses "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/analyses.py"
click node_query "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/query.py"
click node_check "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/check.py"
click node_ruleset_check "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/ruleset_check.py"
click node_compile "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/compile.py"
click node_review "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/review.py"
click node_copilot "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/copilot.py"
click node_parse "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/parse.py"
click node_fences "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/fences.py"
click node_trace "https://github.com/major-solutions/reqlite/blob/main/src/reqlite/trace.py"
click node_hook "https://github.com/major-solutions/reqlite/blob/main/hooks/hooks.json"

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_items,node_hidden,node_graph,node_references toneBlue
class node_analyses,node_query,node_check,node_ruleset_check toneAmber
class node_fences,node_trace toneMint
class node_compile,node_review,node_copilot,node_parse toneRose
class node_cli,node_scaffold,node_ruleset,node_hook,node_user,node_llm toneIndigo
```

## Components

### Requirements model

- [Item parser](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/items.py): `src/reqlite/items.py`
- [Hidden-text detection](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/hidden.py): `src/reqlite/hidden.py`
- [Dependency graph](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/graph.py): `src/reqlite/graph.py`
- [Link extraction](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/references.py): `src/reqlite/references.py`

### Local analysis

- [Structural analyses](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/analyses.py): `src/reqlite/analyses.py`
- [Dimension queries](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/query.py): `src/reqlite/query.py`
- [Integrity and commit check](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/check.py): `src/reqlite/check.py`
- [Ruleset validation](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/ruleset_check.py): `src/reqlite/ruleset_check.py`

### Code traceability

- [Code justification scanner](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/fences.py): `src/reqlite/fences.py`
- [Observed trace comparison](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/trace.py): `src/reqlite/trace.py`

### Inferential review

- [Context compiler](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/compile.py): `src/reqlite/compile.py`
- [Isolated review runner](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/review.py): `src/reqlite/review.py`
- [Copilot review mode](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/copilot.py): `src/reqlite/copilot.py`
- [Finding parser](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/parse.py): `src/reqlite/parse.py`

### Project integration

- [CLI](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/cli.py): `src/reqlite/cli.py`
- [Project initialization](https://github.com/major-solutions/reqlite/blob/main/src/reqlite/scaffold.py): `src/reqlite/scaffold.py`
- [Ruleset library](https://github.com/major-solutions/reqlite/tree/main/src/reqlite/rulesets): `src/reqlite/rulesets`
- [Commit hook configuration](https://github.com/major-solutions/reqlite/blob/main/hooks/hooks.json): `hooks/hooks.json`

### Other components

- **Engineer**
- **Language model**

## Connections

- Engineer → CLI: runs commands (evidence: `README.md`)
- CLI → Item parser: loads items (evidence: `src/reqlite/cli.py`)
- CLI → Dependency graph: builds graph (evidence: `src/reqlite/cli.py`)
- Item parser → Hidden-text detection: detects hidden text (evidence: `src/reqlite/items.py`)
- Dependency graph → Link extraction: extracts links (evidence: `src/reqlite/graph.py`)
- CLI → Structural analyses: runs analysis (evidence: `src/reqlite/cli.py`)
- Structural analyses → Dimension queries: evaluates queries (evidence: `src/reqlite/analyses.py`)
- CLI → Integrity and commit check: runs checks (evidence: `src/reqlite/cli.py`)
- CLI → Ruleset validation: validates ruleset (evidence: `src/reqlite/cli.py`)
- CLI → Project initialization: initializes project (evidence: `src/reqlite/cli.py`)
- Project initialization → Ruleset library: copies defaults (evidence: `README.md`)
- CLI → Observed trace comparison: compares trace (evidence: `src/reqlite/cli.py`)
- Observed trace comparison → Code justification scanner: uses code fences (evidence: `src/reqlite/trace.py`)
- CLI → Isolated review runner: starts review (evidence: `src/reqlite/cli.py`)
- Isolated review runner → Context compiler: assembles context (evidence: `src/reqlite/review.py`)
- Isolated review runner → Copilot review mode: dispatches optional mode (evidence: `src/reqlite/review.py`)
- Isolated review runner → Language model: sends review prompt (evidence: `README.md`)
- Language model → Finding parser: returns findings (evidence: `README.md`)
- CLI → Finding parser: parses findings (evidence: `src/reqlite/cli.py`)
- Commit hook configuration → Integrity and commit check: invokes commit check
- Engineer → Commit hook configuration: commits changes (evidence: `README.md`)
