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
4 changes: 4 additions & 0 deletions packages/cli/src/__tests__/commands/skill.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ describe('skill command', () => {
global: undefined,
environments: undefined,
});
expect(mockAddSkill).toHaveBeenCalledWith('codeaholicguy/ai-devkit', 'dev-pr', {
global: undefined,
environments: undefined,
});
});

it('exits when skill add has neither registry nor --built-in', async () => {
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const BUILTIN_SKILL_NAMES = [
'dev-implementation',
'dev-testing',
'dev-review',
'dev-pr',
'structured-debug',
'document-code',
'memory',
Expand Down
46 changes: 46 additions & 0 deletions skills/dev-pr/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: dev-pr
description: AI DevKit · Publish a ready feature branch for review. Use when the user wants to sync, push, and open or update a code review request on GitHub, GitLab, or another Git host.
---

# Dev PR

Publish an already-reviewed branch for code review. Keep this separate from commit creation: if the branch has uncommitted changes, stop and ask the user to run the commit workflow first.

## Contract

1. Verify repository context with `git status -sb`, `git branch --show-current`, and `git remote -v`.
2. Confirm the branch is not the base branch and has committed changes to publish.
3. Fetch the remote before comparing or rebasing.
4. Rebase the feature branch onto the latest remote base branch before push/review.
5. Resolve conflicts carefully, preserving intended behavior, then rerun relevant validation.
6. Push safely. Use `--force-with-lease` only when a rebase rewrote an already-pushed branch.
7. Open or update the host's review request: PR, merge request, or equivalent.
8. Report review URL, branch, HEAD SHA, validation results, push mode, and risks.

## Publish Workflow

1. Inspect local context:
- `git status -sb`
- `git branch --show-current`
- `git remote -v`
2. If uncommitted changes exist, stop. Do not stage, amend, squash, or commit in this skill.
3. Identify the remote and base branch from repo conventions, upstream config, or user instruction; default to `origin/main` only when that matches the repo.
4. Fetch the remote, inspect the delta, and rebase onto the remote base branch.
5. If conflicts occur, inspect conflicted files and `git diff`, resolve minimally, validate when useful, `git add`, then continue the rebase. Stop if the correct resolution is unclear.
6. Run relevant validation for the changed surface.
7. Push:
- First push: set upstream.
- Normal update: plain push.
- Rebased already-pushed branch: `--force-with-lease`.
8. Open or update the review request using the host's tool/API/UI (`gh`, `glab`, forge CLI, web UI, or project-specific workflow).
9. Write a concise review description. Include enough for reviewers to understand:
- Summary: what changed, why, and how.
- Validation: how it was verified.
- Risks: notable risks or "none known".
10. Report:
- Review URL and state
- Branch and HEAD SHA
- Validation commands and exit codes
- Push mode, including whether `--force-with-lease` was used
- Risks, follow-ups, or blockers
4 changes: 4 additions & 0 deletions skills/dev-pr/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "Dev PR"
short_description: "AI DevKit · Publish a ready branch for code review"
default_prompt: "Use $dev-pr to sync this ready branch, push safely, and open or update the review request."
7 changes: 7 additions & 0 deletions skills/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,13 @@
"description": "AI DevKit · Final code review phase guidance for holistic pre-push review. Use when the user wants code review, final lifecycle review, design alignment checks, integration risk review, or dev-lifecycle phase 9.",
"lastIndexed": 1782001853267
},
{
"name": "dev-pr",
"registry": "codeaholicguy/ai-devkit",
"path": "skills/dev-pr",
"description": "AI DevKit · Publish a ready feature branch for review. Use when the user wants to sync, push, and open or update a code review request on GitHub, GitLab, or another Git host.",
"lastIndexed": 1782001853267
},
{
"name": "dev-testing",
"registry": "codeaholicguy/ai-devkit",
Expand Down
2 changes: 1 addition & 1 deletion web/content/docs/1-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Terminal commands still start with `ai-devkit`; skills are used by the agent ins
| Skill | Purpose |
|---------|---------|
| `dev-lifecycle` | Orchestrate worktree setup, requirements, design, planning, implementation, testing, and review |
| `dev-worktree`, `dev-requirements`, `dev-design`, `dev-planning`, `dev-implementation`, `dev-testing`, `dev-review` | Run focused lifecycle phases directly |
| `dev-worktree`, `dev-requirements`, `dev-design`, `dev-planning`, `dev-implementation`, `dev-testing`, `dev-review`, `dev-pr` | Run focused lifecycle and publish-for-review phases directly |
| `dev-commit` | Commit only intended, verified changes with a conventional message |
| `tdd` | Add or change behavior test-first |
| `verify` | Require fresh command output before completion claims |
Expand Down
2 changes: 1 addition & 1 deletion web/content/docs/7-skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ AI DevKit ships with a core set of skills in its default registry:
| `document-code` | Document code entry points with structured analysis and dependency mapping |
| `dev-commit` | Commit only intended, verified changes with a conventional message |
| `dev-lifecycle` | Orchestrate the SDLC workflow and route to phase skills |
| `dev-worktree`, `dev-requirements`, `dev-design`, `dev-planning`, `dev-implementation`, `dev-testing`, `dev-review` | Run focused SDLC phases directly |
| `dev-worktree`, `dev-requirements`, `dev-design`, `dev-planning`, `dev-implementation`, `dev-testing`, `dev-review`, `dev-pr` | Run focused SDLC and publish-for-review phases directly |
| `structured-debug` | Follow a disciplined debugging and RCA process before implementing fixes |
| `memory` | Use AI DevKit memory operations via CLI patterns when needed |
| `simplify-implementation` | Simplify and refactor complex code paths for maintainability |
Expand Down
14 changes: 14 additions & 0 deletions web/lib/skills/built-in.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,20 @@ export const builtInSkills: BuiltInSkill[] = [
],
relatedAgents: ["Claude Code", "Codex", "Cursor", "opencode"],
},
{
name: "dev-pr",
title: "Dev PR",
category: "Workflow",
summary: "Publish a reviewed feature branch for code review.",
description:
"Use dev-pr after implementation, testing, and final review are complete. It syncs with the remote base branch, handles rebase conflicts carefully, reruns validation, pushes safely, and opens or updates the host review request.",
useCases: [
"Rebase a ready feature branch before review",
"Push safely after validation",
"Open or update a PR, merge request, or equivalent with clear status and risks",
],
relatedAgents: ["Claude Code", "Codex", "Cursor", "opencode"],
},
];

export function getBuiltInSkill(name: string): BuiltInSkill | undefined {
Expand Down
Loading