# ojuliocouto/gerador-contratos architecture

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

- Interactive diagram: https://gitdiagram.com/ojuliocouto/gerador-contratos
- Repository: https://github.com/ojuliocouto/gerador-contratos

## Overview

gerador-contratos is a distributable Claude Code skill for producing Brazilian-law service contracts in the AI automation niche, auditing them, then sending them to Autentique for signature. Its main workflow takes provider and client/contract data plus a contract template, generates Markdown and PDF, runs an automatic structural check and a mandatory adversarial legal review, then sends the PDF for signature. The README also documents setup, three contract types, and legal reference material. Source excerpts show generator, checker, and signature API behavior; other documented capabilities are represented without inferring unsampled internal calls.

Main entry points: [`scripts/gerar.py`](https://github.com/ojuliocouto/gerador-contratos/blob/main/scripts/gerar.py) (Contract generator), [`references/clausulas.md`](https://github.com/ojuliocouto/gerador-contratos/blob/main/references/clausulas.md) (Clause library), [`scripts/autentique.py`](https://github.com/ojuliocouto/gerador-contratos/blob/main/scripts/autentique.py) (Signature submission), [`scripts/auditar.py`](https://github.com/ojuliocouto/gerador-contratos/blob/main/scripts/auditar.py) (Structural audit)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Contract workflow"]
  node_skill["Claude skill guidance<br/>[SKILL.md]"]
  node_profile["Provider profile"]
  node_contract_data["Contract data"]
  node_generator["Contract generator<br/>[gerar.py]"]
  node_markdown["Filled contract"]
  node_pdf["Rendered PDF"]
  node_reportlab["ReportLab renderer<br/>[gerar.py]"]
  node_weasyprint["WeasyPrint renderer<br/>[gerar.py]"]
end

subgraph group_content["Contract content"]
  node_provider_template["Service template"]
  node_mentorship_template["Mentorship template<br/>[mentoria.md]"]
  node_consulting_template["Consulting template<br/>[consultoria.md]"]
  node_clauses["Clause library<br/>[clausulas.md]"]
end

subgraph group_assurance["Legal assurance"]
  node_auto_audit["Structural audit<br/>[auditar.py]"]
  node_adversarial_audit["Four-agent legal audit"]
  node_legal_checklist["Pre-send checklist"]
  node_creator_review(("Creator review"))
end

subgraph group_signature["Signature"]
  node_autentique_sender["Signature submission<br/>[autentique.py]"]
  node_autentique{{"Autentique"}}
end

node_user(("Contract creator"))

node_user -->|"follows workflow"| node_skill
node_skill -->|"guides generation"| node_generator
node_user -->|"configures once"| node_profile
node_user -->|"provides details"| node_contract_data
node_generator -->|"reads profile"| node_profile
node_generator -->|"reads data"| node_contract_data
node_generator -->|"fills template"| node_provider_template
node_generator -->|"fills template"| node_mentorship_template
node_generator -->|"fills template"| node_consulting_template
node_generator -->|"writes Markdown"| node_markdown
node_generator -->|"selects renderer"| node_reportlab
node_generator -->|"selects renderer"| node_weasyprint
node_reportlab -->|"renders PDF"| node_pdf
node_weasyprint -->|"renders PDF"| node_pdf
node_auto_audit -->|"checks document"| node_markdown
node_auto_audit -->|"checks LGPD need"| node_contract_data
node_markdown -->|"undergoes review"| node_adversarial_audit
node_adversarial_audit -->|"returns findings"| node_creator_review
node_legal_checklist -.->|"supports review"| node_creator_review
node_creator_review -->|"approves for sending"| node_autentique_sender
node_autentique_sender -->|"uploads PDF"| node_pdf
node_autentique_sender -->|"creates signature request"| node_autentique
node_clauses -.->|"informs clauses"| node_provider_template
node_clauses -.->|"informs clauses"| node_mentorship_template
node_clauses -.->|"informs clauses"| node_consulting_template

click node_skill "https://github.com/ojuliocouto/gerador-contratos/blob/main/SKILL.md"
click node_profile "https://github.com/ojuliocouto/gerador-contratos/blob/main/perfil.exemplo.json"
click node_generator "https://github.com/ojuliocouto/gerador-contratos/blob/main/scripts/gerar.py"
click node_reportlab "https://github.com/ojuliocouto/gerador-contratos/blob/main/scripts/gerar.py"
click node_weasyprint "https://github.com/ojuliocouto/gerador-contratos/blob/main/scripts/gerar.py"
click node_provider_template "https://github.com/ojuliocouto/gerador-contratos/blob/main/templates/prestador-servico.md"
click node_mentorship_template "https://github.com/ojuliocouto/gerador-contratos/blob/main/templates/mentoria.md"
click node_consulting_template "https://github.com/ojuliocouto/gerador-contratos/blob/main/templates/consultoria.md"
click node_clauses "https://github.com/ojuliocouto/gerador-contratos/blob/main/references/clausulas.md"
click node_auto_audit "https://github.com/ojuliocouto/gerador-contratos/blob/main/scripts/auditar.py"
click node_adversarial_audit "https://github.com/ojuliocouto/gerador-contratos/blob/main/references/auditoria-adversarial.md"
click node_legal_checklist "https://github.com/ojuliocouto/gerador-contratos/blob/main/references/checklist-juridico.md"
click node_autentique_sender "https://github.com/ojuliocouto/gerador-contratos/blob/main/scripts/autentique.py"

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_skill,node_profile,node_contract_data,node_generator,node_markdown,node_pdf,node_reportlab,node_weasyprint toneBlue
class node_provider_template,node_mentorship_template,node_consulting_template,node_clauses toneAmber
class node_auto_audit,node_adversarial_audit,node_legal_checklist,node_creator_review toneMint
class node_autentique_sender,node_autentique toneRose
class node_user toneIndigo
```

## Components

### Contract workflow

- [Claude skill guidance](https://github.com/ojuliocouto/gerador-contratos/blob/main/SKILL.md): `SKILL.md`
- [Provider profile](https://github.com/ojuliocouto/gerador-contratos/blob/main/perfil.exemplo.json): `perfil.exemplo.json`
- **Contract data**
- [Contract generator](https://github.com/ojuliocouto/gerador-contratos/blob/main/scripts/gerar.py): `scripts/gerar.py`
- **Filled contract**
- **Rendered PDF**
- [ReportLab renderer](https://github.com/ojuliocouto/gerador-contratos/blob/main/scripts/gerar.py): `scripts/gerar.py`
- [WeasyPrint renderer](https://github.com/ojuliocouto/gerador-contratos/blob/main/scripts/gerar.py): `scripts/gerar.py`

### Contract content

- [Service template](https://github.com/ojuliocouto/gerador-contratos/blob/main/templates/prestador-servico.md): `templates/prestador-servico.md`
- [Mentorship template](https://github.com/ojuliocouto/gerador-contratos/blob/main/templates/mentoria.md): `templates/mentoria.md`
- [Consulting template](https://github.com/ojuliocouto/gerador-contratos/blob/main/templates/consultoria.md): `templates/consultoria.md`
- [Clause library](https://github.com/ojuliocouto/gerador-contratos/blob/main/references/clausulas.md): `references/clausulas.md`

### Legal assurance

- [Structural audit](https://github.com/ojuliocouto/gerador-contratos/blob/main/scripts/auditar.py): `scripts/auditar.py`
- [Four-agent legal audit](https://github.com/ojuliocouto/gerador-contratos/blob/main/references/auditoria-adversarial.md): `references/auditoria-adversarial.md`
- [Pre-send checklist](https://github.com/ojuliocouto/gerador-contratos/blob/main/references/checklist-juridico.md): `references/checklist-juridico.md`
- **Creator review**

### Signature

- [Signature submission](https://github.com/ojuliocouto/gerador-contratos/blob/main/scripts/autentique.py): `scripts/autentique.py`
- **Autentique**

### Other components

- **Contract creator**

## Connections

- Contract creator → Claude skill guidance: follows workflow (evidence: `README.md`)
- Claude skill guidance → Contract generator: guides generation (evidence: `README.md`)
- Contract creator → Provider profile: configures once (evidence: `README.md`)
- Contract creator → Contract data: provides details (evidence: `README.md`)
- Contract generator → Provider profile: reads profile (evidence: `README.md`)
- Contract generator → Contract data: reads data (evidence: `README.md`)
- Contract generator → Service template: fills template (evidence: `README.md`)
- Contract generator → Mentorship template: fills template (evidence: `README.md`)
- Contract generator → Consulting template: fills template (evidence: `README.md`)
- Contract generator → Filled contract: writes Markdown (evidence: `scripts/gerar.py`)
- Contract generator → ReportLab renderer: selects renderer (evidence: `scripts/gerar.py`)
- Contract generator → WeasyPrint renderer: selects renderer (evidence: `scripts/gerar.py`)
- ReportLab renderer → Rendered PDF: renders PDF (evidence: `scripts/gerar.py`)
- WeasyPrint renderer → Rendered PDF: renders PDF (evidence: `scripts/gerar.py`)
- Structural audit → Filled contract: checks document (evidence: `README.md`)
- Structural audit → Contract data: checks LGPD need (evidence: `scripts/auditar.py`)
- Filled contract → Four-agent legal audit: undergoes review (evidence: `README.md`)
- Four-agent legal audit → Creator review: returns findings (evidence: `README.md`)
- Pre-send checklist → Creator review: supports review
- Creator review → Signature submission: approves for sending (evidence: `README.md`)
- Signature submission → Rendered PDF: uploads PDF (evidence: `scripts/autentique.py`)
- Signature submission → Autentique: creates signature request (evidence: `scripts/autentique.py`)
- Clause library → Service template: informs clauses
- Clause library → Mentorship template: informs clauses
- Clause library → Consulting template: informs clauses
