rust-change
Implement or review a change to either crate with the effects boundary, tests and documentation evidence the invariants require.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- rust-change
- description
- Implement or review a change to either crate with the effects boundary, tests and documentation evidence the invariants require.
03 SKILL.md 正文
Change a crate
- Read
AGENTS.mdanddocs/explanation/architecture.md. Identify which crate the change lands in:crates/libpachinkoholds the domain and performs no effect;crates/pachinkois the service that depends on it and supplies the real implementations. A dependency never points from libpachinko to pachinko. Note whether the change touches libpachinko's public API, because a public item is a contract the service builds on and its shape is part of the change. - Find the clause. Every behaviour has an owning module under
docs/specs/; read the rule, its guards and its outcomes before writing code. If no clause says what you need, this is aspec-changefirst, not a judgement call in code. The one exception is scaffolding with no domain behaviour that a ticket scopes, such as the service's wiring or a gate's harness: cite the ticket in place of the clause. - Put any effect behind a trait. The clock, randomness, the filesystem, the network, the environment and threads are each reached through a trait libpachinko defines, with a fake beside it that tests supply values through; the real implementation lives in pachinko. A new kind of effect needs a decision record before code (decisions 0003 and 0008).
just effectschecks the boundary, but read the diff for a directstdcall too: the std-API bans list items, so a std item newer than the list, or one behind another target'scfg, a mix of features,cfg(not(clippy))or a customcfg, passes the gate. - Derive the test from the clause before implementing, and confirm it fails first. A unit test lives in the module beside the code it tests, under
#[cfg(test)]; an integration test undercrates/libpachinko/tests/drives the public API through the fakes, and one undercrates/pachinko/tests/drives the service; a public item carries a doctest that asserts, because doc examples are tests. A test already green proves nothing about the new behaviour. - Every public type is
Send + Sync + 'static,CloneandDebug; public enums and structs are#[non_exhaustive]. - Silence a lint only with
#[expect(lint, reason = "...")]on the item it names, never a blanketallow, and never writeunsafe; the workspace forbids it. An inner#![allow(lint, reason = "...")]passes both attribute lints, so the gate cannot see it: reject it in review, and use#![expect(...)]instead (decision 0009). - Run
just fmt-check,just clippy,just test,just effectsandjust coverage, thenjust checkbefore handoff. - Report by
file:line: what changed, which clause it implements, and which test proves it.
04 同仓库更多 Skills
witness
Independently witness that an Allium loop's convergence claim is true and was reached honestly. Use when the user wants to verify a loop's self-report, confirm tests really pass and no generated test was weakened, produce a convergence certificate or witness record, gate CI on a trustworthy signal, or check that an autonomous run did not cheat its way to green.
weed
Weed the Allium garden. Find where Allium specifications and implementation code have diverged, and help resolve the divergences. Use when the user wants to check spec-code alignment, compare specs against implementation, audit for spec drift or violations, sync specs with code or code with specs, or verify whether the implementation matches what the spec says.
tend
Tend the Allium garden. Use when the user wants to write, edit, update, add to, improve, clarify, refine, restructure, fix or migrate Allium specs. Covers adding entities, rules, triggers, surfaces and contracts, fixing syntax or validation errors, renaming or refactoring within specs, migrating specs to a new language version, and translating requirements into well-formed specifications. Pushes back on vague requirements.
spec-change
Change an Allium specification and carry the change through the tests and the implementation.
rust-change
Implement or review a change to either crate with the effects boundary, tests and documentation evidence the invariants require.
review-docs
Add or revise a handbook page so it satisfies the documentation contract and stays reachable.