Document

From spiriMirror/libuipc · View interactive version

Document is an AI agent skill from the GitHub repository spiriMirror/libuipc. Documentation style guide and rules for creating documentation

How to use this skill

Skill file

Document Rules

Documentation style varies by type. Follow these principles for consistency.

Specification Documents (`docs/specification/`)

Purpose: Formal mathematical reference for constitutions, geometries, and core concepts.

Rules:

Example:

# Hookean Spring

**Hookean Spring** is a constitutive model for simulating linear elastic springs.

## #12 Hookean Spring

$$
E = \frac{\kappa}{2} \epsilon^2 = \frac{\kappa}{2} \left(\frac{L - L_0}{L_0}\right)^2
$$

where:
- $\kappa$ is the spring constant
- $L_0$ is the rest length

Tutorial Documents (`docs/tutorial/`)

Purpose: User-friendly guides with code examples.

Rules:

```markdown

=== "C++"

\\\`cpp

// code

\\\`

=== "Python"

\\\`python

# code

\\\`

```

Example:

=== "C++"
    \`\`\`cpp
    using namespace uipc::core;
    Scene scene;
    \`\`\`
=== "Python"
    \`\`\`python
    from uipc.core import *
    scene = Scene()
    \`\`\`

Reference Documents (`docs/specification/*_uid.md`)

Purpose: Technical reference for identifiers and ranges.

Rules:

Example:

# Constitution UID

64-bit unsigned integer. Official range: $[0, 2^{32}-1]$. User-defined: $[2^{32}, 2^{64}-1]$.

Build/Install Documents (`docs/build_install/`)

Purpose: Step-by-step build instructions.

Rules:

Example:

| Name | Version | Usage | Import |
|------|---------|-------|--------|
| [CMake](https://cmake.org/) | >=3.26 | build system | system install |

\`\`\`shell
git clone https://github.com/microsoft/vcpkg.git
\`\`\`

General Rules

Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.