---
title: JLS SOP Assistant
---

# JLS SOP Assistant

## What it is

A plugin that answers JLS Trading Co employees' questions from the company's SOPs (standard
operating procedures). You type a question; it finds the SOPs that match, reads them, and an AI
agent answers in plain language — formatted with steps, bold text and tables — showing the SOPs it
used. You can keep asking follow-up questions in the same chat. If no SOP covers the question, it
says so instead of guessing.

It is **only for members of the JLS Trading Co workspace**. Nobody else sees it.

## Where to find it

**Settings → Plugins → JLS SOP Assistant.** Turn it on, then open **SOP Assistant** in the
sidebar. You must be signed in to Omniscio with **JLS Trading Co as your active workspace**; if
another workspace is active, the plugin is hidden, and an already-open panel asks you to switch.

The first time it reads a document it asks for permission to use your Google account for Google
Docs and Sheets.

## How it behaves

### Asking a question

1. Type your question and press **Ask** (or <kbd>Enter</kbd>; <kbd>Shift</kbd>+<kbd>Enter</kbd>
   adds a new line).
2. The panel searches the shared SOP library by title, tags, department, keywords and summary,
   and reads the best three matches from Google. The agent also sees the titles of up to 40 more
   likely SOPs, so it can ask for the right one when your wording differs from the title.
3. It sends the SOP text to an agent session on **your own Claude account**.
4. The answer appears formatted, with **Sources** chips linking each SOP it used and a **Copy**
   button.

If the SOPs it read don't answer the question, the agent can ask for up to three more from the
library; the panel reads those and asks again, automatically. Only one question runs at a time.

### Chats

- The left side lists your chats, newest first; **New chat** starts a fresh one. Each chat is
  titled by its first question.
- A follow-up question in the same chat goes to the same agent session, so it remembers what it
  already read; only SOPs it hasn't read yet are fetched.
- Chats are saved **on your computer only** and reopen after a restart. Hover a chat and press
  **✕** to delete it.

### Find or add an SOP

- **Find an SOP:** type words from a title, department or tag to list matching SOPs with their
  links instantly — no AI, no cost.
- **Add an SOP that isn't listed:** paste a Google Doc or Sheet link and press **Add**. The panel
  opens it with your Google account (so you can only add documents you can open), takes its real
  title, and adds it to the shared library marked **"Added by <your name>"**. You or an admin can
  remove it later with **Remove**. If it later appears in the master index, the master index takes
  it over.

### What you can and cannot see

- The assistant reads SOPs with **your** Google account. If you can't open an SOP in Google Docs,
  it can't either — under the answer it says **"Could not read"** with the SOP's title and link, so
  you can ask its owner for access. Nothing from that SOP is used.
- If your Google account isn't connected, its sign-in has expired, or you declined the SOP
  Assistant's request to use it, the question stops before any agent session starts and asks you
  to reconnect Google in **Settings → Google Workspace**.
- Every JLS member can see the **titles** in the library, even of SOPs they cannot open.

### The shared library

The library holds, for each SOP: its title, link, department, type, tags, and — once someone has
looked it up — a short summary, a section outline and search keywords. It **never stores the full
SOP text**; every answer is written from the live SOP read for that question. Each lookup refreshes
the summaries of the SOPs it read, so searches improve as people use it.

### Library settings (owners and admins)

Under **Library settings**, a JLS owner or admin pastes the link to JLS's **master SOP index**
Google Sheet and presses **Save & sync**. The sync reads its SOP list and its tool & dashboard list
and adds every row with a Google Docs/Sheets link to the library, skipping rows titled "OLD DO NOT USE", "DEAD" or
"Copy of…". It is safe to run again at any time — existing summaries are kept, and only new or
changed rows are written. An owner or admin's panel also re-syncs by itself once a day. An SOP
removed from the master index stays in the library until an admin removes it under **Find or add
an SOP**. Library settings is hidden from members who are not owners or admins.

## Before it can be used

Two one-time setup steps sit outside the app:

1. **The JLS workspace member list must exist.** The library's lock checks each person against it.
   An Omniscio super-admin runs the *backfill org members* tool to build it from existing accounts.
2. **The new database rules must be published** to the Omniscio Firebase project.

Until both are done, the panel reports that your account is not on the member list.

## For agents

- The lock is server-side: Firestore rules on `organizations/{orgId}/sopLibrary/{fileId}` allow
  any current, non-disabled member to read; only owners/admins write catalog fields (title, link,
  department…) of an existing entry; members may only update `summary`, `outline`, `keywords`,
  `checkedAt`, `checkedBy` on an existing entry, and may CREATE (never overwrite) an entry with
  `source: 'member'` whose URL carries its own file id and whose `addedByName` equals their member
  doc's `displayName`. The adder or an admin may delete it. Contract:
  [jls-sop-assistant-contract.md](../../.claude/memory/contracts/jls-sop-assistant-contract.md).
- Answers are rendered by `ui/markdown.js` from DOM nodes only (https links, no images, raw HTML
  as text). Source chips come from the reply block's `used` ids mapped to library URLs.
- Chats are the plugin storage collection `conversations` (`title`, `session_id`, `messages`,
  `read_ids`); a follow-up uses `prompts/follow-up.md` and `session.sendMessage` on the chat's
  session.
- Agent sessions do NOT read Google themselves — the plugin's backend reads the SOPs and puts the
  text in the prompt, so no Google route is opened to spawned agents.
- A failed read comes back as `{ error, code }`. `reconnect` is an account problem (no Google
  session, the connect flow failed, or Google answered 401): the panel starts no session. Any
  other code is one document, named under the answer. The reads of one lookup share a single
  pending auth-broker request, so a first question shows one consent prompt, not one per SOP.
- Hiding the plugin from other workspaces is described in
  [plugin-marketplace.md](plugin-marketplace.md) ("Workspace-only plugins").

## Related

- [Plugin marketplace](plugin-marketplace.md)
- [Google account connection](google-integrations.md)
