@starlein/paperclip-plugin-company-wizard 0.3.20 → 0.3.22

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 CHANGED
@@ -1,9 +1,22 @@
1
1
  {
2
2
  "name": "@starlein/paperclip-plugin-company-wizard",
3
- "version": "0.3.20",
3
+ "version": "0.3.22",
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",
7
+ "scripts": {
8
+ "build": "node ./esbuild.config.mjs",
9
+ "build:rollup": "rollup -c",
10
+ "dev": "node ./esbuild.config.mjs --watch",
11
+ "dev:ui": "paperclip-plugin-dev-server --root . --ui-dir dist/ui --port 4177",
12
+ "test": "vitest run --config ./vitest.config.ts",
13
+ "test:logic": "node --test src/logic/*.test.js src/api/*.test.js",
14
+ "typecheck": "tsc --noEmit",
15
+ "build:prod": "NODE_ENV=production node ./esbuild.config.mjs",
16
+ "publish:npm": "npm publish --access public",
17
+ "prepublishOnly": "pnpm build:prod",
18
+ "prepare": "husky"
19
+ },
7
20
  "publishConfig": {
8
21
  "access": "public",
9
22
  "registry": "https://registry.npmjs.org/"
@@ -64,16 +77,5 @@
64
77
  "@paperclipai/shared": ">=2026.529.0",
65
78
  "react": ">=18",
66
79
  "react-dom": ">=18"
67
- },
68
- "scripts": {
69
- "build": "node ./esbuild.config.mjs",
70
- "build:rollup": "rollup -c",
71
- "dev": "node ./esbuild.config.mjs --watch",
72
- "dev:ui": "paperclip-plugin-dev-server --root . --ui-dir dist/ui --port 4177",
73
- "test": "vitest run --config ./vitest.config.ts",
74
- "test:logic": "node --test src/logic/*.test.js src/api/*.test.js",
75
- "typecheck": "tsc --noEmit",
76
- "build:prod": "NODE_ENV=production node ./esbuild.config.mjs",
77
- "publish:npm": "npm publish --access public"
78
80
  }
79
- }
81
+ }
@@ -21,6 +21,18 @@ Rules:
21
21
  - Under 72 characters
22
22
  - Reference issue ID in commit body when applicable
23
23
 
24
+ ## Repository Hygiene: ignore `.paperclip/`
25
+
26
+ Paperclip stores per-issue git worktrees and workspace metadata under a `.paperclip/`
27
+ directory inside the repository. This must never be committed.
28
+
29
+ - When preparing the repository (fresh or existing), make sure `.gitignore` contains a
30
+ `.paperclip/` line. Add it before the first commit; create `.gitignore` if missing.
31
+ - If `.paperclip/` was already committed, remove it from tracking with
32
+ `git rm -r --cached .paperclip` and commit the removal.
33
+ - Committing `.paperclip/` pollutes history and can nest isolated worktrees inside the
34
+ repo, which causes confusing git state for every agent.
35
+
24
36
  ## Direct-to-Main Workflow
25
37
 
26
38
  1. Pull latest from main
@@ -9,7 +9,7 @@
9
9
  "priority": "critical",
10
10
  "bootstrapPhase": "foundation",
11
11
  "labels": ["chore"],
12
- "description": "Foundation setup: handle this before normal implementation issues. For a fresh repository, create the GitHub repository, initialize local workspace with a README or bootstrap commit, add origin, push main, and record the repository URL. For an existing repository, verify the workspace has a reachable remote, current default branch, and starter commit state; escalate to CEO if repo setup is missing instead of silently closing the issue. Branch protection is tracked separately by the pr-review module when that workflow is enabled."
12
+ "description": "Foundation setup: handle this before normal implementation issues. For a fresh repository, create the GitHub repository, initialize local workspace with a README or bootstrap commit, add origin, push main, and record the repository URL. For an existing repository, verify the workspace has a reachable remote, current default branch, and starter commit state; escalate to CEO if repo setup is missing instead of silently closing the issue. Before the first commit, ensure the repository's `.gitignore` ignores Paperclip's local state — add a `.paperclip/` entry (this is where Paperclip keeps per-issue git worktrees and workspace metadata inside the repo; committing it pollutes history and can nest worktrees inside the repo). Create `.gitignore` if it is missing. Branch protection is tracked separately by the pr-review module when that workflow is enabled."
13
13
  }
14
14
  ]
15
15
  }
@@ -18,7 +18,7 @@ You review PRs for correctness, security, code quality, and simplicity. You are
18
18
  2. Record your verdict on your review stage:
19
19
  - **approved** if the code meets quality standards
20
20
  - **changes_requested** with specific, actionable feedback if not
21
- 3. Optionally mirror the same verdict as a GitHub PR comment for visibility.
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*.
22
22
 
23
23
  ## Rules
24
24
 
@@ -19,7 +19,7 @@ You review PRs for infrastructure impact, performance, security, and operational
19
19
  3. Record your verdict on your review stage:
20
20
  - **approved** if operationally sound
21
21
  - **changes_requested** with specific concerns if not
22
- 4. Optionally mirror the same verdict as a GitHub PR comment for visibility.
22
+ 4. 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*.
23
23
 
24
24
  ## Rules
25
25
 
@@ -8,15 +8,16 @@ When this skill is active, you work in feature branches and open PRs instead of
8
8
  2. Create branch: `git checkout -b <prefix>-<N>/<short-description>`
9
9
  3. Make your changes, commit with Conventional Commits format
10
10
  4. Push branch: `git push -u origin <branch-name>`
11
- 5. Open PR: `gh pr create --title "<type>: <description>" --body "<template>"`
12
- 6. Set the originating issue's `executionPolicy` to gate the merge on review:
11
+ 5. Open PR: write the body (PR Body Template in `docs/pr-conventions.md`) to a file, then `gh pr create --title "<type>: <description>" --body-file <file>`. Never inline `--body "..."` — a double-quoted shell string keeps `\n` literal and the PR renders as `text\ntext` (see *Posting PR Bodies & Comments*).
12
+ 6. Set the originating issue's `executionPolicy` to gate the merge on review, ending with your own merge gate:
13
13
  - One `review` stage with the **Code Reviewer** as participant (always).
14
14
  - Additional `review` stages for any relevant domain reviewer that exists in the team (UI Designer for UI diffs, UX Researcher for flow changes, QA for logic/test-sensitive changes, DevOps for infra/deploy/dependency changes).
15
- - A final `approval` stage with the **Product Owner** as participant (always).
15
+ - An `approval` stage with the **Product Owner** as participant (always) — the product sign-off.
16
+ - A final `approval` stage with **yourself (the Engineer)** as participant — the **merge gate**. This stage exists so you are woken *last*, after every reviewer and the Product Owner have cleared, to perform the merge.
16
17
  - Resolve each role to its agentId first (look up active agents), then set the policy on the issue. Include the PR link in an issue comment so reviewers can find it.
17
18
  7. Move the originating issue to `in_review`.
18
- 8. Wait for the issue to clear its stages. Each reviewer records `approved` or `changes_requested` on their stage; verdicts may be mirrored as PR comments.
19
- 9. When all stages are approved (no `changes_requested` outstanding): `gh pr merge <number> --merge`, then set the issue to `done`.
19
+ 8. Wait for the issue to clear its review/approval stages. Each reviewer and the Product Owner records `approved` or `changes_requested`; verdicts may be mirrored as PR comments. A `changes_requested` routes the issue back to you — address it, push to the same branch, and that stage re-runs.
20
+ 9. When the issue reaches your final **merge gate** stage (you are the current participant and every prior stage is approved): run `gh pr merge <number> --merge`, confirm the merge landed, **then** record `approved` on your stage — that closes the issue to `done`. Never record `approved` before the merge has actually succeeded, and never set the issue to `done` with the PR still open.
20
21
 
21
22
  ## Rules
22
23
 
@@ -25,5 +26,6 @@ When this skill is active, you work in feature branches and open PRs instead of
25
26
  - Always include `Closes [PREFIX-N]` in the PR body.
26
27
  - If a reviewer requests changes, address them, push to the same branch, and re-request review (the stage re-runs).
27
28
  - You are the merge owner — never ask reviewers to merge.
29
+ - **Your merge gate must be the last stage.** The Product Owner's `approval` is the product sign-off, not the final stage. If it were last, their verdict would auto-close the issue to `done` and you would never be woken to merge — leaving the PR open on GitHub. Always append your own merge-gate `approval` stage after the Product Owner's, and do the merge there before recording your verdict.
28
30
  - Do not create separate child review issues and do not use @-mentions to request review; the executionPolicy stages are the governance signal.
29
31
  - Do not wait for GitHub-native approving reviews when all agents share the same GitHub credential; GitHub rejects self-approval. The Paperclip executionPolicy stages are the required signal unless a separate non-author GitHub reviewer credential is explicitly available.
@@ -17,7 +17,7 @@ You review PRs for intent alignment, scope discipline, and acceptance criteria.
17
17
  2. Record your verdict on your approval stage:
18
18
  - **approved** if the change meets product requirements
19
19
  - **changes_requested** with specific feedback tied to acceptance criteria
20
- 3. Optionally mirror the same verdict as a GitHub PR comment for visibility.
20
+ 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*.
21
21
 
22
22
  ## Rules
23
23
 
@@ -19,7 +19,7 @@ You review PRs for test coverage, edge cases, and regression risk. When a PR cha
19
19
  3. Record your verdict on your review stage:
20
20
  - **approved** if quality is adequate
21
21
  - **changes_requested** with specific gaps and suggested test cases if not
22
- 4. Optionally mirror the same verdict as a GitHub PR comment for visibility.
22
+ 4. 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*.
23
23
 
24
24
  ## Rules
25
25
 
@@ -19,7 +19,7 @@ You review PRs for visual quality, brand consistency, and accessibility. When a
19
19
  3. Record your verdict on your review stage:
20
20
  - **approved** if visually sound
21
21
  - **changes_requested** with specific, actionable feedback if not
22
- 4. Optionally mirror the same verdict as a GitHub PR comment for visibility.
22
+ 4. 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*.
23
23
 
24
24
  ## Rules
25
25
 
@@ -19,7 +19,7 @@ You review PRs for usability, user flow integrity, and alignment with user needs
19
19
  3. Record your verdict on your review stage:
20
20
  - **approved** if usability is sound
21
21
  - **changes_requested** with specific, actionable feedback if not
22
- 4. Optionally mirror the same verdict as a GitHub PR comment for visibility.
22
+ 4. 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*.
23
23
 
24
24
  ## Rules
25
25
 
@@ -38,6 +38,24 @@ Rules: lowercase after colon, no period, under 72 chars.
38
38
  Closes [PREFIX-N]
39
39
  ```
40
40
 
41
+ ## Posting PR Bodies & Comments
42
+
43
+ Always pass Markdown through a **file** (`--body-file`), never an inline `--body "..."`. A double-quoted shell argument does **not** turn `\n` into a real newline, so an inline body renders on GitHub as literal `text\ntext\ntext` instead of formatted Markdown. Write the body to a file first:
44
+
45
+ ```bash
46
+ # Real newlines + full Markdown (headings, lists, code blocks) preserved.
47
+ cat > /tmp/pr-body.md <<'EOF'
48
+ ## What changed
49
+ ...
50
+ EOF
51
+
52
+ gh pr create --title "<type>: <description>" --body-file /tmp/pr-body.md
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
+ ```
56
+
57
+ 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.
58
+
41
59
  ## Labels
42
60
 
43
61
  Apply one primary label: `feature`, `bug`, `docs`, `chore`, `infra`, `agent`.
@@ -47,13 +65,13 @@ Apply one primary label: `feature`, `bug`, `docs`, `chore`, `infra`, `agent`.
47
65
  Review runs through the issue's native `executionPolicy` (stages), not separate child issues:
48
66
 
49
67
  1. **Engineer** opens the PR on GitHub.
50
- 2. **Engineer** sets the originating issue's `executionPolicy`: a `review` stage for the Code Reviewer, optional `review` stages for relevant domain reviewers (UI Designer / UX Researcher / QA / DevOps), and a final `approval` stage for the Product Owner. Reviewer/approver roles are resolved to agentIds. The PR link is added as an issue comment.
68
+ 2. **Engineer** sets the originating issue's `executionPolicy`: a `review` stage for the Code Reviewer, optional `review` stages for relevant domain reviewers (UI Designer / UX Researcher / QA / DevOps), an `approval` stage for the Product Owner (product sign-off), and a final `approval` stage for the **Engineer** as the merge gate. Reviewer/approver/merge-owner roles are resolved to agentIds. The PR link is added as an issue comment.
51
69
  3. **Engineer** sets the originating issue to `in_review`.
52
70
  4. **Code Reviewer** reviews for correctness, security, code style, simplicity and records `approved` / `changes_requested` on the review stage.
53
71
  5. **Domain reviewers** (when present as stages) review their concern and record their verdict.
54
72
  6. **Product Owner** reviews for intent match, scope discipline, acceptance criteria, and records the final `approval` verdict.
55
- 7. Verdicts are recorded on the stages and may be mirrored as PR comments.
56
- 8. **Engineer** merges when all stages are approved (no `changes_requested` outstanding), then sets the originating issue to `done`.
73
+ 7. Verdicts are recorded on the stages and may be mirrored as PR comments (always via `--body-file`; see *Posting PR Bodies & Comments*).
74
+ 8. **Engineer** owns the final `approval` stage (merge gate): once every reviewer and the Product Owner has approved, the engineer is woken last, merges the PR, confirms the merge landed, and only then records `approved` — which closes the originating issue to `done`. The merge must happen before the issue is `done`.
57
75
 
58
76
  ## Review Roles
59
77
 
@@ -72,6 +90,7 @@ Reviewers may also add a PR comment, but GitHub-native approving reviews require
72
90
  - No force pushes
73
91
  - Merge using `gh pr merge <number> --merge`
74
92
  - Engineer is the merge owner — reviewers never merge
93
+ - 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.
75
94
 
76
95
  ## Dev Cycle Rules
77
96
 
@@ -21,9 +21,10 @@
21
21
  "assignTo": "engineer",
22
22
  "reviewGate": {
23
23
  "reviewers": ["code-reviewer"],
24
- "approver": "product-owner"
24
+ "approver": "product-owner",
25
+ "mergeGate": "engineer"
25
26
  },
26
- "description": "Document and verify the PR workflow: feature branches, PR links, and review via the issue's executionPolicy — a review stage for the Code Reviewer (plus relevant domain reviewers) and a final approval stage for the Product Owner, with engineer-owned merges once all stages clear. Optional branch protection may disable direct pushes or require CI, but do not require GitHub-native approving reviews unless the project has distinct non-author GitHub reviewer credentials."
27
+ "description": "Document and verify the PR workflow: feature branches, PR links, and review via the issue's executionPolicy — a review stage for the Code Reviewer (plus relevant domain reviewers), an approval stage for the Product Owner, and a final approval stage for the Engineer as the merge gate (the engineer is 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. Optional branch protection may disable direct pushes or require CI, but do not require GitHub-native approving reviews unless the project has distinct non-author GitHub reviewer credentials."
27
28
  }
28
29
  ]
29
30
  }
@@ -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 using `gh pr review <number> --approve` or `gh pr review <number> --request-changes --body "<feedback>"`.
18
+ 6. Post your review: `gh pr review <number> --approve`, or to request changes write your feedback to a Markdown file (start with a heading, e.g. `## 🔄 Changes requested`) and run `gh pr review <number> --request-changes --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.
19
19
  7. Post your verdict on the originating issue.
20
20
  8. Mark your issue as `done`.
21
21