Rust workspace (edition 2021, MSRV 1.89, resolver = "2"). unsafe_code = "deny", clippy all = warn.
This file is an index, not a second copy of the rules. Every section below
names the architecture/ deep dive that owns the detail. When you change code,
CI, the gate, or the plan system, follow the doc chain in
architecture/tooling-governance.md §7.3
and the docs-hygiene skill.
Full dependency rules and per-crate boundary rationale:
architecture/tooling-governance.md §2.
crates/eggup-core— policy-neutral local mechanics:InstallPlan → Prepared → Verified → Validated → Receipt. Deps:sha2, plusself-replaceWindows-only (deferred deletion of a replaced running image; non-Windows graphs staysha2only). Never add transport, service-manager, or Eggpack deps here.crates/eggup-acquisition— transport-neutral seam (AcquisitionTransport,FixtureTransport,ComposedTransport,FetchLimits). Zero dependencies — not evensha2. No eggup deps.crates/eggup-eggfetch— native HTTP adapter (eggfetch-core+tokio+futures-util); depends only oneggup-acquisition. Must not knoweggup-curlexists.crates/eggup-curl— external-curl adapter, no embedded HTTP/TLS stack; depends only oneggup-acquisition. Must not knoweggup-eggfetchexists. Transport composition lives in the seam, never in an adapter.crates/eggup-service— manager-neutral lifecycle; depends only oneggup-core(+windows-args, +windows-serviceon Windows).crates/eggup-archive— bounded allowlisted local tar.gz/zip extraction; depstar,zip,flate2,fs_at,sha2, dev-depeggup-core. No transport, authenticity, or live-installation policy.crates/eggup-eggpack— optional leaf adapter for Eggpack ReleaseManifest v1; latest published version is0.2.0(its immutable package pins Eggup dependencies at=0.2.0). The workspace source candidate is0.2.1and its three local pins are=0.2.1; it depends oncore+archive+acquisition(local paths) +eggpack-manifest = "=0.1.2"from the registry. Its exact dependency list is owned bycrates/eggup-eggpack/Cargo.toml. Only crate allowed to touch producer types.crates/eggup-transport-footprint— non-published (publish = false) footprint fixtures:curl_only/eggfetch_only/dualbinaries behindrequired-features, with a source-level linkage-discipline guard intests/cross_link_guard.rs. The isolated single-adapter configurations are built bystableandmacosand checked at the MSRV floor bymsrv;windows-checkbuilds none of them.
New crates must join Cargo.toml members, inherit the 5 shared keys (version, edition, rust-version, license, repository), and set [lints] workspace = true. The 7 library crates also carry #![forbid(unsafe_code)] and #![deny(missing_docs)]; eggup-transport-footprint is the sole exception (binary-only, no lib.rs, and no README.md/CHANGELOG.md — see §3.4 of the governance deep dive).
Gate is scripts/check-local.sh; rationale, per-line purpose, and the coverage
gaps are in architecture/tooling-governance.md §4–§5.
./scripts/check-local.sh
# = cargo fmt --all -- --check
# + cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
# + cargo test --workspace --all-targets --all-features --locked
# + cargo doc --workspace --no-deps --locked
# + cargo tree --workspace --locked # executed for resolution; review boundary output manually
# + ./scripts/check-docs-truth.sh # source versions, published versions, and docs truthcargo tree always exits 0 on a resolvable graph. Read it: the dependency-boundary rules are enforced by human review only.
Focused runs: cargo test -p eggup-core, cargo test -p eggup-core <name>, cargo clippy -p <crate> --all-targets --locked -- -D warnings.
CI (.github/workflows/ci.yml) adds what the script lacks: stable (fmt/clippy/test/doc plus the packaged-service step on Linux), msrv (workspace cargo check and the packaged-service step on 1.89.0), service-systemd (registry-only published 0.1.2 negative controls, current real-systemd fixtures, and published registry-only 0.1.3 positive quiescence and ownership controls), macos (full cargo test plus the packaged-service step), and windows-check — which runs ten cargo test steps, then cargo package -p eggup-service --locked. The packaged-service step verifies the packaged service crate against the registry, strictly: its eggup-core = "^0.2" requirement resolves against the published eggup-core 0.2.1, and the packaged sources are compiled. Windows tests cover acquisition/archive/curl, eggpack, three named service diagnostic tests, SCM, the live SCM fixture, Core current_executable and stale_lock_recovery, then the full workspace. Core M010/M011 self-replacement and lock-race fixtures execute natively, not merely compile. Neither msrv nor windows-check passes --all-features on its workspace check, but msrv checks the three feature-gated footprint configurations by dedicated steps, so the footprint binaries are built by stable and macos and checked at the 1.89 floor by msrv; only windows-check builds none of them. CI never publishes; releases are manual.
Start at architecture/overview.md (birds-eye view, module map, cross-cutting invariants, deep-dive index), then the deep dive for the crate at hand:
eggup-core→architecture/core-transaction.md+ contracts incrates/eggup-core/docs/{domain,verification,transaction}.mdeggup-acquisition→architecture/acquisition.mdeggup-eggfetch→architecture/eggfetch-adapter.mdeggup-curl→architecture/curl-adapter.mdeggup-service→architecture/service-lifecycle.mdeggup-archive→architecture/archive-extraction.mdeggup-eggpack→architecture/eggpack-adapter.mdeggup-transport-footprint→architecture/transport-footprint.md- workspace, CI, plans/process, release, agent surface →
architecture/tooling-governance.md - consumer-facing how-to (
docs/) →architecture/tooling-governance.md§7.4.docs/is non-normative and must never be the place a rule is introduced — it points at the contracts, it does not restate them.
In .opencode/skills/. Each summarizes a normative source; none adds policy. A
drifting skill is corrected by rewriting the skill.
planning-workflow— plan → implement → closure → registry; 16-section templateverify-workflow— local gate, CI lanes, coverage gapsdocs-hygiene— which doc owns which fact; the doc-change chain; recurring drift classesrelease-workflow— manual crates.io publication, dependency ordering, exact-pin cascade
There is no .skills/ directory; plans/ + architecture/ remain the source of truth.
Full statements with citations are in
architecture/overview.md (cross-cutting invariants)
and architecture/tooling-governance.md.
- Authoritative contracts:
crates/eggup-core/docs/{domain,verification,transaction}.md+architecture/*.md. SHA-256 is integrity evidence only — no authenticity/signature claims, no invented timeouts, no crash-journaling claims. - Ownership
Absent | Owned | Foreign | Unknownis caller-proven viaOwnershipVerifier;Ownedis never inferred.commitrevalidates ownership + staged digests under lock;Foreign/Unknown/flap fails closed with a receipt (RolledBack/RecoveryRequired), notErr— only lock contention/setup failures returnErr. validaterequires every member to carryIntegrityStatus::Verified. A member declaredIntegrityRequirement::None(NotRequired) always fails — there is no escape hatch.- Core never creates live destination parents and never decides that a lock is stale.
MutationLock::acquirenever recovers; recovery is opt-in per commit via a caller-suppliedStaleLockVerifierand displaces only the exact observed record. Staging is owner-private (0700/0600on Unix); its placement is an authority decision — ordinary plans stage beside the install root,InstallPlan::for_current_executablestages inside it so a self-update never needs write authority above the executable's directory. - A program can replace the executable it is running through the same transaction model (
InstallPlan::for_current_executable). The old generation is renamed aside, not deleted, soRollBackstays possible; on Windows a kept-installed update reportsCleanupDisposition::DeferredToProcessExitbecause the old image is still mapped. eggup-eggpackarchives stop at extraction-required evidence; URL/install-root/ownership/permission/authenticity policy stays caller-owned.
Process detail: architecture/tooling-governance.md §6. Full checklist: the planning-workflow skill.
plans/000–003(spec, terminology, roadmap, process) are normative — do not edit in ordinary work. Accepted ADRs inplans/adrs/are superseded, never rewritten.- Work flow: subsystem roadmap → bounded
implementation/<subsystem>/NNN-*.mdplan (16-section template inimplementation/README.md, needs SHA baseline + non-goals + failure semantics + verification commands) → implement →closure/<subsystem>/NNN-status.md(requirement→evidence matrix, exact commands, per-platform results) → updateplans/registry.md+ roadmap status table. - "medium-or-higher" is the de facto blocking-severity gate: any such issue still open forces a new corrective before the milestone closes.
- Public API changes need rustdoc; keep library-crate
README.md+CHANGELOG.md(Unreleased, with a no-publication/no-migration disclaimer) current. The rootCHANGELOG.mdaggregates but does not replace the per-crate ones — an unpublished fix (notably a security fix in an already-published crate) must appear in both.
Publication is a tracked milestone, never a side effect and never automated by CI. See the release-workflow skill and
architecture/tooling-governance.md §8. Note that eggup-eggpack pins its Eggup dependencies exactly (see crates/eggup-eggpack/Cargo.toml), so a seam fix needs a separate adapter republication to reach it.