reasonledger 0.3.0a6__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 (126) hide show
  1. reasonledger-0.3.0a6/.gitignore +51 -0
  2. reasonledger-0.3.0a6/LICENSE +201 -0
  3. reasonledger-0.3.0a6/NOTICE +4 -0
  4. reasonledger-0.3.0a6/PKG-INFO +113 -0
  5. reasonledger-0.3.0a6/README.md +86 -0
  6. reasonledger-0.3.0a6/pyproject.toml +54 -0
  7. reasonledger-0.3.0a6/src/reasonledger_cli/__init__.py +5 -0
  8. reasonledger-0.3.0a6/src/reasonledger_cli/__main__.py +6 -0
  9. reasonledger-0.3.0a6/src/reasonledger_cli/agent_targets.py +263 -0
  10. reasonledger-0.3.0a6/src/reasonledger_cli/approve_cmd.py +49 -0
  11. reasonledger-0.3.0a6/src/reasonledger_cli/catchup_cmd.py +214 -0
  12. reasonledger-0.3.0a6/src/reasonledger_cli/check_cmd.py +86 -0
  13. reasonledger-0.3.0a6/src/reasonledger_cli/check_decisions_cmd.py +171 -0
  14. reasonledger-0.3.0a6/src/reasonledger_cli/config_cmd.py +109 -0
  15. reasonledger-0.3.0a6/src/reasonledger_cli/conflict_config_cmd.py +140 -0
  16. reasonledger-0.3.0a6/src/reasonledger_cli/conflict_config_ui.py +88 -0
  17. reasonledger-0.3.0a6/src/reasonledger_cli/consent_cmd.py +214 -0
  18. reasonledger-0.3.0a6/src/reasonledger_cli/dismiss_cmd.py +94 -0
  19. reasonledger-0.3.0a6/src/reasonledger_cli/identity.py +31 -0
  20. reasonledger-0.3.0a6/src/reasonledger_cli/import_cmd.py +145 -0
  21. reasonledger-0.3.0a6/src/reasonledger_cli/init_cmd.py +352 -0
  22. reasonledger-0.3.0a6/src/reasonledger_cli/judge_cmd.py +171 -0
  23. reasonledger-0.3.0a6/src/reasonledger_cli/main.py +183 -0
  24. reasonledger-0.3.0a6/src/reasonledger_cli/map_cmd.py +230 -0
  25. reasonledger-0.3.0a6/src/reasonledger_cli/mcp_cmd.py +18 -0
  26. reasonledger-0.3.0a6/src/reasonledger_cli/modules_cmd.py +248 -0
  27. reasonledger-0.3.0a6/src/reasonledger_cli/parser.py +257 -0
  28. reasonledger-0.3.0a6/src/reasonledger_cli/related_output.py +29 -0
  29. reasonledger-0.3.0a6/src/reasonledger_cli/retire_cmd.py +42 -0
  30. reasonledger-0.3.0a6/src/reasonledger_cli/stats_cmd.py +64 -0
  31. reasonledger-0.3.0a6/src/reasonledger_cli/status_cmd.py +287 -0
  32. reasonledger-0.3.0a6/src/reasonledger_cli/supersede_cmd.py +56 -0
  33. reasonledger-0.3.0a6/src/reasonledger_cli/ui_approve.py +102 -0
  34. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/agent_card.js +39 -0
  35. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/api.js +35 -0
  36. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/app.js +303 -0
  37. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/ask.js +135 -0
  38. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/browse.js +504 -0
  39. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/browse_refs.js +80 -0
  40. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/config.js +217 -0
  41. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/conflict_config.js +158 -0
  42. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/conflicts.js +184 -0
  43. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/consent.js +109 -0
  44. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/index.html +145 -0
  45. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/judge.js +244 -0
  46. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/ledger_list.js +179 -0
  47. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/logo.svg +17 -0
  48. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/map.css +217 -0
  49. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/map.js +245 -0
  50. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/map_actions.js +119 -0
  51. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/map_page.js +161 -0
  52. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/needs.js +50 -0
  53. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/organize.css +276 -0
  54. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/organize.js +391 -0
  55. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/organize_actions.js +49 -0
  56. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/organize_decisions.js +134 -0
  57. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/organize_inbox.js +99 -0
  58. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/organize_inbox_ui.js +118 -0
  59. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/organize_ui.js +187 -0
  60. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/overview.js +105 -0
  61. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/provenance.js +65 -0
  62. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/render.js +443 -0
  63. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/review.css +118 -0
  64. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/review.js +189 -0
  65. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/setup.js +329 -0
  66. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/stats.css +41 -0
  67. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/stats.js +137 -0
  68. reasonledger-0.3.0a6/src/reasonledger_cli/ui_assets/style.css +913 -0
  69. reasonledger-0.3.0a6/src/reasonledger_cli/ui_cmd.py +359 -0
  70. reasonledger-0.3.0a6/src/reasonledger_cli/ui_config.py +134 -0
  71. reasonledger-0.3.0a6/src/reasonledger_cli/ui_decisions.py +90 -0
  72. reasonledger-0.3.0a6/src/reasonledger_cli/ui_html.py +250 -0
  73. reasonledger-0.3.0a6/src/reasonledger_cli/ui_identity.py +43 -0
  74. reasonledger-0.3.0a6/src/reasonledger_cli/ui_judge.py +194 -0
  75. reasonledger-0.3.0a6/src/reasonledger_cli/ui_map.py +28 -0
  76. reasonledger-0.3.0a6/src/reasonledger_cli/ui_organize.py +342 -0
  77. reasonledger-0.3.0a6/src/reasonledger_cli/ui_proposals.py +85 -0
  78. reasonledger-0.3.0a6/src/reasonledger_cli/ui_setup.py +151 -0
  79. reasonledger-0.3.0a6/src/reasonledger_cli/ui_stats.py +15 -0
  80. reasonledger-0.3.0a6/src/reasonledger_cli/why_cmd.py +67 -0
  81. reasonledger-0.3.0a6/src/reasonledger_cli/why_render.py +122 -0
  82. reasonledger-0.3.0a6/tests/conftest.py +11 -0
  83. reasonledger-0.3.0a6/tests/test_approve_cmd.py +249 -0
  84. reasonledger-0.3.0a6/tests/test_catchup_cli.py +289 -0
  85. reasonledger-0.3.0a6/tests/test_check.py +73 -0
  86. reasonledger-0.3.0a6/tests/test_check_decisions.py +129 -0
  87. reasonledger-0.3.0a6/tests/test_clean_install.py +55 -0
  88. reasonledger-0.3.0a6/tests/test_conflict_config_cmd.py +198 -0
  89. reasonledger-0.3.0a6/tests/test_consent_cmd.py +148 -0
  90. reasonledger-0.3.0a6/tests/test_cwd_default_root.py +123 -0
  91. reasonledger-0.3.0a6/tests/test_dismiss_cmd.py +109 -0
  92. reasonledger-0.3.0a6/tests/test_dist_packaging.py +159 -0
  93. reasonledger-0.3.0a6/tests/test_documented_commands.py +127 -0
  94. reasonledger-0.3.0a6/tests/test_identity_close_out.py +166 -0
  95. reasonledger-0.3.0a6/tests/test_import_cli.py +114 -0
  96. reasonledger-0.3.0a6/tests/test_init_cmd.py +270 -0
  97. reasonledger-0.3.0a6/tests/test_init_detection.py +190 -0
  98. reasonledger-0.3.0a6/tests/test_judge_cmd.py +164 -0
  99. reasonledger-0.3.0a6/tests/test_loci_paths.py +19 -0
  100. reasonledger-0.3.0a6/tests/test_map_cmd.py +120 -0
  101. reasonledger-0.3.0a6/tests/test_mcp_subcommand.py +117 -0
  102. reasonledger-0.3.0a6/tests/test_modules_cmd.py +234 -0
  103. reasonledger-0.3.0a6/tests/test_open_core_boundary.py +69 -0
  104. reasonledger-0.3.0a6/tests/test_p0_3.py +123 -0
  105. reasonledger-0.3.0a6/tests/test_package_readmes.py +44 -0
  106. reasonledger-0.3.0a6/tests/test_stats.py +65 -0
  107. reasonledger-0.3.0a6/tests/test_status_cli.py +102 -0
  108. reasonledger-0.3.0a6/tests/test_status_since.py +115 -0
  109. reasonledger-0.3.0a6/tests/test_ui_approve.py +257 -0
  110. reasonledger-0.3.0a6/tests/test_ui_assets.py +221 -0
  111. reasonledger-0.3.0a6/tests/test_ui_config.py +291 -0
  112. reasonledger-0.3.0a6/tests/test_ui_conflict_config.py +153 -0
  113. reasonledger-0.3.0a6/tests/test_ui_decisions.py +145 -0
  114. reasonledger-0.3.0a6/tests/test_ui_judge.py +189 -0
  115. reasonledger-0.3.0a6/tests/test_ui_map.py +122 -0
  116. reasonledger-0.3.0a6/tests/test_ui_organize.py +406 -0
  117. reasonledger-0.3.0a6/tests/test_ui_server.py +445 -0
  118. reasonledger-0.3.0a6/tests/test_ui_setup.py +125 -0
  119. reasonledger-0.3.0a6/tests/test_ui_why_nearby.py +102 -0
  120. reasonledger-0.3.0a6/tests/test_utf8_output.py +37 -0
  121. reasonledger-0.3.0a6/tests/test_version_flag.py +28 -0
  122. reasonledger-0.3.0a6/tests/test_why.py +162 -0
  123. reasonledger-0.3.0a6/tests/test_why_nearby.py +157 -0
  124. reasonledger-0.3.0a6/tests/test_why_text.py +111 -0
  125. reasonledger-0.3.0a6/tests/verdict_helpers.py +43 -0
  126. reasonledger-0.3.0a6/tests/why_helpers.py +60 -0
@@ -0,0 +1,51 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ .venv/
5
+ venv/
6
+ .env
7
+ .env.*
8
+ !.env.example
9
+ *.egg-info/
10
+ .pytest_cache/
11
+ .ruff_cache/
12
+ .mypy_cache/
13
+ .hypothesis/
14
+ .coverage
15
+ coverage.xml
16
+ htmlcov/
17
+
18
+ # Build output
19
+ dist/
20
+
21
+ # Local / editor
22
+ .DS_Store
23
+ *.local
24
+ .idea/
25
+ .vscode/
26
+
27
+ # Claude Code local settings and worktrees
28
+ .claude/
29
+
30
+ # Local ledger caches (embeddings / view)
31
+ .reasonledger/cache/
32
+
33
+ # Per-checkout watermark of the files `import` has already read
34
+ .reasonledger/import-seen.yml
35
+
36
+ # Opt-in pilot metrics. Local-only by design — committing it would publish a
37
+ # per-developer usage record to everyone with a clone.
38
+ .reasonledger/metrics.jsonl
39
+
40
+ # Machine-specific editor MCP configs (absolute paths) - `reasonledger init` generates them
41
+ .mcp.json
42
+ .cursor/mcp.json
43
+
44
+ # Personal scratch sheets
45
+ *.numbers
46
+
47
+ # A cloned project used to try ReasonLedger on a real codebase
48
+ .test-ts-project/
49
+
50
+ # Local-only material that must never reach a commit or the public repository.
51
+ private/
@@ -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 2026 SphotaLabs Inc.
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.
@@ -0,0 +1,4 @@
1
+ ReasonLedger
2
+ Copyright 2026 SphotaLabs Inc.
3
+
4
+ This product includes software developed at SphotaLabs Inc.
@@ -0,0 +1,113 @@
1
+ Metadata-Version: 2.5
2
+ Name: reasonledger
3
+ Version: 0.3.0a6
4
+ Summary: Never lose the why behind AI-written code — decision capture, review, and policy checks
5
+ Project-URL: Homepage, https://github.com/Sphotalabs-Inc/ReasonLedger
6
+ Project-URL: Repository, https://github.com/Sphotalabs-Inc/ReasonLedger
7
+ Project-URL: Issues, https://github.com/Sphotalabs-Inc/ReasonLedger/issues
8
+ Author: SphotaLabs Inc.
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE
11
+ License-File: NOTICE
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Topic :: Software Development :: Documentation
19
+ Classifier: Topic :: Software Development :: Quality Assurance
20
+ Classifier: Typing :: Typed
21
+ Requires-Python: >=3.12
22
+ Requires-Dist: reasonledger-core<0.4.0,>=0.3.0a1
23
+ Requires-Dist: reasonledger-mcp<0.4.0,>=0.3.0a1
24
+ Provides-Extra: embeddings
25
+ Requires-Dist: reasonledger-core[embeddings]<0.4.0,>=0.3.0a1; extra == 'embeddings'
26
+ Description-Content-Type: text/markdown
27
+
28
+ # reasonledger
29
+
30
+ **Never lose the *why* behind AI-written code.** `reasonledger` is the command-line
31
+ surface of [ReasonLedger](https://github.com/Sphotalabs-Inc/ReasonLedger): it captures the
32
+ decisions behind your codebase as reviewable records, tells you which decision justifies
33
+ a given line, and checks changes against a policy in CI.
34
+
35
+ Everything it manages lives in a `.reasonledger/` directory inside your own repo. There
36
+ is no database, no daemon, no account, and nothing runs in the background.
37
+
38
+ > **Alpha (`0.3.0a6`).** Expect rough edges.
39
+
40
+ ## The loop
41
+
42
+ ```bash
43
+ cd /path/to/your-app
44
+ uvx reasonledger init # .reasonledger/, the MCP config and the agent rule
45
+ uvx reasonledger ui # approve what your agent recorded, on 127.0.0.1
46
+ uvx reasonledger why payments/retry.py:55 # which decision justifies this line?
47
+ ```
48
+
49
+ `init` writes the MCP config and the agent rule for Claude Code, Cursor and VS Code. Your agent
50
+ then records decisions as it works; each lands as `pending` until a person approves it in the UI
51
+ or with `reasonledger approve <id>`. To keep the command on your `PATH`:
52
+
53
+ ```bash
54
+ uv tool install reasonledger
55
+ reasonledger --version
56
+ ```
57
+
58
+ To work on ReasonLedger itself, use a checkout of the
59
+ [monorepo](https://github.com/Sphotalabs-Inc/ReasonLedger) (see its `docs/install.md`).
60
+
61
+ ## Backfill from the docs you already have
62
+
63
+ If you would rather propose decisions from existing docs than wait for your agent, `import`
64
+ reads them with a model you configure:
65
+
66
+ ```bash
67
+ reasonledger config --provider anthropic \
68
+ --model <id> --api-key-env ANTHROPIC_API_KEY
69
+ reasonledger import --root . \
70
+ --extracted-by anthropic/<id> # propose decisions from your docs
71
+ reasonledger ui # review, confirm, reject — on localhost
72
+ ```
73
+
74
+ `import` proposes; it never writes to the ledger directly. A human confirms every record
75
+ that lands — that oversight step is the evidence the product exists to produce. To try the
76
+ loop with no model account at all, replay a fixture:
77
+ `reasonledger import --fixture candidates.json --extracted-by fixture`.
78
+
79
+ ## Bring your own model
80
+
81
+ Extraction uses whichever provider you configure — Anthropic, any OpenAI-compatible
82
+ endpoint, or a local model. **The API key itself is never written to disk.** Config stores
83
+ only the *name* of the environment variable that holds it, so `.reasonledger/config.yml`
84
+ is structurally incapable of leaking a secret.
85
+
86
+ An Anthropic Console API key is billed separately from a Claude Pro/Max subscription.
87
+
88
+ ## `reasonledger ui`
89
+
90
+ A localhost review app, stdlib-only, bound to `127.0.0.1`. It starts when you run the
91
+ command and stops when you press Ctrl-C — it is not a service. The UI ships inside this
92
+ package; only the `.reasonledger/` data lives in your repo.
93
+
94
+ It is a per-developer, per-repo tool. There is no hosted team layer yet: teams share
95
+ decisions through git.
96
+
97
+ ## Console scripts
98
+
99
+ `reasonledger` and the short alias `rl` are the same entry point.
100
+
101
+ ## Extras
102
+
103
+ ```bash
104
+ uv tool install "reasonledger[embeddings]" # real embeddings for conflict detection
105
+ ```
106
+
107
+ Without the extra, conflict detection uses a deterministic stub embedder — fine for tests
108
+ and demos, noisier on real prose.
109
+
110
+ ---
111
+
112
+ Part of the ReasonLedger workspace: [`reasonledger-core`](https://pypi.org/project/reasonledger-core/)
113
+ (domain logic) · [`reasonledger-mcp`](https://pypi.org/project/reasonledger-mcp/) (editor-spawned MCP server).
@@ -0,0 +1,86 @@
1
+ # reasonledger
2
+
3
+ **Never lose the *why* behind AI-written code.** `reasonledger` is the command-line
4
+ surface of [ReasonLedger](https://github.com/Sphotalabs-Inc/ReasonLedger): it captures the
5
+ decisions behind your codebase as reviewable records, tells you which decision justifies
6
+ a given line, and checks changes against a policy in CI.
7
+
8
+ Everything it manages lives in a `.reasonledger/` directory inside your own repo. There
9
+ is no database, no daemon, no account, and nothing runs in the background.
10
+
11
+ > **Alpha (`0.3.0a6`).** Expect rough edges.
12
+
13
+ ## The loop
14
+
15
+ ```bash
16
+ cd /path/to/your-app
17
+ uvx reasonledger init # .reasonledger/, the MCP config and the agent rule
18
+ uvx reasonledger ui # approve what your agent recorded, on 127.0.0.1
19
+ uvx reasonledger why payments/retry.py:55 # which decision justifies this line?
20
+ ```
21
+
22
+ `init` writes the MCP config and the agent rule for Claude Code, Cursor and VS Code. Your agent
23
+ then records decisions as it works; each lands as `pending` until a person approves it in the UI
24
+ or with `reasonledger approve <id>`. To keep the command on your `PATH`:
25
+
26
+ ```bash
27
+ uv tool install reasonledger
28
+ reasonledger --version
29
+ ```
30
+
31
+ To work on ReasonLedger itself, use a checkout of the
32
+ [monorepo](https://github.com/Sphotalabs-Inc/ReasonLedger) (see its `docs/install.md`).
33
+
34
+ ## Backfill from the docs you already have
35
+
36
+ If you would rather propose decisions from existing docs than wait for your agent, `import`
37
+ reads them with a model you configure:
38
+
39
+ ```bash
40
+ reasonledger config --provider anthropic \
41
+ --model <id> --api-key-env ANTHROPIC_API_KEY
42
+ reasonledger import --root . \
43
+ --extracted-by anthropic/<id> # propose decisions from your docs
44
+ reasonledger ui # review, confirm, reject — on localhost
45
+ ```
46
+
47
+ `import` proposes; it never writes to the ledger directly. A human confirms every record
48
+ that lands — that oversight step is the evidence the product exists to produce. To try the
49
+ loop with no model account at all, replay a fixture:
50
+ `reasonledger import --fixture candidates.json --extracted-by fixture`.
51
+
52
+ ## Bring your own model
53
+
54
+ Extraction uses whichever provider you configure — Anthropic, any OpenAI-compatible
55
+ endpoint, or a local model. **The API key itself is never written to disk.** Config stores
56
+ only the *name* of the environment variable that holds it, so `.reasonledger/config.yml`
57
+ is structurally incapable of leaking a secret.
58
+
59
+ An Anthropic Console API key is billed separately from a Claude Pro/Max subscription.
60
+
61
+ ## `reasonledger ui`
62
+
63
+ A localhost review app, stdlib-only, bound to `127.0.0.1`. It starts when you run the
64
+ command and stops when you press Ctrl-C — it is not a service. The UI ships inside this
65
+ package; only the `.reasonledger/` data lives in your repo.
66
+
67
+ It is a per-developer, per-repo tool. There is no hosted team layer yet: teams share
68
+ decisions through git.
69
+
70
+ ## Console scripts
71
+
72
+ `reasonledger` and the short alias `rl` are the same entry point.
73
+
74
+ ## Extras
75
+
76
+ ```bash
77
+ uv tool install "reasonledger[embeddings]" # real embeddings for conflict detection
78
+ ```
79
+
80
+ Without the extra, conflict detection uses a deterministic stub embedder — fine for tests
81
+ and demos, noisier on real prose.
82
+
83
+ ---
84
+
85
+ Part of the ReasonLedger workspace: [`reasonledger-core`](https://pypi.org/project/reasonledger-core/)
86
+ (domain logic) · [`reasonledger-mcp`](https://pypi.org/project/reasonledger-mcp/) (editor-spawned MCP server).
@@ -0,0 +1,54 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27,<2"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "reasonledger"
7
+ version = "0.3.0a6"
8
+ description = "Never lose the why behind AI-written code — decision capture, review, and policy checks"
9
+ readme = "README.md"
10
+ requires-python = ">=3.12"
11
+ license = "Apache-2.0"
12
+ license-files = ["LICENSE", "NOTICE"]
13
+ authors = [{ name = "SphotaLabs Inc." }]
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Environment :: Console",
17
+ "Intended Audience :: Developers",
18
+ "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Topic :: Software Development :: Documentation",
22
+ "Topic :: Software Development :: Quality Assurance",
23
+ "Typing :: Typed",
24
+ ]
25
+ dependencies = [
26
+ "reasonledger-core>=0.3.0a1,<0.4.0",
27
+ "reasonledger-mcp>=0.3.0a1,<0.4.0",
28
+ ]
29
+
30
+ [project.optional-dependencies]
31
+ embeddings = [
32
+ "reasonledger-core[embeddings]>=0.3.0a1,<0.4.0",
33
+ ]
34
+
35
+ [project.urls]
36
+ Homepage = "https://github.com/Sphotalabs-Inc/ReasonLedger"
37
+ Repository = "https://github.com/Sphotalabs-Inc/ReasonLedger"
38
+ Issues = "https://github.com/Sphotalabs-Inc/ReasonLedger/issues"
39
+
40
+ [project.scripts]
41
+ reasonledger = "reasonledger_cli.main:main"
42
+ rl = "reasonledger_cli.main:main"
43
+
44
+ [tool.uv.sources]
45
+ reasonledger-core = { workspace = true }
46
+ reasonledger-mcp = { workspace = true }
47
+
48
+ [tool.hatch.build.targets.wheel]
49
+ packages = ["src/reasonledger_cli"]
50
+
51
+ [tool.pytest.ini_options]
52
+ testpaths = ["tests"]
53
+ pythonpath = ["src"]
54
+ addopts = "-q --strict-markers"
@@ -0,0 +1,5 @@
1
+ """reasonledger CLI package."""
2
+
3
+ from reasonledger_cli.main import main
4
+
5
+ __all__ = ["main"]
@@ -0,0 +1,6 @@
1
+ """CLI entrypoint: python -m reasonledger_cli."""
2
+
3
+ from reasonledger_cli.main import main
4
+
5
+ if __name__ == "__main__":
6
+ raise SystemExit(main())