AssetForge 文档

Project file format and API stability

AssetForge 0.18 freezes two things that other tools and future versions depend on: the project file (forge-project.json) and the MCP tools that AssetForge exposes to Claude Code, Claude Desktop and other MCP clients.

The project folder#

PathWhat it isStable?
forge-project.jsonThe project: Project Bible, asset library, pipelines, clips, animation systems, game design, world, game data, release settingsYes (format 1)
forge-project.format<N>.backup.jsonCopy of the file before it was upgraded from format NWritten once, never touched again
output/, export/, release/Generated files (meshes, textures, audio, Unreal exports, store art, builds)Plain files; layout may grow
jobs/, batches/, briefs/, assistant/, anim/Job records, batch reports, brief chats, Producer chats, animation working filesInternal; may change between versions
.forge-cache/Node result cacheInternal; safe to delete

forge-project.json#

The first key is always the format number:

{
  "version": 1,
  "name": "My Game",
  "bible": { "projectName": "…", "genre": "…", "technical": { "naming": { } } },
  "assets": [ { "id": "KAR001", "name": "…", "kind": "character", "status": "Bekliyor", "extra": { } } ],
  "pipelines": [ { "id": "…", "name": "…", "nodes": [ ], "edges": [ ] } ],
  "clips": [ ],
  "animSystems": [ ],
  "design": { },
  "world": { },
  "gameData": { },
  "release": { }
}

The full shape is the Project type in src/shared/types.ts. Some stored values are Turkish whatever the interface language (asset status such as Bekliyor / Üretildi, extra field names, evet / hayır). The app shows them translated and keeps writing them this way.

Compatibility promise#

  • Every 1.x version opens every file with a format number up to its own (PROJECT_FORMAT in src/shared/projectFormat.ts).
  • New optional fields do not change the format number. An older version ignores them; it does not delete them unless you edit and save that part of the project in the older version.
  • Renaming, moving or changing the meaning of a field raises the format number and adds an upgrade step (MIGRATIONS[n] turns format n into n + 1). Before upgrading, the file is copied to forge-project.format<n>.backup.json (once).
  • A file saved in a newer format is never opened or overwritten. The app shows "Could not open the project" with options to update AssetForge or choose another folder. Saving also checks the file on disk, so an older version that is still open cannot overwrite a file a newer version has just upgraded.
  • A file without a version field (hand-written, or from builds before 0.4.0) is format 0 and is upgraded to 1 with a backup.

MCP API#

The tools AssetForge exposes over MCP (Settings → MCP and external tools) are listed with their parameters in docs/api/mcp-tools.json. The file is generated by tests/apiFreeze.test.ts.

  • Allowed in a minor version: new tools, new optional parameters, new enum values, accepting more types for a parameter, better descriptions.
  • Breaking (needs a major version): removing or renaming a tool, removing a parameter or narrowing its type, making a parameter required, removing an enum value, letting a read-only tool change data.
  • npm test fails on a breaking change. After an allowed change, update the file with npm run api:snapshot. A deliberate breaking change is recorded with AF_API_BREAKING=1 npm run api:snapshot and goes in the changelog.

The MCP server reports the AssetForge version as its server version. Tool descriptions follow the interface language and are not part of the frozen contract.