# thedestroyerks3004/agentic-slice-kit architecture

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

- Interactive diagram: https://gitdiagram.com/thedestroyerks3004/agentic-slice-kit
- Repository: https://github.com/thedestroyerks3004/agentic-slice-kit

## Overview

The repository combines two runtime products: the Agentic Slice Kit’s resumable, stateful workflow spine and SyllabusMind, a student-facing concept-mastery app. In the kit, a run is persisted, advanced through model/tool work, and can pause for an expert callback before resuming. SyllabusMind routes students through intake, diagnostic questions, a mastery graph, deeper practice, and a report. The graph keeps the archived full-scope app separate from the current app. Some SyllabusMind screens and integrations are unsampled, so their internal links are omitted where the excerpts do not establish them.

Main entry points: [`slice/runner.py`](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/runner.py) (Workflow Runner), [`syllabusmind/src/store/useApp.ts`](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/store/useApp.ts) (Student State), [`syllabusmind/src/App.tsx`](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/App.tsx) (App Router), [`syllabusmind/src/screens/GraphHome.tsx`](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/screens/GraphHome.tsx) (Mastery Graph)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_kit["Agentic Slice Kit"]
  node_expertform["Expert Form<br/>[expert.py]"]
end

subgraph group_runtime["Run Machinery"]
  node_runner["Workflow Runner<br/>[runner.py]"]
  node_records["Run Records<br/>[records.py]"]
  node_store[("Durable Store<br/>[store.py]")]
  node_config["Configuration<br/>[config.py]"]
  node_budget["Run Budgets<br/>[budget.py]"]
  node_llm["Model Calls<br/>[llm.py]"]
  node_retrieve["Retrieval<br/>[retrieve.py]"]
  node_callback["Human Callback<br/>[callback.py]"]
end

subgraph group_mind["SyllabusMind App"]
  node_app["App Router<br/>[App.tsx]"]
  node_intake["Student Intake<br/>[Intake.tsx]"]
  node_diagnostic["Diagnostic<br/>[Diagnostic.tsx]"]
  node_graphhome["Mastery Graph<br/>[GraphHome.tsx]"]
  node_deepdive["Topic Deep Dive<br/>[DeepDive.tsx]"]
  node_report["Learning Report<br/>[Report.tsx]"]
  node_appstate[("Student State<br/>[useApp.ts]")]
  node_archiveapp["Archived App Router<br/>[App.tsx]"]
  node_archivestore[("Archived Student State<br/>[useApp.ts]")]
end

subgraph group_learning["Learning Engine"]
  node_questions["Question Generation<br/>[questions.ts]"]
  node_model["LLM Gateway<br/>[llm.ts]"]
  node_conceptgraph["Concept Graph<br/>[graph.ts]"]
  node_mastery["Mastery Scoring<br/>[mastery.ts]"]
  node_dbmsgraph["DBMS Graph Data<br/>[dbmsGraph.ts]"]
  node_persistence["Browser Persistence<br/>[persist.ts]"]
  node_reportlogic["Report Insights<br/>[report.ts]"]
  node_archivecontent["Archived Content Tools<br/>[content.ts]"]
  node_archiveprop["Mastery Propagation<br/>[propagation.ts]"]
end

node_builder(("Agent Builder"))
node_expert(("Human Expert"))

node_builder -->|"builds on"| node_runner
node_expert -->|"answers"| node_expertform
node_runner -->|"reads and writes"| node_store
node_runner -->|"uses"| node_records
node_runner -->|"loads"| node_config
node_runner -->|"checks"| node_budget
node_runner -->|"calls"| node_llm
node_runner -->|"suspends via"| node_callback
node_runner -.->|"uses"| node_retrieve
node_callback -->|"persists questions"| node_store
node_expertform -->|"answers callback"| node_callback
node_app -->|"reads state"| node_appstate
node_app -->|"routes to"| node_intake
node_app -->|"routes to"| node_diagnostic
node_app -->|"routes to"| node_graphhome
node_app -->|"routes to"| node_deepdive
node_app -->|"routes to"| node_report
node_appstate -->|"generates questions"| node_questions
node_appstate -->|"orders diagnostics"| node_conceptgraph
node_appstate -->|"updates beliefs"| node_mastery
node_appstate -->|"loads graph"| node_dbmsgraph
node_appstate -->|"persists state"| node_persistence
node_questions -.->|"requests generation"| node_model
node_graphhome -->|"reads learning state"| node_appstate
node_graphhome -->|"uses graph helpers"| node_conceptgraph
node_graphhome -->|"uses graph data"| node_dbmsgraph
node_report -->|"reads session"| node_appstate
node_report -->|"builds report"| node_reportlogic
node_archiveapp -->|"reads state"| node_archivestore
node_archivestore -->|"generates content"| node_archivecontent
node_archivestore -->|"uses propagation"| node_archiveprop

click node_runner "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/runner.py"
click node_records "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/records.py"
click node_store "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/store.py"
click node_config "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/config.py"
click node_budget "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/budget.py"
click node_llm "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/llm.py"
click node_retrieve "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/retrieve.py"
click node_callback "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/callback.py"
click node_expertform "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/web/expert.py"
click node_app "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/App.tsx"
click node_intake "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/screens/Intake.tsx"
click node_diagnostic "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/screens/Diagnostic.tsx"
click node_graphhome "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/screens/GraphHome.tsx"
click node_deepdive "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/screens/DeepDive.tsx"
click node_report "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/screens/Report.tsx"
click node_appstate "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/store/useApp.ts"
click node_questions "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/lib/questions.ts"
click node_model "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/lib/llm.ts"
click node_conceptgraph "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/engine/graph.ts"
click node_mastery "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/engine/mastery.ts"
click node_dbmsgraph "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/lib/dbmsGraph.ts"
click node_persistence "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/lib/persist.ts"
click node_reportlogic "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/lib/report.ts"
click node_archiveapp "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/archive/full-scope/src/App.tsx"
click node_archivestore "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/archive/full-scope/src/store/useApp.ts"
click node_archivecontent "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/archive/full-scope/src/lib/content.ts"
click node_archiveprop "https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/archive/full-scope/src/engine/propagation.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_expertform toneBlue
class node_runner,node_records,node_store,node_config,node_budget,node_llm,node_retrieve,node_callback toneAmber
class node_app,node_intake,node_diagnostic,node_graphhome,node_deepdive,node_report,node_appstate,node_archiveapp,node_archivestore toneMint
class node_questions,node_model,node_conceptgraph,node_mastery,node_dbmsgraph,node_persistence,node_reportlogic,node_archivecontent,node_archiveprop toneRose
class node_builder,node_expert toneIndigo
```

## Components

### Agentic Slice Kit

- [Expert Form](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/web/expert.py): `web/expert.py`

### Run Machinery

- [Workflow Runner](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/runner.py): `slice/runner.py`
- [Run Records](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/records.py): `slice/records.py`
- [Durable Store](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/store.py): `slice/store.py`
- [Configuration](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/config.py): `slice/config.py`
- [Run Budgets](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/budget.py): `slice/budget.py`
- [Model Calls](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/llm.py): `slice/llm.py`
- [Retrieval](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/retrieve.py): `slice/retrieve.py`
- [Human Callback](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/slice/callback.py): `slice/callback.py`

### SyllabusMind App

- [App Router](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/App.tsx): `syllabusmind/src/App.tsx`
- [Student Intake](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/screens/Intake.tsx): `syllabusmind/src/screens/Intake.tsx`
- [Diagnostic](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/screens/Diagnostic.tsx): `syllabusmind/src/screens/Diagnostic.tsx`
- [Mastery Graph](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/screens/GraphHome.tsx): `syllabusmind/src/screens/GraphHome.tsx`
- [Topic Deep Dive](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/screens/DeepDive.tsx): `syllabusmind/src/screens/DeepDive.tsx`
- [Learning Report](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/screens/Report.tsx): `syllabusmind/src/screens/Report.tsx`
- [Student State](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/store/useApp.ts): `syllabusmind/src/store/useApp.ts`
- [Archived App Router](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/archive/full-scope/src/App.tsx): `syllabusmind/archive/full-scope/src/App.tsx`
- [Archived Student State](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/archive/full-scope/src/store/useApp.ts): `syllabusmind/archive/full-scope/src/store/useApp.ts`

### Learning Engine

- [Question Generation](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/lib/questions.ts): `syllabusmind/src/lib/questions.ts`
- [LLM Gateway](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/lib/llm.ts): `syllabusmind/src/lib/llm.ts`
- [Concept Graph](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/engine/graph.ts): `syllabusmind/src/engine/graph.ts`
- [Mastery Scoring](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/engine/mastery.ts): `syllabusmind/src/engine/mastery.ts`
- [DBMS Graph Data](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/lib/dbmsGraph.ts): `syllabusmind/src/lib/dbmsGraph.ts`
- [Browser Persistence](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/lib/persist.ts): `syllabusmind/src/lib/persist.ts`
- [Report Insights](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/src/lib/report.ts): `syllabusmind/src/lib/report.ts`
- [Archived Content Tools](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/archive/full-scope/src/lib/content.ts): `syllabusmind/archive/full-scope/src/lib/content.ts`
- [Mastery Propagation](https://github.com/thedestroyerks3004/agentic-slice-kit/blob/main/syllabusmind/archive/full-scope/src/engine/propagation.ts): `syllabusmind/archive/full-scope/src/engine/propagation.ts`

### Other components

- **Agent Builder**
- **Human Expert**

## Connections

- Agent Builder → Workflow Runner: builds on (evidence: `README.md`)
- Human Expert → Expert Form: answers (evidence: `README.md`)
- Workflow Runner → Durable Store: reads and writes (evidence: `slice/runner.py`)
- Workflow Runner → Run Records: uses (evidence: `slice/runner.py`)
- Workflow Runner → Configuration: loads (evidence: `slice/runner.py`)
- Workflow Runner → Run Budgets: checks (evidence: `slice/runner.py`)
- Workflow Runner → Model Calls: calls (evidence: `slice/runner.py`)
- Workflow Runner → Human Callback: suspends via (evidence: `slice/runner.py`)
- Workflow Runner → Retrieval: uses
- Human Callback → Durable Store: persists questions (evidence: `slice/callback.py`)
- Expert Form → Human Callback: answers callback (evidence: `web/expert.py`)
- App Router → Student State: reads state (evidence: `syllabusmind/src/App.tsx`)
- App Router → Student Intake: routes to (evidence: `syllabusmind/src/App.tsx`)
- App Router → Diagnostic: routes to (evidence: `syllabusmind/src/App.tsx`)
- App Router → Mastery Graph: routes to (evidence: `syllabusmind/src/App.tsx`)
- App Router → Topic Deep Dive: routes to (evidence: `syllabusmind/src/App.tsx`)
- App Router → Learning Report: routes to (evidence: `syllabusmind/src/App.tsx`)
- Student State → Question Generation: generates questions (evidence: `syllabusmind/src/store/useApp.ts`)
- Student State → Concept Graph: orders diagnostics (evidence: `syllabusmind/src/store/useApp.ts`)
- Student State → Mastery Scoring: updates beliefs (evidence: `syllabusmind/src/store/useApp.ts`)
- Student State → DBMS Graph Data: loads graph (evidence: `syllabusmind/src/store/useApp.ts`)
- Student State → Browser Persistence: persists state (evidence: `syllabusmind/src/store/useApp.ts`)
- Question Generation → LLM Gateway: requests generation
- Mastery Graph → Student State: reads learning state (evidence: `syllabusmind/src/screens/GraphHome.tsx`)
- Mastery Graph → Concept Graph: uses graph helpers (evidence: `syllabusmind/src/screens/GraphHome.tsx`)
- Mastery Graph → DBMS Graph Data: uses graph data (evidence: `syllabusmind/src/screens/GraphHome.tsx`)
- Learning Report → Student State: reads session (evidence: `syllabusmind/src/screens/Report.tsx`)
- Learning Report → Report Insights: builds report (evidence: `syllabusmind/src/screens/Report.tsx`)
- Archived App Router → Archived Student State: reads state (evidence: `syllabusmind/archive/full-scope/src/App.tsx`)
- Archived Student State → Archived Content Tools: generates content (evidence: `syllabusmind/archive/full-scope/src/store/useApp.ts`)
- Archived Student State → Mastery Propagation: uses propagation (evidence: `syllabusmind/archive/full-scope/src/store/useApp.ts`)
