← ClaudeAtlas

tau-prolog-standardslisted

Coding standards and guidelines for Tau Prolog applications, Node.js scripts, and browser DOM targets. Use when targeting Tau Prolog specifically.
dougransom/prolog-agent-toolkit · ★ 4 · Web & Frontend · score 60
Install: claude install-skill dougransom/prolog-agent-toolkit
# Tau Prolog Standards Guidelines for writing idiomatic Tau Prolog code: ## Core Rules 1. **JS Execution & ISO Code Target**: Tau Prolog is an open-source Prolog interpreter implemented entirely in JavaScript for browser and Node.js environments. AI agents should attempt to produce standard ISO-compliant code subject to Tau's capabilities and limitations. 2. **Text & Double Quotes**: Follow standard character lists (`chars`) representation for string manipulation. 3. **DOM & JS Interoperability**: - Use `library(dom)` for browser DOM queries and event handling. - Use `library(js)` for JavaScript interop and object inspection. - Use `library(random)` for random number generation. 4. **Asynchronous Query Execution**: - In JavaScript embeddings, handle queries asynchronously using session callback streams (`session.query()`, `session.answer()`). 5. **Library Cheat-Sheet Usage**: Always include explicit `:- use_module(library(...)).` headers based on the Standard Library Cheat Sheet below. 6. **Safety**: Always execute Node.js / CLI runner scripts using `tau-safe` or `prolog-safe` with `PROLOG_ENGINE=tau`. ## Tau Prolog Standard Library Cheat Sheet | Feature / Topic | Import Header | Primary Exported Predicates | Notes / Dialect Rules | | :--- | :--- | :--- | :--- | | **DOM Integration** | `:- use_module(library(dom)).` | `get_by_id/2`, `set_html/2`, `add_event_listener/3` | Browser DOM manipulation. | | **JS Interoperability**| `:- use_module(library(js)).` | `e