# sachin-devops826/orca-code-review architecture

> Architecture diagram of the GitHub repository sachin-devops826/orca-code-review, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sachin-devops826/orca-code-review
- Repository: https://github.com/sachin-devops826/orca-code-review

## Overview

OrcaCode Review provides two review paths: a local agent-driven workflow and a GitHub Action that reviews pull requests, posts inline findings, and applies a merge gate. The installer detects agent platforms and places the selected skills. Local review planning selects files and prepares instructions; submission validates findings and reports a verdict. The Action also has reporting, settings, and OrcaRouter integration modules. Some Action internals are unsampled, so those links are included only where the README or source index supports them.

Main entry points: [`bin/orcacode-review.mjs`](https://github.com/sachin-devops826/orca-code-review/blob/main/bin/orcacode-review.mjs) (CLI entry), [`action.yml`](https://github.com/sachin-devops826/orca-code-review/blob/main/action.yml) (Action workflow), [`bin/review.mjs`](https://github.com/sachin-devops826/orca-code-review/blob/main/bin/review.mjs) (Review commands), [`bin/harness.mjs`](https://github.com/sachin-devops826/orca-code-review/blob/main/bin/harness.mjs) (Review planner and validator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_install["Installer and skills"]
  node_cli["CLI entry"]
  node_platforms["Platform catalog<br/>[platforms.mjs]"]
  node_prompts["Interactive prompts<br/>[prompt.mjs]"]
  node_translations["Translations<br/>[i18n.mjs]"]
  node_banner["CLI banner<br/>[banner.mjs]"]
  node_skilltree["Skill installation<br/>[skill-tree.mjs]"]
  node_local_skill["Local review skill"]
  node_action_skill["Action setup skill"]
end

subgraph group_local["Local review"]
  node_review_cli["Review commands<br/>[review.mjs]"]
  node_harness["Review planner and validator<br/>[harness.mjs]"]
  node_selection["File selection rules<br/>[selection.mjs]"]
  node_config["Local review settings<br/>[localconfig.mjs]"]
end

subgraph group_action["GitHub Action"]
  node_action_runtime["Action workflow<br/>[action.yml]"]
  node_review_engine["Review engine"]
  node_fact_proxy["OrcaRouter request proxy<br/>[fact-proxy.mjs]"]
end

subgraph group_shared["Review policy and reporting"]
  node_filtering["Finding filters<br/>[postfilter.mjs]"]
  node_severity["Severity policy<br/>[severity.mjs]"]
  node_gate["Merge gate<br/>[gate.mjs]"]
  node_reporting["PR reporting"]
  node_control["Control-plane settings<br/>[settings.mjs]"]
  node_status["Review status<br/>[review-status.mjs]"]
end

node_developer(("Developer"))
node_agent(("Coding agent"))
node_git[("Git repository")]
node_github["GitHub pull request"]
node_router["OrcaRouter"]

node_developer -->|"runs installer"| node_cli
node_cli -->|"detects targets"| node_platforms
node_cli -.->|"prompts choices"| node_prompts
node_cli -->|"sets language"| node_translations
node_cli -->|"renders banner"| node_banner
node_cli -->|"installs skills"| node_skilltree
node_skilltree -->|"installs"| node_local_skill
node_skilltree -->|"installs"| node_action_skill
node_agent -->|"requests local review"| node_review_cli
node_review_cli -->|"plans and submits"| node_harness
node_review_cli -->|"loads settings"| node_config
node_harness -->|"selects files"| node_selection
node_harness -->|"loads settings"| node_config
node_harness -->|"reads review range"| node_git
node_review_cli -.->|"applies severity contract"| node_severity
node_github -->|"triggers review"| node_action_runtime
node_action_runtime -->|"runs review"| node_review_engine
node_review_engine -.->|"routes requests"| node_fact_proxy
node_fact_proxy -->|"forwards requests"| node_router
node_review_engine -.->|"filters findings"| node_filtering
node_filtering -->|"uses severity rules"| node_severity
node_action_runtime -->|"blocks serious findings"| node_gate
node_gate -->|"classifies findings"| node_severity
node_action_runtime -->|"posts inline findings"| node_reporting
node_action_runtime -.->|"loads review settings"| node_control
node_action_runtime -.->|"records verdict"| node_status

click node_cli "https://github.com/sachin-devops826/orca-code-review/blob/main/bin/orcacode-review.mjs"
click node_platforms "https://github.com/sachin-devops826/orca-code-review/blob/main/bin/platforms.mjs"
click node_prompts "https://github.com/sachin-devops826/orca-code-review/blob/main/bin/prompt.mjs"
click node_translations "https://github.com/sachin-devops826/orca-code-review/blob/main/bin/i18n.mjs"
click node_banner "https://github.com/sachin-devops826/orca-code-review/blob/main/bin/banner.mjs"
click node_skilltree "https://github.com/sachin-devops826/orca-code-review/blob/main/bin/skill-tree.mjs"
click node_local_skill "https://github.com/sachin-devops826/orca-code-review/tree/main/skills/orca-review"
click node_action_skill "https://github.com/sachin-devops826/orca-code-review/tree/main/skills/orca-review-action"
click node_review_cli "https://github.com/sachin-devops826/orca-code-review/blob/main/bin/review.mjs"
click node_harness "https://github.com/sachin-devops826/orca-code-review/blob/main/bin/harness.mjs"
click node_selection "https://github.com/sachin-devops826/orca-code-review/blob/main/bin/selection.mjs"
click node_config "https://github.com/sachin-devops826/orca-code-review/blob/main/bin/localconfig.mjs"
click node_action_runtime "https://github.com/sachin-devops826/orca-code-review/blob/main/action.yml"
click node_review_engine "https://github.com/sachin-devops826/orca-code-review/tree/main/scripts"
click node_fact_proxy "https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/fact-proxy.mjs"
click node_filtering "https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/postfilter.mjs"
click node_severity "https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/severity.mjs"
click node_gate "https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/gate.mjs"
click node_reporting "https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/summary-comment.mjs"
click node_control "https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/settings.mjs"
click node_status "https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/review-status.mjs"

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_platforms,node_prompts,node_translations,node_banner,node_skilltree,node_local_skill,node_action_skill toneBlue
class node_review_cli,node_harness,node_selection,node_config,node_git toneAmber
class node_action_runtime,node_review_engine,node_fact_proxy,node_github,node_router toneMint
class node_filtering,node_severity,node_gate,node_reporting,node_control,node_status toneRose
class node_developer,node_agent toneIndigo
```

## Components

### Installer and skills

- [CLI entry](https://github.com/sachin-devops826/orca-code-review/blob/main/bin/orcacode-review.mjs): `bin/orcacode-review.mjs`
- [Platform catalog](https://github.com/sachin-devops826/orca-code-review/blob/main/bin/platforms.mjs): `bin/platforms.mjs`
- [Interactive prompts](https://github.com/sachin-devops826/orca-code-review/blob/main/bin/prompt.mjs): `bin/prompt.mjs`
- [Translations](https://github.com/sachin-devops826/orca-code-review/blob/main/bin/i18n.mjs): `bin/i18n.mjs`
- [CLI banner](https://github.com/sachin-devops826/orca-code-review/blob/main/bin/banner.mjs): `bin/banner.mjs`
- [Skill installation](https://github.com/sachin-devops826/orca-code-review/blob/main/bin/skill-tree.mjs): `bin/skill-tree.mjs`
- [Local review skill](https://github.com/sachin-devops826/orca-code-review/tree/main/skills/orca-review): `skills/orca-review`
- [Action setup skill](https://github.com/sachin-devops826/orca-code-review/tree/main/skills/orca-review-action): `skills/orca-review-action`

### Local review

- [Review commands](https://github.com/sachin-devops826/orca-code-review/blob/main/bin/review.mjs): `bin/review.mjs`
- [Review planner and validator](https://github.com/sachin-devops826/orca-code-review/blob/main/bin/harness.mjs): `bin/harness.mjs`
- [File selection rules](https://github.com/sachin-devops826/orca-code-review/blob/main/bin/selection.mjs): `bin/selection.mjs`
- [Local review settings](https://github.com/sachin-devops826/orca-code-review/blob/main/bin/localconfig.mjs): `bin/localconfig.mjs`

### GitHub Action

- [Action workflow](https://github.com/sachin-devops826/orca-code-review/blob/main/action.yml): `action.yml`
- [Review engine](https://github.com/sachin-devops826/orca-code-review/tree/main/scripts): `scripts`
- [OrcaRouter request proxy](https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/fact-proxy.mjs): `scripts/fact-proxy.mjs`

### Review policy and reporting

- [Finding filters](https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/postfilter.mjs): `scripts/postfilter.mjs`
- [Severity policy](https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/severity.mjs): `scripts/severity.mjs`
- [Merge gate](https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/gate.mjs): `scripts/gate.mjs`
- [PR reporting](https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/summary-comment.mjs): `scripts/summary-comment.mjs`
- [Control-plane settings](https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/settings.mjs): `scripts/settings.mjs`
- [Review status](https://github.com/sachin-devops826/orca-code-review/blob/main/scripts/review-status.mjs): `scripts/review-status.mjs`

### Other components

- **Developer**
- **Coding agent**
- **Git repository**
- **GitHub pull request**
- **OrcaRouter**

## Connections

- Developer → CLI entry: runs installer (evidence: `README.md`)
- CLI entry → Platform catalog: detects targets (evidence: `bin/orcacode-review.mjs`)
- CLI entry → Interactive prompts: prompts choices (evidence: `bin/orcacode-review.mjs`)
- CLI entry → Translations: sets language (evidence: `bin/orcacode-review.mjs`)
- CLI entry → CLI banner: renders banner (evidence: `bin/orcacode-review.mjs`)
- CLI entry → Skill installation: installs skills (evidence: `bin/orcacode-review.mjs`)
- Skill installation → Local review skill: installs
- Skill installation → Action setup skill: installs
- Coding agent → Review commands: requests local review (evidence: `README.md`)
- Review commands → Review planner and validator: plans and submits (evidence: `bin/review.mjs`)
- Review commands → Local review settings: loads settings (evidence: `bin/review.mjs`)
- Review planner and validator → File selection rules: selects files (evidence: `bin/harness.mjs`)
- Review planner and validator → Local review settings: loads settings (evidence: `bin/harness.mjs`)
- Review planner and validator → Git repository: reads review range (evidence: `README.md`)
- Review commands → Severity policy: applies severity contract
- GitHub pull request → Action workflow: triggers review (evidence: `README.md`)
- Action workflow → Review engine: runs review (evidence: `README.md`)
- Review engine → OrcaRouter request proxy: routes requests (evidence: `scripts/fact-proxy.mjs`)
- OrcaRouter request proxy → OrcaRouter: forwards requests (evidence: `scripts/fact-proxy.mjs`)
- Review engine → Finding filters: filters findings (evidence: `scripts/postfilter.mjs`)
- Finding filters → Severity policy: uses severity rules (evidence: `scripts/postfilter.mjs`)
- Action workflow → Merge gate: blocks serious findings (evidence: `README.md`)
- Merge gate → Severity policy: classifies findings (evidence: `scripts/gate.mjs`)
- Action workflow → PR reporting: posts inline findings (evidence: `README.md`)
- Action workflow → Control-plane settings: loads review settings
- Action workflow → Review status: records verdict
