Prompts

Modify Entity

Prompts for changing existing features

TL;DR: Describe what to change, AI updates all the right files.

Add Fields

Simple Field

Add [field_name] field to [entity]. Type: [type].

Example:

Add priority field to tasks. Type: select with options low/medium/high.
Default: medium.

Multiple Fields

Add fields to [entity]:
- [field1]: [type]
- [field2]: [type]
- [field3]: [type]

Example:

Add fields to clients:
- website: url (optional)
- employee_count: number
- annual_revenue: decimal
- founded_year: number

Field with Specific Behavior

Add [field] to [entity].
Type: [type].
[Additional requirements]

Examples:

Add due_date to tasks.
Type: date.
Show as "overdue" badge in red if past due and not completed.
Add assigned_to to tasks.
Type: relation to users.
Show user avatar and name in list.
Filter by assigned user.

Change Field Type

Change [field] in [entity] from [old_type] to [new_type].

Example:

Change status in projects from text to dictionary.
Use project_status dictionary with values: planning, active, on_hold, completed.

Add Validation

Add validation to [field] in [entity]: [rules]

Examples:

Add validation to email in contacts: must be valid email format.
Add validation to sku in products: required, unique, alphanumeric only.
Add validation to quantity in orders: required, minimum 1, maximum 1000.

Make Field Required/Optional

Make [field] in [entity] [required/optional].

Example:

Make phone in contacts optional (currently required).

Add Relation

One-to-Many

Add relation: [parent] has many [children].
Show [child_count] on [parent] list.

Example:

Add relation: client has many contacts.
Show contact count on clients list.
On client detail page, show contacts as embedded list.

Reference Field

Add [parent]_id to [child].
Show [parent] name in [child] list.
Make it a clickable link.

Example:

Add project_id to tasks.
Show project name in tasks list.
Make project name clickable to go to project detail.

Remove Field

Remove [field] from [entity].

Example:

Remove fax_number from contacts.

Rename Field

Rename [old_name] to [new_name] in [entity].
Update all references.

Example:

Rename company_name to name in clients.
Update all references in UI and API.

Add Computed/Display Field

Add [field] to [entity] display.
Calculate from: [formula/logic]
Don't store in database.

Example:

Add total to invoices display.
Calculate from: sum of invoice_items (quantity * unit_price).
Show in list and detail page.
Add age to contacts display.
Calculate from: birth_date.
Show as "32 years" format.

Change Default Value

Change default for [field] in [entity] to [value].

Example:

Change default for status in tasks to "todo" (currently "draft").

Complete Examples

Extend Entity with Multiple Changes

Update clients feature:

Add fields:
- industry: dictionary (use industries dictionary)
- company_size: select (1-10/11-50/51-200/200+)
- website: url
- linkedin_url: url

Make industry required.
Show industry as badge in list.
Add industry filter to list page.
Group industry options in filter dropdown.

Add Audit Fields

Add audit fields to projects:
- created_by: relation to users (set automatically on create)
- updated_by: relation to users (set automatically on update)
- created_at: already exists
- updated_at: already exists

Show "Created by [name] on [date]" on detail page.
Show "Last updated by [name]" if different from created_by.

On this page