lucy / install
AGENTS.md58 starsChanged 8 days agoApache-2.0View on GitHub
Convergence engine for workspace runtime files, documents, and receipts. - Executes convergence (Resolve, PlanFromResolution, Sync, ApplyPlan): resolves or replays locks, stages runtime trees, and atomically commits changes. - Staging vs workspace ownership: materializes locked server inputs and enabled packages into a private staging directory. Staged files never become owned workspace state until committed. - Runtime ownership: the files a bootstrap method produces (server jars, libraries, versions, cache, launchers, run scripts) are owned as the runtime image of the lock's recipe.…
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
- operation/AGENTS.mdAGENTS.md
- receipt/AGENTS.mdAGENTS.md
- resolve/AGENTS.mdAGENTS.md
- upstream/AGENTS.mdAGENTS.md
- workspace/AGENTS.mdAGENTS.md
The file
Files
install
Convergence engine for workspace runtime files, documents, and receipts.
Responsibilities & Boundaries
- Executes convergence (
Resolve,PlanFromResolution,Sync,ApplyPlan): resolves or replays locks, stages runtime trees, and atomically commits changes. - Staging vs workspace ownership: materializes locked server inputs and enabled packages into a private staging directory. Staged files never become owned workspace state until committed.
- Runtime ownership: the files a bootstrap method produces (server jars, libraries, versions, cache, launchers, run scripts) are owned as the runtime image of the lock's recipe.
--overwritegoverns package destinations only. - Manifest, lock, and receipt semantics: manifest (
lucy.yaml) defines intent, lock (lucy-lock.yaml) pins exact resolutions, and receipt (.lucy/install.yaml) records committed outputs, baseline hashes, modes, and origins (bootstrap,package, ormcdr). Receipt validity separatesreceipt.BootstrapFingerprint(runtime currentness: installation key of the snapshot recipe plus server directory, owned runtime digests, and recorded seed presence) fromreceipt.PackageFingerprint(packages and MCDR wrapper). A recorded seed path must be a present regular file; its content stays user-owned. Java requirements, tracked files, and manifest fingerprints do not invalidate it. - Adoption records ownership of managed files that match the runtime image, or only files that match the lock's digest pins if the image is unavailable. A matching bootstrap fingerprint and intact receipt baselines let install skip runtime staging and retain accepted outputs during package changes.
Invariants & Transaction Safety
- Path validation: verifies workspace confinement (
SafePath), rejects path names that alias the same target filesystem entry, and reserves.lucy/commit.yaml,lucy.yaml, andlucy-lock.yaml. - Verification, commit, and rollback:
- Preserves before-images of replaced or pruned files into a temporary workspace-relative
.lucy/rollback-*directory before publishing.lucy/commit.yaml. - Displacement: a replaced runtime output that Lucy does not own, or owns with a changed digest, keeps its before-image under
.lucy/displaced/<transaction-id>/files/with anindex.yamlbeside it (path, sha256, mode). The journal carries the flag; execution happens only after the commit point, recovery before it restores the original files, and Lucy never deletes displaced content. - Accepted entries already absent at planning stay preconditions through journal planning and the pre-commit check; a path that reappears fails the install and is never deleted.
- Atomically writes files, lock, manifest (if publishing), and receipt; then marks the journal
Committed = true. - Point of no return: once marked committed, recovery is cleanup-only. Failures during rollback/journal cleanup or post-commit tracked-file provisioning return
CommittedError; committed files and documents are never rolled back.
- Preserves before-images of replaced or pruned files into a temporary workspace-relative
- Recovery and inactivity protection:
- Interrupted transactions are recovered under
.lucy/writer.lockviaRecoverLocked/RecoverInstall. - Journal detection is passive; journal replay requires an inactivity check verifying server processes are stopped before any disk mutation.
- Replay checks pre-images and aborts rather than overwriting intervening user edits. Stale staging debris is swept on acquiring the writer lock.
- Interrupted transactions are recovered under
Relevant Tests
go test -count=1 ./install
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.

