@starlein/paperclip-plugin-company-wizard 0.3.22 → 0.3.24
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/CHANGELOG.md +566 -0
- package/CONTRIBUTING.md +90 -0
- package/README.md +3 -2
- package/dist/manifest.js +1 -1
- package/dist/manifest.js.map +1 -1
- package/dist/worker.js +53 -6
- package/dist/worker.js.map +2 -2
- package/package.json +4 -2
- package/templates/modules/pr-review/agents/code-reviewer/skills/code-review.md +16 -21
- package/templates/modules/pr-review/agents/qa/skills/qa-review.md +40 -19
- package/templates/modules/pr-review/agents/security-engineer/skills/pr-security-review.md +27 -0
- package/templates/modules/pr-review/docs/pr-conventions.md +32 -23
- package/templates/modules/pr-review/module.meta.json +4 -3
- package/templates/roles/code-reviewer/AGENTS.md +1 -1
- package/templates/roles/code-reviewer/HEARTBEAT.md +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starlein/paperclip-plugin-company-wizard",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AI-powered wizard to bootstrap paperclip agent companies from composable templates (for latest paperclip version)",
|
|
6
6
|
"repository": "https://github.com/starlein/paperclip-plugin-company-wizard",
|
|
@@ -28,7 +28,9 @@
|
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"dist/",
|
|
31
|
-
"templates/"
|
|
31
|
+
"templates/",
|
|
32
|
+
"CHANGELOG.md",
|
|
33
|
+
"CONTRIBUTING.md"
|
|
32
34
|
],
|
|
33
35
|
"paperclipPlugin": {
|
|
34
36
|
"manifest": "./dist/manifest.js",
|
|
@@ -1,30 +1,25 @@
|
|
|
1
|
-
# Skill: Code Review
|
|
1
|
+
# Skill: Code Review (advisory)
|
|
2
2
|
|
|
3
|
-
You
|
|
3
|
+
You provide an **advisory, non-binding** code review. You are *not a merge gate*: the merge is gated by executed verification — green CI, or QA running the tests (see `docs/pr-conventions.md`). Your value is a second pair of eyes on correctness, clarity, and simplicity that automated checks miss.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## What to look for
|
|
6
6
|
|
|
7
|
-
1. **Correctness** — Does the code do what
|
|
8
|
-
2. **
|
|
9
|
-
3. **
|
|
10
|
-
4. **
|
|
11
|
-
5. **
|
|
12
|
-
6. **Performance** — No obvious N+1 queries, unbounded loops, or unnecessary allocations. Flag only clear issues, not micro-optimizations.
|
|
13
|
-
7. **Test coverage** — Are new code paths tested? Are tests meaningful (test behavior, not implementation)?
|
|
7
|
+
1. **Correctness** — Does the code do what the PR claims? Are edge cases handled? Does the logic match the stated intent?
|
|
8
|
+
2. **Simplicity** — Is this the simplest solution that works? Could anything be removed without losing functionality?
|
|
9
|
+
3. **Clarity** — Naming, structure, comments. Will the next reader understand this?
|
|
10
|
+
4. **Security smells** — Obvious injection, exposed secrets, missing validation at boundaries. Defer deep security review to the Security Engineer when the change is security-relevant.
|
|
11
|
+
5. **Dead code** — Commented-out blocks, unused branches.
|
|
14
12
|
|
|
15
|
-
## How to
|
|
13
|
+
## How to comment
|
|
16
14
|
|
|
17
|
-
1. When
|
|
18
|
-
2.
|
|
19
|
-
|
|
20
|
-
- **changes_requested** with specific, actionable feedback if not
|
|
21
|
-
3. Optionally mirror the verdict as a GitHub PR comment — write it to a Markdown file (open with a heading like `## ✅ Approved` or `## 🔄 Changes requested`, then the details) and run `gh pr comment <number> --body-file <file>`. Never use inline `--body "..."`: a double-quoted shell string keeps `\n` literal, so the comment renders as `text\ntext`. See `docs/pr-conventions.md` → *Posting PR Bodies & Comments*.
|
|
15
|
+
1. When the PR has a review stage assigned to you, read the diff (check it out locally if useful).
|
|
16
|
+
2. Post your feedback as a GitHub PR comment via a Markdown file: open with a heading (`## 💬 Review notes`), then specific, actionable points, and run `gh pr comment <number> --body-file <file>`. Never inline `--body "..."` — `\n` stays literal in a double-quoted shell string. See `docs/pr-conventions.md` → *Posting PR Bodies & Comments*.
|
|
17
|
+
3. If you are a participant on an advisory review stage, record your notes there too — but understand it does not gate the merge.
|
|
22
18
|
|
|
23
19
|
## Rules
|
|
24
20
|
|
|
25
21
|
- Be constructive — suggest alternatives, don't just criticize.
|
|
26
|
-
- Focus on substance over style
|
|
27
|
-
- "Looks good" is not
|
|
28
|
-
-
|
|
29
|
-
- If
|
|
30
|
-
- Your review stage verdict is the governance signal. Do not block only because GitHub rejects formal review submission from the shared PR-author credential — GitHub-native approval is optional unless a distinct non-author reviewer credential is explicitly available.
|
|
22
|
+
- Focus on substance over style; auto-formatters handle style.
|
|
23
|
+
- "Looks good" is not useful feedback. Point at what you actually examined.
|
|
24
|
+
- Raise correctness or security concerns clearly so QA / the Security Engineer / the Engineer can act on them before merge.
|
|
25
|
+
- You do not gate the merge. If something must block, it belongs to QA (tests), the Security Engineer (security-relevant), or CI.
|
|
@@ -1,29 +1,50 @@
|
|
|
1
1
|
# Skill: QA Review
|
|
2
2
|
|
|
3
|
-
You review
|
|
3
|
+
You are the **substantive review gate** for pull requests. Review is by *doing*, not by reading: your verdict must rest on tests that actually ran. "Looks good" is not a review.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Two modes
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
**CI is configured (hard gate = CI):**
|
|
8
|
+
Your job is to ensure the tests *mean something*. Green CI on a change with no real coverage is worthless. Verify:
|
|
9
|
+
- New code paths and edge cases are covered by tests that CI runs.
|
|
10
|
+
- Tests assert behavior, not implementation.
|
|
11
|
+
- Regression risk is covered.
|
|
12
|
+
- The CI build job is green, not only the test job.
|
|
13
|
+
Record `approved` only when CI is green AND coverage is adequate. If coverage is inadequate, record `changes_requested` with the specific missing test cases — even if CI is green.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
**No CI configured (you are the gate):**
|
|
16
|
+
There is no machine arbiter, so you run it. Check out the branch, run the full test suite and the build locally, and paste the **real command output** into your stage-record verdict. A verdict without execution output is invalid.
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
Replace `<branch>` with the PR branch name and substitute your project's actual test and build commands:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
git fetch origin && git checkout <branch>
|
|
22
|
+
<the project's test command> # e.g. pnpm test, pytest, go test ./...
|
|
23
|
+
<the project's build command> # e.g. pnpm build
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Record `approved` only if the suite and build pass and coverage is adequate; otherwise `changes_requested` with the failing output and the gaps.
|
|
27
|
+
|
|
28
|
+
## Review checklist
|
|
29
|
+
|
|
30
|
+
1. **Test coverage** — new code paths and edge cases covered?
|
|
31
|
+
2. **Regression risk** — could this break existing behavior? Is the affected area covered?
|
|
32
|
+
3. **Error handling** — failure modes handled and tested?
|
|
33
|
+
4. **Boundary conditions** — empty/null/max/concurrent inputs respected?
|
|
34
|
+
5. **Data validation** — input validated at boundaries; API contracts enforced?
|
|
35
|
+
6. **Test quality** — tests assert behavior; readable and maintainable?
|
|
36
|
+
7. **Manual test plan** — for hard-to-automate changes, is a manual plan documented in the PR?
|
|
37
|
+
|
|
38
|
+
## How to record your verdict
|
|
39
|
+
|
|
40
|
+
1. You are the active participant of a `review` stage on the issue carrying the PR link.
|
|
41
|
+
2. Record on your stage: `approved` (with the evidence — commands + results) or `changes_requested` (with specific gaps and suggested test cases).
|
|
42
|
+
3. Optionally mirror the verdict as a GitHub PR comment via a Markdown file: open with a heading (`## ✅ Approved` / `## 🔄 Changes requested`), then details, and run `gh pr comment <number> --body-file <file>`. Never inline `--body "..."` — a double-quoted shell string keeps `\n` literal. See `docs/pr-conventions.md` → *Posting PR Bodies & Comments*.
|
|
23
43
|
|
|
24
44
|
## Rules
|
|
25
45
|
|
|
46
|
+
- A verdict that does not cite executed verification (CI green, or your pasted test/build output) is invalid.
|
|
26
47
|
- Be constructive — suggest specific test cases, don't just say "needs more tests".
|
|
27
|
-
- Flag untested critical paths as blockers
|
|
28
|
-
- Approve trivial changes (docs, comments, config) without
|
|
29
|
-
- If CI is missing or broken,
|
|
48
|
+
- Flag untested critical paths as blockers; untested non-critical paths as suggestions.
|
|
49
|
+
- Approve trivial changes (docs, comments, config) without ceremony.
|
|
50
|
+
- If CI is missing or broken, that is a blocker — tests that don't run don't count.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Skill: PR Security Review
|
|
2
|
+
|
|
3
|
+
You review a **specific PR's diff** for security-relevant changes. You are added as a `review` stage **only when the change touches** authentication, authorization, secrets, input boundaries, cryptography, dependencies, or infrastructure exposure — i.e. when it is security-relevant. (For broader threat modeling, see your `security-review` skill from the security-audit module, if present.)
|
|
4
|
+
|
|
5
|
+
Review is by *probing*, not by reading. Your verdict must state what you actually checked.
|
|
6
|
+
|
|
7
|
+
## What to probe
|
|
8
|
+
|
|
9
|
+
1. **Input boundaries** — Is all external input validated and encoded? Any injection surface (SQL, command, path, template)?
|
|
10
|
+
2. **AuthN/AuthZ** — Are new endpoints/actions access-controlled? Any privilege escalation or missing ownership check?
|
|
11
|
+
3. **Secrets** — No secrets in code, logs, or error messages. Secret handling uses the established mechanism.
|
|
12
|
+
4. **Crypto** — No home-grown crypto; correct, current algorithms and key handling.
|
|
13
|
+
5. **Dependencies** — New/updated deps: known vulnerabilities? Is the source trustworthy?
|
|
14
|
+
6. **Data exposure** — Does the change leak data in responses, logs, or errors beyond what's intended?
|
|
15
|
+
|
|
16
|
+
## How to record your verdict
|
|
17
|
+
|
|
18
|
+
1. You are the active participant of a `review` stage on the issue carrying the PR link.
|
|
19
|
+
2. State **what you probed and how** (e.g. "checked the new `/upload` endpoint for path traversal with `../` inputs; validated the content-type allowlist"). A verdict without concrete checks is invalid.
|
|
20
|
+
3. Record `approved` (with the checks performed) or `changes_requested` (with the specific finding, its impact, and a remediation).
|
|
21
|
+
4. Optionally mirror as a GitHub PR comment via a Markdown file (`## ✅ Approved` / `## 🔄 Changes requested`), run `gh pr comment <number> --body-file <file>`. Never inline `--body "..."`. See `docs/pr-conventions.md` → *Posting PR Bodies & Comments*.
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
- Block on exploitable issues (injection, auth bypass, secret exposure). Suggest on defense-in-depth hardening.
|
|
26
|
+
- Be specific: name the input, the path, the impact. "Looks secure" is not a review.
|
|
27
|
+
- If the change is not actually security-relevant, say so briefly and approve — don't manufacture findings.
|
|
@@ -51,7 +51,6 @@ EOF
|
|
|
51
51
|
|
|
52
52
|
gh pr create --title "<type>: <description>" --body-file /tmp/pr-body.md
|
|
53
53
|
gh pr comment <number> --body-file /tmp/pr-body.md
|
|
54
|
-
gh pr review <number> --request-changes --body-file /tmp/pr-body.md
|
|
55
54
|
```
|
|
56
55
|
|
|
57
56
|
Every PR comment opens with a Markdown heading stating the verdict (`## ✅ Approved`, `## 🔄 Changes requested`, or `## 💬 Review notes`), followed by a short summary and bullet points or code blocks.
|
|
@@ -62,35 +61,45 @@ Apply one primary label: `feature`, `bug`, `docs`, `chore`, `infra`, `agent`.
|
|
|
62
61
|
|
|
63
62
|
## Review Workflow
|
|
64
63
|
|
|
65
|
-
Review runs through the issue's native `executionPolicy` (stages), not separate child issues
|
|
66
|
-
|
|
67
|
-
1. **Engineer** opens the PR on GitHub.
|
|
68
|
-
2. **Engineer** sets the originating issue's `executionPolicy
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
Review runs through the issue's native `executionPolicy` (stages), not separate child issues. The gate is **executed verification, not opinion**.
|
|
65
|
+
|
|
66
|
+
1. **Engineer** opens the PR on GitHub and adds the PR link as an issue comment.
|
|
67
|
+
2. **Engineer** sets the originating issue's `executionPolicy` stages, in order:
|
|
68
|
+
- a `review` stage for **QA** when a QA agent is on the team (test adequacy / running the tests),
|
|
69
|
+
- a `review` stage for the **Security Engineer** *only when the change is security-relevant* (auth, secrets, input boundaries, crypto, dependencies, infra exposure),
|
|
70
|
+
- an `approval` stage for the **Product Owner** (intent, scope, acceptance),
|
|
71
|
+
- a final `approval` stage for the **Engineer** as the merge gate.
|
|
72
|
+
Resolve each role to its agentId.
|
|
73
|
+
3. **Engineer** sets the issue to `in_review`.
|
|
74
|
+
4. **QA** (when present) reviews and records `approved`/`changes_requested` with executed evidence (see *Merge Rules*).
|
|
75
|
+
5. **Security Engineer** (when present as a stage) probes the security-relevant change and records a verdict stating what was checked.
|
|
76
|
+
6. **Code Reviewer** and other domain reviewers may add **advisory, non-blocking** PR comments. They do not gate the merge.
|
|
77
|
+
7. **Product Owner** reviews for intent match, scope discipline, and acceptance criteria, and records the `approval` verdict.
|
|
78
|
+
8. **Engineer** owns the final `approval` stage (merge gate): once reviewers and the Product Owner have approved, the engineer satisfies the hard gate (CI green, or runs the tests/build and pastes the output), merges the PR, confirms the merge landed, and only then records `approved` — which closes the issue to `done`. The merge must happen before the issue is `done`.
|
|
75
79
|
|
|
76
80
|
## Review Roles
|
|
77
81
|
|
|
78
|
-
- **
|
|
79
|
-
- **
|
|
80
|
-
- **Product Owner** (`approval` stage):
|
|
81
|
-
|
|
82
|
-
|
|
82
|
+
- **QA** (`review` stage, when present): the substantive gate. Test coverage, regression risk, and validation — backed by tests that actually ran.
|
|
83
|
+
- **Security Engineer** (`review` stage, only when the change is security-relevant): probes the diff for injection, auth, secrets, crypto, dependency, and exposure issues.
|
|
84
|
+
- **Product Owner** (`approval` stage): intent alignment, scope discipline, acceptance criteria.
|
|
85
|
+
- **Engineer** (`approval` stage, last): the merge gate and hard-gate backstop — see *Merge Rules*.
|
|
86
|
+
- **Code Reviewer / domain reviewers** (advisory): optional, non-blocking comments on correctness, clarity, design, accessibility, UX. They never gate the merge.
|
|
83
87
|
|
|
84
88
|
## Merge Rules
|
|
85
89
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
- CI must
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
90
|
+
The hard gate is **executed verification**, enforced on the Engineer's merge-gate stage and independent of which reviewers are present:
|
|
91
|
+
|
|
92
|
+
- **With CI:** CI (lint/test/build) must be **green** before the Engineer merges. This is machine-verified and cannot be skipped.
|
|
93
|
+
- **Without CI:** the Engineer must run the full test suite and build locally and paste the real output into the merge-gate verdict before merging. (When QA is present, QA already produced this evidence; the Engineer confirms it.)
|
|
94
|
+
- A verdict that does not cite executed verification — green CI, or pasted test/build output — is not valid.
|
|
95
|
+
- The Product Owner's `approval` stage must be approved.
|
|
96
|
+
- QA's `review` stage (when present) and the Security Engineer's `review` stage (when added) must be approved.
|
|
97
|
+
- The Code Reviewer and other domain reviewers are advisory — blocking only when they escalate a concern that QA, the Security Engineer, or the Engineer then acts on.
|
|
98
|
+
- No force pushes.
|
|
99
|
+
- Merge using `gh pr merge <number> --merge`.
|
|
100
|
+
- The Engineer is the merge owner — reviewers never merge.
|
|
93
101
|
- The engineer's merge gate must be the **last** `approval` stage. If the Product Owner's approval were last, it would auto-close the issue to `done` and the merge would be skipped, leaving the PR open on GitHub.
|
|
102
|
+
- Do not configure GitHub branch protection to require approving reviews unless the project has distinct non-author GitHub reviewer credentials; all agents using one GitHub account cannot formally approve their own PRs.
|
|
94
103
|
|
|
95
104
|
## Dev Cycle Rules
|
|
96
105
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pr-review",
|
|
3
|
-
"description": "Coordinates
|
|
3
|
+
"description": "Coordinates substantive PR review through the issue's native executionPolicy. The merge gate is executed verification — green CI, or the engineer running the tests/build and pasting the output — not opinion. QA is the substantive reviewer when present; the Security Engineer reviews only security-relevant changes; the Code Reviewer is advisory.",
|
|
4
4
|
"requires": [
|
|
5
5
|
"github-repo"
|
|
6
6
|
],
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"ui-designer",
|
|
12
12
|
"ux-researcher",
|
|
13
13
|
"qa",
|
|
14
|
+
"security-engineer",
|
|
14
15
|
"devops"
|
|
15
16
|
],
|
|
16
17
|
"capabilities": [],
|
|
@@ -20,11 +21,11 @@
|
|
|
20
21
|
"bootstrapPhase": "foundation",
|
|
21
22
|
"assignTo": "engineer",
|
|
22
23
|
"reviewGate": {
|
|
23
|
-
"reviewers": ["
|
|
24
|
+
"reviewers": ["qa"],
|
|
24
25
|
"approver": "product-owner",
|
|
25
26
|
"mergeGate": "engineer"
|
|
26
27
|
},
|
|
27
|
-
"description": "Document and verify the PR workflow:
|
|
28
|
+
"description": "Document and verify the PR workflow via the issue's executionPolicy. The merge gate is executed verification: with CI, builds must be green before merge; without CI, the engineer runs the test suite/build and pastes the output before merging. Stages: a review stage for QA when present, a review stage for the Security Engineer only on security-relevant changes, an approval stage for the Product Owner, and a final approval stage for the Engineer as the merge gate (woken last to merge the PR before recording approval, which closes the issue). The merge gate must be the last stage so the Product Owner's approval does not auto-close the issue with the PR still open. The Code Reviewer and other domain reviewers add advisory, non-blocking comments. Optional branch protection may disable direct pushes, but do not require GitHub-native approving reviews unless the project has distinct non-author GitHub reviewer credentials."
|
|
28
29
|
}
|
|
29
30
|
]
|
|
30
31
|
}
|
|
@@ -15,7 +15,7 @@ You report to the CEO.
|
|
|
15
15
|
- **Security**: Any injection, XSS, credential exposure, or OWASP risks?
|
|
16
16
|
- **Style**: Consistent with existing codebase patterns?
|
|
17
17
|
- **Simplicity**: Is there unnecessary complexity? Could it be simpler?
|
|
18
|
-
6. Post your review
|
|
18
|
+
6. Post your review as **advisory** feedback: write it to a Markdown file (start with a heading, e.g. `## 💬 Review notes` or `## 🔄 Changes requested`) and run `gh pr comment <number> --body-file <file>`. Never inline `--body "..."` — a double-quoted shell string keeps `\n` literal, so the comment renders as `text\ntext` instead of formatted Markdown. Your review does not gate the merge — that gate is QA + CI (and the Security Engineer on security-relevant changes); do not submit a GitHub-native approving review, since all agents share one GitHub account.
|
|
19
19
|
7. Post your verdict on the originating issue.
|
|
20
20
|
8. Mark your issue as `done`.
|
|
21
21
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
- Read issue comments for PR link.
|
|
17
17
|
- Fetch diff: `gh pr diff <number>`.
|
|
18
18
|
- Review for correctness, security, style, simplicity.
|
|
19
|
-
- Post
|
|
19
|
+
- Post advisory feedback via `gh pr comment <number> --body-file <file>` (your review does not gate the merge — QA + CI do).
|
|
20
20
|
- Comment verdict on the originating issue.
|
|
21
21
|
- Mark issue done.
|
|
22
22
|
|