# dharc-org/chad-ap architecture

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

- Interactive diagram: https://gitdiagram.com/dharc-org/chad-ap
- Repository: https://github.com/dharc-org/chad-ap

## Overview

CHAD-AP is a CIDOC CRM-based ontology application profile for representing cultural-heritage digitisation data and workflows. Its documented development workflow starts with an iteration’s motivating scenario and competency questions, formalizes terms and relationships into a TBox, organizes example data in an ABox, then expresses and tests formal questions as SPARQL. Refactoring scripts produce updated ABoxes; the versioned ontology and serializations are the published profile. The README documents these relationships; sampled refactoring code confirms the ABox transformation for later iterations.

Main entry points: [`development`](https://github.com/dharc-org/chad-ap/tree/main/development) (Terminology schemas), [`docs/current/chad-ap.ttl`](https://github.com/dharc-org/chad-ap/blob/main/docs/current/chad-ap.ttl) (CHAD-AP ontology), [`data/10/refactor.py`](https://github.com/dharc-org/chad-ap/blob/main/data/10/refactor.py) (ABox refactoring), [`sparql`](https://github.com/dharc-org/chad-ap/tree/main/sparql) (Query test notebooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_design["Ontology development"]
  node_scenario["Motivating scenarios"]
  node_questions["Competency questions"]
  node_glossary["Iteration glossaries"]
  node_modeldiagrams["Model diagrams"]
  node_tbox["Terminology schemas"]
  node_diagrams["Iteration diagrams"]
end

subgraph group_validation["Data and queries"]
  node_aboxexamples["Example assertions"]
  node_refactor["ABox refactoring<br/>[refactor.py]"]
  node_mapping["Mapping rules<br/>[mapping.yaml]"]
  node_refactored["Refactored ABoxes"]
  node_sparql["Formal SPARQL questions"]
  node_querytests["Query test notebooks"]
end

subgraph group_profile["Published profile"]
  node_ontology["CHAD-AP ontology<br/>[chad-ap.ttl]"]
  node_serializations["RDF serializations"]
  node_documentation["Profile documentation<br/>[description.md]"]
end

node_researcher(("Ontology author"))

node_researcher -->|"defines scope"| node_scenario
node_researcher -->|"frames needs"| node_questions
node_scenario -->|"yields terms"| node_glossary
node_questions -->|"inform terms"| node_glossary
node_glossary -->|"models concepts"| node_modeldiagrams
node_modeldiagrams -->|"formalizes schema"| node_tbox
node_tbox -->|"organizes examples"| node_aboxexamples
node_aboxexamples -->|"provides input"| node_refactor
node_mapping -->|"configures mapping"| node_refactor
node_refactor -->|"serializes output"| node_refactored
node_questions -->|"reformulated as"| node_sparql
node_sparql -->|"tested in"| node_querytests
node_tbox -->|"tested against"| node_querytests
node_aboxexamples -->|"tested against"| node_querytests
node_researcher -->|"refines model"| node_diagrams
node_tbox -->|"forms profile"| node_ontology
node_ontology -->|"published as"| node_serializations
node_ontology -->|"described by"| node_documentation

click node_scenario "https://github.com/dharc-org/chad-ap/tree/main/development"
click node_questions "https://github.com/dharc-org/chad-ap/tree/main/development"
click node_glossary "https://github.com/dharc-org/chad-ap/tree/main/development"
click node_modeldiagrams "https://github.com/dharc-org/chad-ap/tree/main/development"
click node_tbox "https://github.com/dharc-org/chad-ap/tree/main/development"
click node_aboxexamples "https://github.com/dharc-org/chad-ap/tree/main/development"
click node_refactor "https://github.com/dharc-org/chad-ap/blob/main/data/10/refactor.py"
click node_mapping "https://github.com/dharc-org/chad-ap/blob/main/data/10/mapping.yaml"
click node_refactored "https://github.com/dharc-org/chad-ap/tree/main/data"
click node_sparql "https://github.com/dharc-org/chad-ap/tree/main/sparql"
click node_querytests "https://github.com/dharc-org/chad-ap/tree/main/sparql"
click node_diagrams "https://github.com/dharc-org/chad-ap/tree/main/diagrams"
click node_ontology "https://github.com/dharc-org/chad-ap/blob/main/docs/current/chad-ap.ttl"
click node_serializations "https://github.com/dharc-org/chad-ap/tree/main/docs/current"
click node_documentation "https://github.com/dharc-org/chad-ap/blob/main/docs/current/description.md"

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_scenario,node_questions,node_glossary,node_modeldiagrams,node_tbox,node_diagrams toneBlue
class node_aboxexamples,node_refactor,node_mapping,node_refactored,node_sparql,node_querytests toneAmber
class node_ontology,node_serializations,node_documentation toneMint
class node_researcher toneIndigo
```

## Components

### Ontology development

- [Motivating scenarios](https://github.com/dharc-org/chad-ap/tree/main/development): `development`
- [Competency questions](https://github.com/dharc-org/chad-ap/tree/main/development): `development`
- [Iteration glossaries](https://github.com/dharc-org/chad-ap/tree/main/development): `development`
- [Model diagrams](https://github.com/dharc-org/chad-ap/tree/main/development): `development`
- [Terminology schemas](https://github.com/dharc-org/chad-ap/tree/main/development): `development`
- [Iteration diagrams](https://github.com/dharc-org/chad-ap/tree/main/diagrams): `diagrams`

### Data and queries

- [Example assertions](https://github.com/dharc-org/chad-ap/tree/main/development): `development`
- [ABox refactoring](https://github.com/dharc-org/chad-ap/blob/main/data/10/refactor.py): `data/10/refactor.py`
- [Mapping rules](https://github.com/dharc-org/chad-ap/blob/main/data/10/mapping.yaml): `data/10/mapping.yaml`
- [Refactored ABoxes](https://github.com/dharc-org/chad-ap/tree/main/data): `data`
- [Formal SPARQL questions](https://github.com/dharc-org/chad-ap/tree/main/sparql): `sparql`
- [Query test notebooks](https://github.com/dharc-org/chad-ap/tree/main/sparql): `sparql`

### Published profile

- [CHAD-AP ontology](https://github.com/dharc-org/chad-ap/blob/main/docs/current/chad-ap.ttl): `docs/current/chad-ap.ttl`
- [RDF serializations](https://github.com/dharc-org/chad-ap/tree/main/docs/current): `docs/current`
- [Profile documentation](https://github.com/dharc-org/chad-ap/blob/main/docs/current/description.md): `docs/current/description.md`

### Other components

- **Ontology author**

## Connections

- Ontology author → Motivating scenarios: defines scope (evidence: `README.md`)
- Ontology author → Competency questions: frames needs (evidence: `README.md`)
- Motivating scenarios → Iteration glossaries: yields terms (evidence: `README.md`)
- Competency questions → Iteration glossaries: inform terms (evidence: `README.md`)
- Iteration glossaries → Model diagrams: models concepts (evidence: `README.md`)
- Model diagrams → Terminology schemas: formalizes schema (evidence: `README.md`)
- Terminology schemas → Example assertions: organizes examples (evidence: `README.md`)
- Example assertions → ABox refactoring: provides input (evidence: `data/10/refactor.py`)
- Mapping rules → ABox refactoring: configures mapping (evidence: `data/10/refactor.py`)
- ABox refactoring → Refactored ABoxes: serializes output (evidence: `data/10/refactor.py`)
- Competency questions → Formal SPARQL questions: reformulated as (evidence: `README.md`)
- Formal SPARQL questions → Query test notebooks: tested in (evidence: `README.md`)
- Terminology schemas → Query test notebooks: tested against (evidence: `README.md`)
- Example assertions → Query test notebooks: tested against (evidence: `README.md`)
- Ontology author → Iteration diagrams: refines model (evidence: `README.md`)
- Terminology schemas → CHAD-AP ontology: forms profile (evidence: `README.md`)
- CHAD-AP ontology → RDF serializations: published as (evidence: `README.md`)
- CHAD-AP ontology → Profile documentation: described by (evidence: `README.md`)
