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
3 changes: 3 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ jobs:
- name: Publish pi-arc to npm
run: node scripts/npm-publish-workspace-if-needed.mjs @sentiolabs/pi-arc

- name: Publish pi-code-quality to npm
run: node scripts/npm-publish-workspace-if-needed.mjs @sentiolabs/pi-code-quality

- name: Publish pi-frontend-design to npm
run: node scripts/npm-publish-workspace-if-needed.mjs @sentiolabs/pi-frontend-design

Expand Down
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"packages/pi-arc": "0.10.1",
"packages/pi-code-quality": "0.1.0",
"packages/pi-frontend-design": "0.1.1",
"packages/pi-scriptable-statusline": "0.2.0"
}
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ This repo uses npm workspaces with one package per directory under `packages/*`.
| Package | Path | Description |
|---|---|---|
| [`@sentiolabs/pi-arc`](packages/pi-arc) | `packages/pi-arc` | Arc issue tracker integration for Pi: skills, prompts, extension commands, session context, bundled checklist/question support, and optional Arc specialist integration through external `pi-subagents`. |
| [`@sentiolabs/pi-code-quality`](packages/pi-code-quality) | `packages/pi-code-quality` | Pi skills and prompts for code-quality review, including 4-lens AI slop review and PR/branch size review for stack/split decisions. |
| [`@sentiolabs/pi-frontend-design`](packages/pi-frontend-design) | `packages/pi-frontend-design` | Frontend design skill for distinctive, production-grade Pi UI work. |
| [`@sentiolabs/pi-scriptable-statusline`](packages/pi-scriptable-statusline) | `packages/pi-scriptable-statusline` | Scriptable footer and statusline UI package for Pi: owns the footer, supports scriptable above/below-editor widgets, and includes a natural-language setup skill. |

Future packages such as `pi-slop` should be added under `packages/*` when their sources are ready.
Future packages should be added under `packages/*` when their sources are ready.

## Development

Expand All @@ -27,6 +28,7 @@ Test the package locally with Pi from the monorepo root:

```bash
pi -e ./packages/pi-arc
pi -e ./packages/pi-code-quality
pi -e ./packages/pi-frontend-design
pi -e ./packages/pi-scriptable-statusline
```
Expand All @@ -40,6 +42,7 @@ Releases are independent per package through Release Please. See [`docs/releasin
- [`docs/development.md`](docs/development.md)
- [`docs/releasing.md`](docs/releasing.md)
- [`docs/packages/pi-arc.md`](docs/packages/pi-arc.md)
- [`docs/packages/pi-code-quality.md`](docs/packages/pi-code-quality.md)
- [`docs/packages/pi-frontend-design.md`](docs/packages/pi-frontend-design.md)
- [`docs/packages/pi-scriptable-statusline.md`](docs/packages/pi-scriptable-statusline.md)
- [`packages/pi-arc/README.md`](packages/pi-arc/README.md)
Expand Down
45 changes: 45 additions & 0 deletions docs/packages/pi-code-quality.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# `@sentiolabs/pi-code-quality`

`@sentiolabs/pi-code-quality` provides Pi-native code-quality skills and prompts for slop review and size review.

## Included resources

- Skill: `/skill:slop-review`
- Prompt alias: `/code-quality-slop [scope]`
- Skill: `/skill:size-review`
- Prompt alias: `/code-quality-size [scope]`
- References: Go, Python, Rust, and Svelte/TypeScript slop-review guidance; default size-review exclusions

## Slop review workflow

`slop-review` reviews code through four lenses: AI authorship signals, idiom fluency, code quality, and architecture/solution fit. It is the workflow for deciding whether the implementation itself looks suspect.

## Size review workflow

`size-review` reviews how a change is packaged for human review: raw versus post-exclusion size, stacked branch shape, viable seams, split effort, and concrete stack plans.

## Usage

```text
/code-quality-slop
/code-quality-slop src/
/code-quality-slop #123
/skill:slop-review

/code-quality-size
/code-quality-size #123
/code-quality-size feature/my-branch
/skill:size-review
```

## Portability

The package does not require Arc or `pi-subagents`. It uses parallel agent tools when available and falls back to sequential lens passes otherwise.

## Local development

```bash
npm test --workspace @sentiolabs/pi-code-quality
npm run pack:dry-run --workspace @sentiolabs/pi-code-quality
pi -e ./packages/pi-code-quality
```
15 changes: 15 additions & 0 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ Current package entries include:
}
]
},
"packages/pi-code-quality": {
"component": "pi-code-quality",
"package-name": "@sentiolabs/pi-code-quality",
"release-type": "node",
"initial-version": "0.1.0",
"changelog-path": "CHANGELOG.md",
"extra-files": [
{
"type": "json",
"path": "/package-lock.json",
"jsonpath": "$.packages['packages/pi-code-quality'].version"
}
]
},
"packages/pi-frontend-design": {
"component": "pi-frontend-design",
"package-name": "@sentiolabs/pi-frontend-design",
Expand Down Expand Up @@ -63,6 +77,7 @@ Publishing uses GitHub Actions and npm provenance through `scripts/npm-publish-w

```bash
node scripts/npm-publish-workspace-if-needed.mjs @sentiolabs/pi-arc
node scripts/npm-publish-workspace-if-needed.mjs @sentiolabs/pi-code-quality
node scripts/npm-publish-workspace-if-needed.mjs @sentiolabs/pi-frontend-design
node scripts/npm-publish-workspace-if-needed.mjs @sentiolabs/pi-scriptable-statusline
```
Expand Down
12 changes: 12 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/pi-code-quality/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

## 0.1.0

- Initial Pi package for AI slop review, PR/branch size review, and code quality reviewability workflows.
21 changes: 21 additions & 0 deletions packages/pi-code-quality/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2026 Sentio Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
63 changes: 63 additions & 0 deletions packages/pi-code-quality/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Pi Code Quality Package

> Monorepo location: this package lives at `packages/pi-code-quality` in the `pi-nexus` workspace. From the monorepo root, test it with `npm test --workspace @sentiolabs/pi-code-quality` and load it locally with `pi -e ./packages/pi-code-quality`.

Pi skills and prompts for AI slop review, PR/branch size review, and code reviewability analysis.

This package ports the Claude Code `code-quality` plugin's `slop-review` and `size-review` workflows to Pi.

## What is included

- `/skill:slop-review` — 4-lens slop review for AI authorship signals, idiom drift, code quality issues, and architecture/solution-fit problems.
- `/code-quality-slop [scope]` — prompt alias for reviewing current changes, files, directories, PRs, or broad codebase scopes.
- `/skill:size-review` — PR/branch size review that decides whether a change should be split, stacked, cleaned up, or shipped as-is.
- `/code-quality-size [scope]` — prompt alias for reviewing the current branch, a PR, or a named branch for reviewability and stack seams.
- Slop-review language references for Go, Python, Rust, and Svelte/TypeScript.
- Size-review default exclusions for generated files, lockfiles, vendored output, and common machine-generated artifacts.

## Workflow distinction

`slop-review` evaluates what the code does and whether the implementation quality or solution fit is suspect. `size-review` evaluates how the change is packaged for human review: raw vs post-exclusion size, stacked branch shape, viable seams, split effort, and concrete stack plans.

## Portable execution

The `slop-review` skill is portable. When the current Pi session exposes a parallel agent tool, the review can run Step 0 first and then run the applicable Phase 1 lenses in parallel. When no parallel tool is available, the same lenses run sequentially in the current agent context with separated findings.

Parallelism is opportunistic; the review methodology, calibration, scoring, and output format are the contract.

## Install from npmjs.org

```bash
pi install npm:@sentiolabs/pi-code-quality
```

## Install locally

From this monorepo:

```bash
pi -e ./packages/pi-code-quality
```

## Usage

```text
/code-quality-slop
/code-quality-slop src/
/code-quality-slop path/to/file.go
/code-quality-slop #123
/skill:slop-review

/code-quality-size
/code-quality-size #123
/code-quality-size feature/my-branch
/skill:size-review
```

## Development

```bash
npm test --workspace @sentiolabs/pi-code-quality
npm run pack:dry-run --workspace @sentiolabs/pi-code-quality
pi -e ./packages/pi-code-quality
```
57 changes: 57 additions & 0 deletions packages/pi-code-quality/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "@sentiolabs/pi-code-quality",
"version": "0.1.0",
"description": "Pi skills and prompts for AI slop review, PR/branch size review, and code reviewability analysis.",
"type": "module",
"keywords": [
"pi-package",
"pi-skill",
"code-quality",
"code-review",
"ai-slop",
"idiom-fluency",
"ai-authorship",
"solution-fit",
"architecture-review",
"pr-size",
"branch-review",
"stacked-prs",
"reviewability"
],
"license": "MIT",
"author": {
"name": "Sentio Labs",
"url": "https://github.com/sentiolabs"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/SentioLabs/pi-nexus.git",
"directory": "packages/pi-code-quality"
},
"homepage": "https://github.com/SentioLabs/pi-nexus/tree/main/packages/pi-code-quality#readme",
"bugs": {
"url": "https://github.com/SentioLabs/pi-nexus/issues"
},
"engines": {
"node": ">=24.0.0"
},
"scripts": {
"test": "node --test tests/*.test.mjs",
"pack:dry-run": "npm pack --dry-run",
"prepublishOnly": "npm test && npm run pack:dry-run"
},
"files": [
"skills/",
"prompts/",
"README.md",
"CHANGELOG.md",
"LICENSE"
],
"publishConfig": {
"access": "public"
},
"pi": {
"skills": ["./skills"],
"prompts": ["./prompts/*.md"]
}
}
8 changes: 8 additions & 0 deletions packages/pi-code-quality/prompts/code-quality-size.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
description: Run a PR or branch size review to decide whether the change should be split, stacked, cleaned up, or shipped as-is
argument-hint: "[scope]"
---

Use the `size-review` skill for this code quality size request.

If no scope is provided, review the current branch against its merge-base with trunk. Treat `$ARGUMENTS` as the requested scope when present; it may be a PR number, PR URL, branch name, or explicit branch/base scope.
23 changes: 23 additions & 0 deletions packages/pi-code-quality/prompts/code-quality-slop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
description: Run an AI slop/code-quality review on files, directories, PRs, current changes, or the full codebase
argument-hint: "[scope]"
---

# Slop Review

Use the `slop-review` skill against the specified target.

## Usage

- `/code-quality-slop` -- review current git diff (unstaged changes)
- `/code-quality-slop src/` -- review a directory
- `/code-quality-slop path/to/file.go` -- review specific files
- `/code-quality-slop PR` or `/code-quality-slop #123` -- review a pull request

## Instructions

Invoke the `slop-review` skill with the user's specified scope.
If no scope is provided, default to reviewing the current git diff.
Pass any arguments the user provided as the scope for the review.

Use `$ARGUMENTS` as the requested scope when present.
Loading
Loading