Phase 1, part 4: promote the company's own products

- Content lists the company first, at /content/own: its products from
  the profile (always there to pick from), its own feeds (a new profile
  field for the blog, news and releases), and new or updated pages from
  its websites' sitemaps, with each page's title and description.
- Drafts from it are kind "product" (utm_campaign=product), filed under
  the company's name, and prompted to promote the company's own work
  without unsupported claims; on Reddit, in the makers' voice, with a
  warning that self-promotion is often restricted.

This completes Phase 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 14:42:37 -07:00
co-authored by Claude Opus 5.5
parent 0e34f574b7
commit cd24f2a06d
20 changed files with 685 additions and 30 deletions
+29 -6
View File
@@ -330,7 +330,7 @@ mcphub failed.
### Phase 1: Content (today's pipeline, generalized) + Reddit
**Status (2026-11-20): parts 1, 2 and 3 of 4 built on `phase0-foundation`.** Phase 1 is
**Status (2026-11-20): Phase 1 is built (all 4 parts) on `phase0-foundation`.** Phase 1 is
built in four parts, each committed on its own: (1) the pipeline, items 1–2
below, for X and LinkedIn; (2) the approval inbox, schedule and UTM tags,
item 5; (3) Reddit, item 4; (4) promoting our own products, the rest of
@@ -366,7 +366,7 @@ Part 2 (commit `f275f03`):
- The container now runs in the computer's time zone (`SUPERMARKET_TZ` in
compose.env, from /etc/localtime), so times show and parse correctly.
Part 3, Reddit:
Part 3, Reddit (commit `0e34f57`):
- A third channel, `reddit`: a draft has a `title` and a `target`
subreddit (migration 4), chosen when writing, with suggestions from the
entry's and the profile's subreddits. Reddit is never pre-checked.
@@ -387,7 +387,25 @@ Part 3, Reddit:
the company's own sites (counting this one), and a new account. They use
the account's last 100 posts, cached for 10 minutes.
**Not yet tried for real.** Parts 1–3 are covered by tests with fake AI
Part 4, promoting our own products:
- A virtual inventory entry for the company (`content.OwnEntry`, items
stored under `_own`), shown first under Content as the company's name and
served at `/content/own`. It isn't stored in `inventory`.
- Products from the profile are kept in step as items
(`product:<slug>`, source `Product`), always there to pick from; they
don't count as waiting news.
- A new profile field, **Feeds**: the company's blog, news and release
feeds, fetched like an entry's RSS.
- Site pages: new or updated pages from each website's `sitemap.xml`
(sitemap indexes one level deep), newest 15 per fetch, with each page's
title and description. This runs only for the company's own sites.
- Drafts get kind `product` (so `utm_campaign=product`) and the company's
name. The prompt asks for posts that promote the company's own work with
claims the material supports. On Reddit it asks for the makers' voice and
invites feedback, and the Inbox warns that self-promotion is often
restricted.
**Not yet tried for real.** Parts 1–4 are covered by tests with fake AI
and channel clients, and the rebuilt app runs (schema 3). But the
installed app has no profile, AI key, inventory or social sign-ins yet, so no
real fetch, generation or post has been made. Before relying on it:
@@ -400,6 +418,8 @@ real fetch, generation or post has been made. Before relying on it:
4. Register a Reddit web app, connect it, write a Reddit draft for a
subreddit, and check its rules and warnings. Post to a test subreddit
you moderate first.
5. Add a product and a blog or releases feed to the profile, open
Content → (company name), fetch, and write a post from a product.
The database before migration 2 is backed up at
`~/.local/share/supermarket/app.db.pre-phase1`. Commits on
@@ -408,9 +428,12 @@ so `git push` can't prompt from Claude Code). The branch stays off `main`
until the user decides to merge; posting works again now, which was the
condition for merging.
**To pick this up: part 4, own-product promotion** (the rest of item 3):
drafts from the product list, the company's blog RSS, site pages and
releases, with `kind` = `product`.
**To pick this up:** try Phase 1 for real (the checklist above), fix what
that turns up, then decide whether to merge `phase0-foundation` into `main`
and tag `v0.1.0`. Then Phase 2, Prospects → EspoCRM, which depends on the
hub's EspoCRM tools (see Phase 0: `espocrm_search_records`,
`espocrm_get_record`, `espocrm_get_related_records`,
`espocrm_create_record`, `espocrm_update_record`, `espocrm_delete_record`).
The plan for Phase 1, as first written:
1. Port fetch → browse → select → generate → approve → publish into the web