-
Notifications
You must be signed in to change notification settings - Fork 29
docs: add AGENTS.md and CLAUDE.md #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Alex-Arsys
wants to merge
1
commit into
main
Choose a base branch
from
docs/add-claude-md
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # core — Euro-Office | ||
|
|
||
| @../AGENTS.md | ||
|
|
||
| Guidance for Claude Code (and other AI agents) working in **core** — the C++ document format conversion and rendering engine. | ||
|
|
||
| ## What this repo is | ||
| A monolithic C++ library implementing document format conversion (X2T CLI: DOC/DOCX ↔ ODF/PDF/HTML/EPUB/XPS/DjVu/…), font metrics generation (AllFontsGen), headless rendering (DocxRenderer), document scripting (doctrenderer), and WASM modules (fonts, spell, zlib, hash, drawingfile). Lowest layer of the stack — everything else depends on its output. Fork of `ONLYOFFICE/core`. Licensed **AGPL-3.0**. | ||
|
|
||
| ## Build Architecture & Critical Dependencies | ||
| - **Dependency chain:** `core-fonts` → `AllFontsGen` → `AllFonts.js` (sdkjs source tree) → `sdkjs` → `web-apps`. A font change requires regenerating `AllFonts.js` and rebuilding sdkjs. Conversion errors from X2T surface in `converter/out.log`, not in any Node.js trace. | ||
| - **vcpkg binary cache:** First cold build compiles all dependencies from source — **~5 hours**. The `NUGET_CACHE` env variable points to a remote binary cache reducing this to minutes. | ||
| - **Incremental builds are container-scoped:** CMake/ninja incremental state exists only for the current container's lifetime. After `docker compose up -d --force-recreate eo`, the next `make core` is a full rebuild. | ||
| - **WASM modules are a separate build:** Require Emscripten, built independently from native targets. A WASM build failure does not block the native build — they can diverge silently. | ||
|
|
||
| ## Build & verify | ||
|
|
||
| Run from inside the `eo` dev container (see parent `../AGENTS.md` for container setup): | ||
|
|
||
| ```sh | ||
| make core # full build — all components | ||
| make core/x2t # X2T format converter only | ||
| make core/allfontsgen # font metrics generator — produces AllFonts.js for sdkjs | ||
| ``` | ||
|
|
||
| Builds are incremental (CMake/ninja) for the lifetime of the container. A `docker compose up -d --force-recreate eo` resets all incremental state — the next `make core` is a full rebuild. | ||
|
|
||
| ## Rules | ||
| - **Never** hand-edit vendored third-party sources in `Common/3dParty/` or `DesktopEditor/agg-2.4/`. ICU, OpenSSL, and HarfBuzz are vendored sources built via `build_3rdparty.py` — do not patch them directly. For vcpkg-managed dependencies (`hunspell` in the root `vcpkg.json`; `Boost` in `Common/3dParty/boost/vcpkg.json`), bump the manifest instead of patching. | ||
| - **Never** commit the `build/` output directory or compiled binaries. | ||
| - **Never** assume a passing native build means WASM is also clean — they are built separately. | ||
|
|
||
| ## 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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @AGENTS.md |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make sense to document build steps for the binaries and modules in some way so agents can pick up and verify passing build and changes locally.