{"id":51861669,"url":"https://github.com/juninmd/confluence-summarizer","last_synced_at":"2026-07-24T08:03:12.218Z","repository":{"id":335475759,"uuid":"1145528249","full_name":"juninmd/confluence-summarizer","owner":"juninmd","description":null,"archived":false,"fork":false,"pushed_at":"2026-07-16T12:06:38.000Z","size":1017,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-07-16T14:09:15.383Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juninmd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-29T22:27:45.000Z","updated_at":"2026-07-16T12:06:56.000Z","dependencies_parsed_at":"2026-05-01T16:01:37.052Z","dependency_job_id":null,"html_url":"https://github.com/juninmd/confluence-summarizer","commit_stats":null,"previous_names":["juninmd/confluence-summarizer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/juninmd/confluence-summarizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juninmd%2Fconfluence-summarizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juninmd%2Fconfluence-summarizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juninmd%2Fconfluence-summarizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juninmd%2Fconfluence-summarizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juninmd","download_url":"https://codeload.github.com/juninmd/confluence-summarizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juninmd%2Fconfluence-summarizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35832970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-24T02:00:07.870Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-24T08:03:11.440Z","updated_at":"2026-07-24T08:03:12.213Z","avatar_url":"https://github.com/juninmd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Confluence Summarizer\n\nA robust system to refine and standardize Confluence documentation using AI Agents.\n\n## Overview\n\nThis system connects to Confluence, ingests pages into a vector database (ChromaDB), and uses a multi-agent AI system (Analyst, Writer, Reviewer) to critique and rewrite documentation.\n\n## Architecture\n\n- **Ingestion**: Async Confluence API client with pagination and rate limiting.\n- **RAG**: ChromaDB for context retrieval.\n- **Agents**:\n  - **Analyst**: Identifies issues in clarity, tone, and formatting.\n  - **Writer**: Rewrites content based on critiques and style guide.\n  - **Reviewer**: Validates the output.\n- **API**: FastAPI for job management and ingestion.\n\n## API Endpoints\n\n### Refinement\n\n- `POST /refine/{page_id}`: Start refinement for one page.\n- `POST /refine/space/{space_key}`: Start refinement for all pages in one space.\n- `GET /status/{page_id}`: Get current refinement status/result.\n- `POST /publish/{page_id}`: Publish completed refined content back to Confluence.\n\n### RAG Ingestion\n\n- `POST /ingest/{page_id}`: Ingest one specific page into ChromaDB (page-level RAG).\n- `POST /ingest/space/{space_key}`: Ingest all pages from a space.\n\n## Performance Notes\n\n- The Confluence pagination now supports fetching all pages by default (`limit=None`) while keeping bounded API page size (`page_size \u003c= 50`).\n- Space ingestion/refinement use bounded concurrency (`asyncio.Semaphore`) to prevent API overload and improve throughput.\n- Reused shared `httpx.AsyncClient` connection pool (initialized in app lifespan) for lower request overhead.\n\n## Setup\n\n1. **Install Dependencies**:\n   ```bash\n   uv sync\n   ```\n\n2. **Environment Variables**:\n   Create a `.env` file inside a `secrets` directory (e.g., `secrets/.env`):\n   ```env\n   CONFLUENCE_URL=https://your-domain.atlassian.net/wiki\n   CONFLUENCE_USERNAME=your-email@example.com\n   CONFLUENCE_API_TOKEN=your-api-token\n   OPENAI_API_KEY=sk-...\n   CHROMA_DB_PATH=./chroma_db\n   DB_PATH=jobs.db\n   ```\n\n3. **Run the API**:\n   ```bash\n   uv run uvicorn src.confluence_summarizer.main:app --reload\n   ```\n\n## Development \u0026 Verification\n\nRun the test suite:\n```bash\nuv run pytest\n```\n\nRun type checking:\n```bash\nuv run pyright src\n```\n\nRun linting:\n```bash\nuv run flake8 src\n```\n\n## Agents\n\nSee `agents.md` for detailed agent personas and workflows.\n\n## Troubleshooting\n\n### Missing Environment Variables\n\nIf you see errors related to `OPENAI_API_KEY` or `CONFLUENCE_URL`, ensure your `.env` file is correctly formatted and located in the root directory.\n\n- **OPENAI_API_KEY**: Required for Agent functionality. If missing, the agents will return empty responses or skip processing.\n- **CONFLUENCE_CREDENTIALS**: Check that `CONFLUENCE_USERNAME` matches your Atlassian email and `CONFLUENCE_API_TOKEN` is a valid API token (not your password).\n\n### Database Locks\n\nThe system uses SQLite in WAL mode. If you encounter \"database is locked\" errors, ensure no other process (like a DB browser) is holding a write lock on `jobs.db`.\n\n## Testing\n\nThe project maintains high test coverage for core logic.\n\nTo run the full test suite with coverage report:\n\n```bash\nuv run pytest --cov=src --cov-report=term-missing\n```\n\nTo run a specific test file:\n\n```bash\nuv run pytest tests/test_agents.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuninmd%2Fconfluence-summarizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuninmd%2Fconfluence-summarizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuninmd%2Fconfluence-summarizer/lists"}