diff --git a/plugins/pstack/skills/babysit/SKILL.md b/plugins/pstack/skills/babysit/SKILL.md index df1bc0f..b816077 100644 --- a/plugins/pstack/skills/babysit/SKILL.md +++ b/plugins/pstack/skills/babysit/SKILL.md @@ -28,7 +28,8 @@ Inside poteto-mode, the **Babysit** playbook ([`../poteto-mode/playbooks/babysit 2. **Triage in priority order.** - Merge conflicts (`mergeStateStatus == DIRTY`): rebase or merge `main`; resolve; force-push only if the branch is yours and not shared. - Failing checks (`statusCheckRollup` entries with `conclusion: FAILURE`): pull logs with `gh run view --log-failed`. Root-cause the failure; fix the underlying code or test; commit; push. - - Review comments (`gh pr view --json comments,reviews`): act only on feedback you actually agree with. When a comment has a single mechanical answer — a rename, a guard clause, a formatting nit — make the edit and quote the comment in the commit message. When it hinges on a judgement call, or you can't tell what's being asked, don't guess: leave it and reply with what you would have done. + - Review comments from human reviewers (`gh pr view --json comments,reviews`): act only on feedback you actually agree with. When a comment has a single mechanical answer — a rename, a guard clause, a formatting nit — make the edit and quote the comment in the commit message. When it hinges on a judgement call, or you can't tell what's being asked, don't guess: leave it and reply with what you would have done. + - Review-bot comments (Bugbot and similar automation): classify as fix, dismiss, or ask before acting, per [`../poteto-mode/references/bugbot-triage.md`](../poteto-mode/references/bugbot-triage.md). Follow the rubric's Ask by default categories, including security, data, and high-severity findings. 3. **Loop.** Use the Claude Code `loop` skill to pace re-checks. Pick the interval from what you're watching: - Active CI run: poll `gh pr checks --watch` (it blocks until checks finish, so no separate loop interval needed). diff --git a/tests/skill-collision-repro.sh b/tests/skill-collision-repro.sh index 41f9372..1b8a7be 100755 --- a/tests/skill-collision-repro.sh +++ b/tests/skill-collision-repro.sh @@ -104,6 +104,52 @@ else note "ok: default model quad identical across provider dispatch + 4 panel skills + setup-pstack ($canon_quad)" fi +plugin="$repo/plugins/pstack" +canon="$plugin/skills/poteto-mode/references/bugbot-triage.md" +skill="$plugin/skills/babysit/SKILL.md" +playbook="$plugin/skills/poteto-mode/playbooks/babysit.md" +bugbot_skill_rel="../poteto-mode/references/bugbot-triage.md" +bugbot_playbook_rel="../references/bugbot-triage.md" +bugbot_bad="" +if [ ! -f "$canon" ]; then + bugbot_bad="${bugbot_bad}canonical rubric missing: $canon"$'\n' +fi +skill_op="$(grep -F 'Review-bot comments (Bugbot and similar automation):' "$skill" || true)" +skill_n="$(printf '%s\n' "$skill_op" | awk 'NF { c++ } END { print c+0 }')" +if [ "$skill_n" != "1" ]; then + bugbot_bad="${bugbot_bad}standalone babysit skill lost bugbot-triage operational line"$'\n' +else + skill_dest="$(printf '%s\n' "$skill_op" | sed -n 's/.*](\([^)]*\)).*/\1/p')" + if [ "$skill_dest" != "$bugbot_skill_rel" ]; then + bugbot_bad="${bugbot_bad}standalone babysit Markdown destination is [$skill_dest], not [$bugbot_skill_rel]"$'\n' + fi + if ! printf '%s\n' "$skill_op" | grep -Fq 'classify as fix, dismiss, or ask'; then + bugbot_bad="${bugbot_bad}standalone babysit lost fix/dismiss/ask classification"$'\n' + fi + if ! printf '%s\n' "$skill_op" | grep -Fq "Follow the rubric's Ask by default categories, including security, data, and high-severity findings."; then + bugbot_bad="${bugbot_bad}standalone babysit lost ask-by-default escalation"$'\n' + fi +fi +playbook_op="$(grep -E '^8\. \*\*Bugbot is triaged skeptically, always\.\*\*' "$playbook" || true)" +playbook_n="$(printf '%s\n' "$playbook_op" | awk 'NF { c++ } END { print c+0 }')" +if [ "$playbook_n" != "1" ]; then + bugbot_bad="${bugbot_bad}poteto-mode babysit playbook lost step-8 Bugbot operational line"$'\n' +elif ! printf '%s\n' "$playbook_op" | grep -Fq "$bugbot_playbook_rel"; then + bugbot_bad="${bugbot_bad}poteto-mode babysit playbook step 8 lost bugbot-triage binding ($bugbot_playbook_rel)"$'\n' +fi +copies="$(find "$plugin" -name 'bugbot-triage.md' ! -path '*/node_modules/*' -print 2>/dev/null || true)" +n="$(printf '%s\n' "$copies" | awk 'NF { c++ } END { print c+0 }')" +if [ "$n" != "1" ]; then + bugbot_bad="${bugbot_bad}expected exactly 1 bugbot-triage.md under plugin, found $n"$'\n' +fi +if [ -n "$bugbot_bad" ]; then + note "FAIL: babysit Bugbot binding on the packaged plugin" + note "$bugbot_bad" + fail=1 +else + note "ok: babysit Bugbot binding on the packaged plugin" +fi + if [ "${PSTACK_STATIC_ONLY:-0}" = "1" ]; then exit "$fail" fi