Skip to content

PR Skills#8017

Open
hatton wants to merge 7 commits into
masterfrom
PR-Skills
Open

PR Skills#8017
hatton wants to merge 7 commits into
masterfrom
PR-Skills

Conversation

@hatton

@hatton hatton commented Jun 29, 2026

Copy link
Copy Markdown
Member

[Claude Opus 4.8]

Updates to the PR-workflow agent skills.

Changes

  • devin-review skill — hardened the procedure based on real failures:
    • Pin to the correct PR tab and verify the page header before reading, since multiple reviews share one isolated browser context.
    • Detect stale / "Outdated" results — a new push invalidates the prior review while Devin re-reviews, so the old findings keep showing with an Outdated badge.
    • Read the finding buttons in the sidebar instead of grepping document.body.innerText (the inline diff causes false positives).
    • Note that there is no GitHub-side completion signal (gh pr checks won't tell you the review is done).
  • reviewable-comments — new skill replacing the narrower reviewable-thread-replies skill.
  • (earlier commits on this branch) PR-status sync scripts for Orca/GitHub/YouTrack alignment and the pr-kanban-sync skill.

🤖 Generated with Claude Code

Devin review


This change is Reviewable

hatton and others added 3 commits June 28, 2026 16:16
sync-move.mjs: zero-token script to move a single work item to a
named status (waiting-ai | in-review | has-comments | completed)
across Orca, GitHub board, and YouTrack.  Accepts `all <pr>` to sync
all three from a PR number, or individual `orca`/`gh`/`yt` subcommands.
BL# is resolved from branch → display name → PR title → PR body.

sync-pr-status.mjs: polling reconciler (zero tokens) intended to run
every 15 min via Orca automation.  Reads all Orca worktrees with a
linkedPR, fetches GitHub board status in one batch call, and updates
any Orca worktrees + YouTrack issues that are out of sync.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
New skill .github/skills/pr-kanban-sync/SKILL.md documents the full
state machine (waiting-ai / in-review / has-comments / completed),
maps each state across Orca / GitHub board / YouTrack, and is the
canonical reference for sync-move.mjs and sync-pr-status.mjs.

Updated pr-ready-for-human to delegate all board/Orca/YouTrack moves
to `node scripts/sync-move.mjs all <pr> <status>` instead of raw
GraphQL mutations, fixed env var YOUTRACK_TOKEN → YOUTRACK, and fixed
re-entry Orca status (in-progress → waiting-ai via the script).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ad-replies with reviewable-comments

- devin-review: pin to the correct PR tab, detect stale/Outdated results,
  read finding buttons instead of grepping innerText, and note there is no
  GitHub-side completion signal.
- Replace the reviewable-thread-replies skill with a broader
  reviewable-comments skill.
Copilot AI review requested due to automatic review settings June 29, 2026 19:51
@greptile-apps

greptile-apps Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR hardens the PR-workflow agent skills based on real operational failures and adds new tooling for three-way status synchronisation across Orca, GitHub Projects, and YouTrack.

  • devin-review skill — adds explicit tab-pinning with a page-header verification step, stale/Outdated-result detection, sidebar-button reading instead of document.body.innerText grep, and clarifies there is no GitHub-side completion signal.
  • reviewable-comments skill — replaces the narrower reviewable-thread-replies skill with a complete CLI-based workflow (state, list, view, reply, acknowledge, publish) and guidance on handling all three discussion types.
  • pr-kanban-sync skill + scripts — new sync-constants.mjs, sync-move.mjs, and sync-pr-status.mjs implement a shared-constants approach that prevents the two sync scripts from drifting; moveAll now wraps YouTrack in a try/catch so GH and Orca mutations are not rolled back on a YouTrack failure; both scripts use --limit 500.

Important Files Changed

Filename Overview
.github/skills/devin-review/SKILL.md Hardens the Devin review procedure: adds explicit tab-pinning with page-header verification, stale/Outdated result detection, button-based status reading, and a note that there is no GitHub-side completion signal.
.github/skills/pr-kanban-sync/SKILL.md New skill documenting the state machine and sync scripts for keeping Orca, GitHub board, and YouTrack aligned; includes GraphQL IDs, automation setup, and known limitations.
.github/skills/pr-ready-for-human/SKILL.md Refactors to delegate all board/YouTrack moves to sync-move.mjs; renames YOUTRACK_TOKEN to YOUTRACK; the Stage 4 inline board-check snippet still uses --limit 200 while the scripts use --limit 500.
.github/skills/reviewable-comments/SKILL.md New skill replacing reviewable-thread-replies; covers full workflow (state check, list, view, reply, publish) with correct frontmatter name and expanded guidance on discussion types.
scripts/sync-constants.mjs New shared constants module (Orca statuses, YouTrack state names, project IDs) imported by both sync scripts to prevent drift between them.
scripts/sync-move.mjs New script for manually moving a PR to a new status in Orca, GitHub board, and YouTrack; uses --limit 500 and wraps YouTrack in try/catch inside moveAll to match the warn-and-skip contract.
scripts/sync-pr-status.mjs New polling reconciler that reads all Orca worktrees with linkedPR, fetches GitHub board status in one batch call (--limit 500), and idempotently updates Orca and YouTrack where they differ.

Reviews (4): Last reviewed commit: "Address PR review: shared sync constants..." | Re-trigger Greptile

Comment thread .github/skills/reviewable-comments/SKILL.md
Comment thread scripts/sync-move.mjs
Comment thread scripts/sync-pr-status.mjs

Copilot AI left a comment

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.

Pull request overview

This PR updates BloomDesktop’s agent-skill workflows and adds Node-based helper scripts to keep Orca, the GitHub Projects “PR Review Tracker” board, and YouTrack states synchronized as PRs move through AI-review and human-review stages.

Changes:

  • Added sync-move.mjs (manual mover) and sync-pr-status.mjs (polling reconciler) to align Orca/GitHub/YouTrack statuses using hardcoded mappings.
  • Replaced the old Reviewable reply skill with a new Reviewable CLI–based skill, and introduced a pr-kanban-sync skill documenting the state machine + scripts.
  • Hardened the devin-review skill procedure to avoid reading the wrong tab and to detect stale “Outdated” findings.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/sync-pr-status.mjs New polling reconciler to align Orca worktrees (via linkedPR) with GitHub board status and optionally update YouTrack.
scripts/sync-move.mjs New manual command to move one PR/work item across Orca, GitHub Projects, and YouTrack (with an all mode).
.github/skills/reviewable-thread-replies/SKILL.md Removes the older Reviewable/GitHub mixed thread-reply skill.
.github/skills/reviewable-comments/SKILL.md Adds a new Reviewable CLI workflow for reading/replying to Reviewable discussions.
.github/skills/pr-ready-for-human/SKILL.md Updates the “ready for human review” workflow to use the new sync scripts and YOUTRACK env var naming.
.github/skills/pr-kanban-sync/SKILL.md Adds documentation for the PR kanban state machine + how to use the new sync scripts.
.github/skills/devin-review/SKILL.md Improves Devin review instructions to avoid stale/outdated results and wrong-tab mistakes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/sync-move.mjs
Comment thread scripts/sync-pr-status.mjs
Comment thread .github/skills/reviewable-comments/SKILL.md
Comment thread scripts/sync-pr-status.mjs Outdated
Comment on lines +17 to +38
// GitHub board status label → internal key
const GH_STATUS_TO_KEY = {
"Waiting for AI-Review": "waiting-ai",
"Ready for Human": "in-review",
"Has Comments": "has-comments",
};

// Internal key → Orca workspaceStatus value
const ORCA_STATUSES = {
"waiting-ai": "status-5",
"in-review": "in-review",
"has-comments": "status-6",
completed: "completed",
};

// Internal key → YouTrack state name (null = leave for human)
const YT_STATES = {
"waiting-ai": "In Progress",
"in-review": "Ready For Code Review",
"has-comments": "Has Comments",
completed: null,
};
Comment thread .github/skills/devin-review/SKILL.md Outdated
hatton and others added 3 commits June 29, 2026 13:55
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The reconciler skipped a worktree entirely when its Orca status already
matched the GitHub board, treating Orca status as a proxy for full sync.
A YouTrack update that failed transiently (network/token) on an earlier
cycle was therefore never retried, leaving the tracker permanently wrong.

Now we skip only the Orca write when it already matches and still fall
through to reconcile YouTrack. To avoid re-issuing the same State command
every cycle, setYtState first reads the current state (new getYtState) and
no-ops when already correct. This also self-heals manual 'orca worktree
set' or partial sync-move runs.
Comment thread scripts/sync-move.mjs
…guard

- Extract duplicated status mappings (ORCA_STATUSES, YT_STATES, GH_OWNER,
  GH_PROJECT_NUMBER, YT_BASE) into scripts/sync-constants.mjs, imported by
  both sync-move.mjs and sync-pr-status.mjs so they can no longer drift.
- sync-move.mjs: bump 'gh project item-list' --limit from 200 to 500 to
  match sync-pr-status.mjs and avoid silently truncating the board.
- sync-move.mjs: wrap the YouTrack call in moveAll with try/catch so a
  YouTrack failure (e.g. missing token) no longer hard-exits after GitHub
  and Orca were already updated, matching the warn-and-skip contract.
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