Merged
Conversation
…orkflow
- Add AI_AGENT_REFERENCE_GUIDE.md explaining auto-generation principles
- Update auto-PR scripts to follow proper build process
- Ensure auto-generated files (index.mdx, filepathSlugs.json) are not committed
- Add build validation to workflow
- Include detailed documentation structure requirements
- Add proper {{label}} attribute requirements for script parsing
Major improvements to the auto-documentation generation process:
SYNC SCRIPT ENHANCEMENTS:
• Extract JSON code blocks from PR descriptions automatically
• Parse request parameters and types from real examples
• Derive method information from actual implementation code
• Generate structured issue content with parameter details
• Handle template variables ({{userpass}}) in JSON examples
AUTO-PR SCRIPT ENHANCEMENTS:
• Parse structured method information from enhanced issues
• Use real parameter examples in generated documentation
• Include extracted parameter details in documentation
• Generate realistic request examples from source PR data
• Improved template with actual method descriptions
WORKFLOW IMPROVEMENTS:
• End-to-end validation with build test integration
• Proper {{label}} attribute handling for script parsing
• CompactTable component integration for API documentation
• Enhanced AI prompts with structured information context
EXAMPLE WITH PR #2587:
• Automatically extracts consolidate_utxos method details
• Parses coin and merge_conditions parameters with types
• Generates documentation with real JSON examples
• Includes parameter structure: merge_at (integer), max_merge_at_once (integer)
This addresses the need to capture actual code examples from PRs like
komodo-defi-framework#2587 and use them to generate accurate API documentation
instead of generic templates.
initial workflow for AI generated drafts
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a comprehensive automated documentation workflow system that bridges the Komodo DeFi Framework (KDF) repository with the documentation repository, creating a two-stage automation pipeline for documentation updates.
Key changes:
- Automated issue creation from KDF PRs labeled "status: pending docs"
- Automated PR creation from issues labeled "ai-draft-pr"
- New
consolidate_utxosRPC method documentation with examples and usage guide
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
src/pages/komodo-defi-framework/changelog/index.mdx |
Added v2.6.0-beta changelog entry documenting the new UTXO consolidation feature |
src/pages/komodo-defi-framework/api/legacy/consolidate_utxos/index.mdx |
Complete documentation for the new consolidate_utxos RPC method including parameters, responses, and examples |
src/pages/komodo-defi-framework/api/index.mdx |
Added consolidate_utxos method to the main API methods table |
src/data/sidebar.json |
Added navigation entry for the new consolidate_utxos documentation page |
AI_AGENT_REFERENCE_GUIDE.md |
Comprehensive guide for AI agents documenting KDF API methods, including file structure requirements and build process |
.github/workflows/scan_kdf_pulls_clean.yml |
Workflow that scans KDF PRs daily and creates documentation issues with AI-enhanced summaries |
.github/workflows/auto-pr-from-issues.yml |
Workflow that processes labeled issues and automatically creates PRs with generated documentation |
.github/scripts/sync-docs-issues.js |
Core logic for scanning KDF PRs, extracting method information, and creating documentation issues |
.github/scripts/auto-pr-from-issues.js |
Core logic for parsing issues, generating documentation files, and creating pull requests |
.github/package.json |
Node.js dependencies for the automation workflows (Octokit, retry/throttling plugins, node-fetch) |
.github/package-lock.json |
Locked dependency versions ensuring consistent workflow execution |
.github/AUTO_PR_WORKFLOW.md |
Documentation explaining the auto-PR workflow, configuration, and usage patterns |
Files not reviewed (1)
- .github/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
gcharang
approved these changes
Nov 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example issues created from this workflow: https://github.com/KomodoPlatform/komodo-docs-mdx/issues?q=is%3Aissue%20state%3Aopen%20label%3Aauto-generated
Source KDF PR: GLEECBTC/komodo-defi-framework#2587
AI generated drafts initial implementation: #574
AI generated drafts enhancements issue: #592
Generated doc for
consolidate_utxos: https://github.com/KomodoPlatform/komodo-docs-mdx/blob/598859a8fbd734e7e7e8150554e8589193b2ccc1/src/pages/komodo-defi-framework/api/legacy/consolidate_utxos/index.mdx🤖 Automated Documentation Issue Creation from KDF PRs
This PR introduces an automated workflow that monitors the
komodo-defi-frameworkrepository for PRs labeled with"status: pending docs"and automatically creates corresponding documentation issues in this repository.🎯 What This Solves
🚀 Key Features
📅 Automated Scheduling
"status: pending docs"label🎛️ Manual Control
🤖 AI-Enhanced Summaries (Optional)
🛡️ Production-Ready Features
📋 Generated Issues Include
Each created documentation issue contains:
docs-neededandauto-generatedfor organization🔧 Implementation Details
Architecture
.github/workflows/scan_kdf_pulls_clean.yml.github/scripts/sync-docs-issues.jsConfiguration
KomodoPlatform/komodo-defi-frameworkKomodoPlatform/komodo-docs-mdx"status: pending docs"["docs-needed", "auto-generated"]Setup Requirements
GITHUB_TOKENOPENAI_API_KEYsecret for AI summaries (~$1-5/month)🧪 Testing & Validation
The workflow includes comprehensive testing capabilities:
📊 Expected Impact
For Documentation Team
For Development Team
🔒 Security & Best Practices
🎛️ Usage
Automatic (Recommended)
komodo-defi-frameworkwith"status: pending docs"Manual Trigger
falsefor real issues,truefor testing"123,456"AI Summaries (Optional)
OPENAI_API_KEYrepository secret🔄 Future Enhancements
This foundation enables future improvements:
This workflow significantly improves our documentation process automation while maintaining full control and transparency. It's production-ready and designed to handle the scale and complexity of the Komodo Platform development workflow.