Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ parallel copies under `docs/` or `scripts/notes/`. At cut time: rename

- Drop unused `@opentui/keymap`, `@opentui/solid`, and `solid-js`. The interactive TUI is imperative `@opentui/core` only.
- Restore the opsh skill 1:1 with GaaS. Tool/shell mapping stays on native-integration. user-invocable: false stays so it remains use_skill-only.
- Restore the pull-request-review skill 1:1 with GaaS. ask_operator, /review mapping, and GitHub posting stay on native-integration. Slash /pull-request-review remains.
- Ignore GaaS opsh SKILL.md in prettier so table alignment stays 1:1.
- Restore the git-rebase skill body 1:1 with GaaS. Intern execution recipe stays on native-integration. user-invocable: false stays so it remains use_skill-only.
- Restore the linear-issue-workflow skill body 1:1 with GaaS. Claim-first, In Review, and git-worktrees extras stay on native-integration. user-invocable: false stays so it remains use_skill-only.
- Restore the interview skill body 1:1 with GaaS (AskUserQuestion). Operator-ask mapping stays on native-integration. Slash /interview remains.
Expand Down
2 changes: 2 additions & 0 deletions plugins/corbits-skills/skills/native-integration/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ When the branch under review has an open GitHub pull request, **post the finishe

This step is the delivery of the review, not a second pass of analysis. By the time you post, findings are already decided. Do not reopen the read while drafting the body.

GaaS pull-request-review loads `code-review` and says "ask the user". Corbits extras: `ask_operator` (tool mapping above), `/review` for `code-review` (slash-name mapping above), and GitHub posting (this section). Do not fork the GaaS pull-request-review body.

### When to post

Post when any of these is true:
Expand Down
27 changes: 5 additions & 22 deletions plugins/corbits-skills/skills/pull-request-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Review a pull request by branch name or URL, using a git worktree

# Pull Request Review

Use this skill to review a pull request given a branch name or URL. Do not implement fixes.
Use this skill to review a pull request given a branch name or URL.

## Input Formats

Expand Down Expand Up @@ -109,7 +109,7 @@ Before reviewing, the repository must be properly set up. Look for developer doc

3. Do not assume the setup process. Every repository has its own conventions and requirements.

4. If no setup documentation exists, `ask_operator` how to set up the repository before proceeding.
4. If no setup documentation exists, ask the user how to set up the repository before proceeding.

### Step 7: Determine Base Branch

Expand All @@ -126,33 +126,16 @@ glab mr view --output json | jq -r '.target_branch'
git branch -r | grep -E 'origin/(main|master)$' | head -1 | sed 's/.*origin\///'
```

### Step 8: Load the review skill
### Step 8: Load Code Review Skill

Load and follow the `review` skill to perform the actual review. The `review` skill provides guidance on:
Load and follow the `code-review` skill to perform the actual review. The code-review skill provides guidance on:

- Scope determination using git diff
- Handling pre-existing code
- Convention compliance
- Test coverage philosophy
- Signal over noise (avoiding unactionable findings)
- Review checklist
- **Post the Review on GitHub** (required when a PR URL/number is known)

### Step 9: Post the Review on GitHub

When the review targets a GitHub PR (URL, number, or branch with an open PR), **post the finished review on the PR** before cleanup. A review that only lives in chat is not done.

Follow **Post the Review on GitHub** in the `review` skill:

1. Map the verdict to a `gh pr review` action:
- Approve → `--approve`
- Comment → `--comment`
- Request changes → `--request-changes`
2. Body: clean multi-line shape — lens label, one present-tense line on what the branch does, findings with `path:line`, no AI filler. Hard bans live in that skill section.
3. If additional personas ran (`critic`, `greybeard`, OSS/quality), each lens with substance posts its own labeled review. Primary owns the merge action; secondary lenses use `--comment` only.
4. Paste the posted review URL(s) into the user-facing summary.

Do not skip the post because the chat already summarized the findings.

## Cleanup

Expand All @@ -166,7 +149,7 @@ Inform the user that the worktree remains available for further investigation an

## Error Handling

If any command fails during the workflow, do not retry or attempt workarounds. Stop immediately and `ask_operator` how to proceed. Common failure scenarios include:
If any command fails during the workflow, do not retry or attempt workarounds. Stop immediately and ask the user for guidance. Common failure scenarios include:

- Branch does not exist remotely
- Worktree creation fails
Expand Down
13 changes: 10 additions & 3 deletions tests/unit/corbits-skills-catalog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,17 @@ test("review skill is a code-review playbook, not a director router", async () =
expect(skill).not.toContain('task(agent="greybeard")');
});

test("pull-request-review checkouts a worktree then loads the review skill", async () => {
test("pull-request-review is 1:1 with GaaS pull-request-review", async () => {
const skill = await Bun.file(join(pluginRoot, "skills/pull-request-review/SKILL.md")).text();
expect(skill).toContain("git worktree add");
expect(skill).toContain("review` skill");
expect(skill).toContain("Do not implement fixes");
expect(skill).toContain("`code-review` skill");
expect(skill).toContain("Load Code Review Skill");
expect(skill).toContain("ask the user");
expect(skill).not.toContain("Do not implement fixes");
expect(skill).not.toContain("ask_operator");
expect(skill).not.toContain("### Step 9:");
expect(skill).not.toContain("Post the Review on GitHub");
expect(skill).not.toContain(USER_INVOCABLE_FALSE);
expect(skill).not.toContain("spawn_agent");
expect(skill).not.toContain('task(agent="critic")');
});
Expand Down Expand Up @@ -391,6 +397,7 @@ test("native-integration maps GaaS tool names and parks Corbits extras", async (
expect(skill).toContain("intern executes sequenced git via `run_shell`");
expect(skill).toContain("Do not fork the GaaS git-rebase body");
expect(skill).toContain("Do not fork the GaaS opsh body");
expect(skill).toContain("Do not fork the GaaS pull-request-review body");
expect(skill).toContain("prove");
});

Expand Down
Loading