Triggers are in a file, content is in the graph
domains.toml holds triggers only: the keywords that match against prompts and the paths that match against files. The rules, decisions and notes attached to a domain live in the graph.
Two commands rather than one, for a reason. Triggers are policy you write and read as text, so they belong in a file you can put under version control and copy to another machine. Content accumulates as you work, gets edges to projects and entities, and needs to be queryable. Keeping them apart means you can retune what fires without touching what is said, and add what is said without editing config.
How a match is decided
Matching is substring matching on the text and path matching on files. Nothing is fuzzy, nothing is semantic, and nothing is scored. A trigger either appears in what you sent or it does not. That is a real constraint and it is worth planning around. A domain triggered oninvoice does not fire on billing, and one triggered on auth fires on author too. Pick trigger words the way you would pick a grep pattern, then check.
Check before you rely on it
base context runs the same matching that runs during a turn, without sending anything. Paste in the prompt you actually mean to send. Either a domain matched or it did not, and you find out in a second rather than after a session where nothing arrived.
base domain get <name> shows one domain’s full configuration, so you can confirm a trigger landed where you meant it to.
Three sources, merged by name
Domains come from three places, loaded in this order:- The global
~/.base-gbl/domains.toml, which applies everywhere. - The workspace’s own
.base/domains.toml, which overlays the global set by name. - Any installed extensions, which merge in at the lowest priority.
Rules carry their reasoning
--rationale is injected as the rule followed by its reason. Write the reason. A bare instruction gets argued with when it collides with something the agent thinks is more sensible; an instruction with a reason attached usually survives the collision.
Next
Tiers and scoping
Global and workspace, how they merge, and what stays out of the other project.
Context reference
Every domain, rule, standard and star-command command, with its flags.