Skip to content
Docs
Back to Home

Documentation for AI

Structured package and project context files aligned with the current codebase.

This page now mirrors the actual public `ai-docs` assets in the repo instead of a hand-picked subset.

  • Package references follow current package names and statuses
  • Project context files are listed alongside package YAML files
  • The example below is a representative excerpt, not a frozen contract

Available Documents(21)

@hua-labs/hua

Framework bundle for UI, motion, i18n, loaders, formatters, state, hooks, and dot.

hua.ai.yaml

create-hua

CLI scaffolding for new HUA apps, templates, and AI context files.

create-hua.ai.yaml

@hua-labs/ui

Modern React UI library with advanced, data, overlay, dashboard, and SDUI exports.

ui.ai.yaml

@hua-labs/state

SSR-safe Zustand helpers and HUA state integrations.

state.ai.yaml

@hua-labs/hooks

Shared React hooks for the HUA ecosystem.

hooks.ai.yaml

@hua-labs/utils

Common utility functions for HUA apps and packages.

utils.ai.yaml

@hua-labs/i18n-core

Zero-flicker i18n runtime with SSR/CSR support and namespace-aware loading.

i18n-core.ai.yaml

@hua-labs/i18n-core-zustand

Zustand adapter for i18n-core with hydration-safe language syncing.

i18n-core-zustand.ai.yaml

@hua-labs/i18n-formatters

Locale-aware date, number, and currency formatters with hooks and subpath exports.

i18n-formatters.ai.yaml

@hua-labs/i18n-loaders

Production loaders, caching, and preload helpers for i18n-core.

i18n-loaders.ai.yaml

@hua-labs/eslint-plugin-i18n

Lint rules for translation keys, raw text, and i18n hygiene.

eslint-plugin-i18n.ai.yaml

@hua-labs/motion-core

Production-ready motion hooks for transitions, gestures, scroll, and page animation.

motion-core.ai.yaml

@hua-labs/dot

Cross-platform style protocol from utility tokens to web CSSProperties and React Native styles.

dot.ai.yaml

@hua-labs/security

Private security toolkit for encryption, rate limiting, and abuse detection.

security.ai.yaml

@hua-labs/pro

Framework-entitled reserved layer for dist-only advanced capabilities.

pro.ai.yaml

@hua-labs/docs-engine

Documentation components and metadata primitives.

docs-engine.ai.yaml

AI Context (SSOT)

General AI context and project-wide source of truth.

ai-context.md

Cursor Rules (MDC)

Cursor IDE rules with always-apply guidance.

hua-framework.mdc

Codex (AGENTS.md)

OpenAI Codex project guide.

AGENTS.md

Antigravity (skills.md)

Antigravity skill definitions.

skills.md

Claude Context

Claude Code project context.

claude-project-context.md

Document Format

YAML Structure

Package YAML files describe a package snapshot: metadata, exports, usage, and constraints.

package:

Package metadata and identity

exports:

Import paths and exported items

usage:

Install notes and starter examples

notes:

Status, caveats, or ecosystem context

Example: @hua-labs/hua

Representative excerpt aligned with the current package version and public surface.

yaml
# @hua-labs/hua v2 - AI Documentation
# Version: 1.1.0
# Selected excerpt

package:
  name: "@hua-labs/hua"
  version: "1.1.0"
  description: "Framework bundle for UI, motion, i18n, loaders, formatters, state, hooks, and dot."
  category: "framework"
  license: "MIT"

exports:
  main:
    path: "@hua-labs/hua"
    provides:
      - Button (BrandedButton)
      - Card (BrandedCard)
      - HuaProvider
      - HuaPage
      - ErrorBoundary
      - defineConfig
      - useBranding
      - useMotion
      - dot
      - dotCx

  framework:
    path: "@hua-labs/hua/framework"
    provides:
      - HuaProvider
      - useMotion
      - useBranding
      - SkipToContent
      - Skeleton
      - useData

  server:
    path: "@hua-labs/hua/framework/server"
    provides:
      - getSSRTranslations
      - loadConfig

  config:
    path: "@hua-labs/hua/framework/config"
    provides:
      - defineConfig
      - setConfig

  dot:
    path: "@hua-labs/hua/dot"
    provides:
      - dot
      - dotCx
      - dotMap
      - createDotConfig

usage:
  installation:
    command: "npm install @hua-labs/hua"
    peer_dependencies:
      - "react@>=19"
      - "next@>=13"

  note: >
    v2 is a lean core. UI components (Badge, Input, Modal, etc.)
    live in @hua-labs/ui. i18n lives in @hua-labs/i18n-core.
    Use the package-specific .ai.yaml files for deeper API detail.

Using with AI

Feed package YAML plus the relevant project context file to your assistant for higher-fidelity code generation.

Example prompt:

"Build a multilingual dashboard using @hua-labs/hua and @hua-labs/ui. Here are the current AI docs: [paste files]"

Project context files:

Place the relevant file in your project root or tooling-specific config path.

.cursor/rules/hua-framework.mdc - Cursor IDE rules.claude/project-context.md - Claude Code contextAGENTS.md - Codex project guideskills.md - Antigravity skill definitionsai-context.md - General AI context (SSOT)