# Cpn Pr Review

> À utiliser quand vous relisez une PR de cloud-pi-native/console : architecture, conventions NestJS et rendu de revue en français.

- Skill: `shikanime-labs/cpn-pr-review` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add shikanime-labs/cpn-pr-review`
- Raw SKILL.md: https://api.skillmd.com/api/skills/shikanime-labs/cpn-pr-review/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- License: Apache-2.0
- Author: shikanime-labs (https://skillmd.com/u/shikanime-labs)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/shikanime-labs/cpn-pr-review

---


# cloud-pi-native PR Review (cpn-pr-review)

Review `cloud-pi-native/*` changes and GitHub PRs via the four-phase process
with console architecture checkpoints and French artifacts. `jj`+`gh` only —
never commit or merge.

## When to Use

- "review this console PR", "check before pushing to cloud-pi-native", "review
  PR #N in console"
- After touching `apps/client`, `apps/server`, `apps/server-nestjs`,
  `plugins/*`, `packages/*`
- Before opening/merging a `cloud-pi-native/*` PR

## Prerequisites

- `gh` authenticated, in a `cloud-pi-native/*` repo (`origin` = org repo)
- Node >= 26, pnpm v11.8 (local `pnpm test`/lint)
- Origin-only PRs and author identity: see **cpn Contribution Rules** below

## How to Run

`terminal` for `jj`/`gh`/`pnpm`; `read_file`/`search_files` for context. PRs:
`gh pr checkout <N>`. Load `references/console-architecture.md` (arch),
`references/review-output.md` (FR),
`sks-pr-review/references/review-doctrine.md` (std),
`references/review-procedure.md` (phases), `references/pitfalls.md` (gotchas).

## Quick Reference

```bash
jj diff --from main --to @ --stat          # scope
pnpm test                                  # vitest unit (all packages)
pnpm playwright:test                       # E2E (needs docker infra)
npx eslint .                               # ESLint 9 flat (antfu base)
pnpm --filter @cpn-console/server-nestjs exec prisma generate  # prisma generate
gh pr view <N> && gh pr diff <N> --name-only
gh pr review <N> --request-changes --body "..."   # post verdict
```

## Procedure

**1 Context.** Read PR title/body, linked issue, branch. Confirm branched from
`origin` and author email is the cpn identity. **2 High-level.** Run the console
architecture checklist — see `references/console-architecture.md` +
`references/review-procedure.md`. Lentille YAGNI (`ponytail-review`, plugin
ponytail) : signaler ce qui peut être supprimé ou remplacé par la stdlib ;
corner-cut délibéré → commentaire `ponytail:` (plafond + chemin de montée),
récolté par `ponytail-debt`. **3 Line-by-line.** Apply the line-level
checklist — see `references/review-procedure.md`. **4 Summary.** Severity-tag
findings; post each inline as a French comment anchored at its line
(`references/review-output.md`), NOT one block comment. Body = 2-3 sentence
verdict + praise. Approve when it improves code health even if imperfect. If
commits violate commitlint, suggest corrected conventional message (author
amends). Verdict: `gh pr review <N> --request-changes` only on
`blocking`/`important`; else `--approve`.

## Severity Labels

| Label           | Action                           |
| --------------- | -------------------------------- |
| 🔴 `blocking`   | Must fix before merge            |
| 🟠 `important`  | Should fix; may block on context |
| 🟡 `nit`        | Style/preference                 |
| ⚪ `suggestion` | Optional improvement             |
| 📚 `learning`   | Educational note                 |
| ✨ `praise`     | Highlight good work              |

## cpn Contribution Rules (enforced)

- **Origin-only PRs** — push to `origin` (org repo), open
  `--head cloud-pi-native:<branch>`. With `jj`, track the bookmark:
  `jj bookmark track <branch> --remote=origin`.
- **Author identity** —
  `William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr>`,
  SSH-signed.
- **Minimal PRs** — out-of-scope fixes → follow-up issue, not the same PR.
- **Artifact language** — issues/PRs/discussions in French; no `(...)` in
  headings.
- **Conventional commits** — enforced by commitlint + husky; 7 prefixes.
- **Release notes** — consumer-only (Features/Bug Fixes/Docs); drop
  CI/infra/refactor/internal.

## Pitfalls

See `references/pitfalls.md` (Playwright, env chain, Prisma schema, @ts-rest,
Husky, stale bots, token-hash CodeQL, migration sync).

## Verification

Done when: every finding posted inline at its line (severity-prefixed, French)
via one review; body carries 2-3 sentence verdict + praise; corrected
conventional commit message suggested when commitlint would reject; SonarQube
Quality Gate passed with 0 new issues. All findings are posted on the PR —
inline at each line (`references/review-output.md`); use a top-level review
comment (`gh pr review <N> --comment`) only when a point has no line anchor.
No local-only summary.

Related: `sks-pr-review`, `github-code-review`.

