Hara REPL UX specification
The REPL is a JLine-based interactive shell. It provides line editing, persistent history, completion, and inline documentation while evaluating ordinary Hara forms.
Session flow
Section titled “Session flow”start | vcustom splash / session banner | vread line --edit-- history --complete-- docs | vread complete Hara form | vevaluate -> print value | +----> print friendly error and continue | +----> EOF -> exitThe default banner uses large Hara ASCII art: an alien craft beams a clear-to-blue-to-black
gradient onto dimensional HARA lettering. It includes the tagline Journey Within and a spaced
top menu.
It identifies runtime TRUFFLE and session ROOT.
The left prompt is namespace-only, for example [user] , while the right prompt reports the
live RESP endpoint or offline. Embedders may replace
the splash or suppress it through ReplConfig; hara.repl.splash and hara.repl.no-color provide
process-level configuration. Banner customization must not change evaluation semantics.
History
Section titled “History”History is persisted in the user’s Hara history file and is incrementally updated while editing:
previous session ---> ~/.hara_history <--- current session ^ | +------ up/down, search, replay -------+History stores entered forms, not evaluated values. Implementations should avoid writing secrets or incomplete input when the host provides a history filter.
Completion
Section titled “Completion”Completion has two sources:
typed prefix | +--> visible Hara symbols ----+ | | +--> slash commands ----------+--> candidatesCompletion appears as a cursor-level ghost suggestion while typing, including immediately after /.
Tab accepts and cycles matching slash commands or symbols. Completion understands HAL delimiters: (, ), [, ], {, }, and whitespace. Symbol
completion comes from the runtime-visible namespace. Host Java classes are not ambient language
completion candidates.
Examples:
(con<TAB> -> concat/re<TAB> -> /respDocumentation widget
Section titled “Documentation widget”The documentation widget is bound to common help keys, including Alt-q, F1, and supported
Shift-Enter terminal sequences:
cursor on symbol -> inspect metadata -> show doc/arglists -> redraw promptMissing metadata is a no-op. Documentation output must not alter the input buffer or evaluation state.
Slash-command boundary
Section titled “Slash-command boundary”Slash commands are intentionally a separate REPL control layer. They are not Hara symbols and are never sent to the evaluator:
input line | +--> starts with / ? -- yes --> REPL command dispatcher | | | +--> /help /history /clear /splash /status /resp /ns /quit | +--> no ------------------------> Hara reader/evaluator/resp reports listener status; /resp start [PORT|HOST:PORT], /resp stop, and
/resp restart [PORT|HOST:PORT] control the listener without replacing ROOT.
The command vocabulary is an extension point. Unknown commands should produce a concise REPL error and leave the session running. A slash command must not shadow a valid Hara form because the dispatch decision is made only at the beginning of an input line.