Status: Accepted (documented from implementation)
Applies to: clarity (storage layer) + pulse_multi_agents (agent layer)
Related: Tag Resolver, Agents
"Resolving a tag" means two different things at two layers: the storage engine must map a tag name to its on-disk collection, while the AI layer must map a human description to candidate tag names. Both layers happen to contain a file named tag_resolver — they are unrelated.
Tag resolution is split into two independent implementations:
| Layer | File | Mechanism |
|---|---|---|
| Storage (deterministic) | clarity:backend/src-tauri/src/api/tag_resolver.rs:86-110 |
Scans the data/ tree to build TAG_SCOPE_MAP (tagname → Arc<Scope>{org,site,unit,grid}) |
| Agent (best-effort) | pulse_multi_agents:pulse_manager/sub_agents/meta_data_agent/tag_resolver.py |
sentence-transformers (all-mpnet-base-v2) embeddings + cosine similarity — model load :64, match :349 |
They share only a name; neither calls the other.
meta_data_agent/agent.py the semantic-resolver import is commented out (:1170); the registered getTagMeta tool resolves tags via LoopBack like metadata queries, not the embedding model. The embedding tag_resolver.py exists and is documented, but its invocation from meta_data_agent is not wired in this revision.clarity:backend/src-tauri/src/api/tag_resolver.rs:86-110pulse_multi_agents:pulse_manager/sub_agents/meta_data_agent/tag_resolver.py:64, :349; …/meta_data_agent/agent.py:1170Last updated: 2026-06-02 from clarity@498c020 + pulse_multi_agents@e278054