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
Binary file removed .DS_Store
Binary file not shown.
17 changes: 17 additions & 0 deletions .agents/skills/qa/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: qa
description: View the QA queue or review a specific issue
---

> **Codex CLI:** This skill is triggered by description matching. State any arguments in your message. Sub-agent spawning is not supported — perform any review steps inline.

---

> **QA workflow is not configured.** `/qa` requires `QA_READY_LABEL` to be set in `.codecannon.yaml` so it can find issues waiting for QA.
>
> To enable: add `QA_READY_LABEL: ready-for-qa` (or your preferred label name) to `.codecannon.yaml` and re-run `CodeCanon/sync.sh`.
>
> Note: In trunk mode, `/ship` does not apply this label automatically — you would need to apply it manually or via a separate workflow.

Do not proceed. Stop here.
<!-- generated by CodeCanon/sync.sh | skill: qa | adapter: codex | hash: 8495a9ca | DO NOT EDIT — run CodeCanon/sync.sh to regenerate -->
155 changes: 155 additions & 0 deletions .agents/skills/release/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
---
name: release
description: Create a GitHub Release; in multi-branch mode, also promotes the pre-production branch to `main`
---

> **Codex CLI:** This skill is triggered by description matching. State any arguments in your message. Sub-agent spawning is not supported — perform any review steps inline.

---

## What `/release` does

Creates a GitHub Release and promotes `dev` to `main`. Run this after preview testing is confirmed.

---

## Step 1 — Verify state

Check the current branch:
```bash
git branch --show-current
```

### Verify on `dev` with tag

If not on `dev`, switch to it:
```bash
git checkout dev && git pull
```

Verify a version tag exists on HEAD:
```bash
git describe --exact-match --tags HEAD 2>/dev/null
```

If no tag is found, warn: "No version tag found on HEAD. Run `/version` first to tag this release before promoting it." Stop unless the user explicitly says to proceed anyway.

---

## Step 2 — Compute what's being promoted

Find all merge commits in `dev` not yet in `main`:
```bash
git log main..dev --merges --pretty=format:"%s"
```

Parse PR numbers from the merge commit subjects. GitHub's format is:
`Merge pull request #N from branch/name`

For each PR number found, retrieve the PR body:
```bash
gh pr view <N> --json number,title,body
```

Extract `Issue #N` references from PR bodies (look for the pattern `Issue #\d+`).

Compile:
- List of PRs being promoted (number + title)
- List of open issues linked to those PRs

---

## Step 3 — HUMAN GATE

Show the user the release summary. Example format:

```
Ready to release vX.Y.Z to production.

PRs included:
#17 — Add /docs directory
#18 — Fix checkout runtime error

Issues that will close:
#14 — Add /docs directory
#15 — Fix checkout runtime error

Have you tested all of the above on preview? Type 'release' to confirm.
```

Wait for the user to type "release" or an explicit confirmation. Any other response → stop and ask what they'd like to change.

---

## Step 4 — Create PR: `dev` → `main`

```bash
gh pr create --base main --head dev \
--title "Release vX.Y.Z" \
--body "$(cat <<'EOF'
Release vX.Y.Z

PRs included:
- #17 — Add /docs directory
- #18 — Fix checkout runtime error

Closes #14
Closes #15
EOF
)"
```

Note the PR number from the output.

The `Closes #N` lines will auto-close the linked issues because this PR merges into `main` (the default branch).

---

## Step 5 — Merge

Do NOT use `make merge` — it refuses PRs targeting `main`. Use `gh pr merge` directly:

```bash
gh pr merge <pr-number> --merge
```

---

## Step 6 — Create GitHub Release

The version tag (from Step 1) and the PR/issue list (from Step 2) are already known. Find the previous tag to build the changelog link:

```bash
git describe --abbrev=0 <version-tag>^ 2>/dev/null
```

If no previous tag exists, omit the "Full changelog" line.

Create the release:

```bash
gh release create <version-tag> \
--title "<version-tag>" \
--notes "$(cat <<'EOF'
## Changes

- #<issue> — <PR title> (PR #<pr-number>)
[... one line per PR included in this release ...]

**Full changelog:** https://github.com/<owner>/<repo>/compare/<previous-tag>...<version-tag>
EOF
)"
```

Format each PR line as `- #<linked-issue> — <PR title> (PR #<N>)`. If a PR had no linked issue, omit the `#<issue>` prefix and use just the PR title.

After the command runs, note the release URL from the output.

---

## Step 7 — Report

Tell the user:

> "Released vX.Y.Z. Issues #N, #M closed automatically. GitHub Release vX.Y.Z created at `<url>`. Run `make deploy-prod` to ship to production."
<!-- generated by CodeCanon/sync.sh | skill: release | adapter: codex | hash: b1100c0f | DO NOT EDIT — run CodeCanon/sync.sh to regenerate -->
68 changes: 68 additions & 0 deletions .agents/skills/review/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: review
description: Run a standalone code review on a pull request
---

> **Codex CLI:** This skill is triggered by description matching. State any arguments in your message. Sub-agent spawning is not supported — perform any review steps inline.

---

## What `/review` does

`/review` runs a standalone code review on a PR. It wraps `.claude/review-agent-prompt.md`.

---

## Pre-flight

If `ai` is `"off"`, say:

> "Code review is disabled for this project (REVIEW_GATE is set to 'off' in .codecannon.yaml). To enable reviews, set REVIEW_GATE to 'ai' or 'advisory' and re-run CodeCanon/sync.sh."

Do not proceed.

---

## Step 1 — Identify the PR

If `$ARGUMENTS` is a number, use it as the PR number.

If `$ARGUMENTS` is empty, detect the current branch's open PR:
```
gh pr view --json number --jq '.number'
```

If no PR is found, abort and say: "No open PR found for the current branch. Pass a PR number explicitly: `/review <number>`"

---

## Step 2 — Run the review

Load `.claude/review-agent-prompt.md` and perform the review for the PR number.

**If sub-agent spawning is supported** (e.g. Claude Code): invoke a dedicated review agent with the prompt and PR number.

**If sub-agent spawning is not supported** (e.g. Codex, Cursor, Gemini): perform the review yourself inline — follow the instructions in the review-agent prompt directly.

The review must:
1. Read the PR diff via `gh pr diff <number>`
2. Read any files needed for full context
3. Post findings as a PR comment via `gh pr comment <number>`

---

## Step 3 — Report verdict

After the review agent completes, relay its verdict to the user:

- **APPROVE** → "Review passed. Run `/ship` to merge (or it may already be merged if called from `/ship`)."
- **REQUEST CHANGES** → Surface the CRITICAL findings. Say: "Fix the issues above and run `/review` again before merging."

---

## Important

- This command does not commit, push, or merge anything. It only reviews.
- It may be called manually at any time, not just from `/ship`.
- The review comment is posted to GitHub for the audit trail.
<!-- generated by CodeCanon/sync.sh | skill: review | adapter: codex | hash: bc6e38a4 | DO NOT EDIT — run CodeCanon/sync.sh to regenerate -->
Loading
Loading