conversadocs / conversadocs/code-scan-docs

[Task]: llm integration and plugins

Open
#8 0 comments 0 reactions 1 assignee Claimed by @stoopidJSON View on GitHub
enhancement
Dominant language
Rust
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Description

Implement LLM-enhanced output plugins that can intelligently process and enhance documentation using project matrix data. Starting with a template-driven markdown documentation generator that processes sections incrementally to manage token limits and provide focused, contextual enhancements.

### Acceptance Criteria

- [x] **LLM Integration Framework**:
- Output plugins can integrate with LLM providers via RESTful API calls (starting with Ollama)
- Token management system to handle model limits and optimize context usage
- Configurable system and user prompts per plugin and section type
- Support for different models with different capabilities and limits

- [x] **Template-Driven Documentation**:
- Markdown output plugin can process template files with section markers
- Sections are enhanced individually with relevant matrix context
- Support for existing README.md files or built-in templates
- Section-specific context building (e.g., API reference gets public functions, overview gets project structure)

- [ ] **Smart Context Management**:
- Intelligently select relevant matrix data for each section type
- Token budgeting to fit within model limits (context + prompt + response)
- Priority-based context selection (public APIs before private, main classes before utilities)
- Graceful degradation when context exceeds token limits

- [x] **Configuration and Control**:
- Plugin configuration in `.csdrc.yaml` for LLM settings, prompts, and processing options
- User-configurable section prompts and processing parameters
- Template discovery (look for existing files, fall back to defaults)
- Optional LLM enhancement (can generate docs without LLM)

- [x] **Error Handling and Reliability**:
- Graceful handling of LLM API errors (timeout, rate limits, model unavailable)
- Section-level error recovery (continue processing other sections if one fails)
- Meaningful error messages with context about which section/operation failed
- Fallback to non-LLM enhanced content when LLM processing fails

- [x] **Extensibility Foundation**:
- Base classes and utilities for other LLM-enhanced output plugins
- Shared LLM client and token management for future plugins
- Plugin architecture supports different LLM providers and models
- Foundation for future scan and code generation plugins

### Notes

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.