Contributing
Fixes, tests, and improvements to the interface and documents are welcome. Before you start, confirm which layer your change belongs to.
Where a change goes
| Change | Route |
|---|---|
| Interface, wording, interaction | A pull request, in crates/app and crates/zikaron-ui. |
| The command line | A pull request. When the output format, flags, exit codes or refusals change, update CLI-SCHEMA.md with it; tests check it item by item, and zikaron contract is made from the same tables in the code. The table of verbs that go through the desktop lives in three places, section 11 of CLI-SCHEMA.md, the desktop’s channel table and the command line’s verb table, and tests hold them to each other. mcp’s tools are read off the verb table, tests pin the tool list, and the protocol is section 13. |
| Local data formats | A pull request, updating crates/app/local-data-standard.md with it; its test vectors in crates/app/tests/local_standard.rs are checked byte for byte. |
| Fixed literals | When adding or changing a literal such as a file magic, a format name or a channel name, register it in crates/app/family-literals.json; a test checks each entry against the place in the code that defines it, both ways. |
| Packaging and continuous integration | A pull request, changing packaging/, crates/zikaron-pack or .github/workflows/. |
| A core’s implementation (defects, performance) | A pull request, with the zero-divergence result of the conformance comparison. |
| A new reading of entries | Settle the convention in the discussions first, then implement it. |
| Wording of a law text | An issue. Prose may be revised while the core’s digest keeps its value. |
| The rules of the law | An issue, which leads to the next version of the law. |
| The frozen cores and the registry contract | An issue. They are pinned by digests and the code hash. The rest of base/ is tooling and takes pull requests directly. |
Process
- Open an issue first, saying what you want to change and why; small corrections can go straight to a pull request.
- Branch from main, one request per change.
- Run every test locally.
- In the commit message, say what changed and what users will see.
Checks before submitting
- The toolchain is pinned at Rust 1.97.1 by
rust-toolchain.toml.cargo test --workspace --locked --no-fail-fast --releasepasses; continuous integration on the pull request builds and tests release builds on macOS, Linux and Windows, and the macOS and Linux cells must pass; those two cells also build both programs the way a release does and runzikaron-pack no-pathsto confirm the binaries carry neutral path names alone. cargo build --release --lockedpasses; when dependencies are added or removed, commitCargo.lockwith the change, and the third-party licence list regenerates with the build.- If
zikaronorzikaron-kitchanged: the comparer shows zero divergences on corpora from at least three seeds, generated in a copy outside the repository. - If
zikaron-anchorchanged: every chain-facing recording replays identically. - Both digests of the law and the contract’s code hash recompute to their values.
- Every new sentence in the interface exists in Chinese and English.
- Every new control is wired to a real action and shows a clear message when it fails.
- The matching passage of the manual is updated, Chinese and English matching sentence for sentence.
Judgment belongs in the cores
When interface code meets a question such as “is this entry valid” or “is this grant in force right now”, call the core and use its conclusion. A judgment rewritten in the interface will drift from the original. Likewise, the command line passes a core’s output on unchanged.
Rules for tests
- Temporary directories
- Every test creates its machine folder and data folder in its own temporary directory and clears it at the end.
- Test keys
- Keys are generated in the test or taken from the corpus; real recovery words and private keys stay outside the repository.
- A local chain
- Tests that touch anchoring run against a local anvil or recordings; public nodes are for manual trials.
- Both sides
- Every refusal rule comes with one input that should be refused and one that should be accepted.
- Injected time
- A test that needs “now” passes the moment in as an argument.
Interface conventions
- An action that writes to the ledger or the chain first opens a confirmation card listing where it writes, what it writes and the cost; the solid red key that actually writes appears on the confirmation card alone. A request through the desktop (
--home) comes from the command line’s side, and the desktop carries it out directly, putting on chain as the setting “Putting on chain from the command line” says. Turning on “With a credential” asks for the passcode and a validity, and its card says that while putting on chain from the command line sends automatically, the command line can spend this identity’s gas. - A screen holds at most one blue primary button.
- The front of the interface uses plain language; addresses, hashes, type names and verdict tokens go under “Details”.
- Every failure says two things: what happened, and what to do next.
- Pages respond at once; long work runs in the background and announces itself once, on completion.
- Where the interface says “in effect” or “confirmed”, a readable fact stands behind it.
Wording
Interface wording follows the concise style of mature applications. The manual, the Wiki and this guide state what holds now; history stays in the version record. Code comments are in English and name the section when citing the law.
Keeping the repository clean
Commits hold product source and documents alone; local paths, e-mail addresses, keys, node access tokens and personal test data stay outside the repository. Read the diff before you commit.