rpa-bot-handoff: short skill, MEK SOP as the model

The skill itself read as too detailed. SKILL.md is now a short checklist
(460 words, was 1,321): 5 steps, 5 rules, and 6 one-line "don't miss"
checks that replace the 12 Tebra failure classes (failure-classes.md
removed). The MEK Charge Reconciliation SOP - the 3-page PDF ops liked -
replaces the Tebra example as the model (emails swapped for examples).
New test keeps SKILL.md under 500 words with 6 checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
VasanthandClaude Opus 5.5 committed 2026-10-28 17:28:23 +05:30
1 parent 0188de7403
commit 36e621b153
9 files changed
+137 -234

No files matched your search

@@ -1,63 +0,0 @@
# Failure classes
Twelve kinds of problem Tebra Auto Post hit in its first months with ops. Check every new bot against each one. For each class: what to look for in the code, and where the ops guide (`HANDOVER.md`) or the dev notes (`HANDOVER-DEV.md`) must cover it. Section numbers are the ops guide's.
## F1. Missing prerequisite on the ops machine
**Tebra:** a missing database driver gave a cryptic error only on some laptops; a missing settings file made the duplicate check fail silently; a helper app's shortcut wasn't where the bot searched; some bugs appeared only in the packaged exe, never under `uv run`.
**Look for:** drivers, `.env` / settings files, shortcuts or install paths the bot searches, `sys.frozen` branches.
**Doc:** the "Before you start" checklist in section 3, and the exact message each missing item produces in section 7.
## F2. The bot grabs the wrong window, or can't take focus
**Tebra:** it matched its own window, and a database tool whose title held the target app's name, then closed the real app. Windows' foreground lock meant clicks landed elsewhere when someone used the machine during a run.
**Look for:** window matching by title substring, focus / foreground calls, exclude lists.
**Doc:** section 10: which windows must not be open, and hands off the machine.
## F3. The target app is slower, or different, than the bot expects
**Tebra:** a screen took about 98 s under load against a 90 s timeout; two screens shared a header and were confused; controls drawn without accessibility elements; a long list put the target off-screen; a wrapped name was clicked between its lines on a small screen.
**Look for:** every timeout value, screen-identification checks, "element not found" paths, screen-size assumptions.
**Doc:** a section 7 row for each "not found / did not load" message, and the wait from section 4. Screen-resolution rules go in section 3.
## F4. Input data the bot reads differently than ops writes it
**Tebra:** names containing commas were split into pieces and silently skipped; a `&` in a name broke matching; Excel dates arrived as serial numbers; a new client with no mapping entry got the wrong file prefix.
**Look for:** split / separator logic, name matching, date parsing, mapping or config files ops must maintain.
**Doc:** input rules in section 3, each with one wrong and one right example. Point at the sample input file if the bot has one.
## F5. Marked done when nothing was done
**Tebra:** a location was marked Success with 0 items when the bot couldn't confirm it was on the right page; a company was marked Success after a crash.
**Look for:** where success / complete is set, and whether it checks a positive count or a confirmation first.
**Doc:** if a guard exists, a section 7 row for the "left Pending" message. If not, a gap in `HANDOVER-DEV.md`.
## F6. The action happened but the bot couldn't confirm it
**Tebra:** "Payment not confirmed after Save" - the save took longer than the wait, so the row showed Error while the payment really had posted. Re-running risked posting twice.
**Look for:** waits after a commit action (save, submit, send), and what the bot writes when the confirmation times out.
**Doc:** a section 7 row that tells ops, in bold, to **check in the target app before re-running**, and how to correct the record afterwards.
## F7. A business exception shown as success
**Tebra:** "ERA Errors on posting" and "negative balance - not posted" rows showed green (Completed) although a person had to follow up.
**Look for:** status mapping tables; any comment that means "not done" stored under a success status.
**Doc:** mark these "not done, needs follow-up" in the section 5 status table, give each a section 7 row, and add the mapping to the gaps in `HANDOVER-DEV.md`.
## F8. Endless re-runs, or killed by the watchdog
**Tebra:** practices with no items re-ran the same company forever; already-processed rows were re-walked slowly after a restart until the watchdog killed the run at exactly 300 s, again and again.
**Look for:** auto-rerun loops and their limits, watchdog timeouts, "0 items" handling, heartbeats.
**Doc:** every limit in section 4, and in section 7 the signs of a loop ops should report ("the same company restarts more than N times").
## F9. Stopping the bot the wrong way
**Tebra:** closing the app window didn't stop the bot, which kept driving the target app; closing the target app doesn't stop it either.
**Look for:** how the child process ends (process-tree kill, parent-death watch), and any Stop button.
**Doc:** the one right way to stop it, in section 10.
## F10. One stuck item blocks the queue
**Tebra:** one Error row kept a whole batch Pending for weeks; a run that died in its first seconds locked the upload all day. Ops didn't know which row blocked it, or that yesterday's Pending batch never blocks today's upload.
**Look for:** completion gates (what must be true for a batch / company to complete), locks on new uploads, resume logic.
**Doc:** in section 7: what blocks what, how to find the blocking item (section 6), and how to release it (edit, discard, clear).
## F11. The cause is hidden from ops
**Tebra:** the real cause was only in a database column the Report tab didn't show, or in the raw log; the friendly on-screen log hid errors; some app messages went to the screen only, never to a file.
**Look for:** columns written but never displayed, log filters, messages printed only to the UI.
**Doc:** sections 2 and 6 point only at places ops can open (question 2). Every hidden cause becomes a gap in `HANDOVER-DEV.md`.
## F12. The update didn't arrive, or an old build undid a new one
**Tebra:** the launcher failed silently on a self-signed certificate, so users stayed on an old version; the server reported a deploy as done without swapping the container; a stale zip was shipped; each start re-deployed database procedures, so a machine on an old build overwrote newer ones.
**Look for:** update / launcher code, version display, anything the app writes to shared resources on start.
**Doc:** section 3 (check the version before a run) and section 11. Add "every machine must run the same version" when shared resources are rewritten on start.
@@ -0,0 +1,106 @@
# Model SOP: MEK Charge Reconciliation
The SOP ops liked: 3 pages, plain words, every message copied from the app. The email addresses are examples. Copy its length, layout and tone, not its content.
---
# MEK Charge Reconciliation Handover SOP
Version 0.1.0 · 28 Oct 2026 · Problems: email dev@example.com, CC manager@example.com (section 5)
Downloads the Waystar claims and the Aquilaehr visits for every MEK location, both portals at the same time, matches them by patient name and date of service, and builds one Excel report per location plus one for All Locations.
## 1. How to run
1. Open https://mek-charge-reconciliation.app.ecareindia.com/ in your browser.
2. Type the team password in **Password** and click **Sign in**. You stay signed in for 12 hours.
3. Click **Run reconciliation**.
4. Wait until the status next to the button says **Finished** or **Stopped**. Closing the tab doesn't stop the run.
**Before you click Run reconciliation:**
- **Download the reports you still need.** Every click first deletes all the previous reports, then downloads fresh data from both portals and builds new reports from it.
- Only one run at a time. If the button is greyed out and the status says "Running…", a run is already going: wait for it.
## 2. What you see while it runs
| Where on the screen | What it shows |
|---|---|
| **Waystar** and **Aquilaehr** lanes | "Ready" → "Signing in…" → "3 of 10 locations" → "All 10 downloaded" (green). Orange "8 of 10 · 2 failed" when some locations failed. Red "Stopped" when that portal stopped |
| **Excel reports** box | "Waiting for both downloads" → "Building 4 of 11" → "11 reports ready" (green) |
| Status next to the button | "Running…" → "Finished *time*" (green) or "Stopped *time*" (red) |
| Activity list under the button | One line per step, starting with "Run started *time*". Dot colours: green done, orange check this, red failed, grey progress |
| **Technical log** (click to open) | Raw lines, only for an email to us |
| **Reports** box | One row per report with "Updated *time* · *size* KB" and **Download**, plus **Download all (ZIP)** |
The page refreshes itself every 2 seconds.
**A normal run:** both lanes sign in and fill up at the same time; when both say "All 10 downloaded", the Excel box counts to "11 reports ready" and the last line says "Finished. Your reports are ready to download below."
| Step | The bot waits at most | Then |
|---|---|---|
| Sign in to each portal | 3 min | That portal stops for this run (E01) |
| Each step for one location (find, switch, load, download) | 15 s to 2 min | Skips that location. No step is retried |
**Step in only when:** the status says Finished or Stopped, or no new line has appeared in the activity list for 10 minutes (E10).
## 3. Result
- **Good run:** "Finished", both lanes green "All 10 downloaded", "11 reports ready", no red or orange dots.
- **Needs a look:** any red or orange dot, an orange or red lane, or "Stopped". **"Finished" also shows when one portal failed to sign in: always check both lanes.**
- There is no email or alert. Open the page after every run.
**Where:** **Reports** box → **Download**, or **Download all (ZIP)**. Each Excel has a **Summary** sheet with the counts and a **Reconciliation** sheet. Filter its **Result** column:
| Result | Meaning | What you do |
|---|---|---|
| Matched | Same date of service, first name and a last name | Nothing |
| Missing in Waystar | An Aquilaehr visit with no Waystar claim | Follow up. If the Note says "Claim ID … is in Waystar with DOS …", the claim exists with another date |
| Missing in Aquilaehr | A Waystar claim with no Aquilaehr visit | Follow up. If the Note says "Claim ID … is in Aquilaehr with Visit Date …", the visit exists with another date |
| Duplicate in Waystar | "Same patient + DOS already matched to another Waystar claim" | Check for a double claim |
## 4. When something goes wrong
**How it shows:** a red or orange dot in the activity list, an orange or red lane, or the status "Stopped". The line names the location and the portal.
| ID | Message you see | What it means | What you do |
|---|---|---|---|
| E01 | "Couldn't sign in to *Portal* in time. Check the login details, then run again." | Nothing was downloaded from that portal. Its lane stays on "Signing in…", then turns red "Stopped" | Run again once. Fails again: email us (only we can change the logins) |
| E02 | "Couldn't download *Location* from *Portal*. This location wasn't found in *Portal*." | The location was renamed or removed in the portal | Email us. Re-running won't help |
| E03 | "Couldn't download *Location* from *Portal*. *Portal* took too long to respond." | The portal was too slow | Download the good reports, run again later. Fails twice: email us |
| E04 | "Couldn't download *Location* from Aquilaehr. Aquilaehr opened a different location than expected." | Aquilaehr showed the wrong practice | Run again. Fails twice: email us |
| E05 | "Couldn't download *Location* from *Portal*. Try running again. If it keeps failing, open the technical log below." | Any other download problem | Run again. Fails twice: email us |
| E06 | "*Portal* finished, but these locations couldn't be downloaded: *names*" | Summary of E02 to E05 | Those locations have no report, or a one-sided one |
| E07 | "*Location* has exactly the same *Portal* data as *Location*. Please check this location." | One may hold the other's data | **Don't use those two reports.** Run again (expected only when both have no data) |
| E08 | "Skipped *Location*: nothing was downloaded from Aquilaehr" | No report was built for that location | Look for its red Aquilaehr line (E01 to E05) |
| E09 | "Check *Location*: fewer than half of the visits matched. The wrong practice may have been downloaded." | Most visits didn't match | **Before re-running, check its Note column.** Dates exactly one day off the DOS: don't re-run, email us. Otherwise run again |
| E10 | "Running…" with no new activity line for 10 minutes | The run is stuck | Email us. Don't start another run |
| E11 | "Something unexpected went wrong. The technical log below has the details.", or "Stopped" with no red line that explains it | An error without a plain message, e.g. a new Waystar security question | Email us with the last 20 lines of **Technical log** |
| E12 | A location has no report and no red line names it | A failed Waystar download is not always listed | Email us |
| E13 | The lanes say "Ready" and the status is empty, although a run was started | The server restarted and the run was lost | Download what is listed, then run again |
| E14 | "That password isn't right. Try again." or "Enter your password." | Wrong or empty password | Check for "Caps Lock is on" and type it again |
| E15 | "Sign-in failed. Try again.", "Can't reach the server. Try again.", or a 404 / 502 page | The server or the network has a problem | Try again in 5 minutes, then email us |
**Don't:**
- Click **Run reconciliation** before downloading the reports you need: it deletes them.
- Ask for a server restart or redeploy during a run: the run is lost.
- Sign in to Waystar or Aquilaehr with the bot's account during a run.
**To stop it:** there is no Stop button, and closing the page doesn't stop it. Let it finish, or email us and we stop it on the server.
## 5. Email us
Email **dev@example.com** with **the RPA manager** (manager@example.com) in CC when section 4 says "email us", or when the same error comes back after one re-run. Answer: same working day.
```
To: dev@example.com
CC: manager@example.com
Subject: MEK Charge Reconciliation - E<number> - <date>
Run started: <first line of the activity list>
Error: E<number> - <the message, copied>
Location / portal:
What I did: <e.g. ran it again once>
Attached: screenshot of the Run box
```
**Never send:** the sign-in password, or the Excel reports (they hold patient names).
@@ -1,100 +0,0 @@
# Worked example: Tebra Auto Post (v2.5.3), scrubbed
What the SOP looks like for a real bot: about 2.5 pages. Client names, IDs, amounts, credentials and server addresses are removed, and the email addresses are examples. **Copy the length and the plain wording, not the content.**
---
# Tebra Auto Post Handover SOP
Version 2.5.3 · 28 Oct 2026 · Problems: email dev@example.com, CC manager@example.com (section 5)
Posts insurance ERA payments into the Tebra desktop app, company by company and practice by practice, from the input Excel, then turns each ERA into a PDF.
## 1. How to run
1. Open **Ecare Tebra Automation Tool** from the Desktop. Check the title bar shows v2.5.3.
2. **Run** tab → drop the input Excel on the upload box.
3. Check the preview: the Login, Company and Location sheets all have rows.
4. Click **Trigger automation**.
5. Leave the mouse and keyboard alone until the run ends.
**Before you click Trigger automation:**
- One practice per row. Wrong: `North Clinic, South Clinic` in one cell (both are skipped). Right: one per row, spelled exactly as in Tebra.
- Every click starts a new batch from the Excel you uploaded. ERAs already posted are not posted again.
- Close SQL Server Management Studio and any other window with "Tebra" in its title.
## 2. What you see while it runs
| Where on the screen | What it shows |
|---|---|
| **Run** tab → checkpoint boxes | 7 boxes, grey → green as each step finishes; red **stuck** when a step makes no progress |
| **Run** tab → live log | Each company, practice and ERA as it is posted |
| **Dashboard** | The batch: Pending while running, Completed when every practice is done |
| **Report** tab | One row per ERA: File Status (colour) and Comments |
**A normal run:**
1. Tebra opens by itself and signs in to the first company.
2. The checkpoint boxes turn green one by one; the live log lists each ERA.
3. Tebra closes and reopens for the next company.
4. The Dashboard shows the batch as **Completed**.
| Step | The bot waits at most | Then |
|---|---|---|
| Any checkpoint box | 5 min with no progress (10 min for the ERA list) | Marks it red **stuck**, restarts Tebra, up to 3 times |
| Open one ERA | 90 s, 3 tries, then 3 Tebra restarts | Writes the row as Error, moves on |
| Save one payment | 45 s + 30 s + 30 s | Checks the ERA list; Error if still there (E03) |
| PDF of one ERA | 60 min | Moves the file to `Need_attention` |
**Step in only when:** the run has ended, or the log says "Stuck - automatic restarts exhausted. Click Resume.".
## 3. Result
- **Good run:** the batch is **Completed** on the Dashboard and the Report tab has no red rows.
- **Needs a look:** the batch stays **Pending**, or a row is red. **Three different results show green**: read the Comments of every green row.
**Where:** Report tab → search the Batch ID → File Status and Comments. Export with the Excel button.
| Status - Comments | Meaning | What you do |
|---|---|---|
| Completed - "Posted successfully" | Posted | Nothing |
| Completed - "ERA Errors on posting" | **Not posted.** Tebra rejected it | Review it in Tebra by hand |
| Completed - "negative balance account … not posted" | **Not posted on purpose** | Follow the negative-balance process |
| Deferred (grey) | Check date after the cutoff | Nothing; a later run picks it up |
| Error (red) | Failed after all retries | Section 4 |
## 4. When something goes wrong
**How it shows:** a red row on the Report tab (read Comments), a red **stuck** box on the Run tab, or a batch still **Pending** on the Dashboard.
| ID | Message you see | What it means | What you do |
|---|---|---|---|
| E01 | "[login] FAILED for company …" | Tebra's sign-in never appeared | Check the Login sheet, then click **Resume**. Email us if it fails again |
| E02 | "Wrong practice opened … leaving Pending" | The practice name doesn't match Tebra | Fix the spelling in the Excel, click **Resume** |
| E03 | "Payment not confirmed after Save" | The bot clicked Save but never saw "saved". **It may have posted** | **Check the payment in Tebra before re-running.** If posted, set the row to Completed. If not, click **Resume** |
| E04 | "Save button element not found" | The payment screen had no Save button | Email us |
| E05 | "Stuck - automatic restarts exhausted. Click Resume." | 3 restarts didn't help | Click **Resume** once. Email us if it stops again |
| E06 | Batch stays **Pending** | One red or unfinished row keeps its practice open | Find the red row (Report tab), fix or edit it. Email us if you can't find it |
**Don't:**
- Use the mouse or keyboard while it runs: its clicks land in the wrong window.
- Close Tebra to stop the bot: the bot keeps going.
**To stop it:** close the **Ecare Tebra Automation Tool** window.
## 5. Email us
Email **dev@example.com** with **the RPA manager** (manager@example.com) in CC when section 4 says "email us", or when the same error comes back after one Resume. Answer: same working day.
```
To: dev@example.com
CC: manager@example.com
Subject: Tebra Auto Post - E<number> - <date>
Batch ID: <from the Dashboard>
Error: E<number> - <the message, copied>
Where: <company / practice / check number>
What I did: <e.g. clicked Resume once>
Attached: screenshot of the Run tab and of Tebra
```
**Never send:** the Login sheet, passwords, or patient names.
+1 -1
View File
@@ -120,7 +120,7 @@ def to_pdf(docx_path):
def selfcheck():
example = Path(__file__).parent / "reference" / "tebra-auto-post.md"
example = Path(__file__).parent / "reference" / "mek-charge-reconciliation.md"
sop = "# " + example.read_text(encoding="utf-8").split("\n---\n", 1)[1].split("\n# ", 1)[1]
out = Path(tempfile.mkdtemp()) / "HANDOVER-SOP.docx"
convert(sop, out)