Skip to content

DynamicDigitalBrain

complexity tests ci/cd docs

An AI-powered knowledge base that automatically scans an organization's GitHub repositories, generates structured summaries and architecture diagrams, and publishes them as a searchable MkDocs site. Used by engineering teams to document and explore their codebase.

Repository: DynamicDigitalUSA/DynamicDigitalBrain
Pattern: Agent-based orchestration with a scheduler; multi-agent pipeline (Architect, Builder, Spec Writer, Site Builder) that runs on a cron schedule.
Entry Points: index.js
Tags: AI knowledge-base documentation-generator MkDocs repo-analysis agent-based

Last scanned: Mon, 29 Jun 2026 16:06:27 GMT


Purpose

An AI-powered knowledge base that automatically scans an organization's GitHub repositories, generates structured summaries and architecture diagrams, and publishes them as a searchable MkDocs site. Used by engineering teams to document and explore their codebase.

Tech Stack

  • Node.js
  • JavaScript
  • MkDocs
  • SQLite
  • Docker
  • Anthropic Claude API
  • GitHub API (Octokit)

Architecture

The codebase is organized as a modular Node.js application with separate agent modules under src/agents/ and library utilities under src/lib/. The main entry point index.js parses CLI arguments and triggers the architect agent, which orchestrates the pipeline. Generated documentation is written to the docs/ directory and published via MkDocs. State is tracked in a local SQLite database (brain.db).

Architecture Diagram

flowchart TD
    subgraph Scheduler["Scheduler"]
        cron["node-cron"]
    end

    subgraph Pipeline["Multi-Agent Pipeline"]
        agent_arch["Architect Agent"]
        agent_builder["Builder Agent"]
        agent_spec["Spec Writer Agent"]
        agent_site["Site Builder"]
    end

    subgraph Storage["State & Output"]
        db[(SQLite brain.db)]
        docs["MkDocs docs/"]
    end

    subgraph External["External Services"]
        github["GitHub API (Octokit)"]
        claude["Anthropic Claude API"]
    end

    index["index.js (CLI Entry)"] --> cron
    cron --> agent_arch
    agent_arch --> agent_builder
    agent_builder --> agent_spec
    agent_spec --> agent_site
    agent_arch --> db
    agent_builder --> db
    agent_spec --> db
    agent_site --> docs
    agent_arch --> github
    agent_builder --> claude
    agent_spec --> claude

Dependencies

Critical Dependencies

  • @anthropic-ai/sdk
  • @octokit/rest
  • better-sqlite3
  • node-cron

⚠️ Vulnerabilities & Risks

  • API keys (Anthropic, GitHub) are stored in plain text .env file; no encryption or secrets manager in use.
  • No input validation or sanitization of repository names or file contents before passing to Claude or writing to disk; potential for prompt injection or XSS if malicious repo data is processed.
  • SQLite database brain.db is not encrypted; sensitive metadata (e.g., commit SHAs, repo names) stored in plaintext.

💡 Suggestions

  • Migrate to TypeScript for better type safety and maintainability, aligning with the company's preferred stack.
  • Adopt a secrets manager (e.g., AWS Secrets Manager or GitHub Actions secrets) instead of .env for production deployments.
  • Add input validation and rate limiting for external API calls to prevent abuse.
  • Implement automated tests (unit/integration) for each agent to ensure reliability; current test coverage signal is none.
  • Add a CI/CD pipeline (e.g., GitHub Actions) to run scans on push or schedule, and deploy MkDocs site automatically.