Skip to main content

Use AI Coding Assistants with Workbench

๐ŸŽฏcontext

You're using or want to use Coding Assistants with the Workbench? Start with this quick introduction, showcasing different use cases and how you can make the most of AI.

Outlineโ€‹

This How-To will cover different use cases and showcase prompts specifically designed to work with the Workbench:

  • Creating an initial structure
  • Implementing Entities based on given design
  • Implementing Data Persistance
  • Implementing Business Logic
  • Implementing APIs
  • Implementing Integrations

Prerequisitesโ€‹

Have a Coding Assistant installed and ready on your device. We recommend one of the following Assistants:

  • Cursor IDE - An AI-first code editor with powerful code generation capabilities
  • GitHub Copilot - GitHub's AI pair programmer that integrates with various IDEs
โš warning

The quality of generated code depends entirely on the AI coding assistant's capabilities and training data. Always review, test and validate AI-generated code before using it in production. The design files provide context, but the final code quality and correctness are the responsibility of the developer.

Preparing your project for Coding Assistantsโ€‹

To help AI Coding Assistants with generating code from your design files and understanding the project we will extend the Readme.md with some general information about the project.

Readme.md
## Design files
* the design-files under `/src-design` represent the designed building blocks of the project
* the subfolder structure reflects the different design element types (e.g. domain entities under `/entity`)

### Source code
* the source code can be found under `/src`

#### Entity classes
* entity classes are grouped inside a folder, where each entity is represented by a separate file
โ—๏ธinfo

If you want to use a different structure you can simply change the folders mentioned in the Readme.md

Using Coding Assistantsโ€‹

Create an initial structureโ€‹

Based on the provided information in the Readme.md file we want to create an initial folder structure for the project

Create initial folders under src for all the api, domain and integration namespaces (namespace level only) and update Readme.md accordingly.

Once the basic project structure is in place, coding assistants can help you quickly generate the actual implementation across all layers of your application. The following sections show example prompts you can use for each type of implementation task - entities, persistence, business logic, APIs, and integrations. Choose the category that matches what you want to build next.

Prompt collection for different use casesโ€‹

Create classes for one entity and dependent items
Based on the design files, create a class with properties for entity <EntityXYZ> including all not existing entities that it is relying on.
Create classes for all entities of a namespace
Based on the design files, create classes with properties for all entities defined in namespace <NamespaceXYZ>.
List discrepancies between design and current implementation
Based on the entity design files, list all places where the current implementation doesn't match.
Ensure alignment of entity implementation with design specification
Make sure existing entities and their properties align with design files.

For one entity:

Make sure entity <EntityXYZ> and its properties align with design files.