2.6 KiB
2.6 KiB
description, alwaysApply
| description | alwaysApply |
|---|---|
| sow-tools / Crucible — the build/conversion/sync toolchain repo. | true |
sow-tools / Crucible Agent Guide
This repo owns the builder logic for the migration: one Go module
(git.westgate.pw/ShadowsOverWestgate/sow-tools) producing the crucible
dispatcher and the crucible-<name> binaries (D11). Read
../AGENTS.md (migration hub) and ../../KICKOFF_PROMPT.md first.
What this repo owns / does not own
Owns: build/extract/validate/compare pipeline, ERF/HAK packing, topdata 2da/tlk
compilation, wiki rendering/deploy, depot blob verify, music conversion,
changelog. Does not own authored game content (that is sow-module /
sow-topdata / sow-assets-manifest) or any production deploy authority (that
is sow-platform).
Rules
- Migrated logic, not a fresh rewrite. The
internal/packages (app,pipeline,project,erf,gff,topdata,music,changelog,validator) were folded in fromgitea/sow-toolsat cutover; wired builders delegate tointernal/app's command surface. Keep them in step with upstream fixes rather than diverging silently. - Fail closed, never fake. A builder with no migrated logic yet (
depot) exits70. Do not stub a builder to emit a placeholder artifact. - Binaries are not committed. They are CI artifacts / image layers (D19).
/bin/,*.exe,nwn-tool,sow-toolkitare gitignored. - No home-dir /
NWN_ROOTguessing. Builders take roots explicitly via flag or env (project resolution is CWD-based, never$HOME). Seedocs/consumer-contract.md. - The registry is the command surface.
internal/dispatch.Registryis the single source of truth; keep it in sync withcmd/anddocs/command-surface.md. Adding a builder = acmd/crucible-<name>/main.goshim + aRegistryentry + a doc row.
Wiring a builder
- Ensure the relevant
internal/package(s) cover the work. - Add the legacy command(s) to the builder's
Legacy/Extraset and setWired: trueininternal/dispatch; the dispatcher delegates toapp.Run.depotis the remaining unwired builder. - Add tests; keep outputs deterministic (same input → same bytes).
make checkmust stay green; updatemake smoketo expect the wired exit.
Commands
nix develop && make check # vet + test + shellcheck + yamllint
make build # cmd/* -> ./bin
make smoke # assert fail-closed contract
make image # crucible:<sha>
Git
Never commit, branch, or push. Suggest a commit message; let the operator do it.