# Project Map — log

- 2026-10-31 scaffolded from templates/PROJECT.*.tmpl

- 2026-10-31 generator + web page built and verified. `scripts/mapdraw.py` (Pillow
  primitives + the two layouts) and `scripts/project_map.py` (gather + render + HTML)
  produce, in `output/`: `all-projects.png` (every project, grouped into "project
  assistants" and "your projects", plus a shared-infrastructure strip),
  one `<slug>.png` per project (inputs -> project -> outputs -> wiring -> next step),
  `index.html`, and `map.json`.
  Data comes from TWO real sources, never hand-written: `hermes_workspace/projects/index.json`
  and `~/projects/index.md` — so the diagram can't drift from the files.
  Verified by *looking* at the rendered PNGs, not just by exit code: the first render had
  three real defects that only showed up on inspection — card titles clipped at a fixed
  character count, a status badge cut mid-date, and (in the detail layout) the "WIRED INTO"
  bar overlapping the third input box because the bottom section used a fixed y-offset
  instead of the measured column height. Fixed: titles wrap to 2 lines, badges ellipsize,
  and every detail diagram now computes its height from its content.
  Non-obvious fix worth remembering: `HERE` in `scripts/server.py` needs **two**
  `dirname()` calls (the project root), not one — one points at `scripts/`, so every file
  404s while the service still reports `active` and auth still returns 401/200 correctly.
  Serving: systemd `projectmap` on **:8081** (enabled, auto-starts), `ThreadingHTTPServer`,
  Basic Auth using the same credentials file as the book manager, and it regenerates the
  diagrams when `map.json` is older than 120s. Verified: 401 with no/incorrect password,
  200 with the password, PNG + API served, reachable on LAN (10.0.0.177:8081) and Tailscale
  (100.101.221.93:8081).
  Next: optionally expose it as an MCP tool on the `workgroup` server.
