Skip to content

initial workflow for AI generated drafts#574

Merged
smk762 merged 4 commits intokdf/auto-issuesfrom
kdf/auto-draft-pr
Nov 10, 2025
Merged

initial workflow for AI generated drafts#574
smk762 merged 4 commits intokdf/auto-issuesfrom
kdf/auto-draft-pr

Conversation

@smk762
Copy link
Contributor

@smk762 smk762 commented Aug 14, 2025

This is mostly a placeholder. Once the auto-issues and this auto-draft-pr are merged into dev, we can refine both workflows to work well in harmony, and implement agreed upon KDF repo PR requirements to ensure the AI used in these workflows produces quality output.

Note: Further work on auto-pr-draft workflow should also await the merge of a few other pending PRs:

These new components introduce a modularisation which will make it simpler for the AI to populate drafts.

@github-actions
Copy link

github-actions bot commented Aug 14, 2025

Documentation Preview Links

Preview for commit: c48c7e3
Base URL: https://8e7bb9b6.komodo-docs.pages.dev/en/docs

Changed Documentation Files

Commit: c48c7e3 - adds generated method doc
Commit: c48c7e3 - adds generated method doc

smk762 added 3 commits August 14, 2025 17:37
…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.
@smk762
Copy link
Contributor Author

smk762 commented Aug 14, 2025

This PR includes as generated method doc for GLEECBTC/komodo-defi-framework#2587 / #573

It's not perfect, but should pass CI tests 🤞

I'll fix it up manually here, but more work is needed on the prompt to ensure usage of components (Notes, CompactTable, Codegroup) and adherence to structure / styles.

UPDATE: Enhancements delegated to issue at #592

@smk762 smk762 merged commit 598859a into kdf/auto-issues Nov 10, 2025
3 of 4 checks passed
@smk762 smk762 mentioned this pull request Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant