# kazucocoa/renma architecture

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

- Interactive diagram: https://gitdiagram.com/kazucocoa/renma
- Repository: https://github.com/kazucocoa/renma

## Overview

Renma is a Git-native governance CLI for statically analyzing agent-facing repository assets; it reports evidence rather than loading or executing assets. The documented workflow starts with `renma scan`, then uses focused commands and CI reports to review inventories, relationships, readiness, security, and changes. The graph preserves those documented capability branches and sampled discovery/configuration internals. Some command and analysis implementations were not excerpted, so their links are based on the README rather than inferred source calls.

Main entry points: [`src/repository-evidence.ts`](https://github.com/kazucocoa/renma/blob/main/src/repository-evidence.ts) (Repository evidence), [`src/cli.ts`](https://github.com/kazucocoa/renma/blob/main/src/cli.ts) (Renma CLI), [`src/commands/scan.ts`](https://github.com/kazucocoa/renma/blob/main/src/commands/scan.ts) (Scan command), [`src/commands/graph.ts`](https://github.com/kazucocoa/renma/blob/main/src/commands/graph.ts) (Graph reports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI entry and configuration"]
  node_cli["Renma CLI<br/>[cli.ts]"]
  node_scan_command["Scan command<br/>[scan.ts]"]
  node_config["Scan configuration<br/>[config.ts]"]
end

subgraph group_analysis["Repository analysis"]
  node_discovery["Asset discovery<br/>[discovery.ts]"]
  node_boundary["Repository boundary"]
  node_evidence["Repository evidence"]
end

subgraph group_governance["Governance and relationships"]
  node_catalog["Asset catalog<br/>[catalog.ts]"]
  node_context_lens["Context lenses<br/>[context-lens.ts]"]
  node_security["Security policy inventory"]
  node_executables["Executable surfaces"]
  node_relationships["Relationships and trust<br/>[trust-graph.ts]"]
  node_quality["Authoring quality<br/>[quality-profile.ts]"]
end

subgraph group_review["Review evidence"]
  node_scan_report["Scan findings<br/>[report.ts]"]
  node_graph_command["Graph reports<br/>[graph.ts]"]
  node_readiness_command["Readiness review<br/>[readiness.ts]"]
  node_diff_command["Change comparison<br/>[diff.ts]"]
  node_ci_report["CI report<br/>[ci-report.ts]"]
end

node_repository["Git repository"]
node_engineer(("Engineer / CI"))
node_reviewer(("Human reviewer"))

node_engineer -->|"runs commands"| node_cli
node_repository -->|"provides assets"| node_scan_command
node_cli -->|"starts scan"| node_scan_command
node_scan_command -.->|"loads policy"| node_config
node_scan_command -.->|"analyzes repository"| node_evidence
node_evidence -->|"loads configuration"| node_config
node_evidence -->|"discovers assets"| node_discovery
node_discovery -->|"walks safely"| node_boundary
node_evidence -->|"builds catalog"| node_catalog
node_evidence -->|"collects policy evidence"| node_security
node_evidence -->|"collects surface evidence"| node_executables
node_evidence -->|"produces findings"| node_scan_report
node_cli -->|"offers graph"| node_graph_command
node_cli -->|"offers readiness"| node_readiness_command
node_cli -->|"offers change evidence"| node_diff_command
node_cli -->|"offers CI reports"| node_ci_report
node_graph_command -->|"reports relationships"| node_relationships
node_graph_command -.->|"reports lens graph"| node_context_lens
node_readiness_command -.->|"reviews assets"| node_catalog
node_readiness_command -.->|"reviews authoring"| node_quality
node_diff_command -->|"compares repository state"| node_repository
node_ci_report -->|"presents CI evidence"| node_reviewer
node_scan_report -->|"supports review"| node_reviewer
node_reviewer -->|"approves changes"| node_repository

click node_cli "https://github.com/kazucocoa/renma/blob/main/src/cli.ts"
click node_scan_command "https://github.com/kazucocoa/renma/blob/main/src/commands/scan.ts"
click node_config "https://github.com/kazucocoa/renma/blob/main/src/config.ts"
click node_discovery "https://github.com/kazucocoa/renma/blob/main/src/discovery.ts"
click node_boundary "https://github.com/kazucocoa/renma/blob/main/src/repository-boundary.ts"
click node_evidence "https://github.com/kazucocoa/renma/blob/main/src/repository-evidence.ts"
click node_catalog "https://github.com/kazucocoa/renma/blob/main/src/catalog.ts"
click node_context_lens "https://github.com/kazucocoa/renma/blob/main/src/context-lens.ts"
click node_security "https://github.com/kazucocoa/renma/blob/main/src/security-policy-inventory.ts"
click node_executables "https://github.com/kazucocoa/renma/blob/main/src/executable-surface-inventory.ts"
click node_relationships "https://github.com/kazucocoa/renma/blob/main/src/trust-graph.ts"
click node_quality "https://github.com/kazucocoa/renma/blob/main/src/quality-profile.ts"
click node_scan_report "https://github.com/kazucocoa/renma/blob/main/src/report.ts"
click node_graph_command "https://github.com/kazucocoa/renma/blob/main/src/commands/graph.ts"
click node_readiness_command "https://github.com/kazucocoa/renma/blob/main/src/commands/readiness.ts"
click node_diff_command "https://github.com/kazucocoa/renma/blob/main/src/commands/diff.ts"
click node_ci_report "https://github.com/kazucocoa/renma/blob/main/src/commands/ci-report.ts"

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_scan_command,node_config,node_reviewer toneBlue
class node_discovery,node_boundary,node_evidence toneAmber
class node_catalog,node_context_lens,node_security,node_executables,node_relationships,node_quality toneMint
class node_scan_report,node_graph_command,node_readiness_command,node_diff_command,node_ci_report toneRose
class node_repository,node_engineer toneIndigo
```

## Components

### CLI entry and configuration

- [Renma CLI](https://github.com/kazucocoa/renma/blob/main/src/cli.ts): `src/cli.ts`
- [Scan command](https://github.com/kazucocoa/renma/blob/main/src/commands/scan.ts): `src/commands/scan.ts`
- [Scan configuration](https://github.com/kazucocoa/renma/blob/main/src/config.ts): `src/config.ts`

### Repository analysis

- [Asset discovery](https://github.com/kazucocoa/renma/blob/main/src/discovery.ts): `src/discovery.ts`
- [Repository boundary](https://github.com/kazucocoa/renma/blob/main/src/repository-boundary.ts): `src/repository-boundary.ts`
- [Repository evidence](https://github.com/kazucocoa/renma/blob/main/src/repository-evidence.ts): `src/repository-evidence.ts`

### Governance and relationships

- [Asset catalog](https://github.com/kazucocoa/renma/blob/main/src/catalog.ts): `src/catalog.ts`
- [Context lenses](https://github.com/kazucocoa/renma/blob/main/src/context-lens.ts): `src/context-lens.ts`
- [Security policy inventory](https://github.com/kazucocoa/renma/blob/main/src/security-policy-inventory.ts): `src/security-policy-inventory.ts`
- [Executable surfaces](https://github.com/kazucocoa/renma/blob/main/src/executable-surface-inventory.ts): `src/executable-surface-inventory.ts`
- [Relationships and trust](https://github.com/kazucocoa/renma/blob/main/src/trust-graph.ts): `src/trust-graph.ts`
- [Authoring quality](https://github.com/kazucocoa/renma/blob/main/src/quality-profile.ts): `src/quality-profile.ts`

### Review evidence

- [Scan findings](https://github.com/kazucocoa/renma/blob/main/src/report.ts): `src/report.ts`
- [Graph reports](https://github.com/kazucocoa/renma/blob/main/src/commands/graph.ts): `src/commands/graph.ts`
- [Readiness review](https://github.com/kazucocoa/renma/blob/main/src/commands/readiness.ts): `src/commands/readiness.ts`
- [Change comparison](https://github.com/kazucocoa/renma/blob/main/src/commands/diff.ts): `src/commands/diff.ts`
- [CI report](https://github.com/kazucocoa/renma/blob/main/src/commands/ci-report.ts): `src/commands/ci-report.ts`

### Other components

- **Git repository**
- **Engineer / CI**
- **Human reviewer**

## Connections

- Engineer / CI → Renma CLI: runs commands (evidence: `README.md`)
- Git repository → Scan command: provides assets (evidence: `README.md`)
- Renma CLI → Scan command: starts scan (evidence: `README.md`)
- Scan command → Scan configuration: loads policy
- Scan command → Repository evidence: analyzes repository
- Repository evidence → Scan configuration: loads configuration (evidence: `src/repository-evidence.ts`)
- Repository evidence → Asset discovery: discovers assets (evidence: `src/repository-evidence.ts`)
- Asset discovery → Repository boundary: walks safely (evidence: `src/discovery.ts`)
- Repository evidence → Asset catalog: builds catalog (evidence: `src/repository-evidence.ts`)
- Repository evidence → Security policy inventory: collects policy evidence (evidence: `src/repository-evidence.ts`)
- Repository evidence → Executable surfaces: collects surface evidence (evidence: `src/repository-evidence.ts`)
- Repository evidence → Scan findings: produces findings (evidence: `README.md`)
- Renma CLI → Graph reports: offers graph (evidence: `README.md`)
- Renma CLI → Readiness review: offers readiness (evidence: `README.md`)
- Renma CLI → Change comparison: offers change evidence (evidence: `README.md`)
- Renma CLI → CI report: offers CI reports (evidence: `README.md`)
- Graph reports → Relationships and trust: reports relationships (evidence: `README.md`)
- Graph reports → Context lenses: reports lens graph
- Readiness review → Asset catalog: reviews assets
- Readiness review → Authoring quality: reviews authoring
- Change comparison → Git repository: compares repository state (evidence: `README.md`)
- CI report → Human reviewer: presents CI evidence (evidence: `README.md`)
- Scan findings → Human reviewer: supports review (evidence: `README.md`)
- Human reviewer → Git repository: approves changes (evidence: `README.md`)
