Skip to content

Implement Project Documentation #145

@dcloud347

Description

@dcloud347

🚀 Feature: Auto-generate and Update PROMETHEUS.md via Context Retrieval Agent

Summary
Add a unified API endpoint that automatically creates or updates a PROMETHEUS.md documentation file for a given repository.
This endpoint uses the Context Retrieval Agent to extract setup, testing, and configuration details from the repository and synthesize structured documentation.
To Save time and cost, please use only one query to retrieval all these details!


📘 Description

Prometheus should be able to intelligently maintain project-level documentation that summarizes key information like setup instructions, testing commands, and configuration options — similar to a self-updating developer guide.

By leveraging the Context Retrieval Agent, Prometheus can:

  • Retrieve relevant files (README.md, requirements.txt, .github/workflows, setup.*, tests/, etc.)
  • Parse context semantically (e.g., environment setup, test commands, config variables)
  • Generate or update a PROMETHEUS.md file at the repository root
  • Store results back to the repo’s documentation graph for later reasoning or UI rendering

🧩 API Design

Endpoint
POST /repository/docs/sync/

Parameters

{
  "repository_id": 1
}

Behavior

  1. Fetch repository context via repository_id

  2. Context Retrieval Agent gathers:

    • Setup instructions
    • Testing and CI commands
    • Project Structure
    • Key configuration/environment settings
  3. Generate (or update) a PROMETHEUS.md file summarizing this information:

    • Project Overview
    • Setup Guide
    • Testing Instructions
    • Configuration Reference
    • Version Metadata (optional)
  4. Commit or return the updated Markdown file

Example Response

{
  "code": 200,
  "status": "success",
  "data": null
}

🧠 Components Involved

  • context_retrieval_agent
  • docs_service
  • knowledge_graph
  • (future) integration with Athena for long-term doc evolution tracking

✅ Acceptance Criteria

  • Implement POST repository/docs/sync endpoint
  • Support automatic retrieval of setup, testing, and config information
  • Generate or update PROMETHEUS.md in repository root
  • Ensure Markdown formatting is clean and consistent
  • Write integration tests for both creation and update flows

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions