symphony-github 0.1.0

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 (166) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +341 -0
  3. package/config.example.yaml +101 -0
  4. package/dist/agents/launcher.d.ts +24 -0
  5. package/dist/agents/launcher.d.ts.map +1 -0
  6. package/dist/agents/launcher.js +152 -0
  7. package/dist/agents/launcher.js.map +1 -0
  8. package/dist/agents/registry.d.ts +10 -0
  9. package/dist/agents/registry.d.ts.map +1 -0
  10. package/dist/agents/registry.js +324 -0
  11. package/dist/agents/registry.js.map +1 -0
  12. package/dist/agents/runner.d.ts +58 -0
  13. package/dist/agents/runner.d.ts.map +1 -0
  14. package/dist/agents/runner.js +1190 -0
  15. package/dist/agents/runner.js.map +1 -0
  16. package/dist/app.d.ts +11 -0
  17. package/dist/app.d.ts.map +1 -0
  18. package/dist/app.js +829 -0
  19. package/dist/app.js.map +1 -0
  20. package/dist/components/ActivityView.d.ts +9 -0
  21. package/dist/components/ActivityView.d.ts.map +1 -0
  22. package/dist/components/ActivityView.js +73 -0
  23. package/dist/components/ActivityView.js.map +1 -0
  24. package/dist/components/Header.d.ts +12 -0
  25. package/dist/components/Header.d.ts.map +1 -0
  26. package/dist/components/Header.js +44 -0
  27. package/dist/components/Header.js.map +1 -0
  28. package/dist/components/IssueList.d.ts +10 -0
  29. package/dist/components/IssueList.d.ts.map +1 -0
  30. package/dist/components/IssueList.js +119 -0
  31. package/dist/components/IssueList.js.map +1 -0
  32. package/dist/components/Onboarding.d.ts +26 -0
  33. package/dist/components/Onboarding.d.ts.map +1 -0
  34. package/dist/components/Onboarding.js +948 -0
  35. package/dist/components/Onboarding.js.map +1 -0
  36. package/dist/components/PaneView.d.ts +9 -0
  37. package/dist/components/PaneView.d.ts.map +1 -0
  38. package/dist/components/PaneView.js +74 -0
  39. package/dist/components/PaneView.js.map +1 -0
  40. package/dist/components/StartupRecoveryView.d.ts +13 -0
  41. package/dist/components/StartupRecoveryView.d.ts.map +1 -0
  42. package/dist/components/StartupRecoveryView.js +85 -0
  43. package/dist/components/StartupRecoveryView.js.map +1 -0
  44. package/dist/components/StatusBar.d.ts +9 -0
  45. package/dist/components/StatusBar.d.ts.map +1 -0
  46. package/dist/components/StatusBar.js +70 -0
  47. package/dist/components/StatusBar.js.map +1 -0
  48. package/dist/components/TableView.d.ts +8 -0
  49. package/dist/components/TableView.d.ts.map +1 -0
  50. package/dist/components/TableView.js +87 -0
  51. package/dist/components/TableView.js.map +1 -0
  52. package/dist/config/index.d.ts +18 -0
  53. package/dist/config/index.d.ts.map +1 -0
  54. package/dist/config/index.js +357 -0
  55. package/dist/config/index.js.map +1 -0
  56. package/dist/git/merge.d.ts +23 -0
  57. package/dist/git/merge.d.ts.map +1 -0
  58. package/dist/git/merge.js +131 -0
  59. package/dist/git/merge.js.map +1 -0
  60. package/dist/git/utils.d.ts +34 -0
  61. package/dist/git/utils.d.ts.map +1 -0
  62. package/dist/git/utils.js +214 -0
  63. package/dist/git/utils.js.map +1 -0
  64. package/dist/git/worktree.d.ts +23 -0
  65. package/dist/git/worktree.d.ts.map +1 -0
  66. package/dist/git/worktree.js +116 -0
  67. package/dist/git/worktree.js.map +1 -0
  68. package/dist/index.d.ts +3 -0
  69. package/dist/index.d.ts.map +1 -0
  70. package/dist/index.js +225 -0
  71. package/dist/index.js.map +1 -0
  72. package/dist/paths.d.ts +21 -0
  73. package/dist/paths.d.ts.map +1 -0
  74. package/dist/paths.js +59 -0
  75. package/dist/paths.js.map +1 -0
  76. package/dist/runModes.d.ts +7 -0
  77. package/dist/runModes.d.ts.map +1 -0
  78. package/dist/runModes.js +36 -0
  79. package/dist/runModes.js.map +1 -0
  80. package/dist/services/daemon.d.ts +85 -0
  81. package/dist/services/daemon.d.ts.map +1 -0
  82. package/dist/services/daemon.js +836 -0
  83. package/dist/services/daemon.js.map +1 -0
  84. package/dist/services/github.d.ts +101 -0
  85. package/dist/services/github.d.ts.map +1 -0
  86. package/dist/services/github.js +367 -0
  87. package/dist/services/github.js.map +1 -0
  88. package/dist/services/githubProgressReporter.d.ts +33 -0
  89. package/dist/services/githubProgressReporter.d.ts.map +1 -0
  90. package/dist/services/githubProgressReporter.js +272 -0
  91. package/dist/services/githubProgressReporter.js.map +1 -0
  92. package/dist/services/runtime.d.ts +43 -0
  93. package/dist/services/runtime.d.ts.map +1 -0
  94. package/dist/services/runtime.js +126 -0
  95. package/dist/services/runtime.js.map +1 -0
  96. package/dist/services/state.d.ts +43 -0
  97. package/dist/services/state.d.ts.map +1 -0
  98. package/dist/services/state.js +176 -0
  99. package/dist/services/state.js.map +1 -0
  100. package/dist/services/tmux.d.ts +50 -0
  101. package/dist/services/tmux.d.ts.map +1 -0
  102. package/dist/services/tmux.js +157 -0
  103. package/dist/services/tmux.js.map +1 -0
  104. package/dist/swarm/backlog.d.ts +25 -0
  105. package/dist/swarm/backlog.d.ts.map +1 -0
  106. package/dist/swarm/backlog.js +83 -0
  107. package/dist/swarm/backlog.js.map +1 -0
  108. package/dist/swarm/config.d.ts +14 -0
  109. package/dist/swarm/config.d.ts.map +1 -0
  110. package/dist/swarm/config.js +112 -0
  111. package/dist/swarm/config.js.map +1 -0
  112. package/dist/swarm/dependencies.d.ts +36 -0
  113. package/dist/swarm/dependencies.d.ts.map +1 -0
  114. package/dist/swarm/dependencies.js +141 -0
  115. package/dist/swarm/dependencies.js.map +1 -0
  116. package/dist/swarm/director.d.ts +67 -0
  117. package/dist/swarm/director.d.ts.map +1 -0
  118. package/dist/swarm/director.js +358 -0
  119. package/dist/swarm/director.js.map +1 -0
  120. package/dist/swarm/directorPrompt.d.ts +15 -0
  121. package/dist/swarm/directorPrompt.d.ts.map +1 -0
  122. package/dist/swarm/directorPrompt.js +60 -0
  123. package/dist/swarm/directorPrompt.js.map +1 -0
  124. package/dist/swarm/index.d.ts +7 -0
  125. package/dist/swarm/index.d.ts.map +1 -0
  126. package/dist/swarm/index.js +6 -0
  127. package/dist/swarm/index.js.map +1 -0
  128. package/dist/swarm/proposals.d.ts +29 -0
  129. package/dist/swarm/proposals.d.ts.map +1 -0
  130. package/dist/swarm/proposals.js +141 -0
  131. package/dist/swarm/proposals.js.map +1 -0
  132. package/dist/swarm/types.d.ts +65 -0
  133. package/dist/swarm/types.d.ts.map +1 -0
  134. package/dist/swarm/types.js +3 -0
  135. package/dist/swarm/types.js.map +1 -0
  136. package/dist/theme.d.ts +64 -0
  137. package/dist/theme.d.ts.map +1 -0
  138. package/dist/theme.js +161 -0
  139. package/dist/theme.js.map +1 -0
  140. package/dist/triggers/index.d.ts +17 -0
  141. package/dist/triggers/index.d.ts.map +1 -0
  142. package/dist/triggers/index.js +124 -0
  143. package/dist/triggers/index.js.map +1 -0
  144. package/dist/types.d.ts +327 -0
  145. package/dist/types.d.ts.map +1 -0
  146. package/dist/types.js +6 -0
  147. package/dist/types.js.map +1 -0
  148. package/dist/utils/duplicateDetection.d.ts +14 -0
  149. package/dist/utils/duplicateDetection.d.ts.map +1 -0
  150. package/dist/utils/duplicateDetection.js +45 -0
  151. package/dist/utils/duplicateDetection.js.map +1 -0
  152. package/dist/utils/shell.d.ts +46 -0
  153. package/dist/utils/shell.d.ts.map +1 -0
  154. package/dist/utils/shell.js +79 -0
  155. package/dist/utils/shell.js.map +1 -0
  156. package/dist/utils/slug.d.ts +13 -0
  157. package/dist/utils/slug.d.ts.map +1 -0
  158. package/dist/utils/slug.js +32 -0
  159. package/dist/utils/slug.js.map +1 -0
  160. package/dist/version.d.ts +28 -0
  161. package/dist/version.d.ts.map +1 -0
  162. package/dist/version.js +105 -0
  163. package/dist/version.js.map +1 -0
  164. package/examples/run-claude.example.sh +11 -0
  165. package/examples/run-codex.example.sh +11 -0
  166. package/package.json +68 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,341 @@
1
+ # Symphony GitHub
2
+
3
+ Symphony GitHub is a tmux-based GitHub issue runner for coding agents. It watches one or more GitHub repositories, starts agent work in isolated git worktrees, pushes branches, opens PRs, and can optionally merge them automatically.
4
+
5
+ It is the GitHub-native successor to dmux: same multi-agent / tmux workflow, but with issue polling, PR automation, progress comments, startup recovery, and swarm orchestration.
6
+
7
+ ## What It Does
8
+
9
+ - watches GitHub issues and comments using configurable trigger rules
10
+ - runs Claude, Codex, OpenCode, Gemini, Cline, Qwen, Amp, Pi, Cursor, Copilot, or Crush in isolated worktrees
11
+ - opens a tmux TUI showing active runs, review-needed runs, and completed runs
12
+ - pushes branches and creates PRs automatically
13
+ - supports three run modes:
14
+ - `auto`: auto-resolve conflicts when possible and auto-merge
15
+ - `auto_manual_conflicts`: auto-merge unless GitHub reports conflicts
16
+ - `auto_manual_merge`: stop once the PR is ready for human review/merge
17
+ - keeps swarm/autoevolve separate from run mode; enable it with `swarm.enabled`
18
+ - mirrors progress back to GitHub issue / PR comments if enabled
19
+ - recovers claimed issues on startup and lets you resume or skip them
20
+ - optionally runs a swarm Director that creates follow-up issues, manages blockers, and tracks dependencies
21
+
22
+ ## Install
23
+
24
+ ```bash
25
+ npm install -g symphony-github
26
+ ```
27
+
28
+ Or run from a local checkout:
29
+
30
+ ```bash
31
+ npm install
32
+ npm run build
33
+ npm start
34
+ ```
35
+
36
+ ## Prerequisites
37
+
38
+ - Node.js 18+
39
+ - `tmux`
40
+ - `git`
41
+ - `gh` authenticated against GitHub
42
+ - at least one supported agent CLI installed
43
+
44
+ Sanity checks:
45
+
46
+ ```bash
47
+ gh auth status
48
+ tmux -V
49
+ codex --version
50
+ ```
51
+
52
+ ## Start
53
+
54
+ Inside a local checkout of the repo you want to work on:
55
+
56
+ ```bash
57
+ symphony configure
58
+ symphony
59
+ ```
60
+
61
+ Useful variants:
62
+
63
+ ```bash
64
+ # Re-run onboarding against the current config
65
+ symphony configure
66
+
67
+ # Start or reuse the tmux session without attaching immediately
68
+ symphony --no-attach
69
+
70
+ # Use an explicit config path
71
+ symphony --config ./config.yaml
72
+ ```
73
+
74
+ If you start detached, Symphony prints the tmux session name and attach command.
75
+
76
+ ## TUI
77
+
78
+ The current TUI has three main areas:
79
+
80
+ - header: watched repo(s), run mode, counts for running / review / done, and last poll time
81
+ - table: issue number, title, status, agent, diff stats, last update time, and an activity sparkline
82
+ - preview pane: live tmux output for the selected run, or the startup-recovery / action-menu view
83
+
84
+ Special states:
85
+
86
+ - startup recovery view: appears when Symphony finds previously claimed issues on boot
87
+ - action menu: opened from the selected run to pause, kill, or label-and-kill it
88
+
89
+ ## Keyboard Shortcuts
90
+
91
+ Normal mode:
92
+
93
+ - `↑` / `↓`: move selection
94
+ - `Enter`: jump to the selected tmux pane
95
+ - `a`: same as `Enter`
96
+ - `d`: open the action menu for the selected run
97
+ - `r`: resume a run in `awaiting_review` or `needs_attention`
98
+ - `f`: finalize a run in `awaiting_review`
99
+ - `x`: close the selected pane from the local list
100
+ - `c`: reopen onboarding / reconfigure the current project config
101
+ - `q`: quit Symphony
102
+ - `Ctrl-b 0`: return to the Symphony control pane after jumping into an agent pane
103
+
104
+ Action menu:
105
+
106
+ - `↑` / `↓`: choose action
107
+ - `Enter`: confirm
108
+ - `Esc`: cancel
109
+
110
+ Startup recovery:
111
+
112
+ - `↑` / `↓`: move selection
113
+ - `Space`: toggle one issue
114
+ - `a`: select all
115
+ - `n`: select none
116
+ - `Enter`: resume selected issues
117
+ - `s`: skip all pending recovery items
118
+ - `q`: quit
119
+
120
+ ## Run Modes
121
+
122
+ Symphony currently supports three run modes:
123
+
124
+ ```yaml
125
+ mode: auto # auto-resolve conflicts when possible and merge automatically
126
+ mode: auto_manual_conflicts # stop only when conflict resolution needs a human
127
+ mode: auto_manual_merge # stop when the PR is ready for manual merge
128
+ ```
129
+
130
+ Legacy `automerge` normalizes to `auto`.
131
+
132
+ These are the only valid values for `mode`. Swarm/autoevolve is not a fourth run mode; it is a separate optional orchestration layer configured under `swarm`.
133
+
134
+ ## Swarm Mode
135
+
136
+ If you want the Director agent / agent-swarm behavior, enable `swarm` in the YAML config. This can create follow-up issues, pause blocked work, resume unblocked work, and keep evolving the backlog while the normal run mode still controls how worker PRs are merged.
137
+
138
+ ```yaml
139
+ mode: auto
140
+
141
+ swarm:
142
+ enabled: true
143
+ director:
144
+ agent: claude
145
+ scope: session
146
+ analyze_interval_min: 30
147
+ max_proposed_issues: 5
148
+ proposals:
149
+ approval_mode: auto
150
+ ```
151
+
152
+ Proposal approval behavior:
153
+
154
+ - `auto`: automatically approve proposals and create the follow-up issues
155
+ - `director_review`: workers can propose issues, but the Director must approve them first
156
+ - `human_approval`: workers can propose issues, but a human must approve them
157
+
158
+ `symphony configure` currently asks only for the three run modes above. Swarm is configured manually in the generated YAML for now.
159
+
160
+ ## Configuration
161
+
162
+ The easiest path is still `symphony configure`, but the generated YAML is straightforward.
163
+
164
+ Minimal example:
165
+
166
+ ```yaml
167
+ version: 1
168
+
169
+ default_agent: codex
170
+ mode: auto_manual_merge
171
+
172
+ github_comments:
173
+ verbosity: key_updates
174
+
175
+ poll_interval_sec: 2
176
+ max_concurrent_runs: 4
177
+
178
+ agents:
179
+ codex:
180
+ provider: codex
181
+ timeout_min: 30
182
+ create_pr: ready
183
+ push: true
184
+
185
+ routing:
186
+ mention_map:
187
+ "@agent": codex
188
+ "@codex": codex
189
+
190
+ repos:
191
+ - owner/repo
192
+
193
+ trigger:
194
+ mode: label_only
195
+ labels:
196
+ - agent
197
+ mentions:
198
+ - "@agent"
199
+ - "@codex"
200
+ claim_label: agent:running
201
+ done_label: agent:done
202
+ failed_label: agent:failed
203
+ include_existing_open_issues: true
204
+ ```
205
+
206
+ See [config.example.yaml](/home/mirekl/Symphony_Repositories/symphony-github/config.example.yaml) for the full schema, including swarm settings.
207
+
208
+ ## Try It
209
+
210
+ Two public repos are meant for trying Symphony quickly:
211
+
212
+ - `mireklzicar/symphony-fixture-todo`: deterministic canonical harness
213
+ - `mireklzicar/symphony-demo-snake`: more visual showcase demo
214
+
215
+ ### TODO App
216
+
217
+ Use this when you want the cleanest reproducible demo.
218
+
219
+ ```bash
220
+ git clone https://github.com/<you>/symphony-fixture-todo.git
221
+ cd symphony-fixture-todo
222
+ npm install
223
+ ```
224
+
225
+ Seed the canonical conflict demo:
226
+
227
+ ```bash
228
+ ./scripts/create_issues.sh \
229
+ --fixture conflicts \
230
+ --group readme-demo-conflict \
231
+ --label agent
232
+ ```
233
+
234
+ Then start Symphony in that checkout:
235
+
236
+ ```bash
237
+ symphony configure
238
+ symphony
239
+ ```
240
+
241
+ Recommended config choices for this demo:
242
+
243
+ - agent: `codex` or `claude`
244
+ - run mode: `auto`
245
+ - trigger mode: `label_only`
246
+ - startup scan: enabled
247
+ - GitHub comments: `key_updates` or `silent`
248
+
249
+ Expected result:
250
+
251
+ - two conflicting README issues are picked up
252
+ - Symphony opens and merges two PRs
253
+ - the final README sentence ends with the second issue's requested exact text
254
+
255
+ ### Snake App
256
+
257
+ Use this when you want a more fun public demo backlog.
258
+
259
+ ```bash
260
+ git clone https://github.com/<you>/symphony-demo-snake.git
261
+ cd symphony-demo-snake
262
+ npm install
263
+ ```
264
+
265
+ Seed the curated demo issues:
266
+
267
+ ```bash
268
+ ./scripts/create_issues.sh --label agent
269
+ ```
270
+
271
+ Then run Symphony in the same repo:
272
+
273
+ ```bash
274
+ symphony configure
275
+ symphony
276
+ ```
277
+
278
+ The snake repo includes demo issues for:
279
+
280
+ - food spawn correctness
281
+ - pause / resume controls
282
+ - WASD controls
283
+ - responsive layout
284
+ - localStorage high score
285
+ - extracting gameplay constants into a config module
286
+
287
+ ## How Runs Work
288
+
289
+ 1. Symphony polls the configured GitHub repos.
290
+ 2. It evaluates trigger rules against new / updated issues and comments.
291
+ 3. Matching issues are claimed with a running label.
292
+ 4. A dedicated git worktree is created for the run.
293
+ 5. The selected agent launches in its own tmux pane with issue context.
294
+ 6. On completion, Symphony inspects the worktree, pushes the branch, and creates or finds the PR.
295
+ 7. Depending on run mode, Symphony either merges automatically or leaves the run in review.
296
+ 8. Final labels, comments, and runtime manifests are updated.
297
+
298
+ ## Runtime Layout
299
+
300
+ By default Symphony stores state under `~/.symphony/`:
301
+
302
+ ```text
303
+ ~/.symphony/
304
+ cache/
305
+ repos/
306
+ runs/
307
+ state.json
308
+ swarm/
309
+ version.json
310
+ worktrees/
311
+ ```
312
+
313
+ Important per-run files:
314
+
315
+ ```text
316
+ ~/.symphony/runs/
317
+ r_<timestamp>-owner__repo-issue-random/
318
+ manifest.json
319
+ events.jsonl
320
+ ```
321
+
322
+ ## Agent Environment
323
+
324
+ Before each run, Symphony exports:
325
+
326
+ - `SYMPHONY_REPO`
327
+ - `SYMPHONY_ISSUE_NUMBER`
328
+ - `SYMPHONY_ISSUE_URL`
329
+ - `SYMPHONY_WORKTREE`
330
+ - `SYMPHONY_BRANCH`
331
+ - `SYMPHONY_CONTEXT_FILE`
332
+ - `SYMPHONY_RUN_ID`
333
+ - `SYMPHONY_RUN_DIR`
334
+ - `SYMPHONY_AGENT`
335
+ - `SYMPHONY_AGENT_PROVIDER`
336
+
337
+ It also writes `.symphony/issue.json` and `.symphony/context.md` into the worktree.
338
+
339
+ ## License
340
+
341
+ MIT
@@ -0,0 +1,101 @@
1
+ version: 1
2
+
3
+ default_agent: claude
4
+ mode: auto_manual_merge
5
+
6
+ github_comments:
7
+ # full, without_thinking, key_updates, silent
8
+ verbosity: key_updates
9
+
10
+ poll_interval_sec: 2
11
+ max_concurrent_runs: 10
12
+
13
+ # Paths default to ~/.symphony/ (the global Symphony home directory).
14
+ # Override with absolute or ~/ paths if needed.
15
+ # clone_root: ~/.symphony/repos
16
+ # worktree_root: ~/.symphony/worktrees
17
+ # state_file: ~/.symphony/state.json
18
+ # runtime_root: ~/.symphony
19
+
20
+ agents:
21
+ claude:
22
+ provider: claude
23
+ # model: opus
24
+ # thinking: high
25
+ timeout_min: 45
26
+ create_pr: ready
27
+ push: true
28
+
29
+ codex:
30
+ provider: codex
31
+ # model: gpt-5.4
32
+ timeout_min: 45
33
+ create_pr: ready
34
+ push: true
35
+
36
+ # Custom agent example:
37
+ # review-bot:
38
+ # provider: custom
39
+ # command: ./examples/run-codex.example.sh
40
+ # timeout_min: 30
41
+ # create_pr: none
42
+ # push: false
43
+
44
+ routing:
45
+ mention_map:
46
+ "@agent": claude
47
+ "@claude": claude
48
+ "@codex": codex
49
+
50
+ repos:
51
+ - owner/repo
52
+
53
+ # Per-repo overrides:
54
+ # - repo: owner/other-repo
55
+ # default_agent: codex
56
+ # mode: auto
57
+ # agent_overrides:
58
+ # codex:
59
+ # timeout_min: 60
60
+
61
+ # ── Swarm mode (agent orchestration, separate from `mode` above) ──
62
+ # Enables a Director Agent that orchestrates workers: creates issues,
63
+ # reviews worker proposals, manages dependencies, and evolves the project.
64
+ # swarm:
65
+ # enabled: false
66
+ # director:
67
+ # agent: claude
68
+ # model: opus
69
+ # scope: session # session | organization | repo
70
+ # analyze_interval_min: 30
71
+ # max_proposed_issues: 5
72
+ # proposals:
73
+ # approval_mode: director_review # auto | director_review | human_approval
74
+ # labels:
75
+ # paused: "agent:paused"
76
+ # blocker: "agent:blocker"
77
+ # proposed: "agent:proposed"
78
+ # backlog:
79
+ # enabled: true
80
+ # github_issue: true
81
+
82
+ trigger:
83
+ mode: mention_or_label
84
+ labels:
85
+ - agent
86
+ mentions:
87
+ - "@agent"
88
+ - "@claude"
89
+ - "@codex"
90
+ ignore_labels:
91
+ - wontfix
92
+ - no-agent
93
+ allowed_author_associations:
94
+ - OWNER
95
+ - MEMBER
96
+ - COLLABORATOR
97
+ require_assignee: false
98
+ claim_label: agent:running
99
+ done_label: agent:done
100
+ failed_label: agent:failed
101
+ include_existing_open_issues: false
@@ -0,0 +1,24 @@
1
+ import type { ResolvedAgent, GitHubIssue, GitHubComment, Settings, RunRequest } from '../types.js';
2
+ /**
3
+ * Resolve which agent should handle an issue.
4
+ * Ported from symphony Python's agents.py.
5
+ */
6
+ export declare function resolveAgent(issue: GitHubIssue, comments: GitHubComment[], repo: string, settings: Settings): ResolvedAgent;
7
+ /**
8
+ * Build the prompt for an agent given an issue.
9
+ */
10
+ export declare function buildPrompt(issue: GitHubIssue, repo: string, _mode: string, options?: {
11
+ swarmEnabled?: boolean;
12
+ }): string;
13
+ export declare function buildAgentPromptCommand(agent: ResolvedAgent, prompt: string): string;
14
+ /**
15
+ * Write context files (.symphony/) into the worktree.
16
+ */
17
+ export declare function writeContextFiles(worktreePath: string, issue: GitHubIssue, comments: GitHubComment[], repo: string): void;
18
+ /**
19
+ * Launch an agent in a tmux pane for a given issue.
20
+ */
21
+ export declare function launchAgentInPane(paneId: string, request: RunRequest, options?: {
22
+ swarmEnabled?: boolean;
23
+ }): Promise<void>;
24
+ //# sourceMappingURL=launcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../../src/agents/launcher.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAInG;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,aAAa,EAAE,EACzB,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,QAAQ,GACjB,aAAa,CA0Bf;AAOD;;GAEG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GACnC,MAAM,CAsCR;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,MAAM,GACb,MAAM,CAaR;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,aAAa,EAAE,EACzB,IAAI,EAAE,MAAM,GACX,IAAI,CAqCN;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,GACnC,OAAO,CAAC,IAAI,CAAC,CA+Cf"}