Skip to main content

Policies are the rules you want every run to follow, such as "Always dismiss the cookie banner before checking page content". They are the authored shelf of memidex: agent-qa never writes them on its own, never trims them, and they win every conflict with something it learned.

Where they live

FileApplies to
agent-qa-knowledge/policies/global.mdEvery run.
agent-qa-knowledge/policies/<product>.mdRuns against that product only.

A product is the target's product field, or the target's name when it has none. A run gets the global file first, then its product's file.

Writing rules

Write one rule per line, in plain imperative English:

Always dismiss the cookie banner before asserting page content
Use the guest checkout unless a step says to sign in
Treat prices as including tax
  • HTML comments are removed before serving. The file init writes is one comment block, so it starts out empty; add your rules below it.
  • Every other line reaches the model word for word, on every planning turn of every step.
  • Policies are never trimmed to fit a budget. Keep them few and specific. Files over 16,000 characters still serve in full, with a warning.

How the agent sees them

Policies open the brief for each test, marked as human-authored, ahead of anything agent-qa learned. When a learned fact disagrees with a policy, the policy wins.

Rules that arrive as records

A QA rule can also exist as a policy record. Accepting it, through agent_qa_change_knowledge or chat, appends the rule to the matching policies file between two markers:

<!-- agent-qa:policy policy-… -->
Never place an order with a real payment method
<!-- /agent-qa:policy policy-… -->

Existing sections are never rewritten, so your own lines stay exactly as you left them.

Coming from v0.1

v0.1 kept rules in the file named by workspace.agentRules, usually agent-rules.md. In v0.2, move those lines into agent-qa-knowledge/policies/global.md. The old key is no longer accepted. See v0.1.x to v0.2.x.