Workflow classifier · Mac

Train your replacement.

Sifu watches what you do, identifies the patterns, and teaches you the system you didn't know you already had.

Or scroll down to copy the prompt directly.
macOS · 12 Monterey or later Python 3.10+ Open source
INSTALL · GIVE THIS TO YOUR AGENT

Give this to your agent.

Paste the prompt below into Claude Code or Codex and your agent handles the rest — no manual steps required.

Install Sifu locally so I can train my replacement.

---

## Platform

macOS only. Sifu uses CGEventTap and the macOS Accessibility API to observe
input events. It will not run on Linux or Windows.

---

## Steps

### 1 · Clone or update the repository

If `~/sifu` does not exist:

```
git clone https://github.com/heymitch/sifu.git ~/sifu
```

If `~/sifu` already exists:

```
cd ~/sifu && git pull --ff-only
```

### 2 · Install the package

```
pip install -e ~/sifu
```

This installs Sifu in editable mode. The `sifu` command will be available in
the current Python environment.

### 3 · Run bootstrap

```
python3 -c "from sifu.install.bootstrap import run; print(run())"
```

Bootstrap creates the local library directory and prints two keys:

- `library` — the path where Sifu stores workflow data
- `next` — the next command to run

Surface the `next` value to the user verbatim.

### 4 · Grant Accessibility permission

Sifu cannot capture input events without explicit user approval.

Go to: System Settings → Privacy & Security → Accessibility

Add SifuBar to the list and enable the toggle. Sifu will not prompt for this
automatically — it must be granted before capture begins.

### 5 · Report back

Tell the user:

- The `library` path printed by bootstrap
- The `next` step printed by bootstrap
- That Accessibility permission must be granted before starting capture

Do not launch capture automatically. The user decides when Sifu begins
observing. That decision belongs to them.

---

## Notes

- `pip install -e ~/sifu` is idempotent. Safe to re-run.
- Bootstrap is also idempotent. Running it again will not overwrite existing
  library data.
- If `pip` resolves to Python 2, use `pip3` instead.
- The `sifu start` command begins capture. The `sifu context <query>` command
  takes a free-text query, finds the best-matching library workflow by substring
  score, and prints the workflow markdown plus an instruction line for your agent
  to drive the macro via NavMacro/Battleship. Neither runs automatically during
  install.
How it works

Three quiet steps.

01

Watches

Sifu sits beside you. It records the small repeated motions that make up an hour of your work — clicks, opens, edits, sends. Nothing leaves your machine.

02

Classifies

After enough observations, the pattern surfaces. Sifu names the workflow, scores its confidence, and notes the exceptions.

03

Teaches

You receive a written report — the kind a careful teacher would leave on your desk. The system you built without noticing, written down.

Why this exists

Workflows Sifu has classified.

Most work is a pattern you repeat without naming it. Sifu names it. The report is yours to keep, edit, or delegate.