Skip to content

CI gate: every builtin and public stdlib function must be documented (regex_* currently appear nowhere) #393

Description

@InauguralPhysicist

Why. regex_match / regex_find / regex_replace are registered in src/builtins.c but appear in neither docs/SPEC.md nor docs/STDLIB.md (grep-verified 2026-07-04). This is the third occurrence of the same failure class: ord/chr/str_lower/hex-of existed and were rediscovered late; hex4/pad2 were hand-rolled downstream twice. For a 51-module stdlib, undiscoverable breadth is zero breadth.

What.

  • tools/stdlib_index_check.sh: cross-reference the builtin registration table in src/builtins.c and public (non-_) defines in lib/*.eigs against docs/STDLIB.md; fail on any absence. Wire into the suite / ci.yml alongside the existing doc-drift gates.
  • Document the regex_* builtins with executable examples (same byte-checked discipline as the rest of SPEC/STDLIB).

Acceptance. Gate red when a registered builtin or public lib define is missing from STDLIB.md; green on main after the regex docs land; the gate catches a deliberately-undocumented test builtin in a dry run.

Effort: days. Source: 2026-07-04 survey (stdlib dimension; critic top-5).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions