Skip to main content

What are Project Rules?

Persistent, reusable context that Bezi will apply to every prompt response in the project. Adding Project Rules is the best way to ensure Bezi’s assistance will be consistent with your project’s goals, preferences, and workflows.
Project Rules only apply to the Unity project they’re set in. To apply the same Project Rules across multiple projects, finalize them in one project, then paste them into the other Project Rules pages.

How to access Project Rules:

To access your Project Rules, click the icon in the top left of your app to open the Sidebar then select Project Rules to open the page. Project Rules comes with default rules. You can edit those or write your own from scratch.

What to use Project Rules for:

  1. Output and structural guidelines: define code syntax, input/UI systems, debug strategies, domain-specific knowledge, project-specific workflows, and more
  2. Communication preferences: set Bezi’s tone of voice, your proficiency level, how much instruction you want, and more

Project Rules writing guide

Project Rules can be written in natural languange. Like a prompt, an effective Project Rule is focused on a specific purpose. Do not try to pack too much into a single rule.
You cannot make Bezi do something it’s incapable of doing via a project rule. Examples of this are; asking Bezi to start/stop play mode, delete files, etc. If you need an exhaustive list of what Bezi cannot do or help drafting rules, please reach out to support@bezi.com.

Things to do

  1. ALWAYS write direct, clear instructions: only use decisive verbs and be very specific
    1. GOOD: Follow code style rules defined in MyProjectStyle.md
    2. GOOD: NEVER use the Singleton design pattern
    3. BAD: write good code
    4. BAD: follow all SOLID principles
  2. Expand definitions with context and synonyms: Explain why the rule matters, if you want Bezi to identify something in your project give multiple examples, etc.
  3. Always add real, positive examples from the project: Find examples of situations that you want Bezi to mirror and list as many as possible, to help Bezi recognize the patterns
  4. Emphasize with strong language: Use caps and clear words like “ALWAYS,” “IMPORTANT,” and “CRITICAL” to signal importance
  5. Prioritize by importance: Place CRITICAL rules at the top, and move less important ones down
  6. Enrich references: provide library name, version, official website, and a direct link to scripting examples
  7. Update rules as the project evolves: Rules should be edited and improved, the fewer and clearer rules the better

Things not to do

  1. Do not write rules that use if or when: Rules must be set as universal principles
  2. Do not use vague language: Statements should be clear and decisive, “always” or “never
  3. Do not use negative examples: If you are telling Bezi never to do something, define what it should do instead and give example(s) of the positive behavior
  4. Do not use negative examples: If you are telling Bezi never to do something, define what it should do instead and give example(s) of the positive behavior
  5. Do not have too much information in a single rule: Rules must be simple and clear. Write out the entire rule and, if there is too much information it in, break it into multiple rules and give it its own section
  6. Do not have contradicting rules or examples: Make sure your Rules serve a clear, well defined purpose and they all have relevant examples that will strengthen clarity

Project Rule Examples

Output and structural guidelines

Before you propose code-related changes, review all relevant scripts and analyze their code styles.Make sure all code-related changes you propose, to new or existing scripts, follow the project’s standard coding guidelines:
  1. Use camel case for naming
  2. Prefer long self-explanatory names for variables, methods, and types
  3. Add short summary comments for all methods only and for each step in complex algorithms
  4. Split long code statements into smaller ones
  5. Use constant fields instead of in-place constants
  6. Add logs for better debugging but avoid logs in extensively used methods (like Update)
This is an example of code that follows the project’s standard coding guidelines:
using UnityEngine;

/// <summary> Helps with Raycasting </summary>
public class PhysicsHelper : MonoBehaviour
{
		private LayerMask layerMask = LayerMask.GetMask("Wall", "Character");
	
		// See Order of Execution for Event Functions for information on FixedUpdate() and Update() related to physics queries
		private void FixedUpdate()
		{
			RaycastHit hit;
			// Does the ray intersect any objects excluding the player layer
			// TODO: Remove spammy logs after debugging
			if (Physics.Raycast(transform.position, transform.TransformDirection(Vector3.forward), out hit, Mathf.Infinity, layerMask))
			{
			    Debug.DrawRay(transform.position, transform.TransformDirection(Vector3.forward) * hit.distance, Color.yellow);
					Debug.Log("Did Hit");
			}
			else
			{
					Debug.DrawRay(transform.position, transform.TransformDirection(Vector3.forward) * 1000, Color.white);
					Debug.Log("Did not Hit");
			}
		}
}
  • I’m developing a 2D game. Unity is configured for 2D development using sprites and an orthographic camera. Make sure to follow Unity’s best practices for 2D games.
  • My project should use the old Unity Input System and old UGUI for interfaces; never suggest newer solutions. Always use Sprite Atlases.
  • My project uses:
    1. Unity 6000.0 (aka Unity 6)
    2. new Input System for handling player’s input
    3. new UI Toolkit for user interfaces
    4. com.unity.mobile.notifications@2.4.1package for local notifications
_When I tell you that your solution does not work, provide additional, detailed debugging and troubleshooting steps based on best programming practices, so I can execute them, copy and paste the logs back to you, so you can identify the real cause of the issue and explain it to me. _

Communication preferences

  • Make your tone less “eager-to-please”. All responses should be blunt and concise, yet friendly.
  • Refer to me only as “buddy” in all responses moving forward.
  • At the end of each message, add a motivational quote.
  • I’ve been creating games as a hobby and want to learn professional game programming. Explain all software development and Unity-specific terms and concepts in detail. Include relevant project examples in your explanations as often as possible.
  • You are a professional Senior Unity Gameplay Developer. Don’t explain basic things.
  • I am a Game Designer looking to brainstorm new ideas. As we converse, don’t hesitate to suggest ideas for my game!