lucy
AGENTS.md46 starsChanged 3 months agoApache-2.0View on GitHub
Lucy is a Minecraft server package manager. Its goal is to provide pm-like UX for server hosting and mod pack managing. Uses Taskfile (task). Build uses ldflags to inject four cipher fragments (keyA/keyB/ciphertextA/ciphertextB) plus optional release identity (releaseVersion/releaseCommit). Dotenv loads .env, .cipher_key, .cipher_ciphertext. See docs/shared/cipher-key-operations.md. To run the built binary against a test server directory:
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository4 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- install/AGENTS.mdAGENTS.md
- types/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
The file
We split this AGENTS.md into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 76
If your task is highly domain (Minecraft) related, always conduct research before action.
- Distinctive: line 78
Before implementing a new feature, or refactoring existing modules, first walk me through the core functions and types.
- Very specific: line 83
Always prefer the project's e2e testing suite (envgen).
- Distinctive: line 105
Every artifact digest is verified after fetch and generation aborts that environment on mismatch
- Very specific: line 110
Always tidy the files in packages touched after refactoring: relocate/rename/merge/split files for better maintainability.
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agents
Overview
Lucy is a Minecraft server package manager. Its goal is to provide pm-like UX for server hosting and mod pack managing.
Toolchain
Uses Taskfile (task).
task build # Build debug binary → dist/lucy-{os}-{arch} + dist/lucy symlink
task dev # Same as build
task run -- [args] # go run from repo root with CLI args
task build:dev # Same as build (host dev binary, incremental)
task build:watch # Rebuild on Go file changes (file watcher)
task build:release # Cross-compile all platforms (-tags release -w -s)
task test # go test ./...
task test:race # go test -race ./...
task check # build + test + test:race
task clean # Remove dist/ and release/ directories
task clean:dist # Remove dist/ only
task clean:release # Remove release/ only
task cipher:generate # Generate cipher files from CF_API_KEY env var
task ci:test # CI checks (optional cipher:generate, then check)
task ci:build # CI release build + gzip artifactsBuild uses ldflags to inject four cipher fragments (keyA/keyB/ciphertextA/ciphertextB) plus optional release identity (releaseVersion/releaseCommit). Dotenv loads .env, .cipher_key, .cipher_ciphertext. See docs/shared/cipher-key-operations.md.
To run the built binary against a test server directory:
./dist/lucy status
./dist/lucy init --yes --game-version 1.21.4Architecture
Package Layout
.
├── cmd/ Root wiring (cmd_root.go) + thin Cobra subcommands
├── types/ Pure domain types
├── state/ Two-file state model: lucy.yaml + lucy-lock.yaml
├── upstream/ Atomic capability interfaces: Searcher, Informer, etc.
│ └── providers/ Modrinth, CurseForge, GitHub, MCDR, Hangar, Spiget, Fabric, etc.
├── workspace/ Runtime detection — server platform, version, installed mods
│ └── detector/ Declarative runtime node detection
├── install/ RecursivePhase pipeline: Candidate→Downloaded→Verified→Committed
├── input/ Trust boundary for external input, package ref parsing
├── cache/ Three-layer network cache: store, index, policy
├── version/ Version parsing: semver, Minecraft release/snapshot, Maven ranges
├── artifact/ Jar metadata analysis: fabric.mod.json, mods.toml, plugin.yml
├── logger/ Three-tier logging + Fatal, history buffer for DumpHistory()
├── tui/ Terminal UI via bubbletea v2, lipgloss v2, huh v2, glamour
├── github/ Shared GitHub API infra
└── internal/
├── cli/ Shared CLI plumbing: flags, error-logging wrapper,
│ │ dependency graph/data source, shell completion,
│ │ lock-state builders
│ └── <command>/ Large subcommands (add, bisect, info, init, install,
│ search, status), each exposing NewCommand()
├── cipher/ ChaCha20Poly1305 encryption for API key embedding
├── fileschema/ Minecraft format definitions: fabric.mod.json, mods.toml, etc.
├── fn/ Generic helpers: Ternary, Memoize, slice utilities
├── fsutil/ Filesystem helpers: CloseReader, path utilities
├── algo/ Graph operations, data structure utilities
├── slugmap/ Remote-to-local slug mapping
└── networkutil/ Network helpers wrapping cache downloadsResearching and Designing
- If your task is highly domain (Minecraft) related, always conduct research before action.
- Take reference from other package managers, such as Cargo, npm, pip, apt, brew, etc. This does not mean you should copy their design. Combine your research with our own design principles.
- Before implementing a new feature, or refactoring existing modules, first walk me through the core functions and types.
- You are encouraged to use existing go packages rather than reinventing the wheel. However, you must first ask for permission and justify your decision.
Testing and Debugging
- Always prefer the project's e2e testing suite (
envgen). You should do regression tests after implementing a feature. envgencreates sandbox server environments in.sandboxes/with the manifest filetestdata/environments/environments.yaml. There's brief explanation for each environment intestdata/environments/families/*.md.- You may create temporary testing environments under project root with paths prefixed with
test_. They are git ignored. - The project is under an early development stage. Do not add tests unless explicitly requested. You may write temporary tests for your own debugging or verification purpose.
envgen CLI
go run ./tools/envgen materializes environments; task envs:* wraps it for the common cases. Flags:
| Flag | Default | Effect |
--list | off | Print all environments with family, game version, generated/missing state, then exit |
--only a,b | all | Restrict processing to the named environment ids |
--force | off | Regenerate even when .sandboxes/<id>/ already exists |
--out <dir> | .sandboxes | Output root |
--manifest <file> | testdata/environments/environments.yaml | Manifest path |
--cache <dir> | os.UserCacheDir()/lucy-envgen | Content-addressed download cache (keyed by sha256) |
--manual-dir <dir> | <cache>/manual | Where manual: true artifacts are expected as <id>/<basename> |
The CLI is idempotent:
- Existing environment dirs are skipped without
--force - Every artifact digest is verified after fetch and generation aborts that environment on mismatch
- Missing manual artifacts fail with the exact drop-in path and expected sha256.
Other Rules
- Always tidy the files in packages touched after refactoring: relocate/rename/merge/split files for better maintainability.
- Prefix files with the package name for convinent searching.
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.

