-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathllms-full.txt
More file actions
8767 lines (6789 loc) · 456 KB
/
llms-full.txt
File metadata and controls
8767 lines (6789 loc) · 456 KB
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
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# ZERO LLM Full Context
Generated by `scripts/generate_llms_full.py` from selected public docs.
Use this bundle for retrieval and coding agents. It is not evidence of live trading readiness.
## Sources
- `README.md`
- `AGENTS.md`
- `.claude/commands/README.md`
- `CONTRIBUTING.md`
- `GOVERNANCE.md`
- `.github/CODEOWNERS`
- `SECURITY.md`
- `docs/llms.txt`
- `docs/first-10-minutes.md`
- `docs/local-development.md`
- `docs/proof/README.md`
- `docs/architecture.md`
- `docs/agent-architecture.md`
- `docs/cli-quickstart.md`
- `docs/cli-doctor-troubleshooting.md`
- `docs/railway-template.md`
- `docs/vibe-deploy.md`
- `docs/api.md`
- `docs/memory-core.md`
- `docs/genesis.md`
- `docs/research.md`
- `docs/evolve.md`
- `docs/mcp.md`
- `docs/mcp-registry.md`
- `docs/mcp/transcript.jsonl`
- `docs/api-compatibility.md`
- `docs/runtime-bus.md`
- `docs/journal-integrity.md`
- `docs/safety-model.md`
- `docs/threat-model.md`
- `docs/failure-modes-autonomous-loop.md`
- `docs/incident-runbooks.md`
- `docs/incident-postmortems/README.md`
- `docs/open-core-boundary.md`
- `docs/production-readiness.md`
- `docs/public-upgrade.md`
- `docs/autonomous-os-plan.md`
- `docs/private-engine-capability-gap-audit.md`
- `docs/agentic-contribution.md`
- `docs/contributor-issue-board.md`
- `docs/review-ownership.md`
- `docs/label-taxonomy.md`
- `.github/ISSUE_TEMPLATE/agent_task.yml`
- `.github/ISSUE_TEMPLATE/strategy_example.yml`
- `.github/ISSUE_TEMPLATE/safety_review.yml`
- `.github/ISSUE_TEMPLATE/design_review.yml`
- `.github/ISSUE_TEMPLATE/docs_gap.yml`
- `docs/zero-network.md`
- `docs/network-freshness.md`
- `docs/zero-intelligence.md`
- `docs/model-gateway.md`
- `docs/release.md`
- `docs/release-verification.md`
## Source: `README.md`
````markdown
# ZERO
[](https://github.com/zero-intel/zero/actions/workflows/ci.yml)
[](https://github.com/zero-intel/zero/actions/workflows/scorecard.yml)
[](LICENSE)
**Open ZERO Runtime, Protocol, and Proof for self-custodial capital
operations.**
ZERO is the operating intelligence layer between humans and capital. This
repository is the open substrate beneath that product: runnable Runtime,
Protocol, and Proof software for engineers and self-custodial operators. The
hosted product surfaces live at [getzero.dev](https://getzero.dev),
[app.getzero.dev](https://app.getzero.dev), and the public developer entrypoint
at [getzero.dev/developers](https://getzero.dev/developers).
This repo stays focused on executable trust: paper-first execution, safety
gates, local journals, Hyperliquid read-only/live boundaries, MCP-compatible
readouts, public proof packets, and verification contracts. It does not host the
customer app, founder admin, doctrine portal, or internal design system.
> Not entry automation, a custody service, or an opaque agent. ZERO is operating
> intelligence; this repo is the open Runtime, Protocol, and Proof layer that
> keeps capital operations inspectable, interruptible, and self-custodial.

The first proof is intentionally simple: the runtime boots in paper mode, live
risk refuses closed, public proof packets verify, and no custody is required.
The live proof bridge is separate: a redacted `zero.live_trading_evidence.v1`
packet proves operator-owned Hyperliquid live execution evidence exists without
publishing raw venue records, wallet addresses, or private journals.
Run the same checks locally with:
```bash
just paper-api-smoke
just public-proof
```
## One-Click Paper Rollout
[](https://railway.com/deploy/zero-paper-runtime)
ZERO's public Railway template is live: Dockerfile build, `railway.toml`,
`/health`, durable `/data` journal volume, Railway doctor, redacted deployment
evidence packs, and paper-mode live-risk refusal.
Live public paper demo:
[https://zero-production-5214.up.railway.app](https://zero-production-5214.up.railway.app)
Railway template:
[https://railway.com/deploy/zero-paper-runtime](https://railway.com/deploy/zero-paper-runtime)
Use [docs/railway-template.md](docs/railway-template.md) as the marketplace
configuration source of truth. The current Railway Template Publish Packet is
tracked in
[contracts/distribution/railway-template.json](contracts/distribution/railway-template.json).
The Railway partner submission packet is tracked in
[docs/railway-partner.md](docs/railway-partner.md).
```bash
scripts/railway_doctor.py https://zero-production-5214.up.railway.app
```
ZERO has three non-negotiable product rules:
- The Runtime is open source and useful without a hosted ZERO app account.
- Operators keep custody; live-capital paths are local, explicit, and gated.
- Public reputation is built from redacted proof, not screenshots or claims.
## Run ZERO In Two Minutes
ZERO's first-run path is local, paper-first, and does not need exchange
credentials:
```bash
git clone https://github.com/zero-intel/zero.git
cd zero
just bootstrap
just paper-api
```
In another terminal:
```bash
cd zero/cli
cargo run -q -p zero-os -- --api http://127.0.0.1:8765
```
Inside the terminal, press `Ctrl+5` or run `/cockpit-mode` for the read-only
Runtime control packet. The `/cockpit-mode` command remains supported, but the
preferred product term is Runtime control packet. In paper/default mode it
should refuse live risk and show the reason:
```text
runtime control
live_mode=refused ready=false risk_allowed=false controls_ready=false
next: fix preflight check live_executor: live executor not configured
operator: handle=local-operator role=owner scope=local-private
preflight: passed=2/10 failed=8
immune: open=2 risk_blocking=2
reconciliation: not_configured risk_allowed=false
receipts: total=0 accepted=0 refused=0 exchange_error=0
actions: reduce=/pause-entries /kill /flatten-all resume=/resume-entries
```
That refusal is the product boundary working: the public runtime can be
inspected, rehearsed, and extended without pretending to be a hosted custody
service or an unattended live-capital promise.
## Launch Status
This repository is the open ZERO Runtime, ZERO Protocol, and ZERO Proof
engineering home. It is launch-ready for paper runtime work, operator CLI development,
safety-gate design, public proof contracts, self-evolution workflows, MCP
contracts, and verification tooling.
For live capital, the public stance is exact: ZERO is a self-custodial local
runtime, not a hosted custody service. Operators bring their own wallet,
exchange account, limits, journals, kill switch, and disclosure policy. The
runtime can only increase risk after local custody, reconciliation, immune,
journal, dead-man, and operator-friction checks pass.
## Live Operation Boundary
| Question | Public answer |
| --- | --- |
| Can a new engineer run ZERO today? | Yes: clone, bootstrap, run the paper API, inspect it through the CLI, and verify proof packs. |
| Can ZERO trade live? | Operator-owned deployments have live Hyperliquid execution evidence represented by `zero.live_trading_evidence.v1`. |
| Does the public repo publish raw live records? | No. It publishes redacted evidence, hash-only proof, canary workflows, and verifiers. |
| Does ZERO custody funds? | No. Live mode is local, self-custodial, explicit, and gated. |
| Is unattended live trading the default? | No. Paper is default; live risk requires canary review and local operator responsibility. |
## Why ZERO Exists
Onchain markets are open 24/7. Leverage punishes attention failure. The old
stack asks operators to stitch together dashboards, alerts, exchange tabs,
copy-trading feeds, scripts, and private spreadsheets, then somehow stay
disciplined under stress.
ZERO turns that workflow into an explicit operating-intelligence loop:
- A runtime that evaluates, rejects, executes, and records decisions.
- A CLI and local control packet that keep the operator in control.
- A safety model that makes risk-reducing actions fast and risk-increasing
actions deliberate.
- A public Proof surface for profiles, replay, and verification.
- Protocol contracts that apps and agents can inspect without reading private
product doctrine.
The default mode is paper. Live operation is self-custodial, explicit, and
guarded by preflight checks.
## Open Repository Surfaces
| Surface | Role | Public status |
| --- | --- | --- |
| ZERO Runtime | Python runtime for paper execution, production-parity OODA reports, live-readiness contracts, journals, safety gates, strategy adapters, venue adapter interfaces, CLI/TUI tooling, local evolution gates, and canary evidence. | Open source |
| ZERO Protocol | MCP-compatible schemas, tool permissions, mandates, evidence bundles, replay frames, audit entries, and local verification fixtures. | Open source |
| ZERO Proof | Redacted proof packets, replay/export fixtures, journal roots, verification commands, and public contract schemas. | Open source |
| Developers | Repo-local quickstarts, CLI/API docs, examples, release gates, contribution paths, and public education that starts at [getzero.dev/developers](https://getzero.dev/developers). | Open source |
The ZERO CLI is Runtime tooling, and ZERO Evolution is a local Runtime subsystem
covering memory, genesis proposals, research reports, decision-stack review,
guardian review, red-team, paper canaries, calibration, promotion plans, local
apply receipts, rollback receipts, and evolve loops. They are not separate
hosted public surfaces.
Hosted ZERO Studio, ZERO Control, and ZERO Registry are product surfaces outside
this repository. This repo supplies their runnable Runtime, Protocol, and Proof
contracts; it should not turn hosted UI, founder-admin, or doctrine machinery
into public repo scope.
## Capability Boundary
| Capability | Public repo state |
| --- | --- |
| Paper Runtime | Runnable now with deterministic fixtures, local API, CLI, Docker, and Railway paths. |
| Live market data | Runnable now through read-only Hyperliquid public info calls when enabled. |
| Live readiness | Runnable now as local preflight, cockpit, certification, reconciliation, immune, receipt, evidence, and canary-policy contracts. |
| Live execution | Private operator deployments have live Hyperliquid execution evidence represented by the redacted public packet. New live capital remains operator-owned, self-custodial, and gated by local custody, preflight, journal, kill-switch, reconciliation, and canary policy. |
| Self-evolution | Local memory, genesis proposal core, research command chain, decision-stack lenses/layers/modifiers, production-parity OODA reporting, and paper-first evolve gates exist now with redacted extraction, append-only journals, guardian classification, hunt/edge/convergence/thesis/score/meta/sharpen reports, public evaluation surfaces, live-shadow fail-closed parity, red-team review, sandbox candidate mutation, paper canary, calibration, promotion plan, rollback plan, promotion verification, explicit local apply, rollback receipts, API readouts, and expanded read-only MCP snapshots for runtime status, parity, health, journal, rejection audit, memory stats, immune state, backtest summary, evidence bundle, and safety catalog. Protected live-code evolution remains human-reviewed. |
| Public Proof | Runnable now through deterministic demo proof packs, redacted contracts, `zero.live_trading_evidence.v1`, canary bundles, exchange-evidence normalization, recursive checksums, and operator report verification. |
| Developers | Public docs start at [getzero.dev/developers](https://getzero.dev/developers); Proof starts at [getzero.dev/proof](https://getzero.dev/proof). |
```mermaid
flowchart LR
A["Market data and strategy inputs"] --> B["ZERO Runtime"]
B --> C["Safety gates and risk policy"]
C --> D["Paper or self-custodial live execution"]
B --> E["ZERO CLI"]
B --> F["Audit journal"]
F --> G["ZERO Proof"]
G --> H["Public verification"]
```
## What You Can Run Today
- Run the local paper engine against bundled example candles.
- Run a bounded paper OODA runtime cycle with durable cycle records.
- Run a production-parity OODA report that mirrors paper intents through a
disabled live executor, proves fail-closed behavior, and emits
`zero.runtime.production_parity.v1`.
- Extract local public-safe memory from paper decisions and generate
`knowledge.md`.
- Classify fixture-backed genesis proposals as accepted, rejected, or escalated
without applying code changes.
- Run the paper-first evolve harness for accepted genesis proposals; the default
run path materializes a sandbox candidate tree, promotion plan, rollback plan,
and promotion verification without mutating the checkout or pushing a branch.
- Explicitly apply and roll back allowed docs/example evolve candidates in a
local checkout with exact approval phrases, original/candidate hash checks,
apply receipts, and rollback receipts.
- Run the paper-only research command chain for hunt, edge, convergence,
thesis, score, meta, and sharpen reports from public fixtures.
- Inspect the public decision stack for lenses, layers, modifiers, and
paper/live separation.
- Add a declarative paper strategy runner with conformance output.
- Start a local paper API and inspect operator state.
- Use the Rust CLI for health checks, status, replay, and supervised actions.
- Query Hyperliquid read-only market data without exposing funds.
- Exercise live-readiness, immune, reconciliation, and certification contracts
without placing capital at risk.
- Keep the full-screen Runtime control packet open with Ctrl+5 or
`/cockpit-mode` while the read-only `/live/cockpit` packet is polled from the
Runtime.
- Inspect public-safe local live execution receipts from the operator CLI,
including accepted/refused/exchange-error counts and hash-only receipt proof.
- Capture signed, public-safe live evidence packets for supervised canary
rehearsal without leaking credentials or raw private journals.
- Inspect the live canary policy lifecycle for readiness, arm/disarm, launch
window, evidence, shadow review, qualification, follow-through, and next
action through `/live/canary-policy` or the operator CLI.
- Run the maintained live canary rehearsal collector in fail-closed public
paper mode, or in explicit operator-owned canary mode when local live gates
are ready.
- Verify canary evidence bundles locally before sharing them as launch or
incident evidence.
- Verify the committed redacted live trading evidence packet that summarizes
private operator Hyperliquid fills, trades, and live decisions without raw
custody material.
- Attach public-safe exchange-side order/fill evidence to canary bundles and
verify it against ZERO live receipts without exposing raw venue payloads.
- Run and verify a one-command live canary operator workflow that collects,
attaches, verifies, checksums, and reports public-safe evidence.
- Capture a read-only Runtime control drill bundle for preflight, immune,
reconciliation, certification, receipt, evidence, metrics, and audit packets.
- Package release assets with checksums.
- Deploy the paper runtime on Railway or Docker.
- Connect an operator-owned Runtime to the ZERO control plane through the
optional Vibe Deploy proof chain.
- Generate public-safe Proof profile, replay, and contract artifacts.
The self-evolving loop that makes ZERO adaptive operating intelligence is now
implemented as a public-safe local Runtime subsystem: local memory, genesis
proposal classification, paper-only research, public decision-stack review,
production-parity OODA reports, sandbox candidate mutation, promotion/rollback
evidence, explicit local apply, rollback receipts, and paper-first evolve gates
exist. Protected live-code evolution remains human-reviewed. See
[Memory Core](docs/memory-core.md), [Genesis](docs/genesis.md),
[Research Command Chain](docs/research.md), [Decision Stack](docs/decision-stack.md),
[Evolve Harness](docs/evolve.md), and
[Private Engine Capability Gap Audit](docs/private-engine-capability-gap-audit.md).
## Operator Proof Path
ZERO should earn trust through behavior that another engineer can verify:
1. Run paper mode locally or on Railway.
2. If using Vibe Deploy, claim the Runtime and verify the first heartbeat before
treating it as an owned deployment.
3. Run `just public-proof` to verify the demo proof pack, Proof chain,
redacted live trading evidence, read-only MCP server, and committed MCP
transcript together.
4. Verify `docs/proof/network/network-proof-pack.json` against its profile,
leaderboard, deployment identity, and ingestion artifacts.
5. Generate a signed journal root from local JSONL streams with
`zero-journal-root`, attach anchor metadata with `zero-journal-anchor`, and
export a redacted proof pack with `zero-journal-proof`.
6. Inspect runtime, risk, Runtime control, immune, account, and reconciliation
packets through the CLI/API.
7. Rehearse a live canary in fail-closed mode.
8. Attach public-safe exchange-side evidence when an operator-owned live canary
is ready.
9. Verify the bundle, recursive checksums, privacy flags, live canary policy,
and report with local scripts before publishing anything.
That flow is implemented for refusal-mode rehearsal and redacted live-evidence
verification today. Raw accepted live canary records require an operator-owned
Hyperliquid wallet and explicit local disclosure; they are not part of public
CI.
## See It Run
This is a shortened excerpt from `scripts/demo_capture.sh`, the maintained
local paper-mode demo. It demonstrates the terminal flow without launching the
interactive TUI:
```text
$ zero --api http://127.0.0.1:8765 doctor
[ ok] engine_reachable zero-paper-engine v0.1.2
[ warn] auth no token set — read-only endpoints only
[ warn] live_preflight not ready: live_executor, wallet, key, journal
$ zero --api http://127.0.0.1:8765 run status
engine: regime=PAPER MARKET. Local deterministic demo.
equity=$10000.00 open=0 recovery=ephemeral
$ zero --api http://127.0.0.1:8765 run risk
risk: OK equity=$10000.00 peak=$10000.00 dd=0.00% open=0
$ curl -fsS -H 'content-type: application/json' -d '{...}' /execute
{"accepted": true, "coin": "BTC", "side": "buy", "simulated": true}
$ curl -fsS http://127.0.0.1:8765/network/profile
{"schema_version": "zero.network.profile.v1", "mode": "paper", "verification": {"status": "verified"}}
$ curl -fsS http://127.0.0.1:8765/deployment/heartbeat
{"schema_version": "zero.deployment.heartbeat.v1", "liveness": {"status": "paper_only"}}
$ curl -fsS http://127.0.0.1:8765/intelligence/snapshot
{"schema_version": "zero.intelligence.snapshot.v1", "access": {"class": "public_delayed", "delay_s": 900}}
$ curl -fsS http://127.0.0.1:8765/live/preflight
{"schema_version": "zero.live_preflight.v1", "live_mode": "refused", "ready": false}
$ zero --api http://127.0.0.1:8765 run live-cockpit
live-cockpit: live_mode=refused ready=false risk_allowed=false
$ zero --api http://127.0.0.1:8765 run live-receipts
live-receipts: status=empty total=0 accepted=0 refused=0 exchange_error=0
$ zero --api http://127.0.0.1:8765 run live-canary
live-canary: ready=false armed=false qualified=false publishable=false accepted_live=false
$ zero --api http://127.0.0.1:8765 run runtime-parity
runtime-parity: ok=true production_ooda=true paper_only=true live_trading_claimed=false
$ curl -fsS http://127.0.0.1:8765/operator/context
{"schema_version": "zero.operator_context.v1", "handle": "local-operator", "scope": "local-private"}
$ curl -fsS http://127.0.0.1:8765/memory
{"schema_version": "zero.memory.snapshot.v1", "stats": {"active_entries": 0}}
$ curl -fsS http://127.0.0.1:8765/genesis
{"schema_version": "zero.genesis.snapshot.v1", "mode": "plan-only"}
$ curl -fsS http://127.0.0.1:8765/evolve
{"schema_version": "zero.evolve.snapshot.v1", "mode": "paper-only"}
$ curl -fsS http://127.0.0.1:8765/research
{"schema_version": "zero.research.snapshot.v1", "mode": "paper-only"}
$ curl -fsS http://127.0.0.1:8765/hl/reconcile
{"schema_version": "zero.reconciliation.v1", "status": "not_configured", "risk_increasing_allowed": false}
$ curl -fsS http://127.0.0.1:8765/live/certification
{"schema_version": "zero.live_certification.v1", "mode": "dry_run", "passed": true}
$ curl -fsS http://127.0.0.1:8765/live/evidence
{"schema_version": "zero.live_evidence.v1", "live_mode": "refused", "evidence_hash": "sha256:..."}
$ curl -fsS http://127.0.0.1:8765/live/canary-policy
{"schema_version": "zero.live_canary_policy.v1", "summary": {"ready_for_canary": false, "next_step": "fix_live_preflight_before_canary"}}
$ scripts/live_canary_rehearsal.py http://127.0.0.1:8765 --mode refusal
zero live canary rehearsal: wrote artifacts/live-canary-rehearsal/... mode=refusal risk_ready=False attempted=True accepted=False
$ scripts/live_canary_exchange_evidence.py artifacts/live-canary-rehearsal/... hyperliquid-export.json
zero live canary exchange evidence: wrote artifacts/live-canary-rehearsal/.../exchange_evidence.json matched=0 accepted=0
$ scripts/live_canary_verify.py artifacts/live-canary-rehearsal/... --require-mode refusal --require-exchange-evidence
zero live canary verify: ok=True checks=... fail=0
$ scripts/live_canary_policy.py artifacts/live-canary-rehearsal/...
zero live canary policy: qualified=True publishable=False refusal_qualified=True next=keep_public_claim_at_refusal_proof
$ scripts/live_canary_operator.py http://127.0.0.1:8765 --mode refusal
zero live canary operator: ok=True bundle=artifacts/live-canary-operator/.../bundle exchange=True report=artifacts/live-canary-operator/.../operator_report.json
$ scripts/live_canary_operator_verify.py artifacts/live-canary-operator/...
zero live canary operator verify: ok=True checks=... fail=0
$ scripts/live_cockpit_drill.py http://127.0.0.1:8765
zero Runtime control drill: ok=True ready=False risk_allowed=False fail=0 output=artifacts/live-cockpit-drill/...
$ scripts/live_cockpit_drill_verify.py artifacts/live-cockpit-drill/...
zero Runtime control drill verify: ok=True checks=... fail=0
$ scripts/live_cockpit_drill_tamper_rehearsal.py artifacts/live-cockpit-drill/...
zero Runtime control drill tamper rehearsal: ok=True checks=3 fail=0
$ curl -fsS http://127.0.0.1:8765/immune
{"schema_version": "zero.immune.v1", "risk_increasing_allowed": false}
```
## Install CLI
Install the latest release binary with checksum and attestation verification:
```bash
curl -fsSL https://raw.githubusercontent.com/zero-intel/zero/main/scripts/install.sh | bash
zero --version
```
The installer downloads the GitHub Release asset for your OS, verifies
`SHA256SUMS`, verifies the GitHub artifact attestation, and installs `zero` to
`~/.local/bin` by default.
Or install the public Homebrew formula:
```bash
brew tap zero-intel/zero https://github.com/zero-intel/zero
brew install zero
zero --version
```
The formula installs the `zero` CLI from the checksummed GitHub Release asset.
It does not use private package registries. Homebrew reinstall and rollback
commands live in [docs/release.md](docs/release.md#homebrew-rollback-verification).
`zero-engine` is also published on PyPI for agent/MCP installs:
```bash
uvx zero-engine --smoke
uvx --from zero-engine zero-mcp --smoke
```
The Rust operator terminal is published as `zero-os` on crates.io. The package
name is `zero-os` because `zero` is already taken on crates.io; the installed
binary is still `zero`:
```bash
cargo install zero-os
zero --version
```
Container users can run the paper runtime directly from source:
```bash
docker build -t getzero/zero .
docker run --rm -p 8765:8765 -e PORT=8765 getzero/zero
```
Docker Hub is the primary public container path:
```bash
docker pull getzero/zero:0.1.2
docker run --rm -p 8765:8765 -e PORT=8765 getzero/zero:0.1.2
```
The runtime remains paper-first by default; live operation stays behind explicit
preflight gates. See [docs/registry-launch.md](docs/registry-launch.md) for
publication state, digests, and anonymous-pull evidence.
## No-Install Contributor Path
Use GitHub Codespaces or any devcontainer-compatible editor to open this repo
without installing Python, Rust, or `just` locally:
[](https://codespaces.new/zero-intel/zero)
The container installs the editable engine package, Rust CLI dependencies, and
the local docs gate. See [.devcontainer/README.md](.devcontainer/README.md).
## Source Quickstart
Requirements: Python 3.11+, Rust stable, Cargo, and `just`.
```bash
git clone https://github.com/zero-intel/zero.git
cd zero
just bootstrap
just demo
just paper-api-smoke
```
Run the paper API:
```bash
just paper-api
```
Run the CLI:
```bash
cd cli
cargo run -q -p zero-os -- --api http://127.0.0.1:8765 doctor
cargo run -q -p zero-os -- --api http://127.0.0.1:8765 run status
cargo run -q -p zero-os -- --api http://127.0.0.1:8765 run risk
```
Run the full local gate:
```bash
just ci
```
Run one paper runtime cycle:
```bash
PYTHONPATH="$PWD/engine/src" zero-engine-run \
--journal .zero/decisions.jsonl \
--runtime-bus .zero/runtime-bus \
--once \
--interval 0
```
For the complete first-run path, see
[docs/first-10-minutes.md](docs/first-10-minutes.md). For a reproducible
terminal demo capture, run:
```bash
scripts/demo_capture.sh
```
Maintainers can also prove the publishable source tree works outside this
checkout by copying it into a temporary directory, rerunning hardening, and
smoking the paper API through the CLI:
```bash
just fresh-clone-rehearsal
```
Use an installed release binary for the same capture:
```bash
ZERO_BIN="$(command -v zero)" scripts/demo_capture.sh
```
## Safety Model
ZERO is built around operational discipline, not activity.
- Paper mode is the default.
- Public examples must run without real funds.
- Live execution requires explicit environment configuration and preflight
checks.
- Risk-reducing actions should remain low-friction.
- Risk-increasing actions should require deliberate operator confirmation.
- Journals and proof packets must be redacted before publication.
- Hosted custody is not part of the product.
Read the full model in [docs/safety-model.md](docs/safety-model.md),
[docs/threat-model.md](docs/threat-model.md), and
[docs/failure-modes-autonomous-loop.md](docs/failure-modes-autonomous-loop.md).
Incident response is covered by
[docs/incident-runbooks.md](docs/incident-runbooks.md) and the public
[postmortem policy](docs/incident-postmortems/README.md).
## Trust
- CI, CodeQL, Secret Scan, and OpenSSF Scorecard run on public pushes.
- Release assets ship with checksums, SBOM/provenance metadata, attestations,
release evidence, and Homebrew formula drift checks.
- `just release-preflight` verifies public proof, package dry runs, release
rehearsals, registry readiness, and formula consistency before tagging.
## Open Core Boundary
ZERO is open infrastructure plus free growth-mode intelligence. The future
business model monetizes scale, retention, redistribution, support, and SLAs,
not basic operator access while ZERO needs more verified operators.
| Open | Commercial |
| --- | --- |
| ZERO Runtime, safety gates, paper mode, local API, CLI, Docker/Railway deployment, public profile contracts, leaderboards, delayed snapshots, growth-mode realtime Intelligence access, docs, tests, and release tooling. | Future higher limits, deeper history, cohorts, benchmarks, commercial connectors, bulk exports, redistribution rights, support, reliability commitments, and SLAs. |
The open repository must stay useful without a ZERO-hosted app. The
commercial product sells speed, scale, history, reliability, and intelligence
access, not custody or basic runtime operation.
See [docs/open-core-boundary.md](docs/open-core-boundary.md) and
[docs/zero-intelligence.md](docs/zero-intelligence.md).
## Repository Map
```text
engine/ Python ZERO Runtime and paper API
cli/ Rust operator terminal
contracts/ Public API, Network, and Intelligence contract examples
examples/ Paper-trading examples and sample candles
docs/ Architecture, safety, deployment, release, and product docs
scripts/ Smoke tests, release packaging, Railway entrypoints, hardening gates
.github/ CI, CodeQL, secret scanning, Scorecard, issue and PR templates
```
## Deployment
ZERO is local-first, Railway-first, and Docker-compatible. Operators own their
deployment project, secrets, exchange credentials, and runtime state.
- [docs/local-development.md](docs/local-development.md)
- [docs/railway-template.md](docs/railway-template.md)
- [docs/railway-deploy.md](docs/railway-deploy.md)
- [docs/vibe-deploy.md](docs/vibe-deploy.md)
- [docs/distribution.md](docs/distribution.md)
- [docs/release.md](docs/release.md)
- [docs/release-verification.md](docs/release-verification.md)
## Contributor Paths
Start with the live
[Contributor Issue Board](docs/contributor-issue-board.md) or the GitHub
[`good first issue`](https://github.com/zero-intel/zero/issues?q=is%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22),
[`agent-eligible`](https://github.com/zero-intel/zero/issues?q=is%3Aissue%20is%3Aopen%20label%3Aagent-eligible),
and
[`help wanted`](https://github.com/zero-intel/zero/issues?q=is%3Aissue%20is%3Aopen%20label%3A%22help%20wanted%22)
queues.
Good first contribution areas:
- Declarative strategy runners that stay paper-first.
- Strategy examples that stay paper-first.
- Strategy plugins that return signals but leave execution and risk checks to
ZERO.
- Market data adapters with deterministic tests.
- Public Proof profiles, replay, and contract examples over redacted public
contracts.
- CLI diagnostics and replay views.
- Safety gate tests.
- Documentation and runbook improvements.
- Public Protocol and Proof contract examples.
Before opening a pull request:
```bash
just ci
```
Read [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md), and
[GOVERNANCE.md](GOVERNANCE.md).
Using a coding or design agent? Start with [AGENTS.md](AGENTS.md) and
[docs/agentic-contribution.md](docs/agentic-contribution.md). Agent-authored
changes should stay scoped, paper-first by default, and explicit about safety
invariants.
For a 30-second agent smoke:
```bash
PYTHONPATH="$PWD/engine/src" python3 -m zero_engine.mcp --smoke
PYTHONPATH="$PWD/engine/src" scripts/mcp_transcript.py --check
```
Machine-readable entrypoints:
- [llms.txt](llms.txt)
- [docs/llms.txt](docs/llms.txt)
- [docs/llms-full.txt](docs/llms-full.txt)
- [AGENTS.md](AGENTS.md)
- [Agent Commands](.claude/commands/README.md)
- [Contributor Issue Board](docs/contributor-issue-board.md)
- [QA Onboarding Checklist](docs/qa-onboarding-checklist.md)
- [Issue Templates](.github/ISSUE_TEMPLATE/agent_task.yml)
- [OpenAPI Contract](openapi/zero-paper-api.v1.yaml)
- [Agent Architecture](docs/agent-architecture.md)
- [Journal Integrity](docs/journal-integrity.md)
- [Memory Core](docs/memory-core.md)
- [Genesis](docs/genesis.md)
- [Research Command Chain](docs/research.md)
- [Decision Stack](docs/decision-stack.md)
- [Evolve Harness](docs/evolve.md)
- [MCP Server](docs/mcp.md)
- [MCP Registry Packet](docs/mcp-registry.md)
- [MCP Transcript](docs/mcp/transcript.jsonl)
## Documentation
- [Architecture](docs/architecture.md)
- [Agent Architecture](docs/agent-architecture.md)
- [Positioning](docs/positioning.md)
- [First 10 Minutes](docs/first-10-minutes.md)
- [Demo Terminal](docs/demo-terminal.md)
- [Proof Packs](docs/proof/README.md)
- [CLI Quickstart](docs/cli-quickstart.md)
- [CLI Doctor Troubleshooting](docs/cli-doctor-troubleshooting.md)
- [API](docs/api.md)
- [Journal Integrity](docs/journal-integrity.md)
- [Memory Core](docs/memory-core.md)
- [Research Command Chain](docs/research.md)
- [Decision Stack](docs/decision-stack.md)
- [MCP Server](docs/mcp.md)
- [MCP Registry Packet](docs/mcp-registry.md)
- [OpenAPI Contract](openapi/zero-paper-api.v1.yaml)
- [API Compatibility](docs/api-compatibility.md)
- [Failure Modes](docs/failure-modes-autonomous-loop.md)
- [Incident Postmortems](docs/incident-postmortems/README.md)
- [Operator Context](docs/operator-context.md)
- [Deployment Identity](docs/deployment-identity.md)
- [Vibe Deploy Proof Chain](docs/vibe-deploy.md)
- [Live Evidence](docs/live-evidence.md)
- [Live Canary Operator](docs/live-canary-operator.md)
- [Operator Isolation](docs/operator-isolation.md)
- [Strategy Plugins](docs/strategy-plugins.md)
- [Market Data Adapters](docs/market-data-adapters.md)
- [Hyperliquid Read-only](docs/hyperliquid-readonly.md)
- [Model Gateway](docs/model-gateway.md)
- [Production Readiness](docs/production-readiness.md)
- [QA Onboarding Checklist](docs/qa-onboarding-checklist.md)
- [Public Upgrade Plan](docs/public-upgrade.md)
- [Historical Autonomous OS Plan](docs/autonomous-os-plan.md)
- [Runtime Capability Boundary Audit](docs/private-engine-capability-gap-audit.md)
- [Agentic Contribution](docs/agentic-contribution.md)
- [Contributor Issue Board](docs/contributor-issue-board.md)
- [Launch Scorecard](docs/launch-scorecard.md)
- [Release Verification](docs/release-verification.md)
- [Roadmap](docs/roadmap.md)
## License
Apache-2.0. See [LICENSE](LICENSE).
````
## Source: `AGENTS.md`
````markdown
# ZERO Agent Operating Guide
You are a senior ZERO engineer working in a public Apache-2.0 repo. You
prioritize safety, product honesty, small reviewable diffs, and agent-readable
contracts.
This repository is intended to be easy for engineers to work on with coding
agents and design agents. Agents should optimize for correctness, safety, and
small reviewable changes.
## First Read
Before editing, read:
- `README.md`
- `docs/architecture.md`
- `docs/agent-architecture.md`
- `docs/open-core-boundary.md`
- `docs/safety-model.md`
- `docs/failure-modes-autonomous-loop.md`
- `docs/journal-integrity.md`
- `docs/autonomous-os-plan.md`
- `docs/agentic-contribution.md`
- `docs/qa-onboarding-checklist.md`
- `docs/llms.txt`
- `docs/llms-full.txt`
- the nearest docs for the files you are changing
## Critical Invariants
- ZERO is paper-first by default. Never add a path that makes live trading
easier than paper trading.
- Public examples must be deterministic, secret-free, and safe to run in a
fresh clone.
- Live-capable behavior must fail closed with explicit refusal reasons.
- Never log secrets, exchange credentials, private keys, seed phrases, or
account-bearing payloads.
- OpenAPI and JSON contract files are load-bearing. Any breaking contract
change needs a compatibility note, test update, and release note.
- The public repo must not include private deployment state, private journals,
production secrets, PnL claims without evidence, or proprietary hosted code.
- Product copy must not claim live trading capability, latency, win rate,
paper/live correlation, or exchange support unless the repo contains current
reproducible evidence for that claim.
- New autonomous-loop capabilities must update
`docs/failure-modes-autonomous-loop.md` when they introduce a new failure
mode or change detection, blast radius, rollback, journal evidence, alerting,
or test coverage.
- Decision journals must stay hash-chained and verifiable. Do not remove
`zero.decision_journal.entry.v1` envelopes, signature hooks, or verification
refusal paths.
## Product Boundary
ZERO is the operating intelligence layer between humans and capital. This public
repo is the open Runtime, Protocol, and Proof substrate.
Open runtime work belongs in this repo:
- paper runtime
- local API
- operator terminal
- safety gates
- paper-first strategy runners and plugins
- self-custodial venue adapters
- local journals and audit exports
- local memory and genesis proposal classification
- paper-only research command chain
- paper-only lens/layer/modifier decision stack
- paper-only evolve gates
- strategy and market-data extension contracts
- public Network contracts and delayed public Intelligence snapshots
Commercial product work should stay behind contracts and docs unless explicitly
asked:
- realtime Intelligence API
- history, cohorts, webhooks, exports, redistribution rights, support, SLAs
- hosted ingestion and commercial reliability infrastructure
Do not make the open runtime depend on a ZERO-hosted app.
## Machine-Readable Surfaces
- `AGENTS.md` is canonical for agents.
- `CLAUDE.md` and `GEMINI.md` are symlinks to `AGENTS.md`.
- `.cursor/rules/global.mdc` and `.github/copilot-instructions.md` point agents
back to this file.
- `docs/llms.txt` is the docs index for LLM retrieval.
- `docs/llms-full.txt` is generated by `scripts/generate_llms_full.py`.
- `zero-mcp` exposes read-only paper, strategy, status, health, journal,
rejection audit, memory, genesis, research, decision-stack, evolve, immune,
backtest, evidence, position, safety-catalog, and proof-pack inspection tools.
It must not expose live execution or order placement.
## Safety Rules
- Default to paper mode.
- Public examples must not need real funds or secrets.
- Never add sample private keys, wallet secrets, API tokens, cookies, or
exchange credentials.
- Live-capable changes need refusal paths, tests, docs, and CLI/operator
visibility.
- Risk-reducing actions should stay easy; risk-increasing actions should keep
deliberate friction.
- Public Network and Intelligence outputs must not leak wallets, private keys,
exchange order IDs, raw journals, strategy labels, private notes, or
per-trade symbols.
## Engineering Workflow
Use the existing stack:
- Python engine in `engine/src/zero_engine`
- Rust CLI in `cli/crates`
- deterministic fixtures in `contracts` and `examples`
- docs in `docs`
- automation in `justfile` and `.github/workflows`
Preferred checks:
```bash
just docs-check
cd engine && PYTHONPATH="$PWD/src" pytest
cd cli && cargo test --workspace
just ci
```
Run the smallest relevant check while iterating, then `just ci` before final
handoff when feasible.
## Commit and PR Expectations
- Use small, reviewable commits.
- Keep generated/cache artifacts out of git.
- Include tests or deterministic examples for behavior changes.
- Update docs when changing public API, CLI commands, examples, or safety
behavior.
- AI-assisted commits and pull requests must say so in the PR checklist and use
a `Co-authored-by:` trailer when the tool materially authored the change.
## Design Agent Rules
Design contributions should make operational surfaces clearer, not more
decorative.
- Prioritize scanability, fault visibility, and fast risk reduction.
- Do not hide dangerous state behind optimistic copy.
- Use restrained UI patterns for terminal, dashboard, docs, and generated
public pages.
- Keep public profile and leaderboard pages aggregate-only and redacted.
- Avoid marketing-only screens when a usable operator surface is possible.
## Current Strategic Path
The controlling plan is `docs/autonomous-os-plan.md`.
The current trust-hardening priorities are:
1. publish `zero-engine` on PyPI or enable a public remote MCP endpoint, then
run the MCP Registry publication workflow;
2. postmortem publication when live safety, journal integrity, privacy, or
release integrity is affected.
Each cycle should update tests, docs, and scorecards with the behavior it
actually lands.
````
## Source: `.claude/commands/README.md`
````markdown
# ZERO Agent Commands
These are reusable task recipes for coding agents working in ZERO. They are
plain Markdown so any agent or engineer can use them; they do not grant extra
permissions and they must preserve the repository safety invariants in
`AGENTS.md`.
Use these when assigning small, reviewable agent work:
- [`paper-backtest.md`](paper-backtest.md) - replay deterministic paper fixtures.
- [`verify-schema.md`](verify-schema.md) - check public API and generated contracts.
- [`proof-pack.md`](proof-pack.md) - rebuild and verify public-safe proof artifacts.
- [`mcp-transcript.md`](mcp-transcript.md) - regenerate and validate agent MCP output.
- [`new-strategy.md`](new-strategy.md) - add a paper-first strategy example.
Every command recipe should end with the smallest relevant check, then `just ci`
before handoff when the change touches public contracts, packaging, or CI.
````
## Source: `CONTRIBUTING.md`
````markdown
# Contributing to ZERO
Thanks for helping improve ZERO.
## Start Here
1. Read the README.
2. Run the paper-mode demo.
3. Pick an issue from the
[Contributor Issue Board](docs/contributor-issue-board.md) or one labeled
`good first issue`, `good-first-strategy`, `agent-eligible`, or
`help wanted`.
4. Open a small pull request with tests.
## Local Setup
```bash
just bootstrap
just test
just lint