@starlein/paperclip-plugin-company-wizard 0.4.5 → 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 +58 -0
- package/README.md +7 -5
- package/dist/manifest.js +4 -9
- package/dist/manifest.js.map +2 -2
- package/dist/ui/index.css +82 -0
- package/dist/ui/index.css.map +2 -2
- package/dist/ui/index.js +423 -139
- package/dist/ui/index.js.map +4 -4
- package/dist/worker.js +589 -58
- 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/README.md +9 -7
- package/templates/modules/auto-assign/agents/ceo/heartbeat-section.md +3 -1
- package/templates/modules/auto-assign/agents/ceo/skills/auto-assign.fallback.md +14 -8
- package/templates/modules/auto-assign/agents/product-owner/heartbeat-section.md +3 -1
- package/templates/modules/auto-assign/module.meta.json +3 -3
- package/templates/modules/auto-assign/skills/auto-assign.md +2 -2
- 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 +45 -8
- package/templates/modules/backlog/docs/backlog-template.md +3 -2
- package/templates/modules/backlog/module.meta.json +3 -3
- package/templates/modules/backlog/skills/backlog-health.bar.md +3 -1
- package/templates/modules/backlog/skills/backlog-health.md +8 -5
- package/templates/modules/competitive-intel/skills/competitive-tracking.md +1 -1
- package/templates/modules/github-repo/README.md +3 -3
- package/templates/modules/github-repo/agents/engineer/skills/git-workflow.md +72 -9
- package/templates/modules/github-repo/docs/git-workflow.md +65 -6
- package/templates/modules/github-repo/module.meta.json +1 -1
- 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/AGENTS.md +2 -0
- package/templates/roles/engineer/HEARTBEAT.md +1 -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/AGENTS.md +2 -1
- package/templates/roles/product-owner/HEARTBEAT.md +1 -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
|
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
# Module: auto-assign
|
|
2
2
|
|
|
3
|
-
Adds
|
|
3
|
+
Adds a low-frequency safety net for issue assignment. Primary dispatch happens at backlog grooming — issues are assigned at creation. This module only catches stragglers.
|
|
4
4
|
|
|
5
5
|
## What it adds
|
|
6
6
|
|
|
7
|
-
- **
|
|
7
|
+
- **Product Owner skill**: Safety-net assignment check — assigns any still-unassigned backlog items to the best-fit available agent.
|
|
8
|
+
- **CEO fallback skill**: Steps in when the PO is absent or stalled.
|
|
8
9
|
|
|
9
10
|
## How it works
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
Primary assignment happens during backlog grooming: the Product Owner creates issues and assigns each to the best-fit agent immediately. The auto-assign routine is a **safety net** that runs every 4 hours to catch anything that slipped through:
|
|
13
|
+
|
|
12
14
|
1. Are there unassigned issues in `todo` status?
|
|
13
|
-
2.
|
|
14
|
-
3. If
|
|
15
|
+
2. Do those issues have enough acceptance criteria and no unresolved blockers?
|
|
16
|
+
3. If yes: assign every suitable straggler to the best-fit available role in one pass — do not drip-feed one issue per routine run.
|
|
15
17
|
|
|
16
18
|
## Best for
|
|
17
19
|
|
|
18
|
-
-
|
|
20
|
+
- Catching assignment misses without relying on manual cleanup
|
|
19
21
|
- Any team size — works with one engineer or many
|
|
20
22
|
|
|
21
23
|
## Example
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
The Product Owner normally assigns issues at creation during backlog grooming. If one slips through unassigned, the safety-net routine assigns it on the next pass and the assignee wakes on the assignment trigger.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
## Auto-Assign Routine Fallback
|
|
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
|
+
|
|
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.
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
# Skill: Auto-Assign (Fallback)
|
|
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** behind that primary path. You step in only if the PO is absent, stalled, or agents are critically idle.
|
|
4
4
|
|
|
5
5
|
## Assignment Check (Fallback)
|
|
6
6
|
|
|
7
7
|
On your heartbeat, after handling your own assignments:
|
|
8
8
|
|
|
9
|
-
1.
|
|
10
|
-
2.
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
9
|
+
1. Confirm this is the active routine-run issue and checkout it before mutating the board.
|
|
10
|
+
2. Query unassigned ready issues: `GET /api/companies/{companyId}/issues?status=todo` (filter for unassigned).
|
|
11
|
+
3. If unassigned issues are available AND the Product Owner hasn't acted recently:
|
|
12
|
+
- Assign every suitable still-unassigned issue to its best-fit available agent (an agent may hold a short queue): `PATCH /api/issues/{id}` with `assigneeAgentId` and an assignment comment.
|
|
13
|
+
- Clear stragglers in one pass instead of drip-feeding one issue per run.
|
|
14
|
+
4. If the Product Owner is active, skip this step.
|
|
15
|
+
5. Leave a routine-run comment summarizing assigned issue ids and skipped issue ids.
|
|
16
|
+
6. Mark the routine-run issue done when complete.
|
|
14
17
|
|
|
15
18
|
## Rules
|
|
16
19
|
|
|
17
|
-
- This is a safety net. Let the PO own assignment.
|
|
18
|
-
-
|
|
20
|
+
- This is a safety net behind backlog grooming's direct assignment. Let the PO own assignment.
|
|
21
|
+
- Clear stragglers in one pass instead of drip-feeding one issue per run.
|
|
22
|
+
- Do not run this from normal heartbeats.
|
|
23
|
+
- Do not self-assign random unassigned work.
|
|
24
|
+
- If no suitable match exists, leave the issue unassigned and state the reason in the routine-run comment.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
## Auto-Assign Routine
|
|
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
|
+
|
|
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auto-assign",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "Safety net that assigns any still-unowned backlog items to available agents. Primary dispatch happens at backlog grooming (issues are assigned at creation); this low-frequency routine only catches stragglers.",
|
|
4
4
|
"permissions": [
|
|
5
5
|
"tasks:assign"
|
|
6
6
|
],
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"routines": [
|
|
18
18
|
{
|
|
19
19
|
"title": "Auto-assign unassigned issues",
|
|
20
|
-
"description": "
|
|
20
|
+
"description": "Safety-net routine-run checklist (primary assignment happens at backlog grooming, so this usually finds nothing): review any still-unassigned todo issues, assign each actionable item to its best-fit available agent based on role/workload — clear out all stragglers, not one at a time — record evidence and next actions on the routine issue, then exit.",
|
|
21
21
|
"assignTo": "capability:auto-assign",
|
|
22
|
-
"schedule": "0 */
|
|
22
|
+
"schedule": "0 */4 * * *",
|
|
23
23
|
"priority": "medium",
|
|
24
24
|
"concurrencyPolicy": "skip_if_active"
|
|
25
25
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Skill: Auto-Assign
|
|
2
2
|
|
|
3
|
-
You own issue assignment when you are explicitly assigned an auto-assignment routine run. This is not an every-heartbeat background scan.
|
|
3
|
+
You own issue assignment when you are explicitly assigned an auto-assignment routine run. This is a low-frequency **safety net** behind backlog grooming, which assigns issues at creation — so most runs find nothing to do. This is not an every-heartbeat background scan.
|
|
4
4
|
|
|
5
5
|
## When To Use This Skill
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ Use this only when the current assigned issue/routine is titled like "Auto-assig
|
|
|
13
13
|
3. Query candidate issues using the board's current issue API for unassigned `todo` work, scoped to the relevant project/goal when the routine has one.
|
|
14
14
|
4. Skip issues that are blocked, awaiting approval/review, missing acceptance criteria, or already have active execution state.
|
|
15
15
|
5. Match issue labels, required skills, project context, and priority to agent role/capabilities.
|
|
16
|
-
6. Assign
|
|
16
|
+
6. Assign every suitable still-unassigned issue to its best-fit available agent (an agent may hold a short queue): `PATCH /api/issues/{id}` with `assigneeAgentId` and an assignment comment explaining why. As a safety net, clear out all stragglers in one pass rather than dispatching one at a time.
|
|
17
17
|
7. Leave a routine-run comment summarizing assigned issue ids, skipped issue ids, and gaps needing Product Owner/CEO attention.
|
|
18
18
|
8. Mark the routine-run issue done when complete.
|
|
19
19
|
|
|
@@ -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,10 +9,10 @@ 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`.
|
|
13
|
-
3. **Pipeline health** — The backlog owner monitors
|
|
14
|
-
4. **Assignment** — Issues are
|
|
15
|
-
5. **Execution** — Agents check out assigned issues, work them, and
|
|
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
|
+
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
|
+
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
|
+
5. **Execution** — Agents check out assigned issues, work them, and hand off deliberately for review or completion.
|
|
16
16
|
|
|
17
17
|
## Issue Quality
|
|
18
18
|
|
|
@@ -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:
|
|
@@ -50,13 +83,17 @@ Re-prioritize when milestones shift or new information arrives. Don't let low-pr
|
|
|
50
83
|
|
|
51
84
|
## Backlog Health Indicators
|
|
52
85
|
|
|
53
|
-
- **Healthy**:
|
|
54
|
-
- **Thin**:
|
|
55
|
-
- **Empty**:
|
|
56
|
-
- **Bloated**: 20+
|
|
86
|
+
- **Healthy**: about 8 ready assigned issues across active delivery roles, covering the next logical chunk of work
|
|
87
|
+
- **Thin**: fewer than 4 ready assigned issues — generate and assign more soon
|
|
88
|
+
- **Empty**: no ready assigned issues — engineers will idle. Generate and assign immediately.
|
|
89
|
+
- **Bloated**: 20+ ready issues — stop creating, focus on prioritization and cleanup
|
|
57
90
|
|
|
58
91
|
## Coordination
|
|
59
92
|
|
|
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.
|
|
@@ -36,9 +36,10 @@ Add more labels as the project evolves (e.g., `docs`, `design`, `security`). Pic
|
|
|
36
36
|
|
|
37
37
|
_Summary of current backlog health. Update on each heartbeat cycle._
|
|
38
38
|
|
|
39
|
-
- **
|
|
39
|
+
- **Ready assigned issues:** _(count by owner)_
|
|
40
|
+
- **Unassigned todo issues:** _(count; should normally be 0 except items without a suitable owner)_
|
|
40
41
|
- **In-progress issues:** _(count)_
|
|
41
|
-
- **Health:** _(healthy / thin / empty / bloated — see backlog-process.md)_
|
|
42
|
+
- **Health:** _(healthy / thin / empty / bloated — see docs/backlog-process.md)_
|
|
42
43
|
|
|
43
44
|
## Decisions Log
|
|
44
45
|
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
"title": "Create roadmap and generate initial backlog",
|
|
17
17
|
"assignTo": "capability:backlog-health",
|
|
18
18
|
"priority": "high",
|
|
19
|
-
"description": "Review the company goal, create a ROADMAP.md with milestones, then generate an initial backlog of 15-20 actionable issues from it so the team has immediate, parallelizable work. Scope each issue to a single deliverable, set priorities, and link issues to the relevant goal and project. Don't wait for grooming cycles to fill the backlog — seed it now."
|
|
19
|
+
"description": "Review the company goal, create a ROADMAP.md with milestones, then generate an initial backlog of 15-20 actionable issues from it so the team has immediate, parallelizable work. Scope each issue to a single deliverable, set priorities, and link issues to the relevant goal and project. Assign each engineer-actionable issue to the best-fit agent (e.g., the Software Engineer) as you create it so work starts immediately — don't leave the seed backlog unassigned. Don't wait for grooming cycles to fill the backlog — seed it now."
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
22
|
"routines": [
|
|
23
23
|
{
|
|
24
24
|
"title": "Backlog grooming",
|
|
25
|
-
"description": "Routine-run checklist: inspect roadmap/backlog health, ensure at least 8 actionable ready issues exist, create scoped issues
|
|
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
|
-
-
|
|
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.
|
|
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
|
|
|
@@ -28,12 +28,13 @@ Add additional labels if the roadmap calls for them (e.g., `docs`, `design`, `se
|
|
|
28
28
|
1. Checkout the assigned backlog/routine issue before mutating the board.
|
|
29
29
|
2. Read the current company goals, roadmap/project context, existing issue documents, and recent decision log entries.
|
|
30
30
|
3. Query existing issues for the relevant project/goal and avoid duplicates.
|
|
31
|
-
4. If the backlog is thin or unclear, create 3-
|
|
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
|
|
@@ -10,8 +10,8 @@ Enables the Engineer to work in a GitHub repository.
|
|
|
10
10
|
|
|
11
11
|
## Variants
|
|
12
12
|
|
|
13
|
-
- **direct-to-base-ref** (default): Engineer
|
|
14
|
-
- When combined with `pr-review` module: switches to feature-branch workflow
|
|
13
|
+
- **direct-to-base-ref** (default): Engineer works on a feature branch, then merges to the base branch and pushes. No PRs, no code review gate — the engineer merges their own work and hands off to the Product Owner for acceptance review via `in_review` status reassignment. Fast iteration for solo or small teams.
|
|
14
|
+
- When combined with `pr-review` module: switches to feature-branch + PR workflow with executionPolicy review stages and a non-author merge gate.
|
|
15
15
|
|
|
16
16
|
## Best for
|
|
17
17
|
|
|
@@ -21,4 +21,4 @@ Enables the Engineer to work in a GitHub repository.
|
|
|
21
21
|
|
|
22
22
|
## Example
|
|
23
23
|
|
|
24
|
-
A company building a web app with one engineer. The engineer picks up issues, implements them,
|
|
24
|
+
A company building a web app with one engineer. The engineer picks up issues, implements them on feature branches, merges to base, pushes, and reassigns to the Product Owner for acceptance review. CI runs on push.
|
|
@@ -2,17 +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
|
-
|
|
8
|
-
|
|
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
|
+
|
|
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
|
+
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
|
+
3. Pull/update latest from that base:
|
|
9
12
|
- external: `git fetch origin`, then integrate from the configured base ref
|
|
10
13
|
- local: update from the configured local branch
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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.
|
|
46
|
+
|
|
47
|
+
## When PR Review IS Active
|
|
48
|
+
|
|
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"`.
|
|
16
75
|
|
|
17
76
|
## Rules
|
|
18
77
|
|
|
@@ -20,8 +79,12 @@ You work in a GitHub repository. Follow the conventions in `docs/git-workflow.md
|
|
|
20
79
|
- Keep commits focused — one concern per commit.
|
|
21
80
|
- Never force push to the base branch.
|
|
22
81
|
- Use the configured base ref. For external repos, branch and compare from the configured remote/ref and push/merge back to the matching remote branch.
|
|
82
|
+
- Treat push authentication as repository setup, not as an issue blocker. If `git push` says credentials are missing or invalid, verify the helper and `GH_TOKEN` binding first.
|
|
23
83
|
- If you encounter merge conflicts, resolve them carefully. When in doubt, escalate to the CEO.
|
|
24
84
|
- Reference the issue ID in the commit body (e.g., `Closes YES-5`).
|
|
25
|
-
- Never mark an issue as `done` unless at least one new commit was created for that issue's work and pushed.
|
|
85
|
+
- Never mark an issue as `done` unless at least one new commit was created for that issue's work and has been pushed.
|
|
26
86
|
- Before marking `done`, verify there is no uncommitted work (`git status --short` should be clean).
|
|
27
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.
|
|
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.
|