Forge
Explanation

The AI-docs digest

Why Forge ships the AI-docs digest alongside the tool it describes.

CATIA Magic ships a Developer Guide and an Open API JavaDoc that together run to thousands of pages. catia-magic-ai-docs distils each bundle into a markdown digest sized for an AI context window and publishes it to the assets repository. installCatiaMagic fetches the digest beside the tool, and installAiDocs unpacks it to dev-env/ai-docs/:

dev-env/
  Cameo_Systems_Modeler_2026x_HF2_no_install/   the tool
  ai-docs/
    INDEX.md                                    two-axis lookup table
    reference/api|guide/                        per-version, ships with the tool

Why it travels with the tool

The digest describes one build of CATIA Magic. An API that exists in 2026x may be absent in 2024x, and a signature may differ between refreshes. A digest fetched independently of the tool would therefore describe a build other than the one on the compile classpath, and an assistant reading it would confidently propose code that does not compile.

Keying the digest by the tool archive name and downloading it with the same command that installs the tool removes that failure mode by construction. The digest cannot describe a different build, because the command that fetched it also installed the build.

Absence is the normal case

A digest exists only for the CATIA Magic builds that have been ingested, a subset of what the assets repository carries. listCatiaMagicVersions reports which archives have one:

Archive                                              Preset  AI-docs
---------------------------------------------------  ------  -------
Cameo_Systems_Modeler_2024x_Refresh2_HF1_no_install    yes     no
Cameo_Systems_Modeler_2024x_Refresh3_no_install        yes     no
Cameo_Systems_Modeler_2026x_HF2_no_install             yes     yes

Because absence is ordinary rather than exceptional, three pieces of the design guard against it. The download swallows its own failures. installAiDocs carries an onlyIf guard, since it is a Sync and syncing from an empty source would delete a digest installed earlier. And installCatiaMagic is finalizedBy installAiDocs rather than depending on it, so a missing digest never holds up a tool install.

Skip the digest explicitly with -PaiDocs=false, exactly as -PuserPreset=false skips the preset.

Why ai-docs/ is a sibling

dev-env/ai-docs/ sits beside the installation directory, never inside it. installCatiaMagic is a Sync task, so anything nested under its destination is deleted on the next run. A digest installed as a child would survive exactly until the next tool install.

On this page