feat(ops-socials): auto-consume post-performance learnings before composing#394
Conversation
…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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated 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. ChangesPerformance Learnings Integration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
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.
…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.
|
|
||
| ```bash |
There was a problem hiding this comment.
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.
|
Heads up: this PR targets main. Per branch policy, please retarget to dev or confirm this is an intentional changelog/release PR. |
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>

What
/ops-socialsnow reads auto-generated post-performance learnings before composing any draft and biases tone/format toward what the data shows works.$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 orCOLLECTING.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
$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.🤖 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-socialsnow 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 andstatusis notCOLLECTING; 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
Documentation