Skip to content

feat: scope check for babysit-pr, extract babysit-open-prs skill#88

Open
exiao wants to merge 2 commits intomainfrom
babysit-pr-scope-check
Open

feat: scope check for babysit-pr, extract babysit-open-prs skill#88
exiao wants to merge 2 commits intomainfrom
babysit-pr-scope-check

Conversation

@exiao
Copy link
Copy Markdown
Owner

@exiao exiao commented Apr 10, 2026

Changes

babysit-pr skill (updated)

  • Added Scope Check step that runs once before the fix loop starts
  • Compares PR diff and commit messages against the PR title/description
  • Flags file relevance, commit coherence, formatting noise, and scope creep
  • Classifies drift as MINOR (note and continue) or MAJOR (escalate, don't fix)
  • Scope findings included in every status report
  • New report templates for scope-drift scenarios

babysit-open-prs skill (new)

  • Extracted the orchestrator logic from the babysit-open-prs cron job inline prompt into a proper skill file
  • Adds SCOPE_DRIFT as a fourth triage classification alongside CLEAN/FIXABLE/SKIP
  • Quick scope check at triage level before spawning sub-agents
  • Cron job (d3caa281) updated to reference this skill instead of inlining the prompt

Cron update

  • babysit-open-prs cron now just says "Read the skill and follow it" (consistent with other cron jobs like content-pipeline, market-daily-briefing)

…\n- babysit-pr: added Scope Check step that runs before the fix loop.\n Compares PR diff/commits against title/description, flags drift as\n MINOR (continue) or MAJOR (escalate). Scope findings in all reports.\n- babysit-open-prs: new skill extracted from cron inline prompt.\n Adds SCOPE_DRIFT as fourth triage classification. Cron job now\n references this skill file instead of inlining the orchestrator.
@claude
Copy link
Copy Markdown

claude bot commented Apr 10, 2026

Claude finished @exiao's task in 59s —— View job


Review Complete

  • Read changed files and gather context
  • Check frontmatter, secrets, references, consistency
  • Check if previous review feedback was addressed
  • Submit review

Result: Approved

All five issues from the previous review are fixed in 29572c7:

Issue Status
sessions_sendsend_to_task Fixed (lines 14, 195, 199)
Unused BASE variable Removed
Timeout param casing (runTimeoutSecondsrun_timeout_seconds) Fixed in both files
README missing babysit-open-prs entry Added
~/agentd/~/clawd/ path Fixed

No new issues found. Frontmatter is accurate, no hardcoded secrets, references follow repo conventions, and the two skills are internally consistent.


## Reporting

Send progress updates to the parent agent via `sessions_send`. Do NOT try to send messages to Signal/Slack/etc directly (sub-agents don't have channel access). The parent agent handles delivery to the user.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Text says sessions_send but the code block on line 202 and the input description on line 14 both use send_to_task. This should be consistent.

Suggested change
Send progress updates to the parent agent via `sessions_send`. Do NOT try to send messages to Signal/Slack/etc directly (sub-agents don't have channel access). The parent agent handles delivery to the user.
Send progress updates to the parent agent via `send_to_task`. Do NOT try to send messages to Signal/Slack/etc directly (sub-agents don't have channel access). The parent agent handles delivery to the user.

Comment on lines +73 to +74
# Get base branch for comparison
BASE=$(gh pr view $PR --repo $REPO --json baseRefName -q '.baseRefName')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

BASE is computed but never referenced again. Either use it (e.g., in the per-commit loop) or remove it to avoid confusion.

Suggested change
# Get base branch for comparison
BASE=$(gh pr view $PR --repo $REPO --json baseRefName -q '.baseRefName')

```
sessions_spawn({
task: "Use the babysit-pr skill. PR #<number>, repo <repo>. Max cycles: 5. Reasons flagged: <reasons>. Running via nightly cron (use pr-mark-skip.sh if escalating). Read the repo's CLAUDE.md/AGENTS.md first.",
cwd: "<local-path>",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

runTimeoutSeconds here vs run_timeout_seconds in babysit-pr/SKILL.md:25. Pick one convention across both skills.

Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Three issues to fix:

  1. sessions_send vs send_to_task mismatch (babysit-pr/SKILL.md:198): Prose says sessions_send but code block and input description both use send_to_task. Should be send_to_task.

  2. Unused BASE variable (babysit-pr/SKILL.md:73-74): Computed but never referenced. Remove it or use it.

  3. Inconsistent timeout param casing: babysit-pr uses run_timeout_seconds (snake_case) while babysit-open-prs uses runTimeoutSeconds (camelCase). Pick one.

Also: README.md needs updatingbabysit-open-prs is a new skill directory but isn't listed in the README. Per repo rules, every skill must appear in the README under the correct category.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4de08669b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1 to +3
---
name: babysit-open-prs
description: "Scan all open PRs across tracked repos, triage them, check for scope drift, and spawn babysit-pr sub-agents for fixable ones. Use when: babysit all PRs, check all open PRs, nightly PR review."
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 Badge Add babysit-open-prs to README index

This commit introduces a new root skill directory (babysit-open-prs/) but does not add it to README.md, which violates the repo convention that every skill must be listed for discovery/routing. Leaving the index stale can break contributor workflows and CI checks that validate README coverage when skills are added.

Useful? React with 👍 / 👎.


Local paths:
- bloom-invest/bloom → ~/bloom
- bloom-invest/investing-log → ~/agentd/investing-log
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 Badge Use the canonical path for investing-log

The local path mapping points bloom-invest/investing-log to ~/agentd/investing-log, but the existing skill conventions in this repo use ~/clawd/investing-log and babysit-pr searches ~/clawd/$REPO_DIR (not ~/agentd). In environments following the current convention, spawning sub-agents with this cwd will fail before any PR work starts.

Useful? React with 👍 / 👎.

If a parent session key was provided, use:
```
sessions_send(sessionKey="<parent_session_key>", message="<status update>")
send_to_task(sessionKey="<parent_session_key>", message="<status update>")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Standardize parent update call naming

The reporting instructions now show send_to_task(...), but this skill still states progress is sent via sessions_send, creating conflicting guidance in one section. That ambiguity can cause sub-agents to use the wrong API and silently miss parent status updates; the doc should use one API name consistently.

Useful? React with 👍 / 👎.

- Fix sessions_send → send_to_task naming in babysit-pr prose
- Remove unused BASE variable from scope check script
- Standardize timeout param to snake_case (run_timeout_seconds)
- Fix investing-log path to ~/clawd/investing-log
- Add babysit-open-prs to README

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

@claude claude bot left a comment

Choose a reason for hiding this comment

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

LGTM — reviewed both skill files for frontmatter, secrets, broken references, and internal consistency. All five issues from the previous review (sessions_send naming, unused BASE var, timeout casing, README entry, agentd path) are fixed in 29572c7.

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