loopsmith-cli 0.1.2__tar.gz → 0.1.3__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.
- loopsmith_cli-0.1.3/PKG-INFO +221 -0
- loopsmith_cli-0.1.3/README.md +199 -0
- {loopsmith_cli-0.1.2 → loopsmith_cli-0.1.3}/pyproject.toml +1 -1
- {loopsmith_cli-0.1.2 → loopsmith_cli-0.1.3}/src/loopsmith_cli/__init__.py +1 -1
- loopsmith_cli-0.1.3/src/loopsmith_cli.egg-info/PKG-INFO +221 -0
- loopsmith_cli-0.1.2/PKG-INFO +0 -54
- loopsmith_cli-0.1.2/README.md +0 -32
- loopsmith_cli-0.1.2/src/loopsmith_cli.egg-info/PKG-INFO +0 -54
- {loopsmith_cli-0.1.2 → loopsmith_cli-0.1.3}/setup.cfg +0 -0
- {loopsmith_cli-0.1.2 → loopsmith_cli-0.1.3}/src/loopsmith_cli/__main__.py +0 -0
- {loopsmith_cli-0.1.2 → loopsmith_cli-0.1.3}/src/loopsmith_cli.egg-info/SOURCES.txt +0 -0
- {loopsmith_cli-0.1.2 → loopsmith_cli-0.1.3}/src/loopsmith_cli.egg-info/dependency_links.txt +0 -0
- {loopsmith_cli-0.1.2 → loopsmith_cli-0.1.3}/src/loopsmith_cli.egg-info/entry_points.txt +0 -0
- {loopsmith_cli-0.1.2 → loopsmith_cli-0.1.3}/src/loopsmith_cli.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: loopsmith-cli
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: Self-evolving agent loops behind a deterministic verification gate. Installs the prebuilt Rust binary as `loopsmith`.
|
|
5
|
+
Author-email: bitphill <bitphill@tuta.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/bitphill/loopsmith
|
|
8
|
+
Project-URL: Repository, https://github.com/bitphill/loopsmith
|
|
9
|
+
Project-URL: Changelog, https://github.com/bitphill/loopsmith/blob/main/CHANGELOG.md
|
|
10
|
+
Project-URL: Issues, https://github.com/bitphill/loopsmith/issues
|
|
11
|
+
Keywords: agent,loop,llm,orchestration,cli,rust
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
17
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
+
Classifier: Programming Language :: Rust
|
|
19
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
20
|
+
Requires-Python: >=3.8
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
<div align="center">
|
|
24
|
+
<img src="https://raw.githubusercontent.com/bitphill/loopsmith/v0.1.3/assets/loopsmith-logo-256.png" alt="loopsmith" width="180" />
|
|
25
|
+
<h1>loopsmith</h1>
|
|
26
|
+
<p><em>Self-evolving agent loops. The gate is code, so "done" cannot be argued.</em></p>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
[](https://pypi.org/project/loopsmith-cli/)
|
|
30
|
+
[](https://github.com/bitphill/loopsmith/blob/main/LICENSE)
|
|
31
|
+

|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install loopsmith-cli
|
|
36
|
+
loopsmith doctor
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
> **This distribution is a Rust binary, not a Python library.** There is nothing to
|
|
40
|
+
> `import`. It installs a `loopsmith` command. To drive loops from Python, use
|
|
41
|
+
> `subprocess` — its exit codes are its API.
|
|
42
|
+
|
|
43
|
+
## What it is
|
|
44
|
+
|
|
45
|
+
You describe a purpose in a config — goals, how each is checked, what counts as
|
|
46
|
+
success, when to stop, what the loop may never do. loopsmith handles scheduling,
|
|
47
|
+
provider routing, memory, verification, and termination, and can run for weeks
|
|
48
|
+
without you.
|
|
49
|
+
|
|
50
|
+
One rule holds the whole design up:
|
|
51
|
+
|
|
52
|
+
> **A model must not be the thing that certifies its own completion.**
|
|
53
|
+
|
|
54
|
+
`goal_satisfied` is written by a deterministic Rust gate and by nothing else, and
|
|
55
|
+
the gate can **revoke**: delete a required artifact and a satisfied goal flips
|
|
56
|
+
back. A system that can only promote is a burndown chart with extra steps.
|
|
57
|
+
|
|
58
|
+
## Five minutes
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install loopsmith-cli
|
|
62
|
+
|
|
63
|
+
# --path must be outside any repo you care about: a loop edits files and writes
|
|
64
|
+
# state, so it does not get pointed at the tool that runs it.
|
|
65
|
+
loopsmith new --path ~/loops/nightly-refactor --purpose "keep the module simple"
|
|
66
|
+
|
|
67
|
+
cd ~/loops/nightly-refactor
|
|
68
|
+
$EDITOR loop.yaml # your goals, and how each one is checked
|
|
69
|
+
loopsmith validate loop.yaml
|
|
70
|
+
loopsmith plan loop.yaml
|
|
71
|
+
./run.sh # run.cmd on Windows
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### `validate` fails on purpose
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
error pre_execution: 2 step(s) not marked done: Run this task manually end to
|
|
78
|
+
end at least once; Write down what 'done' means in checkable terms.
|
|
79
|
+
Automating before understanding produces fast, confident garbage
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
That refusal is the most valuable thing the tool does. Do the task by hand once —
|
|
83
|
+
the manual run *is* the spec. Mark each `pre_execution` step `done: true` once you
|
|
84
|
+
actually have.
|
|
85
|
+
|
|
86
|
+
## What a config looks like
|
|
87
|
+
|
|
88
|
+
Ten sections, **A** to **J**: information, the manual work list, goals,
|
|
89
|
+
validations, success criteria, stop gates, schedules, constraints, execution
|
|
90
|
+
guidelines, default skills. YAML or Markdown — the same model either way.
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
name: nightly-refactor
|
|
94
|
+
description: keep the payments module simple without breaking it
|
|
95
|
+
|
|
96
|
+
pre_execution:
|
|
97
|
+
- step: Ran the refactor by hand on one file and kept the diff
|
|
98
|
+
done: true
|
|
99
|
+
|
|
100
|
+
goals:
|
|
101
|
+
- name: simpler
|
|
102
|
+
description: Cyclomatic complexity down, behaviour unchanged.
|
|
103
|
+
|
|
104
|
+
validations:
|
|
105
|
+
- target: simpler
|
|
106
|
+
name: tests-still-pass
|
|
107
|
+
mode: objective
|
|
108
|
+
statement: The suite exits clean.
|
|
109
|
+
detector:
|
|
110
|
+
type: script
|
|
111
|
+
command: ./scripts/check-tests.sh
|
|
112
|
+
expect_exit: 0
|
|
113
|
+
blocking: true
|
|
114
|
+
|
|
115
|
+
success:
|
|
116
|
+
- target: overall
|
|
117
|
+
name: all-blocking-pass
|
|
118
|
+
mode: percentage
|
|
119
|
+
statement: Every blocking validation passes.
|
|
120
|
+
threshold: 1.0
|
|
121
|
+
|
|
122
|
+
stop_gates:
|
|
123
|
+
max_iterations: 8
|
|
124
|
+
max_revisions_per_node: 3
|
|
125
|
+
max_cost_usd: 5.0
|
|
126
|
+
no_progress_iterations: 3
|
|
127
|
+
|
|
128
|
+
graph:
|
|
129
|
+
nodes:
|
|
130
|
+
- id: refactor
|
|
131
|
+
role: builder
|
|
132
|
+
instruction: Simplify one function. State any assumption you had to make.
|
|
133
|
+
goals: [simpler]
|
|
134
|
+
isolated: true # its own git worktree
|
|
135
|
+
- id: review
|
|
136
|
+
role: judge
|
|
137
|
+
instruction: Check the diff against the brief. Pass or fail per check, with evidence.
|
|
138
|
+
depends_on: [refactor]
|
|
139
|
+
goals: [simpler]
|
|
140
|
+
tier: strong
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Detectors are `file_exists`, `regex`, `script`, and composites. Only a detector
|
|
144
|
+
can satisfy a goal — a model's opinion of its own work never does.
|
|
145
|
+
|
|
146
|
+
## While it runs
|
|
147
|
+
|
|
148
|
+
| Question | Command |
|
|
149
|
+
|---|---|
|
|
150
|
+
| What does the gate say? | `loopsmith status <config> <run-id>` |
|
|
151
|
+
| What happened? | `loopsmith ledger <config> <run-id>` |
|
|
152
|
+
| Why did it stop? | the last line of `logs/<run-id>.log` |
|
|
153
|
+
| What does it want changed about itself? | `loopsmith proposals <config> <run-id>` |
|
|
154
|
+
| Which providers can it reach? | `loopsmith providers <config>` |
|
|
155
|
+
| Will this machine get in the way? | `loopsmith doctor <config>` |
|
|
156
|
+
|
|
157
|
+
**The loop never edits its own config.** Changes to goals, validations, success
|
|
158
|
+
criteria, and sub-agent adoption are written as *proposals* for a human to apply.
|
|
159
|
+
|
|
160
|
+
## Providers and BYOK
|
|
161
|
+
|
|
162
|
+
Every provider is a command template, which is what makes bring-your-own-key
|
|
163
|
+
free: Claude Code, Ollama, a Grok CLI, an OpenAI-compatible endpoint driven by
|
|
164
|
+
`curl`, an MCP server over stdio — all of them are "a program you run with a
|
|
165
|
+
prompt". Adding one is a config edit, never a rebuild.
|
|
166
|
+
|
|
167
|
+
`requires_env` names variables that must **exist**. loopsmith never reads their
|
|
168
|
+
values, so a key cannot reach a prompt, a log, or the ledger.
|
|
169
|
+
|
|
170
|
+
> ⚠ Never paste an API key into a chat window, a config file, or an issue. If one
|
|
171
|
+
> ends up somewhere it should not be, rotate it — deleting the message is not
|
|
172
|
+
> enough.
|
|
173
|
+
|
|
174
|
+
## How this distribution installs the binary
|
|
175
|
+
|
|
176
|
+
The binary is fetched **on first run**, not during `pip install`, and cached under
|
|
177
|
+
`~/.loopsmith/bin/<version>/` (override with `LOOPSMITH_HOME`).
|
|
178
|
+
|
|
179
|
+
That is deliberate. A wheel that downloads at install time breaks in every
|
|
180
|
+
environment that installs without a network and runs with one — CI images, Docker
|
|
181
|
+
build stages, locked-down build hosts — and the failure surfaces as an install
|
|
182
|
+
error for a package the user has not tried to use yet.
|
|
183
|
+
|
|
184
|
+
Every download is **verified against the release's published `SHA256SUMS` before it
|
|
185
|
+
is executed**. Fetching a binary and running it unverified is a supply-chain hole
|
|
186
|
+
with a progress bar.
|
|
187
|
+
|
|
188
|
+
Prebuilt for:
|
|
189
|
+
|
|
190
|
+
| Platform | Target |
|
|
191
|
+
|---|---|
|
|
192
|
+
| Linux x86_64 (glibc) | `x86_64-unknown-linux-gnu` |
|
|
193
|
+
| Linux x86_64 (musl, auto-detected) | `x86_64-unknown-linux-musl` |
|
|
194
|
+
| Linux arm64 | `aarch64-unknown-linux-gnu` |
|
|
195
|
+
| macOS Intel | `x86_64-apple-darwin` |
|
|
196
|
+
| macOS Apple silicon | `aarch64-apple-darwin` |
|
|
197
|
+
| Windows x86_64 | `x86_64-pc-windows-msvc` |
|
|
198
|
+
|
|
199
|
+
Anywhere else, build from source — it is the same program:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
cargo install loopsmith
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## The distribution name
|
|
206
|
+
|
|
207
|
+
`loopsmith` on PyPI was already registered by an unrelated project, so this
|
|
208
|
+
distribution is `loopsmith-cli`. The installed command is `loopsmith` either way.
|
|
209
|
+
Elsewhere: [`loopsmith`](https://crates.io/crates/loopsmith) on crates.io,
|
|
210
|
+
[`@bitphill/loopsmith`](https://www.npmjs.com/package/@bitphill/loopsmith) on npm,
|
|
211
|
+
and the `bitphill/loopsmith` Homebrew tap.
|
|
212
|
+
|
|
213
|
+
## Documentation
|
|
214
|
+
|
|
215
|
+
- [Full README](https://github.com/bitphill/loopsmith#readme)
|
|
216
|
+
- [Section-by-section config reference](https://github.com/bitphill/loopsmith/blob/main/HOW-TO-USE.md)
|
|
217
|
+
- [Architecture and the reasoning behind it](https://github.com/bitphill/loopsmith/blob/main/README-DETAIL.md)
|
|
218
|
+
- [Thirteen worked examples](https://github.com/bitphill/loopsmith/tree/main/config/examples)
|
|
219
|
+
- [Changelog](https://github.com/bitphill/loopsmith/blob/main/CHANGELOG.md)
|
|
220
|
+
|
|
221
|
+
MIT licensed. © bitphill
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/bitphill/loopsmith/v0.1.3/assets/loopsmith-logo-256.png" alt="loopsmith" width="180" />
|
|
3
|
+
<h1>loopsmith</h1>
|
|
4
|
+
<p><em>Self-evolving agent loops. The gate is code, so "done" cannot be argued.</em></p>
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
[](https://pypi.org/project/loopsmith-cli/)
|
|
8
|
+
[](https://github.com/bitphill/loopsmith/blob/main/LICENSE)
|
|
9
|
+

|
|
10
|
+

|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install loopsmith-cli
|
|
14
|
+
loopsmith doctor
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
> **This distribution is a Rust binary, not a Python library.** There is nothing to
|
|
18
|
+
> `import`. It installs a `loopsmith` command. To drive loops from Python, use
|
|
19
|
+
> `subprocess` — its exit codes are its API.
|
|
20
|
+
|
|
21
|
+
## What it is
|
|
22
|
+
|
|
23
|
+
You describe a purpose in a config — goals, how each is checked, what counts as
|
|
24
|
+
success, when to stop, what the loop may never do. loopsmith handles scheduling,
|
|
25
|
+
provider routing, memory, verification, and termination, and can run for weeks
|
|
26
|
+
without you.
|
|
27
|
+
|
|
28
|
+
One rule holds the whole design up:
|
|
29
|
+
|
|
30
|
+
> **A model must not be the thing that certifies its own completion.**
|
|
31
|
+
|
|
32
|
+
`goal_satisfied` is written by a deterministic Rust gate and by nothing else, and
|
|
33
|
+
the gate can **revoke**: delete a required artifact and a satisfied goal flips
|
|
34
|
+
back. A system that can only promote is a burndown chart with extra steps.
|
|
35
|
+
|
|
36
|
+
## Five minutes
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install loopsmith-cli
|
|
40
|
+
|
|
41
|
+
# --path must be outside any repo you care about: a loop edits files and writes
|
|
42
|
+
# state, so it does not get pointed at the tool that runs it.
|
|
43
|
+
loopsmith new --path ~/loops/nightly-refactor --purpose "keep the module simple"
|
|
44
|
+
|
|
45
|
+
cd ~/loops/nightly-refactor
|
|
46
|
+
$EDITOR loop.yaml # your goals, and how each one is checked
|
|
47
|
+
loopsmith validate loop.yaml
|
|
48
|
+
loopsmith plan loop.yaml
|
|
49
|
+
./run.sh # run.cmd on Windows
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### `validate` fails on purpose
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
error pre_execution: 2 step(s) not marked done: Run this task manually end to
|
|
56
|
+
end at least once; Write down what 'done' means in checkable terms.
|
|
57
|
+
Automating before understanding produces fast, confident garbage
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
That refusal is the most valuable thing the tool does. Do the task by hand once —
|
|
61
|
+
the manual run *is* the spec. Mark each `pre_execution` step `done: true` once you
|
|
62
|
+
actually have.
|
|
63
|
+
|
|
64
|
+
## What a config looks like
|
|
65
|
+
|
|
66
|
+
Ten sections, **A** to **J**: information, the manual work list, goals,
|
|
67
|
+
validations, success criteria, stop gates, schedules, constraints, execution
|
|
68
|
+
guidelines, default skills. YAML or Markdown — the same model either way.
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
name: nightly-refactor
|
|
72
|
+
description: keep the payments module simple without breaking it
|
|
73
|
+
|
|
74
|
+
pre_execution:
|
|
75
|
+
- step: Ran the refactor by hand on one file and kept the diff
|
|
76
|
+
done: true
|
|
77
|
+
|
|
78
|
+
goals:
|
|
79
|
+
- name: simpler
|
|
80
|
+
description: Cyclomatic complexity down, behaviour unchanged.
|
|
81
|
+
|
|
82
|
+
validations:
|
|
83
|
+
- target: simpler
|
|
84
|
+
name: tests-still-pass
|
|
85
|
+
mode: objective
|
|
86
|
+
statement: The suite exits clean.
|
|
87
|
+
detector:
|
|
88
|
+
type: script
|
|
89
|
+
command: ./scripts/check-tests.sh
|
|
90
|
+
expect_exit: 0
|
|
91
|
+
blocking: true
|
|
92
|
+
|
|
93
|
+
success:
|
|
94
|
+
- target: overall
|
|
95
|
+
name: all-blocking-pass
|
|
96
|
+
mode: percentage
|
|
97
|
+
statement: Every blocking validation passes.
|
|
98
|
+
threshold: 1.0
|
|
99
|
+
|
|
100
|
+
stop_gates:
|
|
101
|
+
max_iterations: 8
|
|
102
|
+
max_revisions_per_node: 3
|
|
103
|
+
max_cost_usd: 5.0
|
|
104
|
+
no_progress_iterations: 3
|
|
105
|
+
|
|
106
|
+
graph:
|
|
107
|
+
nodes:
|
|
108
|
+
- id: refactor
|
|
109
|
+
role: builder
|
|
110
|
+
instruction: Simplify one function. State any assumption you had to make.
|
|
111
|
+
goals: [simpler]
|
|
112
|
+
isolated: true # its own git worktree
|
|
113
|
+
- id: review
|
|
114
|
+
role: judge
|
|
115
|
+
instruction: Check the diff against the brief. Pass or fail per check, with evidence.
|
|
116
|
+
depends_on: [refactor]
|
|
117
|
+
goals: [simpler]
|
|
118
|
+
tier: strong
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Detectors are `file_exists`, `regex`, `script`, and composites. Only a detector
|
|
122
|
+
can satisfy a goal — a model's opinion of its own work never does.
|
|
123
|
+
|
|
124
|
+
## While it runs
|
|
125
|
+
|
|
126
|
+
| Question | Command |
|
|
127
|
+
|---|---|
|
|
128
|
+
| What does the gate say? | `loopsmith status <config> <run-id>` |
|
|
129
|
+
| What happened? | `loopsmith ledger <config> <run-id>` |
|
|
130
|
+
| Why did it stop? | the last line of `logs/<run-id>.log` |
|
|
131
|
+
| What does it want changed about itself? | `loopsmith proposals <config> <run-id>` |
|
|
132
|
+
| Which providers can it reach? | `loopsmith providers <config>` |
|
|
133
|
+
| Will this machine get in the way? | `loopsmith doctor <config>` |
|
|
134
|
+
|
|
135
|
+
**The loop never edits its own config.** Changes to goals, validations, success
|
|
136
|
+
criteria, and sub-agent adoption are written as *proposals* for a human to apply.
|
|
137
|
+
|
|
138
|
+
## Providers and BYOK
|
|
139
|
+
|
|
140
|
+
Every provider is a command template, which is what makes bring-your-own-key
|
|
141
|
+
free: Claude Code, Ollama, a Grok CLI, an OpenAI-compatible endpoint driven by
|
|
142
|
+
`curl`, an MCP server over stdio — all of them are "a program you run with a
|
|
143
|
+
prompt". Adding one is a config edit, never a rebuild.
|
|
144
|
+
|
|
145
|
+
`requires_env` names variables that must **exist**. loopsmith never reads their
|
|
146
|
+
values, so a key cannot reach a prompt, a log, or the ledger.
|
|
147
|
+
|
|
148
|
+
> ⚠ Never paste an API key into a chat window, a config file, or an issue. If one
|
|
149
|
+
> ends up somewhere it should not be, rotate it — deleting the message is not
|
|
150
|
+
> enough.
|
|
151
|
+
|
|
152
|
+
## How this distribution installs the binary
|
|
153
|
+
|
|
154
|
+
The binary is fetched **on first run**, not during `pip install`, and cached under
|
|
155
|
+
`~/.loopsmith/bin/<version>/` (override with `LOOPSMITH_HOME`).
|
|
156
|
+
|
|
157
|
+
That is deliberate. A wheel that downloads at install time breaks in every
|
|
158
|
+
environment that installs without a network and runs with one — CI images, Docker
|
|
159
|
+
build stages, locked-down build hosts — and the failure surfaces as an install
|
|
160
|
+
error for a package the user has not tried to use yet.
|
|
161
|
+
|
|
162
|
+
Every download is **verified against the release's published `SHA256SUMS` before it
|
|
163
|
+
is executed**. Fetching a binary and running it unverified is a supply-chain hole
|
|
164
|
+
with a progress bar.
|
|
165
|
+
|
|
166
|
+
Prebuilt for:
|
|
167
|
+
|
|
168
|
+
| Platform | Target |
|
|
169
|
+
|---|---|
|
|
170
|
+
| Linux x86_64 (glibc) | `x86_64-unknown-linux-gnu` |
|
|
171
|
+
| Linux x86_64 (musl, auto-detected) | `x86_64-unknown-linux-musl` |
|
|
172
|
+
| Linux arm64 | `aarch64-unknown-linux-gnu` |
|
|
173
|
+
| macOS Intel | `x86_64-apple-darwin` |
|
|
174
|
+
| macOS Apple silicon | `aarch64-apple-darwin` |
|
|
175
|
+
| Windows x86_64 | `x86_64-pc-windows-msvc` |
|
|
176
|
+
|
|
177
|
+
Anywhere else, build from source — it is the same program:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
cargo install loopsmith
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## The distribution name
|
|
184
|
+
|
|
185
|
+
`loopsmith` on PyPI was already registered by an unrelated project, so this
|
|
186
|
+
distribution is `loopsmith-cli`. The installed command is `loopsmith` either way.
|
|
187
|
+
Elsewhere: [`loopsmith`](https://crates.io/crates/loopsmith) on crates.io,
|
|
188
|
+
[`@bitphill/loopsmith`](https://www.npmjs.com/package/@bitphill/loopsmith) on npm,
|
|
189
|
+
and the `bitphill/loopsmith` Homebrew tap.
|
|
190
|
+
|
|
191
|
+
## Documentation
|
|
192
|
+
|
|
193
|
+
- [Full README](https://github.com/bitphill/loopsmith#readme)
|
|
194
|
+
- [Section-by-section config reference](https://github.com/bitphill/loopsmith/blob/main/HOW-TO-USE.md)
|
|
195
|
+
- [Architecture and the reasoning behind it](https://github.com/bitphill/loopsmith/blob/main/README-DETAIL.md)
|
|
196
|
+
- [Thirteen worked examples](https://github.com/bitphill/loopsmith/tree/main/config/examples)
|
|
197
|
+
- [Changelog](https://github.com/bitphill/loopsmith/blob/main/CHANGELOG.md)
|
|
198
|
+
|
|
199
|
+
MIT licensed. © bitphill
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
# `loopsmith` on PyPI was already registered by an unrelated project, so the
|
|
7
7
|
# distribution is `loopsmith-cli`. The installed command is `loopsmith`.
|
|
8
8
|
name = "loopsmith-cli"
|
|
9
|
-
version = "0.1.
|
|
9
|
+
version = "0.1.3"
|
|
10
10
|
description = "Self-evolving agent loops behind a deterministic verification gate. Installs the prebuilt Rust binary as `loopsmith`."
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
license = "MIT"
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: loopsmith-cli
|
|
3
|
+
Version: 0.1.3
|
|
4
|
+
Summary: Self-evolving agent loops behind a deterministic verification gate. Installs the prebuilt Rust binary as `loopsmith`.
|
|
5
|
+
Author-email: bitphill <bitphill@tuta.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/bitphill/loopsmith
|
|
8
|
+
Project-URL: Repository, https://github.com/bitphill/loopsmith
|
|
9
|
+
Project-URL: Changelog, https://github.com/bitphill/loopsmith/blob/main/CHANGELOG.md
|
|
10
|
+
Project-URL: Issues, https://github.com/bitphill/loopsmith/issues
|
|
11
|
+
Keywords: agent,loop,llm,orchestration,cli,rust
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
17
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
+
Classifier: Programming Language :: Rust
|
|
19
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
20
|
+
Requires-Python: >=3.8
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
<div align="center">
|
|
24
|
+
<img src="https://raw.githubusercontent.com/bitphill/loopsmith/v0.1.3/assets/loopsmith-logo-256.png" alt="loopsmith" width="180" />
|
|
25
|
+
<h1>loopsmith</h1>
|
|
26
|
+
<p><em>Self-evolving agent loops. The gate is code, so "done" cannot be argued.</em></p>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
[](https://pypi.org/project/loopsmith-cli/)
|
|
30
|
+
[](https://github.com/bitphill/loopsmith/blob/main/LICENSE)
|
|
31
|
+

|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install loopsmith-cli
|
|
36
|
+
loopsmith doctor
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
> **This distribution is a Rust binary, not a Python library.** There is nothing to
|
|
40
|
+
> `import`. It installs a `loopsmith` command. To drive loops from Python, use
|
|
41
|
+
> `subprocess` — its exit codes are its API.
|
|
42
|
+
|
|
43
|
+
## What it is
|
|
44
|
+
|
|
45
|
+
You describe a purpose in a config — goals, how each is checked, what counts as
|
|
46
|
+
success, when to stop, what the loop may never do. loopsmith handles scheduling,
|
|
47
|
+
provider routing, memory, verification, and termination, and can run for weeks
|
|
48
|
+
without you.
|
|
49
|
+
|
|
50
|
+
One rule holds the whole design up:
|
|
51
|
+
|
|
52
|
+
> **A model must not be the thing that certifies its own completion.**
|
|
53
|
+
|
|
54
|
+
`goal_satisfied` is written by a deterministic Rust gate and by nothing else, and
|
|
55
|
+
the gate can **revoke**: delete a required artifact and a satisfied goal flips
|
|
56
|
+
back. A system that can only promote is a burndown chart with extra steps.
|
|
57
|
+
|
|
58
|
+
## Five minutes
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip install loopsmith-cli
|
|
62
|
+
|
|
63
|
+
# --path must be outside any repo you care about: a loop edits files and writes
|
|
64
|
+
# state, so it does not get pointed at the tool that runs it.
|
|
65
|
+
loopsmith new --path ~/loops/nightly-refactor --purpose "keep the module simple"
|
|
66
|
+
|
|
67
|
+
cd ~/loops/nightly-refactor
|
|
68
|
+
$EDITOR loop.yaml # your goals, and how each one is checked
|
|
69
|
+
loopsmith validate loop.yaml
|
|
70
|
+
loopsmith plan loop.yaml
|
|
71
|
+
./run.sh # run.cmd on Windows
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### `validate` fails on purpose
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
error pre_execution: 2 step(s) not marked done: Run this task manually end to
|
|
78
|
+
end at least once; Write down what 'done' means in checkable terms.
|
|
79
|
+
Automating before understanding produces fast, confident garbage
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
That refusal is the most valuable thing the tool does. Do the task by hand once —
|
|
83
|
+
the manual run *is* the spec. Mark each `pre_execution` step `done: true` once you
|
|
84
|
+
actually have.
|
|
85
|
+
|
|
86
|
+
## What a config looks like
|
|
87
|
+
|
|
88
|
+
Ten sections, **A** to **J**: information, the manual work list, goals,
|
|
89
|
+
validations, success criteria, stop gates, schedules, constraints, execution
|
|
90
|
+
guidelines, default skills. YAML or Markdown — the same model either way.
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
name: nightly-refactor
|
|
94
|
+
description: keep the payments module simple without breaking it
|
|
95
|
+
|
|
96
|
+
pre_execution:
|
|
97
|
+
- step: Ran the refactor by hand on one file and kept the diff
|
|
98
|
+
done: true
|
|
99
|
+
|
|
100
|
+
goals:
|
|
101
|
+
- name: simpler
|
|
102
|
+
description: Cyclomatic complexity down, behaviour unchanged.
|
|
103
|
+
|
|
104
|
+
validations:
|
|
105
|
+
- target: simpler
|
|
106
|
+
name: tests-still-pass
|
|
107
|
+
mode: objective
|
|
108
|
+
statement: The suite exits clean.
|
|
109
|
+
detector:
|
|
110
|
+
type: script
|
|
111
|
+
command: ./scripts/check-tests.sh
|
|
112
|
+
expect_exit: 0
|
|
113
|
+
blocking: true
|
|
114
|
+
|
|
115
|
+
success:
|
|
116
|
+
- target: overall
|
|
117
|
+
name: all-blocking-pass
|
|
118
|
+
mode: percentage
|
|
119
|
+
statement: Every blocking validation passes.
|
|
120
|
+
threshold: 1.0
|
|
121
|
+
|
|
122
|
+
stop_gates:
|
|
123
|
+
max_iterations: 8
|
|
124
|
+
max_revisions_per_node: 3
|
|
125
|
+
max_cost_usd: 5.0
|
|
126
|
+
no_progress_iterations: 3
|
|
127
|
+
|
|
128
|
+
graph:
|
|
129
|
+
nodes:
|
|
130
|
+
- id: refactor
|
|
131
|
+
role: builder
|
|
132
|
+
instruction: Simplify one function. State any assumption you had to make.
|
|
133
|
+
goals: [simpler]
|
|
134
|
+
isolated: true # its own git worktree
|
|
135
|
+
- id: review
|
|
136
|
+
role: judge
|
|
137
|
+
instruction: Check the diff against the brief. Pass or fail per check, with evidence.
|
|
138
|
+
depends_on: [refactor]
|
|
139
|
+
goals: [simpler]
|
|
140
|
+
tier: strong
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Detectors are `file_exists`, `regex`, `script`, and composites. Only a detector
|
|
144
|
+
can satisfy a goal — a model's opinion of its own work never does.
|
|
145
|
+
|
|
146
|
+
## While it runs
|
|
147
|
+
|
|
148
|
+
| Question | Command |
|
|
149
|
+
|---|---|
|
|
150
|
+
| What does the gate say? | `loopsmith status <config> <run-id>` |
|
|
151
|
+
| What happened? | `loopsmith ledger <config> <run-id>` |
|
|
152
|
+
| Why did it stop? | the last line of `logs/<run-id>.log` |
|
|
153
|
+
| What does it want changed about itself? | `loopsmith proposals <config> <run-id>` |
|
|
154
|
+
| Which providers can it reach? | `loopsmith providers <config>` |
|
|
155
|
+
| Will this machine get in the way? | `loopsmith doctor <config>` |
|
|
156
|
+
|
|
157
|
+
**The loop never edits its own config.** Changes to goals, validations, success
|
|
158
|
+
criteria, and sub-agent adoption are written as *proposals* for a human to apply.
|
|
159
|
+
|
|
160
|
+
## Providers and BYOK
|
|
161
|
+
|
|
162
|
+
Every provider is a command template, which is what makes bring-your-own-key
|
|
163
|
+
free: Claude Code, Ollama, a Grok CLI, an OpenAI-compatible endpoint driven by
|
|
164
|
+
`curl`, an MCP server over stdio — all of them are "a program you run with a
|
|
165
|
+
prompt". Adding one is a config edit, never a rebuild.
|
|
166
|
+
|
|
167
|
+
`requires_env` names variables that must **exist**. loopsmith never reads their
|
|
168
|
+
values, so a key cannot reach a prompt, a log, or the ledger.
|
|
169
|
+
|
|
170
|
+
> ⚠ Never paste an API key into a chat window, a config file, or an issue. If one
|
|
171
|
+
> ends up somewhere it should not be, rotate it — deleting the message is not
|
|
172
|
+
> enough.
|
|
173
|
+
|
|
174
|
+
## How this distribution installs the binary
|
|
175
|
+
|
|
176
|
+
The binary is fetched **on first run**, not during `pip install`, and cached under
|
|
177
|
+
`~/.loopsmith/bin/<version>/` (override with `LOOPSMITH_HOME`).
|
|
178
|
+
|
|
179
|
+
That is deliberate. A wheel that downloads at install time breaks in every
|
|
180
|
+
environment that installs without a network and runs with one — CI images, Docker
|
|
181
|
+
build stages, locked-down build hosts — and the failure surfaces as an install
|
|
182
|
+
error for a package the user has not tried to use yet.
|
|
183
|
+
|
|
184
|
+
Every download is **verified against the release's published `SHA256SUMS` before it
|
|
185
|
+
is executed**. Fetching a binary and running it unverified is a supply-chain hole
|
|
186
|
+
with a progress bar.
|
|
187
|
+
|
|
188
|
+
Prebuilt for:
|
|
189
|
+
|
|
190
|
+
| Platform | Target |
|
|
191
|
+
|---|---|
|
|
192
|
+
| Linux x86_64 (glibc) | `x86_64-unknown-linux-gnu` |
|
|
193
|
+
| Linux x86_64 (musl, auto-detected) | `x86_64-unknown-linux-musl` |
|
|
194
|
+
| Linux arm64 | `aarch64-unknown-linux-gnu` |
|
|
195
|
+
| macOS Intel | `x86_64-apple-darwin` |
|
|
196
|
+
| macOS Apple silicon | `aarch64-apple-darwin` |
|
|
197
|
+
| Windows x86_64 | `x86_64-pc-windows-msvc` |
|
|
198
|
+
|
|
199
|
+
Anywhere else, build from source — it is the same program:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
cargo install loopsmith
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## The distribution name
|
|
206
|
+
|
|
207
|
+
`loopsmith` on PyPI was already registered by an unrelated project, so this
|
|
208
|
+
distribution is `loopsmith-cli`. The installed command is `loopsmith` either way.
|
|
209
|
+
Elsewhere: [`loopsmith`](https://crates.io/crates/loopsmith) on crates.io,
|
|
210
|
+
[`@bitphill/loopsmith`](https://www.npmjs.com/package/@bitphill/loopsmith) on npm,
|
|
211
|
+
and the `bitphill/loopsmith` Homebrew tap.
|
|
212
|
+
|
|
213
|
+
## Documentation
|
|
214
|
+
|
|
215
|
+
- [Full README](https://github.com/bitphill/loopsmith#readme)
|
|
216
|
+
- [Section-by-section config reference](https://github.com/bitphill/loopsmith/blob/main/HOW-TO-USE.md)
|
|
217
|
+
- [Architecture and the reasoning behind it](https://github.com/bitphill/loopsmith/blob/main/README-DETAIL.md)
|
|
218
|
+
- [Thirteen worked examples](https://github.com/bitphill/loopsmith/tree/main/config/examples)
|
|
219
|
+
- [Changelog](https://github.com/bitphill/loopsmith/blob/main/CHANGELOG.md)
|
|
220
|
+
|
|
221
|
+
MIT licensed. © bitphill
|
loopsmith_cli-0.1.2/PKG-INFO
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: loopsmith-cli
|
|
3
|
-
Version: 0.1.2
|
|
4
|
-
Summary: Self-evolving agent loops behind a deterministic verification gate. Installs the prebuilt Rust binary as `loopsmith`.
|
|
5
|
-
Author-email: bitphill <bitphill@tuta.com>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/bitphill/loopsmith
|
|
8
|
-
Project-URL: Repository, https://github.com/bitphill/loopsmith
|
|
9
|
-
Project-URL: Changelog, https://github.com/bitphill/loopsmith/blob/main/CHANGELOG.md
|
|
10
|
-
Project-URL: Issues, https://github.com/bitphill/loopsmith/issues
|
|
11
|
-
Keywords: agent,loop,llm,orchestration,cli,rust
|
|
12
|
-
Classifier: Development Status :: 4 - Beta
|
|
13
|
-
Classifier: Environment :: Console
|
|
14
|
-
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
-
Classifier: Operating System :: MacOS :: MacOS X
|
|
17
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
-
Classifier: Programming Language :: Rust
|
|
19
|
-
Classifier: Topic :: Software Development :: Build Tools
|
|
20
|
-
Requires-Python: >=3.8
|
|
21
|
-
Description-Content-Type: text/markdown
|
|
22
|
-
|
|
23
|
-
# loopsmith-cli
|
|
24
|
-
|
|
25
|
-
Self-evolving agent loops. The gate is code, so "done" cannot be argued.
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
pip install loopsmith-cli
|
|
29
|
-
loopsmith doctor
|
|
30
|
-
loopsmith new --path ~/loops/my-loop --purpose "keep the module simple"
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
This package downloads the prebuilt Rust binary for your platform on first run,
|
|
34
|
-
from the matching
|
|
35
|
-
[GitHub release](https://github.com/bitphill/loopsmith/releases), and verifies it
|
|
36
|
-
against the release's published `SHA256SUMS` before executing it. The installed
|
|
37
|
-
command is `loopsmith`.
|
|
38
|
-
|
|
39
|
-
Prebuilt for Linux (x86_64 glibc and musl, aarch64), macOS (x86_64 and Apple
|
|
40
|
-
silicon), and Windows (x86_64). Anywhere else, build from source:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
cargo install loopsmith
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
The distribution is named `loopsmith-cli` because `loopsmith` on PyPI was already
|
|
47
|
-
registered by an unrelated project. The command is `loopsmith` regardless.
|
|
48
|
-
|
|
49
|
-
The download happens on first run rather than during `pip install`, so an image
|
|
50
|
-
that is built without a network and run with one still works.
|
|
51
|
-
|
|
52
|
-
Full documentation: <https://github.com/bitphill/loopsmith>
|
|
53
|
-
|
|
54
|
-
MIT licensed.
|
loopsmith_cli-0.1.2/README.md
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# loopsmith-cli
|
|
2
|
-
|
|
3
|
-
Self-evolving agent loops. The gate is code, so "done" cannot be argued.
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
pip install loopsmith-cli
|
|
7
|
-
loopsmith doctor
|
|
8
|
-
loopsmith new --path ~/loops/my-loop --purpose "keep the module simple"
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
This package downloads the prebuilt Rust binary for your platform on first run,
|
|
12
|
-
from the matching
|
|
13
|
-
[GitHub release](https://github.com/bitphill/loopsmith/releases), and verifies it
|
|
14
|
-
against the release's published `SHA256SUMS` before executing it. The installed
|
|
15
|
-
command is `loopsmith`.
|
|
16
|
-
|
|
17
|
-
Prebuilt for Linux (x86_64 glibc and musl, aarch64), macOS (x86_64 and Apple
|
|
18
|
-
silicon), and Windows (x86_64). Anywhere else, build from source:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
cargo install loopsmith
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
The distribution is named `loopsmith-cli` because `loopsmith` on PyPI was already
|
|
25
|
-
registered by an unrelated project. The command is `loopsmith` regardless.
|
|
26
|
-
|
|
27
|
-
The download happens on first run rather than during `pip install`, so an image
|
|
28
|
-
that is built without a network and run with one still works.
|
|
29
|
-
|
|
30
|
-
Full documentation: <https://github.com/bitphill/loopsmith>
|
|
31
|
-
|
|
32
|
-
MIT licensed.
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: loopsmith-cli
|
|
3
|
-
Version: 0.1.2
|
|
4
|
-
Summary: Self-evolving agent loops behind a deterministic verification gate. Installs the prebuilt Rust binary as `loopsmith`.
|
|
5
|
-
Author-email: bitphill <bitphill@tuta.com>
|
|
6
|
-
License-Expression: MIT
|
|
7
|
-
Project-URL: Homepage, https://github.com/bitphill/loopsmith
|
|
8
|
-
Project-URL: Repository, https://github.com/bitphill/loopsmith
|
|
9
|
-
Project-URL: Changelog, https://github.com/bitphill/loopsmith/blob/main/CHANGELOG.md
|
|
10
|
-
Project-URL: Issues, https://github.com/bitphill/loopsmith/issues
|
|
11
|
-
Keywords: agent,loop,llm,orchestration,cli,rust
|
|
12
|
-
Classifier: Development Status :: 4 - Beta
|
|
13
|
-
Classifier: Environment :: Console
|
|
14
|
-
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
-
Classifier: Operating System :: MacOS :: MacOS X
|
|
17
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
-
Classifier: Programming Language :: Rust
|
|
19
|
-
Classifier: Topic :: Software Development :: Build Tools
|
|
20
|
-
Requires-Python: >=3.8
|
|
21
|
-
Description-Content-Type: text/markdown
|
|
22
|
-
|
|
23
|
-
# loopsmith-cli
|
|
24
|
-
|
|
25
|
-
Self-evolving agent loops. The gate is code, so "done" cannot be argued.
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
pip install loopsmith-cli
|
|
29
|
-
loopsmith doctor
|
|
30
|
-
loopsmith new --path ~/loops/my-loop --purpose "keep the module simple"
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
This package downloads the prebuilt Rust binary for your platform on first run,
|
|
34
|
-
from the matching
|
|
35
|
-
[GitHub release](https://github.com/bitphill/loopsmith/releases), and verifies it
|
|
36
|
-
against the release's published `SHA256SUMS` before executing it. The installed
|
|
37
|
-
command is `loopsmith`.
|
|
38
|
-
|
|
39
|
-
Prebuilt for Linux (x86_64 glibc and musl, aarch64), macOS (x86_64 and Apple
|
|
40
|
-
silicon), and Windows (x86_64). Anywhere else, build from source:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
cargo install loopsmith
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
The distribution is named `loopsmith-cli` because `loopsmith` on PyPI was already
|
|
47
|
-
registered by an unrelated project. The command is `loopsmith` regardless.
|
|
48
|
-
|
|
49
|
-
The download happens on first run rather than during `pip install`, so an image
|
|
50
|
-
that is built without a network and run with one still works.
|
|
51
|
-
|
|
52
|
-
Full documentation: <https://github.com/bitphill/loopsmith>
|
|
53
|
-
|
|
54
|
-
MIT licensed.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|