# rakeshcheekatimala/answerlint architecture

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

- Interactive diagram: https://gitdiagram.com/rakeshcheekatimala/answerlint
- Repository: https://github.com/rakeshcheekatimala/answerlint

## Overview

AnswerLint is a CLI for auditing content’s AI-answer clarity and trustworthiness, reporting scores and actionable recommendations; it also supports report comparisons, a local watch TUI, and llms.txt generation and linting. The main workflow is CLI input → crawl or parse content → run audits → score and recommend → write a selected report. The graph includes these separate product branches and the documented diff/TUI capabilities. Some command and subsystem implementations were not excerpted, so their internal links are omitted rather than inferred.

Main entry points: [`src/cli/commands/audit.ts`](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/commands/audit.ts) (Audit command), [`src/cli/index.ts`](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/index.ts) (CLI dispatcher), [`src/cli/commands/llms.ts`](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/commands/llms.ts) (LLMS commands), [`src/crawler/index.ts`](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/crawler/index.ts) (Input crawler)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI entry"]
  node_cli["CLI dispatcher<br/>[index.ts]"]
  node_auditcmd["Audit command<br/>[audit.ts]"]
  node_diffcmd["Diff command<br/>[diff.ts]"]
  node_llmscmd["LLMS commands<br/>[llms.ts]"]
  node_overview["Overview command<br/>[overview.ts]"]
  node_tuicmd["TUI command<br/>[tui.ts]"]
end

subgraph group_content["Content acquisition"]
  node_config["Audit configuration<br/>[index.ts]"]
  node_crawler["Input crawler<br/>[index.ts]"]
  node_fetch["URL fetcher<br/>[url-fetcher.ts]"]
  node_localparse["Local parser<br/>[local-parser.ts]"]
  node_sitemap["Sitemap reader<br/>[sitemap.ts]"]
  node_robots["Robots checker<br/>[robots.ts]"]
end

subgraph group_audit["Audit and scoring"]
  node_runner["Audit runner<br/>[runner.ts]"]
  node_aeo["AEO checks"]
  node_geo["GEO checks"]
  node_custom["Custom rules<br/>[custom-rules.ts]"]
  node_networkcheck["Citation health"]
  node_scoring["Score calculation<br/>[index.ts]"]
  node_citation["Citation readiness"]
end

subgraph group_outputs["Results and comparison"]
  node_recommend["Recommendations<br/>[index.ts]"]
  node_reporters["Audit reporters"]
  node_diff["Report comparison"]
end

subgraph group_llms["LLM roadmaps"]
  node_discover["Source discovery<br/>[discover.ts]"]
  node_extract["Metadata extraction<br/>[extract.ts]"]
  node_render["Roadmap rendering<br/>[render.ts]"]
  node_lint["Roadmap linting<br/>[lint.ts]"]
end

subgraph group_interactive["Interactive review"]
  node_tui["Watch interface"]
end

node_user(("Content team"))

node_user -->|"runs commands"| node_cli
node_cli -->|"dispatches"| node_auditcmd
node_cli -->|"dispatches"| node_diffcmd
node_cli -->|"dispatches"| node_llmscmd
node_cli -->|"dispatches"| node_overview
node_cli -->|"dispatches"| node_tuicmd
node_auditcmd -->|"loads"| node_config
node_auditcmd -->|"crawls inputs"| node_crawler
node_crawler -->|"fetches URLs"| node_fetch
node_crawler -->|"parses files"| node_localparse
node_crawler -->|"reads sitemap"| node_sitemap
node_crawler -->|"checks access"| node_robots
node_auditcmd -->|"runs checks"| node_runner
node_runner -->|"runs checks"| node_aeo
node_runner -->|"runs checks"| node_geo
node_runner -->|"runs rules"| node_custom
node_auditcmd -->|"runs network checks"| node_networkcheck
node_auditcmd -->|"generates fixes"| node_recommend
node_auditcmd -->|"computes scores"| node_scoring
node_scoring -->|"gets weights"| node_config
node_auditcmd -->|"writes reports"| node_reporters
node_diffcmd -.-> node_diff
node_user -->|"compares reports"| node_diffcmd
node_llmscmd -->|"discovers sources"| node_discover
node_llmscmd -->|"builds document"| node_extract
node_llmscmd -->|"renders files"| node_render
node_llmscmd -->|"validates output"| node_lint
node_discover -->|"discovers URLs"| node_sitemap
node_discover -->|"fetches pages"| node_fetch
node_user -->|"generates or lints"| node_llmscmd
node_tuicmd -.-> node_tui
node_user -->|"watches edits"| node_tuicmd

click node_cli "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/index.ts"
click node_auditcmd "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/commands/audit.ts"
click node_diffcmd "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/commands/diff.ts"
click node_llmscmd "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/commands/llms.ts"
click node_overview "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/commands/overview.ts"
click node_tuicmd "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/commands/tui.ts"
click node_config "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/config/index.ts"
click node_crawler "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/crawler/index.ts"
click node_fetch "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/crawler/url-fetcher.ts"
click node_localparse "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/crawler/local-parser.ts"
click node_sitemap "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/crawler/sitemap.ts"
click node_robots "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/crawler/robots.ts"
click node_runner "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/audits/runner.ts"
click node_aeo "https://github.com/rakeshcheekatimala/answerlint/tree/main/src/audits/aeo"
click node_geo "https://github.com/rakeshcheekatimala/answerlint/tree/main/src/audits/geo"
click node_custom "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/audits/custom-rules.ts"
click node_networkcheck "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/audits/geo/outbound-citation-health.ts"
click node_scoring "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/scoring/index.ts"
click node_citation "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/scoring/citation-readiness.ts"
click node_recommend "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/recommendations/index.ts"
click node_reporters "https://github.com/rakeshcheekatimala/answerlint/tree/main/src/reporters"
click node_diff "https://github.com/rakeshcheekatimala/answerlint/tree/main/src/diff"
click node_discover "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/llms/discover.ts"
click node_extract "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/llms/extract.ts"
click node_render "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/llms/render.ts"
click node_lint "https://github.com/rakeshcheekatimala/answerlint/blob/main/src/llms/lint.ts"
click node_tui "https://github.com/rakeshcheekatimala/answerlint/tree/main/src/tui"

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_auditcmd,node_diffcmd,node_llmscmd,node_overview,node_tuicmd toneBlue
class node_config,node_crawler,node_fetch,node_localparse,node_sitemap,node_robots toneAmber
class node_runner,node_aeo,node_geo,node_custom,node_networkcheck,node_scoring,node_citation toneMint
class node_recommend,node_reporters,node_diff toneRose
class node_discover,node_extract,node_render,node_lint,node_user toneIndigo
class node_tui toneTeal
```

## Components

### CLI entry

- [CLI dispatcher](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/index.ts): `src/cli/index.ts`
- [Audit command](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/commands/audit.ts): `src/cli/commands/audit.ts`
- [Diff command](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/commands/diff.ts): `src/cli/commands/diff.ts`
- [LLMS commands](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/commands/llms.ts): `src/cli/commands/llms.ts`
- [Overview command](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/commands/overview.ts): `src/cli/commands/overview.ts`
- [TUI command](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/cli/commands/tui.ts): `src/cli/commands/tui.ts`

### Content acquisition

- [Audit configuration](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/config/index.ts): `src/config/index.ts`
- [Input crawler](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/crawler/index.ts): `src/crawler/index.ts`
- [URL fetcher](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/crawler/url-fetcher.ts): `src/crawler/url-fetcher.ts`
- [Local parser](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/crawler/local-parser.ts): `src/crawler/local-parser.ts`
- [Sitemap reader](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/crawler/sitemap.ts): `src/crawler/sitemap.ts`
- [Robots checker](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/crawler/robots.ts): `src/crawler/robots.ts`

### Audit and scoring

- [Audit runner](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/audits/runner.ts): `src/audits/runner.ts`
- [AEO checks](https://github.com/rakeshcheekatimala/answerlint/tree/main/src/audits/aeo): `src/audits/aeo`
- [GEO checks](https://github.com/rakeshcheekatimala/answerlint/tree/main/src/audits/geo): `src/audits/geo`
- [Custom rules](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/audits/custom-rules.ts): `src/audits/custom-rules.ts`
- [Citation health](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/audits/geo/outbound-citation-health.ts): `src/audits/geo/outbound-citation-health.ts`
- [Score calculation](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/scoring/index.ts): `src/scoring/index.ts`
- [Citation readiness](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/scoring/citation-readiness.ts): `src/scoring/citation-readiness.ts`

### Results and comparison

- [Recommendations](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/recommendations/index.ts): `src/recommendations/index.ts`
- [Audit reporters](https://github.com/rakeshcheekatimala/answerlint/tree/main/src/reporters): `src/reporters`
- [Report comparison](https://github.com/rakeshcheekatimala/answerlint/tree/main/src/diff): `src/diff`

### LLM roadmaps

- [Source discovery](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/llms/discover.ts): `src/llms/discover.ts`
- [Metadata extraction](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/llms/extract.ts): `src/llms/extract.ts`
- [Roadmap rendering](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/llms/render.ts): `src/llms/render.ts`
- [Roadmap linting](https://github.com/rakeshcheekatimala/answerlint/blob/main/src/llms/lint.ts): `src/llms/lint.ts`

### Interactive review

- [Watch interface](https://github.com/rakeshcheekatimala/answerlint/tree/main/src/tui): `src/tui`

### Other components

- **Content team**

## Connections

- Content team → CLI dispatcher: runs commands
- CLI dispatcher → Audit command: dispatches (evidence: `src/cli/index.ts`)
- CLI dispatcher → Diff command: dispatches (evidence: `src/cli/index.ts`)
- CLI dispatcher → LLMS commands: dispatches (evidence: `src/cli/index.ts`)
- CLI dispatcher → Overview command: dispatches (evidence: `src/cli/index.ts`)
- CLI dispatcher → TUI command: dispatches (evidence: `src/cli/index.ts`)
- Audit command → Audit configuration: loads (evidence: `src/cli/commands/audit.ts`)
- Audit command → Input crawler: crawls inputs (evidence: `src/cli/commands/audit.ts`)
- Input crawler → URL fetcher: fetches URLs (evidence: `src/crawler/index.ts`)
- Input crawler → Local parser: parses files (evidence: `src/crawler/index.ts`)
- Input crawler → Sitemap reader: reads sitemap (evidence: `src/crawler/index.ts`)
- Input crawler → Robots checker: checks access (evidence: `src/crawler/index.ts`)
- Audit command → Audit runner: runs checks (evidence: `src/cli/commands/audit.ts`)
- Audit runner → AEO checks: runs checks (evidence: `src/audits/runner.ts`)
- Audit runner → GEO checks: runs checks (evidence: `src/audits/runner.ts`)
- Audit runner → Custom rules: runs rules (evidence: `src/audits/runner.ts`)
- Audit command → Citation health: runs network checks (evidence: `src/cli/commands/audit.ts`)
- Audit command → Recommendations: generates fixes (evidence: `src/cli/commands/audit.ts`)
- Audit command → Score calculation: computes scores (evidence: `src/cli/commands/audit.ts`)
- Score calculation → Audit configuration: gets weights (evidence: `src/scoring/index.ts`)
- Audit command → Audit reporters: writes reports (evidence: `src/cli/commands/audit.ts`)
- Diff command → Report comparison
- Content team → Diff command: compares reports
- LLMS commands → Source discovery: discovers sources (evidence: `src/cli/commands/llms.ts`)
- LLMS commands → Metadata extraction: builds document (evidence: `src/cli/commands/llms.ts`)
- LLMS commands → Roadmap rendering: renders files (evidence: `src/cli/commands/llms.ts`)
- LLMS commands → Roadmap linting: validates output (evidence: `src/cli/commands/llms.ts`)
- Source discovery → Sitemap reader: discovers URLs (evidence: `src/llms/discover.ts`)
- Source discovery → URL fetcher: fetches pages (evidence: `src/llms/discover.ts`)
- Content team → LLMS commands: generates or lints
- TUI command → Watch interface
- Content team → TUI command: watches edits
