Skip to content

feat(social-ship-posts): wire the account story canon (NARRATIVE.md) into the loop#77

Merged
sweetmantech merged 3 commits into
mainfrom
feat/narrative-canon-in-ship-posts
Jul 6, 2026
Merged

feat(social-ship-posts): wire the account story canon (NARRATIVE.md) into the loop#77
sweetmantech merged 3 commits into
mainfrom
feat/narrative-canon-in-ship-posts

Conversation

@sweetmantech

@sweetmantech sweetmantech commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What

Adds the account story canon to the recoup-internal-social-ship-posts loop so every agent running the process serializes the account's narrative instead of writing standalone ads:

  • Step 2 (Draft) now opens with a story-canon check: read the account workspace's NARRATIVE.md (premise, recurring cast, storylines) and name which arc + character the post serves before writing. No arc → reframe or drop. No canon in the workspace → flag to the account owner.
  • Step 5 (Log) records the arc/character per post, so continuity survives across sessions and agents.
  • The loop summary reflects the same.

Why

sweetman direction (2026-07-06): daily marketing carries one consistent story (recurring musicians, storylines, entertainment over advertising). The account data backs it — the winners are narrative posts (builder BTS 230v X #1, the "Real numbers or silence" creed = best cross-platform line, Xcelencia weekly earnings), while every launch-framed post flatlined.

The canon itself lives per-account in the workspace (e.g. sweetman/NARRATIVE.md in the strategy repo); the skill only requires that it be read and served, so this stays account-agnostic.

Rider: CI fix (pre-existing drift)

The no-dark-skills check was failing repo-wide: recoup-internal-video-grok-1.5-imagine-facetime landed with no RESOLVER.md route, and check_resolvable.py's slug regex couldn't match a name containing a dot, so no route row could ever fix it. This PR adds the Tier 3 route and widens the regex to accept dot-separated segments (scripts/check_resolvable.py). Verified locally: all 35 skills reachable.

🤖 Generated with Claude Code

…into the loop

Draft step now requires naming which storyline arc and character a post
serves (from the account workspace's NARRATIVE.md story bible) before
writing copy; the log step records the arc for continuity. Accounts
without a canon get flagged to the owner.

Grounded in the sweetman account data (2026-07-06 scrape): narrative
posts (builder BTS, integrity creed, named-artist earnings) are the
consistent winners; launch-framed posts flatline.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@sweetmantech, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 74370feb-0b5a-45d5-863e-f3911f87c336

📥 Commits

Reviewing files that changed from the base of the PR and between 5df0e70 and b7a30bc.

📒 Files selected for processing (4)
  • RESOLVER.md
  • resolver-eval.jsonl
  • scripts/check_resolvable.py
  • scripts/run_resolver_eval.py
📝 Walkthrough

Walkthrough

The Recoup Social — Ship Posts workflow documentation was updated to require checking a NARRATIVE.md story canon file during drafting, identifying the arc and character each post serves, and logging that information alongside performance metrics in Step 5.

Changes

Story Canon Workflow Documentation

Layer / File(s) Summary
Story canon checks and logging
skills/recoup-internal-social-ship-posts/SKILL.md
Draft step now requires aligning copy with the account's story canon; Step 2 adds instructions to check NARRATIVE.md, identify the post's arc/character, follow serialized rules, or note its absence; Step 5 logging now records the arc and character served when NARRATIVE.md exists.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the core change: incorporating NARRATIVE.md story canon into the social ship posts workflow.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/narrative-canon-in-ship-posts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/recoup-internal-social-ship-posts/SKILL.md`:
- Around line 68-69: The story-canon check in the skill currently depends on an
external workspace file, which breaks the self-contained contract for recoup
skills. Update the guidance around the canon lookup so it only references
skill-local inputs or embedded canon guidance within the skill itself, and
adjust the instructions in the affected section of SKILL.md so the workflow does
not require reading NARRATIVE.md from outside the skill directory.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1d319843-47bb-4e5f-b542-3aff66249240

📥 Commits

Reviewing files that changed from the base of the PR and between 70404b8 and 5df0e70.

📒 Files selected for processing (1)
  • skills/recoup-internal-social-ship-posts/SKILL.md

Comment on lines +68 to +69
**Check the story canon first.** If the account workspace has a `NARRATIVE.md` (story bible: premise, recurring cast, storylines), read it and name **which arc and which character this post serves** before writing a word. A post that serves no arc is an ad — reframe it into the story or drop it. Serialized rules live in the canon itself (recurring catchphrases, who may be fictionalized vs. who gets only verified numbers, cliffhanger beats); follow them over generic copy instincts. If the workspace has no `NARRATIVE.md`, note that to the account owner — the account is posting without a story.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Keep the skill self-contained.

These steps now require reading NARRATIVE.md from the account workspace, but skills/recoup-*/** is supposed to read/execute only files inside the skill’s own directory. Please move the canon input into a skill-local reference or reword the contract so it doesn’t depend on external workspace files.

As per coding guidelines: skills/recoup-*/** must be self-contained and read/execute only files inside their own directory.

Also applies to: 118-118

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/recoup-internal-social-ship-posts/SKILL.md` around lines 68 - 69, The
story-canon check in the skill currently depends on an external workspace file,
which breaks the self-contained contract for recoup skills. Update the guidance
around the canon lookup so it only references skill-local inputs or embedded
canon guidance within the skill itself, and adjust the instructions in the
affected section of SKILL.md so the workflow does not require reading
NARRATIVE.md from outside the skill directory.

Source: Coding guidelines

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

Pre-existing drift surfaced by this PR's CI run: the
recoup-internal-video-grok-1.5-imagine-facetime skill landed with no
RESOLVER.md intent row, failing the no-dark-skills check repo-wide.

Adding the row alone wasn't enough — check_resolvable.py's SKILL_TOKEN
regex ([a-z0-9-]+) can't match a slug containing a dot, so the skill
could never be marked reachable. Widen the regex to accept dot-separated
segments and add the Tier 3 route.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

…-safe slug regex

Second gate of the same pre-existing drift: the coverage ratchet requires
a positive fixture per skill, and run_resolver_eval.py carries its own
copy of the dotless SKILL_TOKEN regex, so the facetime skill could
neither be routed nor covered. Widen the regex (matching
check_resolvable.py) and add the positive fixture with an adversarial
'not' against recoup-content-make-video.

All five validate-job steps pass locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="scripts/run_resolver_eval.py">

<violation number="1" location="scripts/run_resolver_eval.py:52">
P1: The LLM tier of the resolver eval will always fail for the `recoup-internal-video-grok-1.5-imagine-facetime` skill fixture: `SKILL_TOKEN_PLAIN` (line 86) only matches `[a-z0-9-]` characters, so a dot-containing slug like `recoup-internal-video-grok-1.5-imagine-facetime` gets truncated at the dot to `recoup-internal-video-grok-1`, which doesn't match any real skill directory. The model could reply with the exact correct slug and `_picked_skill` would still return `"none"`, causing a false mis-route failure.

Update `SKILL_TOKEN_PLAIN` to also allow dots, matching the same pattern as the updated `SKILL_TOKEN` but without the surrounding backticks.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

FIXTURES = PLUGIN / "resolver-eval.jsonl"
SKILL_TOKEN = re.compile(r"`(recoup-[a-z0-9-]+)`")
# Dots are allowed mid-slug (e.g. `recoup-internal-video-grok-1.5-imagine-facetime`).
SKILL_TOKEN = re.compile(r"`(recoup-[a-z0-9-]+(?:\.[a-z0-9-]+)*)`")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: The LLM tier of the resolver eval will always fail for the recoup-internal-video-grok-1.5-imagine-facetime skill fixture: SKILL_TOKEN_PLAIN (line 86) only matches [a-z0-9-] characters, so a dot-containing slug like recoup-internal-video-grok-1.5-imagine-facetime gets truncated at the dot to recoup-internal-video-grok-1, which doesn't match any real skill directory. The model could reply with the exact correct slug and _picked_skill would still return "none", causing a false mis-route failure.

Update SKILL_TOKEN_PLAIN to also allow dots, matching the same pattern as the updated SKILL_TOKEN but without the surrounding backticks.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At scripts/run_resolver_eval.py, line 52:

<comment>The LLM tier of the resolver eval will always fail for the `recoup-internal-video-grok-1.5-imagine-facetime` skill fixture: `SKILL_TOKEN_PLAIN` (line 86) only matches `[a-z0-9-]` characters, so a dot-containing slug like `recoup-internal-video-grok-1.5-imagine-facetime` gets truncated at the dot to `recoup-internal-video-grok-1`, which doesn't match any real skill directory. The model could reply with the exact correct slug and `_picked_skill` would still return `"none"`, causing a false mis-route failure.

Update `SKILL_TOKEN_PLAIN` to also allow dots, matching the same pattern as the updated `SKILL_TOKEN` but without the surrounding backticks.</comment>

<file context>
@@ -48,7 +48,8 @@
 FIXTURES = PLUGIN / "resolver-eval.jsonl"
-SKILL_TOKEN = re.compile(r"`(recoup-[a-z0-9-]+)`")
+# Dots are allowed mid-slug (e.g. `recoup-internal-video-grok-1.5-imagine-facetime`).
+SKILL_TOKEN = re.compile(r"`(recoup-[a-z0-9-]+(?:\.[a-z0-9-]+)*)`")
 
 
</file context>

@sweetmantech sweetmantech merged commit a121239 into main Jul 6, 2026
3 checks passed
@sweetmantech sweetmantech deleted the feat/narrative-canon-in-ship-posts branch July 6, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant