# stephs-repos/analysis-kit architecture

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

- Interactive diagram: https://gitdiagram.com/stephs-repos/analysis-kit
- Repository: https://github.com/stephs-repos/analysis-kit

## Overview

analysis-kit is a scaffolding framework for agent-operated data-analysis projects, not a runtime library. The main journey is install skills, scaffold a project, inspect/profile data, register claims, then validate and report whether each claim remains reproducible. The graph emphasizes that project workflow and the trust contract, alongside documented hooks, caveat-carrying memory, and optional Quarto reporting. Edges use README statements or indexed source references; several template subsystems are documented but not sampled, so their internal calls are omitted.

Main entry points: [`templates/analysis/_findings.py`](https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/_findings.py) (Findings ledger), [`bootstrap/new-project.sh`](https://github.com/stephs-repos/analysis-kit/blob/main/bootstrap/new-project.sh) (Create project), [`skills/akit-next.md`](https://github.com/stephs-repos/analysis-kit/blob/main/skills/akit-next.md) (Next-step guide), [`skills/akit-finding.md`](https://github.com/stephs-repos/analysis-kit/blob/main/skills/akit-finding.md) (Register finding)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_onboarding["Onboarding"]
  node_install["Install skills<br/>[install-skills.sh]"]
  node_scaffold["Create project<br/>[new-project.sh]"]
  node_fill["Customize scaffold<br/>[akit-fill.md]"]
  node_next["Next-step guide<br/>[akit-next.md]"]
end

subgraph group_analysis["Project analysis"]
  node_inspect["Inspect raw data<br/>[01_inspect_raw.py]"]
  node_profile["Profile data<br/>[02_profile.py]"]
  node_quarto["Quarto vignette<br/>[00_template.qmd]"]
end

subgraph group_trust["Claim integrity"]
  node_findings[("Findings ledger<br/>[_findings.py]")]
  node_finding_skill["Register finding<br/>[akit-finding.md]"]
  node_provenance["Pin provenance<br/>[_provenance.py]"]
  node_validate["Trust validator<br/>[validate.py]"]
  node_report["Status report<br/>[report.py]"]
  node_schemas["Finding schemas<br/>[schemas.py]"]
end

subgraph group_context["Project context"]
  node_decisions["Decision log<br/>[_decisions.py]"]
  node_live_docs["Live project docs"]
  node_memory["Caveat memory"]
  node_hooks["Workflow hooks<br/>[hooks]"]
end

node_user(("Analyst / agent"))
node_external_claude(("Claude Code"))

node_user -->|"installs"| node_install
node_user -->|"requests scaffold"| node_scaffold
node_install -->|"adds skills"| node_external_claude
node_user -->|"operates project"| node_external_claude
node_external_claude -->|"customizes"| node_fill
node_external_claude -->|"asks next step"| node_next
node_next -.->|"routes workflow"| node_inspect
node_next -->|"routes workflow"| node_finding_skill
node_inspect -.->|"prepares profiling"| node_profile
node_profile -->|"uses findings helper"| node_findings
node_finding_skill -->|"registers claims"| node_findings
node_findings -->|"pins input hashes"| node_provenance
node_findings -.->|"checks schema"| node_schemas
node_validate -->|"validates ledger"| node_findings
node_report -->|"reruns checks"| node_validate
node_report -->|"reads findings"| node_findings
node_decisions -.->|"documents decisions"| node_live_docs
node_memory -.->|"guides claim work"| node_finding_skill
node_hooks -->|"runs validation"| node_validate
node_quarto -.->|"supports reports"| node_external_claude
node_scaffold -->|"creates project"| node_fill
node_scaffold -->|"includes hooks"| node_hooks

click node_install "https://github.com/stephs-repos/analysis-kit/blob/main/bootstrap/install-skills.sh"
click node_scaffold "https://github.com/stephs-repos/analysis-kit/blob/main/bootstrap/new-project.sh"
click node_fill "https://github.com/stephs-repos/analysis-kit/blob/main/skills/akit-fill.md"
click node_next "https://github.com/stephs-repos/analysis-kit/blob/main/skills/akit-next.md"
click node_inspect "https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/01_inspect_raw.py"
click node_profile "https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/02_profile.py"
click node_findings "https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/_findings.py"
click node_finding_skill "https://github.com/stephs-repos/analysis-kit/blob/main/skills/akit-finding.md"
click node_provenance "https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/_provenance.py"
click node_validate "https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/validate.py"
click node_report "https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/report.py"
click node_schemas "https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/schemas.py"
click node_decisions "https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/_decisions.py"
click node_live_docs "https://github.com/stephs-repos/analysis-kit/tree/main/templates/live-docs"
click node_memory "https://github.com/stephs-repos/analysis-kit/tree/main/templates/memory"
click node_hooks "https://github.com/stephs-repos/analysis-kit/tree/main/templates/.claude/hooks"
click node_quarto "https://github.com/stephs-repos/analysis-kit/blob/main/templates/vignettes/00_template.qmd"

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_install,node_scaffold,node_fill,node_next toneBlue
class node_inspect,node_profile,node_quarto toneAmber
class node_findings,node_finding_skill,node_provenance,node_validate,node_report,node_schemas toneMint
class node_decisions,node_live_docs,node_memory,node_hooks toneRose
class node_user,node_external_claude toneIndigo
```

## Components

### Onboarding

- [Install skills](https://github.com/stephs-repos/analysis-kit/blob/main/bootstrap/install-skills.sh): `bootstrap/install-skills.sh`
- [Create project](https://github.com/stephs-repos/analysis-kit/blob/main/bootstrap/new-project.sh): `bootstrap/new-project.sh`
- [Customize scaffold](https://github.com/stephs-repos/analysis-kit/blob/main/skills/akit-fill.md): `skills/akit-fill.md`
- [Next-step guide](https://github.com/stephs-repos/analysis-kit/blob/main/skills/akit-next.md): `skills/akit-next.md`

### Project analysis

- [Inspect raw data](https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/01_inspect_raw.py): `templates/analysis/01_inspect_raw.py`
- [Profile data](https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/02_profile.py): `templates/analysis/02_profile.py`
- [Quarto vignette](https://github.com/stephs-repos/analysis-kit/blob/main/templates/vignettes/00_template.qmd): `templates/vignettes/00_template.qmd`

### Claim integrity

- [Findings ledger](https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/_findings.py): `templates/analysis/_findings.py`
- [Register finding](https://github.com/stephs-repos/analysis-kit/blob/main/skills/akit-finding.md): `skills/akit-finding.md`
- [Pin provenance](https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/_provenance.py): `templates/analysis/_provenance.py`
- [Trust validator](https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/validate.py): `templates/analysis/validate.py`
- [Status report](https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/report.py): `templates/analysis/report.py`
- [Finding schemas](https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/schemas.py): `templates/analysis/schemas.py`

### Project context

- [Decision log](https://github.com/stephs-repos/analysis-kit/blob/main/templates/analysis/_decisions.py): `templates/analysis/_decisions.py`
- [Live project docs](https://github.com/stephs-repos/analysis-kit/tree/main/templates/live-docs): `templates/live-docs`
- [Caveat memory](https://github.com/stephs-repos/analysis-kit/tree/main/templates/memory): `templates/memory`
- [Workflow hooks](https://github.com/stephs-repos/analysis-kit/tree/main/templates/.claude/hooks): `templates/.claude/hooks`

### Other components

- **Analyst / agent**
- **Claude Code**

## Connections

- Analyst / agent → Install skills: installs (evidence: `README.md`)
- Analyst / agent → Create project: requests scaffold (evidence: `README.md`)
- Install skills → Claude Code: adds skills (evidence: `README.md`)
- Analyst / agent → Claude Code: operates project (evidence: `README.md`)
- Claude Code → Customize scaffold: customizes (evidence: `README.md`)
- Claude Code → Next-step guide: asks next step (evidence: `README.md`)
- Next-step guide → Inspect raw data: routes workflow
- Next-step guide → Register finding: routes workflow (evidence: `README.md`)
- Inspect raw data → Profile data: prepares profiling
- Profile data → Findings ledger: uses findings helper (evidence: `templates/analysis/02_profile.py`)
- Register finding → Findings ledger: registers claims (evidence: `README.md`)
- Findings ledger → Pin provenance: pins input hashes (evidence: `templates/analysis/_findings.py`)
- Findings ledger → Finding schemas: checks schema
- Trust validator → Findings ledger: validates ledger (evidence: `templates/analysis/validate.py`)
- Status report → Trust validator: reruns checks (evidence: `templates/analysis/report.py`)
- Status report → Findings ledger: reads findings (evidence: `templates/analysis/report.py`)
- Decision log → Live project docs: documents decisions
- Caveat memory → Register finding: guides claim work
- Workflow hooks → Trust validator: runs validation (evidence: `README.md`)
- Quarto vignette → Claude Code: supports reports
- Create project → Customize scaffold: creates project (evidence: `README.md`)
- Create project → Workflow hooks: includes hooks (evidence: `README.md`)
