- alignment suggest/suggestions/accept/reject, with Accept/Reject buttons
that survive restarts (DynamicItem); model guesses are suggestions too.
- Custom charts (core/spec.py): title, column and row names, per-cell
labels and colours; entries keep their classic position. Used in
pictures, text, parsing, autocomplete and YAML export/import.
- alignment guess: up to 35 recent messages to an OpenAI-compatible local
model, answer constrained by a JSON schema to the chart's labels;
alignment guessing to opt out.
- Text through ImageMagick's Pango coder when present, so emoji and other
scripts fall back to fonts that have them. Names are escaped for Pango
and for ImageMagick's %[fx:], %w, \n and @file escapes, which Pango text
otherwise expands (tested).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GUebqhE8dK19vyn4Ct5g1L
Draw the chart with ImageMagick: one 3x3 picture, or nine tiles sent as a
Components V2 media gallery (3x3), with avatars cut into circles. Names and
avatars are looked up live; people who left are greyed out.
Move all logic into doge_alignment/core, which imports neither discord.py
nor Red: immutable Chart dataclasses with pure operations, Config/YAML
storage, a view model, pure layout geometry, a Wand painter and an avatar
fetcher. The cog and a new CLI (python -m doge_alignment) are front ends.
Commands are now one hybrid `alignment` group (text and slash): show, set,
remove, prune, clear, style, export, import, admin add/remove/list. Red's
admin/mod roles, Administrators and the server owner count as admins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GUebqhE8dK19vyn4Ct5g1L
Fixes:
- setting or removing an alignment dropped the server's admin list
- charts were YAML files inside the cog folder, which Downloader replaces
on every update; they now live in Red's Config
- the cog imported Wand (ImageMagick) at load time and couldn't load
where ImageMagick is missing, such as dogebot's container
- info.json pip-installed this whole repo, red-discordbot and discord
included, into Red's lib folder
- /alignment_remove_admin let the bot owner past one check and then
refused them at the next
Structure: the cog folder is self-contained like watch. chart.py holds
the rules as pure functions; render.py keeps the image helpers (grid
layout fixed, debug viewers removed) and is imported only when used. The
repo is now a uv virtual project (no package build), with Red pinned to
dogebot's 3.5.24.
Standards: ruff with the lptn settings, ty and annotations, and pytest
(chart rules, Config storage and red_delete_data_for_user on Red's test
backend, image helpers) now cover both cogs; 52 tests. Missing features
are listed in doge_alignment/TODO.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GUebqhE8dK19vyn4Ct5g1L