@starlein/paperclip-plugin-company-wizard 0.3.23 → 0.4.1

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.
Files changed (68) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.md +18 -13
  3. package/dist/manifest.js +1 -6
  4. package/dist/manifest.js.map +2 -2
  5. package/dist/ui/index.css +3 -0
  6. package/dist/ui/index.css.map +2 -2
  7. package/dist/ui/index.js +59 -30
  8. package/dist/ui/index.js.map +3 -3
  9. package/dist/worker.js +315 -86
  10. package/dist/worker.js.map +3 -3
  11. package/package.json +1 -1
  12. package/templates/ai-wizard/config-format.md +4 -4
  13. package/templates/ai-wizard/interview-system.md +3 -3
  14. package/templates/ai-wizard/single-shot-system.md +3 -3
  15. package/templates/bootstrap-instructions.md +3 -3
  16. package/templates/modules/architecture-plan/agents/ui-designer/skills/design-system.md +1 -1
  17. package/templates/modules/auto-assign/agents/ceo/heartbeat-section.md +2 -8
  18. package/templates/modules/auto-assign/agents/product-owner/heartbeat-section.md +2 -9
  19. package/templates/modules/auto-assign/module.meta.json +1 -1
  20. package/templates/modules/auto-assign/skills/auto-assign.md +18 -15
  21. package/templates/modules/backlog/agents/ceo/heartbeat-section.md +2 -9
  22. package/templates/modules/backlog/agents/product-owner/heartbeat-section.md +2 -14
  23. package/templates/modules/backlog/module.meta.json +1 -1
  24. package/templates/modules/backlog/skills/backlog-health.md +20 -21
  25. package/templates/modules/codebase-onboarding/skills/codebase-audit.md +29 -30
  26. package/templates/modules/github-repo/agents/engineer/skills/git-workflow.md +11 -7
  27. package/templates/modules/github-repo/docs/git-workflow.md +10 -6
  28. package/templates/modules/hiring-review/skills/hiring-review.md +40 -16
  29. package/templates/modules/market-analysis/agents/ux-researcher/skills/market-analysis.md +1 -1
  30. package/templates/modules/pr-review/README.md +13 -13
  31. package/templates/modules/pr-review/agents/code-reviewer/skills/code-review.md +16 -21
  32. package/templates/modules/pr-review/agents/devops/skills/infra-review.md +1 -1
  33. package/templates/modules/pr-review/agents/engineer/skills/pr-workflow.md +17 -11
  34. package/templates/modules/pr-review/agents/product-owner/skills/product-review.md +1 -1
  35. package/templates/modules/pr-review/agents/qa/skills/qa-review.md +40 -19
  36. package/templates/modules/pr-review/agents/security-engineer/skills/pr-security-review.md +27 -0
  37. package/templates/modules/pr-review/agents/ui-designer/skills/design-review.md +1 -1
  38. package/templates/modules/pr-review/agents/ux-researcher/skills/ux-review.md +1 -1
  39. package/templates/modules/pr-review/docs/pr-conventions.md +35 -23
  40. package/templates/modules/pr-review/module.meta.json +4 -3
  41. package/templates/modules/stall-detection/README.md +8 -8
  42. package/templates/modules/stall-detection/agents/ceo/heartbeat-section.md +2 -11
  43. package/templates/modules/stall-detection/agents/ceo/skills/stall-detection.md +22 -13
  44. package/templates/modules/stall-detection/module.meta.json +1 -1
  45. package/templates/modules/triage/skills/issue-triage.md +20 -33
  46. package/templates/roles/audio-designer/HEARTBEAT.md +37 -21
  47. package/templates/roles/ceo/HEARTBEAT.md +34 -56
  48. package/templates/roles/cmo/HEARTBEAT.md +37 -21
  49. package/templates/roles/code-reviewer/AGENTS.md +1 -1
  50. package/templates/roles/code-reviewer/HEARTBEAT.md +39 -19
  51. package/templates/roles/cto/HEARTBEAT.md +33 -25
  52. package/templates/roles/customer-success/HEARTBEAT.md +39 -19
  53. package/templates/roles/devops/HEARTBEAT.md +36 -25
  54. package/templates/roles/engineer/AGENTS.md +27 -9
  55. package/templates/roles/engineer/HEARTBEAT.md +35 -21
  56. package/templates/roles/game-artist/HEARTBEAT.md +37 -21
  57. package/templates/roles/game-designer/HEARTBEAT.md +37 -21
  58. package/templates/roles/level-designer/HEARTBEAT.md +37 -21
  59. package/templates/roles/product-owner/AGENTS.md +24 -8
  60. package/templates/roles/product-owner/HEARTBEAT.md +37 -19
  61. package/templates/roles/qa/AGENTS.md +26 -11
  62. package/templates/roles/qa/HEARTBEAT.md +37 -21
  63. package/templates/roles/security-engineer/AGENTS.md +21 -23
  64. package/templates/roles/security-engineer/HEARTBEAT.md +39 -19
  65. package/templates/roles/technical-writer/HEARTBEAT.md +39 -18
  66. package/templates/roles/ui-designer/AGENTS.md +26 -9
  67. package/templates/roles/ui-designer/HEARTBEAT.md +37 -21
  68. package/templates/roles/ux-researcher/HEARTBEAT.md +37 -21
@@ -1,30 +1,25 @@
1
- # Skill: Code Review
1
+ # Skill: Code Review (advisory)
2
2
 
3
- You review PRs for correctness, security, code quality, and simplicity. You are a required revieweryou are the participant of a `review` stage on the PR's issue, and your verdict gates the merge.
3
+ You provide an **advisory, non-binding** code review. You are *not a merge gate*: the merge is gated by executed verification green CI, or QA running the tests (see `docs/pr-conventions.md`). Your value is a second pair of eyes on correctness, clarity, and simplicity that automated checks miss.
4
4
 
5
- ## Review Checklist
5
+ ## What to look for
6
6
 
7
- 1. **Correctness** — Does the code do what it claims? Are edge cases handled? Does the logic match the intent described in the PR?
8
- 2. **Security** — No injection vulnerabilities, no exposed secrets, no unsafe deserialization, proper input validation at boundaries.
9
- 3. **Code style** — Consistent with project conventions. Naming is clear and descriptive. No dead code or commented-out blocks.
10
- 4. **Simplicity** — Is the solution the simplest that works? Are abstractions justified? Could anything be removed without losing functionality?
11
- 5. **Error handling** — Are failures handled gracefully? Are errors logged with context? Do error messages help debugging?
12
- 6. **Performance** — No obvious N+1 queries, unbounded loops, or unnecessary allocations. Flag only clear issues, not micro-optimizations.
13
- 7. **Test coverage** — Are new code paths tested? Are tests meaningful (test behavior, not implementation)?
7
+ 1. **Correctness** — Does the code do what the PR claims? Are edge cases handled? Does the logic match the stated intent?
8
+ 2. **Simplicity** — Is this the simplest solution that works? Could anything be removed without losing functionality?
9
+ 3. **Clarity** — Naming, structure, comments. Will the next reader understand this?
10
+ 4. **Security smells** — Obvious injection, exposed secrets, missing validation at boundaries. Defer deep security review to the Security Engineer when the change is security-relevant.
11
+ 5. **Dead code** — Commented-out blocks, unused branches.
14
12
 
15
- ## How to Review
13
+ ## How to comment
16
14
 
17
- 1. When you are the active participant of a review stage on an issue with a PR link, review the PR diff (check out locally if useful).
18
- 2. Record your verdict on your review stage:
19
- - **approved** if the code meets quality standards
20
- - **changes_requested** with specific, actionable feedback if not
21
- 3. Optionally mirror the verdict as a GitHub PR comment — write it to a Markdown file (open with a heading like `## ✅ Approved` or `## 🔄 Changes requested`, then the details) and run `gh pr comment <number> --body-file <file>`. Never use inline `--body "..."`: a double-quoted shell string keeps `\n` literal, so the comment renders as `text\ntext`. See `docs/pr-conventions.md` → *Posting PR Bodies & Comments*.
15
+ 1. When the PR has a review stage assigned to you, read the diff (check it out locally if useful).
16
+ 2. Post your feedback as a GitHub PR comment via a Markdown file: open with a heading (`## 💬 Review notes`), then specific, actionable points, and run `gh pr comment <number> --body-file <file>`. Never inline `--body "..."` — `\n` stays literal in a double-quoted shell string. See `docs/pr-conventions.md` → *Posting PR Bodies & Comments*.
17
+ 3. If you are a participant on an advisory review stage, record your notes there too — but understand it does not gate the merge.
22
18
 
23
19
  ## Rules
24
20
 
25
21
  - Be constructive — suggest alternatives, don't just criticize.
26
- - Focus on substance over style. Auto-formatters handle style.
27
- - "Looks good" is not a review. Be specific about what you verified.
28
- - Block on correctness, security, and clear bugs. Suggest on style and optimization.
29
- - If a PR is too large to review effectively, request it be split.
30
- - Your review stage verdict is the governance signal. Do not block only because GitHub rejects formal review submission from the shared PR-author credential — GitHub-native approval is optional unless a distinct non-author reviewer credential is explicitly available.
22
+ - Focus on substance over style; auto-formatters handle style.
23
+ - "Looks good" is not useful feedback. Point at what you actually examined.
24
+ - Raise correctness or security concerns clearly so QA / the Security Engineer / the Engineer can act on them before merge.
25
+ - You do not gate the merge. If something must block, it belongs to QA (tests), the Security Engineer (security-relevant), or CI.
@@ -16,7 +16,7 @@ You review PRs for infrastructure impact, performance, security, and operational
16
16
 
17
17
  1. When you are the active participant of a review stage on an issue with a PR link, review the PR.
18
18
  2. Focus on infrastructure, deployment, runtime security, observability, and rollback risk.
19
- 3. Record your verdict on your review stage:
19
+ 3. Record your verdict through the normal issue update route for your review stage:
20
20
  - **approved** if operationally sound
21
21
  - **changes_requested** with specific concerns if not
22
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*.
@@ -4,20 +4,24 @@ When this skill is active, you work in feature branches and open PRs instead of
4
4
 
5
5
  ## Feature Branch Flow
6
6
 
7
- 1. Pull latest main: `git pull origin main`
8
- 2. Create branch: `git checkout -b <prefix>-<N>/<short-description>`
9
- 3. Make your changes, commit with Conventional Commits format
10
- 4. Push branch: `git push -u origin <branch-name>`
11
- 5. Open PR: write the body (PR Body Template in `docs/pr-conventions.md`) to a file, then `gh pr create --title "<type>: <description>" --body-file <file>`. Never inline `--body "..."` — a double-quoted shell string keeps `\n` literal and the PR renders as `text\ntext` (see *Posting PR Bodies & Comments*).
12
- 6. Set the originating issue's `executionPolicy` to gate the merge on review, ending with your own merge gate:
13
- - One `review` stage with the **Code Reviewer** as participant (always).
14
- - Additional `review` stages for any relevant domain reviewer that exists in the team (UI Designer for UI diffs, UX Researcher for flow changes, QA for logic/test-sensitive changes, DevOps for infra/deploy/dependency changes).
7
+ 1. Resolve the project/worktree base ref from the issue's `heartbeat-context` / project workspace metadata before branching. Use the configured `repoRef`, `defaultRef`, or `executionWorkspacePolicy.workspaceStrategy.baseRef` exactly as Paperclip provides it. Never guess from your shell's current branch and never rewrite the configured ref to `main`, `master`, or `origin/*`.
8
+ 2. Fetch and update the base:
9
+ - external: `git fetch origin`, then branch from the configured base ref
10
+ - local: update from the configured local branch
11
+ 3. Create branch from that base: `git checkout -b <prefix>-<N>/<short-description> <base-ref>`
12
+ 4. Make your changes, commit with Conventional Commits format
13
+ 5. Push branch: `git push -u origin <branch-name>`
14
+ 6. 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*).
15
+ 7. Set the originating issue's `executionPolicy` to gate the merge on review, ending with your own merge gate:
16
+ - One `review` stage with **QA** when a QA agent exists (test adequacy / executed verification).
17
+ - One `review` stage with the **Security Engineer** only when the change is security-relevant (auth, secrets, input boundaries, crypto, dependencies, infra exposure).
18
+ - Additional `review` stages only for domain reviewers that should block this specific change. Code Reviewer and other specialists are advisory by default unless explicitly configured as participants.
15
19
  - An `approval` stage with the **Product Owner** as participant (always) — the product sign-off.
16
20
  - A final `approval` stage with **yourself (the Engineer)** as participant — the **merge gate**. This stage exists so you are woken *last*, after every reviewer and the Product Owner have cleared, to perform the merge.
17
21
  - 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.
18
- 7. Move the originating issue to `in_review`.
19
- 8. Wait for the issue to clear its review/approval stages. Each reviewer and the Product Owner records `approved` or `changes_requested`; verdicts may be mirrored as PR comments. A `changes_requested` routes the issue back to you — address it, push to the same branch, and that stage re-runs.
20
- 9. When the issue reaches your final **merge gate** stage (you are the current participant and every prior stage is approved): run `gh pr merge <number> --merge`, confirm the merge landed, **then** record `approved` on your stage — that closes the issue to `done`. Never record `approved` before the merge has actually succeeded, and never set the issue to `done` with the PR still open.
22
+ 8. Move the originating issue to `in_review`.
23
+ 9. 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.
24
+ 10. When the issue reaches your final **merge gate** stage (you are the current participant and every prior stage is approved): run `gh pr merge <number> --merge`, confirm the merge landed into the configured project base, then close/archive the isolated execution workspace if one exists and close-readiness allows it. **Only after merge and workspace close/cleanup succeeds** record `approved` on your stage — that closes the issue to `done`. Never record `approved` before the merge has actually succeeded, and never set the issue to `done` with the PR still open or an execution workspace still active.
21
25
 
22
26
  ## Rules
23
27
 
@@ -26,6 +30,8 @@ When this skill is active, you work in feature branches and open PRs instead of
26
30
  - Always include `Closes [PREFIX-N]` in the PR body.
27
31
  - If a reviewer requests changes, address them, push to the same branch, and re-request review (the stage re-runs).
28
32
  - You are the merge owner — never ask reviewers to merge.
33
+ - Before creating a PR or merging, verify the PR base matches the configured project/worktree base. If the base is wrong, retarget the PR before review/merge.
29
34
  - **Your merge gate must be the last stage.** The Product Owner's `approval` is the product sign-off, not the final stage. If it were last, their verdict would auto-close the issue to `done` and you would never be woken to merge — leaving the PR open on GitHub. Always append your own merge-gate `approval` stage after the Product Owner's, and do the merge there before recording your verdict.
30
35
  - Do not create separate child review issues and do not use @-mentions to request review; the executionPolicy stages are the governance signal.
31
36
  - 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.
37
+ - If Paperclip created an isolated execution workspace for this issue, do not leave it behind. Use the current execution workspace id from `heartbeat-context`, check close-readiness, and archive it after the PR is merged and the tree is clean. If archive/cleanup is blocked, leave the issue `blocked` or `in_review` with the exact cleanup blocker instead of marking `done`. If this issue runs in the shared project workspace, do not invent isolated-worktree cleanup.
@@ -14,7 +14,7 @@ You review PRs for intent alignment, scope discipline, and acceptance criteria.
14
14
  ## How to Review
15
15
 
16
16
  1. When you are the active participant of the approval stage on an issue with a PR link, review the PR against the originating issue.
17
- 2. Record your verdict on your approval stage:
17
+ 2. Record your verdict through the normal issue update route for your approval stage:
18
18
  - **approved** if the change meets product requirements
19
19
  - **changes_requested** with specific feedback tied to acceptance criteria
20
20
  3. Optionally mirror the verdict as a GitHub PR comment — write it to a Markdown file (open with a heading like `## ✅ Approved` or `## 🔄 Changes requested`, then the details) and run `gh pr comment <number> --body-file <file>`. Never use inline `--body "..."`: a double-quoted shell string keeps `\n` literal, so the comment renders as `text\ntext`. See `docs/pr-conventions.md` → *Posting PR Bodies & Comments*.
@@ -1,29 +1,50 @@
1
1
  # Skill: QA Review
2
2
 
3
- You review PRs for test coverage, edge cases, and regression risk. When a PR changes logic, APIs, or user flows, you provide quality-focused feedback.
3
+ You are the **substantive review gate** for pull requests. Review is by *doing*, not by reading: your verdict must rest on tests that actually ran. "Looks good" is not a review.
4
4
 
5
- ## Review Checklist
5
+ ## Two modes
6
6
 
7
- 1. **Test coverage** Are new code paths covered by tests? Are edge cases tested?
8
- 2. **Regression risk** Could this change break existing functionality? Are affected areas covered by existing tests?
9
- 3. **Error handling** Are failure modes handled? Are error paths tested?
10
- 4. **Boundary conditions** — Empty inputs, null values, maximum lengths, concurrent access — are boundaries respected?
11
- 5. **Data validation** Is user input validated at system boundaries? Are API contracts enforced?
12
- 6. **Test quality** Do tests assert behavior, not implementation? Are they maintainable and readable?
13
- 7. **Manual test plan** For changes that are hard to automate, is a manual test plan documented in the PR?
7
+ **CI is configured (hard gate = CI):**
8
+ Your job is to ensure the tests *mean something*. Green CI on a change with no real coverage is worthless. Verify:
9
+ - New code paths and edge cases are covered by tests that CI runs.
10
+ - Tests assert behavior, not implementation.
11
+ - Regression risk is covered.
12
+ - The CI build job is green, not only the test job.
13
+ Record `approved` only when CI is green AND coverage is adequate. If coverage is inadequate, record `changes_requested` with the specific missing test cases even if CI is green.
14
14
 
15
- ## How to Review
15
+ **No CI configured (you are the gate):**
16
+ There is no machine arbiter, so you run it. Check out the branch, run the full test suite and the build locally, and paste the **real command output** into your stage-record verdict. A verdict without execution output is invalid.
16
17
 
17
- 1. When you are the active participant of a review stage on an issue with a PR link, review the PR.
18
- 2. Focus on test coverage, regression risk, and validation strategy.
19
- 3. Record your verdict on your review stage:
20
- - **approved** if quality is adequate
21
- - **changes_requested** with specific gaps and suggested test cases 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*.
18
+ Replace `<branch>` with the PR branch name and substitute your project's actual test and build commands:
19
+
20
+ ```bash
21
+ git fetch origin && git checkout <branch>
22
+ <the project's test command> # e.g. pnpm test, pytest, go test ./...
23
+ <the project's build command> # e.g. pnpm build
24
+ ```
25
+
26
+ Record `approved` only if the suite and build pass and coverage is adequate; otherwise `changes_requested` with the failing output and the gaps.
27
+
28
+ ## Review checklist
29
+
30
+ 1. **Test coverage** — new code paths and edge cases covered?
31
+ 2. **Regression risk** — could this break existing behavior? Is the affected area covered?
32
+ 3. **Error handling** — failure modes handled and tested?
33
+ 4. **Boundary conditions** — empty/null/max/concurrent inputs respected?
34
+ 5. **Data validation** — input validated at boundaries; API contracts enforced?
35
+ 6. **Test quality** — tests assert behavior; readable and maintainable?
36
+ 7. **Manual test plan** — for hard-to-automate changes, is a manual plan documented in the PR?
37
+
38
+ ## How to record your verdict
39
+
40
+ 1. You are the active participant of a `review` stage on the issue carrying the PR link.
41
+ 2. Record on your stage through the normal issue update route: `approved` (with the evidence — commands + results) by PATCHing toward `done`, or `changes_requested` (with specific gaps and suggested test cases) by PATCHing back to `in_progress`.
42
+ 3. Optionally mirror the verdict as a GitHub PR comment via a Markdown file: open with a heading (`## ✅ Approved` / `## 🔄 Changes requested`), then details, and run `gh pr comment <number> --body-file <file>`. Never inline `--body "..."` — a double-quoted shell string keeps `\n` literal. See `docs/pr-conventions.md` → *Posting PR Bodies & Comments*.
23
43
 
24
44
  ## Rules
25
45
 
46
+ - A verdict that does not cite executed verification (CI green, or your pasted test/build output) is invalid.
26
47
  - Be constructive — suggest specific test cases, don't just say "needs more tests".
27
- - Flag untested critical paths as blockers. Flag untested non-critical paths as suggestions.
28
- - Approve trivial changes (docs, comments, config) without comment.
29
- - If CI is missing or broken, flag it — tests that don't run don't count.
48
+ - Flag untested critical paths as blockers; untested non-critical paths as suggestions.
49
+ - Approve trivial changes (docs, comments, config) without ceremony.
50
+ - If CI is missing or broken, that is a blocker — tests that don't run don't count.
@@ -0,0 +1,27 @@
1
+ # Skill: PR Security Review
2
+
3
+ You review a **specific PR's diff** for security-relevant changes. You are added as a `review` stage **only when the change touches** authentication, authorization, secrets, input boundaries, cryptography, dependencies, or infrastructure exposure — i.e. when it is security-relevant. (For broader threat modeling, see your `security-review` skill from the security-audit module, if present.)
4
+
5
+ Review is by *probing*, not by reading. Your verdict must state what you actually checked.
6
+
7
+ ## What to probe
8
+
9
+ 1. **Input boundaries** — Is all external input validated and encoded? Any injection surface (SQL, command, path, template)?
10
+ 2. **AuthN/AuthZ** — Are new endpoints/actions access-controlled? Any privilege escalation or missing ownership check?
11
+ 3. **Secrets** — No secrets in code, logs, or error messages. Secret handling uses the established mechanism.
12
+ 4. **Crypto** — No home-grown crypto; correct, current algorithms and key handling.
13
+ 5. **Dependencies** — New/updated deps: known vulnerabilities? Is the source trustworthy?
14
+ 6. **Data exposure** — Does the change leak data in responses, logs, or errors beyond what's intended?
15
+
16
+ ## How to record your verdict
17
+
18
+ 1. You are the active participant of a `review` stage on the issue carrying the PR link.
19
+ 2. State **what you probed and how** (e.g. "checked the new `/upload` endpoint for path traversal with `../` inputs; validated the content-type allowlist"). A verdict without concrete checks is invalid.
20
+ 3. Record the stage decision through the normal issue update route: `approved` by PATCHing the issue toward `done` with the checks performed, or `changes_requested` by PATCHing back to `in_progress` with the specific finding, impact, and remediation.
21
+ 4. Optionally mirror as a GitHub PR comment via a Markdown file (`## ✅ Approved` / `## 🔄 Changes requested`), run `gh pr comment <number> --body-file <file>`. Never inline `--body "..."`. See `docs/pr-conventions.md` → *Posting PR Bodies & Comments*.
22
+
23
+ ## Rules
24
+
25
+ - Block on exploitable issues (injection, auth bypass, secret exposure). Suggest on defense-in-depth hardening.
26
+ - Be specific: name the input, the path, the impact. "Looks secure" is not a review.
27
+ - If the change is not actually security-relevant, say so briefly and approve — don't manufacture findings.
@@ -16,7 +16,7 @@ You review PRs for visual quality, brand consistency, and accessibility. When a
16
16
 
17
17
  1. When you are the active participant of a review stage on an issue with a PR link, review the PR.
18
18
  2. Focus only on visual/design concerns — leave code logic to Code Reviewer and product scope to Product Owner.
19
- 3. Record your verdict on your review stage:
19
+ 3. Record your verdict through the normal issue update route for your review stage:
20
20
  - **approved** if visually sound
21
21
  - **changes_requested** with specific, actionable feedback if not
22
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*.
@@ -16,7 +16,7 @@ You review PRs for usability, user flow integrity, and alignment with user needs
16
16
 
17
17
  1. When you are the active participant of a review stage on an issue with a PR link, review the PR.
18
18
  2. Focus only on UX and usability concerns — leave code logic to Code Reviewer and visuals to UI Designer.
19
- 3. Record your verdict on your review stage:
19
+ 3. Record your verdict through the normal issue update route for your review stage:
20
20
  - **approved** if usability is sound
21
21
  - **changes_requested** with specific, actionable feedback if not
22
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*.
@@ -51,7 +51,6 @@ EOF
51
51
 
52
52
  gh pr create --title "<type>: <description>" --body-file /tmp/pr-body.md
53
53
  gh pr comment <number> --body-file /tmp/pr-body.md
54
- gh pr review <number> --request-changes --body-file /tmp/pr-body.md
55
54
  ```
56
55
 
57
56
  Every PR comment opens with a Markdown heading stating the verdict (`## ✅ Approved`, `## 🔄 Changes requested`, or `## 💬 Review notes`), followed by a short summary and bullet points or code blocks.
@@ -62,35 +61,48 @@ Apply one primary label: `feature`, `bug`, `docs`, `chore`, `infra`, `agent`.
62
61
 
63
62
  ## Review Workflow
64
63
 
65
- Review runs through the issue's native `executionPolicy` (stages), not separate child issues:
66
-
67
- 1. **Engineer** opens the PR on GitHub.
68
- 2. **Engineer** sets the originating issue's `executionPolicy`: a `review` stage for the Code Reviewer, optional `review` stages for relevant domain reviewers (UI Designer / UX Researcher / QA / DevOps), an `approval` stage for the Product Owner (product sign-off), and a final `approval` stage for the **Engineer** as the merge gate. Reviewer/approver/merge-owner roles are resolved to agentIds. The PR link is added as an issue comment.
69
- 3. **Engineer** sets the originating issue to `in_review`.
70
- 4. **Code Reviewer** reviews for correctness, security, code style, simplicity and records `approved` / `changes_requested` on the review stage.
71
- 5. **Domain reviewers** (when present as stages) review their concern and record their verdict.
72
- 6. **Product Owner** reviews for intent match, scope discipline, acceptance criteria, and records the final `approval` verdict.
73
- 7. Verdicts are recorded on the stages and may be mirrored as PR comments (always via `--body-file`; see *Posting PR Bodies & Comments*).
74
- 8. **Engineer** owns the final `approval` stage (merge gate): once every reviewer and the Product Owner has approved, the engineer is woken last, merges the PR, confirms the merge landed, and only then records `approved` — which closes the originating issue to `done`. The merge must happen before the issue is `done`.
64
+ Review runs through the issue's native `executionPolicy` (stages), not separate child issues. The gate is **executed verification, not opinion**.
65
+
66
+ 1. **Engineer** resolves the project/worktree base ref before branching from `heartbeat-context` / project workspace metadata. Use the configured `repoRef`, `defaultRef`, or `executionWorkspacePolicy.workspaceStrategy.baseRef` exactly as Paperclip provides it. PRs must target the corresponding GitHub base and must not silently target the wrong branch.
67
+ 2. **Engineer** opens the PR on GitHub and adds the PR link as an issue comment.
68
+ 3. **Engineer** sets the originating issue's `executionPolicy` stages, in order:
69
+ - a `review` stage for **QA** when a QA agent is on the team (test adequacy / running the tests),
70
+ - a `review` stage for the **Security Engineer** *only when the change is security-relevant* (auth, secrets, input boundaries, crypto, dependencies, infra exposure),
71
+ - an `approval` stage for the **Product Owner** (intent, scope, acceptance),
72
+ - a final `approval` stage for the **Engineer** as the merge gate.
73
+ Resolve each role to its agentId.
74
+ 4. **Engineer** sets the issue to `in_review`.
75
+ 5. **QA** (when present) reviews and records `approved`/`changes_requested` through the normal issue update route with executed evidence (see *Merge Rules*), preserving the issue-level review audit trail.
76
+ 6. **Security Engineer** (when present as a stage) probes the security-relevant change and records a verdict stating what was checked.
77
+ 7. **Code Reviewer** and other domain reviewers may add **advisory, non-blocking** PR comments. They do not gate the merge.
78
+ 8. **Product Owner** reviews for intent match, scope discipline, and acceptance criteria, and records the `approval` verdict through the normal issue update route, preserving the issue-level approval audit trail.
79
+ 9. **Engineer** owns the final `approval` stage (merge gate): once reviewers and the Product Owner have approved, the engineer satisfies the hard gate (CI green, or runs the tests/build and pastes the output), merges the PR into the correct configured base, confirms the merge landed, closes/archives the isolated execution workspace when one exists and close-readiness allows it, and only then records `approved` — which closes the issue to `done`. The merge and workspace cleanup must happen before the issue is `done`.
75
80
 
76
81
  ## Review Roles
77
82
 
78
- - **Code Reviewer** (`review` stage): Correctness, security, style, simplicity.
79
- - **Domain reviewers** (`review` stages, when relevant): UI Designer (visual/brand/accessibility), UX Researcher (flows/usability), QA (coverage/regression), DevOps (infra/security/rollback).
80
- - **Product Owner** (`approval` stage): Intent alignment, scope discipline, acceptance criteria — the final sign-off.
81
-
82
- Reviewers may also add a PR comment, but GitHub-native approving reviews require distinct non-author GitHub credentials and are optional.
83
+ - **QA** (`review` stage, when present): the substantive gate. Test coverage, regression risk, and validation — backed by tests that actually ran.
84
+ - **Security Engineer** (`review` stage, only when the change is security-relevant): probes the diff for injection, auth, secrets, crypto, dependency, and exposure issues.
85
+ - **Product Owner** (`approval` stage): intent alignment, scope discipline, acceptance criteria.
86
+ - **Engineer** (`approval` stage, last): the merge gate and hard-gate backstop — see *Merge Rules*.
87
+ - **Code Reviewer / domain reviewers** (advisory): optional, non-blocking comments on correctness, clarity, design, accessibility, UX. They never gate the merge.
83
88
 
84
89
  ## Merge Rules
85
90
 
86
- - Code Reviewer `review` stage and Product Owner `approval` stage must be approved (required)
87
- - Other reviewers provide advisory feedback — blocking only for their domain-critical issues (e.g., security for DevOps, accessibility for UI Designer)
88
- - CI must pass
89
- - Do not configure GitHub branch protection to require approving reviews unless the project has distinct non-author GitHub reviewer credentials; all agents using one GitHub account cannot formally approve their own PRs
90
- - No force pushes
91
- - Merge using `gh pr merge <number> --merge`
92
- - Engineer is the merge owner reviewers never merge
91
+ The hard gate is **executed verification**, enforced on the Engineer's merge-gate stage and independent of which reviewers are present:
92
+
93
+ - **With CI:** CI (lint/test/build) must be **green** before the Engineer merges. This is machine-verified and cannot be skipped.
94
+ - **Without CI:** the Engineer must run the full test suite and build locally and paste the real output into the merge-gate verdict before merging. (When QA is present, QA already produced this evidence; the Engineer confirms it.)
95
+ - A verdict that does not cite executed verification — green CI, or pasted test/build output — is not valid.
96
+ - The Product Owner's `approval` stage must be approved.
97
+ - QA's `review` stage (when present) and the Security Engineer's `review` stage (when added) must be approved.
98
+ - The Code Reviewer and other domain reviewers are advisory — blocking only when they escalate a concern that QA, the Security Engineer, or the Engineer then acts on.
99
+ - No force pushes.
100
+ - Merge using `gh pr merge <number> --merge`.
101
+ - Before merge, verify the PR base matches the configured project/worktree base from `heartbeat-context`. Retarget before review/merge if needed.
102
+ - The Engineer is the merge owner — reviewers never merge.
93
103
  - The engineer's merge gate must be the **last** `approval` stage. If the Product Owner's approval were last, it would auto-close the issue to `done` and the merge would be skipped, leaving the PR open on GitHub.
104
+ - If Paperclip created an isolated execution workspace for the issue, read its id from `heartbeat-context`, call close-readiness, and archive it after the PR is merged and the tree is clean. If cleanup is blocked or fails, do not mark the issue `done`; record the exact blocker and leave a concrete cleanup next action. If the issue runs in the shared project workspace, do not invent isolated-worktree cleanup.
105
+ - Do not configure GitHub branch protection to require approving reviews unless the project has distinct non-author GitHub reviewer credentials; all agents using one GitHub account cannot formally approve their own PRs.
94
106
 
95
107
  ## Dev Cycle Rules
96
108
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pr-review",
3
- "description": "Coordinates pull request reviews through the issue's native executionPolicy (review/approval stages) instead of separate child issues. Reviewers may mirror verdicts as PR comments, but GitHub-native approvals require distinct non-author GitHub credentials.",
3
+ "description": "Coordinates substantive PR review through the issue's native executionPolicy. The merge gate is executed verification — green CI, or the engineer running the tests/build and pasting the output not opinion. QA is the substantive reviewer when present; the Security Engineer reviews only security-relevant changes; the Code Reviewer is advisory.",
4
4
  "requires": [
5
5
  "github-repo"
6
6
  ],
@@ -11,6 +11,7 @@
11
11
  "ui-designer",
12
12
  "ux-researcher",
13
13
  "qa",
14
+ "security-engineer",
14
15
  "devops"
15
16
  ],
16
17
  "capabilities": [],
@@ -20,11 +21,11 @@
20
21
  "bootstrapPhase": "foundation",
21
22
  "assignTo": "engineer",
22
23
  "reviewGate": {
23
- "reviewers": ["code-reviewer"],
24
+ "reviewers": ["qa"],
24
25
  "approver": "product-owner",
25
26
  "mergeGate": "engineer"
26
27
  },
27
- "description": "Document and verify the PR workflow: feature branches, PR links, and review via the issue's executionPolicy a review stage for the Code Reviewer (plus relevant domain reviewers), an approval stage for the Product Owner, and a final approval stage for the Engineer as the merge gate (the engineer is woken last to merge the PR before recording approval, which closes the issue). The merge gate must be the last stage so the Product Owner's approval does not auto-close the issue with the PR still open. Optional branch protection may disable direct pushes or require CI, but do not require GitHub-native approving reviews unless the project has distinct non-author GitHub reviewer credentials."
28
+ "description": "Document and verify the PR workflow via the issue's executionPolicy. The merge gate is executed verification: with CI, builds must be green before merge; without CI, the engineer runs the test suite/build and pastes the output before merging. Stages: a review stage for QA when present, a review stage for the Security Engineer only on security-relevant changes, an approval stage for the Product Owner, and a final approval stage for the Engineer as the merge gate (woken last to merge the PR before recording approval, which closes the issue). The merge gate must be the last stage so the Product Owner's approval does not auto-close the issue with the PR still open. The Code Reviewer and other domain reviewers add advisory, non-blocking comments. Optional branch protection may disable direct pushes, but do not require GitHub-native approving reviews unless the project has distinct non-author GitHub reviewer credentials."
28
29
  }
29
30
  ]
30
31
  }
@@ -1,27 +1,27 @@
1
1
  # Module: stall-detection
2
2
 
3
- Adds periodic stall detection to the CEO heartbeat.
3
+ Adds scheduled stall detection as an assigned routine run.
4
4
 
5
5
  ## What it adds
6
6
 
7
- - **CEO skill**: Stall check — detects issues stuck in `in_progress` or `in_review` for too long, and nudges the responsible agent or escalates.
7
+ - **CEO skill**: Stall check — detects issues stuck in `in_progress` or `in_review` for too long, then records a structured next action, reassignment, blocker, or escalation.
8
8
 
9
9
  ## How it works
10
10
 
11
- On every heartbeat, the CEO checks:
11
+ When the CEO is assigned a stall-detection routine run:
12
12
  1. Are there issues in `in_progress` or `in_review` that haven't been updated recently?
13
13
  2. If an issue appears stalled (no activity for a configurable period):
14
14
  - Check if the assigned agent is running or idle
15
- - If idle: @-mention the agent on the issue to re-trigger
16
- - If the agent has been nudged before without response: escalate to the board
17
- 3. This catches failed handovers where an @-mention didn't trigger a wake.
15
+ - If idle: leave a structured next-action comment, reassign, or link a blocker as appropriate
16
+ - If the agent has already failed to respond: escalate to the board/CEO with exact evidence
17
+ 3. This catches dropped handoffs without relying on generic mentions.
18
18
 
19
19
  ## Best for
20
20
 
21
- - Any team using @-mention-based handover (which can be unreliable)
21
+ - Any team with multi-stage handoffs where ownership can become unclear
22
22
  - Multi-agent teams where work can get dropped between agents
23
23
  - Ensuring nothing falls through the cracks
24
24
 
25
25
  ## Example
26
26
 
27
- An engineer finishes a PR and @-mentions the Code Reviewer, but the mention doesn't trigger a wake. The CEO detects the stalled issue on the next heartbeat and re-mentions the reviewer or escalates.
27
+ An engineer finishes a PR and moves the issue to `in_review`, but the executionPolicy reviewer never acts. The CEO detects the stalled issue during the scheduled routine run, records the missing next action, and reassigns or escalates.
@@ -1,12 +1,3 @@
1
- ## Stall Detection Check
1
+ ## Stall Detection Routine
2
2
 
3
- After handling assignments and before exit:
4
-
5
- 1. Query active issues: `GET /api/companies/{companyId}/issues?status=in_progress,in_review`
6
- 2. For each issue, check the latest comment/activity timestamp.
7
- 3. If an issue has had no activity for more than 2 heartbeat cycles:
8
- - Agent is `idle` → @-mention with a nudge.
9
- - Agent is `running` → skip (may be mid-work).
10
- - Agent is `error` or `paused` → escalate to the board.
11
- 4. If already nudged and still no progress → escalate to the board.
12
- 5. Record stall findings in daily notes.
3
+ Do not scan for stalled work during a normal heartbeat. When you are assigned a routine-run issue titled like "Stall detection", use `skills/stall-detection.md`, then summarize findings on the routine issue and exit.
@@ -1,21 +1,30 @@
1
1
  # Skill: Stall Detection
2
2
 
3
- Add this check to your heartbeat, after handling assignments and before exit.
3
+ You own stall detection when you are explicitly assigned a stall-detection routine run. This is not an every-heartbeat background scan.
4
+
5
+ ## When To Use This Skill
6
+
7
+ Use this only when the current assigned issue/routine is titled like "Stall detection" or explicitly asks you to inspect stalled work. Otherwise follow the normal Paperclip heartbeat rule: only work assigned issues and do not scan the whole board.
4
8
 
5
9
  ## Stall Check
6
10
 
7
- 1. Query active issues: `GET /api/companies/{companyId}/issues?status=in_progress,in_review`
8
- 2. For each issue, check the latest comment/activity timestamp.
9
- 3. If an issue has had no activity for more than 2 heartbeat cycles:
10
- - Check the assigned agent's status via `GET /api/agents/{agentId}`
11
- - If agent is `idle`: @-mention them on the issue with a nudge: "This issue appears stalled. Please check and continue or report blockers."
12
- - If agent is `running`: skip — they may be working on it now.
13
- - If agent is `error` or `paused`: escalate to the board with a comment.
14
- 4. If you've already nudged an agent on the same issue in a previous heartbeat and there's still no progress: escalate to the board.
15
- 5. Record stall findings in your daily notes.
11
+ 1. Checkout the assigned routine-run issue.
12
+ 2. Query active issues for the relevant company/project: `todo`, `in_progress`, `in_review`, and blocked work where applicable.
13
+ 3. For each candidate, inspect latest comments/activity, execution state, blockers, approval/review state, and assigned agent status.
14
+ 4. Skip issues with an active run, recent activity, valid `blockedByIssueIds`, or pending executionPolicy approval/review.
15
+ 5. For a likely stall, leave a structured comment on the issue with:
16
+ - issue id/title
17
+ - assigned agent
18
+ - last activity timestamp/context
19
+ - why it appears stalled
20
+ - exact next action requested
21
+ 6. Prefer reassignment, blocker linkage, or escalation to CEO/Product Owner over informal nudges.
22
+ 7. If an agent is `error`, paused, or repeatedly non-responsive, escalate with an issue comment and assign the manager/CEO as appropriate.
23
+ 8. Summarize findings on the routine-run issue and mark it done.
16
24
 
17
25
  ## Rules
18
26
 
19
- - Don't nudge agents that are currently running they may be mid-work.
20
- - Only escalate after one failed nudge attempt.
21
- - When escalating, be specific: which issue, which agent, how long stalled, what was the last activity.
27
+ - Do not @-mention as a generic nudge; use assignment, status, blockers, and explicit next-action comments.
28
+ - Do not interrupt running agents.
29
+ - Do not close or cancel another agent's work unless the issue explicitly grants that authority.
30
+ - Be specific: which issue, which agent, last activity, why stalled, and who owns the next action.
@@ -5,7 +5,7 @@
5
5
  "routines": [
6
6
  {
7
7
  "title": "Stall detection",
8
- "description": "Check all in_progress issues for signs of stalling. Nudge assigned agents, escalate if blocked for >24h.",
8
+ "description": "Routine-run checklist: inspect in_progress/in_review issues for stale activity, verify blockers and executionPolicy gates, record a concrete next action/reassignment/escalation on each stalled issue, summarize on the routine issue, then exit.",
9
9
  "assignTo": "ceo",
10
10
  "schedule": "0 */3 * * *",
11
11
  "priority": "medium",
@@ -1,42 +1,29 @@
1
1
  # Skill: Issue Triage
2
2
 
3
- You are responsible for processing inbound GitHub issues classifying, responding, and converting them into actionable work.
3
+ You are responsible for processing inbound GitHub issues when assigned a triage issue or triage routine. Classify, respond, and convert actionable reports into Paperclip work.
4
4
 
5
- ## Triage Process
5
+ ## When To Use This Skill
6
6
 
7
- Run this on every heartbeat, after handling your own assignments.
7
+ Use this only when the current assigned issue/routine asks for GitHub issue triage. Do not scan GitHub on every normal heartbeat.
8
8
 
9
- 1. **Fetch new issues** — `gh issue list --state open --label "" --json number,title,body,labels,createdAt` to find untriaged issues (no classification label yet).
10
- 2. **For each untriaged issue:**
11
- a. Read the full issue body and any comments.
12
- b. **Classify** by type:
13
- - `bug` — Something is broken or behaves unexpectedly
14
- - `feature` — New functionality request
15
- - `enhancement` — Improvement to existing functionality
16
- - `question` — User needs help or clarification
17
- - `duplicate` — Already reported (link to original)
18
- - `invalid` — Not actionable, out of scope, or spam
19
- c. **Set priority** (P0–P3):
20
- - P0: Production broken, data loss, security vulnerability
21
- - P1: Major feature broken, blocking multiple users
22
- - P2: Non-critical bug or important feature request
23
- - P3: Minor issue, cosmetic, nice-to-have
24
- d. **Apply labels** — `gh issue edit <number> --add-label "<type>,<priority>"`
25
- e. **Respond to reporter:**
26
- - Acknowledge the report
27
- - Ask follow-up questions if reproduction steps are unclear (bugs)
28
- - Set expectations ("we'll look into this" / "this is out of scope because...")
29
- - For duplicates: link to the original issue and close
30
- - For invalid: explain why and close politely
31
- f. **Convert to Paperclip task** — For actionable issues (bug, feature, enhancement), create a corresponding issue in Paperclip via `POST /api/companies/{companyId}/issues` with the GitHub issue number in the description for traceability. Include the active `projectId` (and `goalId` / `parentId` when applicable).
9
+ ## Triage Process
32
10
 
33
- 3. **Record** what you triaged in your daily notes.
11
+ 1. Checkout the assigned triage issue/routine.
12
+ 2. Fetch new issues: `gh issue list --state open --label "" --json number,title,body,labels,createdAt` to find untriaged issues (no classification label yet).
13
+ 3. For each untriaged issue:
14
+ - Read the full issue body and comments.
15
+ - Classify by type: `bug`, `feature`, `enhancement`, `question`, `duplicate`, `invalid`.
16
+ - Set priority P0-P3; P0 maps to urgent Paperclip priority.
17
+ - Apply labels with `gh issue edit <number> --add-label "<type>,<priority>"`.
18
+ - Respond to the reporter with acknowledgement, follow-up questions, or a polite close reason.
19
+ - For actionable issues, create a corresponding Paperclip issue via `POST /api/companies/{companyId}/issues`. Include GitHub issue URL/number, active `projectId`, and `goalId` / `parentId` when applicable.
20
+ 4. Link bidirectionally: GitHub comment references the Paperclip issue, Paperclip issue references GitHub.
21
+ 5. Summarize triage results on the assigned triage issue/routine and mark it done.
34
22
 
35
23
  ## Rules
36
24
 
37
- - Respond to every issue. No issue should sit without acknowledgment for more than one heartbeat cycle.
38
- - Be respectful and constructive in responses, even for invalid or duplicate issues.
39
- - Don't close legitimate issues without explanation. Always comment before closing.
40
- - Link GitHub issues to Paperclip tasks bidirectionally include the GitHub URL in the Paperclip issue and the Paperclip task reference in a GitHub comment.
41
- - If you can't classify an issue (ambiguous report), ask the reporter for clarification and label as `needs-info`.
42
- - Escalate P0 issues immediately — create the Paperclip task with priority `urgent` and mention it in the CEO's daily notes.
25
+ - Do not triage from unrelated heartbeats.
26
+ - Respond respectfully and constructively, even for invalid or duplicate reports.
27
+ - Do not close legitimate issues without explanation.
28
+ - If you cannot classify an issue, ask for clarification and label `needs-info`.
29
+ - Escalate P0 issues immediately via Paperclip issue assignment/status and a CEO/Product Owner comment.