Tutorial 03 — Writing a Profile Instruction for Consistent Behaviour
Tutorial 03 — Writing a Profile Instruction for Consistent Behaviour
AI and PicBasic Pro Tutorial Series — Post 3 of 6
Content produced with AI assistance and reviewed by the forum administrator.
What is a Profile Instruction?
Most AI tools have two levels of persistent instruction. The workspace instruction (covered in Tutorial 02) applies to a specific workspace. A profile instruction sits above that — it applies to every conversation you have, across all workspaces and standard chats.
Think of the profile instruction as telling the AI who you are and how you work, once, permanently. The workspace instruction then adds the specific device and compiler context on top of that foundation.
In Claude this is found under Settings then Profile. Other AI tools have equivalent features under different names — user preferences, custom instructions, personal context, or similar.
Why This Matters for PBP3 Work
Without a profile instruction the AI treats every conversation as a generic interaction. It produces code that looks professional but may be incomplete, hedges its answers with unnecessary caveats, and does not flag uncertainty about specific syntax or register values clearly.
With a well-written profile instruction the AI knows:
- You are an embedded systems developer, not a beginner
- Code must be complete and compilable — no skeleton placeholders
- Timing calculations must be shown explicitly so you can verify them
- Every change to existing code must be annotated
- Your original code must be preserved before any modifications are made
- Uncertainty must be stated clearly, once, and then the AI moves on
These are not things you want to repeat in every conversation. Set them once in the profile and they apply everywhere.
A Starting Profile Instruction
The following is a starting point. It is written for PBP3 development but applies sensibly to general embedded work. Adapt it to your own working style — add things that matter to you, remove things that do not.
Code:
; ============================================================
; PROFILE INSTRUCTION — STARTING POINT, ADAPT TO YOUR NEEDS
; ============================================================
I am an embedded systems developer working in PicBasic Pro 3 (PBP3)
by melabs, targeting PIC microcontrollers across the mid-range and
enhanced families.
GENERAL BEHAVIOUR
Lead with the answer. No preamble. If my approach has a problem, say
so before building on it. Flag uncertainty once, clearly, then move on.
Do not invent syntax or parameters — if uncertain, say so.
CODE QUALITY
Every piece of code must be complete and compilable. No skeleton
placeholders unless I ask for an outline. Show timing calculations
explicitly so I can verify them. Trace logic before presenting code.
BEFORE WRITING ANY CODE
Confirm: target device is identified; DEFINE OSC matches hardware
clock including PLL; DEFINE statements are valid for the device;
register names and bit positions are correct. If any cannot be
confirmed, ask before proceeding.
CHANGES AND MODIFICATIONS
Show what changes and why. Mark every change: ; MOD: description
Never silently remove code. Flag side effects before making changes.
BACKUPS
Before modifying any code I provide, output the original unchanged:
===ORIGINAL BACKUP START===
(original code here)
===ORIGINAL BACKUP END===
Then the modified version:
===MODIFIED CODE START===
(modified code here)
===MODIFIED CODE END===
FAULT FINDING
Identify faults before fixing them. Present as a numbered list:
location, what is wrong, why it is wrong. Do not mix audit and fix
in the same response unless I ask.
CALCULATIONS
Show all timing calculations in full with formula and values.
Flag approximate results and state the margin.
NOTE: This is an example profile instruction. It is provided as a starting point only. Adapt it to your specific needs and working style before use. Do not treat this as tested or authoritative — adjust based on your own experience.
How the Two Levels Work Together
The profile instruction sets baseline behaviour for all AI interactions. The workspace instruction adds device and compiler-specific context for PBP3 work. They do not conflict — the workspace instruction sits on top of the profile and adds specificity without overriding the general behaviour.
A conversation inside your PBP3 workspace therefore starts with:
- Profile — general behaviour, code quality standards, backup discipline
- Workspace instruction — device family, compiler, document authority
- Workspace documents — manual, datasheet, working examples
Each layer adds precision. Together they produce an AI interaction that is grounded in the right documents, behaves consistently, and meets a clear quality standard for every response.
This is a Starting Point
The profile instruction above will not be perfect for your workflow on day one. Use it, notice where the AI does something you did not expect, and add a line that covers it. Over time it becomes an accurate description of how you work and the AI's output becomes correspondingly more predictable.
One clear instruction per behaviour you want to change. Keep it concise. The profile instruction is a living document — treat it as one.
Previous: Tutorial 02 — Setting Up Your AI Workspace
Next: Tutorial 04 — A Structured Three-Prompt Debugging Workflow
This tutorial series was produced with AI