WikiScript

**WikiScript** is a lazy prototype of Open Language, a literate language of human centred agreements. It derives partly from Lexon and partly from Hypertalk, with a focus on the workflows and social data structures and practices of wiki.

get page "Test" of wiki "livecode.wiki" ghost the first paragraph of it

# Stack and Wiki's In order to translate the line:

get page "Test" of wiki "livecode.wiki"

We need to transform it into a Livecode function call:

get pageArray_Fetch ("Test", "livecode.wiki")

I've written a function to locate phrases like this in code-items: - wikiScript_Match() - wikiScript_PageTagOffsets

These can be easily extended with different regular expressions. In this way we should be able to build upon the logic and english syntax of Livecode scripting to create a simple and legible constrained language for wiki.

# Stack and card metaphors We imagine a stack representing a wiki, and a card representing a wiki-page. Wiki-pages are represented by Page Title (pTitle) and Wiki Domain (wDomain), and functions return and manipulate Page Arrays (pArray) by default.

# Security

All operations use code that reads page-json and outputs page-json which is displayed as a ghost-page. It is up to the author if they wish to fork - that is write this page-json to their own web site - the code never does this itself.

Secondly we use frames and wasm based sandboxing to ensure that the full power of the code compiled to wasm (eg the Livecode engine) is isolated from other environments running on your computer.

> **Warning:** these security recommendations are currently being explored and nothing here is (yet) fixed or certain. We write about it here before we build.

Finally we use public key cryptography and sign any code that we run so that the author can decide whose code they trust, and put in place their own robust security policy preferences.

# A language of agreements An agreement is written once, in constrained English. The parties read that text. The machine runs it. Nothing else is the contract. Deontic lines — may, may not, must, shall — never execute. They project to a permission table: who may do what, when. The WikiScript Grammar makes that projection mechanical.

clause: "Forking". A Forker may fork the Page when the licence of the Page is open. A Forker must record the Author in the journal of the Fork. A Forker may not remove the Author from the journal of the Fork.

The permission table is a static projection of those lines — `wikiscript who`:

PARTY | MODAL | ACTION | WHEN A Forker | may | fork the Page | when the licence is open A Forker | must | record the Author | — A Forker | may not | remove the Author | — The Author | may | close the licence | after the Notice

# Agreements The Agreement Corpus holds the first three agreements, each parsing in the reference implementation: - Crowdfund Withdrawal — ported from the Lexon crowdfunding example - Pledge Agreement — the weekly pledge culture of plan.ide.earth - Fork Consent — wiki native attribution and consent

# Architecture Three lanes, told honestly in WikiScript Architecture. The Livecode engine runs in the browser via Livecode Wasm. The WikiScript interpreter itself becomes the server, as a Fermyon Spin component. Radicle replicates the repo and, later, the lineage of agreements.

# Plan The buildable spec lives in the code repo as plan.md — see WikiScript Repo. A snapshot is published in the assets of WikiScript Plan, the tickable roadmap.

# Links - Lexon — Henning Diedrich's controlled English contract language - Lexon compiler — AGPLv3, written in C - Ohm — the PEG toolkit behind the v0 parser - HyperTalk — the 1987 ancestor