You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a change doesn't fit the table, ask: "Would a new developer need to know this to use or extend the project?" → README. "Would Claude need this to implement correctly?" → CLAUDE.md.
55
55
56
-
## Relay Architecture
56
+
## Patchwork Architecture
57
57
58
58
### Project Purpose
59
59
Autonomous SWE agent that automates developer work. Pulls tasks from project management tools (Asana, Linear, Jira) and error trackers (Sentry), triages them with Claude Code, implements solutions in isolated git worktrees, and provides an interactive React web dashboard for approval. Telegram notifications are optional. Bug fixing via Sentry is one feature — the core value is automating any development task from any source.
@@ -66,7 +66,7 @@ Projects are grouped into **workspaces** (one per client/org). Each workspace op
66
66
67
67
| Module | Purpose |
68
68
|--------|---------|
69
-
|`src/cli.ts`| CLI entrypoint — `start`, `stop`, `doctor`, `update`, `version`, `help`. Flags: `--config`, `--log-level`. Version read from `package.json` at runtime. `doctor` checks Bun/claude/gh/config/repo paths. `update` checks npm registry and self-updates via `bun install -g`|
69
+
|`src/cli.ts`| CLI entrypoint — `patchwork start`, `patchwork stop`, `patchwork doctor`, `patchwork update`, `patchwork version`, `patchwork help`. Flags: `--config`, `--log-level`. Version read from `package.json` at runtime. `doctor` checks Bun/claude/gh/config/repo paths. `update` checks npm registry and self-updates via `bun install -g`|
70
70
|`src/constants.ts`| Shared constants: `FAILURE_HINTS`, `CallbackAction`, `CallbackData` — used by telegram, dashboard, and daemon |
71
71
|`src/dashboard.ts`|`DashboardServer` — Hono + `Bun.serve()` at `localhost:7842`, serves React dashboard from `dist/`, WebSocket `/ws` for live updates, SPA fallback |
72
72
|`src/api/router.ts`| Hono app combining all API routes |
@@ -118,9 +118,9 @@ Queue pauses when an issue reaches `pending_confirmation` (waiting for "Start")
118
118
119
119
2.**Claude stream-json output**: Both `runClaudeText` and `runClaudeJson` use `--output-format stream-json` with `--verbose` (required when combined with `-p`/`--print`). Stdout is streamed line-by-line; optional `onEvent` callback fires `tool_use`/`text`/`result` events in real-time. `parseStreamJson()` parses collected lines to extract session ID, result text, token counts (`message_start.message.usage.input_tokens`, `message_delta.usage.output_tokens`), and `cost_usd` from the `result` event. Token/cost stats are shown in Telegram messages as `⏱ 45s · 🪙 1.2K in / 456 out · 💰 $0.023`.
120
120
121
-
3.**Worktree paths**: `{repoParent}/.relay-worktrees/fix-{source}-{sourceId}` — sibling dir to the repo, not inside it.
121
+
3.**Worktree paths**: `{repoParent}/.patchwork-worktrees/fix-{source}-{sourceId}` — sibling dir to the repo, not inside it.
5.**Auto-commit strategy**: `fix.ts` auto-commits tests first (separate commit), then code changes. Falls back to single commit if no test files changed.
126
126
@@ -152,7 +152,7 @@ Queue pauses when an issue reaches `pending_confirmation` (waiting for "Start")
152
152
153
153
19.**Failure reason codes**: Every failure stores a machine-readable `failure_reason` in the DB. Codes: `triage:timeout`, `triage:claude_failed`, `fix:timeout`, `fix:no_changes`, `fix:tests_failed`, `fix:commit_failed`, `fix:claude_failed`, `worktree:create_failed`, `accept:push_failed`, `accept:pr_failed`, `pipeline:unexpected`. Shown in dashboard failure cards with human-readable hints from `FAILURE_HINTS`.
154
154
155
-
20.**Issue logs**: Triage writes raw Claude NDJSON to `/tmp/relay-{id}-triage.ndjson`; fix writes to `/tmp/relay-{id}-fix.ndjson`.
155
+
20.**Issue logs**: Triage writes raw Claude NDJSON to `/tmp/patchwork-{id}-triage.ndjson`; fix writes to `/tmp/patchwork-{id}-fix.ndjson`.
156
156
157
157
21.**Streaming progress**: `createStreamReporter` in daemon.ts tracks `tool_use` + `result` events from the Claude stream. Broadcasts `{ type: "stream_progress", issueId, stage, tool, elapsed, toolCallCount, costUsd }` to web dashboard via WebSocket. Also updates Telegram if available (throttled to 3s via `editMessage`).
158
158
@@ -168,14 +168,13 @@ Auth tokens are stored in SQLite (in `source_configs.config` JSON and `telegram_
168
168
169
169
### Data Directory
170
170
171
-
All runtime data lives in `~/.relay/`:
171
+
All runtime data lives in `~/.patchwork/`:
172
172
-`config.json` — legacy config (auto-imported into SQLite on first run)
Copy file name to clipboardExpand all lines: README.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
-
# Relay
1
+
# Patchwork
2
2
3
3
**Turn your backlog into pull requests — automatically.**
4
4
5
-

5
+

6
6
7
-
Relay connects to your existing project management tools, picks up tasks, and uses Claude Code to implement them in isolated git worktrees. You review the diff, click Accept, and a PR appears. That's it.
7
+
Patchwork connects to your existing project management tools, picks up tasks, and uses Claude Code to implement them in isolated git worktrees. You review the diff, click Accept, and a PR appears. That's it.
8
8
9
-
No API keys to manage. No per-token billing. No workflow files to write. Relay runs locally on your machine using your Claude Code subscription (Pro, Max, or Team) and plugs directly into the tools you already use.
9
+
No API keys to manage. No per-token billing. No workflow files to write. Patchwork runs locally on your machine using your Claude Code subscription (Pro, Max, or Team) and plugs directly into the tools you already use.
10
10
11
11
---
12
12
@@ -15,18 +15,18 @@ No API keys to manage. No per-token billing. No workflow files to write. Relay r
Your browser opens at `localhost:7842/setup`. The setup wizard walks you through connecting your first integration (Asana, Linear, Jira, or Sentry) and pointing Relay at a repo. Done.
21
+
Your browser opens at `localhost:7842/setup`. The setup wizard walks you through connecting your first integration (Asana, Linear, Jira, or Sentry) and pointing Patchwork at a repo. Done.
22
22
23
-
After setup, Relay polls your board, triages tasks with Claude, and waits for your go-ahead before touching any code.
23
+
After setup, Patchwork polls your board, triages tasks with Claude, and waits for your go-ahead before touching any code.
24
24
25
25
### The full loop
26
26
27
27
```
28
28
Your backlog (Asana / Linear / Jira / Sentry)
29
-
→ Relay picks up new tasks
29
+
→ Patchwork picks up new tasks
30
30
→ Claude triages: is this actionable?
31
31
→ You confirm: "Start this one"
32
32
→ Claude implements in an isolated worktree
@@ -39,24 +39,24 @@ Your backlog (Asana / Linear / Jira / Sentry)
39
39
### Install globally
40
40
41
41
```sh
42
-
bun install -g @adriandmitroca/relay
42
+
bun install -g patchwork-agent
43
43
# or
44
-
npm install -g @adriandmitroca/relay
44
+
npm install -g patchwork-agent
45
45
```
46
46
47
47
### CLI
48
48
49
49
```
50
-
relay start Start the daemon and open the dashboard
51
-
relay stop Stop the daemon
52
-
relay update Update to the latest version
53
-
relay doctor Check your setup for problems
54
-
relay version Show version
50
+
patchwork start Start the daemon and open the dashboard
51
+
patchwork stop Stop the daemon
52
+
patchwork update Update to the latest version
53
+
patchwork doctor Check your setup for problems
54
+
patchwork version Show version
55
55
```
56
56
57
57
---
58
58
59
-
## Why Relay?
59
+
## Why Patchwork?
60
60
61
61
-**Works with your Claude Code plan** — uses the `claude` CLI you already have. No separate API keys, no surprise bills
62
62
-**Connects to what you use** — Asana, Linear, Jira, and Sentry out of the box
@@ -68,8 +68,8 @@ relay version Show version
68
68
69
69
### Integrations
70
70
71
-
| Source | What Relay pulls |
72
-
|--------|-----------------|
71
+
| Source | What Patchwork pulls |
72
+
|--------|---------------------|
73
73
|**Asana**| Tasks from projects, with severity from tags/custom fields |
74
74
|**Linear**| Issues with team/project/status/assignee/label/priority filters |
75
75
|**Jira**| Issues via JQL — simple filter mode or raw JQL |
0 commit comments