Add Docker container restart/rebuild guidance to musehub's .muse/agent.md
Background
During the MWP-9 spot-check investigation (musehub#113), significant time was
lost because musehub_worker (the background job container) was silently
running a Docker image dated over a month old, while musehub (the API
container) had been restarted recently. Nothing in the agent-facing docs
distinguished the two containers — only musehub's restart was a documented
habit. This produced misleading investigation results for a long stretch
before the staleness was caught.
What was done
Added a rewritten "Localhost Containers" section to
musehub/.muse/agent.md — the source file muse agent-config sync reads to
regenerate CLAUDE.md / AGENTS.md / .cursorrules / .windsurfrules.
Covers:
- Both
musehubandmusehub_workermust be restarted together after any code change — never just one. - A concrete freshness-verification recipe (container uptime, image build timestamp, and specific log lines to grep for) to run before trusting any local test result, not after debugging goes sideways.
- When a plain
docker restartis enough (bind-mounted.pyedits) vs. when a fulldocker compose buildis required (Dockerfile, dependency, or compose-file changes). - Two distinct schema-migration failure modes surfaced in the same session (DB behind existing migrations vs. an ORM model with no migration ever generated for it) and the correct recipe for each.
Applied and verified in this session via muse agent-config sync --force
and muse agent-config status (both report in sync).
Deliverables
- [x] Rewrite
musehub/.muse/agent.md's "Localhost Container" section (done, this session). - [x] Regenerate adapters via
muse agent-config sync --force(done, confirmed in sync). - [ ] Confirm this content actually reaches other machines/checkouts the
way
muse agent-config syncis expected to distribute it — flagged as a follow-up check, not resolved in this ticket, since the goal here was capturing the missing verbiage, not auditing the distribution mechanism itself.
Out of scope
- Auditing whether
.muse/agent.mdis tracked/pushed bymuseitself — noted as an open follow-up above, not investigated further here.