AI-Assisted Development
Modern AI tools can significantly accelerate Lumi plug-in development by acting as a collaborative coding partner.
VS Code in Agent Mode
Using Visual Studio Code with an AI assistant in Agent mode (such as GitHub Copilot’s Agent mode or other tool-enabled assistants) allows you to perform complex, multi-step tasks using natural language.
Instead of just completing a single line of code, an Agent can:
- Read your entire workspace to understand context.
- Create new files and directories.
- Run terminal commands to test or validate scripts.
- Search for existing patterns in your codebase.
Repository Access
AI assistance is most effective when the Agent has access to the lumi-dev or your specific project repository. With visibility into the existing codebase, the Agent can:
- Use the Utility Libraries as a reference for helper functions.
- Follow existing patterns for GEGL operations and layer management.
- Re-use boilerplate code from established plug-ins.
Example Workflow
You can directly ask the Agent to generate a full plug-in by describing the desired functional outcome:
“Using the available Scheme utilities and examples in the workspace, write a new plug-in that creates a 50% horizontal guide on the active image and names it ‘Center Guide’.”
The Agent will search for how to create guides, identify the correct utility function (like lumi-image-add-hguide-percent from common.scm), and generate the complete .scm file with the correct registration boilerplate.
Best Practices
- Be Specific: Describe exactly what you want the plug-in to do.
- Reference Utilities: Encourage the Agent to look at the
share/lumi/scripts/directory for high-level helpers. - Review and Test: Always test the plug-in generated by the AI, it’s often an iterative and creative process.