# Process Event Sources

Load before arming a long-polling source firstmate owns, before registering a...

- Repository: https://github.com/kunchenguid/firstmate (8480 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add kunchenguid/firstmate --skill process-event-sources -g -a claude-code -y`
Codex: `npx skills add kunchenguid/firstmate --skill process-event-sources -g -a codex -y`
Cursor: `npx skills add kunchenguid/firstmate --skill process-event-sources -g -a cursor -y`
Gemini CLI: `npx skills add kunchenguid/firstmate --skill process-event-sources -g -a gemini-cli -y`

## Description

Load before arming a long-polling source firstmate owns, before registering a deterministic condition->action watch, on any `procevent <adapter> <source-id> <sequence>` check wake, and on any `process-event source stranded` or `process-event source failed to start` check wake.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# process-event-sources

Load this before arming a long-polling source, before registering a deterministic condition->action watch, whenever a `check:` wake carries `procevent <adapter> <source-id> <sequence>`, and whenever the watcher headlines a `process-event source stranded` or `process-event source failed to start` wake.

The runner exists so a blocking external process never holds firstmate's conversational turn.
Firstmate registers a source, keeps working, and is woken when that process completes.

## Arming a source

Use the adapter, not the generic runner, for a real source.
Before either Lavish arm form below, open the artifact with `lavish-axi` so its saved session can route the listener; the [operating contract](../../../docs/configuration.md#process-to-event-sources-stateprocevent) owns the prerequisite and refusal boundary.
For a Lavish review artifact firstmate owns:

```sh
bin/fm-procevent-lavish.sh arm <artifact.html>
```

A worker-owned board uses `bin/fm-procevent-lavish.sh arm <artifact.html> --for <task-id>` and re-arms with its reply after each nonterminal round; the existing handled marker is the acknowledgement.
Arm it once, then re-arm only when a round is actually waiting: arming again with nothing to acknowledge is refused.
A terminal round is never re-armed: the board stays yours until you acknowledge it with `bin/fm-procevent.sh handled <source-id> <sequence>`, which retires it, and until then `retire` refuses the board too.
Never arm a board that a live task hosts; follow the [crew-hosted Lavish board contract](../../../docs/configuration.md#crew-hosted-lavish-review-boards) for reply acceptance and older-version limits.

The rest: https://github.com/kunchenguid/firstmate/blob/HEAD/.agents/skills/process-event-sources/SKILL.md
