@@ -88,6 +88,36 @@ var SupportedTools = map[string]ToolConfig{
8888 },
8989 },
9090 },
91+ "vibe" : {
92+ Name : "Mistral Vibe" ,
93+ Description : "Mistral Vibe CLI agent with skills" ,
94+ Files : []ToolFile {
95+ {
96+ Path : ".vibe/config.toml" ,
97+ Content : generateVibeConfig ,
98+ },
99+ {
100+ Path : ".vibe/prompts/mendix-mdl.md" ,
101+ Content : generateVibeSystemPrompt ,
102+ },
103+ {
104+ Path : ".vibe/skills/write-microflows/SKILL.md" ,
105+ Content : generateVibeSkillWriteMicroflows ,
106+ },
107+ {
108+ Path : ".vibe/skills/create-page/SKILL.md" ,
109+ Content : generateVibeSkillCreatePage ,
110+ },
111+ {
112+ Path : ".vibe/skills/check-syntax/SKILL.md" ,
113+ Content : generateVibeSkillCheckSyntax ,
114+ },
115+ {
116+ Path : ".vibe/skills/explore-project/SKILL.md" ,
117+ Content : generateVibeSkillExploreProject ,
118+ },
119+ },
120+ },
91121}
92122
93123// Universal files created for all tools
@@ -342,6 +372,244 @@ func generateProjectAIMD(projectName, mprPath string) string {
342372 return generateClaudeMD (projectName , mprPath )
343373}
344374
375+ func generateVibeConfig (projectName , mprPath string ) string {
376+ return fmt .Sprintf (`# Mistral Vibe configuration for Mendix project: %s
377+ # See: https://docs.mistral.ai/mistral-vibe/introduction/configuration
378+
379+ # Use the project AGENTS.md as system prompt context
380+ system_prompt_id = "mendix-mdl"
381+
382+ # Skills from .vibe/skills/ are auto-discovered
383+ # Additional context files
384+ # skill_paths = [".ai-context/skills"]
385+
386+ # Tool permissions for MDL workflow
387+ [tools.bash]
388+ permission = "ask"
389+
390+ [tools.read_file]
391+ permission = "always"
392+
393+ [tools.write_file]
394+ permission = "ask"
395+
396+ [tools.search_replace]
397+ permission = "ask"
398+ ` , projectName )
399+ }
400+
401+ func generateVibeSystemPrompt (projectName , mprPath string ) string {
402+ mprFile := filepath .Base (mprPath )
403+ return fmt .Sprintf (`You are helping with a Mendix project using MDL (Mendix Definition Language) via mxcli.
404+
405+ ## Project: %s
406+
407+ MPR file: %s
408+
409+ ## Key Rules
410+
411+ - The mxcli tool is in the project root. Always use ./mxcli, not mxcli.
412+ - Read AGENTS.md for full project documentation.
413+ - Read .ai-context/skills/ for MDL syntax patterns before writing scripts.
414+ - Always validate MDL scripts: ./mxcli check script.mdl -p %s --references
415+ - Microflow variables start with $. Entity declarations have no AS keyword.
416+ - Page widgets nest with curly braces { }. Properties use (Key: value).
417+ - Single quotes in expressions are escaped by doubling: 'it''s here'
418+
419+ ## Quick Commands
420+
421+ - Explore: ./mxcli -p %s -c "SHOW STRUCTURE"
422+ - Check: ./mxcli check script.mdl -p %s --references
423+ - Execute: ./mxcli exec script.mdl -p %s
424+ - Search: ./mxcli search -p %s "keyword"
425+ ` , projectName , mprFile , mprFile , mprFile , mprFile , mprFile , mprFile )
426+ }
427+
428+ func generateVibeSkillWriteMicroflows (projectName , mprPath string ) string {
429+ mprFile := filepath .Base (mprPath )
430+ return fmt .Sprintf (`---
431+ name: write-microflows
432+ description: Write MDL microflows for Mendix projects
433+ user-invocable: true
434+ allowed-tools:
435+ - read_file
436+ - write_file
437+ - bash
438+ - grep
439+ ---
440+
441+ # Write Microflows
442+
443+ Write MDL microflow scripts for the Mendix project.
444+
445+ ## Important
446+
447+ - The mxcli tool is in the project root: ` + "`./mxcli`" + `
448+ - MPR file: ` + "`%s`" + `
449+ - Always validate before presenting: ` + "`./mxcli check script.mdl -p %s --references`" + `
450+
451+ ## MDL Microflow Syntax
452+
453+ ` + "```sql" + `
454+ CREATE MICROFLOW Module.Name($Param1 Type, $Param2 Module.Entity) RETURNS Boolean
455+ BEGIN
456+ DECLARE $Var Type = value;
457+ DECLARE $Entity Module.Entity;
458+
459+ RETRIEVE $Entity FROM Database WHERE Attr = $Param1 LIMIT 1;
460+
461+ IF $Entity != empty THEN
462+ CHANGE $Entity (Attr = 'value');
463+ COMMIT $Entity;
464+ END IF;
465+
466+ RETURN true;
467+ END;
468+ /
469+ ` + "```" + `
470+
471+ ## Key Rules
472+
473+ 1. Variables start with $
474+ 2. Entity declarations: no AS keyword, no = empty
475+ 3. LOOP $item IN $list BEGIN ... END LOOP
476+ 4. IF ... THEN ... END IF (not just END)
477+ 5. CHANGE $obj (Attr = value) — parentheses required
478+ 6. String escaping: double single quotes 'it''s here'
479+ 7. Never create empty list variables as loop sources
480+
481+ ## Read .ai-context/skills/write-microflows.md for full reference.
482+ ` , mprFile , mprFile )
483+ }
484+
485+ func generateVibeSkillCreatePage (projectName , mprPath string ) string {
486+ mprFile := filepath .Base (mprPath )
487+ return fmt .Sprintf (`---
488+ name: create-page
489+ description: Create MDL pages and widgets for Mendix projects
490+ user-invocable: true
491+ allowed-tools:
492+ - read_file
493+ - write_file
494+ - bash
495+ - grep
496+ ---
497+
498+ # Create Pages
499+
500+ Create MDL page scripts for the Mendix project.
501+
502+ ## Important
503+
504+ - mxcli location: ` + "`./mxcli`" + `
505+ - MPR file: ` + "`%s`" + `
506+ - Validate: ` + "`./mxcli check script.mdl -p %s --references`" + `
507+
508+ ## MDL Page Syntax
509+
510+ ` + "```sql" + `
511+ CREATE PAGE Module.PageName (Title: 'Page Title', Layout: 'Atlas_Default')
512+ {
513+ DATAVIEW (Entity: Module.Entity, Source: Context) {
514+ TABLE {
515+ ROW { TEXTBOX (Label: 'Name', Attribute: Name) }
516+ ROW { TEXTBOX (Label: 'Email', Attribute: Email) }
517+ }
518+ ACTIONBUTTON (Caption: 'Save', Action: SaveChanges)
519+ }
520+ };
521+ /
522+ ` + "```" + `
523+
524+ ## Key Rules
525+
526+ 1. Widget nesting uses curly braces { }
527+ 2. Properties in parentheses (Key: value)
528+ 3. String values in single quotes
529+ 4. Attribute references without quotes
530+
531+ ## Read .ai-context/skills/create-page.md for full reference.
532+ ` , mprFile , mprFile )
533+ }
534+
535+ func generateVibeSkillCheckSyntax (projectName , mprPath string ) string {
536+ mprFile := filepath .Base (mprPath )
537+ return fmt .Sprintf (`---
538+ name: check-syntax
539+ description: Validate MDL script syntax and references
540+ user-invocable: true
541+ allowed-tools:
542+ - bash
543+ - read_file
544+ ---
545+
546+ # Check MDL Syntax
547+
548+ Validate MDL scripts before execution.
549+
550+ ## Commands
551+
552+ ` + "```bash" + `
553+ # Syntax check only (no project needed)
554+ ./mxcli check script.mdl
555+
556+ # Syntax + reference validation
557+ ./mxcli check script.mdl -p %s --references
558+
559+ # Execute a script
560+ ./mxcli exec script.mdl -p %s
561+ ` + "```" + `
562+
563+ ## Checklist
564+
565+ 1. Run syntax check first
566+ 2. Fix any parse errors
567+ 3. Run with --references to validate entity/microflow names
568+ 4. Execute against the project
569+ ` , mprFile , mprFile )
570+ }
571+
572+ func generateVibeSkillExploreProject (projectName , mprPath string ) string {
573+ mprFile := filepath .Base (mprPath )
574+ return fmt .Sprintf (`---
575+ name: explore-project
576+ description: Explore and query Mendix project structure
577+ user-invocable: true
578+ allowed-tools:
579+ - bash
580+ - read_file
581+ ---
582+
583+ # Explore Project
584+
585+ Query the Mendix project structure using mxcli.
586+
587+ ## Common Commands
588+
589+ ` + "```bash" + `
590+ # Show project structure
591+ ./mxcli -p %s -c "SHOW STRUCTURE"
592+
593+ # List modules, entities, microflows, pages
594+ ./mxcli -p %s -c "SHOW MODULES"
595+ ./mxcli -p %s -c "SHOW ENTITIES"
596+ ./mxcli -p %s -c "SHOW MICROFLOWS"
597+ ./mxcli -p %s -c "SHOW PAGES"
598+
599+ # Describe specific elements
600+ ./mxcli -p %s -c "DESCRIBE ENTITY Module.EntityName"
601+ ./mxcli -p %s -c "DESCRIBE MICROFLOW Module.MicroflowName"
602+
603+ # Show constants and their values per configuration
604+ ./mxcli -p %s -c "SHOW CONSTANTS"
605+ ./mxcli -p %s -c "SHOW CONSTANT VALUES"
606+
607+ # Search
608+ ./mxcli search -p %s "keyword"
609+ ` + "```" + `
610+ ` , mprFile , mprFile , mprFile , mprFile , mprFile , mprFile , mprFile , mprFile , mprFile , mprFile )
611+ }
612+
345613func generateOpenCodeConfig (projectName , mprPath string ) string {
346614 return `{
347615 "$schema": "https://opencode.ai/config.json",
0 commit comments