lucy / receipt
AGENTS.md58 starsChanged 8 days agoApache-2.0View on GitHub
Package receipt owns the workspace installation receipt (.lucy/install.yaml): the authoritative ledger of committed runtime outputs and the resolutions they answer.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- artifact/AGENTS.mdAGENTS.md
- bootstrap/AGENTS.mdAGENTS.md
- catalog/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- document/AGENTS.mdAGENTS.md
- e2e/AGENTS.mdAGENTS.md
- install/AGENTS.mdAGENTS.md
- operation/AGENTS.mdAGENTS.md
- resolve/AGENTS.mdAGENTS.md
- upstream/AGENTS.mdAGENTS.md
- workspace/AGENTS.mdAGENTS.md
The file
Files
receipt
Package receipt owns the workspace installation receipt (.lucy/install.yaml): the authoritative ledger of committed runtime outputs and the resolutions they answer.
Responsibilities & Ownership
- Committed State Ledger: Records workspace-relative paths, SHA-256 conflict baseline digests, file modes, and origins (
bootstrap,packagewith package identity, ormcdrfor the independently reconciled wrapper runtime) for managed outputs committed by installation or adoption. - Authoritative Ownership: Lucy owns only files recorded in the receipt. Seed files are initialized when missing but user-owned thereafter, discard files are staging-only, and unrecorded files remain unmanaged. The receipt records a seed's path so a missing seed invalidates the bootstrap contract without claiming its content.
- Persistence: Provides canonical memory snapshots (
Snapshot); installation publishes those bytes through the workspace transaction journal. - Strict Validation: Rejects unnormalized or unsafe paths, reserved filenames, path collisions (case-insensitive), and invalid digests. Legacy un-attributed receipts return
ErrLegacyReceiptgiving explicit remediation (lucy initorlucy init --force).
Fingerprint Relationship
- Bootstrap Fingerprint:
BootstrapFingerprint(lock)returns the bootstrap installation key: the snapshot recipe key combined with the server directory. The recipe key digests the Lucy build identity, the bootstrap method, the product, the Minecraft and core versions, the core digest, and each input identity and digest in lock order. It excludes URLs, filenames, Java requirements, tracked files, MCDR, and packages, so snapshots stay shareable across directories. The Lucy build identity is the SHA-256 of the running executable, so a new Lucy build makes the bootstrap fingerprint of an existing receipt stale; the server directory is part of the key because an installation answers one location. - Package Fingerprint:
PackageFingerprint(lock)digests the package pins and MCDR wrapper directory. - Invariance: Explicitly excludes tracked files, the manifest fingerprint, and Java requirements. Ordinary package changes do not invalidate an unchanged, satisfied bootstrap.
Consumers
install: Checks if the installed state is current againstBootstrapFingerprintandPackageFingerprint, manages transactions, and commits updated receipts.workspace/discovery: Reads the receipt to distinguish managed files from unmanaged workspace entries.filetrack: Uses receipt entries to verify file integrity and detect modified files.
Relevant Tests
operation/operation_filetrack_workspace_test.go: Resolution fingerprinting and tracked file behavior.install/install_pipeline_test.go: Staged installation commits and receipt updates.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

