Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# document-formats — Euro-Office Format Registry

@../AGENTS.md

Guidance for Claude Code (and other AI agents) working in **document-formats** — the canonical document-format definition.

## What this repo is
A single JSON data file, `onlyoffice-docs-formats.json`, defining every document format the suite supports, plus `build.js` which regenerates `README.md` from it. There is no runtime library — the JSON is read directly by consumers via file path.

## Schema & Consumers
- **Entry shape:** each entry has exactly `name`, `type` (`word`/`cell`/`slide`/`pdf`/`diagram`), `actions` (e.g. `view`, `edit`, `auto-convert`, `fill`, …), `convert` (array of target format names), and `mime` (array of MIME strings). There are no boolean routing flags — conversion targets are listed by name in `convert`.
- **`name` is the cross-repo identifier.** It is used as the file-extension key by `server`, `web-apps`, and the `core` converter. **CRITICAL:** renaming or removing a `name` silently breaks every consumer that hardcodes it — grep all repos before touching one.
- **`build.js` only regenerates the README.** It reads the JSON and rewrites the "Supported formats" tables in `README.md`. It is **not** a schema validator or a build gate — there is no structural validation step in this repo.

## Rules
- **Never** edit `README.md` by hand — run `node build.js` after any JSON change so the tables stay in sync.
- **Never** change a MIME type or extension without cross-referencing the file-upload handling in `server/DocService`.
- **Never** add an entry without all five fields, and verify its `type` is an existing editor type (`word`, `cell`, `slide`, `pdf`, `diagram`).

## Findings & Long-tail
No centralized findings store exists in this repository yet. Document edge cases in code comments or GitHub issues until one is established.
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md