glitch-toolkit 0.1.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.
- glitch_toolkit-0.1.0/LICENSE +201 -0
- glitch_toolkit-0.1.0/MANIFEST.in +17 -0
- glitch_toolkit-0.1.0/NOTICE +22 -0
- glitch_toolkit-0.1.0/PKG-INFO +152 -0
- glitch_toolkit-0.1.0/README.md +131 -0
- glitch_toolkit-0.1.0/pyproject.toml +77 -0
- glitch_toolkit-0.1.0/setup.cfg +4 -0
- glitch_toolkit-0.1.0/src/glitch/__init__.py +12 -0
- glitch_toolkit-0.1.0/src/glitch/__main__.py +7 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/scripts/check_lanes.py +219 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/scripts/fleet.py +341 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/scripts/gate_check.py +169 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/scripts/plan_check.py +342 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/scripts/rules_check.py +222 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/scripts/token_audit.py +535 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/skills/fleet-msg/SKILL.md +91 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/skills/fleet-sync/SKILL.md +94 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/skills/gate-check/SKILL.md +77 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/skills/lane-claim/SKILL.md +77 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/templates/CLAUDE.ecom.md +81 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/templates/CLAUDE.saas.md +85 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/templates/FLEET.md +69 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/templates/FLOOR.md +55 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/templates/PLAN.md +109 -0
- glitch_toolkit-0.1.0/src/glitch/_assets/templates/settings.template.json +12 -0
- glitch_toolkit-0.1.0/src/glitch/cli.py +860 -0
- glitch_toolkit-0.1.0/src/glitch/ledger.py +163 -0
- glitch_toolkit-0.1.0/src/glitch/mcp_server.py +338 -0
- glitch_toolkit-0.1.0/src/glitch_toolkit.egg-info/PKG-INFO +152 -0
- glitch_toolkit-0.1.0/src/glitch_toolkit.egg-info/SOURCES.txt +36 -0
- glitch_toolkit-0.1.0/src/glitch_toolkit.egg-info/dependency_links.txt +1 -0
- glitch_toolkit-0.1.0/src/glitch_toolkit.egg-info/entry_points.txt +3 -0
- glitch_toolkit-0.1.0/src/glitch_toolkit.egg-info/requires.txt +3 -0
- glitch_toolkit-0.1.0/src/glitch_toolkit.egg-info/top_level.txt +1 -0
- glitch_toolkit-0.1.0/tests/run_all.py +41 -0
- glitch_toolkit-0.1.0/tests/test_cli.py +509 -0
- glitch_toolkit-0.1.0/tests/test_ledger.py +192 -0
- glitch_toolkit-0.1.0/tests/test_mcp_server.py +268 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# What the sdist carries beyond what setuptools works out for itself.
|
|
2
|
+
#
|
|
3
|
+
# The default heuristics found tests/test_*.py and missed tests/run_all.py,
|
|
4
|
+
# which is the one command the README tells a reader to run. An sdist whose
|
|
5
|
+
# tests cannot be run with the documented command is an sdist that cannot be
|
|
6
|
+
# checked by the person most likely to want to check it: a packager building
|
|
7
|
+
# from source rather than installing a wheel.
|
|
8
|
+
graft tests
|
|
9
|
+
include LICENSE
|
|
10
|
+
include NOTICE
|
|
11
|
+
include README.md
|
|
12
|
+
|
|
13
|
+
# Never ship build output or caches, whatever is lying around locally.
|
|
14
|
+
global-exclude __pycache__
|
|
15
|
+
global-exclude *.py[cod]
|
|
16
|
+
prune build
|
|
17
|
+
prune dist
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
glitch — bounded autonomy for agents working in a repository
|
|
2
|
+
Copyright 2026 Duwayne Jefferson
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
This package was extracted on 2026-09-08 from the companion toolkit of the book
|
|
19
|
+
"Building Your Store Or Your SaaS With Claude". The practices it checks are
|
|
20
|
+
described there. The book itself is NOT covered by this licence, and neither is
|
|
21
|
+
anything else in the repository this package was extracted from: see the LICENSE
|
|
22
|
+
file at that repository's root, which grants nothing outside this directory.
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: glitch-toolkit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Install and verify bounded-autonomy practices in a repository worked on by AI agents
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
Project-URL: Homepage, https://github.com/AbstractGlitch/glitch-toolkit
|
|
7
|
+
Project-URL: Source, https://github.com/AbstractGlitch/glitch-toolkit
|
|
8
|
+
Project-URL: Issues, https://github.com/AbstractGlitch/glitch-toolkit/issues
|
|
9
|
+
Keywords: claude,agents,guardrails,governance,ci
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
14
|
+
Requires-Python: >=3.8
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
License-File: NOTICE
|
|
18
|
+
Provides-Extra: mcp
|
|
19
|
+
Requires-Dist: mcp>=2.0; extra == "mcp"
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
# glitch
|
|
23
|
+
|
|
24
|
+
Install the practices from *Building Your Store Or Your SaaS With Claude* into
|
|
25
|
+
your own repository, and check that they still refuse things.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
glitch install # put the artifacts in this repository
|
|
29
|
+
glitch status # what is installed, what is not
|
|
30
|
+
glitch check --all # verify every step
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## What it actually checks
|
|
34
|
+
|
|
35
|
+
A step is not complete because a file is present. Every check does three things
|
|
36
|
+
and reports which of them failed:
|
|
37
|
+
|
|
38
|
+
1. finds the artifact
|
|
39
|
+
2. runs it, and expects it to work
|
|
40
|
+
3. runs it against a deliberately broken case, and expects it to **refuse**
|
|
41
|
+
|
|
42
|
+
Without the third, a check passes the moment you copy a file in, whether or not
|
|
43
|
+
that file has any teeth left, and it would be green for every reader forever.
|
|
44
|
+
`tests/test_cli.py` exists to prove the checker fails that case; its `SABOTAGE`
|
|
45
|
+
test installs artifacts that run, exit 0 and refuse nothing.
|
|
46
|
+
|
|
47
|
+
## What `install` will not do
|
|
48
|
+
|
|
49
|
+
It will not write your `CLAUDE.md`, `FLEET.md`, `FLOOR.md` or `PLAN.md`. Four of
|
|
50
|
+
the six steps are checked against your own file, because for those four the file
|
|
51
|
+
*is* the work: a rules file that holds, a desk table with one committer, a floor
|
|
52
|
+
measured twice, a plan someone else approved. A command that wrote them would
|
|
53
|
+
turn the path into "you ran an installer". The `FLOOR.md` and `PLAN.md` templates
|
|
54
|
+
ship deliberately unpassable for the same reason.
|
|
55
|
+
|
|
56
|
+
It will not overwrite. An artifact already in your repo is left alone and
|
|
57
|
+
reported as kept; `--force` is how you say otherwise.
|
|
58
|
+
|
|
59
|
+
It writes nothing outside the directory you point it at, makes no network calls,
|
|
60
|
+
and has no dependencies outside the standard library.
|
|
61
|
+
|
|
62
|
+
## Running it without installing it
|
|
63
|
+
|
|
64
|
+
`cli.py` is one file and stays one file. Copy it into a repository and `status`
|
|
65
|
+
and `check` work with nothing on the path and no install step — that property is
|
|
66
|
+
deliberate and there is a test for the search paths it uses. Only `install`
|
|
67
|
+
needs the rest of the package, and it says so plainly rather than failing oddly.
|
|
68
|
+
|
|
69
|
+
## The MCP server (read-only)
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
pip install 'glitch-toolkit[mcp]'
|
|
73
|
+
glitch-mcp --repo .
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
It offers the checks to an agent as three tools — `glitch_status`, `glitch_check`,
|
|
77
|
+
`glitch_ledger_tail` — and appends every question and answer to
|
|
78
|
+
`.claude/toolkit/ledger/ledger.jsonl`.
|
|
79
|
+
|
|
80
|
+
**It gates nothing.** It cannot pause, block, refuse or intercept any action. It
|
|
81
|
+
has no database connection, no credential and no network call. That is the whole
|
|
82
|
+
first version, on purpose: a server that stands between an agent and a
|
|
83
|
+
production database is serious software, and the honest order is to run
|
|
84
|
+
read-only first, read the ledger, and find out what it *would* have refused
|
|
85
|
+
before giving it the power to refuse. A gate built before that record exists is
|
|
86
|
+
a guess with permissions.
|
|
87
|
+
|
|
88
|
+
The checks write nothing into your repository. The server breaks that in exactly
|
|
89
|
+
one place — it appends to the ledger — and `--no-ledger` turns off even that, at
|
|
90
|
+
the cost of the only thing worth keeping.
|
|
91
|
+
|
|
92
|
+
In Claude Code, `.mcp.json`:
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"mcpServers": {
|
|
97
|
+
"glitch": { "command": "glitch-mcp", "args": ["--repo", "."] }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### The ledger
|
|
103
|
+
|
|
104
|
+
Append-only JSONL. Nothing rewrites a line it did not just write; a record that
|
|
105
|
+
is overtaken is superseded by a new one and both stay; a field nobody measured
|
|
106
|
+
is `null` rather than `0`; a half-written last line is skipped and counted, never
|
|
107
|
+
repaired, because repairing it means rewriting the file.
|
|
108
|
+
|
|
109
|
+
## Tests
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
python tests/run_all.py # all three suites, 38 tests
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The server suite skips cleanly without the `[mcp]` extra and the runner reports
|
|
116
|
+
that as SKIPPED rather than passing, because a green line meaning "we did not
|
|
117
|
+
look" is the exact failure the gate-check practice exists to catch.
|
|
118
|
+
|
|
119
|
+
## Licence
|
|
120
|
+
|
|
121
|
+
Apache License 2.0 — see [LICENSE](https://github.com/AbstractGlitch/glitch-toolkit/blob/main/LICENSE)
|
|
122
|
+
and [NOTICE](https://github.com/AbstractGlitch/glitch-toolkit/blob/main/NOTICE). Chosen over MIT for
|
|
123
|
+
the patent grant.
|
|
124
|
+
|
|
125
|
+
Everything in this repository is under it. Use it commercially, change it,
|
|
126
|
+
redistribute it.
|
|
127
|
+
|
|
128
|
+
The links above are absolute on purpose: this README is also the package's
|
|
129
|
+
description on PyPI, where a relative link resolves against `pypi.org` and
|
|
130
|
+
returns a 404.
|
|
131
|
+
|
|
132
|
+
## Where this comes from
|
|
133
|
+
|
|
134
|
+
This repository is a published mirror. The package is developed inside a private
|
|
135
|
+
monorepo alongside the book *Building Your Store Or Your SaaS With Claude*, whose
|
|
136
|
+
practices it installs and checks, and it is pushed here as a subtree. The book,
|
|
137
|
+
the shop that sells it and the rest of that repository are **not** open source
|
|
138
|
+
and are not here. Nothing is being withheld from this repository that belongs to
|
|
139
|
+
the package.
|
|
140
|
+
|
|
141
|
+
Issues and pull requests belong here rather than there, because here is the part
|
|
142
|
+
anyone can read.
|
|
143
|
+
|
|
144
|
+
## Status
|
|
145
|
+
|
|
146
|
+
Version 0.1.0, the first release. It installs, and the practices it checks are
|
|
147
|
+
the six the book argues for.
|
|
148
|
+
|
|
149
|
+
What it is not yet: it gates nothing. `glitch-mcp` reports and records and
|
|
150
|
+
cannot block an agent from doing anything. That is deliberate and the reasoning
|
|
151
|
+
is in `mcp_server.py` — a server that stands between an agent and a production
|
|
152
|
+
database should earn its evidence before it earns the power to refuse.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# glitch
|
|
2
|
+
|
|
3
|
+
Install the practices from *Building Your Store Or Your SaaS With Claude* into
|
|
4
|
+
your own repository, and check that they still refuse things.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
glitch install # put the artifacts in this repository
|
|
8
|
+
glitch status # what is installed, what is not
|
|
9
|
+
glitch check --all # verify every step
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## What it actually checks
|
|
13
|
+
|
|
14
|
+
A step is not complete because a file is present. Every check does three things
|
|
15
|
+
and reports which of them failed:
|
|
16
|
+
|
|
17
|
+
1. finds the artifact
|
|
18
|
+
2. runs it, and expects it to work
|
|
19
|
+
3. runs it against a deliberately broken case, and expects it to **refuse**
|
|
20
|
+
|
|
21
|
+
Without the third, a check passes the moment you copy a file in, whether or not
|
|
22
|
+
that file has any teeth left, and it would be green for every reader forever.
|
|
23
|
+
`tests/test_cli.py` exists to prove the checker fails that case; its `SABOTAGE`
|
|
24
|
+
test installs artifacts that run, exit 0 and refuse nothing.
|
|
25
|
+
|
|
26
|
+
## What `install` will not do
|
|
27
|
+
|
|
28
|
+
It will not write your `CLAUDE.md`, `FLEET.md`, `FLOOR.md` or `PLAN.md`. Four of
|
|
29
|
+
the six steps are checked against your own file, because for those four the file
|
|
30
|
+
*is* the work: a rules file that holds, a desk table with one committer, a floor
|
|
31
|
+
measured twice, a plan someone else approved. A command that wrote them would
|
|
32
|
+
turn the path into "you ran an installer". The `FLOOR.md` and `PLAN.md` templates
|
|
33
|
+
ship deliberately unpassable for the same reason.
|
|
34
|
+
|
|
35
|
+
It will not overwrite. An artifact already in your repo is left alone and
|
|
36
|
+
reported as kept; `--force` is how you say otherwise.
|
|
37
|
+
|
|
38
|
+
It writes nothing outside the directory you point it at, makes no network calls,
|
|
39
|
+
and has no dependencies outside the standard library.
|
|
40
|
+
|
|
41
|
+
## Running it without installing it
|
|
42
|
+
|
|
43
|
+
`cli.py` is one file and stays one file. Copy it into a repository and `status`
|
|
44
|
+
and `check` work with nothing on the path and no install step — that property is
|
|
45
|
+
deliberate and there is a test for the search paths it uses. Only `install`
|
|
46
|
+
needs the rest of the package, and it says so plainly rather than failing oddly.
|
|
47
|
+
|
|
48
|
+
## The MCP server (read-only)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pip install 'glitch-toolkit[mcp]'
|
|
52
|
+
glitch-mcp --repo .
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
It offers the checks to an agent as three tools — `glitch_status`, `glitch_check`,
|
|
56
|
+
`glitch_ledger_tail` — and appends every question and answer to
|
|
57
|
+
`.claude/toolkit/ledger/ledger.jsonl`.
|
|
58
|
+
|
|
59
|
+
**It gates nothing.** It cannot pause, block, refuse or intercept any action. It
|
|
60
|
+
has no database connection, no credential and no network call. That is the whole
|
|
61
|
+
first version, on purpose: a server that stands between an agent and a
|
|
62
|
+
production database is serious software, and the honest order is to run
|
|
63
|
+
read-only first, read the ledger, and find out what it *would* have refused
|
|
64
|
+
before giving it the power to refuse. A gate built before that record exists is
|
|
65
|
+
a guess with permissions.
|
|
66
|
+
|
|
67
|
+
The checks write nothing into your repository. The server breaks that in exactly
|
|
68
|
+
one place — it appends to the ledger — and `--no-ledger` turns off even that, at
|
|
69
|
+
the cost of the only thing worth keeping.
|
|
70
|
+
|
|
71
|
+
In Claude Code, `.mcp.json`:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"mcpServers": {
|
|
76
|
+
"glitch": { "command": "glitch-mcp", "args": ["--repo", "."] }
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### The ledger
|
|
82
|
+
|
|
83
|
+
Append-only JSONL. Nothing rewrites a line it did not just write; a record that
|
|
84
|
+
is overtaken is superseded by a new one and both stay; a field nobody measured
|
|
85
|
+
is `null` rather than `0`; a half-written last line is skipped and counted, never
|
|
86
|
+
repaired, because repairing it means rewriting the file.
|
|
87
|
+
|
|
88
|
+
## Tests
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
python tests/run_all.py # all three suites, 38 tests
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The server suite skips cleanly without the `[mcp]` extra and the runner reports
|
|
95
|
+
that as SKIPPED rather than passing, because a green line meaning "we did not
|
|
96
|
+
look" is the exact failure the gate-check practice exists to catch.
|
|
97
|
+
|
|
98
|
+
## Licence
|
|
99
|
+
|
|
100
|
+
Apache License 2.0 — see [LICENSE](https://github.com/AbstractGlitch/glitch-toolkit/blob/main/LICENSE)
|
|
101
|
+
and [NOTICE](https://github.com/AbstractGlitch/glitch-toolkit/blob/main/NOTICE). Chosen over MIT for
|
|
102
|
+
the patent grant.
|
|
103
|
+
|
|
104
|
+
Everything in this repository is under it. Use it commercially, change it,
|
|
105
|
+
redistribute it.
|
|
106
|
+
|
|
107
|
+
The links above are absolute on purpose: this README is also the package's
|
|
108
|
+
description on PyPI, where a relative link resolves against `pypi.org` and
|
|
109
|
+
returns a 404.
|
|
110
|
+
|
|
111
|
+
## Where this comes from
|
|
112
|
+
|
|
113
|
+
This repository is a published mirror. The package is developed inside a private
|
|
114
|
+
monorepo alongside the book *Building Your Store Or Your SaaS With Claude*, whose
|
|
115
|
+
practices it installs and checks, and it is pushed here as a subtree. The book,
|
|
116
|
+
the shop that sells it and the rest of that repository are **not** open source
|
|
117
|
+
and are not here. Nothing is being withheld from this repository that belongs to
|
|
118
|
+
the package.
|
|
119
|
+
|
|
120
|
+
Issues and pull requests belong here rather than there, because here is the part
|
|
121
|
+
anyone can read.
|
|
122
|
+
|
|
123
|
+
## Status
|
|
124
|
+
|
|
125
|
+
Version 0.1.0, the first release. It installs, and the practices it checks are
|
|
126
|
+
the six the book argues for.
|
|
127
|
+
|
|
128
|
+
What it is not yet: it gates nothing. `glitch-mcp` reports and records and
|
|
129
|
+
cannot block an agent from doing anything. That is deliberate and the reasoning
|
|
130
|
+
is in `mcp_server.py` — a server that stands between an agent and a production
|
|
131
|
+
database should earn its evidence before it earns the power to refuse.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Packaging for the toolkit checker.
|
|
2
|
+
#
|
|
3
|
+
# Apache-2.0, decided 2026-09-08, chosen over MIT for the patent grant: if the
|
|
4
|
+
# attestation registry this package is a step toward ever means anything, it
|
|
5
|
+
# means it with a patent grant behind it.
|
|
6
|
+
#
|
|
7
|
+
# The `Private :: Do Not Upload` classifier that used to sit in the list below
|
|
8
|
+
# was removed in the same commit that added LICENSE and NOTICE, which is the
|
|
9
|
+
# condition its own comment set for removing it.
|
|
10
|
+
#
|
|
11
|
+
# The name was decided on 2026-09-08 and is no longer a placeholder. README.md is
|
|
12
|
+
# this package's description on PyPI, so what it says about publication is a
|
|
13
|
+
# public claim rather than a note to ourselves: rebuild the dist after editing
|
|
14
|
+
# it, or the index serves the previous version of that claim.
|
|
15
|
+
#
|
|
16
|
+
# setuptools>=77 is not cosmetic. `license = "Apache-2.0"` is the PEP 639 SPDX
|
|
17
|
+
# form, and on setuptools 61 to 76 it is read as the old free-text field and the
|
|
18
|
+
# build fails. Do not lower this bound without changing that line back.
|
|
19
|
+
|
|
20
|
+
[build-system]
|
|
21
|
+
requires = ["setuptools>=77"]
|
|
22
|
+
build-backend = "setuptools.build_meta"
|
|
23
|
+
|
|
24
|
+
[project]
|
|
25
|
+
name = "glitch-toolkit"
|
|
26
|
+
version = "0.1.0"
|
|
27
|
+
description = "Install and verify bounded-autonomy practices in a repository worked on by AI agents"
|
|
28
|
+
readme = "README.md"
|
|
29
|
+
license = "Apache-2.0"
|
|
30
|
+
license-files = ["LICENSE", "NOTICE"]
|
|
31
|
+
requires-python = ">=3.8"
|
|
32
|
+
keywords = ["claude", "agents", "guardrails", "governance", "ci"]
|
|
33
|
+
classifiers = [
|
|
34
|
+
"Environment :: Console",
|
|
35
|
+
"Intended Audience :: Developers",
|
|
36
|
+
"Programming Language :: Python :: 3",
|
|
37
|
+
"Topic :: Software Development :: Quality Assurance",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
# No runtime dependencies, and this is a promise rather than a coincidence.
|
|
41
|
+
# The checker has to run in a stranger's repository on the first day, before
|
|
42
|
+
# they have installed anything. Adding one is a product decision.
|
|
43
|
+
dependencies = []
|
|
44
|
+
|
|
45
|
+
# The MCP server is the one thing here that needs anything, and it is optional
|
|
46
|
+
# for that reason. `glitch` keeps its promise; `glitch-mcp` asks first and says
|
|
47
|
+
# so plainly when the SDK is absent rather than dying on an ImportError.
|
|
48
|
+
[project.optional-dependencies]
|
|
49
|
+
mcp = ["mcp>=2.0"]
|
|
50
|
+
|
|
51
|
+
# Where the PyPI sidebar sends people. Without this table there is no Homepage,
|
|
52
|
+
# no Source and no Issues link, which for a package whose success is measured in
|
|
53
|
+
# issues from strangers is a self-inflicted wound.
|
|
54
|
+
#
|
|
55
|
+
# These point at the PUBLIC mirror, not at the private monorepo the package is
|
|
56
|
+
# developed in. A Source link a stranger cannot open is worse than none.
|
|
57
|
+
[project.urls]
|
|
58
|
+
Homepage = "https://github.com/AbstractGlitch/glitch-toolkit"
|
|
59
|
+
Source = "https://github.com/AbstractGlitch/glitch-toolkit"
|
|
60
|
+
Issues = "https://github.com/AbstractGlitch/glitch-toolkit/issues"
|
|
61
|
+
|
|
62
|
+
[project.scripts]
|
|
63
|
+
glitch = "glitch.cli:main"
|
|
64
|
+
glitch-mcp = "glitch.mcp_server:main"
|
|
65
|
+
|
|
66
|
+
[tool.setuptools]
|
|
67
|
+
package-dir = {"" = "src"}
|
|
68
|
+
|
|
69
|
+
[tool.setuptools.packages.find]
|
|
70
|
+
where = ["src"]
|
|
71
|
+
|
|
72
|
+
[tool.setuptools.package-data]
|
|
73
|
+
glitch = [
|
|
74
|
+
"_assets/scripts/*.py",
|
|
75
|
+
"_assets/skills/*/SKILL.md",
|
|
76
|
+
"_assets/templates/*",
|
|
77
|
+
]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""Bounded autonomy for agents working in a repository.
|
|
2
|
+
|
|
3
|
+
Six practices from *Building Your Store Or Your SaaS With Claude*, installed
|
|
4
|
+
into your own project and checked there. The checker's contract is that an
|
|
5
|
+
artifact counts as installed only when it is present, runs, AND still refuses a
|
|
6
|
+
deliberately broken case; anything that merely passes is treated as not wired up.
|
|
7
|
+
|
|
8
|
+
The command line is the product. Import it if you want to, but nothing in here
|
|
9
|
+
is a stable API yet.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
__version__ = "0.1.0"
|