docs: rewrite JsonRpcBundle docs, add SDK docs, move them under docs/api
en/docs/api/json-rpc-bundle/developers/ai.md
new file +51
−0
Rules for AI assistants
Claude Code, Codex, Cursor, Copilot and other assistants write better code when they know the rules for working with a library. We have prepared instruction files that plug into your project alongside your existing rules — without replacing your AGENTS.md or CLAUDE.md.
Files
| File | What for | Download |
|---|---|---|
json-rpc-bundle.md |
Projects that expose an API via JsonRpcBundle: how the agent should work with the library, rules for procedures, parameters, results, errors, caching, API versions and groups, events, known pitfalls, verifying the result | json-rpc-bundle.md |
json-rpc-bundle-extensions.md |
Bundle extension packages: the entry point via RpcExecutor, tokens, groups and versions, routes, compile-time constraints, package requirements |
json-rpc-bundle-extensions.md |
ufo-code-style.md |
Optional: the UFO-Tech team's code style — for projects that adopt it | ufo-code-style.md |
The files are in English: assistants follow English instructions more reliably. The rules are written for bundle version 10.4.
How to connect
Put the file in your repository, for example in docs/ai/:
mkdir -p docs/ai
curl -o docs/ai/json-rpc-bundle.md https://ufo-tech.space/assets/ai/json-rpc-bundle/json-rpc-bundle.md
and add a reference to it in the instruction file your project already has:
| Assistant | What to add |
|---|---|
| Codex, Cursor, Zed and others supporting AGENTS.md | a line in your AGENTS.md: When working with JSON-RPC procedures, follow docs/ai/json-rpc-bundle.md. |
| Claude Code | a line @docs/ai/json-rpc-bundle.md (import) in your CLAUDE.md |
| GitHub Copilot | a file .github/instructions/json-rpc-bundle.instructions.md with the rules' content and applyTo for the procedures directory |
| Cursor (project rules) | a file .cursor/rules/json-rpc-bundle.mdc with the rules' content |
Your existing rules remain primary: the bundle's file does not override your project's style or architecture, it only describes how to work with the library.
What is inside
How the agent should work — at the beginning of the file:
- the source of truth is the installed bundle code in
vendor/and the release notes invendor/ufo-tech/json-rpc-bundle/releases/, not the model's memory; - check the installed version; do not invent classes, attributes, options; report any contradiction between the rules and the code;
- do not change public RPC contracts without need (breaking changes mean a new API version) and do not refactor outside the task.
Library rules — briefly, with links to the documentation instead of explanations: thin procedures, DTOs and declarative validation, result format, errors, caching, API versions and groups, events.
Known pitfalls of 10.4 — deprecated attributes and events, #[RPC\DTOCollection] on a method, ttl for #[RPC\Lock], event specifics for Messenger and HTTP errors (see Open issues).
Check before finishing — tests, a call of the changed method, the schema in GET /rpc.
The file intentionally does not explain how the mechanisms work — that is what the documentation it links to is for. This keeps the instructions short and prevents them from turning into a second copy of the documentation that will drift away from the first over time.