bareloop 0.5.1 → 0.7.0

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.
package/README.md CHANGED
@@ -25,15 +25,32 @@ inheritance with ledger-counted attribution.
25
25
  The pitch in one line: **workflows that earn their own design, with receipts** — every
26
26
  inherited rule carries the green that minted it and the contrast that attributed it.
27
27
 
28
+ **What you keep is the workflow, not the session.** An agent figures your recurring,
29
+ verifiable job out once; what survives is a verified, self-healing workflow you can run
30
+ again — with bounded spend under an envelope *you* sign, deterministic verification you
31
+ don't author, and cost and time reported honestly (an unknown is reported unknown, never
32
+ rounded to zero). *Direction, not yet shipped:* a local workbench where you experiment with
33
+ a job, graduate a workflow once it greens, and **export** it — signed spec, workflow, close
34
+ scripts and a thin runner that depends on bareloop, so the whole self-healing library
35
+ (bare-agent · bareguard · litectx) comes along as npm dependencies. That bundle runs
36
+ headless as an enclosed CLI and asks you the same signing questions at the prompt that the
37
+ workbench would. It is a dependency, never generated standalone code: the gate travels with
38
+ it and never disappears.
39
+
28
40
  > **Status: Layer 2 — accepted.** The agent now authors its own workflow: `runJob()`
29
41
  > takes a signed job spec, surveys the repo, **drafts a validated plan of bounded steps**
30
42
  > (each with an operator-signed self-check it may reference but never author), and runs it
31
43
  > under an un-gameable outer close and one budget it can only tighten. On the real-model
32
44
  > acceptance battery (F47) the emergent flow converted a job the same worker failed 4/4
33
45
  > before — 3/3 runs, clearing the owned bar every time, composing its own check exits. The
34
- > within-run ratchet (Layer R) ships armed-and-inert by measurement (F41). Next: **N3 —
35
- > executed inheritance**, where the workflow persists and improves across runs (the
36
- > ladder's kill-switch question).
46
+ > within-run ratchet (Layer R) ships armed-and-inert by measurement (F41). **In flight:
47
+ > N3 — executed inheritance**, where a workflow that greened is kept, offered to the next
48
+ > similar job, and improved as executed instead of drafted from scratch (the ladder's
49
+ > kill-switch question). As of 0.7.0 N3's machinery **ships** — the bridge registry, the
50
+ > operator-signed reuse envelope, the selection call and step-level resume are all in the
51
+ > public API — but shipping is not acceptance: one execution green proves reuse safe and
52
+ > legal, never *beneficial*. The lift claim waits on the ON-vs-forced-cold contrast, which
53
+ > has not fired. Until it does, treat reuse as available and unproven.
37
54
 
38
55
  ## Quick start
39
56
 
@@ -60,26 +77,36 @@ Three layers; nothing inside negotiates with the layer above it.
60
77
  | Layer | What it is | Emergent? |
61
78
  |---|---|---|
62
79
  | **Outer shell** | Per-run budget cap (bareguard), retry cap, verdict collection, escalation routing. Stateless across runs | never — permanent, dumb, un-gameable |
63
- | **Emergent middle** | The authored workflow config: steps, per-step verdict class, memory binding, write scopes — schema-validated, config-red before tokens burn | yes — authored and improved by the agent |
80
+ | **Emergent middle** | The authored plan: bounded steps, each with its granted verbs, its own round cap, its write scope and its form-checkable exits — schema-validated, red before tokens burn. A step keeps iterating while it is making progress; when it stops, the shell ends it and the planner re-allocates | yes — authored and improved by the agent |
64
81
  | **Floor** | Append-only JSONL spine (single source for every UI), litectx store per job, per-run ledger | never — the record |
65
82
 
66
- Every checkpoint in a workflow carries its own **verdict class**, and the class decides
67
- what the run's learning is worth:
83
+ Every job declares a **verdict class**, and the class decides what the run's learning is
84
+ worth. Today exactly one is built:
68
85
 
69
- | Verdict | Truth source | Mints inheritance? |
70
- |---|---|---|
71
- | **Hard green** | predicate / exit-code (tests, build, lint) | automatically |
72
- | **Soft green** | rubric / assessment | only with HITL confirm or N consistent repeats |
73
- | **HITL green** | a human is the close (PR merge, "publish") | yes — and merge stays human, forever |
86
+ | Verdict | Truth source | Mints inheritance? | Status |
87
+ |---|---|---|---|
88
+ | **Hard green** | predicate / exit-code (tests, build, lint) | automatically | **built** |
89
+ | **Soft green** | rubric / assessment | only with HITL confirm or N consistent repeats | declared, not built (rung N4) |
90
+ | **HITL green** | a human is the close (PR merge, "publish") | yes — and merge stays human, forever | declared, not built (rung N4) |
74
91
 
75
92
  The full bare-suite surface is *disclosed* to the authoring agent; only *admitted* verbs
76
93
  are callable per job. A request against a locked primitive is a structured red — real
77
94
  diagnostic signal, and the admission path when it's justified.
78
95
 
96
+ ## Security posture — honest about the boundary
97
+
98
+ bareloop runs **locally**, as you. Secrets load from the environment and never enter the
99
+ tree, the spine, the configs or the ledger — and the close child, which executes the code
100
+ the worker just wrote, gets its environment **stripped of credential-shaped variables**
101
+ (provider keys, `AWS_*`, anything named `*_TOKEN`/`*_SECRET`/`*_PASSWORD`/`*_API_KEY`):
102
+ nothing that judges a tree needs them. That is exposure reduction, **not a sandbox** — the
103
+ worker's code still runs with your OS permissions and network access, so treat a bareloop
104
+ run as inside your trust boundary and give it a repo you'd let an agent touch.
105
+
79
106
  ## The science behind it
80
107
 
81
108
  bareloop is the productization of **[adaptlearn](https://github.com/hamr0/adaptlearn)**
82
- (archived at v0.11.1) — a closed experimental record, findings F1–F20. What it settled,
109
+ (archived at v0.11.1) — a closed experimental record, findings F1–F23. What it settled,
83
110
  bareloop consumes without re-proving:
84
111
 
85
112
  | Mechanism | Evidence |
@@ -104,7 +131,7 @@ ladder, and the stop is a result.
104
131
  | **N1** ✅ | Job/close schema + validator — v0.2.0 |
105
132
  | **N2** ✅ | Single-job headless loop — job #1 minimal (review→fix→PR, hard greens only) — v0.3.0 |
106
133
  | **Layer R** ✅ | Within-run ratchet: shell-side fixation detector (intent) + rejected-edit feedback (outcome), **shipped OFF by default** (F41: fixation in remission, so ON has never won its A/B; F43 split the two axes; field read + default decision defer to Layer 2) — v0.4.0 |
107
- | **Layer 2** | plan-v1 micro-wheels — the road: bounded steps with in-run verifiable exits (the F39-measured semantic converter) |
134
+ | **Layer 2** ✅ | plan-v1 micro-wheels — the road: bounded steps with in-run verifiable exits (the F39-measured semantic converter), accepted on the real-model battery (F47) — v0.5.0, then finished by T·A·P·U (a wall clock, variance-triggered replan, the 14-verb palette, user-mode e2e) |
108
135
  | **N3** | Executed inheritance + contrast-bit extractor — **kill-switch: rules must transmit across non-identical runs** |
109
136
  | **N4** | Verdict classes complete (soft/HITL minting) |
110
137
  | **N5** | Scheduler + budget ops |