Skip to content

fix(save): keep the matching lists portable domain knowledge - #83

Merged
tanglearncode merged 1 commit into
mainfrom
routing-portable-entities
Aug 8, 2026
Merged

tanglearncode merged 1 commit into
mainfrom
routing-portable-entities

Conversation

@tanglearncode

Copy link
Copy Markdown
Contributor

A context is domain knowledge meant to be handed to a teammate intact. #80 put a hole in that, and this closes it.

What was wrong

The matching lists added in #79 travel inside the bundle. The guidance in #80 told the model to fill routingEntities with "services, repos, ticket ids, error strings, commands, hosts, people".

Hostnames and people are exactly the things that mean nothing on someone else's machine — and "people" contradicts the save command's own standing rule against writing unnecessary personal information. A matching list is the easiest place for a bundle to quietly stop being portable: an absolute path looks like a usefully rare term while it is being written, and is worthless or revealing the moment the context is shared.

Two smaller defects alongside it:

  • The hosts disagreed. Claude, Copilot and pi asked for "commands, hosts, people"; Kimi and Codex asked for "commands"; pi's tool schema asked for "commands, hosts". The same work saved from different hosts produced different bundles.
  • Nothing enforced any of it. The rule lived only in prose, so compliance was the model's to get right every time.

The fix

One wording on every host, asking for names that belong to the subject: services, components, repositories, ticket ids and prefixes, error strings, product and system names. No hosts. No people.

An explicit portability rule in each document: these lists travel with the context, so no absolute paths, home directories, usernames, personal names, or email addresses, and nothing whose meaning depends on this machine or this person.

The escape hatch stays where it belongs. If the work genuinely is about a particular environment, the profile says so — that is what the profile is for. What changes is that the matching index is not where machine detail goes.

A mechanical filter, so this does not rest on prose. Entries containing a drive letter path, a UNC path, ~/, /home/, /Users/, /root/, or an email address are dropped from both lists at save time. It applies to the lists only; the profile and knowledge folder are untouched, and being unable to search for a context by someone's home directory costs nothing worth having.

Tests

Machine paths in all five shapes are dropped, email addresses are dropped, the rule applies to questions as well as entities — and, the one that keeps the filter honest, ordinary domain terms that merely look technical are kept: src/core/routing.mjs, default_pool_size, billing-postgres:5432, INC-1001, user-service.

The cross-host document sweep now also asserts every host states the portability rule and that none of them asks for hostnames or people again.

Diff coverage: 22 changed lines, 0 uncovered. Full suite 437 passing.

The lists added in #79 travel inside the bundle, and the guidance in #80
told the model to fill them with "commands, hosts, people". Hostnames and
people mean nothing on anyone else's machine, and asking for people
contradicts the save command's own rule against writing unnecessary
personal information. A matching list is the easiest place for a context
to quietly stop being shareable: an absolute path looks like a usefully
rare term while it is written, and is worthless or revealing the moment
the bundle is handed over.

The hosts had also drifted apart — three asked for hosts and people, two
asked for neither — so the same work saved from different hosts produced
different bundles.

One wording everywhere now, asking for names that belong to the subject:
services, components, repositories, ticket ids and prefixes, error
strings, product and system names. Each document states that the lists
travel and must stay free of absolute paths, home directories,
usernames, personal names and email addresses.

If the work genuinely is about a particular environment, the profile is
where that belongs and is untouched. What changes is that the matching
index is not.

And a filter, so none of this rests on prose: entries carrying a drive
letter path, a UNC path, ~/, /home/, /Users/, /root/, or an email
address are dropped from both lists at save time. Ordinary domain terms
that merely look technical are kept, which the tests pin.
@tanglearncode
tanglearncode merged commit d8b2f97 into main Aug 8, 2026
11 checks passed
@tanglearncode tanglearncode mentioned this pull request Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant