conversadocs / conversadocs/code-scan-docs
[Task]: markdown gen plugin
- Dominant language
- Rust
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### Description
Implement a configuration-driven markdown documentation generator (`markdown_gen.py`) that processes documents section-by-section using LLM enhancement. This plugin replaces hardcoded document assumptions with fully configurable document and section definitions in `.csdrc.yaml`, enabling flexible documentation generation for any markdown file with CSD section markers.
### Acceptance Criteria
- [ ] **Configuration-Driven Document Structure**:
- All document structures defined in `.csdrc.yaml` under `documents` section
- No hardcoded sections, templates, or prompts in plugin code
- Support for multiple documents with different section configurations
- Per-document context prompts that augment the system prompt
- [ ] **Section Processing with Dependencies**:
- Process sections in configuration order by default
- Support `depends_on` to share previously generated sections as context
- Cache each section to `.csd_cache/markdown_gen///` during processing
- Only write final document after all sections complete successfully
- [ ] **Flexible Section Configuration**:
- Each section has its own prompt defining what to generate
- Sections can depend on other sections for context flow
- Support for optional sections that can fail without blocking document
- Section-specific context building based on configuration
- [ ] **Multi-Document Support**:
- Process all configured documents with `csd docs`
- Support for document-specific processing (future CLI enhancement)
- Preserve original files by saving to `output_dir` with timestamp
- Support glob patterns for document discovery (future enhancement)
- [ ] **Smart Context Management**:
- Build section-appropriate context from matrix data
- Honor `context_priority` configuration for each document
- Include dependent section content when specified
- Implement token budgeting for context + prompt + response
- [ ] **Robust Error Handling**:
- Section-level failure handling based on `on_section_failure` config
- Continue processing other sections if one fails
- Support retry logic for transient LLM failures
- Clear status reporting showing which sections succeeded/failed
### Notes
This plugin builds on the existing LLM utilities but removes all assumptions about document structure. The configuration file becomes the single source of truth for what documents to generate and how to structure them. Future enhancements will include CLI improvements for targeting specific documents and support for template files.
Contributor guide
Assessment
This issue has not been assessed yet.