@starlein/paperclip-plugin-company-wizard 0.4.6 → 0.4.7
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 +29 -0
- package/README.md +6 -4
- package/dist/manifest.js +1 -1
- package/dist/manifest.js.map +1 -1
- package/dist/ui/index.css +82 -0
- package/dist/ui/index.css.map +2 -2
- package/dist/ui/index.js +422 -137
- package/dist/ui/index.js.map +4 -4
- package/dist/worker.js +352 -21
- package/dist/worker.js.map +3 -3
- package/package.json +1 -1
- package/templates/bootstrap-instructions.md +2 -2
- package/templates/modules/architecture-plan/agents/ui-designer/skills/design-system.md +1 -1
- package/templates/modules/architecture-plan/skills/architecture-plan.md +1 -1
- package/templates/modules/auto-assign/agents/ceo/heartbeat-section.md +1 -1
- package/templates/modules/auto-assign/agents/product-owner/heartbeat-section.md +1 -1
- package/templates/modules/backlog/agents/ceo/heartbeat-section.md +1 -1
- package/templates/modules/backlog/agents/ceo/skills/backlog-health.fallback.md +2 -0
- package/templates/modules/backlog/agents/product-owner/heartbeat-section.md +1 -1
- package/templates/modules/backlog/docs/backlog-process.md +38 -1
- package/templates/modules/backlog/docs/backlog-template.md +1 -1
- package/templates/modules/backlog/module.meta.json +1 -1
- package/templates/modules/backlog/skills/backlog-health.bar.md +2 -0
- package/templates/modules/backlog/skills/backlog-health.md +7 -4
- package/templates/modules/competitive-intel/skills/competitive-tracking.md +1 -1
- package/templates/modules/github-repo/agents/engineer/skills/git-workflow.md +63 -16
- package/templates/modules/github-repo/docs/git-workflow.md +18 -16
- package/templates/modules/market-analysis/agents/ux-researcher/skills/market-analysis.md +1 -1
- package/templates/modules/market-analysis/skills/market-analysis.md +1 -1
- package/templates/modules/pr-review/agents/devops/skills/infra-review.md +6 -8
- package/templates/modules/pr-review/agents/engineer/skills/pr-workflow.md +31 -12
- package/templates/modules/pr-review/agents/product-owner/skills/product-review.md +3 -2
- package/templates/modules/pr-review/agents/ui-designer/skills/design-review.md +4 -6
- package/templates/modules/pr-review/agents/ux-researcher/skills/ux-review.md +4 -6
- package/templates/modules/pr-review/docs/pr-conventions.md +4 -4
- package/templates/modules/pr-review/module.meta.json +1 -1
- package/templates/modules/security-audit/skills/threat-model.md +1 -1
- package/templates/modules/stall-detection/agents/ceo/heartbeat-section.md +1 -1
- package/templates/modules/tech-stack/skills/tech-stack.md +1 -1
- package/templates/modules/triage/skills/issue-triage.md +1 -1
- package/templates/modules/user-testing/agents/qa/skills/user-testing.md +1 -1
- package/templates/modules/user-testing/skills/user-testing.md +1 -1
- package/templates/modules/vision-workshop/agents/ceo/skills/vision-workshop.md +1 -1
- package/templates/presets/repo-maintenance/preset.meta.json +3 -3
- package/templates/roles/audio-designer/role.meta.json +5 -2
- package/templates/roles/cmo/role.meta.json +2 -1
- package/templates/roles/code-reviewer/AGENTS.md +3 -3
- package/templates/roles/code-reviewer/role.meta.json +4 -1
- package/templates/roles/cto/role.meta.json +2 -1
- package/templates/roles/customer-success/role.meta.json +2 -1
- package/templates/roles/devops/role.meta.json +2 -1
- package/templates/roles/engineer/role.meta.json +2 -1
- package/templates/roles/game-artist/role.meta.json +5 -2
- package/templates/roles/game-designer/role.meta.json +4 -1
- package/templates/roles/level-designer/role.meta.json +4 -1
- package/templates/roles/product-owner/role.meta.json +4 -1
- package/templates/roles/qa/role.meta.json +2 -1
- package/templates/roles/security-engineer/role.meta.json +2 -1
- package/templates/roles/technical-writer/role.meta.json +2 -1
- package/templates/roles/ui-designer/role.meta.json +2 -1
- package/templates/roles/ux-researcher/role.meta.json +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starlein/paperclip-plugin-company-wizard",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.7",
|
|
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",
|
|
@@ -19,7 +19,7 @@ Each section (Goals, Projects, Labels, Agents, Issues, Routines) contains object
|
|
|
19
19
|
2. **Projects** — create with `POST /api/companies/{companyId}/projects` using `{ name, description, goalIds, workspace, executionWorkspacePolicy? }`. Reference goals via `goalIds`; create after all goals exist. Valid project `status` (optional, defaults to `backlog`): `backlog`, `planned`, `in_progress`, `completed`, `cancelled` — **`active` is a goal status, NOT a project status; do not set it on a project.** Create the project workspace as an object, not a raw string. Fresh/new repositories use a local project workspace such as `workspace: { sourceType: "local_path", cwd: "...", defaultRef: "main", setupCommand: "git init -b main", isPrimary: true }` and must initialize Git before work starts; do not attach an `executionWorkspacePolicy` to a fresh local repo (the repo has no base ref yet). Existing repository-backed projects use the workspace refs shown in this bootstrap exactly as rendered; do not rewrite them to `main`, `master`, or add/remove `origin/`. When this bootstrap includes `executionWorkspacePolicy`, send it exactly as rendered; it was included only because Paperclip's experimental isolated-workspaces setting is enabled, and its `workspaceStrategy.baseRef` comes from project/worktree settings. Never inline credentials in repo URLs.
|
|
20
20
|
3. **Labels** — if the bootstrap includes an Issues section, create issue labels first (`POST /api/companies/{companyId}/labels` with `{ name, color }`). Colors must be 6-digit hex strings with a leading `#`.
|
|
21
21
|
4. **Agents** — hire via governance (`POST /api/companies/{companyId}/agent-hires`) using the listed `adapterType`, nested `adapterConfig`, `runtimeConfig`, `capabilities`, and `metadata`. The Company Wizard already created the CEO for this bootstrap issue; reuse/update any existing agent with the same `metadata.templateRole` instead of creating a duplicate.
|
|
22
|
-
5. **Issues** — every issue must include `projectId`, including subtasks. Subtasks must also include `parentId`. Assign via `assigneeAgentId` or `assigneeUserId`, and attach labels via `labelIds`. If you use `POST /api/issues/{parentId}/children`, still pass `projectId` explicitly for clarity; if you use `POST /api/companies/{companyId}/issues`, passing both `parentId` and `projectId` is mandatory for this bootstrap.
|
|
22
|
+
5. **Issues** — every issue must include `projectId`, including subtasks. Subtasks must also include `parentId`. Assign via `assigneeAgentId` or `assigneeUserId`, and attach labels via `labelIds`. If you use `POST /api/issues/{parentId}/children`, still pass `projectId` explicitly for clarity; if you use `POST /api/companies/{companyId}/issues`, passing both `parentId` and `projectId` is mandatory for this bootstrap. Set workspace isolation explicitly: **top-level issues** (no `parentId`) must include `"executionWorkspaceSettings": { "mode": "isolated_workspace" }` so each gets its own worktree/branch; **subtasks** set `parentId` and omit `executionWorkspaceSettings` so they reuse the parent's workspace.
|
|
23
23
|
6. **Routines** — reference project and agent. Create the routine first, then add a schedule trigger with `POST /api/routines/{routineId}/triggers` using `{ kind: "schedule", cronExpression: schedule, timezone: "UTC" }`.
|
|
24
24
|
|
|
25
25
|
**Status + subissue guardrails:**
|
|
@@ -27,7 +27,7 @@ Each section (Goals, Projects, Labels, Agents, Issues, Routines) contains object
|
|
|
27
27
|
- Parent and subissue status are related by intent, not automatically coupled by tooling.
|
|
28
28
|
- Do not auto-mark a parent `done` just because a child changed status.
|
|
29
29
|
- Do not auto-reopen a `done` parent/subissue unless you have an explicit reason and record it in a comment.
|
|
30
|
-
-
|
|
30
|
+
- Make workspace intent explicit at creation; never rely on implicit inheritance. A top-level issue (no `parentId`) created without `executionWorkspaceSettings` silently adopts the workspace of whatever issue the creator currently has checked out, which serializes work and corrupts branch state. Therefore: top-level issues set `"executionWorkspaceSettings": { "mode": "isolated_workspace" }` (own worktree); subissues set `parentId` and omit `executionWorkspaceSettings` so they deliberately share the parent's workspace (safe because the parent cannot be completed/cleaned up while subissues are open). Keep `projectId` explicit on both.
|
|
31
31
|
|
|
32
32
|
**Review workflow guardrail:**
|
|
33
33
|
|
|
@@ -13,7 +13,7 @@ You own the visual design system. Establish the foundational patterns that ensur
|
|
|
13
13
|
- **Brand guidelines**: Logo usage, tone of visual language, iconography style
|
|
14
14
|
- **Responsive breakpoints**: Mobile, tablet, desktop sizing approach
|
|
15
15
|
3. Create implementation issues for the engineer:
|
|
16
|
-
- `POST /api/companies/{companyId}/issues` for CSS/design token setup, component library scaffolding. Include the active `projectId` (and `goalId` / `parentId` when applicable).
|
|
16
|
+
- `POST /api/companies/{companyId}/issues` for CSS/design token setup, component library scaffolding. Include the active `projectId` (and `goalId` / `parentId` when applicable). For top-level issues (no `parentId`), also include `"executionWorkspaceSettings": { "mode": "isolated_workspace" }` so each gets its own worktree; subissues set `parentId` and omit it.
|
|
17
17
|
4. Assign or hand off implementation issues to the Engineer with a concrete next action; do not rely on generic @-mentions.
|
|
18
18
|
|
|
19
19
|
## Rules
|
|
@@ -13,7 +13,7 @@ You own system architecture. Design the structure that implements the tech stack
|
|
|
13
13
|
- **Deployment model**: How the system is built, tested, and deployed
|
|
14
14
|
- **Key decisions**: Architectural decisions with rationale (ADR-style)
|
|
15
15
|
3. Create implementation issues for the foundational structure:
|
|
16
|
-
- `POST /api/companies/{companyId}/issues` for scaffolding, core modules, etc. Include the active `projectId` (and `goalId` / `parentId` when applicable).
|
|
16
|
+
- `POST /api/companies/{companyId}/issues` for scaffolding, core modules, etc. Include the active `projectId` (and `goalId` / `parentId` when applicable). For top-level issues (no `parentId`), also include `"executionWorkspaceSettings": { "mode": "isolated_workspace" }` so each gets its own worktree; subissues set `parentId` and omit it.
|
|
17
17
|
|
|
18
18
|
## Rules
|
|
19
19
|
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
Primary assignment happens at backlog grooming — issues are assigned to the best-fit agent as they are created. This routine is a **safety net** that catches stragglers when the Product Owner hasn't acted.
|
|
4
4
|
|
|
5
|
-
Do not scan for unassigned work during a normal heartbeat. If you are assigned a routine-run issue titled like "Auto-assign unassigned issues" and no Product Owner is available, use
|
|
5
|
+
Do not scan for unassigned work during a normal heartbeat. If you are assigned a routine-run issue titled like "Auto-assign unassigned issues" and no Product Owner is available, use `$AGENT_HOME/skills/auto-assign.md`, then summarize assignments on the routine issue and exit.
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
Primary assignment happens at backlog grooming — issues are assigned to the best-fit agent as they are created, not through this routine. This routine is a **safety net** that catches stragglers every 4 hours.
|
|
4
4
|
|
|
5
|
-
Do not scan for unassigned work during a normal heartbeat. When you are assigned a routine-run issue titled like "Auto-assign unassigned issues", use
|
|
5
|
+
Do not scan for unassigned work during a normal heartbeat. When you are assigned a routine-run issue titled like "Auto-assign unassigned issues", use `$AGENT_HOME/skills/auto-assign.md`, then summarize assignments on the routine issue and exit.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
## Backlog Health Routine Fallback
|
|
2
2
|
|
|
3
|
-
Do not groom the backlog during a normal heartbeat unless that is your assigned issue. If you are assigned a routine-run issue titled like "Backlog grooming" and no Product Owner is available, use
|
|
3
|
+
Do not groom the backlog during a normal heartbeat unless that is your assigned issue. If you are assigned a routine-run issue titled like "Backlog grooming" and no Product Owner is available, use `$AGENT_HOME/skills/backlog-health.md`, then summarize generated/updated issues on the routine issue and exit.
|
|
@@ -9,6 +9,7 @@ On your heartbeat, after handling assignments:
|
|
|
9
9
|
1. Query unassigned issues: `GET /api/companies/{companyId}/issues?status=todo&unassigned=true`
|
|
10
10
|
2. If fewer than 1 unassigned issue remains AND the Product Owner hasn't acted recently:
|
|
11
11
|
- Create 1-2 high-priority issues from the roadmap to keep engineers unblocked
|
|
12
|
+
- For each top-level issue (no `parentId`), include `"executionWorkspaceSettings": { "mode": "isolated_workspace" }` so it gets its own worktree; subissues set `parentId` and omit it. Never create a top-level issue without it (it would inherit your checked-out workspace and block parallel work).
|
|
12
13
|
- Attach `labelIds` — fetch available labels via `GET /api/companies/{companyId}/labels`. If no labels exist yet, create the defaults (see `backlog-health` skill for the label table) before creating issues.
|
|
13
14
|
- Comment on the issue tagging the Product Owner to take over backlog grooming
|
|
14
15
|
3. If the Product Owner is active and the backlog has 1+ issues, skip this step.
|
|
@@ -18,3 +19,4 @@ On your heartbeat, after handling assignments:
|
|
|
18
19
|
- This is a safety net, not your primary job. Let the PO own it.
|
|
19
20
|
- Only create issues when engineers would otherwise have nothing to work on.
|
|
20
21
|
- Keep it minimal — just enough to unblock, not a full grooming session.
|
|
22
|
+
- **Review handoff:** When moving an issue to `in_review`, always assign it to the reviewer. If the issue has an executionPolicy with review stages, Paperclip reassigns automatically. Otherwise PATCH `assigneeAgentId` to the reviewer before or at the same time as the status change.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
## Backlog Health Routine
|
|
2
2
|
|
|
3
|
-
Do not groom the backlog during a normal heartbeat unless that is your assigned issue. When you are assigned a routine-run issue titled like "Backlog grooming" or "Backlog health", use
|
|
3
|
+
Do not groom the backlog during a normal heartbeat unless that is your assigned issue. When you are assigned a routine-run issue titled like "Backlog grooming" or "Backlog health", use `$AGENT_HOME/skills/backlog-health.md`, then summarize generated/updated issues on the routine issue and exit.
|
|
@@ -9,7 +9,7 @@ Goal → Roadmap → Issues → Assignment → Execution → Done
|
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
1. **Goal decomposition** — The backlog owner breaks the company goal into milestones, then milestones into actionable issues.
|
|
12
|
-
2. **Issue creation** — New issues enter the backlog via `POST /api/companies/{companyId}/issues` with `title`, `description`, `priority`, `projectId`, `goalId`, and `labelIds`. Top-level backlog issues must always include the active roadmap `projectId`.
|
|
12
|
+
2. **Issue creation** — New issues enter the backlog via `POST /api/companies/{companyId}/issues` with `title`, `description`, `priority`, `projectId`, `goalId`, and `labelIds`. Top-level backlog issues must always include the active roadmap `projectId`. They must also set workspace isolation explicitly — see **Workspace Isolation** below.
|
|
13
13
|
3. **Pipeline health** — The backlog owner monitors the ready assigned queue. When fewer than about 8 actionable ready issues remain across the active delivery roles, the next small batch is generated from the roadmap.
|
|
14
14
|
4. **Assignment** — Issues are assigned at creation to the best-fit owner. Engineering-ready issues go directly to the Software Engineer (or matching delivery role) so assignment wakeups start work immediately. Leave an issue unassigned only when no suitable owner exists.
|
|
15
15
|
5. **Execution** — Agents check out assigned issues, work them, and hand off deliberately for review or completion.
|
|
@@ -28,6 +28,39 @@ Every issue should be:
|
|
|
28
28
|
|
|
29
29
|
Write acceptance criteria in the issue description. Engineers use these to validate their work before marking done. Keep them concrete and testable.
|
|
30
30
|
|
|
31
|
+
## Workspace Isolation (required at creation)
|
|
32
|
+
|
|
33
|
+
Every issue runs in a git execution workspace (worktree/branch). To let issues run in
|
|
34
|
+
parallel without colliding in the same worktree, you must declare the workspace intent
|
|
35
|
+
**when you create the issue** — otherwise the issue silently adopts the workspace of
|
|
36
|
+
whatever issue you currently have checked out, which serializes work and corrupts branch
|
|
37
|
+
state.
|
|
38
|
+
|
|
39
|
+
- **Top-level issue** (independent work, no `parentId`): always send
|
|
40
|
+
`"executionWorkspaceSettings": { "mode": "isolated_workspace" }` in the create body. This
|
|
41
|
+
gives the issue its own worktree and branch.
|
|
42
|
+
- **Sub-issue** (part of a larger parent task): set `"parentId": "<parent-issue-id>"` and
|
|
43
|
+
do **not** send `executionWorkspaceSettings`. The sub-issue deliberately reuses the
|
|
44
|
+
parent's workspace (the parent cannot be completed/cleaned up while its sub-issues are
|
|
45
|
+
still open, so sharing is safe and intended).
|
|
46
|
+
|
|
47
|
+
**Never** create a top-level issue without `executionWorkspaceSettings`. Doing so makes it
|
|
48
|
+
inherit the creator's currently checked-out workspace and blocks parallel execution.
|
|
49
|
+
|
|
50
|
+
Example top-level create body:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{
|
|
54
|
+
"title": "Build campaign onboarding wizard",
|
|
55
|
+
"description": "...",
|
|
56
|
+
"priority": "high",
|
|
57
|
+
"projectId": "<roadmap-project-id>",
|
|
58
|
+
"goalId": "<goal-id>",
|
|
59
|
+
"labelIds": ["<label-id>"],
|
|
60
|
+
"executionWorkspaceSettings": { "mode": "isolated_workspace" }
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
31
64
|
## Sources of Issues
|
|
32
65
|
|
|
33
66
|
Issues can enter the backlog from multiple sources:
|
|
@@ -60,3 +93,7 @@ Re-prioritize when milestones shift or new information arrives. Don't let low-pr
|
|
|
60
93
|
- The backlog owner coordinates with the CEO on strategic priorities when unclear.
|
|
61
94
|
- If the goal is fully decomposed and all issues are done or in progress, report completion to the CEO rather than inventing new work.
|
|
62
95
|
- When multiple agents create issues (e.g., from user-testing findings), the backlog owner reviews and re-prioritizes as needed.
|
|
96
|
+
|
|
97
|
+
## Review Handoff
|
|
98
|
+
|
|
99
|
+
When an issue is ready for review (moving to `in_review`), it must be assigned to the reviewer. If an executionPolicy with review stages is configured, Paperclip reassigns automatically. Otherwise, the person moving the issue must PATCH `assigneeAgentId` to the reviewer. An issue in `in_review` that is still assigned to the original implementer will stall — no one picks it up. Always reassign on review handoff.
|
|
@@ -39,7 +39,7 @@ _Summary of current backlog health. Update on each heartbeat cycle._
|
|
|
39
39
|
- **Ready assigned issues:** _(count by owner)_
|
|
40
40
|
- **Unassigned todo issues:** _(count; should normally be 0 except items without a suitable owner)_
|
|
41
41
|
- **In-progress issues:** _(count)_
|
|
42
|
-
- **Health:** _(healthy / thin / empty / bloated — see backlog-process.md)_
|
|
42
|
+
- **Health:** _(healthy / thin / empty / bloated — see docs/backlog-process.md)_
|
|
43
43
|
|
|
44
44
|
## Decisions Log
|
|
45
45
|
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"title": "Backlog grooming",
|
|
25
25
|
"description": "Routine-run checklist: inspect roadmap/backlog health, ensure at least 8 actionable ready issues exist, create scoped issues (around 3-6 per pass) and assign each to its best-fit agent when capacity is low, link artifacts/goals/projects, summarize changes on the routine issue, then exit.",
|
|
26
26
|
"assignTo": "capability:backlog-health",
|
|
27
|
-
"schedule": "0 */
|
|
27
|
+
"schedule": "0 */2 * * *",
|
|
28
28
|
"priority": "medium",
|
|
29
29
|
"concurrencyPolicy": "skip_if_active"
|
|
30
30
|
}
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
A good backlog health pass:
|
|
4
4
|
|
|
5
5
|
- Every issue created is INVEST-shaped: has a clear title, written acceptance criteria in the description, a priority, a label, and is attached to the correct `projectId` and `goalId` — never a top-level issue with `projectId: null`.
|
|
6
|
+
- Every issue declares workspace isolation explicitly: top-level issues (no `parentId`) carry `"executionWorkspaceSettings": { "mode": "isolated_workspace" }`; subissues set `parentId` and omit it. A top-level issue created without it is not done — it would inherit the creator's checked-out workspace and block parallel execution.
|
|
6
7
|
- The team keeps a healthy queue of ready, **assigned** work (toward the grooming target of ~8 actionable ready issues); when the assigned ready queue runs low, new issues are created **and assigned** from the roadmap so no agent goes idle between grooming cycles, and the action is recorded in daily notes. Issues are assigned at creation — do not stockpile a pool of unassigned issues.
|
|
8
|
+
- Review handoff: when moving an issue to `in_review`, always reassign it to the reviewer. Without reassignment, `in_review` issues stall with the implementer still assigned.
|
|
7
9
|
|
|
8
10
|
Not done:
|
|
9
11
|
|
|
@@ -30,10 +30,11 @@ Add additional labels if the roadmap calls for them (e.g., `docs`, `design`, `se
|
|
|
30
30
|
3. Query existing issues for the relevant project/goal and avoid duplicates.
|
|
31
31
|
4. If the backlog is thin or unclear, create around 3-6 small actionable issues via `POST /api/companies/{companyId}/issues`.
|
|
32
32
|
5. Each issue must include: `title`, acceptance-oriented `description`, `priority`, `projectId`, `goalId` when known, and `labelIds`.
|
|
33
|
-
6.
|
|
34
|
-
7.
|
|
35
|
-
8.
|
|
36
|
-
9.
|
|
33
|
+
6. Set workspace isolation explicitly on every issue you create (see Rules): top-level issues send `"executionWorkspaceSettings": { "mode": "isolated_workspace" }`; sub-issues set `parentId` and omit it.
|
|
34
|
+
7. Use `blockedByIssueIds` for real dependencies instead of free-text blockers.
|
|
35
|
+
8. Assign each issue to the best-fit available agent as you create it — engineer-actionable work with clear acceptance criteria goes to the Software Engineer (or the matching role). Direct push-assignment is the primary dispatch path; the assigned queue is the buffer, so do **not** stockpile a pool of unassigned ready work. Leave an issue unassigned only when no suitable owner exists — the low-frequency auto-assign safety net will catch those.
|
|
36
|
+
9. Record generated issue ids and rationale in the routine issue comment; use issue documents for long plans.
|
|
37
|
+
10. Mark the routine-run issue done when complete.
|
|
37
38
|
|
|
38
39
|
## Rules
|
|
39
40
|
|
|
@@ -41,6 +42,8 @@ Add additional labels if the roadmap calls for them (e.g., `docs`, `design`, `se
|
|
|
41
42
|
- Do not create top-level backlog issues with `projectId: null` when a project exists.
|
|
42
43
|
- Keep issues small and actionable. Each should be completable, tested, and reviewed independently.
|
|
43
44
|
- Split into subissues only when each child can be completed independently; avoid splitting tightly coupled implementation across sibling subissues.
|
|
45
|
+
- **Set workspace isolation explicitly at creation.** Top-level issues (no `parentId`) must send `"executionWorkspaceSettings": { "mode": "isolated_workspace" }` so each gets its own worktree/branch. Sub-issues set `parentId` and omit `executionWorkspaceSettings` so they reuse the parent's workspace. Never create a top-level issue without it — otherwise it inherits the workspace of whatever issue you currently have checked out and blocks parallel work.
|
|
44
46
|
- Always attach at least one label to every issue you create.
|
|
45
47
|
- If the goal is fully decomposed into issues, do not create more. Report status and next review trigger to the CEO/Product Owner.
|
|
46
48
|
- Work products such as roadmap drafts or decomposition tables belong in issue documents/artifacts, not only comments.
|
|
49
|
+
- **Review handoff:** When moving an issue to `in_review`, always assign it to the reviewer. If the issue has an executionPolicy with review stages, Paperclip reassigns automatically. If there is no executionPolicy, PATCH the issue's `assigneeAgentId` to the reviewer before or at the same time as the status change. An issue in `in_review` that is still assigned to the original implementer will stall — no one picks it up. Always reassign on review handoff.
|
|
@@ -16,7 +16,7 @@ You own competitive intelligence. This is a living analysis — profiles evolve
|
|
|
16
16
|
- **Gaps and opportunities**: Where competitors are weak and we can win
|
|
17
17
|
- **Threats**: Where competitors are strong and we need to defend
|
|
18
18
|
3. Create follow-up issues for strategic decisions informed by competitive insights:
|
|
19
|
-
- `POST /api/companies/{companyId}/issues` with specific recommendations. Include the active `projectId` (and `goalId` / `parentId` when applicable).
|
|
19
|
+
- `POST /api/companies/{companyId}/issues` with specific recommendations. Include the active `projectId` (and `goalId` / `parentId` when applicable). For top-level issues (no `parentId`), also include `"executionWorkspaceSettings": { "mode": "isolated_workspace" }` so each gets its own worktree; subissues set `parentId` and omit it.
|
|
20
20
|
4. Record summary in your daily notes
|
|
21
21
|
|
|
22
22
|
## Rules
|
|
@@ -2,31 +2,76 @@
|
|
|
2
2
|
|
|
3
3
|
You work in a GitHub repository. Follow the conventions in `docs/git-workflow.md` in the project root.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## PR Self-Merge Flow (no pr-review module)
|
|
6
6
|
|
|
7
|
-
Use this flow when the **pr-review module is not active
|
|
7
|
+
Use this flow when the **pr-review module is not active**. You open a PR and merge it yourself — there is no external review gate, but all changes go through a PR so the branch history is preserved and branch protection is respected.
|
|
8
8
|
|
|
9
9
|
1. Before the first push on a project, confirm the GitHub credential helper from `docs/git-workflow.md` -> *GitHub Push Authentication* is installed in the primary repository. If `GH_TOKEN` is not injected or the helper cache is empty, stop and escalate instead of attempting unauthenticated pushes.
|
|
10
10
|
2. Resolve the base ref from project workspace metadata or the issue's `heartbeat-context`. Use the configured `repoRef`, `defaultRef`, or `executionWorkspacePolicy.workspaceStrategy.baseRef` exactly as Paperclip provides it. Never guess from the current shell branch and never rewrite the configured ref to `main`, `master`, or `origin/*`. If no base ref is configured anywhere, use the repository's actual default branch — whatever `origin/HEAD` points at, regardless of name (`main`/`master`/`trunk`/…); fall back to `main` then `master` only if the remote advertises no default HEAD. See `docs/git-workflow.md` → *Resolving the default branch*. Never hard-code `main`.
|
|
11
11
|
3. Pull/update latest from that base:
|
|
12
12
|
- external: `git fetch origin`, then integrate from the configured base ref
|
|
13
13
|
- local: update from the configured local branch
|
|
14
|
-
4.
|
|
15
|
-
5.
|
|
16
|
-
6.
|
|
17
|
-
7.
|
|
18
|
-
8.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
4. **Create a feature branch** from the base ref: `git checkout -b <branch-name> <base-ref>`. Never commit directly on the base branch. The branch name should reference the issue (e.g., `LEA-5-add-landing-hero`). If you are already on a correctly named feature branch, skip this step.
|
|
15
|
+
5. Verify you are on the feature branch before making changes: `git branch --show-current` must print `<branch-name>`, not the base ref. If it prints the base ref name, you forgot step 4 — create the branch now.
|
|
16
|
+
6. Make your changes
|
|
17
|
+
7. Run available checks (lint, typecheck, tests)
|
|
18
|
+
8. Commit using Conventional Commits: `<type>: <description>`
|
|
19
|
+
9. Verify the current branch one more time, then push: `git push -u origin <branch-name>`. The branch name in the push command must match `git branch --show-current`. Never push the base ref as a feature branch — if `git branch --show-current` returns the base ref name, stop and create a feature branch first.
|
|
20
|
+
10. Open a pull request against the base ref: `gh pr create --base <github-base-branch> --head <branch-name> --title "<type>: <description>" --body-file <file>`. Write the PR body (summary, what changed, how to verify) to a temp file first — never inline `--body "..."`. Register the PR as a Paperclip work product (see *Register the PR as a Work Product* below). Verify the PR base matches the configured base ref before merging.
|
|
21
|
+
11. Merge the PR yourself: `gh pr merge <PR-number> --merge`. After opening the PR, merge it yourself promptly — do not wait for a reviewer if none is present. Confirm the PR is closed and the base branch updated before continuing.
|
|
22
|
+
12. Clean up the feature branch: `git push origin --delete <branch-name>` (remote) and `git branch -d <branch-name>` (local). Update the Paperclip work product to `"status": "merged"` via `PATCH /api/work-products/{workProductId}`.
|
|
23
|
+
13. If the issue uses an isolated execution workspace (worktree), archive it from your `heartbeat-context` after the merge is pushed.
|
|
24
|
+
14. If CI fails on the base branch after the merge, fix immediately.
|
|
25
|
+
|
|
26
|
+
## Branch Protection Setup
|
|
27
|
+
|
|
28
|
+
Configure branch protection once during initial repository setup (this is part of the "Prepare GitHub repository" foundation issue). Branch protection must require a PR before merging but must NOT require GitHub-native approving reviews — all agents share one GitHub account and cannot formally approve their own PRs (unless the project has distinct non-author GitHub reviewer credentials, in which case `required_approving_review_count` may be raised).
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
gh api repos/{owner}/{repo}/branches/{base}/protection \
|
|
32
|
+
--method PUT --input - <<'EOF'
|
|
33
|
+
{
|
|
34
|
+
"required_status_checks": null,
|
|
35
|
+
"enforce_admins": true,
|
|
36
|
+
"required_pull_request_reviews": {
|
|
37
|
+
"required_approving_review_count": 0,
|
|
38
|
+
"dismiss_stale_reviews": false
|
|
39
|
+
},
|
|
40
|
+
"restrictions": null
|
|
41
|
+
}
|
|
42
|
+
EOF
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Replace `{owner}`, `{repo}`, `{base}` with the actual values. `enforce_admins: true` so the shared admin account cannot bypass the PR requirement with a direct push — with `required_approving_review_count: 0` the admin can still open a PR and merge it with zero approvals, so the self-merge flow keeps working. `restrictions: null` means no push allowlist; the PR gate still applies (do not "fix" it with an empty array, which would block all pushes). If CI is configured (e.g. the ci-cd module is active), replace `"required_status_checks": null` with the CI context string instead of `null`. Escalate to CEO if `GH_TOKEN` does not have admin rights on the repository.
|
|
26
46
|
|
|
27
47
|
## When PR Review IS Active
|
|
28
48
|
|
|
29
|
-
If the pr-review module is active
|
|
49
|
+
If the pr-review module is active, do NOT use the PR Self-Merge Flow. Instead, use the PR Workflow skill (`skills/pr-workflow.md`):
|
|
50
|
+
- **With a Code Reviewer on the team (PR-Gate mode):** Open a PR, set executionPolicy review stages, and let the Code Reviewer (non-author merge gate) land the branch. Never merge your own branch in this mode.
|
|
51
|
+
- **Without a Code Reviewer (PR Self-Merge Flow):** Open a PR via `gh pr create`, but skip executionPolicy stages entirely. Other review roles (qa, product-owner, security-engineer) may leave advisory comments. Merge the PR yourself via `gh pr merge <N> --merge` once CI is green. See `skills/pr-workflow.md` step 12 for the full self-merge path.
|
|
52
|
+
|
|
53
|
+
## Register the PR as a Work Product
|
|
54
|
+
|
|
55
|
+
Whenever you open a pull request (via `gh pr create`), immediately register it as a Paperclip work product so it shows up on the issue and the board. Creating the PR on GitHub alone does **not** make it visible in Paperclip.
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
POST /api/issues/{issueId}/work-products
|
|
59
|
+
Headers: Authorization: Bearer $PAPERCLIP_API_KEY, X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
|
|
60
|
+
{
|
|
61
|
+
"type": "pull_request",
|
|
62
|
+
"provider": "github",
|
|
63
|
+
"externalId": "<PR number, e.g. 132>",
|
|
64
|
+
"url": "<full PR URL from `gh pr create`>",
|
|
65
|
+
"title": "<PR title>",
|
|
66
|
+
"status": "ready_for_review",
|
|
67
|
+
"isPrimary": true
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Notes:
|
|
72
|
+
- `title` and `url` are required; `url` must be the full PR URL.
|
|
73
|
+
- If the issue runs in an isolated execution workspace, also pass `"executionWorkspaceId"` from your `heartbeat-context` so the PR is linked to that worktree.
|
|
74
|
+
- When the PR later merges or closes, update the work product (`PATCH /api/work-products/{workProductId}`) with `"status": "merged"` or `"closed"`.
|
|
30
75
|
|
|
31
76
|
## Rules
|
|
32
77
|
|
|
@@ -40,4 +85,6 @@ If the pr-review module is active and you have a Code Reviewer role on the team,
|
|
|
40
85
|
- Never mark an issue as `done` unless at least one new commit was created for that issue's work and has been pushed.
|
|
41
86
|
- Before marking `done`, verify there is no uncommitted work (`git status --short` should be clean).
|
|
42
87
|
- If no repository change is required, do not mark `done` silently: leave an issue comment explaining why no code change was needed and escalate to the CEO for decision.
|
|
43
|
-
-
|
|
88
|
+
- You are always the merge owner when no code-reviewer is present. Open a PR and merge it yourself via `gh pr merge <N> --merge` promptly — do not leave branches dangling unmerged. Never do a direct `git merge` + push to the base branch; always go through a PR so the branch history is preserved and branch protection is respected (typos/comment-only/doc fixes with an issue reference may be committed directly to the base ref only when branch protection allows it — see `docs/git-workflow.md` → *Dev Cycle Rules*).
|
|
89
|
+
- **Always work on a feature branch, never on the base branch.** Create the branch with `git checkout -b <branch-name> <base-ref>` before committing. Verify with `git branch --show-current` before every push.
|
|
90
|
+
- **Never push the base ref as if it were a feature branch.** Before `git push -u origin <branch-name>`, confirm that `git branch --show-current` matches `<branch-name>`. If it prints the base ref name instead, you are on the wrong branch — create or switch to the feature branch first.
|
|
@@ -79,29 +79,26 @@ Rules:
|
|
|
79
79
|
should print the helper path, and `test -s "$(git rev-parse --git-common-dir)/paperclip-gh-token-cache"`
|
|
80
80
|
should succeed after a run where `GH_TOKEN` was injected.
|
|
81
81
|
|
|
82
|
-
##
|
|
82
|
+
## PR Self-Merge Flow
|
|
83
83
|
|
|
84
|
-
Use this
|
|
84
|
+
Use this flow when the **pr-review module is not active** (no Code Reviewer role, no executionPolicy review stages). You open a PR and merge it yourself — there is no external review gate, but all changes go through a PR so branch history is preserved and branch protection is respected. When PR review is active, use the PR workflow from `docs/pr-conventions.md` instead.
|
|
85
85
|
|
|
86
86
|
1. Resolve the configured base ref from project workspace metadata or the issue's `heartbeat-context` before touching Git. Do not infer it from the current shell branch and do not rewrite it to `main`, `master`, or `origin/*`.
|
|
87
87
|
- External repos: use the project/worktree `repoRef`, `defaultRef`, or `executionWorkspacePolicy.workspaceStrategy.baseRef` exactly as configured.
|
|
88
88
|
- Fresh/local repos: use the configured local branch.
|
|
89
89
|
- Only if no base ref is configured anywhere, detect the repository's default branch — see *Resolving the default branch* below. Never hard-code `main`.
|
|
90
90
|
2. Pull/fetch latest from that base before editing.
|
|
91
|
-
3.
|
|
92
|
-
4.
|
|
93
|
-
5.
|
|
94
|
-
6.
|
|
95
|
-
7.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
8. Delete the feature branch: `git push origin --delete <branch-name>` and `git branch -d <branch-name>`
|
|
103
|
-
9. If the issue uses an isolated execution workspace (worktree), archive it from `heartbeat-context`.
|
|
104
|
-
10. Verify CI passes on the base branch (if configured). If CI fails, fix immediately.
|
|
91
|
+
3. **Create a feature branch** from the base ref: `git checkout -b <branch-name> <base-ref>`. Never commit directly on the base branch. The branch name should reference the issue (e.g., `LEA-5-add-landing-hero`). If you are already on a correctly named feature branch, skip this step.
|
|
92
|
+
4. **Verify you are on the feature branch** before making changes: `git branch --show-current` must print `<branch-name>`, not the base ref. If it prints the base ref name, you forgot step 3 — create the branch now.
|
|
93
|
+
5. Make changes
|
|
94
|
+
6. Run tests/linting locally if available
|
|
95
|
+
7. Commit with conventional commit message
|
|
96
|
+
8. **Verify the current branch one more time**, then push: `git push -u origin <branch-name>`. The branch name in the push command must match `git branch --show-current`. Never push the base ref as a feature branch — if `git branch --show-current` returns the base ref name, stop and create a feature branch first.
|
|
97
|
+
9. Open a pull request against the base ref: write the PR body to a temp file, then `gh pr create --base <github-base-branch> --head <branch-name> --title "<type>: <description>" --body-file <file>`. Never inline `--body "..."` — a double-quoted shell string keeps `\n` literal (see *Posting PR Bodies & Comments* in `docs/pr-conventions.md`). Verify the PR base matches the configured base ref before merging.
|
|
98
|
+
10. Merge the PR yourself: `gh pr merge <PR-number> --merge`. Do not wait for a reviewer if none is present. Confirm the PR is closed and the base branch updated before continuing. Never do a direct `git merge` + push to the base branch; always go through a PR.
|
|
99
|
+
11. Clean up the feature branch: `git push origin --delete <branch-name>` (remote) and `git branch -d <branch-name>` (local).
|
|
100
|
+
12. If the issue uses an isolated execution workspace (worktree), archive it from `heartbeat-context` after the merge is pushed.
|
|
101
|
+
13. Verify CI passes on the base branch (if configured). If CI fails, fix immediately.
|
|
105
102
|
|
|
106
103
|
## Resolving the default branch
|
|
107
104
|
|
|
@@ -143,6 +140,11 @@ For a brand-new local repository there is no remote yet, so initialize on `main`
|
|
|
143
140
|
- If Paperclip created an isolated execution workspace for this issue, close/archive it after the commit/PR has landed and before marking `done`. If cleanup is blocked or fails, leave the issue open with the exact cleanup blocker. If the issue is in the shared project workspace, do not invent isolated-worktree cleanup.
|
|
144
141
|
- If no repository change is required, do not silently close as `done`: add an issue comment explaining why no code change was needed and escalate to the CEO for explicit decision.
|
|
145
142
|
|
|
143
|
+
## Branch Safety
|
|
144
|
+
|
|
145
|
+
- **Always work on a feature branch, never on the base branch.** Create the branch with `git checkout -b <branch-name> <base-ref>` before committing any changes. If you are resuming work on an existing issue, `git branch --show-current` should already show the feature branch name.
|
|
146
|
+
- **Verify your branch before pushing.** Before running `git push -u origin <branch-name>`, confirm that `git branch --show-current` prints the feature branch name — not the base ref. If it prints the base ref, you are on the wrong branch: stop and create/switch to the feature branch first. Pushing the base ref as a feature branch corrupts upstream tracking and causes incorrect branch divergence reports.
|
|
147
|
+
|
|
146
148
|
## CI
|
|
147
149
|
|
|
148
150
|
If the project has CI configured (e.g., GitHub Actions), always verify your push passes CI. If CI fails, fix it immediately — a broken base ref blocks everyone.
|
|
@@ -12,7 +12,7 @@ You own market research with a focus on user needs and behavior. This is your co
|
|
|
12
12
|
- **Positioning**: Where the biggest user need gaps are
|
|
13
13
|
- **Risks**: Adoption barriers, user switching costs, behavioral resistance
|
|
14
14
|
3. Create follow-up issues for deeper research if needed:
|
|
15
|
-
- `POST /api/companies/{companyId}/issues` for user interview plans, usability benchmarks. Include the active `projectId` (and `goalId` / `parentId` when applicable).
|
|
15
|
+
- `POST /api/companies/{companyId}/issues` for user interview plans, usability benchmarks. Include the active `projectId` (and `goalId` / `parentId` when applicable). For top-level issues (no `parentId`), also include `"executionWorkspaceSettings": { "mode": "isolated_workspace" }` so each gets its own worktree; subissues set `parentId` and omit it.
|
|
16
16
|
4. Share findings by updating the assigned issue/document and assigning concrete follow-up actions to the Product Owner and CEO when needed; do not rely on generic @-mentions.
|
|
17
17
|
|
|
18
18
|
## Rules
|
|
@@ -11,7 +11,7 @@ You own market research and competitive analysis. This informs the product roadm
|
|
|
11
11
|
- **Positioning**: How do we differentiate? What's our unique value proposition?
|
|
12
12
|
- **Risks**: Market risks, timing risks, adoption barriers
|
|
13
13
|
3. Create follow-up issues for any strategic decisions needed:
|
|
14
|
-
- `POST /api/companies/{companyId}/issues` with findings that require input. Include the active `projectId` (and `goalId` / `parentId` when applicable).
|
|
14
|
+
- `POST /api/companies/{companyId}/issues` with findings that require input. Include the active `projectId` (and `goalId` / `parentId` when applicable). For top-level issues (no `parentId`), also include `"executionWorkspaceSettings": { "mode": "isolated_workspace" }` so each gets its own worktree; subissues set `parentId` and omit it.
|
|
15
15
|
4. Record summary in your daily notes
|
|
16
16
|
|
|
17
17
|
## Rules
|
|
@@ -14,16 +14,14 @@ You review PRs for infrastructure impact, performance, security, and operational
|
|
|
14
14
|
|
|
15
15
|
## How to Review
|
|
16
16
|
|
|
17
|
-
1. When
|
|
17
|
+
1. When a PR changes deployments, configs, dependencies, or system behavior, review it for the infra concerns below.
|
|
18
18
|
2. Focus on infrastructure, deployment, runtime security, observability, and rollback risk.
|
|
19
|
-
3.
|
|
20
|
-
|
|
21
|
-
- **changes_requested** with specific concerns if not
|
|
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*.
|
|
19
|
+
3. Post your verdict as an **advisory** GitHub PR comment — you are not a blocking review stage, so do not record a stage verdict (no `approved`/`changes_requested` on the issue's executionPolicy). Write the comment 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*.
|
|
20
|
+
4. If you find a concern that should block the merge, flag it as **blocking-severity** in the comment and name who should act on it — for security issues (exposed secrets, critical vulnerabilities), that is the Security Engineer review stage when one exists, otherwise QA or the Code Reviewer merge gate — so a blocking reviewer can incorporate it into their verdict. You do not block the merge yourself.
|
|
23
21
|
|
|
24
22
|
## Rules
|
|
25
23
|
|
|
26
|
-
-
|
|
27
|
-
- Performance concerns are
|
|
28
|
-
-
|
|
24
|
+
- Flag security issues (exposed secrets, critical vulnerabilities) as blocking-severity in your advisory comment so the Security Engineer (or merge gate) acts on them; you do not yourself withhold a stage verdict. When a Security Engineer review stage exists, defer security blocking to it.
|
|
25
|
+
- Performance concerns are blocking-severity only if they affect production; flag others as suggestions.
|
|
26
|
+
- Comment only on changes with infrastructure impact.
|
|
29
27
|
- If a change needs a migration or deployment step, ensure it's documented in the PR.
|
|
@@ -9,20 +9,38 @@ When this skill is active, you work in feature branches and open PRs instead of
|
|
|
9
9
|
- external: `git fetch origin`, then branch from the configured base ref
|
|
10
10
|
- local: update from the configured local branch
|
|
11
11
|
3. Create branch from that base: `git checkout -b <prefix>-<N>/<short-description> <base-ref>`
|
|
12
|
-
4.
|
|
13
|
-
5.
|
|
14
|
-
6.
|
|
15
|
-
7.
|
|
12
|
+
4. **Verify you are on the feature branch** before making changes: `git branch --show-current` must print your branch name, not the base ref. If it prints the base ref name, you forgot step 3 — create the branch now.
|
|
13
|
+
5. Make your changes, commit with Conventional Commits format
|
|
14
|
+
6. **Verify the current branch one more time**, then push: `git push -u origin <branch-name>`. The branch name in the push command must match `git branch --show-current`. Never push the base ref as a feature branch — if `git branch --show-current` returns the base ref name, stop and create a feature branch first.
|
|
15
|
+
7. Open PR against the same resolved base: derive the GitHub base branch from the configured ref (for example, strip the remote prefix only when the ref is remote-tracking), write the body (PR Body Template in `docs/pr-conventions.md`) to a file, then `gh pr create --base <github-base-branch> --head <branch-name> --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*).
|
|
16
|
+
8. **Register the PR as a Paperclip work product** so it is visible on the issue and board (creating it on GitHub alone does not surface it in Paperclip):
|
|
17
|
+
```
|
|
18
|
+
POST /api/issues/{issueId}/work-products
|
|
19
|
+
Headers: Authorization: Bearer $PAPERCLIP_API_KEY, X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
|
|
20
|
+
{
|
|
21
|
+
"type": "pull_request",
|
|
22
|
+
"provider": "github",
|
|
23
|
+
"externalId": "<PR number>",
|
|
24
|
+
"url": "<full PR URL>",
|
|
25
|
+
"title": "<PR title>",
|
|
26
|
+
"status": "ready_for_review",
|
|
27
|
+
"isPrimary": true
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
`title` and `url` are required (`url` must be the full PR URL). If the issue runs in an isolated worktree, also pass `"executionWorkspaceId"` from `heartbeat-context`. When the PR later merges, update it with `PATCH /api/work-products/{id}` and `"status": "merged"`.
|
|
31
|
+
9. **Only if a code-reviewer is present on the team:** Set the originating issue's `executionPolicy` to gate the merge on review, ending with the Code Reviewer as the merge gate. If no code-reviewer is assigned to this company, skip steps 9–11 entirely and go directly to the self-merge path at step 12. Setting up executionPolicy stages without an eligible non-author merge gate will stall the issue permanently (`422 No eligible approval participant`).
|
|
16
32
|
- One `review` stage with **QA** when a QA agent exists (test adequacy / executed verification).
|
|
17
33
|
- One `review` stage with the **Security Engineer** only when the change is security-relevant (auth, secrets, input boundaries, crypto, dependencies, infra exposure).
|
|
18
|
-
-
|
|
19
|
-
- An `approval` stage with the **Product Owner**
|
|
20
|
-
- A final `approval` stage with the **Code Reviewer** as participant — the **merge gate**. The Code Reviewer is woken *last*, after every reviewer and the Product Owner have cleared, to satisfy the hard verification gate and merge the PR. If the team has no Code Reviewer,
|
|
34
|
+
- Domain reviewers (UI Designer, UX Researcher, DevOps) are advisory — they post PR comments and may flag a concern for QA, the Security Engineer, or the merge gate to act on. They are never themselves a review stage.
|
|
35
|
+
- An `approval` stage with the **Product Owner** when a Product Owner is on the team — the product sign-off. If no Product Owner is present, omit this stage.
|
|
36
|
+
- A final `approval` stage with the **Code Reviewer** as participant — the **merge gate**. The Code Reviewer is woken *last*, after every reviewer and the Product Owner have cleared, to satisfy the hard verification gate and merge the PR. If the team has no Code Reviewer, do not set executionPolicy stages at all — use the self-merge path at step 12 instead.
|
|
21
37
|
- **Never list yourself (the issue's executor) as a participant in any stage.** Paperclip excludes the original executor to prevent self-review; a stage whose only participant is you has no eligible participant and the issue stalls in `in_review` forever (`422 No eligible approval participant is configured for this issue`).
|
|
22
38
|
- 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.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
39
|
+
10. Move the originating issue to `in_review`.
|
|
40
|
+
11. Wait for the issue to clear its review/approval stages. Each reviewer and the Product Owner records `approved` by PATCHing the issue toward `done`, or `changes_requested` by PATCHing it back to `in_progress`; Paperclip stores the reviewer/approver decision metadata on the issue. 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.
|
|
41
|
+
12. **Merging the PR — two paths:**
|
|
42
|
+
- **Code Reviewer present (PR-Gate mode):** You do not merge your own PR. The Code Reviewer (the non-author merge gate) lands it after every prior stage approves, satisfies the hard verification gate (green CI or pasted test/build output), and records the final `approved` that closes the issue to `done`. Your job is to respond to `changes_requested`: when a stage routes the issue back to you, address the feedback, push to the same branch, and the stage re-runs.
|
|
43
|
+
- **No code-reviewer present (PR Self-Merge Flow):** You already skipped steps 9–11. Merge the PR yourself: `gh pr merge <N> --merge` once CI is green (or you have pasted test/build output if no CI). All other review roles (qa, product-owner, security-engineer, ui-designer, ux-researcher, devops) may leave advisory comments on the PR, but none block the merge — there are no executionPolicy stages. Update the Paperclip work product to `"status": "merged"` and archive any isolated worktree.
|
|
26
44
|
|
|
27
45
|
## Rules
|
|
28
46
|
|
|
@@ -30,9 +48,10 @@ When this skill is active, you work in feature branches and open PRs instead of
|
|
|
30
48
|
- One PR per issue. Keep changes focused.
|
|
31
49
|
- Always include `Closes [PREFIX-N]` in the PR body.
|
|
32
50
|
- If a reviewer requests changes, address them, push to the same branch, and re-request review (the stage re-runs).
|
|
33
|
-
-
|
|
51
|
+
- When a code-reviewer is present: the Code Reviewer is the merge owner; you cannot merge your own PR (Paperclip excludes the executor). When no code-reviewer is present: you are the merge owner; skip executionPolicy stages and merge via `gh pr merge <N> --merge` yourself.
|
|
34
52
|
- Before creating a PR, verify the PR base matches the configured project/worktree base. If the base is wrong, retarget the PR before review.
|
|
35
|
-
- **The merge gate must be the last stage, and it must be a non-author.** 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` with the PR still open on GitHub. Append a final merge-gate `approval` stage for the **Code Reviewer**
|
|
53
|
+
- **The merge gate must be the last stage, and it must be a non-author.** 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` with the PR still open on GitHub. Append a final merge-gate `approval` stage for the **Code Reviewer** after the Product Owner's. Never make yourself the merge gate — Paperclip excludes the executor, so that stage stalls with `422 No eligible approval participant`. If no Code Reviewer is on the team, do not set executionPolicy stages; use the self-merge path instead.
|
|
36
54
|
- Do not create separate child review issues and do not use @-mentions to request review; the executionPolicy stages are the governance signal.
|
|
37
55
|
- 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.
|
|
38
56
|
- Post-merge cleanup of any isolated execution workspace belongs to the merge-gate agent (they archive it from `heartbeat-context` when landing the PR). You only clean up your own worktree if you abandon a branch or the issue is cancelled before review. If this issue runs in the shared project workspace, do not invent isolated-worktree cleanup.
|
|
57
|
+
- **Never push the base ref as if it were a feature branch.** Before `git push -u origin <branch-name>`, confirm that `git branch --show-current` matches `<branch-name>`. If it prints the base ref name instead, you are on the wrong branch — create or switch to the feature branch first.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Skill: Product Review
|
|
2
2
|
|
|
3
|
-
You review PRs for intent alignment, scope discipline, and acceptance criteria. You are the
|
|
3
|
+
You review PRs for intent alignment, scope discipline, and acceptance criteria. You are the product sign-off — the participant of the `approval` stage on the PR's issue immediately before the Code Reviewer merge gate. Your `approved` is required before the merge gate lands the PR, but you are not the final stage: the Code Reviewer's subsequent merge-gate approval is what closes the issue.
|
|
4
4
|
|
|
5
5
|
## Review Checklist
|
|
6
6
|
|
|
@@ -25,4 +25,5 @@ You review PRs for intent alignment, scope discipline, and acceptance criteria.
|
|
|
25
25
|
- Every PR should trace back to an issue. If it doesn't, ask why.
|
|
26
26
|
- Reject scope creep firmly but constructively — suggest filing a separate issue.
|
|
27
27
|
- If acceptance criteria are ambiguous, clarify them before approving.
|
|
28
|
-
- Your approval stage verdict is the final 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.
|
|
28
|
+
- Your approval stage verdict is the product sign-off; the Code Reviewer's subsequent merge-gate approval is the final governance signal that closes the issue. 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.
|
|
29
|
+
- You are not a merge owner. If a Code Reviewer is absent and the team is using the PR Self-Merge Flow, the engineer merges the PR themselves; your role is advisory in that mode — post product concerns as PR comments, do not record a stage verdict.
|
|
@@ -14,16 +14,14 @@ You review PRs for visual quality, brand consistency, and accessibility. When a
|
|
|
14
14
|
|
|
15
15
|
## How to Review
|
|
16
16
|
|
|
17
|
-
1. When
|
|
17
|
+
1. When a PR touches UI components, styles, or user-facing screens, review it for the design concerns below.
|
|
18
18
|
2. Focus only on visual/design concerns — leave code logic to Code Reviewer and product scope to Product Owner.
|
|
19
|
-
3.
|
|
20
|
-
|
|
21
|
-
- **changes_requested** with specific, actionable feedback if not
|
|
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*.
|
|
19
|
+
3. Post your verdict as an **advisory** GitHub PR comment — you are not a blocking review stage, so do not record a stage verdict (no `approved`/`changes_requested` on the issue's executionPolicy). Write the comment 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*.
|
|
20
|
+
4. If you find a concern that should block the merge (e.g. a critical accessibility regression or a brand-violating change), flag it explicitly in the comment and name who should act on it — QA, the Security Engineer, or the Code Reviewer merge gate — so a blocking reviewer can incorporate it into their verdict. You do not block the merge yourself.
|
|
23
21
|
|
|
24
22
|
## Rules
|
|
25
23
|
|
|
26
24
|
- Be specific — "the button should use `--color-primary`" beats "wrong color".
|
|
27
|
-
-
|
|
25
|
+
- Comment only on changes that touch UI — not every PR needs design review.
|
|
28
26
|
- If `docs/BRAND-IDENTITY.md` doesn't exist yet, note it but don't block the PR.
|
|
29
27
|
- Screenshots or before/after comparisons strengthen feedback when possible.
|