ops-socials: add owner-autopilot status sub-route#397
Conversation
Adds a read-only routing row + recipe that shells out to a user-configured `$OPS_SOCIAL_AUTOPILOT_CMD` to surface per-channel autopilot state (connected, queue depth, recent fires, next action). No hardcoded paths or owner data — script location is owner-provided via env var; falls back to a clear "not wired" message. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe ops-socials skill now documents an "Owner autopilot status" capability. A routing-table entry declares this capability and its execution path, followed by a new recipe section that implements the feature by conditionally running the configured ChangesOwner autopilot status capability
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 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 docstrings
🧪 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 |
Use if/else instead of &&/|| so a non-zero exit from OPS_SOCIAL_AUTOPILOT_CMD does not show the unwired message when autopilot is configured.
|
|
||
| ### "Show me the autopilot status" / "/ops-socials healify" / owner-autopilot read-out | ||
| ```bash | ||
| if [ -n "$OPS_SOCIAL_AUTOPILOT_CMD" ]; then bash -c "$OPS_SOCIAL_AUTOPILOT_CMD"; else echo "no autopilot wired — set OPS_SOCIAL_AUTOPILOT_CMD in your env or $PREFS_PATH/preferences.json"; fi |
There was a problem hiding this comment.
Bug: The && ... || construct incorrectly shows the "not wired" message on script failure, not just when the environment variable is unset, causing confusion.
Severity: MEDIUM
Suggested Fix
Replace the && ... || operator chain with an explicit if/else construct to handle the cases of the variable being unset versus the command failing separately. This will allow for more accurate error messages.
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#L231
Potential issue: The shell command `[ -n "$OPS_SOCIAL_AUTOPILOT_CMD" ] && bash -c
"$OPS_SOCIAL_AUTOPILOT_CMD" || echo "..."` has a logic flaw. Due to shell operator
precedence, the `|| echo` fallback is executed whenever the preceding `(test &&
command)` group fails. This occurs not only when `OPS_SOCIAL_AUTOPILOT_CMD` is unset,
but also when the variable is set but the script it executes fails at runtime (e.g., due
to a Python error, missing dependency, or permission issue). This results in a
misleading error message, "no autopilot wired", which incorrectly suggests a
configuration problem instead of a script execution failure, hindering debugging.
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Autofix Details
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: Prefs path not implemented
- The recipe now reads ops_social.autopilot_cmd from $PREFS_PATH/preferences.json when OPS_SOCIAL_AUTOPILOT_CMD is unset and documents that key in the routing table and error message.
- ✅ Fixed: Path example breaks bash -c
- The routing table example and recipe text now require a full shell command (e.g. python3 .../status.py) suitable for bash -c instead of a bare .py path.
You can send follow-ups to the cloud agent here.
|
|
||
| `x-article-publisher-skill` automates X's web UI via Playwright. Hard rule 3 forbids that from this router. Instead: stage a Typefully draft that's a hook + summary + a link to the full piece (your blog, Substack, static page). If you genuinely need a native X Article, publish it manually in the X client. | ||
|
|
||
| ### "Show me the autopilot status" / "/ops-socials healify" / owner-autopilot read-out |
There was a problem hiding this comment.
Rule 0 violation — owner-specific identifier committed to the public repo.
"healify" is a real product name and shouldn't appear in this public skill file. CLAUDE.md Rule 0 explicitly forbids committing real project/org names and requires using generic placeholders ("my-project", <project-name>, etc.).
Suggested fix:
### "Show me the autopilot status" / "/ops-socials <project-name>" / owner-autopilot read-outThe owner's actual project routing hint belongs in $PREFS_PATH/preferences.json, not in the committed skill.
Read ops_social.autopilot_cmd from preferences.json when the env var is unset, document the prefs key, and require a full shell command (e.g. python3 path/to/status.py) instead of a bare script path for bash -c.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Healify alias conflicts identity rules
- Added an autopilot-status first check in the identity resolution algorithm so
/ops-socials healifyskips project-brand routing and runs the owner autopilot recipe.
- Added an autopilot-status first check in the identity resolution algorithm so
You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit b370791. Configure here.
Add an autopilot-status check at the start of the identity resolution algorithm so /ops-socials healify runs the owner autopilot recipe instead of treating healify as a marketing project name.

Summary
Owner autopilot status→ shells out to$OPS_SOCIAL_AUTOPILOT_CMD(owner-configured status script returning per-channel state).## Routing recipesso/ops-socials healify/ "show me the autopilot status" / owner-autopilot read-out calls all route to the same one-liner; falls back to a clear "not wired" message when the env var is unset.<owner>placeholder +~/+ env vars; no real names/paths/handles.tests/test-no-secrets.sh= 14 passed / 0 failed.Test plan
bash claude-ops/tests/test-no-secrets.shexits 0OPS_SOCIAL_AUTOPILOT_CMD🤖 Generated with Claude Code
Note
Low Risk
Documentation-only change to skill routing; read-only status via owner-configured commands, no posting or auth changes.
Overview
Adds a read-only owner autopilot status path to the
/ops-socialsskill so intents like "show me the autopilot status" or/ops-socials healifyno longer go through project vs personal identity resolution (andhealifyis documented as not a project name for this flow).The identity algorithm now short-circuits on owner-autopilot read-outs, the routing table gains an Owner autopilot status row, and a new recipe runs a full shell command from
$OPS_SOCIAL_AUTOPILOT_CMDorops_social.autopilot_cmdin preferences viabash -c, with a clear message when nothing is wired.Reviewed by Cursor Bugbot for commit 8554e97. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit