Started from“# MindMesh — Implement the AI Teammate and Visual Generation Engine Extend my existing MindMesh project. Preserve the current design and all working features. Do not rebuild the application from scratch. ## A. Create a real AI teammate Build a dedicated AI teammate powered by the Claude API through a secure server-side integration. The AI teammate must understand: - The user's current request. - The project brief. - Selected canvas items. - Relevant board content. - Previously shared AI results and decisions when needed. Provide these actions: 1. Generate new ideas. 2. Improve an existing idea. 3. Connect selected ideas. 4. Challenge assumptions and identify gaps. 5. Generate alternatives. 6. Create a mind map. 7. Create a flowchart or decision tree. 8. Create a project plan. 9. Summarise the board. 10. Convert accepted ideas into action items. Use the same secure Claude integration with different task-specific instructions and validated output schemas. ## B. Implement real mind-map generation When a user selects "Create Mind Map": 1. Ask for a topic or use selected board content. 2. Send the topic and relevant context to the Claude API. 3. Request structured data containing a central topic, hierarchical nodes, labels, parent-child relationships and optional branch colours. 4. Validate the returned data. 5. Render the data as a genuine visual mind map using editable nodes and connectors. 6. Automatically arrange the nodes so the diagram is readable. 7. Display the result as a draft with Add to Canvas, Edit and Dismiss controls. Each node must support editing its label, adding children, deleting the node and moving it. Where practical, include an "Expand this branch with AI" action that generates new children for the selected node. Preserve existing notes. Do not replace the user's board with an image of a mind map. ## C. Implement other AI-generated visuals Use structured AI outputs and appropriate renderers to create: - Flowcharts. - Decision trees. - User journeys. - Process diagrams. - Brainstorming clusters. - Project plans. - Creative moodboards. Each output should be editable and saveable. Do not display a static illustration in place of a functional diagram. ## D. Shared AI workflow Support two visibility modes: - Private draft: visible only to the requesting user. - Shared result: visible to authorised board members after the user publishes it. Published AI results should be stored in the shared database, linked to their source request and associated with the user who generated them. Collaborators should be able to comment on, edit and build on shared results according to their permissions. Keep AI drafts separate from approved decisions. Never silently overwrite board items or automatically publish private content. ## E. Context-aware AI actions When one or more items are selected, the AI panel must offer actions relevant to those items. Examples: - Select two notes → Connect Ideas. - Select a topic note → Generate Mind Map. - Select a branch → Expand Branch. - Select a workflow → Generate Flowchart. - Select the board → Summarise Board. - Select approved ideas → Create Action Plan. Allow users to inspect the context being sent to AI when practical. Enforce board permissions before accessing any data. ## F. AI response and rendering architecture Separate the following responsibilities: 1. Frontend: user interface and selection. 2. Backend: authentication, permissions and secure API requests. 3. Claude: reasoning and structured content generation. 4. Validation layer: checks the returned data and handles invalid output. 5. Rendering engine: converts validated structures into actual canvas elements. 6. Persistence layer: saves approved items to the correct board. Never put the Claude API key in browser code. Use server-side secrets or environment variables. Handle missing API credentials, loading, invalid output, rate limits, network failures and retry actions clearly. Do not fabricate successful AI results. ## G. Multiplayer behaviour Use the existing shared data model and authentication system where possible. Persist published AI results so authorised collaborators can access them. Synchronise changes using the backend's supported capabilities. If real-time updates are unavailable, provide a reliable refreshable fallback and do not claim instant synchronisation. ## H. Acceptance tests Verify these scenarios end to end: 1. User submits a topic and receives a real Claude-generated response. 2. User generates a mind map that renders as editable nodes and connectors. 3. User expands one branch without losing the rest of the map. 4. User edits and publishes the map to the shared board. 5. Another authorised collaborator can view and edit the published map. 6. User generates a flowchart from selected notes. 7. API failures produce a clear error rather than fake content. 8. Existing board items remain intact throughout the process. Inspect the existing architecture before making changes. Implement and test one workflow at a time. Report which features genuinely work and which still require configuration.”