# macaokim98/prp-chatbot-suite architecture

> Architecture diagram of the GitHub repository macaokim98/prp-chatbot-suite, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-07-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/macaokim98/prp-chatbot-suite
- Repository: https://github.com/macaokim98/prp-chatbot-suite

## Overview

##### Project type and purpose
- This is a Python-based full-stack developer tool (the “PRP-ChatBot-Suite”) that streamlines the creation of Product Requirement Prompts (PRPs) via an interactive CLI chatbot, a smart questionnaire, and an optional Streamlit web interface.
- It leverages existing PRP templates, AI documentation (Claude Code), and a PRP runner to generate, validate, and execute PRP “vertical slices” in one pass.

##### File structure
- Top-level:
– PRPs/           ← content store (templates, docs, examples, scripts)
– chatbot/        ← UI modules (CLI chat, smart chat, questionnaire, Streamlit UI)
– README.md, LICENSE, .gitignore, CHANGELOG.md, CLAUDE.md
- PRPs/ subdirectories:
– templates/     ← base Markdown templates for prompts
– scripts/       ← prp_runner.py (executes PRP workflows)
– ai_docs/       ← Claude Code reference docs
– guides/, examples/ ← user guides & sample PRPs
- chatbot/ subdirectories:
– prp_chat.py           ← main CLI chatbot entrypoint
– prp_smart_chat.py     ← enhanced CLI with context-aware suggestions
– prp_questionnaire.py  ← non-developer friendly Q&A flow
– ui/streamlit_app.py   ← optional browser UI

##### README for additional insights
- Describes the PRP methodology (Goal, Why, Context, Blueprint, Validation).
- Defines three user-facing interfaces (CLI, questionnaire, web).
- Mentions dependencies: Python 3.8+, optional Claude Code integration, Streamlit for UI.
- Highlights key modules and workflow: from user input → AI agent → PRP output → runner execution.

##### Diagrammatic elements
- User → CLI/Web UI → PRP Engine → External AI → PRP Engine → File System/Runner
- Green for core engine modules
- Orange for data layer (templates, docs, output files)
- Gray for external services (Claude Code API)

##### Detail
- Entry script as its own UI node.
- Template repository and AI docs as separate resource stores.
- Don’t omit the optional Streamlit UI path or the integration point for Claude Code.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "End Users"
        Dev["Developer"]:::user
        NonDev["Non-Developer"]:::user
    end

    subgraph "Presentation Layer"
        CLI["CLI Chatbot: prp_chat.py"]:::ui
        SmartCLI["Smart CLI Chatbot: prp_smart_chat.py"]:::ui
        Question["Questionnaire: prp_questionnaire.py"]:::ui
        Streamlit["Web UI (Streamlit): chatbot/ui/streamlit_app.py"]:::ui
    end

    subgraph "Application Layer"
        Engine["PRP Engine & Runner: PRPs/scripts/prp_runner.py"]:::core
        TemplateMgr["Template Manager: PRPs/templates/"]:::core
        AIDocs["AI Documentation: PRPs/ai_docs/"]:::core
    end

    subgraph "Data Layer"
        Examples["Example Scenarios: PRPs/examples/"]:::data
        Guides["User Guides: PRPs/guides/"]:::data
        Generated["Generated PRP Output"]:::data
        Reports["Runner Reports"]:::data
    end

    subgraph "External Services"
        Claude["Claude Code API"]:::external
        PythonPkg["Python Runtime & Packages"]:::external
    end

    %% User to Presentation
    Dev --> CLI
    Dev --> SmartCLI
    Dev --> Streamlit
    NonDev --> Question
    NonDev --> Streamlit

    %% Presentation to Application
    CLI --> Engine
    SmartCLI --> Engine
    Question --> Engine
    Streamlit --> Engine
    CLI --> TemplateMgr
    SmartCLI --> TemplateMgr
    Question --> TemplateMgr
    Streamlit --> TemplateMgr
    CLI --> AIDocs
    SmartCLI --> AIDocs
    Question --> AIDocs
    Streamlit --> AIDocs

    %% Application to External
    Engine --> Claude
    Claude --> Engine
    CLI --> PythonPkg
    SmartCLI --> PythonPkg
    Question --> PythonPkg
    Streamlit --> PythonPkg

    %% Application to Data
    TemplateMgr --> Examples
    TemplateMgr --> Guides
    AIDocs --> Examples
    AIDocs --> Guides
    Engine --> Generated
    Engine --> Reports

    %% Click Events
    click CLI "https://github.com/macaokim98/prp-chatbot-suite/blob/main/chatbot/prp_chat.py"
    click SmartCLI "https://github.com/macaokim98/prp-chatbot-suite/blob/main/chatbot/prp_smart_chat.py"
    click Question "https://github.com/macaokim98/prp-chatbot-suite/blob/main/chatbot/prp_questionnaire.py"
    click Engine "https://github.com/macaokim98/prp-chatbot-suite/blob/main/PRPs/scripts/prp_runner.py"
    click TemplateMgr "https://github.com/macaokim98/prp-chatbot-suite/tree/main/PRPs/templates/"
    click AIDocs "https://github.com/macaokim98/prp-chatbot-suite/tree/main/PRPs/ai_docs/"
    click Examples "https://github.com/macaokim98/prp-chatbot-suite/tree/main/PRPs/examples/"
    click Guides "https://github.com/macaokim98/prp-chatbot-suite/tree/main/PRPs/guides/"

    classDef user fill:#E3F2FD,stroke:#64B5F6,color:#0D47A1,stroke-width:1px;
    classDef ui fill:#BBDEFB,stroke:#1E88E5,color:#0D47A1,stroke-width:1px;
    classDef core fill:#C8E6C9,stroke:#43A047,color:#1B5E20,stroke-width:1px;
    classDef data fill:#FFE0B2,stroke:#FB8C00,color:#E65100,stroke-width:1px;
    classDef external fill:#ECEFF1,stroke:#90A4AE,color:#37474F,stroke-width:1px;
```
