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

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.21",
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
  }
@@ -9,14 +9,15 @@ When this skill is active, you work in feature branches and open PRs instead of
9
9
  3. Make your changes, commit with Conventional Commits format
10
10
  4. Push branch: `git push -u origin <branch-name>`
11
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:
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.
@@ -47,13 +47,13 @@ Apply one primary label: `feature`, `bug`, `docs`, `chore`, `infra`, `agent`.
47
47
  Review runs through the issue's native `executionPolicy` (stages), not separate child issues:
48
48
 
49
49
  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.
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), 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
51
  3. **Engineer** sets the originating issue to `in_review`.
52
52
  4. **Code Reviewer** reviews for correctness, security, code style, simplicity and records `approved` / `changes_requested` on the review stage.
53
53
  5. **Domain reviewers** (when present as stages) review their concern and record their verdict.
54
54
  6. **Product Owner** reviews for intent match, scope discipline, acceptance criteria, and records the final `approval` verdict.
55
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`.
56
+ 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
57
 
58
58
  ## Review Roles
59
59
 
@@ -72,6 +72,7 @@ Reviewers may also add a PR comment, but GitHub-native approving reviews require
72
72
  - No force pushes
73
73
  - Merge using `gh pr merge <number> --merge`
74
74
  - Engineer is the merge owner — reviewers never merge
75
+ - 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
76
 
76
77
  ## Dev Cycle Rules
77
78
 
@@ -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
  }