Skip to content

feat(ops-socials): auto-consume post-performance learnings before composing#394

Merged
auroracapital merged 2 commits into
mainfrom
feat/ops-socials-learnings-autoconsume
May 31, 2026
Merged

feat(ops-socials): auto-consume post-performance learnings before composing#394
auroracapital merged 2 commits into
mainfrom
feat/ops-socials-learnings-autoconsume

Conversation

@auroracapital
Copy link
Copy Markdown
Collaborator

@auroracapital auroracapital commented May 30, 2026

What

/ops-socials now reads auto-generated post-performance learnings before composing any draft and biases tone/format toward what the data shows works.

  • New section "Auto-consume performance learnings before composing" — reads $PREFS_PATH/social-metrics/learnings.md (ranked do-more / do-less features + top-performer templates), applies it, falls back to a house default when absent or COLLECTING.
  • Pointer added to the "Draft a tweet" recipe so the step is unmissable.

Why

Closes the optimization loop. An always-on tracker (launchd, owner-local) pulls each Typefully social set's analytics on a schedule, writes a time series, and re-derives the learnings. This PR is the consume half: tracker measures live posts → updates learnings → skill biases the next draft → repeat. Tone/format self-improves from real engagement data instead of guesswork.

Safety

  • No personal data. References the plugin data dir ($PREFS_PATH/social-metrics/) per Rule 0, never an owner-specific path/handle.
  • tests/test-no-secrets.sh: 14 passed, 0 failed. Manual personal-data grep: clean.
  • Docs-only change to one SKILL.md (+21/-1). No tool/permission changes.

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only change to agent skill instructions; no runtime, permissions, or posting behavior changes in code.

Overview
/ops-socials now tells the agent to read and apply owner-local post-performance learnings before any personal/founder Typefully draft (single post, thread, or cross-platform)—not for upload-post project brands.

A new section defines a bash check on $PREFS_PATH/social-metrics/learnings.md: use ranked Do MORE / Do LESS and top-performer templates when the file exists and status is not COLLECTING; otherwise use a fixed house default voice. The agent must note in one line which learnings it applied. Learnings come from an external launchd tracker; this skill only consumes them.

The "Draft a tweet / Make this a thread" recipe now explicitly starts with that consume step before typefully_create_draft.

Reviewed by Cursor Bugbot for commit aab2f42. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • New Features

    • Personal social post drafts now automatically incorporate performance learnings, biasing tone and format toward successful content patterns when available.
  • Documentation

    • Updated tweet and thread drafting recipes to reflect automatic performance learnings integration in the drafting workflow.

Review Change Stack

…posing

Adds a "read learnings before any draft" step so /ops-socials biases tone/format
toward what the data shows works. Reads $PREFS_PATH/social-metrics/learnings.md
(produced by the owner's always-on analytics tracker — pulls each Typefully social
set's metrics on a schedule, writes a time series, re-derives ranked do-more/do-less
features + top-performer templates). Closes the loop: tracker measures live posts →
updates learnings → this step biases the next draft. No personal data; path is the
plugin data dir per Rule 0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4c89bd11-c835-42e2-9f7c-5aba37ef5465

📥 Commits

Reviewing files that changed from the base of the PR and between 00a0f47 and aab2f42.

📒 Files selected for processing (1)
  • claude-ops/skills/ops-socials/SKILL.md

📝 Walkthrough

Walkthrough

Updated the ops-socials skill documentation to add conditional performance learnings consumption before drafting personal Typefully posts. A new guidance section describes reading learnings when available and applying performance biases, while the tweet/thread recipe is updated to reference this guidance.

Changes

Performance Learnings Integration

Layer / File(s) Summary
Auto-consume performance learnings guidance
claude-ops/skills/ops-socials/SKILL.md
Introduces a new subsection that conditionally reads $PREFS_PATH/social-metrics/learnings.md for personal/founder Typefully drafting when present and not in COLLECTING status, instructing bias toward "Do MORE of" features and top-performer templates, with fallback to default voice formatting. Updates the "Draft a tweet / Make this a thread" recipe to reference and apply the learnings before staging the draft.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • Lifecycle-Innovations-Limited/claude-ops#335: Extended the existing ops-socials router documentation by adding instructions to auto-consume social-metrics/learnings.md before Typefully tweet/thread drafting, building on the router's earlier draft/Typefully staging recipes.

Poem

🐰 With whiskers twitching, hop and bound,
Performance learnings now abound!
Tweets shall flow with better zest,
Learning what works best, then all the rest. 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: auto-consuming post-performance learnings before composing social posts, which is the core objective documented in the PR.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ops-socials-learnings-autoconsume

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 and usage tips.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix prepared fixes for both issues found in the latest run.

  • ✅ Fixed: COLLECTING status contradicts file-exists rule
    • The shell snippet and bullets now apply learnings only when the file exists and status is not COLLECTING, with a unified house-default fallback otherwise.
  • ✅ Fixed: Learnings apply to all identities
    • The section is scoped to the personal/founder Typefully branch after identity resolution and explicitly excludes project upload-post drafts.

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 204ee94. Configure here.

Comment thread claude-ops/skills/ops-socials/SKILL.md
Comment thread claude-ops/skills/ops-socials/SKILL.md Outdated
…LECTING

Only consume Typefully-derived learnings on the personal/founder path, not
project upload-post drafts. Skip applying learnings when the file exists but
status is COLLECTING so partial data does not override the house default.
Comment on lines +121 to +122

```bash
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The script incorrectly treats the file path $PREFS_PATH as a directory when constructing the path for $LEARN, causing the feature to be silently disabled.
Severity: MEDIUM

Suggested Fix

The path to learnings.md should be constructed relative to the directory containing the preferences.json file. Use dirname "$PREFS_PATH" to get the directory part of the path. For example: LEARN="$(dirname \"$PREFS_PATH\")/social-metrics/learnings.md".

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: claude-ops/skills/ops-socials/SKILL.md#L121-L122

Potential issue: The bash snippet constructs the path
`LEARN="$PREFS_PATH/social-metrics/learnings.md"`. However, `$PREFS_PATH` is
consistently defined throughout the codebase as the full path to the `preferences.json`
file, not a directory. This results in an invalid path like
`.../preferences.json/social-metrics/learnings.md`. Consequently, the file existence
check `[ -f "$LEARN" ]` will always fail, and the `cat "$LEARN"` command will never
execute, silently disabling the "learnings" feature.

Did we get this right? 👍 / 👎 to inform future reviews.

@auroracapital
Copy link
Copy Markdown
Collaborator Author

Heads up: this PR targets main. Per branch policy, please retarget to dev or confirm this is an intentional changelog/release PR.

@auroracapital auroracapital merged commit 47215ef into main May 31, 2026
14 checks passed
@auroracapital auroracapital deleted the feat/ops-socials-learnings-autoconsume branch May 31, 2026 01:03
auroracapital added a commit that referenced this pull request May 31, 2026
Bumps plugin.json + marketplace.json 2.16.0 -> 2.17.0; adds CHANGELOG section.

New since v2.16.0 (already on main):
- feat(skills): people, ledger, tonight (#396)
- feat(hooks): auth-stall-guard.sh advisory credential-source injector, staged (#396)
- feat(ops-socials): auto-consume post-performance learnings before composing (#394)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants