Skip to content
Back to Home

Documentation for AI

Structured YAML documentation optimized for AI processing

When you provide these documents to AI assistants (Claude, GPT, Cursor):

  • They learn accurate API usage
  • They use correct import paths
  • They generate type-safe code

Available Documents(17)

@hua-labs/hua

Unified UI + Motion + i18n framework

hua.ai.yaml

@hua-labs/ui

React UI component library

ui.ai.yaml

@hua-labs/state

SSR-safe state management

state.ai.yaml

Hooks Reference

React hooks reference

hooks.ai.yaml

Utils

Utility functions

utils.ai.yaml

@hua-labs/i18n-core

i18n core library

i18n-core.ai.yaml

@hua-labs/i18n-core-zustand

Zustand-based i18n state

i18n-core-zustand.ai.yaml

i18n Formatters

Date/number formatters

i18n-formatters.ai.yaml

i18n Loaders

Translation file loaders

i18n-loaders.ai.yaml

@hua-labs/motion-core

Animation core

motion-core.ai.yaml

Motion Hooks

Motion hooks reference

motion.ai.yaml

Icon System

Icon system guide

icon-system.ai.yaml

AI Context (SSOT)

General AI context — single source of truth

ai-context.md

Cursor Rules (MDC)

Cursor IDE rules with globs & alwaysApply

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

Uses a consistent YAML schema for easy AI parsing.

package:

Package metadata

exports:

Export paths and items

hooks:

Hook API documentation

usage:

Installation and usage examples

Example: @hua-labs/hua

yaml
# @hua-labs/hua - AI Documentation
# Version: 0.1.0-alpha.12
# Last Updated: 2026-01-12

package:
  name: "@hua-labs/hua"
  version: "0.1.0-alpha.12"
  description: "Ship UX faster: UI + Motion + i18n, pre-wired"
  category: "framework"
  license: "MIT"

exports:
  main:
    path: "@hua-labs/hua"
    provides:
      - Button
      - Card
      - Badge
      - Input
      - Modal
      - useTranslation
      - useLanguageChange

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

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

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

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

  basic_example: |
    import { Button, useTranslation } from '@hua-labs/hua';
    import { useMotion } from '@hua-labs/hua/framework';

    function Component() {
      const { t } = useTranslation();
      const motion = useMotion({ type: 'fadeIn' });

      return (
        <div ref={motion.ref} style={motion.style}>
          <Button>{t('click_me')}</Button>
        </div>
      );
    }

hooks:
  useMotion:
    description: "Animation hook wrapping motion-core"
    parameters:
      - name: "options"
        type: "UseMotionOptions"
        required: true
        properties:
          - name: "type"
            type: "EntranceType"
            values: ["fadeIn", "slideUp", "slideDown", "scale"]
          - name: "duration"
            type: "number"
            default: 300
          - name: "delay"
            type: "number"
            default: 0
    returns:
      - name: "ref"
        type: "RefObject"
      - name: "style"
        type: "CSSProperties"
      - name: "start"
        type: "() => void"
      - name: "reset"
        type: "() => void"

  useTranslation:
    description: "Translation hook for i18n"
    returns:
      - name: "t"
        type: "(key: string) => string"
      - name: "currentLanguage"
        type: "string"
      - name: "isLoading"
        type: "boolean"

dependencies:
  internal:
    - "@hua-labs/ui"
    - "@hua-labs/motion-core"
    - "@hua-labs/i18n-core"
    - "@hua-labs/i18n-core-zustand"
    - "@hua-labs/state"
  external:
    - "react"
    - "next"
    - "zustand"

compatibility:
  react: ">=18.0.0"
  next: ">=14.0.0"
  node: ">=18.0.0"

keywords:
  - hua
  - react
  - framework
  - ui
  - motion
  - i18n
  - ssr
  - next.js

Using with AI

Provide this documentation to AI assistants for more accurate code generation.

Example prompt:

"Create a login page using this hua documentation: [paste YAML document]"

Project Context Files:

Download from the "Project" tab above and place in your project root:

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