symphony-linear 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. symphony_linear-0.3.0/.release-please-manifest.json +1 -0
  2. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/AGENTS.md +40 -27
  3. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/CHANGELOG.md +8 -0
  4. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/PKG-INFO +158 -43
  5. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/README.md +158 -43
  6. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/config.yaml.example +45 -3
  7. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/pyproject.toml +1 -1
  8. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/symphony_linear/__init__.py +1 -1
  9. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/symphony_linear/cli.py +30 -6
  10. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/symphony_linear/config.py +138 -18
  11. symphony_linear-0.3.0/symphony_linear/github.py +216 -0
  12. symphony_linear-0.3.0/symphony_linear/github_tracker.py +1158 -0
  13. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/symphony_linear/linear.py +17 -5
  14. symphony_linear-0.3.0/symphony_linear/linear_tracker.py +202 -0
  15. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/symphony_linear/orchestrator.py +62 -166
  16. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/symphony_linear/sandbox.py +10 -1
  17. symphony_linear-0.3.0/symphony_linear/tracker.py +185 -0
  18. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/test_config.py +212 -0
  19. symphony_linear-0.3.0/tests/test_github.py +241 -0
  20. symphony_linear-0.3.0/tests/test_github_tracker.py +2236 -0
  21. symphony_linear-0.3.0/tests/test_linear_tracker.py +548 -0
  22. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/test_orchestrator.py +175 -151
  23. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/uv.lock +1 -1
  24. symphony_linear-0.2.0/.release-please-manifest.json +0 -1
  25. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/.github/workflows/pre-commit.yml +0 -0
  26. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/.github/workflows/publish-pypi.yml +0 -0
  27. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/.github/workflows/release-please.yml +0 -0
  28. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/.gitignore +0 -0
  29. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/.gnosis/entries.jsonl +0 -0
  30. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/.pre-commit-config.yaml +0 -0
  31. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/.symphony/setup +0 -0
  32. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/LICENSE +0 -0
  33. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/misc/screenshot1.png +0 -0
  34. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/misc/screenshot2.png +0 -0
  35. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/release-please-config.json +0 -0
  36. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/symphony_linear/__main__.py +0 -0
  37. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/symphony_linear/logging.py +0 -0
  38. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/symphony_linear/opencode.py +0 -0
  39. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/symphony_linear/project_config.py +0 -0
  40. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/symphony_linear/provisioning.py +0 -0
  41. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/symphony_linear/state.py +0 -0
  42. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/symphony_linear/workspace.py +0 -0
  43. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/__init__.py +0 -0
  44. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/fixtures/opencode_events.jsonl +0 -0
  45. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/fixtures/opencode_events_tool_use.jsonl +0 -0
  46. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/fixtures/smoke_test.sh +0 -0
  47. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/test_linear.py +0 -0
  48. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/test_opencode.py +0 -0
  49. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/test_project_config.py +0 -0
  50. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/test_provisioning.py +0 -0
  51. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/test_sandbox.py +0 -0
  52. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/test_sandbox_extra_rw.py +0 -0
  53. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/test_sandbox_path.py +0 -0
  54. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/test_state.py +0 -0
  55. {symphony_linear-0.2.0 → symphony_linear-0.3.0}/tests/test_workspace.py +0 -0
@@ -0,0 +1 @@
1
+ {".":"0.3.0"}
@@ -6,21 +6,23 @@ Orientation for AI agents working on this repo. Pair this with `README.md`
6
6
  ## What this is
7
7
 
8
8
  `symphony-linear` is a single-process Python daemon that orchestrates AI work on
9
- Linear tickets. The loop:
9
+ Linear or GitHub issues (one backend per daemon instance). The loop:
10
10
 
11
- 1. Poll Linear for issues with the trigger label (default `Agent`).
12
- 2. For each new ticket: clone the project's repo into a per-ticket workspace,
11
+ 1. Poll the tracker for issues with the trigger signal (label or project
12
+ field, depending on backend).
13
+ 2. For each new issue: clone the project's repo into a per-ticket workspace,
13
14
  switch to the ticket branch, optionally run `.symphony/setup`, then run
14
15
  `opencode run` inside a bubblewrap sandbox with the ticket title +
15
16
  description as the prompt.
16
- 3. Post the AI's final message as a Linear comment and transition the ticket
17
- to `Needs Input`.
17
+ 3. Post the AI's final message as a comment and transition the ticket
18
+ to the configured "needs input" state.
18
19
  4. When a human comments, resume the OpenCode session with the new comment as
19
20
  user input, post the result, repeat.
20
21
 
21
22
  There is no web UI, no API, no database. State lives in `state.json` in the
22
- workspace dir. The only external services are Linear (GraphQL) and OpenCode
23
- (launched as a subprocess inside `bwrap`).
23
+ workspace dir. The only external services are the issue tracker (Linear or
24
+ GitHub, accessed via GraphQL) and OpenCode (launched as a subprocess inside
25
+ `bwrap`).
24
26
 
25
27
  ## Stack
26
28
 
@@ -31,15 +33,23 @@ workspace dir. The only external services are Linear (GraphQL) and OpenCode
31
33
  - Dev deps: `pytest`.
32
34
  - External binaries required at runtime: `bwrap`, `git`, `opencode`.
33
35
  - CLI entry point: `symphony` → `symphony_linear.cli:main`.
36
+ - Backends: the orchestrator talks to a `Tracker` protocol (see `tracker.py`).
37
+ Concrete implementations exist for Linear (`linear_tracker.py`) and
38
+ GitHub Projects v2 (`github_tracker.py`). Exactly one backend is active
39
+ per daemon, selected at config time.
34
40
 
35
41
  ## Layout
36
42
 
37
43
  ```
38
44
  symphony_linear/
39
45
  cli.py argparse + wiring; loads config, builds Orchestrator, runs it
40
- config.py YAML + pydantic config; ~ and ${VAR} expansion; LINEAR_API_KEY fallback
46
+ config.py YAML + pydantic config; ~ and ${VAR} expansion; token fallback
41
47
  state.py TicketState model + StateManager (atomic JSON writes, threading.Lock)
42
- linear.py GraphQL client (httpx, sync); typed exceptions; Issue/Comment/Project models
48
+ tracker.py Tracker-neutral protocol, errors, and enums (the seam for orchestrator)
49
+ linear.py Linear GraphQL client (httpx, sync); typed exceptions; Issue/Comment/Project models
50
+ linear_tracker.py Linear backend adapter implementing the Tracker protocol
51
+ github.py GitHub GraphQL client (httpx, sync); typed exceptions
52
+ github_tracker.py GitHub Projects v2 backend adapter implementing the Tracker protocol
43
53
  sandbox.py Single function: run_in_sandbox() → builds the bwrap argv and returns a Popen
44
54
  opencode.py run_initial / run_resume; parses OpenCode's NDJSON event stream
45
55
  workspace.py prepare() / remove(): clone, branch switch, .symphony/setup; path-containment check
@@ -59,7 +69,8 @@ shutting down, or the ticket is no longer triggered — see `_is_still_triggered
59
69
 
60
70
  - **TicketStatus is daemon-internal**, distinct from Linear workflow states.
61
71
  Don't conflate `TicketStatus.needs_input` (in `state.json`) with the Linear
62
- state named "Needs Input".
72
+ state named "Needs Input". The same applies to GitHub: the daemon's internal
73
+ status is separate from the project's Status field value.
63
74
  - **The daemon polls tickets in `in_progress_state`, `needs_input_state`, and
64
75
  (if configured) `qa_state`** (see `_fetch_triggered_issues`). When a human
65
76
  comments on a `needs_input` ticket, `_resume_pipeline` transitions it back
@@ -69,9 +80,10 @@ shutting down, or the ticket is no longer triggered — see `_is_still_triggered
69
80
  ticket lands in `needs_input_state`, and the existing `_reconcile_serve`
70
81
  logic kills the active serve on the next tick because its owner left QA.
71
82
  - **The bot's own comments are filtered out** via the bot user id (`viewer.id`
72
- cached on the Linear client). New "human" comments = comments whose
83
+ cached on the client). New "human" comments = comments whose
73
84
  `user_id != bot_user_id`. The `bot_user_email` in the config exists for
74
- documentation; the actual matching is by id.
85
+ documentation; the actual matching is by id. GitHub uses the viewer's node
86
+ id — the same filtering logic applies.
75
87
  - **State entry exists ⟺ workspace exists.** `orchestrator._tick` step 3
76
88
  fires cleanup (cancel subprocesses, remove state entry, remove workspace)
77
89
  whenever a tracked ticket is no longer *triggered* — i.e. the trigger label
@@ -97,18 +109,18 @@ shutting down, or the ticket is no longer triggered — see `_is_still_triggered
97
109
  workspace prep fails, and is cleared only when the user comments on the
98
110
  ticket. Don't clear it elsewhere.
99
111
  - **QA serve is a global singleton, in-memory only.** When `linear.qa_state`
100
- is configured and a ticket enters that state, `_reconcile_serve` runs the
101
- repo's `.symphony/serve` script in the sandbox and stores the Popen in
102
- `Orchestrator._active_serve` (an `_ActiveServe` dataclass). At most one
103
- serve runs across the whole daemon. The newest QA entrant always wins —
104
- incumbents are killed and bumped back to `needs_input_state`. Nothing
105
- about the serve is persisted to `state.json`; on daemon restart the
106
- reconciliation loop sees the ticket still in `qa_state` and relaunches
107
- the serve naturally. A serve that dies (within or after the 10s watchdog
108
- window) gets a Linear comment with the rc and a stdout/stderr tail, and
109
- the ticket is transitioned back to `needs_input_state` to avoid a respawn
110
- loop — except clean exits within 10s, which are silent (the script is
111
- assumed to have daemonized a child).
112
+ (or `github.qa_status`) is configured and a ticket enters that state,
113
+ `_reconcile_serve` runs the repo's `.symphony/serve` script in the sandbox
114
+ and stores the Popen in `Orchestrator._active_serve` (an `_ActiveServe`
115
+ dataclass). At most one serve runs across the whole daemon. The newest QA
116
+ entrant always wins — incumbents are killed and bumped back to
117
+ `needs_input_state`. Nothing about the serve is persisted to `state.json`;
118
+ on daemon restart the reconciliation loop sees the ticket still in
119
+ `qa_state` and relaunches the serve naturally. A serve that dies (within
120
+ or after the 10s watchdog window) gets a tracker comment with the rc and a
121
+ stdout/stderr tail, and the ticket is transitioned back to
122
+ `needs_input_state` to avoid a respawn loop — except clean exits within
123
+ 10s, which are silent (the script is assumed to have daemonized a child).
112
124
 
113
125
  ## Running and testing
114
126
 
@@ -161,11 +173,12 @@ behaviour, not ours. The NDJSON parser is unit-tested against a fixture.
161
173
 
162
174
  ## Things not to do
163
175
 
164
- - Don't add `git push` from inside the sandboxed agent — credentials are
165
- deliberately hidden. Pushing is a human task.
176
+ - Don't push from inside the sandboxed agent unless the user explicitly asked
177
+ for it. Credentials (`~/.ssh`, `~/.config/gh`, etc.) are hidden by default,
178
+ so pushing requires the user to opt in by unhiding those paths via config.
166
179
  - Don't widen the sandbox to bind extra host paths unless there's a clear
167
180
  reason; the credential-hiding logic depends on the current mount layout.
168
- - Don't add retries/backoff to Linear calls without thinking through the
181
+ - Don't add retries/backoff to tracker API calls without thinking through the
169
182
  poll loop — the loop itself is the retry mechanism.
170
183
  - Don't change `TicketStatus` values without a migration story for existing
171
184
  `state.json` files.
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.0](https://github.com/skorokithakis/symphony/compare/v0.2.0...v0.3.0) (2026-05-15)
4
+
5
+
6
+ ### Features
7
+
8
+ * Add experimental support for GitHub Projects v2 as an issue tracker ([112076c](https://github.com/skorokithakis/symphony/commit/112076c7eff100edc4214e29c69248dd632a0fc0))
9
+ * Sandbox: enable SSH functionality with opt-in configuration ([f3bb111](https://github.com/skorokithakis/symphony/commit/f3bb1111d220c43dd1389abbe6172778f87a760f))
10
+
3
11
  ## [0.2.0](https://github.com/skorokithakis/symphony/compare/v0.1.0...v0.2.0) (2026-05-14)
4
12
 
5
13
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: symphony-linear
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: AI-powered ticket orchestration daemon
5
5
  Project-URL: Source, https://github.com/skorokithakis/symphony
6
6
  License: MIT
@@ -15,15 +15,17 @@ Description-Content-Type: text/markdown
15
15
 
16
16
  # Symphony
17
17
 
18
- Symphony turns Linear into the front end for a fleet of AI coding agents.
19
- Label a ticket, walk away, and read the agent's reply when you have a moment;
20
- when you reply, the agent picks the thread back up. It runs as a single
21
- daemon on your own machine, clones each ticket's repo into its own sandbox,
22
- hands the work to [OpenCode](https://opencode.ai/), and posts the result
23
- back to Linear as a comment. Several tickets can be in flight at once, so
24
- you can keep planning while the agents type.
18
+ Symphony turns Linear or GitHub Projects into the front end for a fleet of
19
+ AI coding agents. Label a ticket (or toggle a project field), walk away,
20
+ and read the agent's reply when you have a moment; when you reply, the agent
21
+ picks the thread back up. It runs as a single daemon on your own machine,
22
+ clones each ticket's repo into its own sandbox, hands the work to
23
+ [OpenCode](https://opencode.ai/), and posts the result back as a comment.
24
+ Several tickets can be in flight at once, so you can keep planning while the
25
+ agents type.
25
26
 
26
- The daemon is small, self-hosted, and has no UI of its own. Linear is the UI.
27
+ The daemon is small, self-hosted, and has no UI of its own. Your issue
28
+ tracker is the UI.
27
29
 
28
30
  ## Screenshots
29
31
 
@@ -43,20 +45,27 @@ uvx symphony-linear --help
43
45
 
44
46
  # 2. Create a workspace directory and a minimal config inside it
45
47
  mkdir ~/symphony && cd ~/symphony
48
+ # For Linear:
46
49
  cat > config.yaml <<'YAML'
47
50
  linear:
48
51
  api_key: ${LINEAR_API_KEY}
49
52
  bot_user_email: you+symphony@example.com
50
53
  YAML
54
+ # Or for GitHub Projects v2 (everything else has sensible defaults):
55
+ cat > config.yaml <<'YAML'
56
+ github:
57
+ token: ${GITHUB_TOKEN}
58
+ project: users/your-username/projects/1
59
+ YAML
51
60
 
52
- # 3. Provide the bot's Linear API key and run
53
- export LINEAR_API_KEY=lin_api_...
61
+ # 3. Provide the bot's API key and run
62
+ export LINEAR_API_KEY=lin_api_... # or GITHUB_TOKEN=ghp_...
54
63
  uvx symphony-linear
55
64
  ```
56
65
 
57
66
  That gets you a running daemon. To actually trigger work you still need to
58
- do the [Linear setup](#linear-setup) (create a bot user, add a label, attach
59
- a repo link to a project) and add the `Agent` label to a ticket.
67
+ set up your tracker: see [Linear setup](#linear-setup) or
68
+ [GitHub setup](#github-setup).
60
69
 
61
70
  ## Installation
62
71
 
@@ -164,6 +173,87 @@ For each repository you want Symphony to work on:
164
173
 
165
174
  That link is how the daemon discovers which repo belongs to which ticket.
166
175
 
176
+ ## GitHub setup
177
+
178
+ This is the one-off plumbing to connect Symphony to a GitHub project. You do
179
+ it once per project. The daemon uses the GitHub Projects v2 (beta) API; the
180
+ older Projects v1 is not supported.
181
+
182
+ ### Create a bot account
183
+
184
+ Create a separate GitHub user for the bot so its comments and state changes
185
+ are easy to spot. Add the bot as a collaborator (with at least read access)
186
+ to every repository the bot should clone.
187
+
188
+ ### Generate a token
189
+
190
+ The bot needs read/write access to Issues, Projects, and read access to
191
+ repository Contents:
192
+
193
+ - **Classic personal access token.** Enable the `repo` and `project`
194
+ scopes.
195
+ - **Fine-grained personal access token.** Grant read/write on Issues,
196
+ read/write on Projects, and read on Contents for the repositories.
197
+ - **GitHub App** with equivalent permissions.
198
+
199
+ Supply the token as `GITHUB_TOKEN` in the environment, or put it directly
200
+ under `github.token` in your config. When the config field is empty or
201
+ absent the daemon falls back to the `GITHUB_TOKEN` environment variable.
202
+
203
+ ### Create a project
204
+
205
+ Create a GitHub Projects v2 project on your user or organization account.
206
+ Note its reference in the format `orgs/<org>/projects/<number>` or
207
+ `users/<user>/projects/<number>`. That string goes into `github.project`
208
+ in your config — for example:
209
+
210
+ ```yaml
211
+ github:
212
+ project: users/my-username/projects/1
213
+ # or: orgs/my-org/projects/1
214
+ ```
215
+
216
+ ### Configure Status
217
+
218
+ Every GitHub project starts with a built-in single-select field called
219
+ `Status`. The daemon expects this field to exist (it does by default on
220
+ every new project) and will auto-create any missing options on it at
221
+ startup — just set the option names you want in `github.in_progress_status`,
222
+ `github.needs_input_status`, and optionally `github.qa_status`, and the
223
+ daemon handles the rest.
224
+
225
+ If your project uses a custom Status field with a different name, set
226
+ `github.status_field` to that name.
227
+
228
+ ### The Symphony trigger field
229
+
230
+ On startup the daemon auto-creates a single-select field called `Symphony`
231
+ on the project (configurable via `github.trigger_field`). It comes with
232
+ one option, `on`.
233
+
234
+ - To **trigger** an issue: set its `Symphony` field to `on`. The daemon
235
+ picks it up on the next poll and starts working.
236
+ - To **untick** an issue: set the field to empty, or remove the item from
237
+ the project entirely.
238
+
239
+ Untriggering or moving the issue out of an active Status causes Symphony
240
+ to cancel any in-flight subprocesses, delete the workspace, and remove
241
+ the issue from its internal state on the next poll tick — just like
242
+ removing the trigger label on Linear.
243
+
244
+ ### Multi-repo projects
245
+
246
+ GitHub Projects v2 can contain items from any repository that the project
247
+ references. Each issue remembers its own repository; Symphony clones from
248
+ that repo's SSH URL. There is no per-project "Repo" link to configure.
249
+
250
+ ### Identifier convention
251
+
252
+ Symphony uses `<owner>-<repo>-<number>` as the identifier for GitHub
253
+ issues — for example `my-org-my-repo-42`. This appears in workspace
254
+ directory names and metadata comments, and is used to derive the branch
255
+ name when `auto_branch` is enabled.
256
+
167
257
  ## Configuration
168
258
 
169
259
  Symphony reads `config.yaml` from its workspace directory, which defaults to
@@ -173,21 +263,38 @@ daemon refuses to start without a valid config; validate it any time with
173
263
 
174
264
  ### Minimal config
175
265
 
266
+ For Linear:
267
+
176
268
  ```yaml
177
269
  linear:
178
270
  api_key: ${LINEAR_API_KEY}
179
271
  bot_user_email: yourname+symphony@gmail.com
180
272
  ```
181
273
 
182
- You can omit `api_key` entirely and let the daemon read the `LINEAR_API_KEY`
183
- environment variable directly; that is often nicer for systemd or secret
184
- managers.
274
+ For GitHub:
275
+
276
+ ```yaml
277
+ github:
278
+ token: ${GITHUB_TOKEN}
279
+ project: users/your-username/projects/1
280
+ # Optional: enable manual QA by uncommenting.
281
+ # qa_status: QA
282
+ ```
283
+
284
+ You can omit the credential entirely and let the daemon read the
285
+ appropriate environment variable (`LINEAR_API_KEY` or `GITHUB_TOKEN`)
286
+ directly; that is often nicer for systemd or secret managers.
185
287
 
186
288
  ### Full annotated config
187
289
 
290
+ The annotated config below shows the Linear backend. For the GitHub
291
+ version see `config.yaml.example` in the repo root — both blocks are
292
+ documented there side by side.
293
+
188
294
  ```yaml
189
295
  # config.yaml (placed in the workspace directory)
190
296
 
297
+ # Choose exactly one backend — linear or github.
191
298
  linear:
192
299
  # REQUIRED. Linear Personal API key from the bot account.
193
300
  # Use ${LINEAR_API_KEY} to read from the environment, or omit this field
@@ -232,7 +339,7 @@ sandbox:
232
339
  # extra_rw_paths:
233
340
  # - ~/projects/shared-tools
234
341
 
235
- # Seconds between Linear poll cycles (default: 30, minimum: 1).
342
+ # Seconds between poll cycles (default: 30, minimum: 1).
236
343
  poll_interval_seconds: 30
237
344
 
238
345
  # Max seconds per AI turn before the process is killed (default: 1800).
@@ -261,7 +368,12 @@ After=network-online.target
261
368
  [Service]
262
369
  Type=simple
263
370
  WorkingDirectory=%h/symphony
371
+ # Set the env var that matches your backend. Use exactly one of these two
372
+ # Environment= lines (systemd does not support trailing `#` comments on
373
+ # Environment= values — the `#` and everything after it become part of the
374
+ # value).
264
375
  Environment=LINEAR_API_KEY=lin_api_...
376
+ # Environment=GITHUB_TOKEN=ghp_...
265
377
  # systemd strips PATH; tell the sandbox where to find opencode, git, bwrap.
266
378
  Environment=SYMPHONY_SANDBOX_PATH=/usr/local/bin:/usr/bin:/bin
267
379
  ExecStart=%h/.local/bin/symphony-linear
@@ -284,8 +396,8 @@ Then `systemctl --user daemon-reload && systemctl --user enable --now symphony`.
284
396
  ### Startup behaviour
285
397
 
286
398
  On launch the daemon recovers any orphan tickets it was working on when it
287
- last stopped. It posts a recovery comment and parks the ticket in `Needs
288
- Input` so you can decide whether to retry. State is persisted at
399
+ last stopped. It posts a recovery comment and parks the ticket in the
400
+ needs-input state so you can decide whether to retry. State is persisted at
289
401
  `<workspace>/state.json` and rewritten atomically.
290
402
 
291
403
  ### Graceful shutdown
@@ -295,9 +407,9 @@ subprocesses are killed, state is persisted, and the daemon exits.
295
407
 
296
408
  ## How it works
297
409
 
298
- Every `poll_interval_seconds`, Symphony queries Linear for tickets that
299
- carry the trigger label and live in one of the active workflow states. New
300
- tickets enter the **initial pipeline**:
410
+ Every `poll_interval_seconds`, Symphony queries the tracker (Linear or
411
+ GitHub) for tickets that carry the trigger signal and live in one of the
412
+ active workflow states. New tickets enter the **initial pipeline**:
301
413
 
302
414
  1. Find the project's `Repo` link to discover the git URL.
303
415
  2. Clone or update the repo into `<workspace>/<sanitised-identifier>`.
@@ -309,7 +421,7 @@ tickets enter the **initial pipeline**:
309
421
  description as the prompt.
310
422
  6. Post the agent's final message as a comment, plus a small metadata
311
423
  comment with the workspace path and OpenCode session id.
312
- 7. Transition the ticket to `Needs Input`.
424
+ 7. Transition the ticket to the configured needs-input state.
313
425
 
314
426
  Tickets you've already replied to enter the **resume pipeline** instead:
315
427
  the daemon picks up the new human comments, runs `opencode run --session
@@ -317,7 +429,7 @@ the daemon picks up the new human comments, runs `opencode run --session
317
429
 
318
430
  Up to five turns run in parallel across different tickets, with per-ticket
319
431
  serialisation so a single ticket never has two turns in flight. The agent
320
- and you only ever communicate through Linear comments; the daemon has no
432
+ and you only ever communicate through tracker comments; the daemon has no
321
433
  other channel.
322
434
 
323
435
  ### Sandbox
@@ -337,24 +449,24 @@ that yourself, after reviewing.
337
449
 
338
450
  ## Manual QA
339
451
 
340
- If you set `linear.qa_state` and add an executable `.symphony/serve` script
341
- to your repo, moving a ticket into that workflow state launches the script
342
- inside the sandbox. Use it to run a dev server, a worker, or anything else
343
- you want to exercise by hand.
452
+ If you set `linear.qa_state` (or `github.qa_status`) and add an executable
453
+ `.symphony/serve` script to your repo, moving a ticket into that workflow
454
+ state launches the script inside the sandbox. Use it to run a dev server, a
455
+ worker, or anything else you want to exercise by hand.
344
456
 
345
457
  Only one serve runs across the whole daemon. Dropping a second ticket into
346
- QA bumps the first back to `Needs Input` and starts the new one. Commenting
347
- on a ticket that is currently in QA pulls it back out into `In Progress`:
348
- on the next poll tick the serve is killed, the agent runs another turn on
349
- your comment, and the ticket lands in `Needs Input`. Move it back to QA to
350
- test again.
458
+ QA bumps the first back to the needs-input state and starts the new one.
459
+ Commenting on a ticket that is currently in QA pulls it back out into the
460
+ in-progress state: on the next poll tick the serve is killed, the agent
461
+ runs another turn on your comment, and the ticket lands in the needs-input
462
+ state. Move it back to QA to test again.
351
463
 
352
464
  The script is given no time limit and the daemon does not interpret its
353
465
  output. If it exits non-zero within ten seconds, or exits later for any
354
466
  reason, the daemon posts a comment containing the exit code and a thousand
355
- characters of stdout/stderr, and the ticket goes back to `Needs Input`.
356
- Clean exits within ten seconds are treated as a parent that has daemonised
357
- a child, and are silent.
467
+ characters of stdout/stderr, and the ticket goes back to the needs-input
468
+ state. Clean exits within ten seconds are treated as a parent that has
469
+ daemonised a child, and are silent.
358
470
 
359
471
  ## Repo conventions
360
472
 
@@ -407,8 +519,10 @@ this shape:
407
519
  - session: `ses_abc123`
408
520
  ```
409
521
 
410
- The workspace path is where the repo was cloned; the session id is the
411
- OpenCode session you can resume manually.
522
+ The workspace path is where the repo was cloned (Linear tickets use the
523
+ team key + number like `TEAM-42`; GitHub issues use
524
+ `<owner>-<repo>-<number>`). The session id is the OpenCode session you can
525
+ resume manually.
412
526
 
413
527
  ### Resume a session by hand
414
528
 
@@ -442,15 +556,16 @@ session id.
442
556
  there. Comment on the ticket to re-trigger.
443
557
  - **Single workspace per ticket.** A ticket's workspace is reused across
444
558
  turns; the agent works in the same clone every time.
445
- - **Label-only trigger.** The trigger label is the only way to enrol a
446
- ticket. There is no manual nudge, slash command, or webhook.
447
- - **No priority.** Tickets are picked in whatever order Linear returns
559
+ - **Trigger-only enrolment.** The trigger label (Linear) or trigger field
560
+ (GitHub) is the only way to enrol a ticket. There is no manual nudge,
561
+ slash command, or webhook.
562
+ - **No priority.** Tickets are picked in whatever order the tracker returns
448
563
  them. There is no queue.
449
564
  - **One QA serve at a time.** A single `.symphony/serve` runs globally with
450
565
  no port allocation. Your script is responsible for binding to whichever
451
566
  port you (or your reverse proxy) expect.
452
- - **Free Linear plan caps.** Free workspaces are capped at 10 members and
453
- 250 issues; the bot counts against the member cap.
567
+ - **Linear free plan caps.** Free Linear workspaces are capped at 10
568
+ members and 250 issues; the bot counts against the member cap.
454
569
 
455
570
  ## Development
456
571