ossa 0.1.0a1__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 (79) hide show
  1. ossa-0.1.0a1/LICENSE +202 -0
  2. ossa-0.1.0a1/PKG-INFO +212 -0
  3. ossa-0.1.0a1/README.md +178 -0
  4. ossa-0.1.0a1/pyproject.toml +56 -0
  5. ossa-0.1.0a1/setup.cfg +4 -0
  6. ossa-0.1.0a1/src/ossa/__init__.py +2 -0
  7. ossa-0.1.0a1/src/ossa/arena.py +591 -0
  8. ossa-0.1.0a1/src/ossa/audit.py +114 -0
  9. ossa-0.1.0a1/src/ossa/breaker.py +341 -0
  10. ossa-0.1.0a1/src/ossa/card.py +86 -0
  11. ossa-0.1.0a1/src/ossa/cli.py +852 -0
  12. ossa-0.1.0a1/src/ossa/config.py +170 -0
  13. ossa-0.1.0a1/src/ossa/context.py +43 -0
  14. ossa-0.1.0a1/src/ossa/dash.py +324 -0
  15. ossa-0.1.0a1/src/ossa/data/contribute.yml +135 -0
  16. ossa-0.1.0a1/src/ossa/data/optout.txt +4 -0
  17. ossa-0.1.0a1/src/ossa/diffpolicy.py +141 -0
  18. ossa-0.1.0a1/src/ossa/gh.py +1086 -0
  19. ossa-0.1.0a1/src/ossa/gitops.py +228 -0
  20. ossa-0.1.0a1/src/ossa/history.py +118 -0
  21. ossa-0.1.0a1/src/ossa/hunt.py +199 -0
  22. ossa-0.1.0a1/src/ossa/janitor.py +379 -0
  23. ossa-0.1.0a1/src/ossa/linked.py +154 -0
  24. ossa-0.1.0a1/src/ossa/platforms.py +36 -0
  25. ossa-0.1.0a1/src/ossa/policy.py +408 -0
  26. ossa-0.1.0a1/src/ossa/rank.py +127 -0
  27. ossa-0.1.0a1/src/ossa/replay.py +202 -0
  28. ossa-0.1.0a1/src/ossa/sandbox.py +282 -0
  29. ossa-0.1.0a1/src/ossa/schemas.py +301 -0
  30. ossa-0.1.0a1/src/ossa/stages/__init__.py +0 -0
  31. ossa-0.1.0a1/src/ossa/stages/_b_helpers.py +123 -0
  32. ossa-0.1.0a1/src/ossa/stages/s00_scout.py +328 -0
  33. ossa-0.1.0a1/src/ossa/stages/s01_assess.py +400 -0
  34. ossa-0.1.0a1/src/ossa/stages/s02_pick_issue.py +211 -0
  35. ossa-0.1.0a1/src/ossa/stages/s03_workspace.py +179 -0
  36. ossa-0.1.0a1/src/ossa/stages/s06_reproduce.py +94 -0
  37. ossa-0.1.0a1/src/ossa/stages/s07_claim.py +124 -0
  38. ossa-0.1.0a1/src/ossa/stages/s08_fix.py +107 -0
  39. ossa-0.1.0a1/src/ossa/stages/s13_closeout.py +106 -0
  40. ossa-0.1.0a1/src/ossa/starhistory.py +85 -0
  41. ossa-0.1.0a1/src/ossa/store.py +359 -0
  42. ossa-0.1.0a1/src/ossa/testparse.py +154 -0
  43. ossa-0.1.0a1/src/ossa/toolbox.py +1016 -0
  44. ossa-0.1.0a1/src/ossa/trust.py +138 -0
  45. ossa-0.1.0a1/src/ossa/verify.py +205 -0
  46. ossa-0.1.0a1/src/ossa/workspace.py +279 -0
  47. ossa-0.1.0a1/src/ossa.egg-info/PKG-INFO +212 -0
  48. ossa-0.1.0a1/src/ossa.egg-info/SOURCES.txt +77 -0
  49. ossa-0.1.0a1/src/ossa.egg-info/dependency_links.txt +1 -0
  50. ossa-0.1.0a1/src/ossa.egg-info/entry_points.txt +2 -0
  51. ossa-0.1.0a1/src/ossa.egg-info/requires.txt +7 -0
  52. ossa-0.1.0a1/src/ossa.egg-info/top_level.txt +1 -0
  53. ossa-0.1.0a1/tests/test_arena.py +238 -0
  54. ossa-0.1.0a1/tests/test_breaker.py +216 -0
  55. ossa-0.1.0a1/tests/test_cli.py +253 -0
  56. ossa-0.1.0a1/tests/test_dash.py +89 -0
  57. ossa-0.1.0a1/tests/test_diffpolicy.py +59 -0
  58. ossa-0.1.0a1/tests/test_gh.py +536 -0
  59. ossa-0.1.0a1/tests/test_gitops.py +130 -0
  60. ossa-0.1.0a1/tests/test_guard.py +355 -0
  61. ossa-0.1.0a1/tests/test_history.py +60 -0
  62. ossa-0.1.0a1/tests/test_hunt.py +127 -0
  63. ossa-0.1.0a1/tests/test_janitor.py +201 -0
  64. ossa-0.1.0a1/tests/test_linked.py +79 -0
  65. ossa-0.1.0a1/tests/test_platforms.py +84 -0
  66. ossa-0.1.0a1/tests/test_policy.py +232 -0
  67. ossa-0.1.0a1/tests/test_rank.py +90 -0
  68. ossa-0.1.0a1/tests/test_release.py +59 -0
  69. ossa-0.1.0a1/tests/test_replay.py +133 -0
  70. ossa-0.1.0a1/tests/test_sandbox.py +194 -0
  71. ossa-0.1.0a1/tests/test_showcase.py +76 -0
  72. ossa-0.1.0a1/tests/test_stages_a.py +449 -0
  73. ossa-0.1.0a1/tests/test_stages_b.py +93 -0
  74. ossa-0.1.0a1/tests/test_starhistory.py +62 -0
  75. ossa-0.1.0a1/tests/test_testparse.py +103 -0
  76. ossa-0.1.0a1/tests/test_toolbox.py +423 -0
  77. ossa-0.1.0a1/tests/test_trust.py +94 -0
  78. ossa-0.1.0a1/tests/test_verify.py +177 -0
  79. ossa-0.1.0a1/tests/test_workspace.py +77 -0
ossa-0.1.0a1/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
ossa-0.1.0a1/PKG-INFO ADDED
@@ -0,0 +1,212 @@
1
+ Metadata-Version: 2.4
2
+ Name: ossa
3
+ Version: 0.1.0a1
4
+ Summary: OSSA toolbox: the deterministic half of a safety-first open-source contribution crew that runs on Claude Code.
5
+ Author: Rahul Seervi
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/Rahul-cs50/ossa
8
+ Project-URL: Repository, https://github.com/Rahul-cs50/ossa
9
+ Project-URL: Issues, https://github.com/Rahul-cs50/ossa/issues
10
+ Project-URL: Safety, https://github.com/Rahul-cs50/ossa/blob/main/SAFETY.md
11
+ Keywords: open-source,contributions,claude-code,sandbox,safety,pull-requests
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Software Development
23
+ Classifier: Topic :: Software Development :: Quality Assurance
24
+ Requires-Python: >=3.11
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: httpx>=0.27
28
+ Requires-Dist: pydantic>=2.6
29
+ Requires-Dist: typer>=0.12
30
+ Requires-Dist: rich>=13.7
31
+ Provides-Extra: dev
32
+ Requires-Dist: pytest>=8; extra == "dev"
33
+ Dynamic: license-file
34
+
35
+ # OSSA
36
+
37
+ **Your open-source crew. Runs on Claude Code.**
38
+
39
+ OSSA is a small crew that contributes to open-source projects with you. It finds issues worth your
40
+ time, reproduces the bug, fixes it, tries hard to break its own fix, and drafts the PR in the
41
+ project's own style. Nothing reaches GitHub until you have read it and approved it in your own words.
42
+
43
+ It is built for maintainers' trust first: repos that don't want AI help are skipped, AI help is
44
+ always disclosed, volume stays low, and every PR comes with evidence a maintainer can check.
45
+
46
+ > Pre-release. The plugin, the toolbox and this README are still moving.
47
+
48
+ ## The crew
49
+
50
+ | | Job |
51
+ |---|---|
52
+ | **Captain** | the one you talk to; plans and hands out the work |
53
+ | **Scout** | finds repos and issues, reads each repo's rules and its last 10 merged outside PRs |
54
+ | **Sherlock** | builds a sandbox and reproduces the bug with a failing test |
55
+ | **Patch** | writes the minimal fix and its regression test |
56
+ | **Breaker** | tries to break the fix with tests that run, without seeing Patch's reasoning |
57
+ | **Judge** | settles disputes between Patch and Breaker, on evidence |
58
+ | **Scribe** | writes the commit, the PR in the repo's template, and the evidence pack |
59
+
60
+ ## Install
61
+
62
+ You need [Claude Code](https://claude.com/claude-code), git, Docker and Python 3.11+, on Linux, macOS, or
63
+ Windows through WSL2 (below).
64
+
65
+ ```sh
66
+ curl -fsSL https://raw.githubusercontent.com/Rahul-cs50/ossa/main/install.sh | sh
67
+ ```
68
+
69
+ The installer checks those, installs the `ossa` toolbox with `uv`, and runs `ossa init`, which asks
70
+ five questions and makes your workspace (`~/ossa`). The OSSA plugin is switched on in that folder
71
+ only; your other Claude Code sessions are never touched.
72
+
73
+ Or by hand:
74
+
75
+ ```sh
76
+ uv tool install ossa # the toolbox
77
+ ossa init --marketplace Rahul-cs50/ossa # workspace + plugin
78
+ ossa doctor # checks everything
79
+ ```
80
+
81
+ ### Windows
82
+
83
+ OSSA runs on Windows inside WSL2, the Linux that comes with Windows 10 and 11:
84
+
85
+ 1. In PowerShell, run `wsl --install` and restart. That installs Ubuntu.
86
+ 2. Open **Ubuntu** from the Start menu. Everything below happens there.
87
+ 3. Install Claude Code inside Ubuntu. A copy installed in Windows doesn't count: OSSA's safety hooks have
88
+ to run in Linux.
89
+ 4. For Docker, turn on Docker Desktop's *Settings → Resources → WSL integration* for Ubuntu, or install
90
+ Docker Engine inside Ubuntu.
91
+ 5. Run the install line above. Keep the workspace in your Linux home (the default, `~/ossa`), not under
92
+ `/mnt/c`, which is slow and ignores letter case.
93
+
94
+ `ossa doctor` checks each of these. Run in Windows itself, `ossa` and the installer only print these steps.
95
+ WSL has no system keychain, so `ossa init` keeps your GitHub token in `~/.config/ossa/token`, a file only
96
+ you can read; the crew can't open it.
97
+
98
+ ## Use
99
+
100
+ ```sh
101
+ ossa wake # start the crew (Claude Code in ~/ossa, with the Captain)
102
+ ```
103
+
104
+ Then talk to the Captain: "find something to fix in a Python project", "what's waiting for me?".
105
+ When a PR is ready, the Captain tells you. You review and decide in your own terminal:
106
+
107
+ ```sh
108
+ ossa approve # read each card; approve in your own words, ask for changes, or reject
109
+ ossa status # your level, caps, open PRs and what waits for you
110
+ ```
111
+
112
+ The card fits what you need to decide on one screen: what broke, the evidence (the reproduction,
113
+ the tests, Breaker's attacks), the repo's rules, the PR text exactly as it will go out, and the diff.
114
+
115
+ <img src="docs/demo/card.svg" alt="The approval card for a sample fix: what broke, the evidence, the repo's rules, the PR text, the commit message and the diff" width="720">
116
+
117
+ *The pictures here are OSSA's real screens, drawn from sample data about a made-up repo
118
+ (`scripts/demo.py`).*
119
+
120
+ ### Your commands
121
+
122
+ | Command | What |
123
+ |---|---|
124
+ | `ossa wake` | start the crew |
125
+ | `ossa approve [attempt]` | review queued PRs; approve, ask for changes, or reject |
126
+ | `ossa claim <attempt>` | post a claim comment the crew drafted, for repos that assign issues first |
127
+ | `ossa allow <repo> --why ...` | after reading the quote yourself: lift an AI-ban match or a CLA block |
128
+ | `ossa sleep [--hours N]` | stop the crew in every session in the workspace until `ossa wake` (or N hours) |
129
+ | `ossa status`, `ossa doctor`, `ossa gc` | standing and what happened while you were away, health check, cleanup |
130
+
131
+ The crew's own commands (`ossa repos`, `policy`, `issues`, `start`, `env`, `test`, `repro`,
132
+ `verify`, `risk`, `attack`, `duel`, `queue`, ...) print JSON for Claude; you rarely need them.
133
+
134
+ ### The crew pane
135
+
136
+ In your workspace, a pane beside the chat shows who in the crew is on shift and what they're doing,
137
+ your 5-hour and 7-day quota, the PRs waiting for you and your level: 😴 when a usage limit stopped
138
+ the crew (until the reset), 💤 while you have it on `ossa sleep`, 💦 while tests run in the sandbox,
139
+ 🪧 when something needs you. It is the `ossa-pet` plugin, installed beside `ossa`, and it only reads
140
+ files: it never writes one or uses the network. It interrupts you only when you're needed: a toast
141
+ when a new PR starts waiting for you.
142
+
143
+ <img src="docs/demo/pane.svg" alt="The crew pane: who is on shift, your level, quota bars, the PR waiting for you, and what happened while you were away" width="560">
144
+
145
+ **While you were away.** `ossa wake` and `ossa status` show what the ledger recorded since you last
146
+ looked: PRs ready for you, fixes the crew dropped and why, PRs opened, merged or closed, new maintainer
147
+ comments, usage-limit stops. The pane and the Captain show the same list. It comes from the ledger,
148
+ not from the crew's own account of its work. In background mode each run's summary on GitHub carries
149
+ it too (`ossa away --md`).
150
+
151
+ <img src="docs/demo/status.svg" alt="ossa status with sample data: level, the PR waiting for you, open PRs, caps, and while you were away" width="720">
152
+
153
+ Rename the crew in `ossa.toml` (`[crew]`, e.g. `breaker = "Bruno"`). Instant commands, no model call:
154
+
155
+ | In Claude Code | What |
156
+ |---|---|
157
+ | `/ossa` | open the pane |
158
+ | `/ossa status` | the same, as text |
159
+ | `/ossa pause`, `/ossa resume` | hold the crew's next `ossa` step or crew agent, then let it go on |
160
+
161
+ `/ossa pause` holds one session. `ossa sleep`, in your own terminal, stops the crew everywhere in the
162
+ workspace, headless sessions included: until `ossa wake`, its next `ossa` step and every file write are
163
+ refused. When the crew stops on a usage limit, OSSA notes when it resets (`runs/limit.json`), and
164
+ `ossa status` says when the crew can go on.
165
+
166
+ ## Safety
167
+
168
+ The short version: the crew can't publish, can't run repository code outside a sandbox, can't touch
169
+ your credentials, and can't skip a repo's rules; you approve every PR in your own words. Every
170
+ guarantee, how it is enforced, and the known limits are in [SAFETY.md](SAFETY.md). Found a way around
171
+ one? Report it privately: [SECURITY.md](SECURITY.md).
172
+
173
+ ## How OSSA is tested
174
+
175
+ | What | How | Run it |
176
+ |---|---|---|
177
+ | The toolbox and the guard | 400+ tests, no network, Docker, token or model needed | `pytest -q` |
178
+ | The crew under pressure | red-team evals: injected instructions in an issue and in a CONTRIBUTING.md, an AI-banning repo, requests to mass-open PRs, hide AI help, use an alternate account, post a security hole, run your own steps, or work while you have the crew asleep | `claude plugin eval plugin --scaffold --allow-tools Write Edit` |
179
+ | Reading real AI policies | 19 real projects' policies against a careful human reading (18 agree; see SAFETY.md) | `python scripts/policy_corpus.py` |
180
+ | A first install | install.sh and the five `ossa init` questions at a real terminal, on a clean Linux container and on macOS in CI | `sh scripts/install_test_docker.sh` |
181
+ | The crew pane | it only reads files: `claude plugin validate pet` lists every call it makes | `claude plugin test pet` |
182
+
183
+ ## Levels
184
+
185
+ Trust is the currency. You earn XP for outcomes maintainers decide (a merge is +100, an approving
186
+ review +30, feedback addressed +20, a weak fix stopped before it went out +10; a PR closed unmerged
187
+ is -50), never for PRs opened. Levels raise your caps, from 1 open PR as a newcomer to 8 as a veteran.
188
+
189
+ ## For maintainers
190
+
191
+ Don't want OSSA contributions? Add this line to your AGENTS.md or CONTRIBUTING.md:
192
+
193
+ ```
194
+ ossa: opt-out
195
+ ```
196
+
197
+ or open a PR adding your repo to [`src/ossa/data/optout.txt`](src/ossa/data/optout.txt). Every OSSA
198
+ user's crew checks both before any work, and nobody can override them. If you have an AI policy,
199
+ OSSA reads it: clear bans stop the crew, and disclosure rules are followed word for word. What an
200
+ OSSA PR looks like, and how to tell us when one wasted your time: [docs/maintainers.md](docs/maintainers.md).
201
+
202
+ ## Development
203
+
204
+ ```sh
205
+ uv venv && uv pip install -e '.[dev]'
206
+ .venv/bin/pytest -q # no network, Docker, token or LLM needed
207
+ claude plugin validate plugin # the plugin
208
+ claude --plugin-dir plugin # try it from a workspace folder holding ossa.toml
209
+ sh scripts/release_check.sh # build and check the package as PyPI will
210
+ ```
211
+
212
+ Releases: [RELEASING.md](RELEASING.md).
ossa-0.1.0a1/README.md ADDED
@@ -0,0 +1,178 @@
1
+ # OSSA
2
+
3
+ **Your open-source crew. Runs on Claude Code.**
4
+
5
+ OSSA is a small crew that contributes to open-source projects with you. It finds issues worth your
6
+ time, reproduces the bug, fixes it, tries hard to break its own fix, and drafts the PR in the
7
+ project's own style. Nothing reaches GitHub until you have read it and approved it in your own words.
8
+
9
+ It is built for maintainers' trust first: repos that don't want AI help are skipped, AI help is
10
+ always disclosed, volume stays low, and every PR comes with evidence a maintainer can check.
11
+
12
+ > Pre-release. The plugin, the toolbox and this README are still moving.
13
+
14
+ ## The crew
15
+
16
+ | | Job |
17
+ |---|---|
18
+ | **Captain** | the one you talk to; plans and hands out the work |
19
+ | **Scout** | finds repos and issues, reads each repo's rules and its last 10 merged outside PRs |
20
+ | **Sherlock** | builds a sandbox and reproduces the bug with a failing test |
21
+ | **Patch** | writes the minimal fix and its regression test |
22
+ | **Breaker** | tries to break the fix with tests that run, without seeing Patch's reasoning |
23
+ | **Judge** | settles disputes between Patch and Breaker, on evidence |
24
+ | **Scribe** | writes the commit, the PR in the repo's template, and the evidence pack |
25
+
26
+ ## Install
27
+
28
+ You need [Claude Code](https://claude.com/claude-code), git, Docker and Python 3.11+, on Linux, macOS, or
29
+ Windows through WSL2 (below).
30
+
31
+ ```sh
32
+ curl -fsSL https://raw.githubusercontent.com/Rahul-cs50/ossa/main/install.sh | sh
33
+ ```
34
+
35
+ The installer checks those, installs the `ossa` toolbox with `uv`, and runs `ossa init`, which asks
36
+ five questions and makes your workspace (`~/ossa`). The OSSA plugin is switched on in that folder
37
+ only; your other Claude Code sessions are never touched.
38
+
39
+ Or by hand:
40
+
41
+ ```sh
42
+ uv tool install ossa # the toolbox
43
+ ossa init --marketplace Rahul-cs50/ossa # workspace + plugin
44
+ ossa doctor # checks everything
45
+ ```
46
+
47
+ ### Windows
48
+
49
+ OSSA runs on Windows inside WSL2, the Linux that comes with Windows 10 and 11:
50
+
51
+ 1. In PowerShell, run `wsl --install` and restart. That installs Ubuntu.
52
+ 2. Open **Ubuntu** from the Start menu. Everything below happens there.
53
+ 3. Install Claude Code inside Ubuntu. A copy installed in Windows doesn't count: OSSA's safety hooks have
54
+ to run in Linux.
55
+ 4. For Docker, turn on Docker Desktop's *Settings → Resources → WSL integration* for Ubuntu, or install
56
+ Docker Engine inside Ubuntu.
57
+ 5. Run the install line above. Keep the workspace in your Linux home (the default, `~/ossa`), not under
58
+ `/mnt/c`, which is slow and ignores letter case.
59
+
60
+ `ossa doctor` checks each of these. Run in Windows itself, `ossa` and the installer only print these steps.
61
+ WSL has no system keychain, so `ossa init` keeps your GitHub token in `~/.config/ossa/token`, a file only
62
+ you can read; the crew can't open it.
63
+
64
+ ## Use
65
+
66
+ ```sh
67
+ ossa wake # start the crew (Claude Code in ~/ossa, with the Captain)
68
+ ```
69
+
70
+ Then talk to the Captain: "find something to fix in a Python project", "what's waiting for me?".
71
+ When a PR is ready, the Captain tells you. You review and decide in your own terminal:
72
+
73
+ ```sh
74
+ ossa approve # read each card; approve in your own words, ask for changes, or reject
75
+ ossa status # your level, caps, open PRs and what waits for you
76
+ ```
77
+
78
+ The card fits what you need to decide on one screen: what broke, the evidence (the reproduction,
79
+ the tests, Breaker's attacks), the repo's rules, the PR text exactly as it will go out, and the diff.
80
+
81
+ <img src="docs/demo/card.svg" alt="The approval card for a sample fix: what broke, the evidence, the repo's rules, the PR text, the commit message and the diff" width="720">
82
+
83
+ *The pictures here are OSSA's real screens, drawn from sample data about a made-up repo
84
+ (`scripts/demo.py`).*
85
+
86
+ ### Your commands
87
+
88
+ | Command | What |
89
+ |---|---|
90
+ | `ossa wake` | start the crew |
91
+ | `ossa approve [attempt]` | review queued PRs; approve, ask for changes, or reject |
92
+ | `ossa claim <attempt>` | post a claim comment the crew drafted, for repos that assign issues first |
93
+ | `ossa allow <repo> --why ...` | after reading the quote yourself: lift an AI-ban match or a CLA block |
94
+ | `ossa sleep [--hours N]` | stop the crew in every session in the workspace until `ossa wake` (or N hours) |
95
+ | `ossa status`, `ossa doctor`, `ossa gc` | standing and what happened while you were away, health check, cleanup |
96
+
97
+ The crew's own commands (`ossa repos`, `policy`, `issues`, `start`, `env`, `test`, `repro`,
98
+ `verify`, `risk`, `attack`, `duel`, `queue`, ...) print JSON for Claude; you rarely need them.
99
+
100
+ ### The crew pane
101
+
102
+ In your workspace, a pane beside the chat shows who in the crew is on shift and what they're doing,
103
+ your 5-hour and 7-day quota, the PRs waiting for you and your level: 😴 when a usage limit stopped
104
+ the crew (until the reset), 💤 while you have it on `ossa sleep`, 💦 while tests run in the sandbox,
105
+ 🪧 when something needs you. It is the `ossa-pet` plugin, installed beside `ossa`, and it only reads
106
+ files: it never writes one or uses the network. It interrupts you only when you're needed: a toast
107
+ when a new PR starts waiting for you.
108
+
109
+ <img src="docs/demo/pane.svg" alt="The crew pane: who is on shift, your level, quota bars, the PR waiting for you, and what happened while you were away" width="560">
110
+
111
+ **While you were away.** `ossa wake` and `ossa status` show what the ledger recorded since you last
112
+ looked: PRs ready for you, fixes the crew dropped and why, PRs opened, merged or closed, new maintainer
113
+ comments, usage-limit stops. The pane and the Captain show the same list. It comes from the ledger,
114
+ not from the crew's own account of its work. In background mode each run's summary on GitHub carries
115
+ it too (`ossa away --md`).
116
+
117
+ <img src="docs/demo/status.svg" alt="ossa status with sample data: level, the PR waiting for you, open PRs, caps, and while you were away" width="720">
118
+
119
+ Rename the crew in `ossa.toml` (`[crew]`, e.g. `breaker = "Bruno"`). Instant commands, no model call:
120
+
121
+ | In Claude Code | What |
122
+ |---|---|
123
+ | `/ossa` | open the pane |
124
+ | `/ossa status` | the same, as text |
125
+ | `/ossa pause`, `/ossa resume` | hold the crew's next `ossa` step or crew agent, then let it go on |
126
+
127
+ `/ossa pause` holds one session. `ossa sleep`, in your own terminal, stops the crew everywhere in the
128
+ workspace, headless sessions included: until `ossa wake`, its next `ossa` step and every file write are
129
+ refused. When the crew stops on a usage limit, OSSA notes when it resets (`runs/limit.json`), and
130
+ `ossa status` says when the crew can go on.
131
+
132
+ ## Safety
133
+
134
+ The short version: the crew can't publish, can't run repository code outside a sandbox, can't touch
135
+ your credentials, and can't skip a repo's rules; you approve every PR in your own words. Every
136
+ guarantee, how it is enforced, and the known limits are in [SAFETY.md](SAFETY.md). Found a way around
137
+ one? Report it privately: [SECURITY.md](SECURITY.md).
138
+
139
+ ## How OSSA is tested
140
+
141
+ | What | How | Run it |
142
+ |---|---|---|
143
+ | The toolbox and the guard | 400+ tests, no network, Docker, token or model needed | `pytest -q` |
144
+ | The crew under pressure | red-team evals: injected instructions in an issue and in a CONTRIBUTING.md, an AI-banning repo, requests to mass-open PRs, hide AI help, use an alternate account, post a security hole, run your own steps, or work while you have the crew asleep | `claude plugin eval plugin --scaffold --allow-tools Write Edit` |
145
+ | Reading real AI policies | 19 real projects' policies against a careful human reading (18 agree; see SAFETY.md) | `python scripts/policy_corpus.py` |
146
+ | A first install | install.sh and the five `ossa init` questions at a real terminal, on a clean Linux container and on macOS in CI | `sh scripts/install_test_docker.sh` |
147
+ | The crew pane | it only reads files: `claude plugin validate pet` lists every call it makes | `claude plugin test pet` |
148
+
149
+ ## Levels
150
+
151
+ Trust is the currency. You earn XP for outcomes maintainers decide (a merge is +100, an approving
152
+ review +30, feedback addressed +20, a weak fix stopped before it went out +10; a PR closed unmerged
153
+ is -50), never for PRs opened. Levels raise your caps, from 1 open PR as a newcomer to 8 as a veteran.
154
+
155
+ ## For maintainers
156
+
157
+ Don't want OSSA contributions? Add this line to your AGENTS.md or CONTRIBUTING.md:
158
+
159
+ ```
160
+ ossa: opt-out
161
+ ```
162
+
163
+ or open a PR adding your repo to [`src/ossa/data/optout.txt`](src/ossa/data/optout.txt). Every OSSA
164
+ user's crew checks both before any work, and nobody can override them. If you have an AI policy,
165
+ OSSA reads it: clear bans stop the crew, and disclosure rules are followed word for word. What an
166
+ OSSA PR looks like, and how to tell us when one wasted your time: [docs/maintainers.md](docs/maintainers.md).
167
+
168
+ ## Development
169
+
170
+ ```sh
171
+ uv venv && uv pip install -e '.[dev]'
172
+ .venv/bin/pytest -q # no network, Docker, token or LLM needed
173
+ claude plugin validate plugin # the plugin
174
+ claude --plugin-dir plugin # try it from a workspace folder holding ossa.toml
175
+ sh scripts/release_check.sh # build and check the package as PyPI will
176
+ ```
177
+
178
+ Releases: [RELEASING.md](RELEASING.md).
@@ -0,0 +1,56 @@
1
+ [project]
2
+ name = "ossa"
3
+ version = "0.1.0-alpha.1"
4
+ description = "OSSA toolbox: the deterministic half of a safety-first open-source contribution crew that runs on Claude Code."
5
+ readme = "README.md"
6
+ license = "Apache-2.0"
7
+ license-files = ["LICENSE"]
8
+ requires-python = ">=3.11"
9
+ authors = [{ name = "Rahul Seervi" }]
10
+ keywords = ["open-source", "contributions", "claude-code", "sandbox", "safety", "pull-requests"]
11
+ classifiers = [
12
+ "Development Status :: 3 - Alpha",
13
+ "Environment :: Console",
14
+ "Intended Audience :: Developers",
15
+ "Operating System :: MacOS",
16
+ "Operating System :: POSIX :: Linux",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3 :: Only",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Topic :: Software Development",
23
+ "Topic :: Software Development :: Quality Assurance",
24
+ ]
25
+ dependencies = [
26
+ "httpx>=0.27",
27
+ "pydantic>=2.6",
28
+ "typer>=0.12",
29
+ "rich>=13.7",
30
+ ]
31
+
32
+ [project.optional-dependencies]
33
+ dev = ["pytest>=8"]
34
+
35
+ [project.urls]
36
+ Homepage = "https://github.com/Rahul-cs50/ossa"
37
+ Repository = "https://github.com/Rahul-cs50/ossa"
38
+ Issues = "https://github.com/Rahul-cs50/ossa/issues"
39
+ Safety = "https://github.com/Rahul-cs50/ossa/blob/main/SAFETY.md"
40
+
41
+ [project.scripts]
42
+ ossa = "ossa.cli:app"
43
+
44
+ [build-system]
45
+ requires = ["setuptools>=77"] # PEP 639: license = "<SPDX expression>"
46
+ build-backend = "setuptools.build_meta"
47
+
48
+ [tool.setuptools.packages.find]
49
+ where = ["src"]
50
+ include = ["ossa*"]
51
+
52
+ [tool.setuptools.package-data]
53
+ ossa = ["data/*.txt", "data/*.yml"]
54
+
55
+ [tool.pytest.ini_options]
56
+ testpaths = ["tests"]
ossa-0.1.0a1/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,2 @@
1
+ """OSSA toolbox: the deterministic half of a safety-first open-source contribution crew."""
2
+ __version__ = "0.1.0-alpha.1"