@codyswann/lisa 2.127.1 → 2.128.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +5 -1
- package/plugins/lisa/.codex-plugin/hooks.json +4 -0
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/commands/parity-code-review.md +6 -0
- package/plugins/lisa/commands/parity-code-simplifier.md +6 -0
- package/plugins/lisa/commands/parity-coderabbit.md +6 -0
- package/plugins/lisa/commands/parity-safety-net-rules.md +6 -0
- package/plugins/lisa/commands/parity-sentry-sdk-setup.md +6 -0
- package/plugins/lisa/commands/parity-sentry-seer.md +6 -0
- package/plugins/lisa/commands/parity-skill-creator.md +6 -0
- package/plugins/lisa/hooks/parity-safety-net.sh +102 -0
- package/plugins/lisa/skills/parity-code-review/SKILL.md +83 -0
- package/plugins/lisa/skills/parity-code-review/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/parity-code-simplifier/SKILL.md +76 -0
- package/plugins/lisa/skills/parity-code-simplifier/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/parity-coderabbit/SKILL.md +77 -0
- package/plugins/lisa/skills/parity-coderabbit/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/parity-safety-net-rules/SKILL.md +144 -0
- package/plugins/lisa/skills/parity-safety-net-rules/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
- package/plugins/lisa/skills/parity-sentry-sdk-setup/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/parity-sentry-seer/SKILL.md +135 -0
- package/plugins/lisa/skills/parity-sentry-seer/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/parity-skill-creator/SKILL.md +149 -0
- package/plugins/lisa/skills/parity-skill-creator/agents/openai.yaml +4 -0
- package/plugins/lisa-agy/commands/parity-code-review.md +6 -0
- package/plugins/lisa-agy/commands/parity-code-simplifier.md +6 -0
- package/plugins/lisa-agy/commands/parity-coderabbit.md +6 -0
- package/plugins/lisa-agy/commands/parity-safety-net-rules.md +6 -0
- package/plugins/lisa-agy/commands/parity-sentry-sdk-setup.md +6 -0
- package/plugins/lisa-agy/commands/parity-sentry-seer.md +6 -0
- package/plugins/lisa-agy/commands/parity-skill-creator.md +6 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/parity-code-review/SKILL.md +83 -0
- package/plugins/lisa-agy/skills/parity-code-simplifier/SKILL.md +76 -0
- package/plugins/lisa-agy/skills/parity-coderabbit/SKILL.md +77 -0
- package/plugins/lisa-agy/skills/parity-safety-net-rules/SKILL.md +144 -0
- package/plugins/lisa-agy/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
- package/plugins/lisa-agy/skills/parity-sentry-seer/SKILL.md +135 -0
- package/plugins/lisa-agy/skills/parity-skill-creator/SKILL.md +149 -0
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +5 -1
- package/plugins/lisa-copilot/commands/parity-code-review.md +6 -0
- package/plugins/lisa-copilot/commands/parity-code-simplifier.md +6 -0
- package/plugins/lisa-copilot/commands/parity-coderabbit.md +6 -0
- package/plugins/lisa-copilot/commands/parity-safety-net-rules.md +6 -0
- package/plugins/lisa-copilot/commands/parity-sentry-sdk-setup.md +6 -0
- package/plugins/lisa-copilot/commands/parity-sentry-seer.md +6 -0
- package/plugins/lisa-copilot/commands/parity-skill-creator.md +6 -0
- package/plugins/lisa-copilot/hooks/parity-safety-net.sh +102 -0
- package/plugins/lisa-copilot/skills/parity-code-review/SKILL.md +83 -0
- package/plugins/lisa-copilot/skills/parity-code-simplifier/SKILL.md +76 -0
- package/plugins/lisa-copilot/skills/parity-coderabbit/SKILL.md +77 -0
- package/plugins/lisa-copilot/skills/parity-safety-net-rules/SKILL.md +144 -0
- package/plugins/lisa-copilot/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
- package/plugins/lisa-copilot/skills/parity-sentry-seer/SKILL.md +135 -0
- package/plugins/lisa-copilot/skills/parity-skill-creator/SKILL.md +149 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/commands/parity-code-review.md +6 -0
- package/plugins/lisa-cursor/commands/parity-code-simplifier.md +6 -0
- package/plugins/lisa-cursor/commands/parity-coderabbit.md +6 -0
- package/plugins/lisa-cursor/commands/parity-safety-net-rules.md +6 -0
- package/plugins/lisa-cursor/commands/parity-sentry-sdk-setup.md +6 -0
- package/plugins/lisa-cursor/commands/parity-sentry-seer.md +6 -0
- package/plugins/lisa-cursor/commands/parity-skill-creator.md +6 -0
- package/plugins/lisa-cursor/hooks/hooks.json +4 -0
- package/plugins/lisa-cursor/hooks/parity-safety-net.sh +102 -0
- package/plugins/lisa-cursor/skills/parity-code-review/SKILL.md +83 -0
- package/plugins/lisa-cursor/skills/parity-code-simplifier/SKILL.md +76 -0
- package/plugins/lisa-cursor/skills/parity-coderabbit/SKILL.md +77 -0
- package/plugins/lisa-cursor/skills/parity-safety-net-rules/SKILL.md +144 -0
- package/plugins/lisa-cursor/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
- package/plugins/lisa-cursor/skills/parity-sentry-seer/SKILL.md +135 -0
- package/plugins/lisa-cursor/skills/parity-skill-creator/SKILL.md +149 -0
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/.claude-plugin/plugin.json +2 -1
- package/plugins/src/base/commands/parity-code-review.md +6 -0
- package/plugins/src/base/commands/parity-code-simplifier.md +6 -0
- package/plugins/src/base/commands/parity-coderabbit.md +6 -0
- package/plugins/src/base/commands/parity-safety-net-rules.md +6 -0
- package/plugins/src/base/commands/parity-sentry-sdk-setup.md +6 -0
- package/plugins/src/base/commands/parity-sentry-seer.md +6 -0
- package/plugins/src/base/commands/parity-skill-creator.md +6 -0
- package/plugins/src/base/hooks/parity-safety-net.sh +102 -0
- package/plugins/src/base/skills/parity-code-review/SKILL.md +83 -0
- package/plugins/src/base/skills/parity-code-simplifier/SKILL.md +76 -0
- package/plugins/src/base/skills/parity-coderabbit/SKILL.md +77 -0
- package/plugins/src/base/skills/parity-safety-net-rules/SKILL.md +144 -0
- package/plugins/src/base/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
- package/plugins/src/base/skills/parity-sentry-seer/SKILL.md +135 -0
- package/plugins/src/base/skills/parity-skill-creator/SKILL.md +149 -0
- package/scripts/plugin-parity-drift.mjs +9 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: parity-skill-creator
|
|
3
|
+
description: "Author a new Lisa skill end-to-end — scaffold the SKILL.md frontmatter (name/description/allowed-tools), write the pass-through command, follow hyphen naming, place files under plugins/src/base, and rebuild plugins. Lisa-native reimplementation of the upstream skill-creator plugin. NO drift pin: upstream publishes no semver, so it is not drift-trackable."
|
|
4
|
+
allowed-tools: ["Read", "Edit", "Write", "Bash"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill Creator
|
|
8
|
+
|
|
9
|
+
Author a new, working Lisa skill (and its pass-through command) from a one-line
|
|
10
|
+
description. This is the Lisa-native equivalent of the upstream
|
|
11
|
+
`skill-creator@claude-plugins-official` plugin, reimplemented from scratch
|
|
12
|
+
against Lisa's conventions so the same capability is available to the Codex,
|
|
13
|
+
agy, and Copilot runtimes (Cursor reads `.claude-plugin/` natively).
|
|
14
|
+
|
|
15
|
+
## Not drift-trackable
|
|
16
|
+
|
|
17
|
+
This skill intentionally carries **no `synced-from` pin**. The upstream
|
|
18
|
+
`skill-creator` plugin publishes **no semver** (its cache version resolves to
|
|
19
|
+
`unknown`), so a `@unknown` pin would be unparseable and meaningless to
|
|
20
|
+
`scripts/plugin-parity-drift.mjs`. **Drift is tracked manually** — re-review the
|
|
21
|
+
upstream plugin by hand whenever the curated plugin set is refreshed. Do **not**
|
|
22
|
+
add a `synced-from` line to skills generated by this skill unless they
|
|
23
|
+
reimplement a semver-versioned upstream plugin.
|
|
24
|
+
|
|
25
|
+
## When to use
|
|
26
|
+
|
|
27
|
+
- A reusable workflow, checklist, or piece of domain knowledge keeps recurring
|
|
28
|
+
and deserves a named, invokable skill.
|
|
29
|
+
- You are reimplementing an upstream third-party plugin command/skill for
|
|
30
|
+
cross-agent parity (see `analyze-plugin` / `implement-plugin-parity`).
|
|
31
|
+
- The user asks to "create a skill", "add a command", or "scaffold a skill".
|
|
32
|
+
|
|
33
|
+
If the knowledge is narrow or one-off, prefer a rule in `.claude/rules/` instead
|
|
34
|
+
— skills are for broad, repeatable capabilities. When unsure whether content
|
|
35
|
+
warrants a skill, run it past the `skill-evaluator` agent first.
|
|
36
|
+
|
|
37
|
+
## Where skills live
|
|
38
|
+
|
|
39
|
+
Lisa skills are **build output** for downstream projects. The source of truth is
|
|
40
|
+
`plugins/src/`, never the generated `plugins/lisa*` artifacts:
|
|
41
|
+
|
|
42
|
+
| Source directory | Builds artifact | Use for |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| `plugins/src/base/` | `plugins/lisa` | Skills that ship to **every** stack |
|
|
45
|
+
| `plugins/src/<stack>/` | `plugins/lisa-<stack>` | Stack-specific (typescript, expo, nestjs, cdk, harper-fabric, rails) |
|
|
46
|
+
|
|
47
|
+
Lisa-repo-only skills (parity tooling, wiki ingestion, `lisa-*` meta-skills) live
|
|
48
|
+
at the **root** `.claude/skills/` and `.claude/commands/`, NOT under
|
|
49
|
+
`plugins/src` — they are not relevant to downstream projects. Decide placement
|
|
50
|
+
first:
|
|
51
|
+
|
|
52
|
+
- Ships to downstream projects → `plugins/src/base/skills/<name>/SKILL.md`
|
|
53
|
+
- Only meaningful inside the Lisa monorepo → `.claude/skills/<name>/SKILL.md`
|
|
54
|
+
|
|
55
|
+
## Naming
|
|
56
|
+
|
|
57
|
+
- Use **hyphen-separated** names: `git-commit`, `tracker-write`,
|
|
58
|
+
`parity-sentry-seer`. No spaces, no camelCase, no underscores.
|
|
59
|
+
- The directory name, the frontmatter `name`, and the command filename must all
|
|
60
|
+
match exactly.
|
|
61
|
+
- Commands map to colon-separated UI names via directory nesting:
|
|
62
|
+
`commands/git/commit.md` → `/lisa:git:commit`; a flat
|
|
63
|
+
`commands/plan.md` → `/lisa:plan`.
|
|
64
|
+
|
|
65
|
+
## SKILL.md frontmatter
|
|
66
|
+
|
|
67
|
+
Skills support **only** these frontmatter keys (they do **not** support
|
|
68
|
+
`argument-hint` or `$ARGUMENTS` substitution — those belong on the command):
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
---
|
|
72
|
+
name: my-skill # required — matches the directory name
|
|
73
|
+
description: "One or two sentences." # required — when to use + what it does
|
|
74
|
+
allowed-tools: ["Read", "Edit", "Write", "Bash"] # optional — least privilege
|
|
75
|
+
synced-from: <plugin>@<marketplace>@<version> # ONLY for semver upstream reimplementations
|
|
76
|
+
---
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
- **`name`** — the hyphen identifier, byte-identical to the directory.
|
|
80
|
+
- **`description`** — write it so the model knows *when* to reach for the skill,
|
|
81
|
+
not just what it does. Lead with the trigger. This is the single most
|
|
82
|
+
important field for discoverability.
|
|
83
|
+
- **`allowed-tools`** — grant the minimum set. A read-only review skill needs no
|
|
84
|
+
`Write`/`Edit`. Omit the key entirely to inherit the caller's tools.
|
|
85
|
+
- **`synced-from`** — add **only** when the skill reimplements an upstream plugin
|
|
86
|
+
that publishes a real semver. Grammar: `name@marketplace@version`
|
|
87
|
+
(e.g. `sentry@claude-plugins-official@1.0.0`). Omit for upstreams with no
|
|
88
|
+
semver (note that in the body instead, as this skill does).
|
|
89
|
+
|
|
90
|
+
## The command pass-through pattern
|
|
91
|
+
|
|
92
|
+
Every skill should have a thin command that is the user-facing entry point.
|
|
93
|
+
Commands support `description`, `argument-hint`, and `$ARGUMENTS`; they delegate
|
|
94
|
+
straight to the skill:
|
|
95
|
+
|
|
96
|
+
```markdown
|
|
97
|
+
---
|
|
98
|
+
description: "Same human-facing summary as the skill, phrased for the picker."
|
|
99
|
+
argument-hint: "<what the user should type after the command>"
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
Use the /lisa:my-skill skill to <do the thing>. $ARGUMENTS
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The command carries the `argument-hint` and forwards `$ARGUMENTS`; the SKILL.md
|
|
106
|
+
carries the actual logic. Keep the two descriptions consistent.
|
|
107
|
+
|
|
108
|
+
## Scaffolding walkthrough
|
|
109
|
+
|
|
110
|
+
1. **Decide placement** — downstream (`plugins/src/base`) vs. Lisa-only
|
|
111
|
+
(`.claude`). For base, both a skill and a command directory entry are needed.
|
|
112
|
+
2. **Pick the name** — hyphenated, unique. Check it does not collide:
|
|
113
|
+
`ls plugins/src/base/skills/` and `ls plugins/src/base/commands/`.
|
|
114
|
+
3. **Create the skill** at
|
|
115
|
+
`plugins/src/base/skills/<name>/SKILL.md` with the frontmatter above and a
|
|
116
|
+
body that follows house style — see `plugins/src/base/skills/quality-review/SKILL.md`
|
|
117
|
+
for the canonical shape (title, "When to use", numbered checklist/steps,
|
|
118
|
+
explicit "Rules"/"Output" sections). Write real, actionable guidance, not
|
|
119
|
+
TODOs.
|
|
120
|
+
4. **Create the command** at `plugins/src/base/commands/<name>.md` (or a nested
|
|
121
|
+
`commands/<namespace>/<name>.md` for a colon-namespaced command) using the
|
|
122
|
+
pass-through template.
|
|
123
|
+
5. **Rebuild the artifacts** so the generated plugins match source:
|
|
124
|
+
```bash
|
|
125
|
+
bun run build:plugins
|
|
126
|
+
```
|
|
127
|
+
Then commit **both** `plugins/src/...` and the regenerated `plugins/lisa*`.
|
|
128
|
+
The `🧩 Plugins Sync` CI check (and `bun run check:plugins` locally) fails if
|
|
129
|
+
artifacts drift from source — never hand-edit `plugins/lisa*`.
|
|
130
|
+
6. **Verify discoverability** — confirm the skill appears in the skill list and
|
|
131
|
+
the command resolves to `/lisa:<name>`.
|
|
132
|
+
|
|
133
|
+
## Body house style
|
|
134
|
+
|
|
135
|
+
- Open with an `#` H1 title in Title Case.
|
|
136
|
+
- Add a `## When to use` section that names the triggers.
|
|
137
|
+
- Use numbered steps for procedures, checklists for review-style skills.
|
|
138
|
+
- End with an explicit `## Rules` (hard constraints) and/or `## Output` section.
|
|
139
|
+
- Write in plain, imperative English. Prefer concrete examples over abstraction.
|
|
140
|
+
- Reference sibling skills by their hyphen name (e.g. "delegate to `git-commit`").
|
|
141
|
+
|
|
142
|
+
## Rules
|
|
143
|
+
|
|
144
|
+
- Never edit `plugins/lisa*` directly — edit `plugins/src/` and rebuild.
|
|
145
|
+
- Skill frontmatter must not contain `argument-hint` or `$ARGUMENTS`.
|
|
146
|
+
- The directory name, `name` field, and command filename must match exactly.
|
|
147
|
+
- Add `synced-from` **only** for semver-versioned upstream reimplementations.
|
|
148
|
+
- Do not include `/coding-philosophy` in task `skills` metadata — it auto-loads.
|
|
149
|
+
- One skill, one responsibility. If a skill grows two jobs, split it.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.128.0",
|
|
4
4
|
"description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
{
|
|
14
14
|
"type": "command",
|
|
15
15
|
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/block-no-verify.sh"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "command",
|
|
19
|
+
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/parity-safety-net.sh"
|
|
16
20
|
}
|
|
17
21
|
]
|
|
18
22
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Lisa-native code review of the current git diff — correctness bugs, security issues, and obvious defects, reported as severity-ranked findings with file:line references. Vendor-neutral cross-agent equivalent of the upstream code-review command."
|
|
3
|
+
argument-hint: "[optional: path or scope hint]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-code-review skill to review the current branch and working-tree diff for correctness bugs, security issues, and obvious defects, and report findings ranked by severity with file:line references. $ARGUMENTS
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Behavior-preserving simplification of recently-changed code — dedup, reuse, readability, and dead-code removal, quality only (never a bug hunt). Vendor-neutral cross-agent equivalent of the upstream code-simplifier agent."
|
|
3
|
+
argument-hint: "[optional: path or scope hint]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-code-simplifier skill to simplify the recently-changed code — removing duplication and dead code, reusing existing utilities, and improving readability — without altering behavior, then verify tests still pass. $ARGUMENTS
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Thorough PR-style review of the full diff — bugs, security, performance, and maintainability — with concrete fixes and a structured summary. An independent Lisa-native review (does NOT call CodeRabbit's service); vendor-neutral cross-agent equivalent of the upstream coderabbit plugin."
|
|
3
|
+
argument-hint: "[optional: PR number, path, or scope hint]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-coderabbit skill to run a thorough PR-style review of the full diff — flagging bugs, security, performance, and maintainability issues with concrete suggested fixes — and produce a structured summary with a verdict. $ARGUMENTS
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "View, set, and verify the custom guard rules enforced by Lisa's safety-net PreToolUse Bash hook — the cross-agent equivalent of the upstream safety-net plugin's set/verify-custom-rules skills."
|
|
3
|
+
argument-hint: "[view | set <regex> | verify]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-safety-net-rules skill to view, set, or verify the project-local custom guard rules enforced by Lisa's safety-net Bash hook (`parity-safety-net.sh`). $ARGUMENTS
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Install and configure the Sentry SDK for a project — detect the framework, add the right @sentry/<framework> package, init the client, wire the DSN via env, enable error + performance monitoring, and set up source maps. One consolidated skill covering react, nextjs, node, nestjs, python, react-native, and more."
|
|
3
|
+
argument-hint: "[framework override, e.g. nextjs | node | python] (auto-detected if omitted)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-sentry-sdk-setup skill to detect the framework and install + configure the correct Sentry SDK with error and performance monitoring and source maps. $ARGUMENTS
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "AI debugging — given an error, stack trace, or failing test, analyze it, form ranked hypotheses, locate the root cause in the codebase with file:line evidence, and propose a minimal fix. Lisa-native reimplementation of Sentry's seer workflow."
|
|
3
|
+
argument-hint: "<error message | stack trace | failing test | Sentry issue URL>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-sentry-seer skill to root-cause the failure and propose an evidence-backed fix. $ARGUMENTS
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Author a new Lisa skill end-to-end — scaffold the SKILL.md frontmatter, write the pass-through command, follow hyphen naming and placement under plugins/src, and rebuild plugins. Lisa-native equivalent of the upstream skill-creator plugin."
|
|
3
|
+
argument-hint: "<skill-name and a one-line description of what it should do>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-skill-creator skill to scaffold a new Lisa skill and its pass-through command, following frontmatter, naming, placement, and build conventions. $ARGUMENTS
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# PreToolUse hook for Bash: a safety net that blocks destructive shell commands
|
|
3
|
+
# before they run. Lisa-native reimplementation of the upstream
|
|
4
|
+
# `safety-net@cc-marketplace` plugin's PreToolUse Bash-guard (parity work, issue
|
|
5
|
+
# #1059). It does NOT port upstream code — it re-expresses the behavior in Lisa's
|
|
6
|
+
# hook conventions, modeled on block-no-verify.sh.
|
|
7
|
+
#
|
|
8
|
+
# It reads the hook stdin JSON, inspects the proposed Bash command, and EXITS
|
|
9
|
+
# NON-ZERO (2) to BLOCK when a known-destructive pattern matches:
|
|
10
|
+
# - `rm -rf /` (recursive forced delete of a root / home / wildcard path)
|
|
11
|
+
# - force-pushing a protected branch (main/master/production/release)
|
|
12
|
+
# - `git reset --hard` while the working tree is dirty (would discard work)
|
|
13
|
+
# - dropping or truncating a database/schema/table
|
|
14
|
+
# Otherwise it exits 0 and the command proceeds.
|
|
15
|
+
#
|
|
16
|
+
# Operators extend the built-in rules with a project-local rule file — one
|
|
17
|
+
# extended-regex (ERE) per line, blank lines and `#` comments ignored — managed
|
|
18
|
+
# by the parity-safety-net-rules skill. Default location (overridable via
|
|
19
|
+
# SAFETY_NET_RULES_FILE):
|
|
20
|
+
# ${CLAUDE_PROJECT_DIR:-$PWD}/.claude/safety-net-rules.txt
|
|
21
|
+
set -euo pipefail
|
|
22
|
+
|
|
23
|
+
input="$(cat)"
|
|
24
|
+
|
|
25
|
+
tool_name="$(printf '%s' "$input" | jq -r '.tool_name // empty')"
|
|
26
|
+
if [ "$tool_name" != "Bash" ]; then
|
|
27
|
+
exit 0
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
command_str="$(printf '%s' "$input" | jq -r '.tool_input.command // empty')"
|
|
31
|
+
if [ -z "$command_str" ]; then
|
|
32
|
+
exit 0
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# block() prints the reason to stderr (surfaced to the model) and exits 2 so the
|
|
36
|
+
# Bash tool call is denied. $1 = human-readable reason for the block.
|
|
37
|
+
block() {
|
|
38
|
+
cat >&2 <<EOF
|
|
39
|
+
Blocked by safety-net: $1
|
|
40
|
+
|
|
41
|
+
This command matched a destructive-operation guard. If it is genuinely safe and
|
|
42
|
+
intentional, ask the user to confirm, then run it manually outside the agent, or
|
|
43
|
+
narrow the command so it no longer matches the guard.
|
|
44
|
+
EOF
|
|
45
|
+
exit 2
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
# 1. Recursive forced delete (`rm -rf`) of a filesystem root, home, or top-level
|
|
49
|
+
# wildcard. Two gates ANDed: the command must invoke `rm` with BOTH a
|
|
50
|
+
# recursive and a force flag, AND name a catastrophic target. Splitting the
|
|
51
|
+
# flag check from the target check keeps each regex legible and testable.
|
|
52
|
+
if printf '%s' "$command_str" \
|
|
53
|
+
| grep -Eiq '(^|[^[:alnum:]_./-])rm([[:space:]]+-[[:alnum:]-]+)*[[:space:]]+(-[[:alnum:]]*r[[:alnum:]]*f|-[[:alnum:]]*f[[:alnum:]]*r)([[:space:]]|$)' \
|
|
54
|
+
|| printf '%s' "$command_str" \
|
|
55
|
+
| grep -Eiq '(^|[^[:alnum:]_./-])rm[[:space:]].*(-r\b.*[[:space:]]-f\b|-f\b.*[[:space:]]-r\b|--recursive\b.*--force\b|--force\b.*--recursive\b)'; then
|
|
56
|
+
if printf '%s' "$command_str" \
|
|
57
|
+
| grep -Eq '([[:space:]]|=)(/|/\*|/\.\*?|~|~/\*?|\$HOME\b|\$\{HOME\}|\*)([[:space:]]|/?\*?$)'; then
|
|
58
|
+
block "recursive forced delete of a root, home, or wildcard path (rm -rf)"
|
|
59
|
+
fi
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
# 2. Force-pushing a protected branch. `--force-with-lease` is the safe,
|
|
63
|
+
# non-clobbering alternative and is intentionally NOT blocked.
|
|
64
|
+
if printf '%s' "$command_str" | grep -Eiq '(^|[^[:alnum:]_-])git[[:space:]]+push\b'; then
|
|
65
|
+
if printf '%s' "$command_str" | grep -Eiq '(--force([[:space:]]|=|$)|[[:space:]]-f([[:space:]]|$))' \
|
|
66
|
+
&& ! printf '%s' "$command_str" | grep -Eiq -- '--force-with-lease'; then
|
|
67
|
+
if printf '%s' "$command_str" | grep -Eiq '(^|[^[:alnum:]_/-])(main|master|production|prod|release)([^[:alnum:]_/-]|$)'; then
|
|
68
|
+
block "force-pushing a protected branch (use --force-with-lease, or push a feature branch)"
|
|
69
|
+
fi
|
|
70
|
+
fi
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# 3. `git reset --hard` while the working tree has uncommitted changes — this
|
|
74
|
+
# silently discards them. Only blocks when the tree is actually dirty, so a
|
|
75
|
+
# clean-tree reset (a legitimate workflow) still passes.
|
|
76
|
+
if printf '%s' "$command_str" | grep -Eiq '(^|[^[:alnum:]_-])git[[:space:]]+reset\b.*--hard\b'; then
|
|
77
|
+
if git rev-parse --is-inside-work-tree >/dev/null 2>&1 \
|
|
78
|
+
&& [ -n "$(git status --porcelain 2>/dev/null)" ]; then
|
|
79
|
+
block "git reset --hard on a dirty working tree would discard uncommitted changes (stash or commit first)"
|
|
80
|
+
fi
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
# 4. Dropping or truncating a database / schema / table.
|
|
84
|
+
if printf '%s' "$command_str" \
|
|
85
|
+
| grep -Eiq '\b(drop[[:space:]]+(database|schema|table)|truncate[[:space:]]+(table[[:space:]]+)?[[:alnum:]_."`]+)\b'; then
|
|
86
|
+
block "destructive SQL (DROP/TRUNCATE) detected"
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
# 5. Project-local custom rules. Each non-comment line is an ERE; a match blocks.
|
|
90
|
+
rules_file="${SAFETY_NET_RULES_FILE:-${CLAUDE_PROJECT_DIR:-$PWD}/.claude/safety-net-rules.txt}"
|
|
91
|
+
if [ -f "$rules_file" ]; then
|
|
92
|
+
while IFS= read -r rule || [ -n "$rule" ]; do
|
|
93
|
+
case "$rule" in
|
|
94
|
+
'' | '#'*) continue ;;
|
|
95
|
+
esac
|
|
96
|
+
if printf '%s' "$command_str" | grep -Eiq -- "$rule"; then
|
|
97
|
+
block "matched a project custom safety rule (${rules_file##*/}): $rule"
|
|
98
|
+
fi
|
|
99
|
+
done <"$rules_file"
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
exit 0
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: parity-code-review
|
|
3
|
+
description: "Lisa-native code review of the current git diff. Walks every changed hunk and reports correctness bugs, security issues, and obvious defects as severity-ranked findings with file:line references. Vendor-neutral — the cross-agent equivalent of the upstream code-review command, runnable on Codex, agy, Copilot, Cursor, and Claude."
|
|
4
|
+
allowed-tools: ["Read", "Bash", "Grep", "Glob"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Parity Code Review
|
|
8
|
+
|
|
9
|
+
Review the code that is *about to ship* — the current uncommitted/branch diff — for defects a reviewer would block on. This is a focused **defect hunt**: correctness, security, and obvious mistakes. It is not a style audit and not a refactor pass (use `parity-code-simplifier` for quality-only cleanup).
|
|
10
|
+
|
|
11
|
+
> **Not drift-trackable.** This skill intentionally carries **no `synced-from` pin**. The upstream `code-review@claude-plugins-official` plugin publishes **no semver** (its cache version resolves to `unknown`), so a pin would be unparseable and meaningless to `scripts/plugin-parity-drift.mjs`. Drift is tracked **manually** — re-review the upstream command by hand when the curated plugin set is refreshed. This is a Lisa-native reimplementation, **not** a port of upstream code.
|
|
12
|
+
|
|
13
|
+
## Step 1: Establish the diff
|
|
14
|
+
|
|
15
|
+
Determine exactly what changed. Prefer the broadest accurate view of the work-in-progress:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Branch changes vs the merge base (preferred for a PR-style review)
|
|
19
|
+
git merge-base HEAD origin/main 2>/dev/null && \
|
|
20
|
+
git diff "$(git merge-base HEAD origin/main)"...HEAD
|
|
21
|
+
|
|
22
|
+
# Plus anything still uncommitted in the working tree
|
|
23
|
+
git diff HEAD
|
|
24
|
+
git status --short
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
If there is no diff at all, say so plainly and stop — do not invent findings. If the diff is enormous, review in full but prioritize the files with the most logic changes; never silently skip files (note any you deprioritized).
|
|
28
|
+
|
|
29
|
+
## Step 2: Read for real context
|
|
30
|
+
|
|
31
|
+
Do **not** review hunks in isolation. For each changed file, open enough surrounding code to understand:
|
|
32
|
+
|
|
33
|
+
- What the function/module is supposed to do and who calls it.
|
|
34
|
+
- Invariants and preconditions the change might violate.
|
|
35
|
+
- Error/edge paths touched by the change.
|
|
36
|
+
|
|
37
|
+
Use `Read`, `Grep`, and `Glob` to follow call sites and trace data flow. A finding you can't ground in the actual code is a guess — drop it.
|
|
38
|
+
|
|
39
|
+
## Step 3: Hunt for defects
|
|
40
|
+
|
|
41
|
+
For every changed hunk, evaluate against these lenses:
|
|
42
|
+
|
|
43
|
+
1. **Correctness** — Off-by-one errors, inverted conditions, wrong operator, missing `await`, unhandled `null`/`undefined`, incorrect default, broken control flow, type coercion bugs, mutation of shared state, race conditions.
|
|
44
|
+
2. **Security** — Unsanitized input at trust boundaries; injection (SQL/shell/template); secrets, tokens, or keys committed or logged; missing authn/authz on new endpoints; unsafe deserialization; path traversal; overly broad permissions; SSRF.
|
|
45
|
+
3. **Edge cases & failure modes** — Empty collections, zero, negative numbers, very large input, concurrent calls, partial failures, timeouts, retries that aren't idempotent.
|
|
46
|
+
4. **Obvious defects** — Dead code paths, unreachable branches, swallowed errors, resource leaks (unclosed handles/connections), `TODO`/`FIXME` left in shipping code, debug logging left on, broken or missing tests for the new behavior.
|
|
47
|
+
5. **Contract & API** — Breaking changes to public signatures, changed return shapes, altered error semantics callers depend on.
|
|
48
|
+
|
|
49
|
+
## Step 4: Output — severity-ranked findings
|
|
50
|
+
|
|
51
|
+
Group findings by severity. Within each group, list the most impactful first. Every finding **must** carry a `file:line` reference.
|
|
52
|
+
|
|
53
|
+
### Critical (must fix before merge)
|
|
54
|
+
Bugs that break correctness, leak/expose data, or introduce a security hole.
|
|
55
|
+
|
|
56
|
+
### Warning (should fix)
|
|
57
|
+
Likely to cause problems later, or a real defect with limited blast radius.
|
|
58
|
+
|
|
59
|
+
### Suggestion (nice to have)
|
|
60
|
+
Minor correctness nits or defensive improvements.
|
|
61
|
+
|
|
62
|
+
### Finding format
|
|
63
|
+
|
|
64
|
+
For each finding:
|
|
65
|
+
|
|
66
|
+
- **What** — precise description of the defect.
|
|
67
|
+
- **Where** — `path/to/file.ts:42` (and a span if it covers multiple lines).
|
|
68
|
+
- **Why** — the concrete failure it causes, with an example input or sequence that triggers it.
|
|
69
|
+
- **Fix** — a specific, actionable suggestion (or a short code sketch).
|
|
70
|
+
|
|
71
|
+
Example:
|
|
72
|
+
|
|
73
|
+
> **Critical — Unhandled null dereference**
|
|
74
|
+
> **Where:** `src/auth/session.ts:88`
|
|
75
|
+
> **Why:** `findUser()` returns `null` when the id is unknown, but line 88 reads `user.roles` directly. An unknown session id (expired token replay) throws and 500s instead of returning 401.
|
|
76
|
+
> **Fix:** Guard `if (!user) return unauthorized()` before reading `user.roles`.
|
|
77
|
+
|
|
78
|
+
## Rules
|
|
79
|
+
|
|
80
|
+
- **Ground every finding in the diff.** No speculative findings, no generic best-practice lectures unrelated to the change.
|
|
81
|
+
- **Be honest about coverage.** If you deprioritized files or couldn't fully trace a path, say so.
|
|
82
|
+
- **If the diff is clean, say so clearly** — "No blocking issues found across N changed files" — do not manufacture problems.
|
|
83
|
+
- This is review-only: report findings, do **not** edit files. Apply fixes via the normal implementation flow or `parity-code-simplifier` (quality) after triage.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: parity-code-simplifier
|
|
3
|
+
description: "Lisa-native, behavior-preserving simplification of recently-changed code. Removes duplication and dead code, reuses existing utilities, and improves readability without altering behavior — quality only, never a bug hunt. Vendor-neutral cross-agent equivalent of the upstream code-simplifier agent, runnable on Codex, agy, Copilot, Cursor, and Claude."
|
|
4
|
+
allowed-tools: ["Read", "Bash", "Grep", "Glob", "Edit", "Write"]
|
|
5
|
+
synced-from: code-simplifier@claude-plugins-official@1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Parity Code Simplifier
|
|
9
|
+
|
|
10
|
+
Make the **recently-changed** code simpler and easier to maintain **without changing what it does**. This is a quality pass: deduplication, reuse, readability, and dead-code removal. It is explicitly **not** a bug hunt — if you spot a likely defect, note it for a reviewer (or `parity-code-review`) and leave the behavior intact.
|
|
11
|
+
|
|
12
|
+
> **Drift tracking.** Pinned to `code-simplifier@claude-plugins-official@1.0.0`. `scripts/plugin-parity-drift.mjs` compares this pin against the upstream version in the plugin cache and flags staleness. This is a Lisa-native reimplementation written from scratch — **do not port or copy upstream plugin code.**
|
|
13
|
+
|
|
14
|
+
## Scope: recently-changed code only
|
|
15
|
+
|
|
16
|
+
Default to the current diff, not the whole repository. Establish scope first:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
git merge-base HEAD origin/main 2>/dev/null && \
|
|
20
|
+
git diff --stat "$(git merge-base HEAD origin/main)"...HEAD
|
|
21
|
+
git diff HEAD --stat
|
|
22
|
+
git status --short
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Simplify the files that changed and the immediate code they touch. Do not embark on a repo-wide refactor unless explicitly asked.
|
|
26
|
+
|
|
27
|
+
## The prime directive: preserve behavior
|
|
28
|
+
|
|
29
|
+
Every edit must be behavior-preserving. Before changing anything, understand the current contract — inputs, outputs, side effects, error paths, public signatures. After changing it, the observable behavior must be identical. When in doubt, **don't** — leave a note instead of risking a semantic change.
|
|
30
|
+
|
|
31
|
+
## What to simplify
|
|
32
|
+
|
|
33
|
+
1. **Duplication (DRY)** — Collapse copy-pasted blocks into a single function or shared helper. Prefer delegating to an existing canonical implementation over re-deriving logic (see the repo's DRY rule: a function that reproduces a sequence should call the shared generator, not reimplement it).
|
|
34
|
+
2. **Reuse over reinvention** — Search for existing utilities (`Grep`/`Glob`) before introducing new code. If the project already has a helper for what the change hand-rolls, use it.
|
|
35
|
+
3. **Readability** — Clearer names; flatten needless nesting with early returns/guard clauses; replace clever one-liners with obvious code; split overly long functions along natural seams.
|
|
36
|
+
4. **Dead code** — Remove unreachable branches, unused variables/imports/exports, and commented-out blocks introduced or exposed by the change.
|
|
37
|
+
5. **Idiomatic constructs** — Prefer immutable transformations (`map`/`filter`/`reduce`) over mutable accumulation where it's clearer; remove redundant intermediate state.
|
|
38
|
+
|
|
39
|
+
## Respect project conventions
|
|
40
|
+
|
|
41
|
+
This repo enforces specific patterns — honor them so your simplification doesn't trip the linter or hooks:
|
|
42
|
+
|
|
43
|
+
- **Immutability / functional style** — avoid `let` and in-place mutation; prefer `const` and pure transformations.
|
|
44
|
+
- **Statement order** — do not place expression-statement helper calls before `const` definitions; inline validation as `if` guard clauses (exempt from `enforce-statement-order`).
|
|
45
|
+
- **eslint-disable directives** must include a `-- description`.
|
|
46
|
+
- **Barrel-export constraint** — if you delete a file referenced by an `index.ts`, update the barrel in the same change so lint/typecheck stays green.
|
|
47
|
+
- **Never edit generated plugin artifacts** (`plugins/lisa`, `plugins/lisa-*`); the source of truth is `plugins/src/`.
|
|
48
|
+
|
|
49
|
+
## Workflow
|
|
50
|
+
|
|
51
|
+
1. Read each changed file and enough of its callers to know the contract.
|
|
52
|
+
2. Identify simplification opportunities; rank by value-to-risk. Skip anything that risks behavior.
|
|
53
|
+
3. Apply edits with `Edit`/`Write`, one coherent change at a time.
|
|
54
|
+
4. **Verify behavior is unchanged** — run the project's checks:
|
|
55
|
+
```bash
|
|
56
|
+
bun run test
|
|
57
|
+
bun run typecheck 2>/dev/null || true
|
|
58
|
+
bun run lint 2>/dev/null || true
|
|
59
|
+
```
|
|
60
|
+
If any check fails, fix or revert the offending edit before continuing. Never leave the tree worse than you found it.
|
|
61
|
+
|
|
62
|
+
## Output
|
|
63
|
+
|
|
64
|
+
Summarize what you changed and why, grouped by file with `file:line` anchors:
|
|
65
|
+
|
|
66
|
+
- **Simplified** — the edits applied (dedup / reuse / readability / dead-code), each with a one-line rationale.
|
|
67
|
+
- **Left alone** — opportunities you deliberately skipped because they risked behavior, with the reason.
|
|
68
|
+
- **Flagged for review** — any suspected bugs noticed in passing (not fixed here — quality pass only).
|
|
69
|
+
- **Verification** — which checks you ran and that they pass.
|
|
70
|
+
|
|
71
|
+
## Rules
|
|
72
|
+
|
|
73
|
+
- **Behavior-preserving only.** No bug fixes, no feature changes, no API changes disguised as cleanup.
|
|
74
|
+
- **Quality only** — if the only "simplification" would change behavior, don't make it.
|
|
75
|
+
- **Tests must stay green.** A simplification that breaks a test is a behavior change — revert it.
|
|
76
|
+
- If there is nothing worth simplifying, say so clearly rather than churning the code.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: parity-coderabbit
|
|
3
|
+
description: "Thorough PR-style review of the full diff — bugs, security, performance, and maintainability — with concrete suggested fixes and a structured summary. An independent Lisa-native review skill that does NOT call CodeRabbit's service or port its code. Vendor-neutral cross-agent equivalent of the upstream coderabbit plugin, runnable on Codex, agy, Copilot, Cursor, and Claude."
|
|
4
|
+
allowed-tools: ["Read", "Bash", "Grep", "Glob"]
|
|
5
|
+
synced-from: coderabbit@claude-plugins-official@1.1.1
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Parity CodeRabbit
|
|
9
|
+
|
|
10
|
+
A comprehensive, PR-grade code review of the **entire diff** — the kind of pass a senior reviewer (or an automated reviewer like CodeRabbit) gives before approving. Where `parity-code-review` is a tight defect hunt, this skill is **broad and thorough**: it covers bugs, security, performance, *and* maintainability, suggests concrete fixes, and ends with a reviewer-style summary and verdict.
|
|
11
|
+
|
|
12
|
+
> **Independent reimplementation.** This skill is **not** a wrapper around CodeRabbit's hosted service and does **not** port or invoke CodeRabbit's code. It is a Lisa-native review that produces a comparable artifact using only the model and local tooling. No network calls to any review SaaS are made.
|
|
13
|
+
>
|
|
14
|
+
> **Drift tracking.** Pinned to `coderabbit@claude-plugins-official@1.1.1`. `scripts/plugin-parity-drift.mjs` compares this pin against the upstream version in the plugin cache and flags staleness. Reimplemented from scratch — **do not port or copy upstream plugin code.**
|
|
15
|
+
|
|
16
|
+
## Step 1: Assemble the full review surface
|
|
17
|
+
|
|
18
|
+
Gather the complete change set the way a PR review would see it:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# Full branch diff vs merge base
|
|
22
|
+
BASE="$(git merge-base HEAD origin/main 2>/dev/null)"
|
|
23
|
+
git diff "$BASE"...HEAD
|
|
24
|
+
git diff "$BASE"...HEAD --stat # file-by-file overview
|
|
25
|
+
git log "$BASE"..HEAD --oneline # commit narrative
|
|
26
|
+
git diff HEAD # uncommitted work
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Read the commit messages and (if available) the PR/ticket description to understand **intent** — a review judges the change against what it was meant to do, not just what it does.
|
|
30
|
+
|
|
31
|
+
## Step 2: Build context per file
|
|
32
|
+
|
|
33
|
+
For each changed file, `Read` the surrounding code and use `Grep`/`Glob` to follow callers, dependents, and tests. Note the change's blast radius: public API, shared modules, migrations, config, and anything downstream consumers rely on.
|
|
34
|
+
|
|
35
|
+
## Step 3: Review across all dimensions
|
|
36
|
+
|
|
37
|
+
Walk every meaningful hunk and evaluate each dimension. A finding in any dimension is fair game.
|
|
38
|
+
|
|
39
|
+
1. **Correctness / bugs** — Logic errors, off-by-one, inverted conditions, missing `await`, null/undefined handling, type coercion, broken control flow, incorrect defaults, mutation of shared state, race conditions, broken or missing tests for new behavior.
|
|
40
|
+
2. **Security** — Injection (SQL/shell/template), unsanitized boundary input, secrets/keys/tokens in code or logs, missing or broken authn/authz, unsafe deserialization, path traversal, SSRF, overly broad permissions, dependency vulnerabilities introduced by the change.
|
|
41
|
+
3. **Performance** — N+1 queries, work inside hot loops, unnecessary allocations or re-renders, missing indexes, blocking I/O on hot paths, unbounded growth, accidental O(n²), redundant network/database round-trips, large bundle additions.
|
|
42
|
+
4. **Maintainability** — Duplication, dead code, unclear naming, overly long/complex functions, missing or misleading docs, leaky abstractions, inconsistent patterns, hidden coupling, magic numbers, and violations of the project's conventions (immutability/functional style, statement order, barrel-export integrity, "never edit generated plugin artifacts").
|
|
43
|
+
5. **Test coverage** — Are the new branches and edge cases tested? Do tests assert behavior rather than implementation? Are failure paths covered?
|
|
44
|
+
|
|
45
|
+
## Step 4: Suggest concrete fixes
|
|
46
|
+
|
|
47
|
+
For each finding, give a **specific, actionable** fix — ideally a short code sketch or a `diff`-style suggestion, not vague advice. The reader should be able to act on it without re-deriving the problem.
|
|
48
|
+
|
|
49
|
+
## Step 5: Output — structured review
|
|
50
|
+
|
|
51
|
+
Produce a review document with these sections:
|
|
52
|
+
|
|
53
|
+
### Summary
|
|
54
|
+
2–4 sentences: what the change does, overall quality, and the headline risks. State a verdict: **Approve**, **Approve with nits**, or **Request changes**.
|
|
55
|
+
|
|
56
|
+
### Findings by severity
|
|
57
|
+
Group as **Critical → Major → Minor → Nit**. Every finding includes:
|
|
58
|
+
|
|
59
|
+
- **What** — the issue, and which dimension it falls under (bug / security / perf / maintainability / tests).
|
|
60
|
+
- **Where** — `path/to/file.ts:line`.
|
|
61
|
+
- **Why** — the concrete consequence, with a triggering example where relevant.
|
|
62
|
+
- **Fix** — a concrete suggestion or code snippet.
|
|
63
|
+
|
|
64
|
+
### Walkthrough (optional but encouraged)
|
|
65
|
+
A brief per-file note on what changed and any file-specific observations — the orientation a human reviewer leaves so the next reader understands the diff quickly.
|
|
66
|
+
|
|
67
|
+
### Strengths
|
|
68
|
+
Call out what's done well. A credible review is balanced, not only critical.
|
|
69
|
+
|
|
70
|
+
## Rules
|
|
71
|
+
|
|
72
|
+
- **Cover the whole diff.** If you deprioritize anything for size, say which files and why — never imply full coverage you didn't give.
|
|
73
|
+
- **Ground every finding in the code.** No generic checklists detached from the actual change; no speculative findings you can't point to.
|
|
74
|
+
- **Concrete fixes only.** "Consider improving error handling" is not a finding; "wrap the `fetch` in try/catch and return a 502 on network error at `api/proxy.ts:31`" is.
|
|
75
|
+
- **No external review service.** Use only local git/tooling and the model — this is an independent review, not a CodeRabbit proxy.
|
|
76
|
+
- **Review-only.** Report findings; do not edit files. Route fixes through the implementation flow, `parity-code-simplifier` (quality), or a follow-up.
|
|
77
|
+
- **If the diff is clean, approve it plainly** and say why — do not invent problems to look thorough.
|