OVERVIEW

Introduction

RECALL is a declarative web interface language with COBOL-inspired syntax. It compiles .rcl source files to self-contained, zero-dependency HTML. Every page embeds its source in an HTML comment — view source, see origin.

NOTE

RECALL is not a framework, runtime, or templating engine. It is a compiler. Source in. HTML out.

OVERVIEW

Quick Start

bash
npm install -g @semanticintent/recall-compiler
RECALL
"IDENTIFICATION DIVISION
TIP

No config file. No build pipeline. Open the .html output directly in any browser.

LANGUAGE

Divisions

Every RECALL program has exactly five divisions, declared in order. Borrowed directly from COBOL — explicit, readable, non-negotiable. COMPONENT DIVISION is optional; all others are required.

DIVISIONREQUIREDDESCRIPTION
IDENTIFICATION DIVISIONREQUIREDProgram metadata — PROGRAM-ID, PAGE-TITLE, AUTHOR, DATE-WRITTEN, DESCRIPTION, FAVICON.
ENVIRONMENT DIVISIONREQUIREDTheme and config — VIEWPORT, COLOR-MODE, PALETTE, FONT, STYLE-BLOCK. Supports COPY FROM for theme inheritance.
DATA DIVISIONREQUIREDFields and groups — WORKING-STORAGE for scalars, ITEMS for groups. LOAD FROM ingests JSON or CSV at compile time.
COMPONENT DIVISIONOPTIONALComponent definitions — DEFINE, ACCEPTS, END DEFINE. COPY FROM imports .rcpy libraries. WITH DATA binds fields at invocation.
PROCEDURE DIVISIONREQUIREDRender logic — named sections with DISPLAY statements. Must end with STOP RUN.
WARNING

Divisions must appear in order: IDENTIFICATION, ENVIRONMENT, DATA, COMPONENT, PROCEDURE. Omitting COMPONENT DIVISION is valid. Omitting any other aborts compilation.

LANGUAGE

PIC Types

Every DATA DIVISION field carries a PIC type. The compiler validates every DISPLAY statement against the element's type contract — wrong type, wrong format, no output. Run recall schema to query the live registry.

DECLARATIONKINDUSAGE
PIC X(n)stringText up to n characters. Used by HEADING-1, PARAGRAPH, LABEL, BUTTON, and most elements.
PIC XstringSingle character. Shorthand for PIC X(1). Also used with VALUE BLOCK for auto-sized strings.
PIC 9(n)numericInteger up to n digits. Use LABEL or STAT-GRID for display. Non-numeric VALUE triggers RCL-012.
PIC 9boolean-numeric0 or 1. Boolean flag. Single-digit numeric.
PIC DATEdateISO 8601 date string (YYYY-MM-DD). Malformed values trigger RCL-009.
PIC URLurlMust begin with http, https, or /. Malformed values trigger RCL-010.
PIC PCTpercentInteger 0-100. Out-of-range values trigger RCL-011.
GROUPgroupNamed group declared in ITEMS SECTION. Referenced by USING clause in TABLE, STAT-GRID, CARD-LIST, NAVIGATION.
RECALL
"DATA DIVISION
TIP

Run `recall schema --json` to see the live element type contracts — which PIC types each element accepts.

LANGUAGE

Elements

RECALL provides 20 built-in elements invoked with DISPLAY. Run recall schema to query the live element registry from the installed compiler.

ELEMENTARGUMENTSDESCRIPTION
HEADING-1/2/3value WITH STYLE MONO/SANSHeading at level 1, 2 or 3. Expects PIC X.
PARAGRAPHvalue WITH COLOR MUTED/TEXT/ACCENTBody paragraph. Expects PIC X. Accepts `citations YES` for inline footnote links.
LABELvalueUppercase eyebrow label. Use before headings to add section context. Accepts PIC X or PIC 9.
CODE-BLOCKvalue WITH LANGUAGE bash/cobol/jsonMonospace code block with optional language hint for syntax display.
BUTTONvalue ON-CLICK GOTO hrefLink styled as a button. WITH STYLE PRIMARY, GHOST, or OUTLINE.
LINKvalue WITH HREF urlInline anchor. WITH TARGET BLANK opens in a new tab.
IMAGEWITH SRC url WITH ALT textImage element. WITH SIZE FULL or HALF sets display width. SRC must be PIC URL.
DIVIDERWITH STYLE DASHEDHorizontal rule. WITH SPACING SMALL or LARGE controls vertical margin.
BANNERvalueFull-width accent-coloured banner bar.
CALLOUTvalue WITH TYPE NOTE/TIP/WARNING/DANGERHighlighted callout block with typed accent colour. Expects PIC X.
INPUTvalue WITH TYPE text/email/searchText input field. The value sets the placeholder label.
CARD-LISTUSING group WITH COLUMNS 2/3Card grid from an ITEMS group. WITH HOVER-LIFT YES adds card lift on hover.
TABLEUSING group WITH COLUMNS col1, col2Data table from an ITEMS group. COLUMNS sets header labels; cells map to level-10 fields by position.
STAT-GRIDUSING group WITH COLUMNS 3/4/6Metric display grid. Detects -VALUE and -LABEL field pairs per row automatically.
TIMELINEUSING groupChronological timeline rendered from an ITEMS group.
TABSUSING groupInteractive tabbed panels. Each item in the group becomes one tab with a label and content.
NAVIGATIONUSING group WITH LOGO textTop navigation bar with logo and links. WITH STICKY YES fixes it while scrolling.
SIDEBAR-NAVUSING group WITH LOGO textSidebar navigation panel. Only valid inside LAYOUT SIDEBAR. WITH STICKY YES keeps it fixed.
FOOTERWITH TEXT value WITH ALIGN CENTERPage footer with centred or left-aligned text.
SECTIONID id WITH LAYOUT type WITH PADDING sizeLayout container. LAYOUT: CENTERED, STACK, GRID, SIDEBAR, SPLIT. Supports nesting. Closed with STOP SECTION.
NOTE

SECTION elements close with STOP SECTION. All other elements are single-line DISPLAY statements.

LANGUAGE

Copybooks

Copybooks use the .rcpy extension — a reference to COBOL's .cpy format. They are never compiled standalone; only COPY FROM'd into .rcl programs at compile time. recall build skips .rcpy files automatically.

RECALL
COPY FROM components/nav.rcpy.
NOTE

A copybook can contain any RECALL division content. COPY FROM is resolved at compile time — the result is one self-contained HTML file.

TIP

Use `recall check --inspect` to see what DATA symbols are generated after all COPY FROM and LOAD FROM statements are resolved.

LANGUAGE

Components

Components are reusable layout fragments defined in COMPONENT DIVISION. Each declares an ACCEPTS list — the DATA DIVISION field names it expects. Callers bind fields with WITH DATA at invocation.

Defining a component

RECALL
"COMPONENT DIVISION

Invoking with WITH DATA

RECALL
"DATA DIVISION

REQUIRED parameters

RECALL
"ACCEPTS PAGE-TITLE REQUIRED, SUBTITLE, BADGE
WARNING

REQUIRED on an ACCEPTS parameter makes it a compile-time contract. Calling the component without that parameter fires RCL-017 — no output is written.

COMMENT clause

RECALL
"01 FETCH-SCORE PIC X(10) VALUE 2978
NOTE

COMMENT clauses surface in `recall check --inspect` output and `--format json` under fieldIntent. They have no effect on compiled HTML — intent only.

LANGUAGE

Value Language

"Three features modernise the data layer. VALUE BLOCK supports multi-line string literals. RECORD types define reusable group shapes declared once and expanded anywhere.

VALUE BLOCK — multi-line strings

RECALL
01 BODY-TEXT PIC X VALUE BLOCK. First paragraph of content here. Second paragraph continues here. END VALUE.
NOTE

PIC X declared without a size (PIC X VALUE BLOCK.) is auto-sized by the compiler to fit the block content exactly.

RECORD types — reusable group shapes

RECALL
RECORD CARD-SHAPE WITH FIELDS CARD-TITLE PIC X(60) CARD-BODY PIC X(200). 01 CARDS RECORD CARD-SHAPE ROWS 4.
NOTE

RECORD types are expanded at compile time. Use LIKE to stamp a defined shape onto a group field. All field names are generated deterministically.

LANGUAGE

Data Loading

LOAD FROM reads a JSON or CSV file at compile time and injects its contents into the DATA DIVISION. Scalars become WORKING-STORAGE fields. Arrays become ITEMS groups. No runtime — values are baked into the compiled HTML.

Load from JSON

RECALL
DATA DIVISION.
 LOAD FROM brief.json.

* brief.json keys map to field names:
{
 HERO-TITLE: Streaming Consolidation,
 STATS: [ { VALUE: 2451, LABEL: FETCH Score } ]
}

Load from CSV

RECALL
DATA DIVISION.
 LOAD FROM metrics.csv.

* header row becomes column names:
NAME,SCORE,LAYER
Revenue (D3),75,origin
Quality (D5),62,momentum

* Auto-generates METRICS group.
NOTE

LOAD FROM runs at compile time. No data files are bundled into the HTML — only the resolved field values are embedded.

TIP

Multiple LOAD FROM statements in one DATA DIVISION are supported. Data from all files is merged into a single symbol table.

DIAGNOSTICS

Error Codes

RECALL enforces 26 structured diagnostic codes. Each code is stable, searchable, and documentable. If a program compiles, it is valid. If not, the compiler tells you exactly what is wrong, where, and how to fix it.

NOTE

Every diagnostic has a stable code. RCL-001 means the same thing forever. Use `recall explain RCL-001` for the full reference on any code.

Errors — abort compilation, no output written

CODECATEGORYDESCRIPTION
RCL-001type-mismatchElement received a field of the wrong PIC type.
RCL-002value-constraintVALUE string exceeds declared PIC X(n) length.
RCL-003unknown-elementDISPLAY references an unregistered element name.
RCL-004unknown-identifierVariable or group not declared in DATA DIVISION.
RCL-005missing-requiredPROCEDURE DIVISION is empty or absent.
RCL-006missing-requiredPROGRAM-ID or PAGE-TITLE absent from IDENTIFICATION DIVISION.
RCL-007group-shapeUSING references a scalar field — a group is required.
RCL-008group-shapeGroup used where scalar expected, or LAYOUT SPLIT structure invalid.
RCL-009formatPIC DATE value does not match ISO 8601 (YYYY-MM-DD).
RCL-010formatPIC URL value does not begin with http, https, or /.
RCL-011formatPIC PCT value is outside the 0-100 range.
RCL-012value-constraintPIC 9 field VALUE contains non-numeric characters.
RCL-013structuralSTOP RUN. is absent from PROCEDURE DIVISION.
RCL-014structuralComponent used in PROCEDURE before its DEFINE block appears.
RCL-015unknown-identifierCOPY FROM path cannot be resolved on disk or in node_modules.
RCL-016type-mismatchWITH DATA passes a name not declared in the component ACCEPTS list.
RCL-017missing-requiredComponent called without a REQUIRED ACCEPTS parameter.
RCL-018structuralCircular COPY detected — file includes itself directly or transitively.
RCL-019structuralRECORD type referenced but never defined in DATA DIVISION.
RCL-020value-constraintVALUE BLOCK encoding error.
RCL-021unknown-identifierLOAD FROM file not found or parse failed.
RCL-022formatPalette key has a trailing period — colour lookup fails silently.

Warnings — shown but compilation continues

CODECATEGORYDESCRIPTION
RCL-W01group-shapeGroup declared but has no items — element will render empty.
RCL-W02value-constraintVALUE string uses over 90% of declared PIC X(n) length.
RCL-W03missing-requiredAUTHOR or DATE-WRITTEN absent from IDENTIFICATION DIVISION.
RCL-W04structuralProcedure section defined but contains no DISPLAY statements.
RCL-W05type-mismatchNumeric PIC 9 field used in a string-accepting element — implicit coercion.
TIP

All 26 codes are actively enforced. Silent failures are errors. If a program compiles, it is valid.

DIAGNOSTICS

Strict Mode

Strict mode promotes all warnings to errors — zero tolerance for CI pipelines. Machine-readable JSON output includes source lines and caret strings so editor integrations and AI tools can render diagnostics without parsing ANSI sequences.

Terminal output

bash
"ERROR [RCL-001] type-mismatch — my-site.rcl:14:8

JSON output

json
"recall check my-site.rcl --format json

Exit codes

bash
"0 — clean, no errors or warnings
TIP

Use `--quiet` in CI for exit-code-only validation with no terminal output. Use `--strict` to promote all warnings to errors.

CLI

Command Reference

The RECALL CLI provides commands for compilation, validation, auto-fix, history diffing, and introspection. All commands accept .rcl files. Copybooks (.rcpy) are resolved automatically during compilation.

recall compile — single file

bash
"recall compile my-site.rcl

recall build — directory

bash
"recall build src/ --out public/

recall check — validate without compiling

bash
"recall check my-site.rcl
NOTE

recall check is the primary quality gate. --strict for CI. --format json for editor integrations. --inspect to see LOAD FROM symbols before type-checking.

recall fix — auto-apply safe fixes

bash
"recall fix my-site.rcl --dry-run * show what would change
TIP

Safe fixes include: PIC resize when VALUE exceeds declared length (RCL-002), AUTHOR insertion (RCL-W03), and empty section removal (RCL-W04).

recall history — git-aware DATA field diff

bash
"recall history my-site.rcl

recall stats — orientation snapshot

bash
recall stats my-site.rcl

recall schema — live element registry

bash
"recall schema * list all elements and PIC types
NOTE

recall schema queries the installed compiler directly. The output reflects the actual compiler state — drift between docs and implementation is structurally impossible.

recall explain — per-code reference

bash
"recall explain RCL-001
ECOSYSTEM

Component Library

@semanticintent/recall-ui is the standard component library. Install once and COPY FROM its .rcpy files — the dark theme, nav, hero, stat-section, card-section, and footer are ready to use.

bash
npm install @semanticintent/recall-ui
RECALL
"ENVIRONMENT DIVISION
WARNING

recall-ui components declare strict ACCEPTS contracts. Your DATA DIVISION field names must match exactly. Run `recall check` after adding components.

NOTE

Themes (dark.rcpy) go in ENVIRONMENT DIVISION via COPY FROM. Components go in COMPONENT DIVISION. The separation is enforced by the compiler.