Skip to content

ops-socials: add owner-autopilot status sub-route#397

Open
auroracapital wants to merge 4 commits into
mainfrom
feat/ops-socials-autopilot-route
Open

ops-socials: add owner-autopilot status sub-route#397
auroracapital wants to merge 4 commits into
mainfrom
feat/ops-socials-autopilot-route

Conversation

@auroracapital
Copy link
Copy Markdown
Collaborator

@auroracapital auroracapital commented May 31, 2026

Summary

  • New routing-table row Owner autopilot status → shells out to $OPS_SOCIAL_AUTOPILOT_CMD (owner-configured status script returning per-channel state).
  • New recipe under ## Routing recipes so /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.
  • Public-repo safe: uses <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.sh exits 0
  • Confirm the recipe runs as expected once the owner sets OPS_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-socials skill so intents like "show me the autopilot status" or /ops-socials healify no longer go through project vs personal identity resolution (and healify is 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_CMD or ops_social.autopilot_cmd in preferences via bash -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

  • Documentation
    • Updated ops-socials skill documentation to include Owner autopilot status capability.
    • Added configuration guidance for user-defined autopilot status commands.
    • Documented per-channel status snapshot functionality with error handling.

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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 31, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

The 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 $OPS_SOCIAL_AUTOPILOT_CMD and returning per-channel state.

Changes

Owner autopilot status capability

Layer / File(s) Summary
Autopilot status routing declaration
claude-ops/skills/ops-socials/SKILL.md
New routing-table row for "Owner autopilot status" specifies execution of user-configured $OPS_SOCIAL_AUTOPILOT_CMD to report per-channel state.
Autopilot status recipe implementation
claude-ops/skills/ops-socials/SKILL.md
New recipe "Show me the autopilot status" / /ops-socials healify conditionally runs $OPS_SOCIAL_AUTOPILOT_CMD, prints error when not wired, and documents read-only per-channel status output.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐰 The autopilot now tells its tales,
A new recipe that never fails,
When hearts need healing, status shows clear—
Eight lines of wisdom, crisp and dear!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding an owner-autopilot status sub-route to the ops-socials skill.
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.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ops-socials-autopilot-route

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.

Comment thread claude-ops/skills/ops-socials/SKILL.md Outdated
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.
Comment thread claude-ops/skills/ops-socials/SKILL.md Outdated

### "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
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 && ... || 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.

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.

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.

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

`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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-out

The 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.
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 1 potential issue.

Fix All in Cursor

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 healify skips project-brand routing and runs the owner autopilot recipe.

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

Reviewed by Cursor Bugbot for commit b370791. Configure here.

Comment thread claude-ops/skills/ops-socials/SKILL.md
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.
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