How gdogg371/chatgpt-agent-ai works
This repository provides a Python code-maintenance backend, with a documented CLI workflow for scanning Python docstrings, building prompts, and injecting them into a code bundle. Its capability-based Spine routes runtime work; the prompt engine describes broader fetch-to-patch stages, and patch components handle generated updates. A separate packager builds bundle artifacts and guides. The README is empty, so product scope and relationships below rely on the file tree and the sampled source/SOURCE INDEX; some subsystems are represented without asserted call links where implementation was not shown.
Main entry points: docstring.py Docstring CLI · bootstrap.py Spine Bootstrap · orchestrator.py Capability Orchestrator · docstring_writer.py Docstring Persistence
Components 27
Entry And Runtime
- Docstring CLI
v2/cli/docstring.py - Spine Bootstrap
v2/backend/core/spine/bootstrap.py - Capability Contracts
v2/backend/core/spine/contracts.py - Capability Loader
v2/backend/core/spine/loader.py - Capability Registry
v2/backend/core/spine/registry.py - Runtime Configuration
v2/backend/core/configuration/config.py
Docstring Workflow
- Docstring Scanning
v2/backend/core/introspect/read_docstrings.py - Prompt Context
v2/backend/core/docstrings/context.py - Pipeline Engine
v2/backend/core/prompt_pipeline/executor/engine.py - Capability Orchestrator
v2/backend/core/prompt_pipeline/executor/orchestrator.py - LLM Router
v2/backend/core/prompt_pipeline/llm/router.py - Response Parser
v2/backend/core/prompt_pipeline/llm/response_parser.py - Response Schema
v2/backend/core/prompt_pipeline/llm/schema.py - Prompt Budget
v2/backend/core/prompt_pipeline/preflight/budget.py
Patch Processing
- Patch Provider
v2/backend/core/patch_engine/providers.py - Docstring Rewrite
v2/patches/core/rewrite.py - Patch Operations
v2/patches/core/patch_ops.py
Bundle Packaging
- Packager Orchestrator
v2/backend/core/utils/code_bundles/code_bundles/src/packager/core/orchestrator.py - Bundle Writer
v2/backend/core/utils/code_bundles/code_bundles/src/packager/core/writer.py - Guide Writer
v2/backend/core/utils/code_bundles/code_bundles/src/packager/io/guide_writer.py - Bundle Config Loader
v2/backend/core/utils/code_bundles/code_bundles/execute/loader.py
Persistence And Utilities
- Database Setup
v2/backend/core/db/access/db_init.py - Docstring Persistence
v2/backend/core/db/writers/docstring_writer.py - Symbol Index
v2/models/introspection_index.py - SQLite Setup Utility
v2/backend/core/utils/db/init_sqlite_dev.py - File Operations
v2/backend/core/utils/io/file_ops.py
Other components
- Developer
Connections 22
- Developer → Docstring CLI: runs workflow
v2/cli/docstring.py - Docstring CLI → Docstring Scanning: dispatches scan
v2/cli/docstring.py - Docstring CLI → Capability Orchestrator: dispatches prompts
v2/cli/docstring.py - Docstring CLI → Spine Bootstrap: dispatches capability
v2/cli/docstring.py - Capability Orchestrator → Capability Registry: resolves runner
v2/backend/core/prompt_pipeline/executor/orchestrator.py - Capability Orchestrator → Capability Loader: loads capabilities
v2/backend/core/prompt_pipeline/executor/orchestrator.py - Spine Bootstrap → Capability Loader: uses loader
v2/backend/core/spine/bootstrap.py - Spine Bootstrap → Capability Registry: uses registry
v2/backend/core/spine/bootstrap.py - Spine Bootstrap → Capability Contracts: uses contracts
v2/backend/core/spine/bootstrap.py - Pipeline Engine → Capability Orchestrator: runs capabilities
v2/backend/core/prompt_pipeline/executor/engine.py - LLM Router → Response Parser: parses response
v2/backend/core/prompt_pipeline/llm/router.py - LLM Router → Response Schema: selects schema
v2/backend/core/prompt_pipeline/llm/router.py - Response Parser → Response Schema: uses schema
v2/backend/core/prompt_pipeline/llm/response_parser.py - Docstring Scanning → Docstring Persistence: writes records
v2/backend/core/introspect/read_docstrings.py - Docstring Persistence → Database Setup: initializes storage
v2/backend/core/db/writers/docstring_writer.py - Docstring Persistence → Symbol Index: persists symbols
v2/backend/core/db/writers/docstring_writer.py - Patch Provider → Docstring Rewrite: rewrites docstrings
v2/backend/core/patch_engine/providers.py - Patch Provider → File Operations: reads files
v2/backend/core/patch_engine/providers.py - Patch Operations → File Operations: uses file operations
v2/patches/core/patch_ops.py - Packager Orchestrator → Bundle Writer: writes artifacts
v2/backend/core/utils/code_bundles/code_bundles/src/packager/core/orchestrator.py - Packager Orchestrator → Guide Writer: creates guide
v2/backend/core/utils/code_bundles/code_bundles/src/packager/core/orchestrator.py - Docstring CLI → SQLite Setup Utility: initializes SQLite
v2/cli/docstring.py