Bello 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 (58) hide show
  1. bello-0.3.0/Bello.egg-info/PKG-INFO +498 -0
  2. bello-0.3.0/Bello.egg-info/SOURCES.txt +56 -0
  3. bello-0.3.0/Bello.egg-info/dependency_links.txt +1 -0
  4. bello-0.3.0/Bello.egg-info/entry_points.txt +2 -0
  5. bello-0.3.0/Bello.egg-info/requires.txt +9 -0
  6. bello-0.3.0/Bello.egg-info/top_level.txt +1 -0
  7. bello-0.3.0/LICENSE +22 -0
  8. bello-0.3.0/PKG-INFO +498 -0
  9. bello-0.3.0/README.md +476 -0
  10. bello-0.3.0/pyproject.toml +45 -0
  11. bello-0.3.0/setup.cfg +4 -0
  12. bello-0.3.0/supervisor/__init__.py +23 -0
  13. bello-0.3.0/supervisor/_build.py +9 -0
  14. bello-0.3.0/supervisor/adversary_agent.py +334 -0
  15. bello-0.3.0/supervisor/approval_triage.py +494 -0
  16. bello-0.3.0/supervisor/approvals.py +474 -0
  17. bello-0.3.0/supervisor/appserver.py +545 -0
  18. bello-0.3.0/supervisor/coder.py +197 -0
  19. bello-0.3.0/supervisor/config_editor.py +2161 -0
  20. bello-0.3.0/supervisor/controller.py +8510 -0
  21. bello-0.3.0/supervisor/doctor.py +183 -0
  22. bello-0.3.0/supervisor/health.py +196 -0
  23. bello-0.3.0/supervisor/main.py +538 -0
  24. bello-0.3.0/supervisor/policy.py +1273 -0
  25. bello-0.3.0/supervisor/project_config.py +477 -0
  26. bello-0.3.0/supervisor/prompts/__init__.py +19 -0
  27. bello-0.3.0/supervisor/prompts/prompts.toml +459 -0
  28. bello-0.3.0/supervisor/prompts/supervisor.py +215 -0
  29. bello-0.3.0/supervisor/review_limits.py +60 -0
  30. bello-0.3.0/supervisor/schemas/__init__.py +95 -0
  31. bello-0.3.0/supervisor/schemas/models.py +892 -0
  32. bello-0.3.0/supervisor/state.py +350 -0
  33. bello-0.3.0/supervisor/supervisor_agent.py +1371 -0
  34. bello-0.3.0/supervisor/task_select.py +81 -0
  35. bello-0.3.0/supervisor/tui.py +67 -0
  36. bello-0.3.0/supervisor/update_check.py +212 -0
  37. bello-0.3.0/supervisor/workspace_clean.py +80 -0
  38. bello-0.3.0/supervisor/workspace_snapshot.py +979 -0
  39. bello-0.3.0/tests/test_adversary_agent.py +401 -0
  40. bello-0.3.0/tests/test_approvals.py +1120 -0
  41. bello-0.3.0/tests/test_appserver.py +103 -0
  42. bello-0.3.0/tests/test_bello_state.py +6483 -0
  43. bello-0.3.0/tests/test_cli_entrypoint.py +29 -0
  44. bello-0.3.0/tests/test_cli_model_flags.py +466 -0
  45. bello-0.3.0/tests/test_cli_update.py +479 -0
  46. bello-0.3.0/tests/test_completion_knowledge.py +247 -0
  47. bello-0.3.0/tests/test_config_editor_render.py +619 -0
  48. bello-0.3.0/tests/test_doctor.py +134 -0
  49. bello-0.3.0/tests/test_policy.py +464 -0
  50. bello-0.3.0/tests/test_project_config.py +890 -0
  51. bello-0.3.0/tests/test_schemas.py +434 -0
  52. bello-0.3.0/tests/test_state_health.py +201 -0
  53. bello-0.3.0/tests/test_supervisor_agent.py +757 -0
  54. bello-0.3.0/tests/test_task_select.py +37 -0
  55. bello-0.3.0/tests/test_tui.py +32 -0
  56. bello-0.3.0/tests/test_update_check.py +217 -0
  57. bello-0.3.0/tests/test_workspace_clean.py +94 -0
  58. bello-0.3.0/tests/test_workspace_snapshot.py +767 -0
@@ -0,0 +1,498 @@
1
+ Metadata-Version: 2.4
2
+ Name: Bello
3
+ Version: 0.3.0
4
+ Summary: Terminal supervisor for autonomous Codex app-server runs
5
+ Author: Maxim Bocharov
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Makson179/Bello
8
+ Project-URL: Repository, https://github.com/Makson179/Bello
9
+ Project-URL: Issues, https://github.com/Makson179/Bello/issues
10
+ Requires-Python: >=3.11
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: click>=8.1
14
+ Requires-Dist: packaging>=24.0
15
+ Requires-Dist: pydantic>=2.0
16
+ Requires-Dist: prompt-toolkit>=3.0
17
+ Requires-Dist: wcwidth>=0.2
18
+ Provides-Extra: test
19
+ Requires-Dist: pytest>=8.0; extra == "test"
20
+ Requires-Dist: pytest-asyncio>=0.23; extra == "test"
21
+ Dynamic: license-file
22
+
23
+ <h1 align="center">Bello</h1>
24
+
25
+ <p align="center">
26
+ <strong>Simple setup, clear configuration, fully autonomous execution, and safety by design.</strong><br>
27
+ Assign the task and walk away. Bello keeps the coder inside a disposable
28
+ sandbox while an independent, fresh-context supervisor reviews risky actions,
29
+ catches drift, and manages recovery.<br>
30
+ Across three public ProgramBench tasks and three model-effort settings, Bello
31
+ outperformed Raw Codex in all 9 matched comparisons, increasing average
32
+ completion from 44.87% to 61.21%. It is ready to take on your most demanding
33
+ tasks.
34
+ </p>
35
+
36
+ <p align="center">
37
+ <a href="https://github.com/Makson179/Bello/actions/workflows/tests.yml"><img alt="Tests" src="https://github.com/Makson179/Bello/actions/workflows/tests.yml/badge.svg"></a>
38
+ <a href="https://www.python.org/downloads/"><img alt="Python 3.11+" src="https://img.shields.io/badge/python-3.11%2B-3776AB?style=flat-square&logo=python&logoColor=white"></a>
39
+ <a href="./LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-0F766E?style=flat-square"></a>
40
+ <img alt="Transport: Codex app-server JSON-RPC" src="https://img.shields.io/badge/transport-codex%20app--server-334155?style=flat-square">
41
+ <img alt="Approvals: fail closed" src="https://img.shields.io/badge/approvals-fail--closed-B91C1C?style=flat-square">
42
+ </p>
43
+
44
+ <p align="center">
45
+ <img src="./docs/assets/bello-readme-ambient.png" alt="Bello protective coding workspace" width="100%">
46
+ </p>
47
+
48
+ ---
49
+
50
+ # Motivation
51
+
52
+ Modern language models can write code, analyze documents, and solve complex problems, yet the model itself remains a generator of the next fragment of reasoning. When assigned a long, multi-stage task, it must simultaneously remember requirements, plan actions, execute them, assess its own progress, notice errors, and decide when the result can be considered complete.
53
+
54
+ Combining all these functions is unreliable. As the context grows, the model degrades very quickly and begins to hallucinate [[1]](https://aclanthology.org/2024.tacl-1.9/) [[2]](https://arxiv.org/abs/2404.06654) [[3]](https://aclanthology.org/2022.acl-long.229/) [[4]](https://aclanthology.org/2023.emnlp-main.397/). Compressing the history partly addresses the context-size problem, but it can lose a critical rule, decision, or prohibition. Meanwhile, a confident model response is not evidence that the task has actually been completed.
55
+
56
+ Bello moves the management of complex work to a level above the language model.
57
+
58
+ In our architecture, a single model is not expected to represent the entire thinking process. We treat a language model as a powerful but limited executor of cognitive operations. Planning the overall process, assigning roles, managing memory, evaluating effectiveness, and making the final decision about readiness should belong to a separate system.
59
+ Bello implements such a system: not a longer chain of reasoning from a single model, but a reproducible reasoning loop in which a solution is created, reviewed, attacked, corrected, and accepted only after independent confirmation.
60
+
61
+ ## Cognitive foundations
62
+
63
+ Bello's architecture draws on several foundational areas of cognitive psychology.
64
+
65
+ In [Allen Newell and Herbert Simon's heuristic search model](https://books.google.com/books?id=h03uAAAAMAAJ), problem solving is viewed as moving from the current state to a goal state through a sequence of operations and subproblems. A person compares the current state with the desired one, chooses an action that reduces the difference, evaluates the result, and restructures the search if the chosen strategy does not work.
66
+
67
+ [Barry Zimmerman's research on self-regulated learning](https://doi.org/10.1207/S15430421TIP4102_2) describes activity as a recurring cycle of forethought, performance, and self-reflection. The outcome of an evaluation does not end the process; it changes the plan for the next attempt.
68
+
69
+ [Research on metacognition by John Flavell](https://doi.org/10.1037/0003-066X.34.10.906), [Thomas Nelson, Louis Narens](https://doi.org/10.1016/S0079-7421%2808%2960053-5), and other authors distinguishes between performing a task and managing that performance. One level solves the task; another observes the work in progress, evaluates confidence and evidence, and decides whether to continue, verify, change strategy, or stop.
70
+
71
+ Similar patterns have also been found in research on writing. [Linda Flower and John Hayes's model](https://doi.org/10.2307/356600) describes writing not as a linear sequence of “plan — draft — edit,” but as a recursive interaction between planning, translating ideas into text, and reviewing. A problem discovered while reading may require more than a local edit: it may call for returning to the goal, structure, or original intent.
72
+
73
+ The common principle behind this work is that producing a result, monitoring the process, and evaluating it critically should not collapse into a single indistinguishable operation. Reliable reasoning requires cycles, specialized functions, and the ability to revisit earlier decisions.
74
+
75
+ Bello turns this structure into an executable system.
76
+
77
+ ## How Bello solves tasks
78
+
79
+ The process begins by building the first complete solution. The developer agent analyzes the task, modifies the project, runs checks, and creates a working prototype.
80
+
81
+ The result is then passed to **completion review**. This component does not continue development or take the author's report at face value. It independently reconstructs the task's mandatory requirements and checks:
82
+
83
+ * whether the required behavior has been implemented;
84
+ * whether the checks support the claimed result;
85
+ * whether any modes or edge cases remain untested;
86
+ * whether any regressions have been introduced;
87
+ * whether fresh validation was performed after the latest substantial changes.
88
+
89
+ If a problem is found, the work returns to the developer. After the fix, a new full review is performed because a local change may affect other parts of the system.
90
+
91
+ Once the solution has passed several development and review cycles, the **adversary** is launched. Its job is not to confirm the work, but to try to break it. It explores invalid inputs, unexpected action sequences, interactions between features, boundary states, and assumptions that the developer and reviewer may have overlooked.
92
+
93
+ The adversary works independently of the solution's development history. It evaluates the final artifact, not how convincing the author's explanation is. If it finds a potential defect, the solution is sent back to completion review, which determines whether the observed behavior is a genuine violation of the requirements.
94
+
95
+ Bello therefore implements the following cycle:
96
+
97
+ **build a solution → independently review completeness → fix defects → perform adversarial testing → reassess → accept the result.**
98
+
99
+ ## Why this structure is a natural fit for software development
100
+
101
+ Software development demonstrates the limitations of single-pass reasoning particularly well.
102
+
103
+ A programmer initially builds an implementation around the core functionality. Even a strong first version may fail to account for rare inputs, error recovery, compatibility, operation order, or interactions between multiple components. It is also difficult for authors to evaluate their own code independently: they know what they intended to implement and therefore tend to mentally fill in what the program does not actually contain.
104
+
105
+ Completion review corresponds to rigorous code review and acceptance auditing. It evaluates the implementation's compliance with the requirements, not the elegance of its explanation. Passing a handful of visible tests is not considered sufficient if they do not cover the full required behavior.
106
+
107
+ The adversary corresponds to fuzzing, property-based testing, penetration testing, red teaming, and the work of an independent quality engineer. It does not seek confirmation of the standard scenario; it looks for conditions under which the system violates its contract.
108
+
109
+ Bello tracks not only the quality of the final code, but also the effectiveness of the development process. If the agent repeats the same mistakes, ignores feedback, loses sight of the original goal, or becomes stuck in a flawed interpretation, the system can stop the current line of work, preserve confirmed facts, and start a new pass with a clean context.
110
+
111
+ This separates the accumulated knowledge about the task from an individual agent's unsuccessful reasoning trajectory.
112
+
113
+ ## The same structure in other forms of intellectual work
114
+
115
+ Similar cycles are used far beyond programming: in mathematics, scientific research, engineering, law, and strategic planning.
116
+
117
+ In all these fields, a reliable result emerges not from one long sequence of thoughts, but from the interaction between a creator, a reviewer, and a skeptic.
118
+
119
+ ## Relationship to existing LLM research
120
+
121
+ Individual parts of this approach have already been tested in language-model research.
122
+
123
+ [**Self-Refine**](https://arxiv.org/abs/2303.17651) showed that a cycle of generation, critique, and refinement can substantially outperform a single-pass response. [**Reflexion**](https://arxiv.org/abs/2303.11366) demonstrated the value of retaining lessons from previous attempts. [**CRITIC**](https://arxiv.org/abs/2305.11738) connected self-correction with external tools and observable evidence. [Research on self-debugging](https://arxiv.org/abs/2304.05128) confirmed that models can improve code by analyzing execution results. [Work on adversarial testing and verifier-guided search](https://arxiv.org/abs/2604.10449) showed that a separate verifier or attacker can detect seemingly correct solutions that pass conventional checks.
124
+
125
+ These findings support individual elements of Bello's architecture. Most of this work, however, studies a single mechanism: reflection, correction, verification, debate, test generation, or adversarial search.
126
+
127
+ Bello combines these mechanisms into a unified system for managing long-running work.
128
+
129
+ ## Results
130
+
131
+ ### Key findings
132
+
133
+ - Across all three tasks and model–effort settings, Bello achieved the higher
134
+ completion score in **9 of 9 matched configurations**. The overall unweighted
135
+ mean increased from **44.87% to 61.21%**: **+16.33 percentage points**
136
+ (+36.40% relative).
137
+ - With GPT-5.6 Sol, Bello achieved the higher completion score in **6 of 6
138
+ matched configurations**. The unweighted mean increased from **48.92% to
139
+ 67.04%**: **+18.13 percentage points** (+37.06% relative).
140
+ - In the complete GPT-5.6 Sol `ultra` comparison, every task improved by
141
+ **18.17–24.59 points**, and the macro average increased from **53.53% to 74.03%**.
142
+ - With GPT-5.5 `xhigh`, Bello scored higher on all three tasks; the macro
143
+ average increased from **36.79% to 49.53%**: **+12.74 percentage points**
144
+ (+34.64% relative).
145
+
146
+ ### Evaluation protocol
147
+
148
+ We evaluated Bello on three ProgramBench tasks: **Solar**, **Samtools**, and
149
+ **Rumdl**. Raw Codex and Bello were observed on every task with GPT-5.6 Sol in
150
+ both `ultra` and `xhigh` modes and with GPT-5.5 in `xhigh` mode. We report the
151
+ completion score recorded in the `completion_pct` field and time from the
152
+ `runtime` field of the [run-level data](./programbench_run_info.csv).
153
+ Completion scores are rounded to the nearest hundredth of a percentage point.
154
+ Runtime was not held constant, so the comparison is not compute matched.
155
+ The final solution patches for all nine reported Bello runs, together with
156
+ SHA-256 checksums, are available in the
157
+ [public evaluation artifacts folder](https://drive.google.com/drive/folders/1MSyxidKXeQz7DA0gKn6KJtcWmefFu2-D?usp=share_link).
158
+
159
+ ### GPT-5.6 Sol
160
+
161
+ #### `ultra`
162
+
163
+ | Task | Raw Codex completion | Bello completion | Difference (pp) | Relative change | Raw Codex time | Bello time |
164
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: |
165
+ | Solar | 53.13% | **71.30%** | **+18.17** | +34.20% | 00:32:33 | 07:39:17 |
166
+ | Samtools | 51.86% | **70.60%** | **+18.74** | +36.14% | 00:36:17 | 19:25:22 |
167
+ | Rumdl | 55.60% | **80.19%** | **+24.59** | +44.23% | 01:40:05 | 07:44:12 |
168
+ | **Macro mean / total time** | 53.53% | **74.03%** | **+20.50** | **+38.30%** | **02:48:55** | **34:48:51** |
169
+
170
+ *Bold completion values indicate the higher observed score within each matched
171
+ row.*
172
+
173
+ Across the three matched `ultra` runs, Bello increased completion by
174
+ 18.17–24.59 percentage points on every task. The unweighted macro average rose
175
+ from 53.53% to 74.03%, a gain of 20.50 points (38.30% relative).
176
+
177
+ ![GPT-5.6 Sol ultra completion-score differences](./docs/assets/programbench-5-6-ultra-matched-differences.svg)
178
+
179
+ *Figure 1a. Bello-minus-Raw completion differences for the three GPT-5.6 Sol
180
+ `ultra` configurations. Every point lies to the right of zero; the diamond
181
+ shows the unweighted mean difference (+20.50 points). Uncertainty intervals are
182
+ not shown because each configuration has one observation.*
183
+
184
+ #### `xhigh`
185
+
186
+ | Task | Raw Codex completion | Bello completion | Difference (pp) | Relative change | Raw Codex time | Bello time |
187
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: |
188
+ | Solar | 46.61% | **66.50%** | **+19.89** | +42.67% | 00:16:58 | 04:26:04 |
189
+ | Samtools | 38.11% | **51.93%** | **+13.82** | +36.26% | 00:28:48 | 05:39:13 |
190
+ | Rumdl | 48.19% | **61.74%** | **+13.55** | +28.12% | 00:31:57 | 03:53:35 |
191
+ | **Macro mean / total time** | 44.30% | **60.06%** | **+15.75** | **+35.56%** | **01:17:43** | **13:58:52** |
192
+
193
+ *Bold completion values indicate the higher observed score within each matched
194
+ row.*
195
+
196
+ All three `xhigh` tasks improved. The gains ranged from 13.55 to 19.89 percentage
197
+ points, and the unweighted macro average increased from 44.30% to 60.06%
198
+ (+15.75 points, +35.56% relative).
199
+
200
+ ![GPT-5.6 Sol xhigh completion-score differences](./docs/assets/programbench-5-6-xhigh-matched-differences.svg)
201
+
202
+ *Figure 1b. Bello-minus-Raw completion differences for the three GPT-5.6 Sol
203
+ `xhigh` configurations. Every point lies to the right of zero; the diamond
204
+ shows the unweighted mean difference (+15.75 points). Uncertainty intervals are
205
+ not shown because each configuration has one observation.*
206
+
207
+ ### GPT-5.5
208
+
209
+ #### `xhigh`
210
+
211
+ | Task | Raw Codex completion | Bello completion | Difference (pp) | Relative change | Raw Codex time | Bello time |
212
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: |
213
+ | Solar | 43.78% | **53.39%** | **+9.61** | +21.95% | 00:16:27 | 01:29:35 |
214
+ | Samtools | 20.28% | **44.21%** | **+23.93** | +118.00% | 00:16:28 | 02:30:01 |
215
+ | Rumdl | 46.30% | **50.99%** | **+4.69** | +10.13% | 00:26:03 | 03:30:01 |
216
+ | **Macro mean / total time** | 36.79% | **49.53%** | **+12.74** | **+34.64%** | **00:58:58** | **07:29:37** |
217
+
218
+ *Bold completion values indicate the higher observed score within each matched
219
+ row.*
220
+
221
+ Bello's score was higher on all three tasks. The task-level differences ranged
222
+ from 4.69 to 23.93 percentage points; the unweighted macro average increased
223
+ from 36.79% to 49.53%, a gain of 12.74 points (34.64% relative).
224
+
225
+ ### Cross-task completion summary
226
+
227
+ ![Cross-task completion scores for all three model–effort comparisons](./docs/assets/programbench-cross-task-completion.svg)
228
+
229
+ *Figure 2. Cross-task completion summary on a common 0–100% scale. Panels
230
+ (a), (b), and (c) show the matched GPT-5.6 Sol `ultra`, GPT-5.6 Sol `xhigh`,
231
+ and GPT-5.5 `xhigh` comparisons. The unweighted macro differences are +20.50,
232
+ +15.75, and +12.74 percentage points, respectively.*
233
+
234
+ ### Task-level configuration profiles
235
+
236
+ The following panels compare all three complete three-task configurations:
237
+ GPT-5.5 `xhigh`, GPT-5.6 Sol `xhigh`, and GPT-5.6 Sol `ultra`. Each panel
238
+ contains exactly six bars (Raw Codex and Bello for each model–effort setting),
239
+ ordered by increasing completion score. Bello precedes Raw Codex when scores
240
+ are tied. Ordering is descriptive and does not imply compute equivalence.
241
+
242
+ ![Solar configuration profile](./docs/assets/programbench-solar.svg)
243
+
244
+ *Figure 3a. Solar completion scores for the six model–effort configurations,
245
+ sorted from lowest to highest. The two formerly tied values are shown at their
246
+ available precision: Codex GPT-5.6 Sol `ultra` at 53.13% and Bello GPT-5.5
247
+ `xhigh` at 53.39%.*
248
+
249
+ ![Samtools configuration profile](./docs/assets/programbench-samtools.svg)
250
+
251
+ *Figure 3b. Samtools completion scores for the six model–effort
252
+ configurations, sorted from lowest to highest.*
253
+
254
+ ![Rumdl configuration profile](./docs/assets/programbench-rumdl.svg)
255
+
256
+ *Figure 3c. Rumdl completion scores for the six model–effort
257
+ configurations, sorted from lowest to highest.*
258
+
259
+ ### A shorter quality–efficiency balance
260
+
261
+ We also tested a shorter `C+A+C` schedule: it reached 63% completion on
262
+ Samtools and 79% on Rumdl. Each completion-review or adversary pass is designed
263
+ to find every material defect it can in the solution snapshot it receives, so
264
+ each successive pass tends to deliver a smaller quality gain at roughly the
265
+ same per-pass cost. The `C+A+C` results, together with an intermediate run in
266
+ which the first two completion reviews delivered roughly 80% of the eventual
267
+ improvement, support this diminishing-returns pattern. We therefore recommend
268
+ `C+A`—one completion review followed by one adversary pass—as the best balance
269
+ of quality, time, and cost. We expect it to retain about 60–70% of the full
270
+ schedule's quality gain: against the roughly 35% average relative improvement
271
+ observed above, that corresponds to an estimated gain of about 20% over Raw
272
+ Codex.
273
+
274
+ Time and cost remain limitations. We estimate that `C+A` takes approximately
275
+ 2.5× as long as Raw Codex and costs approximately 2.7× as much. The absolute
276
+ impact is much smaller than those multipliers suggest: in our observed `ultra`
277
+ runs, Raw Codex used about 0.2–0.3% of a weekly usage limit on a substantial
278
+ task, while `C+A+C` used at most about 1.2%. In economic terms, the
279
+ share of the available budget matters alongside the relative increase: tripling
280
+ a negligible expense is less noticeable than a 5% increase in something that
281
+ already consumes half the budget. We are actively working to reduce both
282
+ runtime and cost without giving up the quality improvement.
283
+
284
+ ## Requirements
285
+
286
+ - **Codex CLI** installed and authenticated (Bello drives
287
+ `codex app-server`; your Codex account provides the models).
288
+ - **Python 3.11+** and **git**.
289
+ - macOS or Linux.
290
+
291
+ Verify your environment at any time with `bello doctor`.
292
+
293
+ ## Install
294
+
295
+ **Option A: Codex plugin** (recommended if you work inside Codex):
296
+
297
+ ```bash
298
+ pipx install bello
299
+ codex plugin marketplace add AlexeyKulaev/Bello-codex-marketplace --ref main
300
+ codex plugin add bello@bello-marketplace
301
+ ```
302
+
303
+ Then open Codex in your project folder and ask it to run Bello on your task
304
+ file. The plugin checks for updates and launches the run for you.
305
+
306
+ **Option B: standalone CLI**
307
+
308
+ ```bash
309
+ pipx install bello
310
+ bello doctor
311
+ ```
312
+
313
+ Bello checks for updates at startup and offers to install them; run
314
+ `bello update` to update explicitly.
315
+
316
+ ## Quick start
317
+
318
+ ```bash
319
+ cd your-project
320
+ echo "Build a CLI tool that ..." > task.md
321
+ bello --task task.md
322
+ ```
323
+
324
+ That's it. Bello starts the coder, supervises the run, and writes
325
+ `.supervisor/FINAL_REPORT.md` when it finishes: status, changed files,
326
+ validations that were run, and remaining risks.
327
+
328
+ While a run is active you can type into the terminal; your message is routed
329
+ to the supervisor, not the coder:
330
+
331
+ | Control | Action |
332
+ | --- | --- |
333
+ | `/status` | Show task, generation, active turn, pending approvals, health. |
334
+ | `/pause` / `/resume` | Pause and resume the autonomous loop. |
335
+ | `/restart` | Request a supervised restart. |
336
+ | `/quit` | Write state and exit. |
337
+ | any text | Delivered to the supervisor as an instruction or constraint. |
338
+
339
+ Everything the run does is written to inspectable files under `.supervisor/`
340
+ in your project: `PROGRESS.md` (what has happened), `DECISIONS.md` (standing
341
+ decisions), `HANDOFF.md` (restart context), `events.jsonl` (full event
342
+ stream), and `FINAL_REPORT.md` (the result).
343
+
344
+ ## Run modes
345
+
346
+ Bello is built for walk-away execution. In both primary modes, the coder works
347
+ inside a disposable, network-isolated snapshot rather than directly in your
348
+ live project. A fresh-context runtime supervisor evaluates risky or
349
+ out-of-sandbox actions, catches drift, and manages recovery; unsupported
350
+ requests and supervisor failures fail closed. Only an accepted, policy-checked
351
+ patch is transferred back to the project.
352
+
353
+ The modes differ in what happens after the coder reports validated readiness.
354
+
355
+ ### Everyday (default)
356
+
357
+ Everyday is for short and medium tasks. A fresh project uses GPT-5.6 Sol at
358
+ `xhigh` for both the coder and full runtime supervisor, with Luna handling
359
+ routine cheap runtime triage. Completion review and the adversary are off.
360
+
361
+ ```bash
362
+ bello --task task.md
363
+ ```
364
+
365
+ The run finishes once the coder's readiness passes Bello's required
366
+ validation gates. Runtime supervision remains active throughout the run; only
367
+ the final review loop is skipped.
368
+
369
+ ### Deep Work
370
+
371
+ Deep Work is for long, demanding tasks with many details and edge cases, where
372
+ quality takes priority over time and cost. It adds an independent completion
373
+ reviewer and an adversarial tester, both GPT-5.6 Sol at `xhigh` by default.
374
+
375
+ The default Deep Work schedule is `C+A`:
376
+
377
+ - 1 completion-review round.
378
+ - 1 adversary pass in a disposable snapshot.
379
+ - No scheduled post-adversary review rounds.
380
+
381
+ If completion review returns a defect, the coder fixes it before the adversary
382
+ runs. If the adversary reports no candidate finding, the run completes. A
383
+ candidate adversary finding always receives one independent completion-review
384
+ adjudication so Bello can reject a false positive or return a real defect to
385
+ the coder; this conditional integrity check is not a scheduled `+C` phase.
386
+
387
+ To enable Deep Work, run `bello config`, set `completion-review` to `true`,
388
+ then set `adversary` to `true`. The revealed schedule values default to `1`, `1`,
389
+ and `0`: one completion-review return budget before one adversary pass, with no
390
+ scheduled post-adversary review rounds. For a single run without rewriting the
391
+ saved config:
392
+
393
+ ```bash
394
+ bello --task task.md --completion-review=true --adversary=true
395
+ ```
396
+
397
+ ### Custom
398
+
399
+ For experiments, configure the coder, runtime supervisor, completion reviewer,
400
+ and adversary independently. Each role can use any available GPT-5.6 variant
401
+ and its own reasoning effort, and the review and adversary budgets can be
402
+ combined freely.
403
+
404
+ ## Configuration
405
+
406
+ Open the interactive editor from your project folder:
407
+
408
+ ```bash
409
+ bello config
410
+ ```
411
+
412
+ It creates and edits `.supervisor/config.json`. Every value is saved as you
413
+ press Enter; future runs in this folder use these settings automatically.
414
+
415
+ The editor starts in Everyday mode for a new project and only shows settings
416
+ that can affect the selected pipeline. Turning on `completion-review` reveals
417
+ the completion reviewer and review budget. Turning on `adversary` then reveals
418
+ the adversary model and the complete `C+A` schedule.
419
+
420
+ For each visible role, select GPT-5.6 and then choose Sol, Terra, or Luna in
421
+ the variant row. Sol and Terra support reasoning effort from `low` through
422
+ `ultra`; Luna supports `low` through `max`. Active primary roles default to
423
+ GPT-5.6 Sol at `xhigh`; cheap runtime triage uses Luna.
424
+
425
+ CLI flags override their corresponding saved settings for one run and never
426
+ rewrite the project config. Settings without a CLI flag, including cheap
427
+ runtime and review budgets, are changed through `bello config`.
428
+
429
+ | Setting | Default | What it does |
430
+ | --- | --- | --- |
431
+ | `task` | absent | Default task file for this folder. When set, plain `bello` runs it; `--task` always overrides. |
432
+ | `coder-mod` | GPT-5.6 | Model family for the coder thread. |
433
+ | `coder-5.6-variant` | Sol | GPT-5.6 variant for the coder: Sol, Terra, or Luna. |
434
+ | `coder-intelligence` | `xhigh` | Coder reasoning effort, limited by the selected variant. |
435
+ | `runtime-mod` | GPT-5.6 | Model family for fresh-context runtime checks, including risky-action judgment and drift detection. |
436
+ | `runtime-5.6-variant` | Sol | GPT-5.6 variant for the full runtime supervisor. |
437
+ | `runtime-intelligence` | `xhigh` | Full runtime supervisor reasoning effort. |
438
+ | `completion-mod` | GPT-5.6 | Model family for the independent read-only completion reviewer. Hidden in Everyday mode. |
439
+ | `completion-5.6-variant` | Sol | GPT-5.6 variant for completion review. Hidden in Everyday mode. |
440
+ | `completion-intelligence` | `xhigh` | Completion reviewer reasoning effort. Hidden in Everyday mode. |
441
+ | `adversary-mod` | GPT-5.6 | Adversarial tester model family. Visible only when the adversary is enabled. |
442
+ | `adversary-5.6-variant` | Sol | GPT-5.6 variant for the adversary. Visible only when the adversary is enabled. |
443
+ | `adversary-intelligence` | `xhigh` | Adversary reasoning effort. Visible only when the adversary is enabled. |
444
+ | `speed` | `usual` | `fast` uses the Codex Fast service tier for coder, runtime-supervisor, and completion-review turns. Adversary turns are unchanged. |
445
+ | `cheap-runtime` | `true` | Let Luna dismiss routine runtime checks before invoking the full runtime supervisor. Human messages, approvals, and mandatory checks bypass triage. |
446
+ | `start-over` | `true` | `true` removes prior Bello logs, archived runs, and recovery data; `false` preserves them. Both start fresh active state and leave project files unchanged. |
447
+ | `completion-review` | `false` | `false` is Everyday. `true` enables the independent completion-review loop and reveals its settings. |
448
+ | `adversary` | `false` | Enable the adversarial tester before completion. Requires completion review. |
449
+ | `max-reviews` / `max-reviews-before-adversary` | `1` | Completion-return budget. Without an adversary it is shown as `max-reviews`; with an adversary it limits returns before the first pass. An earlier accept starts the adversary immediately. `0` skips these rounds; `Unlimited` removes the cap. |
450
+ | `max-adversary-runs` | `1` | Maximum adversary passes in Deep Work. `0` disables the adversary. |
451
+ | `max-reviews-after-adversary` | `0` | Maximum additional completion-review rounds after each adversary pass. At the limit Bello starts the next pass or completes after the final one. `0` schedules none; `Unlimited` removes the cap. A candidate adversary finding is still adjudicated once. |
452
+ | `clean` | `false` | **Warning:** deletes **everything** in the folder except the task file and configured protected paths before starting. Only for disposable folders where you want a from-scratch build. |
453
+ | `protected-path` | absent | Paths the coder must never write to, such as golden tests, fixtures, or production configs. They are also preserved by `clean`. |
454
+
455
+ ## Command reference
456
+
457
+ ```bash
458
+ bello # run the configured task in the current folder
459
+ bello --task TASK.md # run a specific task file
460
+ bello config # open the interactive config editor
461
+ bello doctor # check Python, git, Codex, auth, app-server support
462
+ bello update # update Bello to the latest version
463
+ bello update --check --json # machine-readable update status
464
+ bello --version # installed version, latest version, update status
465
+ ```
466
+
467
+ Run flags (each overrides the saved config for one run):
468
+
469
+ | Flag | Meaning |
470
+ | --- | --- |
471
+ | `--task PATH` | Task file to run. |
472
+ | `--coder-mod M` | Coder model. |
473
+ | `--runtime-mod M` | Runtime supervisor model. |
474
+ | `--completion-mod M` | Completion reviewer model. |
475
+ | `--adversary-mod M` | Adversarial tester model. |
476
+ | `--coder-intelligence V` | Coder reasoning effort. |
477
+ | `--runtime-intelligence V` | Runtime supervisor reasoning effort. |
478
+ | `--completion-intelligence V` | Completion reviewer reasoning effort. |
479
+ | `--adversary-intelligence V` | Adversarial tester reasoning effort. |
480
+ | <code>--fast[=true&#124;false]</code> | Codex Fast service tier. |
481
+ | <code>--start-over[=true&#124;false]</code> | Fresh `.supervisor/` state. |
482
+ | <code>--completion-review[=true&#124;false]</code> | Completion-review loop on/off (`false` = Everyday and disables the adversary). |
483
+ | <code>--adversary[=true&#124;false]</code> | Adversarial tester on/off. |
484
+ | `--adversary-runs N` | Adversary pass budget; `0` disables. |
485
+ | <code>--clean[=true&#124;false]</code> | **Warning:** wipe the folder except the task file and protected paths before starting. |
486
+ | `--protected-path PATH` | Protect a path from writes; repeat for multiple paths. |
487
+
488
+ Environment variables: `BELLO_SKIP_UPDATE_CHECK=1` skips the startup update
489
+ check; `BELLO_PROMPTS_FILE=/path/to/prompts.toml` points Bello at an
490
+ alternative prompt file for experiments; `BELLO_CONFIG_ANIMATIONS=0`
491
+ disables motion in the interactive config editor.
492
+
493
+ ## License
494
+
495
+ Bello is released under the MIT License. See [LICENSE](./LICENSE).
496
+
497
+ Contributions require signing the project [CLA](./CLA.md); a bot will prompt
498
+ you on your first pull request, and you only sign once.
@@ -0,0 +1,56 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ Bello.egg-info/PKG-INFO
5
+ Bello.egg-info/SOURCES.txt
6
+ Bello.egg-info/dependency_links.txt
7
+ Bello.egg-info/entry_points.txt
8
+ Bello.egg-info/requires.txt
9
+ Bello.egg-info/top_level.txt
10
+ supervisor/__init__.py
11
+ supervisor/_build.py
12
+ supervisor/adversary_agent.py
13
+ supervisor/approval_triage.py
14
+ supervisor/approvals.py
15
+ supervisor/appserver.py
16
+ supervisor/coder.py
17
+ supervisor/config_editor.py
18
+ supervisor/controller.py
19
+ supervisor/doctor.py
20
+ supervisor/health.py
21
+ supervisor/main.py
22
+ supervisor/policy.py
23
+ supervisor/project_config.py
24
+ supervisor/review_limits.py
25
+ supervisor/state.py
26
+ supervisor/supervisor_agent.py
27
+ supervisor/task_select.py
28
+ supervisor/tui.py
29
+ supervisor/update_check.py
30
+ supervisor/workspace_clean.py
31
+ supervisor/workspace_snapshot.py
32
+ supervisor/prompts/__init__.py
33
+ supervisor/prompts/prompts.toml
34
+ supervisor/prompts/supervisor.py
35
+ supervisor/schemas/__init__.py
36
+ supervisor/schemas/models.py
37
+ tests/test_adversary_agent.py
38
+ tests/test_approvals.py
39
+ tests/test_appserver.py
40
+ tests/test_bello_state.py
41
+ tests/test_cli_entrypoint.py
42
+ tests/test_cli_model_flags.py
43
+ tests/test_cli_update.py
44
+ tests/test_completion_knowledge.py
45
+ tests/test_config_editor_render.py
46
+ tests/test_doctor.py
47
+ tests/test_policy.py
48
+ tests/test_project_config.py
49
+ tests/test_schemas.py
50
+ tests/test_state_health.py
51
+ tests/test_supervisor_agent.py
52
+ tests/test_task_select.py
53
+ tests/test_tui.py
54
+ tests/test_update_check.py
55
+ tests/test_workspace_clean.py
56
+ tests/test_workspace_snapshot.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ bello = supervisor.main:cli
@@ -0,0 +1,9 @@
1
+ click>=8.1
2
+ packaging>=24.0
3
+ pydantic>=2.0
4
+ prompt-toolkit>=3.0
5
+ wcwidth>=0.2
6
+
7
+ [test]
8
+ pytest>=8.0
9
+ pytest-asyncio>=0.23
@@ -0,0 +1 @@
1
+ supervisor
bello-0.3.0/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Maksim Bocharov, Alexey Kulaev
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+