Skip to content

kiarosama/revayat-scientific

v2.2.0GPL-3.0-or-later

Translate scientific and technical work into natural Persian. Verify names and pronunciations online, check RLI/PDI isolation, and split book batches across agents. Includes Vazirmatn for offline use.

Revayat Scientific — روایت علمی

Translate scientific sources from any language into accurate Persian with editable sources, preserved document objects and a verified PDF.

GitHub Actions CI workflow on main GNU General Public License v3.0 or later Release v2.2.0 standalone Rust packages Rust debug and release tests; inspect the exact revision's CI evidence Rust 1.100.0 toolchain measured via rustc Runs on Linux x64, Linux arm64, Windows x64, and Windows arm64 Prebuilt signed release ZIP and installable .skill archive Signed with pinned GPG key and GitHub build provenance English and Persian documentation Measured tracked repository tree size Agent Skills specification format Any source language to Persian Native Rust DOCX and PDF pipeline Isolated Docker or Podman TeX typesetting Claude Code, Codex, Cursor, Antigravity, and Copilot plugin manifests Support donations

Revayat is an agent skill and a native Rust executable. The host agent performs translation and scientific review; the executable handles document integrity, terminology, figures, typesetting and delivery. It supports Codex, Claude Code, Cursor, Kiro, Cline, Hermes, OpenCode, Antigravity and hosts that can read SKILL.md.

فارسی

What it does that a generic translator does not

ContractBehavior
Scientific fidelityInventory claims, uncertainty, negation, quantities, equations, figures and references before drafting.
Consistent terminologyUse a job-local TSV ledger and source-located term briefs; select journal or system-docs.
Persian typographyPreserve logical Unicode order, RTL paragraphs and complete LTR isolates.
Native document operationsInspect and edit bounded DOCX/OPC packages and PDF objects while checking untouched structures.
Figures and geometryPreserve original artwork, page boxes, pixels, aspect ratio and crop density.
Verified deliveryRun source lint, font/page checks, text-order checks and real raster/render comparisons.
Recoverable publicationStage all outputs or installations, retain exact previous editions and preserve recovery evidence on unresolved failure.

Install

Install the pinned Rust toolchain to build from source:

git clone --branch main https://github.com/KiaroSama/Revayat-Scientific-Skill.git
cd Revayat-Scientific-Skill
cargo build --locked --release --workspace --bins
cargo run --locked --release --bin revayat-scientific -- install --agent codex

Use --agent all for detected hosts, --scope project --path <directory> for a project, or --dest <final-skill-directory> for another host. Existing installations require --force and an unambiguous Revayat identity. All targets are staged before activation; previous copies remain in skill-backups. See installation.

Native executables and .skill archives are produced by the target-specific CI jobs. Signed release ZIPs are available from GitHub Releases; CI artifacts and published releases have separate verification records. On Linux, keep bin/revayat-scientific and bin/revayat-process-owner together from the same build and revision. Windows packages keep bin/revayat-scientific.exe with bin/revayat-quota-worker.exe, the fixed native quota and kernel-control worker. A native archive also contains SKILL.md, references, allowed assets, agent metadata, license and notices. An installed payload needs no language interpreter, but external document engines remain separate.

Build all binaries with the command above before installing, packaging or using source commands. cargo run --bin revayat-scientific alone does not rebuild its platform sibling. A missing, linked or nonregular companion is refused; adjacency and collected bytes are checked, not a signed same-build/version handshake.

Native plugin manifests are included for five agent ecosystems:

  • Claude Code (.claude-plugin/):
/plugin marketplace add KiaroSama/Revayat-Scientific-Skill
/plugin install revayat-scientific@revayat-scientific-skill
  • OpenAI Codex (.codex-plugin/ and .agents/plugins/marketplace.json):
codex plugin marketplace add KiaroSama/Revayat-Scientific-Skill
codex plugin add revayat-scientific@revayat-scientific-skill
  • VS Code / GitHub Copilot & Agent Plugins 1.0.0 (plugin.json): enable chat.plugins.enabled, run Chat: Install Plugin From Source, and enter https://github.com/KiaroSama/Revayat-Scientific-Skill.
  • Cursor (.cursor-plugin/): add KiaroSama/Revayat-Scientific-Skill via Cursor Marketplace or Settings > Rules > Add Rule > Remote Rule (Github).
  • Google Antigravity (.antigravity-plugin/plugin.json): install directly from this repository in Antigravity's plugin manager or CLI.

The plugin exposes /translate-paper, /revayat-scientific-resume and /revayat-scientific-qa. Invoke $revayat-scientific in Codex. A source plugin checkout must first build the executable or use a matching CI artifact.

Use

From the repository, prefix commands with cargo run --locked --release --bin revayat-scientific --. In an installed skill, use bin/revayat-scientific (bin/revayat-scientific.exe on Windows).

revayat-scientific doctor
revayat-scientific fonts --offline job/fonts
revayat-scientific term-brief job/source.txt --terms job/terms.tsv --language en
revayat-scientific lint job/doc.tex --level journal --terms job/terms.tsv --manifest job/manifest.txt --strict
revayat-scientific build job/doc.tex --out delivery/article.pdf --engine tex --level journal --verify
revayat-scientific text-order delivery/article.pdf --source job/doc.tex
revayat-scientific docx --help
revayat-scientific pdf --help

Western-digit Vazirmatn v33.003 (SIL OFL 1.1) is the default Persian font for HTML/PDF, XeLaTeX and Persian DOCX runs. The native Rust executable embeds the repository's regular and bold fonts and their license. Use revayat-scientific fonts --offline <dir> to extract them without a download. DOCX references the family by name, so install the extracted pair where you render the document.

--engine weasyprint selects the actual optional WeasyPrint engine in the isolated document image. Its Rust adapter stages a closed, checked resource view and uses the same finite output quota and owned cleanup as TeX. WeasyPrint and its Python dependencies are external image packages; ordinary installed tools require no host Python installation. The Windows security fixtures retain one fixed CPython import dispatcher to exercise the genuine external runtime; its authority operations are implemented in Rust. TeX input needs an existing sibling .html. Automatic discovery preserves the order TeX, Chromium, WeasyPrint and never aliases their engine identities.

Use --help on each command for its exact schema. Keep job sources, ledgers, figures and translation logs outside the installed skill. Obtain consent before delegating translation to additional agents. Record source language, intended readership, selected terminology level and actual checks in the job log.

Optional toolRequired use
Sandboxed Chrome/Chromium/EdgeHTML rendering through the native DevTools client
WeasyPrint in the isolated document imageExplicit WeasyPrint rendering and HTML fallback when Chromium is unavailable
Docker or Podman with effective limitsIsolated TeX builds; native host XeLaTeX does not replace this boundary
PopplerPDF text/font/raster verification and supported extraction
Tesseract with selected language dataOptional OCR
LibreOffice WriterIndependent DOCX rendering in scientific CI

Without a shell

Give the host agent this repository or the generated .skill archive, then ask it to follow all nine stages in SKILL.md. A host with file tools can translate and maintain ledgers; executable checks require an available native executable and their listed external tools. Report unavailable checks accurately.

How it works

The nine stages are tool readiness, extraction, terminology, object preparation, translation, scientific/fluency review, typography/lint, build/verification and inspection/delivery. Translation uses the host model. Rust modules provide the common source model, bounded parsers, CLI, process ownership, DOCX/PDF operations, renderer controls, installers and CI tools. See architecture.

What it is honest about

Mechanical checks do not certify scientific accuracy, every PDF viewer, arbitrary OOXML/PDF extensions or hostile kernel isolation. Unsupported/encrypted/signed structures may be refused before transformation. Source-preserving checks and cooperative locks detect specific races; a directory transaction is recoverable rather than globally atomic. A failed or unavailable containment prerequisite must fail its required CI tier.

Documentation

Development

CI runs automatically on every push and pull request, and also supports manual dispatch. Native Rust development is maintained on main; the former rewrite/rust-native and rewrite/rust-complete branches are historical migration references. See development and migration verification for local commands, the required execution matrix and revision-bound hosted evidence.

cargo fmt --all -- --check
cargo clippy --locked --workspace --all-targets -- -D warnings
cargo build --locked --workspace --all-targets
cargo build --locked --release --workspace --bins
cargo run --locked --bin revayat-test-runner -- --tier portable --profile debug --output execution/portable-debug.json --timeout 1800
cargo run --locked --bin revayat-test-runner -- --tier portable --profile release --output execution/portable-release.json --timeout 1800
cargo run --locked --bin revayat-scientific -- migration-check
cargo run --locked --bin revayat-scientific -- validate
cargo run --locked --release --bin revayat-scientific -- package

The runner commands require hosted GitHub Actions provenance and matching checked-out SHA; they are source-authored CI commands, not a local acceptance recipe. Equipped cases and the eight-scope aggregate contract are described in security testing. Native collection runs actual Windows harnesses and qualified isolated Linux worker cases. The recorded baseline run includes bootstrap and other nonflat census reports. The reports explicitly retain final_parity_verified=false: successful execution and structural reconciliation do not establish complete assertion-level equivalence.

The migration map retains 583 original public test IDs; separate inventories record 37 upstream checks and 41 standalone security cases. These counts and registered Rust counterparts do not establish assertion-level parity or execution. Windows bootstrap stages, overlapping check/helper declarations and separate registry-oracle cases require their own behavioral and native evidence; their restoration is not waived because the original implementation used another language.

The CI contract requires debug/release builds and portable tests on Linux and Windows, equipped scientific execution of required ignored cases, Linux/Windows security, CodeQL, dependency review, workflow checks and fail-closed aggregate reporting. Source audit enforces classification and the 799-line per-file limit and reports comparable source/test sizes; a lower total than the historical baseline is not required. Quality requires reviewed removal/preservation evidence and actual tests, not a smaller line count. Verify the full job/case reports and tested SHA of the actual revision: a recorded successful baseline does not certify a later change or prove complete behavioral parity. Dependabot tracks Cargo, Actions and the TeX container base; strict Cargo audit, rustfmt, Clippy, actionlint and zizmor remain required.

Keep a translation log beside each document throughout all nine stages. The CLI separately writes content-free UTC operation logs to ./logs (REVAYAT_LOG_DIR overrides the location; REVAYAT_LOG_LEVEL accepts DEBUG, INFO, WARNING, ERROR). Records contain only the command category, exit category/code and duration, without arguments, tool output or private paths. Diagnostics and unresolved recovery journals stay local. See the skill for required delivery records.

Donate

If this project helps you, donations are appreciated.

CurrencyNetworkAddress
Bitcoin (BTC)Bitcoinbc1qmth5m03pu5hujw5xw5jmywam3jj3sqwqupesdt
USDT, BNB, USDC, etc.BEP200x0Bd0BA443a8B9cf15922bf7f0Bb0a4b495fD06Ef
USDT, TRX, USDC, etc.TRC20TWBA3xFTqgZAeAYMxqo85xWnzvty3DcAhw
Ethereum (ETH)ERC200x0Bd0BA443a8B9cf15922bf7f0Bb0a4b495fD06Ef
TONTONUQCN8Umo_OfOWqImZetQsrNStPcmLkMAKajFyiCOhso23NDb
Litecoin (LTC)LTCltc1qntqnnrunadurnw4cshv3qgspywrueyyeyngwuy
Solana (SOL)Solana7B2wkczUjmkDhETwQuknBL8sUsbuV7nErxc317TmQuwR
Polygon (POL)Polygon0x0Bd0BA443a8B9cf15922bf7f0Bb0a4b495fD06Ef

Author

Author: Kiaro Sama
GitHub: KiaroSama

License

GNU General Public License v3.0 or later. Optional dependencies and source documents keep their own licenses.