Skip to main content

AI-Assisted Development

Alia's syntax differs significantly from common programming languages (syntax-style invocation, no comma-separated arguments, alias for defining syntax keywords, etc.), so large language models not trained on Alia tend to produce invalid code when writing it directly. This page provides an AI-oriented syntax reference package; providing it to an AI yields syntactically valid generation results.

Download the Syntax Reference Package​

⬇ Download alia-ai-docs.zip

The archive contains:

  • Grammar.md: An overview of all Alia syntax (AI-adapted edition). Each entry includes the syntax signature, a minimal example, key rules and prohibitions, and links to the corresponding detailed documentation.
  • docs/: The raw Markdown of all documents under Base/Docs/docs (basic syntax, advanced syntax, built-in classes, standard library, toolchain, etc.), preserving the original directory structure and relative links.

The packaged content stays in sync with the documentation site; no build tools or CI are needed — just unzip and use.

How to Provide It to an AI​

After unzipping the archive, choose an approach based on your scenario:

  1. As an attachment/context: Attach Grammar.md directly to the conversation, adding the instruction:

    Please strictly follow the Alia syntax in Grammar.md when writing code.

  2. As a browsable directory: If the AI can read local files, provide the extracted directory and let it open the documentation for the relevant topic under docs/ when needed (e.g. docs/advanced/classes.md).
  3. As a repository workspace: Enable an AI coding assistant in your Alia project and include both Grammar.md and docs/ in its accessible scope.

Documentation Maintenance​

  • Both Grammar.md and docs/ are updated along with the codebase.
  • After modifying documents under Base/Docs/docs or Base/Docs/ai-grammar/Grammar.md, regenerate the archive:
cd Base/Docs
npm run build:ai-docs
  • The generated file is Base/Docs/static/ai/alia-ai-docs.zip; once committed to the repository, it is served directly for download by the documentation site.