Rules and knowledge
Tell Panda once how you want things done in a project, and give it the documents it should know, so every chat there starts informed.
Feature Updated 18 Nov 2026What a rule is
A rule is one instruction every chat in a project follows, for example "Always add a WHERE clause to UPDATE and DELETE". You write it once. Panda reads it at the start of every chat in that project, so you stop repeating yourself. When you have corrected Panda twice for the same thing, write a rule.
Knowledge is the other half: the documents around the code, such as specs, architecture notes and domain material. Rules say how to work, knowledge says what the work is about.
Where rules live
Open Customize in the sidebar and pick Rules. Rules that apply everywhere and the rules of every project are listed together, and each row says where it applies. New rule writes one by hand.
Or ask Panda in any chat: "Create this rule for me". Panda shows the rule on a card. Choose whether it applies to this project or to all projects, then press Save, or Open in editor to change it first. Nothing is saved until you press Save.
Rules you keep in your own rules folder (~/.claude/rules) apply in every project and are listed under Everywhere by their own name. There is no separate personal list to manage.
Where the files are
A rule is a file. The project's rules are kept in .pandaos/rules/, and PandaOS copies them to where each engine reads them, such as .claude/rules/. Edit the rule in Customize. When a copy in .claude/rules/ is changed or added by hand, PandaOS asks first. For an edit it offers Keep the change or Restore previous, and for a new file Add to rules or Don't add. Until you answer, chats follow the approved version. A new file you choose not to add is kept in .pandaos/rules-conflicts/, so nothing is lost.
Write one that works
A rule that names a behaviour beats one that names a virtue, and a reason makes it stick.
- Weak: "Be careful with the database."
- Strong: "Always add a WHERE clause to UPDATE and DELETE. Our production database has no undo."
Rules apply from your next message. Correct Panda mid-chat and watch it take.
Knowledge
Open Customize in the sidebar and pick Knowledge to add some. Add knowledge uploads files, writes a note, or picks documents from Google Drive, SharePoint or OneDrive.
Knowledge files are the documents Panda draws on when it answers in the project. If your knowledge includes an API spec, Panda can write code that matches the real endpoints. If it includes an architecture decision, Panda understands why the system is built that way and avoids suggestions that go against it.
Each knowledge file applies where you put it: Everywhere, one project or several. Knowledge that belongs to one project never reaches another.
What a rule cannot do
A rule is text Panda reads, not a switch it cannot cross. Every rule applies at once: there is no priority between them, so two rules that contradict each other leave Panda to choose. Keep them from contradicting rather than hoping the more specific one wins. For hard limits on what Panda may do, use Permissions.
Rules PandaOS writes
PandaOS writes what it needs to tell the engine as rule files of its own, next to yours. Their names tell them apart:
| Prefix | What it is |
|---|---|
pandaos- | Guidance PandaOS generates for the project, such as how to use the tools that are switched on |
knowledge- | A copy of one of the project's knowledge files. Edit the knowledge file, not the copy |
user- | A rule from your own rules folder |
org- | A rule your organization provides |
These files are regenerated. A rule from your organization is listed under From your organization. The others do not appear in the Rules list. Change the source instead.
Some engines read a single instructions file rather than a rules folder, such as AGENTS.md for Codex. They get the same content in one managed block at the top of that file. Everything outside the markers is yours and is kept as it is:
<!-- >>> pandaos-managed (do not edit) >>> -->
... managed content ...
<!-- <<< pandaos-managed <<< -->