slogan3

Ontwikkel een AI-gestuurde Windsurf Plugin voor Workflow Automatisering

description

Met deze prompt kan de gebruiker een op maat gemaakte AI-plugin ontwerpen die repetitieve en tijdrovende taken binnen Windsurf automatiseert. Dit verhoogt de productiviteit door menselijke handelingen te verminderen, stroomlijnt het ontwikkelproces en integreert naadloos met bestaande tools en workflowcomponenten. Het is effectiever dan standaard AI-assistenten omdat het specifiek focust op automatisering en integratie binnen de Windsurf IDE.

prompt

Help me een aangepaste Windsurf AI-plugin te ontwerpen die specifieke taken in mijn ontwikkelworkflow automatiseert en integreert met bestaande tools. Beschrijf hoe ik Cascade en andere AI-functies kan gebruiken om repetitie ...

try_prompt

generate_helper
disclaimerOnPageApi

ai_answers

provider: openai
model: gpt-4.1-nano
Natuurlijk! Hier is een voorstel om een aangepaste Windsurf AI-plugin te ontwerpen die jouw ontwikkelworkflow automatiseert en integreert met bestaande tools zoals Visual Studio Code, Cascade, en Slack: 1. Use-case specificaties: - Automatische code formatting bij het opslaan of commit. - Stuur meldingen naar Slack bij succesvolle of mislukte builds. 2. Integratie met Cascade en Windsurf: - Gebruik Cascade om codeversies te beheren en automatische triggers te maken op commits of pull requests. - Configureer Windsurf om AI-gestuurde taken uit te voeren, zoals code review of suggesties voor refactoring. 3. Automatisering van repetitieve taken: - **Code formatting**: - Maak een script dat bij elke commit of opslaan wordt uitgevoerd, bijvoorbeeld via een VS Code task of Git hook. - Gebruik Windsurf AI voor intelligente code-aanpassingen of controle. - **Build notificaties**: - Integreer Windsurf met je CI/CD pipeline (bijvoorbeeld via GitHub Actions, Jenkins, of andere). - Configureer Windsurf om buildresultaten te detecteren en automatisch een bericht te sturen naar Slack via een webhook. 4. Workflow stroomlijnen: - **Automatiseringsscript**: - Schrijf een script (bijvoorbeeld in Python of Bash) dat de volgende taken combineert: - Code formatteren via een formatter zoals Prettier of Black. - Build uitvoeren. - Buildstatus doorgeven aan Windsurf. - Windsurf stuurt de resultaten door naar Slack. - **AI-assistentie**: - Gebruik Windsurf’s AI-functies voor code review, suggesties, en foutdetectie. - Automatisch voorstellen voor refactoring gebaseerd op AI-analyses. 5. Implementatievoorbeeld: - **VS Code Tasks**: ```json { "label": "Automatische build en notificatie", "type": "shell", "command": "bash run_build_and_notify.sh" } ``` - **run_build_and_notify.sh**: ```bash #!/bin/bash # Format code npm run format # Run build npm run build # Check build resultaat if [ $? -eq 0 ]; then # Send success message naar Slack curl -X POST -H 'Content-type: application/json' --data '{"text":"Build succesvol!"}' https://hooks.slack.com/services/xxx/yyy/zzz else # Send failure message curl -X POST -H 'Content-type: application/json' --data '{"text":"Build mislukt!"}' https://hooks.slack.com/services/xxx/yyy/zzz fi ``` 6. Automatiseren via Windsurf AI: - Configureer Windsurf om via API of CLI taken uit te voeren, zoals het analyseren van code of het genereren van suggesties. - Stel triggers in voor automatische analyses bij elke commit of pull request. 7. Samenvatting: - Gebruik Cascade voor versiebeheer en triggers. - Configureer VS Code Tasks en Git hooks voor automatische formatting. - Integreer Windsurf AI voor slimme code-analyse en suggesties. - Automatiseer build en meldingen via scripts en Slack webhooks. Door deze aanpak te combineren, krijg je een gestroomlijnde workflow waarin repetitieve taken geautomatiseerd worden, AI-ondersteuning je codekwaliteit verbetert en je meldingen direct in je communicatiekanalen terechtkomen.
provider: deepseek
model: deepseek-chat
Beste ontwikkelaar, ik help je graag een aangepaste Windsurf AI-plugin te ontwerpen voor jouw specifieke workflow. Hier is een complete implementatiegids: ## Windsurf AI Plugin Ontwerp ### 1. Plugin Basisstructuur ```javascript // windsurf-plugin.js export default { name: 'DevWorkflowAutomator', version: '1.0.0', description: 'Automatiseert ontwikkeltaken en Slack-integratie', hooks: { onInit: initializePlugin, onFileSave: handleAutoFormatting, onBuildComplete: handleBuildNotifications } } ``` ### 2. Cascade AI Integratie voor Automatisering ```javascript // cascade-automation.js class CascadeWorkflowManager { constructor() { this.formattingRules = { javascript: 'Prettier + ESLint regels', typescript: 'TypeScript strict formatting', python: 'Black + isort configuratie' }; } async autoFormatCode() { // Cascade AI analyseert code stijl en past consistent formatting toe const cascadePrompt = ` Analyseer de huidige code en pas consistente formatting toe: - Automatische indentatie - Import sortering - Code style consistency - Remove unused imports `; return await windsurf.cascade.execute(cascadePrompt); } async smartImportOrganization() { // AI-gestuurde import optimalisatie return await windsurf.cascade.execute( "Organiseer imports: groepeer bibliotheken, relative imports, verwijder unused" ); } } ``` ### 3. Slack Notificatie Systeem ```javascript // slack-integration.js class SlackBuildNotifier { constructor() { this.webhookUrl = process.env.SLACK_WEBHOOK_URL; this.channel = '#development-builds'; } async sendBuildNotification(buildResult) { const message = await windsurf.cascade.generate(` Maak een professionele Slack melding voor build resultaat: Status: ${buildResult.status} Project: ${buildResult.projectName} Tijd: ${buildResult.duration} Belangrijke wijzigingen: ${buildResult.changes} Toon: ✅ bij succes, ❌ bij failure Include relevante metrics en volgende stappen `); await fetch(this.webhookUrl, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ channel: this.channel, text: message, attachments: this.buildAttachments(buildResult) }) }); } buildAttachments(buildResult) { return [{ color: buildResult.status === 'success' ? '#36a64f' : '#ff0000', fields: [ { title: 'Build Tijd', value: buildResult.duration, short: true }, { title: 'Branch', value: buildResult.branch, short: true }, { title: 'Commit', value: buildResult.commitHash, short: true } ] }]; } } ``` ### 4. AI-gestuurde Task Automatisering ```javascript // task-automation.js class AITaskAutomator { async handleRepetitiveTasks() { // Automatische code review comments const reviewComments = await windsurf.cascade.analyze(` Scan code voor common issues: - Performance problemen - Security vulnerabilities - Code smells - Best practices overtredingen Geef korte, actiegerichte suggesties `); // Automatische test generation const testSuggestions = await windsurf.cascade.generate(` Genereer unit test templates voor de huidige functies Focus op edge cases en belangrijke scenarios `); } async smartErrorResolution() { // AI-assisted error fixing return await windsurf.cascade.execute(` Analyseer build errors en stel directe fixes voor: - Dependency conflicts - Type errors - Runtime issues - Configuration problems `); } } ``` ### 5. Workflow Integratie in VS Code ```json // .vscode/settings.json { "windsurf.enableWorkflowAutomation": true, "windsurf.autoFormatOnSave": true, "windsurf.slackNotifications": true, "windsurf.buildMonitoring": true, "windsurf.cascadeIntegration": "advanced" } ``` ### 6. Configuratie Management ```javascript // config-manager.js export const workflowConfig = { automation: { formatOnSave: true, organizeImports: true, removeUnused: true, autoFixLint: true }, notifications: { slack: { buildStart: true, buildComplete: true, buildFailure: true, deployment: false }, cascade: { codeReview: true, testGeneration: true, errorAnalysis: true } }, triggers: { preCommit: ['format', 'lint', 'test'], postBuild: ['notify', 'analyze', 'report'] } }; ``` ### 7. Implementatie Stappen 1. **Plugin Installatie**: ```bash npm install windsurf-ai-plugin ``` 2. **Environment Variabelen**: ```bash SLACK_WEBHOOK_URL=your_slack_webhook WINDSURF_API_KEY=your_api_key ``` 3. **VS Code Integration**: - Open Command Palette → "Windsurf: Enable Workflow Automation" - Configureer je project-specifieke regels - Test met een klein project eerst ### 8. Gebruiksscenario's **Bij Code Opslaan**: - Automatische formatting via Cascade AI - Import reorganisatie - Lint error fixes **Bij Build Completion**: - Slimme Slack notificaties - Build performance analytics - Deployment suggestions **Daily Workflow**: - AI-assisted code reviews - Automatische test generation - Error pattern detection ### 9. Geavanceerde AI Features ```javascript // advanced-ai.js const advancedAutomation = { async predictiveRefactoring() { return await windsurf.cascade.analyze(` Identificeer refactoring opportunities: - Code duplication - Complex method extraction - Architecture improvements Stel concrete refactoring stappen voor `); }, async dependencyIntelligence() { return await windsurf.cascade.research(` Analyseer dependencies: - Security vulnerabilities - Update recommendations - Alternative packages - Performance impacts `); } }; ``` Deze plugin combineert Windsurf's Cascade AI voor intelligente automatisering met praktische Slack-integratie, specifiek afgestemd op jouw ontwikkelworkflow. Begin met de basis automatisering en breid geleidelijk uit met de geavanceerde AI-features!