# agency-fund/besci-skills architecture

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

- Interactive diagram: https://gitdiagram.com/agency-fund/besci-skills
- Repository: https://github.com/agency-fund/besci-skills

## Overview

BeSci Skills is an open library of behavioral-science methods packaged as reusable AI skills, with a navigator that helps users identify a task and choose skills or a workflow. The repository also provides a discovery site, skill contribution and review processes, and ratings. The graph captures those documented product paths and sampled API calls; some site and skill behavior is represented at directory level because its source was not excerpted.

Main entry points: [`api/review.py`](https://github.com/agency-fund/besci-skills/blob/main/api/review.py) (Expert review filing), [`skills/besci-navigator/SKILL.md`](https://github.com/agency-fund/besci-skills/blob/main/skills/besci-navigator/SKILL.md) (Skill navigator), [`api/submit.py`](https://github.com/agency-fund/besci-skills/blob/main/api/submit.py) (Skill submission), [`api/auth.py`](https://github.com/agency-fund/besci-skills/blob/main/api/auth.py) (Sign-in API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_skills["Skills and workflows"]
  node_skill_library["Atomic skills"]
  node_navigator["Skill navigator<br/>[SKILL.md]"]
  node_workflows["Guided workflows"]
end

subgraph group_discovery["Catalog discovery"]
  node_catalog["Skill catalog<br/>[app.js]"]
  node_skill_map["Skill map<br/>[map.js]"]
  node_workflow_browser["Workflow browser<br/>[workflow.js]"]
  node_feedback_ui["Feedback interface<br/>[feedback.js]"]
end

subgraph group_contribution["Skill contributions"]
  node_upload_api["Skill submission<br/>[submit.py]"]
  node_archive["Skill archive handling<br/>[skillzip.py]"]
  node_validator["Skill validator<br/>[besci_validate.py]"]
end

subgraph group_feedback["Community feedback"]
  node_ratings_api["Ratings API<br/>[ratings.py]"]
  node_review_api["Expert review filing<br/>[review.py]"]
  node_reviews_api["Published reviews API<br/>[reviews.py]"]
  node_review_format["Review issue format<br/>[_review_issue.py]"]
end

subgraph group_shared["Shared services"]
  node_auth_api["Sign-in API<br/>[auth.py]"]
  node_common["Shared API services<br/>[_common.py]"]
  node_database[("Supabase data")]
  node_site_builder["Catalog site builder<br/>[build_site.py]"]
  node_catalog_snapshot["Navigator catalog snapshot"]
  node_evals["Skill evaluations<br/>[run_evals.py]"]
end

node_user(("Practitioner or learner"))
node_assistant(("AI assistant"))
node_github["GitHub"]
node_google["Google sign-in"]

node_user -->|"describes problem"| node_navigator
node_navigator -->|"asks questions"| node_user
node_navigator -->|"recommends skills"| node_skill_library
node_navigator -->|"matches workflow"| node_workflows
node_assistant -->|"uses installed skills"| node_skill_library
node_user -->|"browses skills"| node_catalog
node_user -->|"explores map"| node_skill_map
node_user -->|"browses workflows"| node_workflow_browser
node_user -->|"submits skill"| node_upload_api
node_upload_api -->|"unpacks archive"| node_archive
node_upload_api -->|"validates skill"| node_validator
node_upload_api -->|"opens pull request"| node_github
node_user -->|"signs in"| node_auth_api
node_auth_api -->|"verifies credentials"| node_common
node_auth_api -->|"records sign-in"| node_database
node_user -->|"rates skill"| node_ratings_api
node_ratings_api -->|"uses shared services"| node_common
node_ratings_api -->|"reads and writes"| node_database
node_user -->|"files expert review"| node_review_api
node_review_api -->|"checks eligibility"| node_common
node_review_api -->|"renders issue"| node_review_format
node_review_api -->|"opens issue"| node_github
node_review_api -->|"records review"| node_database
node_reviews_api -->|"uses shared services"| node_common
node_reviews_api -->|"parses issues"| node_review_format
node_reviews_api -->|"lists review issues"| node_github
node_feedback_ui -.->|"loads ratings"| node_ratings_api
node_feedback_ui -.->|"loads reviews"| node_reviews_api
node_site_builder -->|"reads skill content"| node_skill_library
node_site_builder -->|"reads workflows"| node_workflows
node_catalog_snapshot -->|"uses validation"| node_validator
node_evals -->|"checks skill structure"| node_validator
node_auth_api -->|"verifies token"| node_google

click node_skill_library "https://github.com/agency-fund/besci-skills/tree/main/skills"
click node_navigator "https://github.com/agency-fund/besci-skills/blob/main/skills/besci-navigator/SKILL.md"
click node_workflows "https://github.com/agency-fund/besci-skills/tree/main/workflows"
click node_catalog "https://github.com/agency-fund/besci-skills/blob/main/site/src/app.js"
click node_skill_map "https://github.com/agency-fund/besci-skills/blob/main/site/src/map.js"
click node_workflow_browser "https://github.com/agency-fund/besci-skills/blob/main/site/src/workflow.js"
click node_feedback_ui "https://github.com/agency-fund/besci-skills/blob/main/site/src/feedback.js"
click node_upload_api "https://github.com/agency-fund/besci-skills/blob/main/api/submit.py"
click node_archive "https://github.com/agency-fund/besci-skills/blob/main/scripts/skillzip.py"
click node_validator "https://github.com/agency-fund/besci-skills/blob/main/scripts/besci_validate.py"
click node_ratings_api "https://github.com/agency-fund/besci-skills/blob/main/api/ratings.py"
click node_review_api "https://github.com/agency-fund/besci-skills/blob/main/api/review.py"
click node_reviews_api "https://github.com/agency-fund/besci-skills/blob/main/api/reviews.py"
click node_review_format "https://github.com/agency-fund/besci-skills/blob/main/api/_review_issue.py"
click node_auth_api "https://github.com/agency-fund/besci-skills/blob/main/api/auth.py"
click node_common "https://github.com/agency-fund/besci-skills/blob/main/api/_common.py"
click node_site_builder "https://github.com/agency-fund/besci-skills/blob/main/scripts/build_site.py"
click node_catalog_snapshot "https://github.com/agency-fund/besci-skills/blob/main/scripts/snapshot_catalog.py"
click node_evals "https://github.com/agency-fund/besci-skills/blob/main/skills/besci-eval/scripts/run_evals.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_library,node_navigator,node_workflows toneBlue
class node_catalog,node_skill_map,node_workflow_browser,node_feedback_ui toneAmber
class node_upload_api,node_archive,node_validator toneMint
class node_ratings_api,node_review_api,node_reviews_api,node_review_format toneRose
class node_auth_api,node_common,node_database,node_site_builder,node_catalog_snapshot,node_evals,node_user,node_assistant,node_github,node_google toneIndigo
```

## Components

### Skills and workflows

- [Atomic skills](https://github.com/agency-fund/besci-skills/tree/main/skills): `skills`
- [Skill navigator](https://github.com/agency-fund/besci-skills/blob/main/skills/besci-navigator/SKILL.md): `skills/besci-navigator/SKILL.md`
- [Guided workflows](https://github.com/agency-fund/besci-skills/tree/main/workflows): `workflows`

### Catalog discovery

- [Skill catalog](https://github.com/agency-fund/besci-skills/blob/main/site/src/app.js): `site/src/app.js`
- [Skill map](https://github.com/agency-fund/besci-skills/blob/main/site/src/map.js): `site/src/map.js`
- [Workflow browser](https://github.com/agency-fund/besci-skills/blob/main/site/src/workflow.js): `site/src/workflow.js`
- [Feedback interface](https://github.com/agency-fund/besci-skills/blob/main/site/src/feedback.js): `site/src/feedback.js`

### Skill contributions

- [Skill submission](https://github.com/agency-fund/besci-skills/blob/main/api/submit.py): `api/submit.py`
- [Skill archive handling](https://github.com/agency-fund/besci-skills/blob/main/scripts/skillzip.py): `scripts/skillzip.py`
- [Skill validator](https://github.com/agency-fund/besci-skills/blob/main/scripts/besci_validate.py): `scripts/besci_validate.py`

### Community feedback

- [Ratings API](https://github.com/agency-fund/besci-skills/blob/main/api/ratings.py): `api/ratings.py`
- [Expert review filing](https://github.com/agency-fund/besci-skills/blob/main/api/review.py): `api/review.py`
- [Published reviews API](https://github.com/agency-fund/besci-skills/blob/main/api/reviews.py): `api/reviews.py`
- [Review issue format](https://github.com/agency-fund/besci-skills/blob/main/api/_review_issue.py): `api/_review_issue.py`

### Shared services

- [Sign-in API](https://github.com/agency-fund/besci-skills/blob/main/api/auth.py): `api/auth.py`
- [Shared API services](https://github.com/agency-fund/besci-skills/blob/main/api/_common.py): `api/_common.py`
- **Supabase data**
- [Catalog site builder](https://github.com/agency-fund/besci-skills/blob/main/scripts/build_site.py): `scripts/build_site.py`
- [Navigator catalog snapshot](https://github.com/agency-fund/besci-skills/blob/main/scripts/snapshot_catalog.py): `scripts/snapshot_catalog.py`
- [Skill evaluations](https://github.com/agency-fund/besci-skills/blob/main/skills/besci-eval/scripts/run_evals.py): `skills/besci-eval/scripts/run_evals.py`

### Other components

- **Practitioner or learner**
- **AI assistant**
- **GitHub**
- **Google sign-in**

## Connections

- Practitioner or learner → Skill navigator: describes problem (evidence: `README.md`)
- Skill navigator → Practitioner or learner: asks questions (evidence: `README.md`)
- Skill navigator → Atomic skills: recommends skills (evidence: `README.md`)
- Skill navigator → Guided workflows: matches workflow (evidence: `README.md`)
- AI assistant → Atomic skills: uses installed skills (evidence: `README.md`)
- Practitioner or learner → Skill catalog: browses skills (evidence: `README.md`)
- Practitioner or learner → Skill map: explores map (evidence: `README.md`)
- Practitioner or learner → Workflow browser: browses workflows (evidence: `README.md`)
- Practitioner or learner → Skill submission: submits skill (evidence: `api/submit.py`)
- Skill submission → Skill archive handling: unpacks archive (evidence: `api/submit.py`)
- Skill submission → Skill validator: validates skill (evidence: `api/submit.py`)
- Skill submission → GitHub: opens pull request (evidence: `api/submit.py`)
- Practitioner or learner → Sign-in API: signs in (evidence: `api/auth.py`)
- Sign-in API → Shared API services: verifies credentials (evidence: `api/auth.py`)
- Sign-in API → Supabase data: records sign-in (evidence: `api/auth.py`)
- Practitioner or learner → Ratings API: rates skill (evidence: `api/ratings.py`)
- Ratings API → Shared API services: uses shared services (evidence: `api/ratings.py`)
- Ratings API → Supabase data: reads and writes (evidence: `api/ratings.py`)
- Practitioner or learner → Expert review filing: files expert review (evidence: `api/review.py`)
- Expert review filing → Shared API services: checks eligibility (evidence: `api/review.py`)
- Expert review filing → Review issue format: renders issue (evidence: `api/review.py`)
- Expert review filing → GitHub: opens issue (evidence: `api/review.py`)
- Expert review filing → Supabase data: records review (evidence: `api/review.py`)
- Published reviews API → Shared API services: uses shared services (evidence: `api/reviews.py`)
- Published reviews API → Review issue format: parses issues (evidence: `api/reviews.py`)
- Published reviews API → GitHub: lists review issues (evidence: `api/reviews.py`)
- Feedback interface → Ratings API: loads ratings
- Feedback interface → Published reviews API: loads reviews
- Catalog site builder → Atomic skills: reads skill content (evidence: `scripts/build_site.py`)
- Catalog site builder → Guided workflows: reads workflows (evidence: `scripts/build_site.py`)
- Navigator catalog snapshot → Skill validator: uses validation (evidence: `scripts/snapshot_catalog.py`)
- Skill evaluations → Skill validator: checks skill structure (evidence: `skills/besci-eval/scripts/run_evals.py`)
- Sign-in API → Google sign-in: verifies token (evidence: `api/auth.py`)
