Skip to main content

Idea pipeline (top 25)

1818 Ideas

Robert Jan de Nie
Thinkwise blogger
Robert Jan de NieThinkwise blogger

Make Software Factory metadata available to AI so I can generate SQL templates from my IDEOpen

I want to use generative AI to draft the bulk of my SQL templates, directly from my own IDE (e.g., VS Code) together with tools like GitHub Copilot. For this to work reliably, the AI needs first-class context from the Thinkwise Software Factory (SF): the application’s model metadata and relevant UI information. The SF already maintains a rich, structured model of tables, columns, and references; exposing that to the AI is the missing piece.Why this metadata is essential for AI-assisted SQL When the AI understands my model, its output stops being generic and becomes project-specific:Tables, columns, PK/FKs – enable correct JOINs, WHERE clauses, and integrity-awareness. The SF’s data model explicitly defines these entities and relations, which the AI can use to pick the right join keys, respect cardinalities, and avoid hallucinated columns. Domains (user-defined data types) – domains act as abstract data types that drive constraints and UI defaults. Sharing domains helps the AI choose correct data types, casts, default values, and validation logic in generated SQL. UI semantics – properties like control type or visibility can guide the AI to prefer filtered queries (e.g., hide inactive rows by default) or to shape parameter prompts and WHERE clauses that match what end-users actually see. Template description & intent – short, descriptive text per template (purpose, invariants, edge cases) gives the AI the business intent it needs to generate more accurate and consistent code.How I propose to make this work Expose a compact model export for use in VS Code MVP scope: tables, columns (incl. nullability), primary keys, foreign keys, domains (name, base type, constraints). Optional scope: UI hints (visibility, control), default filters, and template descriptions. Delivery options (any of these would work): Indicium OData endpoint that surfaces a read-only view of the SF model (Indicium already provides an open API and can expose SF branches when configured). CLI/export task that writes JSON files into a repository (consumed by VS Code). VS Code extension that authenticates to the endpoint and injects the model as inline context for Copilot prompts. Use the model export as AI context in the IDE In VS Code, I want to select a template and have the AI read the JSON/endpoint to generate the initial SQL ready for review and refinement. Expected resultsSpeed: AI drafts 70–90% of the SQL, I focus on edge cases. Quality: Consistent use of keys, domains, and defaults; fewer “missing join” or “wrong column” errors. Discoverability: As Thinkwise continues to add AI-powered features (e.g., model enrichments and support for storing LLM embeddings), a model-aware export aligns with that trajectory. Future fit: Community use cases already show value in combining Thinkwise models with LLMs (e.g., natural-language search using embeddings), reinforcing the need for structured model access.