Company Knowledge Builder (ZIP-Based)

Overview

Instead of connecting directly to GitHub repositories, the system
accepts a ZIP archive containing a company’s project. This makes it
suitable for environments where repositories cannot be shared publicly
or where source code is exchanged as archives.

The goal is to transform the project into an AI-native knowledge base
using the Open Knowledge Format (OKF), where knowledge is organized into
linked Markdown pages rather than scattered documentation.

------------------------------------------------------------------------

High-Level Pipeline

            Project ZIP
                 │
                 ▼
          Extract Archive
                 │
                 ▼
         Repository Analyzer
                 │
                 ▼
      File & Dependency Analysis
                 │
                 ▼
          LLM Concept Extraction
                 │
                 ▼
           Knowledge Linking
                 │
                 ▼
          Generate OKF Bundle

    knowledge/
        architecture/
        services/
        database/
        api/
        playbooks/
        glossary/
        index.md

------------------------------------------------------------------------

Inputs

The user uploads:

-   ZIP archive of the project
-   Optional README
-   Optional documentation folder
-   Optional API specifications (OpenAPI, Swagger)
-   Optional database schema

No Git history is required.

------------------------------------------------------------------------

Processing Stages

1. Archive Extraction

-   Extract ZIP
-   Detect project type
-   Ignore build artifacts
-   Preserve directory structure

------------------------------------------------------------------------

2. Repository Understanding

Automatically identify:

-   Languages
-   Frameworks
-   Services
-   Configuration files
-   APIs
-   Database models
-   Queues
-   Background workers
-   Deployment files

------------------------------------------------------------------------

3. Dependency Graph

Construct relationships between:

-   Modules
-   Packages
-   Services
-   APIs
-   Databases
-   Infrastructure

------------------------------------------------------------------------

4. Concept Extraction

Use an LLM to identify high-level concepts such as:

-   Services
-   Business domains
-   APIs
-   Databases
-   Authentication
-   Background jobs
-   Caching
-   Deployment
-   Monitoring
-   External integrations

Each concept becomes an OKF page.

------------------------------------------------------------------------

5. Knowledge Linking

Instead of duplicate documentation, build links:

Payment Service ↓ Invoice Service ↓ Retry Queue ↓ Kafka ↓ PostgreSQL

This creates a navigable knowledge graph.

------------------------------------------------------------------------

6. OKF Generation

Example output:

knowledge/

    architecture/
        overview.md

    services/
        payment.md
        user.md
        notification.md

    api/
        authentication.md

    database/
        users.md
        orders.md

    playbooks/
        deployment.md

    glossary/
        redis.md

    index.md

------------------------------------------------------------------------

Example OKF Page

YAML Metadata

type: service title: Payment Service owner: Payments Team tags: -
payments - backend

Markdown Body

Payment Service

Responsibilities

-   Authorize payments
-   Process refunds

Dependencies

-   PostgreSQL
-   Redis
-   Kafka

Related

[[Invoice Service]] [[Retry Queue]]

------------------------------------------------------------------------

AI Features

Architecture Explorer

Ask:

“Explain how authentication works.”

The system traverses linked concepts and generates an explanation.

------------------------------------------------------------------------

Impact Analysis

Ask:

“What breaks if Payment Service changes?”

The graph identifies dependent services and APIs.

------------------------------------------------------------------------

Onboarding Assistant

Generate learning paths for new engineers by following the dependency
graph.

------------------------------------------------------------------------

Documentation Freshness

Each page receives a freshness score based on:

-   Source modifications
-   Missing links
-   Stale documentation
-   Conflicting information

------------------------------------------------------------------------

Future Extensions

-   Incremental updates by uploading newer ZIP versions
-   Visual dependency graph
-   Mermaid diagram generation
-   Hybrid semantic + graph search
-   Automatic documentation improvement suggestions
-   MCP server exposing the OKF bundle
-   Multi-project knowledge federation

------------------------------------------------------------------------

Suggested Tech Stack

Backend - FastAPI

Workers - Celery or asynchronous task queue

LLM - Gemini 3 Flash Lite for extraction - Gemini 3 Pro for synthesis

Knowledge Storage - Git repository containing the OKF bundle

Search - Hybrid BM25 + Vector Search

Graph - NetworkX initially - Neo4j for larger deployments

Frontend - React + React Flow or Cytoscape.js

------------------------------------------------------------------------

MVP

1.  Upload a ZIP archive.
2.  Extract the project.
3.  Analyze repository structure.
4.  Generate an OKF knowledge bundle.
5.  Ask questions over the generated knowledge.

This MVP demonstrates automated project understanding without requiring
direct GitHub access and forms the foundation for a scalable AI-powered
company knowledge platform.
