acquaint#
acquaint: people, and what they are involved in, for AI agents.
Who someone is, how to reach them, how to read them, how to write to them, kept as hand-editable Markdown with a source on every preference, outside any code repository.
The verbs are the same in Python, on the command line (acquaint who ada -f aka) and
over MCP:
>>> from acquaint import new, remember, who, brief
>>> new("person", "Ada Lovelace")
>>> remember("ada-lovelace", "prefers email for anything with attachments",
... source="https://example.org/thread/1")
>>> who("ada", field="aka")["value"]
['Ada', 'Lovelace']
For library use, Store is a MutableMapping of entities over any mapping of
files (a dol files store by default).
Functions
|
Everything to know before writing to someone: card, writing style, reach, project norms, recent observations, gaps. |
|
Scan prose that names people before publishing it: conflations (one person written as two), ambiguous names, unknown names. |
|
The data root: the argument, else |
|
Who may be told what, before writing to a set of readers (ids or channel identities, plus an optional correspond |
|
Remove an entity's folder and leave a salted tombstone. |
|
Check records: every preference, view and rule sourced; tiers, labels and seals set by the operator; nothing POLICY.md forbids; files parse; entry files within budget. |
|
Create a person, project, org or group from its template (a readable slug id; |
|
Ordered channels for reaching someone in a context. |
|
Append a dated observation ( |
|
Change an entity's id ( |
|
Map a channel handle ( |
|
Everything the store says about one person's disclosure standing, with sources and dates, to confirm when a collaboration ends, when someone changes role, or before a tier changes: tier entries, links, the default tiers and clearances reached through links, seals on records and on fact lines, and the rules that name them. |
|
The deterministic half of deslop: machine-writing tells in a draft, at the recipient's tolerance and against their blocklist. |
|
Make the data root a checkout of a PRIVATE GitHub repository (created private through |
|
Pull the store from its private remote, rebasing local work on top. |
|
Commit, rebase onto the remote and push the store, after re-checking the remote, the guard and the visibility. |
|
Whether the store is synced, to which repository, uncommitted changes, ahead/behind, the guard, and live visibility. |
|
Look up one person, project, org or group by exact id, name, alias, handle or email. |
Classes
|
One person, project, org or group: a mapping of its files (relative names to text), plus parsed views of them. |
|
|
Exceptions
An expected failure with a message meant for the person or agent that asked. |
- exception acquaint.AcquaintError[source]#
Bases:
ExceptionAn expected failure with a message meant for the person or agent that asked.
- class acquaint.Entity(store, key)[source]#
Bases:
MutableMappingOne person, project, org or group: a mapping of its files (relative names to text), plus parsed views of them.
Parsed views are recomputed on access (these are small text files), so an edit made through the mapping is never hidden behind a stale cache. Parse problems are collected in
errors; they never raise.- property aka: list[str]#
Other names this entity goes by, as strings (a scalar
akais one alias, not its letters).
- property identities: list[dict]#
{platform, value, source, status, …}.- Type:
Handles and addresses from
identities.yaml
- property links: list[dict]#
{to, relation, role, since, until, source}.- Type:
Affiliations from
links.yaml
- property rules: list[dict]#
{when, do, set_by, source}.- Type:
Channel and communication rules from
rules.yaml
- property surface_forms: list[str]#
id, name, aka, name parts, handles.
- Type:
Every string a document might use for this entity
- text(name, default='')[source]#
A file’s text, or
defaultwhen the file does not exist.- Return type:
- property trust: list[dict]#
{tier, valid_from, valid_to, review_by, recorded, source, note}(seeacquaint.trust).- Type:
Disclosure tiers from
trust.yaml
- class acquaint.Store(data_dir=None, *, files=None)[source]#
Bases:
MutableMappingMutableMapping[str, Entity]over one folder per entity, keyed"<kind dir>/<slug>".>>> store = Store(files={}) >>> store["projects/example"] = {"PROFILE.md": "---\nname: Example\n---\n"} >>> store.find("project:example"), store.find("example") ('projects/example', 'projects/example')
- append_text(key, name, text)[source]#
Append to one of an entity’s files (created if missing); a true append on disk, so concurrent writers do not erase each other.
- Return type:
- exists(key)[source]#
Whether anything is stored under the entity’s folder, with or without an entry file.
- Return type:
- find(ref)[source]#
The store key for
people/ada-lovelace,person:ada-lovelaceor a bareada-lovelace.A bare id that names entities of two kinds is an error: say which, e.g.
project:atlas. Anything that is not a valid key raisesKeyError, so no reference reaches outside the data root.- Return type:
- find_id(slug)[source]#
Every key whose id is
slug, in any kind (ids are lowercase, so the lookup is too).
- location_warning()[source]#
A warning when the data root is, or sits inside, a git repository that is not an acquaint store.
- misnamed()[source]#
Entry files on disk the store cannot address: a folder or file name not in lowercase
kind/id/PROFILE.mdform, or a linked folder.
- acquaint.brief(person, *, purpose=None, project=None, ref=None, audience=None, data_dir=None)[source]#
Everything to know before writing to someone: card, writing style, reach, project norms, recent observations, gaps. With
ref(the conversation the message goes to; correspond is asked who can read it, and an unknown audience is public) oraudience(an audience record as JSON), it opens with the ceiling, the records not to identify, how many lines were withheld, and what they were already told.- Return type:
- acquaint.check(text, *, data_dir=None)[source]#
Scan prose that names people before publishing it: conflations (one person written as two), ambiguous names, unknown names.
- Return type:
- acquaint.data_dir(data_dir=None)[source]#
The data root: the argument, else
$ACQUAINT_DATA_DIR, elsedata_dirin config.toml, else~/.local/share/acquaint.An explicit argument may be relative (it is resolved now). The environment variable and the config file must hold absolute paths: a relative one would put profiles wherever the current directory happens to be.
- Return type:
>>> data_dir("profiles").is_absolute() True
- acquaint.disclosure(people, *, projects=None, audience=None, today=None, data_dir=None)[source]#
Who may be told what, before writing to a set of readers (ids or channel identities, plus an optional correspond
audiencerecord as JSON): the tier and clearance in force for each, the least clearance, which records each is cleared for, the seals, the vocabulary a gate must scan for, what each was already told, and the gaps.projectslimits the records to those plus people. Reads only.- Return type:
- acquaint.forget(entity, *, confirm=False, data_dir=None)[source]#
Remove an entity’s folder and leave a salted tombstone. Needs the exact id; without
confirm, only reports what would be removed.- Return type:
- acquaint.lint(entity=None, *, data_dir=None)[source]#
Check records: every preference, view and rule sourced; tiers, labels and seals set by the operator; nothing POLICY.md forbids; files parse; entry files within budget.
- Return type:
- acquaint.new(kind, name, *, qualifier=None, description=None, force=False, data_dir=None)[source]#
Create a person, project, org or group from its template (a readable slug id;
qualifierseparates two of the same name).- Return type:
- acquaint.reach(person, *, purpose=None, urgency=None, project=None, message_type=None, topic=None, data_dir=None)[source]#
Ordered channels for reaching someone in a context. Only active addresses; returns them, sends nothing.
outcomeisreachable,no_address(a rule matched, but neither states an address nor finds a usable one recorded for its channels) orno_channel. Each channel’saddress_kindisstated,identity(the person’s handle, which a conversation-addressed channel does not take) orNone.- Return type:
- acquaint.remember(entity, text, *, source=None, kind='observation', disclosed=None, reactivate=False, data_dir=None)[source]#
Append a dated observation (
observation,interaction,identity,preference,view,rule) to an entity’s log, with its source. Aninteractionmay list the records the message identified (disclosed: exact ids, never the text). An identity equal to an inactive one (stale,retracted, …) is refused, naming that entry and the command with which the operator can make it active again.- Return type:
- acquaint.rename(entity, to, *, data_dir=None)[source]#
Change an entity’s id (
tois a slug) or name and id (tois a name), rewriting links to it. Needs the exact id.- Return type:
- acquaint.resolve(handle, *, data_dir=None)[source]#
Map a channel handle (
github:octocat,email:ada@example.org) to the entity it belongs to, with the evidence.okis true only when an active identity on the named platform belongs to exactly one entity. A handle without a platform (@octocat), a match by name only, an inactive identity, or several owners all returnok: falsewith what was found.- Return type:
- acquaint.review(person, *, today=None, data_dir=None)[source]#
Everything the store says about one person’s disclosure standing, with sources and dates, to confirm when a collaboration ends, when someone changes role, or before a tier changes: tier entries, links, the default tiers and clearances reached through links, seals on records and on fact lines, and the rules that name them. Not ok when an affiliation has ended while a permissive tier is still in force. Reads only.
- Return type:
- acquaint.style_lint(text, *, recipient=None, tolerance=None, data_dir=None)[source]#
The deterministic half of deslop: machine-writing tells in a draft, at the recipient’s tolerance and against their blocklist.
- Return type:
- acquaint.sync_init(*, repo, remote_url=None, existing_only=False, dry_run=False, data_dir=None)[source]#
Make the data root a checkout of a PRIVATE GitHub repository (created private through
ghunlessexisting_only), with a pre-push guard.- Return type:
- acquaint.sync_pull(*, dry_run=False, data_dir=None)[source]#
Pull the store from its private remote, rebasing local work on top.
- Return type:
- acquaint.sync_push(*, message=None, dry_run=False, data_dir=None)[source]#
Commit, rebase onto the remote and push the store, after re-checking the remote, the guard and the visibility.
- Return type:
- acquaint.sync_status(*, check_visibility=True, data_dir=None)[source]#
Whether the store is synced, to which repository, uncommitted changes, ahead/behind, the guard, and live visibility.
- Return type:
- acquaint.who(name, *, field=None, brief=False, data_dir=None)[source]#
Look up one person, project, org or group by exact id, name, alias, handle or email.
Costs scale with what you ask:
fieldreturns one value (aka,email,github,label,tier, any frontmatter key),briefthe identity block, and the default the whole entry file. It never guesses: no exact match, or several, returns the candidates andok: false.- Return type:
Modules
The deterministic half of deslop: find the patterns that make prose read as machine-written, scaled to the reader. |
|
Changing the store: create an entity, append an observation, rename with relinking, forget with a tombstone. |
|
Finding the right record: exact references, handle resolution, the conflation check, and channel choice. |
|
MCP over stdio: the same tools, for Claude Desktop and other local MCP clients. |
|
Where a project's meeting todos may be filed: its declared private meta repository, and the people who belong to it. |
|
The text formats acquaint stores, as pure functions: frontmatter, sections, items, source tags, slugs, log entries. |
|
Turning a tool's result into terminal output: |
|
Files shipped inside the package: record templates, the policy tripwires, purpose reminders, the tells catalogue, skills. |
|
Where records live and how code reaches them: the data root, |
|
Private-repository sync for the data root: create the repository private, refuse anything else, guard every push. |
|
The single source of truth for every surface: plain functions, flat arguments in, JSON-ready dicts out. |
|
The disclosure vocabulary: tiers on people; labels, seals and clearances on records; and which tier is in force. |