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:
@@ -101,6 +101,11 @@ func Generate(ctx context.Context, client ai.Client, req Request) ([]Draft, erro
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Drafts about the company itself are filed under its name.
|
||||
name := req.Entry.Name
|
||||
if IsOwn(req.Entry) {
|
||||
name = req.Profile.Name
|
||||
}
|
||||
ids := make([]string, 0, len(req.Items))
|
||||
for _, it := range req.Items {
|
||||
ids = append(ids, it.ID)
|
||||
@@ -117,7 +122,7 @@ func Generate(ctx context.Context, client ai.Client, req Request) ([]Draft, erro
|
||||
if r := []rune(title); len(r) > RedditTitleLimit {
|
||||
title = string(r[:RedditTitleLimit-1]) + "…"
|
||||
}
|
||||
drafts = append(drafts, Draft{InventoryName: req.Entry.Name, Kind: req.Entry.Relationship, Channel: ch,
|
||||
drafts = append(drafts, Draft{InventoryName: name, Kind: req.Entry.Relationship, Channel: ch,
|
||||
Title: title, Target: reddit.CleanName(req.Subreddit), Content: strings.TrimSpace(rp.Body),
|
||||
SourceURL: src, ItemIDs: ids, Status: StatusDraft})
|
||||
continue
|
||||
@@ -136,7 +141,7 @@ func Generate(ctx context.Context, client ai.Client, req Request) ([]Draft, erro
|
||||
}
|
||||
}
|
||||
drafts = append(drafts, Draft{
|
||||
InventoryName: req.Entry.Name,
|
||||
InventoryName: name,
|
||||
Kind: req.Entry.Relationship,
|
||||
Channel: ch,
|
||||
Content: text,
|
||||
@@ -227,11 +232,15 @@ func userPrompt(req Request, src string) string {
|
||||
} else {
|
||||
fmt.Fprintf(&b, "You may name %s.\n", e.Name)
|
||||
}
|
||||
case KindProduct:
|
||||
fmt.Fprintf(&b, "This is about our own work at %s: a product, a release, a blog post or a page on our site. Promote it: "+
|
||||
"say what's new or what it does, and the concrete benefit for the audience, with one clear next step that suits the channel "+
|
||||
"(try it, read more). Make only claims that the source material or the company information supports.\n", req.Profile.Name)
|
||||
default:
|
||||
fmt.Fprintf(&b, "Curate this news about %s for our audience: say what happened and why it matters to them. "+
|
||||
"Don't promote our products or theirs.\n", e.Name)
|
||||
}
|
||||
if e.Description != "" {
|
||||
if e.Description != "" && !IsOwn(e) {
|
||||
fmt.Fprintf(&b, "About %s: %s\n", e.Name, oneLine(e.Description))
|
||||
}
|
||||
if e.TalkingPoints != "" {
|
||||
@@ -290,6 +299,10 @@ func redditInstructions(req Request) string {
|
||||
"no calls to action. Usually 80 to 250 words, in Reddit's markdown. The title must read like a normal post title, not a headline ad. "+
|
||||
"Follow the subreddit's rules below; if they forbid promotion, write a genuine discussion post that doesn't promote anything.\n",
|
||||
RedditTitleLimit, sub, req.Profile.Name, req.Profile.Name)
|
||||
if req.Entry.Relationship == KindProduct {
|
||||
b.WriteString(" This promotes our own work: write as the people who made it, share what's genuinely useful or interesting " +
|
||||
"about it, and invite questions and feedback.\n")
|
||||
}
|
||||
if info := req.SubredditInfo; info != nil {
|
||||
b.WriteString("<subreddit>\n")
|
||||
if info.Description != "" {
|
||||
|
||||
Reference in New Issue
Block a user