# transcript-watcher

A Clawpilot skill that polls your OneDrive `Recordings/` folder every N minutes and detects when a new Microsoft Teams meeting MP4 lands. When it sees one, it hands off to `/meeting-transcript` to pull the `.docx`. Cheap polling against signals your tenant *does* expose, with browser automation gated behind those signals so it only runs when there's actual work.

This is **stage 2 of 3** in the [Teams Transcript Pipeline](../teams-transcript-pipeline/) suite. It pairs naturally with `/meeting-transcript` (stage 3, downloads the transcript) and `/doc-watcher` (stage 4, converts the .docx to .md and pings Teams).

## Why this exists

Microsoft Graph's transcript endpoints require admin-consented scopes that aren't granted to most personal Clawpilot tokens. Teams chat system-event messages strip the useful `eventDetail` payload. So polling OneDrive — where Stream *always* auto-saves the MP4 for the organizer — turns out to be the cheapest reliable signal for "new recording available."

## Install

1. Copy `transcript-watcher.md` to your Clawpilot skills folder:
   - Windows: `C:\Users\<you>\.copilot\m-skills\transcript-watcher\SKILL.md`
   - Or import via Clawpilot Settings → Skills → Add local skill.
2. (Optional) Drop a starter `config.json` next to it — see `config.example.json` for the shape. First-run setup will create one for you if you skip this.
3. Restart Clawpilot (or reload skills) so the new skill is picked up.

## Use

In a Clawpilot chat:

```
/transcript-watcher
```

- **First invocation**: walks you through picking a meeting series, finds the OneDrive Recordings folder and chat ID for you, and creates the disabled background automation. Say `enable transcript watcher` when you're happy.
- **Subsequent invocations**: runs the poll cycle once on demand. If you say "dry run", it reports what *would* fire without invoking anything downstream.
- **Reconfigure**: `add watch <name>`, `remove watch <id>`, `change interval to 15`, `enable/disable transcript watcher`.

## Requirements

- Clawpilot with Microsoft 365 tools enabled (`m365_list_files`, `m365_search_chats`, `m_create_automation`, `m_update_automation`).
- The `/meeting-transcript` skill installed (this skill calls it when a new MP4 is detected).
- The `/doc-watcher` skill installed (recommended; converts the downloaded `.docx` to `.md` and sends the Teams notification).
- You must be the meeting organizer for any series you want to watch — only the organizer gets the MP4 auto-saved to their OneDrive.

## License

Provided as-is. No warranty. Do whatever you like with it.
