db.DB wraps database/sql for either database. The SQL stays SQLite's: on
Postgres each statement's ? become $n and LIKE ignores case as SQLite's
does, and the Postgres schema (postgres.sql, schema 29 as a whole) adds
SQLite's instr, json_extract and two-argument max/min, and a nocase ICU
collation. Needs Postgres 18.
LastInsertId became db.Insert (RETURNING id), INSERT OR IGNORE became ON
CONFLICT DO NOTHING, upserts qualify their columns, and three queries
group by every column they use. SUPERMARKET_TEST_POSTGRES runs the test
suite on Postgres, a new schema per test; all tests pass on both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Everything the user sees says Market: the sidebar, titles, breadcrumbs,
help text, messages, suggestions and the agent tool's description; the
export downloads as supermarket-market.yaml. Its pages live under
/market, and the old /inventory addresses redirect there (308, so a
form's POST stays a POST). The YAML format (inventory:), the database
and the code's names are unchanged, so exported files still import. A
breadcrumb no longer repeats the page's own title.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each Inventory entry can hold its plans' prices: the plan, the price,
what it's per, when it was checked and where. Comparison and alternative
pages, and new sections, state a competitor's price only as entered,
with the month it was checked; a missing one is left out and listed as a
to-do. A price checked more than six months ago is flagged on the entry
and adds a to-do to every page that names the competitor. Prices go out
and come back with the Inventory's YAML.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
If the Subreddits box is empty, the AI suggests up to eight, by the
relationship, each with who is there. Each is looked up on Reddit (with
the app's client ID and secret) and left out if it doesn't exist, is
private, 18+, restricted or archived; the first five kept fill the box.
The form lists every suggestion with members, post types and why any was
left out. Lookups are cached for drafting. Without Reddit keys the
suggestions are kept and the form says they weren't checked.
The Reddit client now returns ErrNotFound and ErrForbidden, and treats an
empty about listing as not found.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the entry form, "Fill in the empty boxes" reads their website. Links,
social accounts and feeds come straight from the pages (no guessing); the
AI drafts the name if missing, a description, keywords, hashtags, and
talking points set against the company profile for the relationship
chosen. Typed values stay, nothing is saved until Save, and the form says
which boxes were filled.
Website reading moves from the profile draft into internal/site, shared by
both, and now also collects links and declared RSS/Atom feeds (comment
feeds skipped; Fill takes up to three).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the old Go TUI with a web app (port 8470) that runs in a
container as a CoreDesktop sibling:
- cmd/supermarket server with htmx web UI: dashboard, company profile,
inventory (partners/competitors), AI and credential settings, and a
Core & Hermes page
- SQLite storage and a secrets store under ~/.local/share/supermarket
- AI providers (Anthropic, OpenAI-compatible) behind one interface
- MCP server and a Hermes bridge to the Federated Core MCP hub
- Import of the old Coremarketing TUI's state
- install.sh / update.sh / lib.sh, Dockerfile, compose.yaml, the
bin/supermarket launcher and hermes/setup.sh
Posting is not wired back up yet; that comes in Phase 1. See PLAN.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>