WEFT_OS/.agents/skills/weft-packages-data/SKILL.md
Marco Allegretti 39869a2a38
docs: add engineering contract, contributor toolkit and templates
Add AGENTS.md as the single engineering contract: sources of truth,
evidence and proof requirements, ownership, working modes, the reviewed
change loop, maintenance isolation, decision authority, dependency and
fork rules, the 0.0.x to 0.1.0 release progression, and branch and
publication rules.

Add .agents/ with scope, implement, verify, maintenance and release
procedures; reviewer, architecture debt scout, simplicity and refactoring
roles; skills for the compositor, Servo rendering, runtime capabilities,
appd sessions, packages and data, Linux deployment, integration
verification and documentation; and verify.py, which runs the existing
check profiles with --locked from any directory, stops on the first
failure and supports --dry-run.

check_toolkit.py validates local links and heading anchors, metadata,
catalog coverage and issue forms. A new contributor-toolkit CI job runs
both. The structure follows the Resina Design System toolkit at
1e768064f57a1e403ab271822383e732795905a6, adapted to WEFT.

Validation, against the committed lockfiles:
- verify.py toolkit: checker passes, 28 runner/checker tests pass
- verify.py portable, demos, packages: pass
- verify.py linux, runtime, servo-embed: fail on existing defects
  (clippy collapsible_if in the winit backend, three clippy lints in
  weft-runtime with wasmtime-runtime, and an E0308 in the selected Servo
  revision's servo-layout); the runner reports the failing status

Add CONTRIBUTING.md, issue forms for defects and changes, maintenance
problems and decisions of direction, and a pull request template asking
for ownership, proof and the validation actually performed. README.md
links the contribution guide.
2026-10-08 23:40:08 +00:00

57 lines
3.2 KiB
Markdown

---
name: weft-packages-data
description: Use for wapp.toml manifests, weft-pack, signing and trust, installation and updates, app data storage and EROFS dm-verity images.
---
# Packages, trust, data and updates
Owner: package tooling owns manifest validation, content identity, trust,
staging, activation and retention. User data has its own lifecycle and is never
owned by installed package bytes. Read the blueprint's
[packages, trust, storage and updates](../../../BLUEPRINT.md#9-packages-trust-storage-and-updates)
and [Notes requirements](../../../BLUEPRINT.md#82-notes).
## Where things live
| Concern | Source |
|---|---|
| `check`, `info`, `install`, `uninstall`, `list`, `generate-key`, `sign`, `verify`, `bundle`, `unbundle`, `build-image`, `build-verity` | [weft-pack](../../../crates/weft-pack/src/main.rs) |
| Manifests | [counter wapp.toml](../../../examples/org.weft.demo.counter/wapp.toml), [notes wapp.toml](../../../examples/org.weft.demo.notes/wapp.toml) |
| Demo signing fixture keys | [examples/keys](../../../examples/keys/weft-sign.pub) |
| Data and package roots used at launch | [appd runtime.rs](../../../crates/weft-appd/src/runtime.rs) |
| Image mount and privileged helper | [appd mount.rs](../../../crates/weft-appd/src/mount.rs), [weft-mount-helper](../../../crates/weft-mount-helper/src/main.rs) |
## Working rules
- The implemented signature covers the recursively enumerated package inventory,
including UI content and excluding the signature file, and both demo
signatures verify under it. Preserve that compatibility deliberately when
formalizing the format; do not re-sign demos to match a different description.
Correct documentation that describes a narrower inventory.
- Demo keys are fixtures and never production signing authority. Release
private keys stay outside the repository.
- Separate verified and development installation policies. Verified installs
fail closed on invalid, missing, revoked or untrusted signatures; development
installs are explicit and visibly marked.
- Validate IDs, entry containment, duplicates, link policy and the actual
component before trust decisions. Bind each app ID and its retained data to a
publisher key policy.
- Install and update through staging, validation, verification, immutable
content and atomic activation. Failure preserves the previous active revision
and user data; a live session stays pinned to its revision; uninstall keeps
data unless an explicit purge is requested.
- Migrating the existing `apps/<id>/data` layout needs detection, backup, conflict
handling and a test proving Notes contents survive. Keep it out of unrelated
cleanups.
- Verified image mode never falls back to a mutable directory, and the privileged
helper is enabled only after its caller authorization and failure paths are
specified and tested.
## Evidence
`python .agents/scripts/verify.py portable packages` runs the package unit tests
and checks and verifies the committed demo packages. Trust, install and update
claims need tamper, interruption, publisher-ownership, active-update and
uninstall fixtures from the blueprint's
[acceptance list](../../../BLUEPRINT.md#113-required-acceptance-fixtures), and
persistence claims need reruns after reinstall, restart and reboot.