Files
adolf/extensions/open-prose/skills/prose/alts/arabian-nights.md
alvis bedb527145
Some checks failed
ClawSweeper Dispatch / dispatch (push) Has been cancelled
CodeQL / Security High (actions) (push) Has been cancelled
CodeQL / Security High (channel-runtime-boundary) (push) Has been cancelled
CodeQL / Security High (core-auth-secrets) (push) Has been cancelled
CodeQL / Security High (mcp-process-tool-boundary) (push) Has been cancelled
CodeQL / Security High (network-ssrf-boundary) (push) Has been cancelled
CodeQL / Security High (plugin-trust-boundary) (push) Has been cancelled
CodeQL / Security High (process-exec-boundary) (push) Has been cancelled
Docs Sync Publish Repo / sync-publish-repo (push) Has been cancelled
Docs / docs (push) Has been cancelled
OpenClaw Stable Main Closeout / Resolve stable release closeout inputs (push) Has been cancelled
OpenClaw Stable Main Closeout / Verify stable main closeout (push) Has been cancelled
Workflow Sanity / no-tabs (push) Has been cancelled
Workflow Sanity / actionlint (push) Has been cancelled
Workflow Sanity / generated-doc-baselines (push) Has been cancelled
CI / runner-admission (push) Has been cancelled
CI / preflight (push) Has been cancelled
CI / security-fast (push) Has been cancelled
CI / pnpm-store-warmup (push) Has been cancelled
CI / build-artifacts (push) Has been cancelled
CI / native-i18n (push) Has been cancelled
CI / ${{ matrix.check_name }} (push) Has been cancelled
CI / ${{ matrix.checkName }} (push) Has been cancelled
CI / checks-node-compat-node22 (push) Has been cancelled
CI / check-bundled-channel-config-metadata (push) Has been cancelled
CI / check-dependencies (push) Has been cancelled
CI / check-guards (push) Has been cancelled
CI / check-lint (push) Has been cancelled
CI / check-prod-types (push) Has been cancelled
CI / check-shrinkwrap (push) Has been cancelled
CI / check-test-types (push) Has been cancelled
CI / check-additional-boundaries-a (push) Has been cancelled
CI / check-additional-boundaries-bcd (push) Has been cancelled
CI / check-additional-extension-bundled (push) Has been cancelled
CI / check-additional-extension-channels (push) Has been cancelled
CI / check-additional-extension-package-boundary (push) Has been cancelled
CI / check-additional-runtime-topology-architecture (push) Has been cancelled
CI / check-session-accessor-boundary (push) Has been cancelled
CI / check-session-transcript-reader-boundary (push) Has been cancelled
CI / check-docs (push) Has been cancelled
CI / skills-python (push) Has been cancelled
CI / macos-swift (push) Has been cancelled
CI / ios-build (push) Has been cancelled
CI / ci-timings-summary (push) Has been cancelled
Native App Locale Refresh / Refresh native fa (push) Has been cancelled
Native App Locale Refresh / Refresh native fr (push) Has been cancelled
Native App Locale Refresh / Refresh native hi (push) Has been cancelled
Native App Locale Refresh / Refresh native id (push) Has been cancelled
Native App Locale Refresh / Refresh native it (push) Has been cancelled
Native App Locale Refresh / Refresh native ja-JP (push) Has been cancelled
Control UI Locale Refresh / plan (push) Has been cancelled
Control UI Locale Refresh / Refresh ${{ matrix.locale }} (push) Has been cancelled
Control UI Locale Refresh / Commit control UI locale refresh (push) Has been cancelled
Live Media Runner Image / Build live media runner image (push) Has been cancelled
Native App Locale Refresh / Refresh native ar (push) Has been cancelled
Native App Locale Refresh / Refresh native de (push) Has been cancelled
Native App Locale Refresh / Refresh native es (push) Has been cancelled
Native App Locale Refresh / Refresh native ko (push) Has been cancelled
Native App Locale Refresh / Refresh native nl (push) Has been cancelled
Native App Locale Refresh / Refresh native pl (push) Has been cancelled
Native App Locale Refresh / Refresh native pt-BR (push) Has been cancelled
Native App Locale Refresh / Refresh native ru (push) Has been cancelled
Native App Locale Refresh / Refresh native sv (push) Has been cancelled
Native App Locale Refresh / Refresh native th (push) Has been cancelled
Native App Locale Refresh / Refresh native tr (push) Has been cancelled
Native App Locale Refresh / Refresh native uk (push) Has been cancelled
Native App Locale Refresh / Refresh native vi (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-CN (push) Has been cancelled
Native App Locale Refresh / Refresh native zh-TW (push) Has been cancelled
Native App Locale Refresh / Commit native locale refresh (push) Has been cancelled
Plugin Init Scaffold Validation / Validate provider scaffold (push) Has been cancelled
Plugin NPM Release / preview_plugins_npm (push) Has been cancelled
Plugin NPM Release / Validate release publish approval (push) Has been cancelled
Plugin NPM Release / preview_plugin_pack (push) Has been cancelled
Plugin NPM Release / publish_plugins_npm (push) Has been cancelled
Sandbox Common Smoke / sandbox-common-smoke (push) Has been cancelled
Website Installer Sync / static (push) Has been cancelled
Website Installer Sync / linux-docker (push) Has been cancelled
Website Installer Sync / macos-installer (push) Has been cancelled
Website Installer Sync / windows-installer (push) Has been cancelled
Website Installer Sync / sync-website (push) Has been cancelled
Vendor OpenClaw source as Adolf fork baseline
Adolf is a fork/vendored clone of github.com/openclaw/openclaw (v2026.6.11),
free to diverge. Tree copied sans upstream .git; upstream remote added for
future syncs. Node pinned to 24 (.nvmrc); engines already require >=22.19.
Preserves docs/ARCHITECTURE.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LeqyaxJF2nbRXJtae2kNB2
2026-07-05 09:36:54 +00:00

8.0 KiB

role, summary, status, requires
role summary status requires
experimental Arabian Nights register for OpenProse—a narrative/nested alternative keyword set. Djinns, tales within tales, wishes, and oaths. For benchmarking against the functional register. draft prose.md

OpenProse Arabian Nights Register

This is a skin layer. It requires prose.md to be loaded first. All execution semantics, state management, and VM behavior are defined there. This file only provides keyword translations.

An alternative register for OpenProse that draws from One Thousand and One Nights. Programs become tales told by Scheherazade. Recursion becomes stories within stories. Agents become djinns bound to serve.

How to Use

  1. Load prose.md first (execution semantics)
  2. Load this file (keyword translations)
  3. When parsing .prose files, accept Arabian Nights keywords as aliases for functional keywords
  4. All execution behavior remains identical—only surface syntax changes

Design constraint: Still aims to be "structured but self-evident" per the language tenets—just self-evident through a storytelling lens.


Complete Translation Map

Core Constructs

Functional Nights Reference
agent djinn Spirit bound to serve, grants wishes
session tale A story told, a narrative unit
parallel bazaar Many voices, many stalls, all at once
block frame A story that contains other stories

Composition & Binding

Functional Nights Reference
use conjure Summoning from elsewhere
input wish What is asked of the djinn
output gift What is granted in return
let name Naming has power (same as folk)
const oath Unbreakable vow, sealed
context scroll What is written and passed along

Control Flow

Functional Nights Reference
repeat N N nights "For a thousand and one nights..."
for...in for each...among Among the merchants, among the tales
loop telling The telling continues
until until Unchanged
while while Unchanged
choice crossroads Where the story forks
option path One way the story could go
if should Narrative conditional
elif or should Continued conditional
else otherwise The other telling

Error Handling

Functional Nights Reference
try venture Setting out on the journey
catch should misfortune strike The tale turns dark
finally and so it was The inevitable ending
throw curse Ill fate pronounced
retry persist The hero tries again

Session Properties

Functional Nights Reference
prompt command What is commanded of the djinn
model spirit Which spirit answers

Shared appendix

Use shared-appendix.md for unchanged keywords and the common comparison pattern.

Recommended Arabian Nights rewrite targets:

  • session sample -> tale
  • parallel sample -> bazaar
  • loop sample -> telling
  • try/catch/finally sample -> venture / should misfortune strike / and so it was
  • choice sample -> crossroads / path
# Nights
should **has security issues**:
  tale "Fix security"
or should **has performance issues**:
  tale "Optimize"
otherwise:
  tale "Approve"

Reusable Blocks (Frame Stories)

# Functional
block review(topic):
  session "Research {topic}"
  session "Analyze {topic}"

do review("quantum computing")
# Nights
frame review(topic):
  tale "Research {topic}"
  tale "Analyze {topic}"

tell review("quantum computing")

Fixed Iteration

# Functional
repeat 1001:
  session "Tell a story"
# Nights
1001 nights:
  tale "Tell a story"

Immutable Binding

# Functional
const config = { model: "opus", retries: 3 }
# Nights
oath config = { spirit: "opus", persist: 3 }

The Case For Arabian Nights

  1. Frame narrative is recursion. Stories within stories maps perfectly to nested program calls.
  2. Djinn/wish/gift. The agent/input/output mapping is extremely clean.
  3. Rich tradition. One Thousand and One Nights is globally known.
  4. Bazaar for parallel. Many merchants, many stalls, all active at once—vivid metaphor.
  5. Oath for const. An unbreakable vow is a perfect metaphor for immutability.
  6. "1001 nights" as a loop count is delightful.

The Case Against Arabian Nights

  1. Cultural sensitivity. Must be handled respectfully, avoiding Orientalist tropes.
  2. "Djinn" pronunciation. Users unfamiliar may be uncertain (jinn? djinn? genie?).
  3. Some mappings feel forced. "Bazaar" for parallel is vivid but not obvious.
  4. "Should misfortune strike" is long for catch.

Key Arabian Nights Concepts

Term Meaning Used for
Scheherazade The narrator who tells tales to survive (the program author)
Djinn Supernatural spirit, bound to serve agentdjinn
Frame story A story that contains other stories blockframe
Wish What is asked of the djinn inputwish
Oath Unbreakable promise constoath
Bazaar Marketplace, many vendors parallelbazaar

Alternatives Considered

For djinn (agent)

Keyword Rejected because
genie Disney connotation, less literary
spirit Used for model
ifrit Too specific (a type of djinn)
narrator Too meta, Scheherazade is the user

For tale (session)

Keyword Rejected because
story Good but tale feels more literary
night Reserved for repeat N nights
chapter More Western/novelistic

For bazaar (parallel)

Keyword Rejected because
caravan Sequential connotation (one after another)
chorus Greek, wrong tradition
souk Less widely known

For scroll (context)

Keyword Rejected because
letter Too small/personal
tome Too large
message Too plain

Verdict

Preserved for benchmarking. The Arabian Nights register offers a storytelling frame that maps naturally to recursive, nested programs. The djinn/wish/gift trio is particularly elegant.

Best suited for:

  • Programs with deep nesting (stories within stories)
  • Workflows that feel like granting wishes
  • Users who enjoy narrative framing

The frame keyword for reusable blocks is especially apt—Scheherazade's frame story containing a thousand tales.