Keep track of the important people and places in your life. Store relationships, closeness ratings, notes, and tags, with fuzzy search powered by trigram matching. Stavrobot will proactively offer to remember new people and places as they come up in conversation, and surface relevant context when you mention them later.
This skill sets up a system for tracking the important people and places in the user's life. It creates database tables, indexes, and behavioral rules (stored as a scratchpad entry).
The system is designed for a user who mentions people and places in conversation. The bot should proactively offer to store new people and places when they come up naturally, and should surface relevant context (e.g. notes about a person, or pending todos at a location) when appropriate.
When other skills or tables reference people or places (e.g. a diary, a workout log, an event tracker), they should add foreign keys pointing to the people and places tables as appropriate. This keeps relationships centralized rather than duplicating names as plain text.
Enable the pg_trgm extension if it does not already exist. This is needed for fuzzy/similarity search on names.
people tableCreate a table called people if it does not already exist, with these columns:
id (serial, primary key)name (text, not null) - the person's full name.relationship (text, nullable) - how the user knows them (e.g. "close friend", "colleague", "partner", "pet").notes (text, nullable) - freeform notes about the person (nicknames, where they live, interests, anything useful to remember).created_at (timestamptz, default now())closeness (integer, nullable, check between 1 and 10) - how close the user is to this person. 1 = distant acquaintance, 10 = closest family/partner.Create a trigram index on the name column using gin_trgm_ops for fuzzy search. This allows finding people even with typos or partial matches.
places tableCreate a table called places if it does not already exist, with these columns:
id (serial, primary key)name (text, not null) - the place's name.type (text, nullable) - what kind of place it is (e.g. "restaurant", "bar", "cafe", "park", "workplace", "home", "gym").location (text, not null) - the city or area where the place is. Used for disambiguation when multiple places share a name.notes (text, nullable) - freeform notes. Use this for place-specific reminders, reviews, or anything worth remembering.created_at (timestamptz, default now())tags (text array, default empty array) - flexible tagging. The tag want-to-visit specifically marks places the user wants to visit in the future. Other useful tags: visited, favorite, avoid.rating (integer, nullable, check between 1 and 5) - the user's rating of the place.Create a GIN index on the tags column for efficient tag-based filtering.
Create a trigram index on the name column using gin_trgm_ops for fuzzy search.
Create a scratchpad entry titled "People and places rules" with the following content:
Rules for managing people and places:
Adding new entries:
% operator or similarity() function with pg_trgm) and search both the name AND notes fields. For places, search name and notes.Searching and surfacing context:
Foreign key integration:
people and places tables via foreign keys rather than storing names as plain text. This keeps data normalized and enables queries like "show me everything involving person X" across the whole system.Tags for places:
want-to-visit tag marks places the user wants to try in the future. When the user says something like "I want to check out [place]", add or create the place with this tag.want-to-visit tag.want-to-visit, remove the tag and optionally add visited.Insert a row into the skills table for this skill:
name: "people-and-places"url: "https://stavrobot.stavros.io/skills/people-and-places.md"content: the full text of this fileversion: the version from the front matter of this file