Prompt Best Practices

The AI Engineer can:

  • Translate user requirements into application structures
  • Modify database schemas and data relationships
  • Create and adjust UI components and layouts
  • Implement business logic and functional requirements
  • Troubleshoot errors and performance issues
  • Generate code based on natural language descriptions
  • Explain technical concepts in easy-to-understand terms
  • Suggest improvements based on best practices
  • Work within Flatlogic's development and stable environments

Command Reference

The AI Engineer can execute a variety of commands to help you manage your application at different levels. While you typically won't need to use these commands directly (the AI handles this behind the scenes), understanding what's possible can help you make better requests.

Schema Level Commands

These commands allow the AI Engineer to work with your application's data model:

  • list_entities – Shows all entities in your project
  • describeentity(entityname) – Details all fields and relationships of a specific entity
  • validate_scheme – Checks your project schema for consistency and errors
  • createentity(entityname) – Creates a new entity with the specified name
  • addfieldtoentity(entityname, fieldname, fieldtype, isdisplayfield) – Adds a new field to an entity
  • removeentity(entityname) – Removes an entity from your schema
  • removefield(entityname, field_name) – Removes a field from an entity
  • addrelationtoentity(entityname, fieldname, relationtype, relation_to) – Creates relationships between entities
  • changeprojectname(name) – Updates your project's name

Code Level Commands

These commands allow the AI Engineer to work with your application's code files:

  • readprojecttree – Views the entire project file structure
  • countfilelines(path) – Counts lines in a specific file
  • readfile(path, showlines) – Reads a file's contents
  • readfilelinecontext(path, linenumber, windowsize, showlines) – Examines code around a specific line
  • writefile(path, filecontents, commit_message) – Creates or replaces file contents
  • insertfilecontent(path, linenumber, newcontent, commit_message) – Inserts content at a specific line
  • replacefileline(path, linenumber, newcontent, commit_message) – Replaces a single line
  • replacefilechunk(path, startline, endline, newcontent, commitmessage) – Replaces a range of lines
  • replacecodeblock(path, oldcodeblock, newcodeblock, commit_message) – Replaces code patterns
  • deletefilelines(path, startline, endline, commit_message) – Removes lines from a file
  • validate_file(path) – Checks file syntax for errors

Data Level Commands

These commands allow the AI Engineer to work with your application's database:

  • getdbschema – Retrieves the current database schema
  • execute_sql(query) – Runs SQL queries on your database

When working with the AI Engineer, you can simply describe what you want to accomplish in natural language, and it will use the appropriate commands to implement your request. Each change is automatically versioned, allowing for easy rollback if needed.

If you face any difficulties, please message us on our Discord, Forum, Twitter, or Facebook. We will respond to your inquiry as quickly as possible!


← AI Engineer                                  Automatic Landing Page →