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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
# Apple II Universal Machine β€” User Guide

A complete guide to operating the browser-native agent OS cockpit.

---

## Table of Contents

1. [Getting Started](#getting-started)
2. [Terminal Basics](#terminal-basics)
3. [Core Commands](#core-commands)
4. [Ada Contracts](#ada-contracts)
5. [Lisp Machine](#lisp-machine)
6. [Assembly & Encoding](#assembly--encoding)
7. [Heterogeneous VM Lab](#heterogeneous-vm-lab)
8. [Fontana β†’ Lisp β†’ VM Pipeline](#fontana--lisp--vm-pipeline)
9. [Agent System](#agent-system)
10. [Digital Twins](#digital-twins)
11. [Mode Switching](#mode-switching)
12. [Ollama Agent-in-a-Box](#ollama-agent-in-a-box)
13. [Vacuum Pipeline](#vacuum-pipeline)
14. [Envelope System](#envelope-system)
15. [Export & Screenshots](#export--screenshots)
16. [Repo Staple & Cold Boot](#repo-staple--cold-boot)
17. [Capsule System](#capsule-system)
18. [Model Architectures](#model-architectures)
19. [GitHub-Native Integration](#github-native-integration)
20. [Keyboard Shortcuts](#keyboard-shortcuts)
21. [Troubleshooting](#troubleshooting)
22. [FAQ](#faq)

---

## Getting Started

### Opening the Cockpit

1. Navigate to `https://SNAPKITTYWEST.github.io/apple-ii-universal-machine/`
2. Watch the boot sequence (ASCII art + status messages)
3. The terminal appears with `HolySim>` prompt
4. Type `Help;` to see all commands

### Two Terminals

- **index.html** β€” Main terminal with status panel, audit log, runtime bar
- **holy-terminal.html** β€” Dedicated HolyC terminal with 100+ commands, button bar, full status

Both share the same Woz Vault (localStorage) and seal engine.

### First Commands

```

Help;                    Show all commands

Boot;                    Reboot with ASCII art

Status;                  System status + runtime detection

Seal;                    Generate SHA-256 seal

Debate("consciousness"); Run ENKI/SENTINEL debate

```

---

## Terminal Basics

### Input Format

Commands use HolyC-style syntax with semicolons:

```

CommandName;

CommandName "argument";

CommandName "arg1" "arg2";

```

Or parenthetical style:

```

CommandName(argument);

```

### Command History

- **↑ Arrow** β€” Previous command
- **↓ Arrow** β€” Next command
- **Enter** β€” Execute

### Button Bar

Click buttons for quick access to common commands. Buttons are grouped by layer.

### Status Bar

Shows live state:
- `VAULT: N` β€” Woz Vault event count
- `SEALS: N` β€” Total seals generated
- `OLLAMA: ONLINE/OFFLINE` β€” Ollama connection
- `MODEL: llama3.2` β€” Current model
- `MODE: APPLE` β€” Active mode
- `AGENTS: N` β€” Registered agents
- `TWINS: N` β€” Registered twins
- `CAPSULES: N` β€” Registered capsules
- `REPO STAPLE: VERIFIED/UNVERIFIED` β€” Staple status
- `GITHUB NATIVE: READY/AUTH REQUIRED` β€” GitHub auth

---

## Core Commands

### Help

```

Help;

```

Displays the full command reference organized by layer.

### Boot

```

Boot;

```

Runs Ada contract check, displays ASCII art boot sequence, generates seal, writes audit event.

### Status

```

Status;

```

Shows:
- System version
- Vault event count
- Seal count
- Runtime status (all adapters)
- Agent/twin/capsule counts

### Trust

```

Trust;

```

Runs the 8-gate trust check:
- `local_only` β€” No remote execution
- `non_destructive` β€” No data destruction
- `auditable` β€” All actions logged
- `sealable` β€” SHA-256 available
- `recoverable` β€” State can be restored

### Seal

```

Seal;

Seal "custom payload";

```

Generates SHA-256 hash via Web Crypto API. Writes to Woz Vault.

### Woz Vault

```

Vault;

```

Displays the full audit log with timestamps, event types, and seal hashes.

### Clear Vault

```

ClearVault;

```

Wipes all Woz Vault data. Requires Ada contract confirmation.

### Export

```

Export;

```

Downloads complete audit log + snapshots as JSON file.

### About

```

About;

```

System information including runtime, agents, contracts, and philosophy.

---

## Ada Contracts

### Ada Status

```

AdaStatus;

```

Shows all 7 contract gates and their status.

### Contracts

```

Contracts;

```

Lists all contract gates with descriptions.

### How Contracts Work

Ada contracts are real `.ads`/`.adb` source files enforced by a JavaScript simulator:

- `Boot` β€” Requires user confirmation
- `Debate` β€” Always allowed
- `WriteAudit` β€” Always allowed
- `ExportSnapshot` β€” Always allowed
- `ClearVault` β€” Requires user confirmation
- `InvokeLisp` β€” Always allowed
- `InvokeRuntime` β€” Always allowed

When a command requires a contract check, it runs through `ContractRegistry.check()` before execution.

---

## Lisp Machine

### Lisp Help

```

LispHelp;

```

Shows all Lisp commands.

### Evaluate Expressions

```

LispEval (+ 1 2);

LispEval (* 10 5);

LispEval (- 100 37);

```

Arithmetic operations on s-expressions.

### System Queries

```

LispEval (agent-status);

LispEval (trust-score);

LispEval (woz-vault-count);

LispEval (seal-state);

```

Query system state through Lisp.

### ASCII Art

```

LispEval (draw-agent);

```

Generate ASCII art representation of agents.

### Fontana Reaction

```

FontanaReact (agent trust audit);

FontanaReact (quantum consciousness);

```

Symbolic reaction chamber β€” transforms input symbols through reaction rules.

---

## Assembly & Encoding

### Assembly Status

```

AsmStatus;

```

Shows assembly layer status (simulated register/opcode viewer).

### CPU Registers

```

Registers;

```

Displays current CPU register state:
- `AX` β€” Accumulator
- `BX` β€” Base
- `CX` β€” Counter
- `DX` β€” Data
- `IP` β€” Instruction Pointer
- `FLAGS` β€” Status flags

### Opcodes

```

Opcodes Boot;

Opcodes Seal;

Opcodes Deploy;

```

Shows the opcode translation for a given command.

### Reverse Unicode

```

ReverseUnicode "Hello World";

```

Reverses and mirrors a string using Unicode character mapping.

### Glyph Seal

```

GlyphSeal "No token tax";

```

Creates a visual seal with:
- Original text
- Reversed text
- Mirrored text
- SHA-256 hash

### Restore Unicode

```

RestoreUnicode "dlroW olleH";

```

Restores a mirrored/reversed string to original.

---

## Heterogeneous VM Lab

### Prolog Gate

```

PrologAsk allowed(boot_agent);

PrologAsk requires_seal(deploy_code);

```

Symbolic rule lookup against 18 predefined rules. Returns ALLOWED, DENIED, or REQUIRES_SEAL.



### Macro Expansion



```

MacroExpand boot_agent;
MacroExpand deploy_code;

MacroExpand audit_trail;
```



Expands high-level intent into step-by-step execution plan.



### Bytecode VM



```
BytecodeRun PUSH 1 PUSH 2 ADD PRINT;
BytecodeRun PUSH 5 PUSH 3 SUB PRINT;
```



Safe stack-based interpreter with operations:

- `PUSH value` β€” Push to stack

- `ADD` β€” Add top two

- `SUB` β€” Subtract

- `MUL` β€” Multiply

- `PRINT` β€” Output top

- `HALT` β€” Stop



1000 step limit. No external dependencies.



### Brainfuck Tape



```
BrainfuckRun ++>+++<[->+<]>.;
```



Sandboxed Brainfuck interpreter:

- 30,000 cells

- 5,000 step limit

- Bracket balance validation

- No infinite loop risk



### Machine Viewer



```
MachineView boot_agent;

MachineView deploy_code;
```



Generates fake opcode artifact for visual representation. NOT EXECUTED.



### VM Trace



```
VMTrace boot_agent;

VMTrace audit_trail;
```



Runs full pipeline: Prolog β†’ Macros β†’ Bytecode β†’ Machine View β†’ SHA-256 seal.



---



## Fontana β†’ Lisp β†’ VM Pipeline



### Fontana Decode



```
FontanaDecode agent trust audit;
FontanaDecode deploy payment received;
```



Decodes Fontana symbols into:

- Lisp s-expression

- Bytecode operations



### Lisp Expand



```
LispExpand (agent trust audit);
LispExpand (deploy payment received);
```



Expands a Lisp expression into detailed form.



### Lisp to VM



```
LispToVM (boot);
LispToVM (agent trust audit);
```



Compiles Lisp expression to VM bytecode.



### Full Pipeline Example



```
FontanaDecode agent trust audit;
β†’ Produces Lisp: (event agent_trust_audit)
β†’ Produces bytecode: [PUSH_EVENT, DEFINE_EVENT, LOAD_AGENT, CHECK_TRUST, SEAL, HALT]
```



---



## Agent System



### Agent Help



```
AgentHelp;
```



Shows all agent commands.



### Spawn Agent



```
SpawnAgent "Researcher";
SpawnAgent "Auditor" auditor;
SpawnAgent "Builder" builder;
```



Creates a new agent with:

- Unique ID (`agent_...`)

- Name

- Role (8 options)

- Tools

- Permissions

- Memory scope

- SHA-256 seal



### Agent Roles



| Role | Tools | Permissions |

|------|-------|-------------|

| `researcher` | search, summarize, cite | read, audit |

| `auditor` | verify, seal, log | read, audit |

| `builder` | create, edit, compile | read, write |

| `debater` | propose, challenge, synthesize | read, audit |

| `archivist` | store, index, retrieve | read, write |

| `sentinel` | monitor, alert, block | read, audit |

| `explorer` | scan, map, discover | read |

| `translator` | decode, encode, transform | read, write |



### List Agents



```
ListAgents;
```



Shows all registered agents with run counts.



### Run Agent



```
RunAgent "Researcher" "analyze system";
RunAgent "Auditor" "verify trust deed";
```



Runs agent on task. Generates role-appropriate response. Writes audit event + seal.



### Inspect Agent



```
InspectAgent "Researcher";
```



Shows full agent profile: ID, name, role, tools, permissions, memory, mode, runs, seal.



### Delete Agent



```
DeleteAgent "Researcher";
```



Removes agent from registry.



---



## Digital Twins



### Twin Help



```
TwinHelp;
```



Shows all twin commands.



### Create Twin



```
CreateTwin "Analyst";
```



Creates a digital twin with:

- Unique ID (`twin_...`)

- Name

- Default role: analyst

- Default personality: methodical

- SHA-256 seal



### Design Twin



```
DesignTwin "Analyst" role="researcher" memory="persistent";
DesignTwin "Analyst" personality="methodical" permissions="read,audit";
```



Customize twin specifications.



### Twin Roles



- `analyst` β€” Pattern analysis, data flow, risk assessment

- `builder` β€” Component identification, build planning

- `researcher` β€” Source analysis, findings summary



### List / Run / Inspect / Delete



```
ListTwins;
RunTwin "Analyst" "review code quality";
InspectTwin "Analyst";
DeleteTwin "Analyst";
```



Same pattern as agents.



---



## Mode Switching



### List Modes



```
ListModes;
```



Shows all 6 modes with themes:



| Mode | Theme | Focus |

|------|-------|-------|

| `apple` | terminal-green | Full command set |

| `linux` | terminal-amber | Shell-focused |

| `windows` | terminal-blue | PowerShell-style |

| `holy` | terminal-gold | Faith-governed |

| `vm` | terminal-cyan | VM-focused |

| `agent` | terminal-magenta | Agent-focused |



### Switch Mode



```
SwitchMode linux;
SwitchMode vm;
SwitchMode holy;
```



Filters available commands. Updates prompt and theme.



### Current Mode



```
CurrentMode;
```



Shows active mode name, theme, and prompt.



---



## Ollama Agent-in-a-Box



### Ollama Status



```
OllamaStatus;
```



Shows connection status, URL, model, model count, last probe time.



### Connect Ollama



```
ConnectOllama;
```



Probes `http://localhost:11434` with 3-second timeout.



If offline: `OLLAMA: OFFLINE β€” using simulated agent mode`

If online: Lists detected models.



### List Models



```
ListModels;
```



Shows 10 default models + any detected local models:



| Model | Best For |

|-------|----------|

| `llama3.2` | General purpose |

| `llama3.1` | Fast inference |

| `mistral` | Reasoning |

| `codellama` | Code generation |

| `phi3` | Compact |

| `gemma2` | Balanced |

| `qwen2.5` | Multilingual |

| `deepseek-coder` | Code specialist |

| `neural-chat` | Conversational |

| `starling-lm` | Alignment |



### Spawn Ollama Agent



```
SpawnAgent "Researcher";
```



Creates agent with current Ollama model.



### Design Agent



```
DesignAgent "Researcher" role="research" model="llama3.2" mode="linux";
```



Configure agent model and role.



### Run Agent



```
RunAgent "Researcher" "Explain local-first AI";
```



If Ollama is online: sends to `localhost:11434/api/generate`

If offline: returns simulated response with label



---



## Vacuum Pipeline



### Vacuum Help



```
VacuumHelp;
```



Shows vacuum commands and pipeline.



### Vacuum Ingest



```
VacuumIngest "The customer paid the invoice on Tuesday";
```



Stores raw text with:

- Word count

- Sentence count

- Character count

- Timestamp



### Extract Meaning



```
ExtractMeaning "The customer paid the invoice on Tuesday";
```



Extracts:

- Entities (customer, invoice)

- Actions (paid)

- Topics (payment, customer)

- Sentiment (-1 to +1)

- Word/sentence counts



### To Lisp



```
ToLisp "customer paid invoice";
ToLisp "deploy payment received";
```



Full pipeline:

1. Extract meaning from text

2. Map to normalized schema

3. Generate Lisp s-expression



Output:

```
EVENT: customer_paid_invoice
CATEGORY: payment
LISP: (pipeline (event customer_paid_invoice) (schema (category payment) (confidence 0.7)))
```



---



## Envelope System



### Compile Envelope



```
CompileEnvelope "(event payment received)";
CompileEnvelope "(event agent_trust_audit)";
```



Pipeline:

1. Parse Lisp expression

2. Compile to bytecode

3. Build signed envelope

4. Execute bytecode trace

5. Write audit event + seal



Envelope format:

```json

{

  "envelopeId": "env_...",

  "type": "BYTECODE_ENVELOPE",

  "source": "(event payment received)",

  "lisp": "(event payment received)",

  "bytecode": ["PUSH_EVENT", "DEFINE_EVENT", "VERIFY", "SEAL", "HALT"],

  "trust": "ALLOWED",

  "seal": "sha256...",

  "createdAt": "2026-06-17T...",

  "mode": "apple",

  "verified": true

}

```

### Verify Envelope

```

VerifyEnvelope;

```

8-check verification:
- Has ID
- Has type
- Has source
- Has Lisp expression
- Has bytecode array
- Has seal
- Has trust
- Seal length β‰₯ 32

### Run Envelope

```

RunEnvelope;

```

Executes verified bytecode. Outputs step trace. Writes audit + seal.

### Export Envelope

```

ExportEnvelope;

```

Downloads envelope as JSON file.

---

## Export & Screenshots

### Screenshot Terminal

```

ScreenshotTerminal;

```

Renders terminal content to canvas, downloads as PNG image.

### Export Proof

```

ExportProof;

```

Full proof package including:
- Agent name
- Model
- Prompt
- Response
- Timestamp
- Mode
- Seal
- Audit count

Downloads as JSON.

---

## Repo Staple & Cold Boot

### Staple Repo

```

StapleRepo;

```

Generates manifest:
```json

{

  "repo": "apple-ii-universal-machine",

  "version": "1.0.0",

  "files": [...],

  "fileCount": 100,

  "buildTimestamp": "...",

  "pageSeal": "sha256...",

  "vaultSnapshotHash": "sha256...",

  "vaultEvents": 42,

  "agentCount": 3,

  "twinCount": 2,

  "capsuleCount": 1,

  "mode": "apple",

  "verified": true

}

```

### Verify Staple

```

VerifyStaple;

```

Checks 7 conditions:
- Has repo name
- Has version
- Has files
- Has timestamp
- Has page seal
- Has vault hash
- Seal length β‰₯ 32

### Cold Boot

```

ColdBoot;

```

Replays boot sequence:
1. Read staple manifest
2. Check Woz Vault
3. Verify page seal
4. Restore last known state
5. Print SUN BOOT COMPLETE

### Staple Status

```

StapleStatus;

```

Shows verified/unverified, repo, version, file count, page seal, cold boot status.

---

## Capsule System

### Capsule Help

```

CapsuleHelp;

```

Shows all capsule commands.

### Create Capsule

```

CreateCapsule "Researcher";

```

Creates capsule with:
- Name
- Type: agent
- Architecture: transformer
- Model: ollama/llama3.2
- Runtime: ollama
- Tools, permissions, evals
- Limitations (honest labels)
- Intended use
- SHA-256 seal

### Design Capsule

```

DesignCapsule "Researcher" arch="mamba" model="ollama/mistral" runtime="ollama";

DesignCapsule "Researcher" limitations="Simulated only|No remote calls" intendedUse="Local research";

```

### List Capsules

```

ListCapsules;

```

Shows all capsules with type, architecture, and model.

### Inspect Capsule

```

InspectCapsule "Researcher";

```

Full capsule profile.

### Run Capsule

```

RunCapsule "Researcher" "Explain local-first AI";

```

If Ollama online: sends to model
If offline: returns simulated response

### Verify Capsule

```

VerifyCapsule "Researcher";

```

8-check verification of capsule metadata.

### Staple Capsule

```

StapleCapsule "Researcher";

```

Links capsule to repo staple manifest.

### Export Capsule

```

ExportCapsule "Researcher";

```

Downloads capsule as JSON.

### Generate Agent Card

```

GenerateAgentCard "Researcher";

```

Downloads Markdown card with:
- Intended use
- Limitations
- Model/runtime
- Memory policy
- Permissions
- Eval commands
- Woz Vault seal
- Repo staple info

### Generate Model Card

```

GenerateModelCard "Researcher";

```

Downloads model card with architecture, base model, training status (SIMULATED).

---

## Model Architectures

### List Architectures

```

ListArchitectures;

```

Shows available architectures:

| Architecture | Description |
|-------------|-------------|
| `transformer` | Attention-based, standard LLM |
| `mamba` | State-space model, linear complexity |
| `hybrid` | Transformer + Mamba combination |

### Select Architecture

When creating or designing capsules:

```

CreateCapsule "Researcher" arch="mamba";

DesignCapsule "Researcher" arch="hybrid";

```

---

## GitHub-Native Integration

### GitHub Help

```

GitHubHelp;

```

Shows all GitHub commands.

### GitHub Login

```

GitHubLogin "ghp_your_token_here";

```

**Security rules:**
- Token stored in `sessionStorage` only (not `localStorage`)
- Never committed to repo
- Never written to Woz Vault
- Never shown in terminal output
- Cleared on page close

### GitHub Status

```

GitHubStatus;

```

Shows authentication status, username, scopes.

### GitHub Logout

```

GitHubLogout;

```

Clears token from sessionStorage.

### Create Inverted Repo

```

CreateInvertedRepo "my-agent-os";

CreateInvertedRepo "my-twin-os" twin;

CreateInvertedRepo "my-vacuum-os" vacuum;

CreateInvertedRepo "my-vm-lab" vm;

```

Creates GitHub repo via API with:
- README.md
- TRUST_DEED.md

- capsule.json

- woz-staple.json

- index.html

- .github/workflows/pages.yml

- .github/workflows/capsule-verify.yml



### Create Repo From Template



```

CreateRepoFromTemplate "my-agent-os";

```



Same as CreateInvertedRepo with template selection.



### Staple Remote Repo



```

StapleRemoteRepo "owner/repo";

```



Writes `woz-staple.json` to remote repo.



### Verify Remote Repo



```

VerifyRemoteRepo "owner/repo";

```



Reads and verifies remote staple manifest.



---



## Keyboard Shortcuts



| Key | Action |

|-----|--------|

| `Enter` | Execute command |

| `↑` | Previous command |

| `↓` | Next command |

| `Tab` | (not yet implemented) |



---



## Troubleshooting



### "Unknown: command"



Command not recognized. Type `Help;` for full list.



### "ADA CONTRACT: DENIED"



Command requires contract confirmation. For `ClearVault;`, confirm when prompted.



### "Ollama: OFFLINE"



Ollama not running at localhost:11434. Start Ollama or use simulated mode.



### "No envelope built"



Run `CompileEnvelope` before `VerifyEnvelope` or `RunEnvelope`.



### "Agent not found"



Agent name must match exactly (case-sensitive). Run `ListAgents;` to see registered agents.



### "Token not valid"



GitHub token must start with `ghp_` or `github_pat_`. Check token permissions.

### Vault seems empty

Run `Boot;` or `Seal;` to generate events. Check `Vault;` for audit log.

---

## FAQ

### Is this real HolyC?

No. This is a browser-safe simulation. All execution is JavaScript in the browser. The Ada contract source files (`.ads`/`.adb`) are real Ada but enforced by a JS simulator.

### Does Ollama work?

If you have Ollama running at localhost:11434, yes. Otherwise, all agent runs use simulated mode with honest labels.

### Can I break it?

No. All VM execution is sandboxed (step limits, cell limits). Brainfuck has 5000 steps max. Bytecode VM has 1000 steps max.

### Where is data stored?

All data is in browser `localStorage`. No server. No database. No cloud. Clear your browser data to reset.

### Can I export everything?

Yes. `Export;` downloads audit log. `ExportProof;` downloads full proof package. `ExportCapsule "N";` downloads capsule JSON. `ScreenshotTerminal;` downloads terminal as PNG.

### How do I verify integrity?

Run `VerifyStaple;` to check repo staple. Run `VerifyCapsule "N";` to check capsule. Run `Trust;` to check trust gates. Every action generates a SHA-256 seal.

### What is cold boot?

`ColdBoot;` reads the repo staple manifest, checks Woz Vault, verifies the page seal, restores last known state, and prints SUN BOOT COMPLETE. It proves the live page is attached to the repo state.

### What is an inverted repo?

An inverted repo is where the source of truth is architectural intent and trust rules, not applications. The repo IS the runtime manifest, proof source, capsule source, and cold-boot source.

---

*Apple II Universal Machine Β· Browser-native agent OS cockpit Β· No token tax*