swarm repositories / source
aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: b2bd6cdea71ea5f90d7ef40f63705e09e2d38455 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# Fidget Spinner

Fidget Spinner is a local-first frontier ledger for long-running optimization
work.

It is intentionally not a general research notebook. It is a hard scientific
spine:

- `frontier` is scope and grounding, not a graph node
- `hypothesis` is a real graph vertex
- `experiment` is a real graph vertex with one mandatory owning hypothesis
- influence edges form a sparse DAG over that canonical tree spine
- `artifact` is an external reference only; Spinner never reads artifact bodies

The product goal is token austerity. `frontier.open` is the only sanctioned
overview dump. Everything else should require deliberate traversal one object at
a time.

## Current Model

The ledger has four first-class object families:

- `frontier`
  - a named scope
  - owns one mutable `brief`
  - partitions hypotheses and experiments
- `hypothesis`
  - terse claim or intervention
  - title + summary + exactly one paragraph of body
- `experiment`
  - open or closed
  - belongs to exactly one hypothesis
  - may cite other hypotheses or experiments as influences
  - when closed, stores dimensions, metrics, verdict, rationale, and optional analysis
- `artifact`
  - reference to an external document, link, log, plot, table, dump, or binary
  - attaches to frontiers, hypotheses, or experiments
  - only metadata and locator live in Spinner
  - Spinner never reads the body

There are no canonical freeform `note` or `source` nodes anymore. If a piece of
text does not belong in a frontier brief, hypothesis, or experiment analysis, it
probably belongs outside Spinner as an artifact.

## Design Rules

- `frontier.open` is the only overview surface.
- No broad prose dumps in list-like tools.
- Artifact bodies are never read through Spinner.
- Live metrics are derived, not manually curated.
- Selectors are permissive: UUID or slug, one field, no parallel `_id` / `_slug`.
- Slow intentional graph walking is preferred to burning context on giant feeds.

## Local Install

Install the release CLI into `~/.local/bin` and refresh the bundled skill
symlinks in `~/.codex/skills`:

```bash
./scripts/install-local.sh
```

The installed binary is `~/.local/bin/fidget-spinner-cli`.

## Quickstart

Initialize a project:

```bash
cargo run -p fidget-spinner-cli -- init --project . --name libgrid
```

Register the tag, metric, and run-dimension vocabulary before heavy ingest:

```bash
cargo run -p fidget-spinner-cli -- tag add \
  --project . \
  --name root-conquest \
  --description "Root-cash-out work"
```

```bash
cargo run -p fidget-spinner-cli -- metric define \
  --project . \
  --key nodes_solved \
  --unit count \
  --objective maximize \
  --visibility canonical \
  --description "Solved search nodes on the target rail"
```

```bash
cargo run -p fidget-spinner-cli -- dimension define \
  --project . \
  --key instance \
  --value-type string \
  --description "Workload slice"
```

Create a frontier:

```bash
cargo run -p fidget-spinner-cli -- frontier create \
  --project . \
  --label "native mip" \
  --objective "Drive braid-rail LP cash-out" \
  --slug native-mip
```

Write the frontier brief:

```bash
cargo run -p fidget-spinner-cli -- frontier update-brief \
  --project . \
  --frontier native-mip \
  --situation "Root LP spend is understood; node-local LP churn is the active frontier."
```

Record a hypothesis:

```bash
cargo run -p fidget-spinner-cli -- hypothesis record \
  --project . \
  --frontier native-mip \
  --slug node-local-loop \
  --title "Node-local logical cut loop" \
  --summary "Push cut cash-out below root." \
  --body "Thread node-local logical cuts through native LP reoptimization so the same intervention can cash out below root on parity rails without corrupting root ownership semantics." \
  --tag root-conquest
```

Open an experiment:

```bash
cargo run -p fidget-spinner-cli -- experiment open \
  --project . \
  --hypothesis node-local-loop \
  --slug parity-20s \
  --title "Parity rail 20s" \
  --summary "Live challenger on the canonical braid slice." \
  --tag root-conquest
```

Close an experiment:

```bash
cargo run -p fidget-spinner-cli -- experiment close \
  --project . \
  --experiment parity-20s \
  --backend manual \
  --argv matched-lp-site-traces \
  --dimension instance=4x5-braid \
  --primary-metric nodes_solved=273 \
  --verdict accepted \
  --rationale "Matched LP site traces isolate node reoptimization as the dominant native LP sink."
```

Record an external artifact by reference:

```bash
cargo run -p fidget-spinner-cli -- artifact record \
  --project . \
  --kind document \
  --slug lp-review-doc \
  --label "LP review tranche" \
  --summary "External markdown tranche." \
  --locator /abs/path/to/review.md \
  --attach hypothesis:node-local-loop
```

Inspect live metrics:

```bash
cargo run -p fidget-spinner-cli -- metric keys --project . --frontier native-mip --scope live
```

```bash
cargo run -p fidget-spinner-cli -- metric best \
  --project . \
  --frontier native-mip \
  --hypothesis node-local-loop \
  --key nodes_solved
```

## MCP Surface

Serve the MCP host:

```bash
cargo run -p fidget-spinner-cli -- mcp serve
```

If the host starts unbound, bind it with:

```json
{"name":"project.bind","arguments":{"path":"<project-root-or-nested-path>"}}
```

The main model-facing tools are:

- `system.health`
- `system.telemetry`
- `project.bind`
- `project.status`
- `tag.add`
- `tag.list`
- `frontier.create`
- `frontier.list`
- `frontier.read`
- `frontier.open`
- `frontier.brief.update`
- `frontier.history`
- `hypothesis.record`
- `hypothesis.list`
- `hypothesis.read`
- `hypothesis.update`
- `hypothesis.history`
- `experiment.open`
- `experiment.list`
- `experiment.read`
- `experiment.update`
- `experiment.close`
- `experiment.history`
- `artifact.record`
- `artifact.list`
- `artifact.read`
- `artifact.update`
- `artifact.history`
- `metric.define`
- `metric.keys`
- `metric.best`
- `run.dimension.define`
- `run.dimension.list`

`frontier.open` is the grounding call. It returns:

- frontier brief
- active tags
- live metric keys
- active hypotheses with deduped current state
- open experiments

Everything deeper should be fetched by explicit selector.

## Navigator

Serve the local navigator:

```bash
cargo run -p fidget-spinner-cli -- ui serve --path . --bind 127.0.0.1:8913
```

`ui serve --path` accepts:

- the project root
- `.fidget_spinner/`
- any descendant inside `.fidget_spinner/`
- a parent containing exactly one descendant store

The navigator mirrors the product philosophy:

- root page lists frontiers
- frontier page is the only overview
- hypothesis / experiment / artifact pages are detail reads
- local navigation happens card-to-card
- artifact bodies are never surfaced

## Store Layout

Each initialized project gets:

```text
.fidget_spinner/
    project.json
    state.sqlite
```

In git-backed projects `.fidget_spinner/` normally belongs in `.gitignore` or
`.git/info/exclude`.

## Doctrine

- hypotheses are short and disciplined
- experiments carry the real scientific record
- verdicts are explicit: `accepted`, `kept`, `parked`, `rejected`
- artifacts keep large text and dumps off the token hot path
- live metrics answer “what matters now?”, not “what has ever existed?”
- the ledger is about experimental truth, not recreating git inside the database