agentleFS
illegalstudioillegalstudio/elephc/.claude/skills/update-builtin-docs/SKILL.md

update-builtin-docs

Skill812 starsChanged 42 days agoMITView on GitHub

Regenerate and audit Elephc's generated builtin documentation from the shared builtin contract plus builtin! and eval_builtin! backend bindings. Use when a change touches crates/elephc-builtin-contract, src/builtins, crates/elephc-magician/src/interpreter/builtins, builtin signatures, builtin lowering hooks, docs/php/builtins, docs/internals/builtins, scripts/docs/builtin_registry.json, or before opening a PR that changes PHP builtins.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Run the same generated-docs workflow enforced by the builtins-docs-sync CI job.

    line 8
  2. Distinctive:

    Use the repo root as the working directory.

    line 9
  3. Distinctive:

    Run the docs audits used by CI:

    line 31
  4. Very specific:

    Treat crates/elephc-builtin-contract as the PHP-surface source of truth.

    line 48
  5. Very specific:

    Do not hand-edit generated builtin pages to fix drift.

    line 49
  6. Distinctive:

    If the user asked only for a sync check, also run:

    line 50
  7. Distinctive:

    If generated files changed, include those files in the same PR as the builtin change unless the user explicitly wants a separate docs-only …

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Update Builtin Docs

Run the same generated-docs workflow enforced by the builtins-docs-sync CI job. Use the repo root as the working directory.

Workflow

  1. Build the exporter that reads the shared contract joined to the compiler's builtin! and eval interpreter's eval_builtin! registries (an example target, so it can link the elephc-magician dev-dependency):
cargo build --example gen_builtins --features curl
  1. Regenerate the JSON registries (functions, plus classes and constants in symbol_registry.json), the Markdown pages, the generated "Functions" blocks in the module pages, and the PHP comparison page:
python3 scripts/docs/extract_builtins.py --render --force
python3 scripts/docs/gen_module_sections.py
python3 scripts/docs/gen_php_comparison.py
  1. Run the docs audits used by CI:
python3 scripts/docs/audit_builtins.py
python3 scripts/docs/elephc_builtins/validate_site_compat.py
python3 scripts/audit_builtin_eir_boundary.py --enforce-target-architecture
  1. Inspect generated changes before reporting or committing:
git status --short -- docs/php docs/internals/builtins scripts/docs/builtin_registry.json scripts/docs/symbol_registry.json
git diff --check

Rules

  • Treat crates/elephc-builtin-contract as the PHP-surface source of truth. Treat src/builtins/ (builtin!) and crates/elephc-magician/src/interpreter/builtins/ (eval_builtin!) as implementation bindings for the AOT and eval support dimensions respectively.
  • Do not hand-edit generated builtin pages to fix drift; fix the registry, lowering metadata, or scripts/docs/elephc_builtins/ generator inputs, then rerun the workflow.
  • If the user asked only for a sync check, also run:
git diff --exit-code -- docs/php/builtins.md docs/php/builtins docs/internals/builtins scripts/docs/builtin_registry.json
  • If generated files changed, include those files in the same PR as the builtin change unless the user explicitly wants a separate docs-only follow-up.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.