@starlein/paperclip-plugin-company-wizard 0.3.24 → 0.4.2

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 (65) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +15 -11
  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 +266 -81
  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/devops/skills/infra-review.md +1 -1
  32. package/templates/modules/pr-review/agents/engineer/skills/pr-workflow.md +17 -11
  33. package/templates/modules/pr-review/agents/product-owner/skills/product-review.md +1 -1
  34. package/templates/modules/pr-review/agents/qa/skills/qa-review.md +1 -1
  35. package/templates/modules/pr-review/agents/security-engineer/skills/pr-security-review.md +1 -1
  36. package/templates/modules/pr-review/agents/ui-designer/skills/design-review.md +1 -1
  37. package/templates/modules/pr-review/agents/ux-researcher/skills/ux-review.md +1 -1
  38. package/templates/modules/pr-review/docs/pr-conventions.md +11 -8
  39. package/templates/modules/stall-detection/README.md +8 -8
  40. package/templates/modules/stall-detection/agents/ceo/heartbeat-section.md +2 -11
  41. package/templates/modules/stall-detection/agents/ceo/skills/stall-detection.md +22 -13
  42. package/templates/modules/stall-detection/module.meta.json +1 -1
  43. package/templates/modules/triage/skills/issue-triage.md +20 -33
  44. package/templates/roles/audio-designer/HEARTBEAT.md +37 -21
  45. package/templates/roles/ceo/HEARTBEAT.md +34 -56
  46. package/templates/roles/cmo/HEARTBEAT.md +37 -21
  47. package/templates/roles/code-reviewer/HEARTBEAT.md +39 -19
  48. package/templates/roles/cto/HEARTBEAT.md +33 -25
  49. package/templates/roles/customer-success/HEARTBEAT.md +39 -19
  50. package/templates/roles/devops/HEARTBEAT.md +36 -25
  51. package/templates/roles/engineer/AGENTS.md +27 -9
  52. package/templates/roles/engineer/HEARTBEAT.md +35 -21
  53. package/templates/roles/game-artist/HEARTBEAT.md +37 -21
  54. package/templates/roles/game-designer/HEARTBEAT.md +37 -21
  55. package/templates/roles/level-designer/HEARTBEAT.md +37 -21
  56. package/templates/roles/product-owner/AGENTS.md +24 -8
  57. package/templates/roles/product-owner/HEARTBEAT.md +37 -19
  58. package/templates/roles/qa/AGENTS.md +26 -11
  59. package/templates/roles/qa/HEARTBEAT.md +37 -21
  60. package/templates/roles/security-engineer/AGENTS.md +21 -23
  61. package/templates/roles/security-engineer/HEARTBEAT.md +39 -19
  62. package/templates/roles/technical-writer/HEARTBEAT.md +39 -18
  63. package/templates/roles/ui-designer/AGENTS.md +26 -9
  64. package/templates/roles/ui-designer/HEARTBEAT.md +37 -21
  65. package/templates/roles/ux-researcher/HEARTBEAT.md +37 -21
package/dist/ui/index.js CHANGED
@@ -549,7 +549,8 @@ var __iconNode41 = [
549
549
  var Zap = createLucideIcon("zap", __iconNode41);
550
550
 
551
551
  // src/ui/components/WizardShell.tsx
552
- import { useEffect as useEffect6 } from "react";
552
+ import { useEffect as useEffect6, useState as useState9 } from "react";
553
+ import { usePluginAction as usePluginAction6 } from "@paperclipai/plugin-sdk/ui";
553
554
 
554
555
  // src/ui/context/WizardContext.tsx
555
556
  import { createContext, useCallback, useContext, useState } from "react";
@@ -4319,7 +4320,7 @@ function StepGoal() {
4319
4320
  return /* @__PURE__ */ jsxs3("div", { className: "space-y-6", children: [
4320
4321
  /* @__PURE__ */ jsxs3("div", { className: "space-y-2", children: [
4321
4322
  /* @__PURE__ */ jsx7("h2", { className: "text-xl font-semibold tracking-tight", children: "Company goal" }),
4322
- /* @__PURE__ */ jsx7("p", { className: "text-sm text-muted-foreground", children: "What's the top-level objective? This drives all agent work." })
4323
+ /* @__PURE__ */ jsx7("p", { className: "text-sm text-muted-foreground", children: "What's the top-level outcome? Lead with the primary deliverable or operating result; put secondary constraints such as compliance, security, or accessibility in the description as quality bars." })
4323
4324
  ] }),
4324
4325
  /* @__PURE__ */ jsxs3("div", { className: "space-y-4", children: [
4325
4326
  /* @__PURE__ */ jsxs3("div", { className: "space-y-2", children: [
@@ -4327,7 +4328,7 @@ function StepGoal() {
4327
4328
  /* @__PURE__ */ jsx7(
4328
4329
  Input,
4329
4330
  {
4330
- placeholder: "e.g. Ship MVP by end of month",
4331
+ placeholder: "e.g. Build and launch the core product",
4331
4332
  value: state.goals[0]?.title || "",
4332
4333
  onChange: (e) => dispatch({
4333
4334
  type: "SET_GOALS",
@@ -4347,7 +4348,7 @@ function StepGoal() {
4347
4348
  "textarea",
4348
4349
  {
4349
4350
  className: "flex min-h-[80px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring resize-none",
4350
- placeholder: "More context about what success looks like...",
4351
+ placeholder: "Primary outcome and scope first. Then add constraints / quality bars such as compliance, security, accessibility, or performance.",
4351
4352
  value: state.goals[0]?.description || "",
4352
4353
  onChange: (e) => dispatch({
4353
4354
  type: "SET_GOALS",
@@ -4389,15 +4390,13 @@ function getRepositoryUrl(project) {
4389
4390
  return project?.workspace?.repoUrl || project?.repoUrl || "";
4390
4391
  }
4391
4392
  function getRepositoryRef(project, mode) {
4392
- return project?.workspace?.defaultRef || project?.workspace?.repoRef || project?.defaultRef || project?.repoRef || (mode === "external" ? "origin/main" : "main");
4393
+ const configured = project?.workspace?.defaultRef || project?.workspace?.repoRef || project?.defaultRef || project?.repoRef || "";
4394
+ return configured || (mode === "new" ? "main" : "");
4393
4395
  }
4394
4396
  function normalizeExternalRepoRef(value) {
4395
4397
  const trimmed = value.trim();
4396
- if (!trimmed) return "origin/main";
4397
- if (trimmed.startsWith("origin/") || trimmed.startsWith("refs/")) {
4398
- return trimmed;
4399
- }
4400
- return `origin/${trimmed}`;
4398
+ if (!trimmed) return "";
4399
+ return /^[A-Za-z0-9._:/-]+$/.test(trimmed) ? trimmed : "";
4401
4400
  }
4402
4401
  function normalizeNewRepoBranch(value) {
4403
4402
  const raw = value.trim().replace(/^origin\//, "") || "main";
@@ -4410,19 +4409,14 @@ function repositoryProjectFields(mode, repoUrl, repoRef) {
4410
4409
  return {
4411
4410
  workspaceSourceType: "git_repo",
4412
4411
  repoUrl: url,
4413
- repoRef: ref,
4414
- defaultRef: ref,
4412
+ ...ref ? { repoRef: ref, defaultRef: ref } : { repoRef: void 0, defaultRef: void 0 },
4415
4413
  workspace: {
4416
4414
  sourceType: "git_repo",
4417
4415
  repoUrl: url,
4418
- repoRef: ref,
4419
- defaultRef: ref,
4416
+ ...ref ? { repoRef: ref, defaultRef: ref } : {},
4420
4417
  isPrimary: true
4421
4418
  },
4422
- executionWorkspacePolicy: {
4423
- defaultMode: "isolated_workspace",
4424
- workspaceStrategy: { type: "git_worktree", baseRef: ref }
4425
- }
4419
+ executionWorkspacePolicy: void 0
4426
4420
  };
4427
4421
  }
4428
4422
  const branch = normalizeNewRepoBranch(repoRef);
@@ -4515,9 +4509,6 @@ function StepRepository() {
4515
4509
  const externalRepoMissing = mode === "external" && !repoUrl.trim();
4516
4510
  const chooseMode = (nextMode) => {
4517
4511
  setMode(nextMode);
4518
- if (nextMode === "external" && (!repoRef.trim() || repoRef.trim() === "main")) {
4519
- setRepoRef("origin/main");
4520
- }
4521
4512
  if (nextMode === "new" && (!repoRef.trim() || repoRef.trim().startsWith("origin/"))) {
4522
4513
  setRepoRef("main");
4523
4514
  }
@@ -4596,7 +4587,7 @@ function StepRepository() {
4596
4587
  /* @__PURE__ */ jsx8(
4597
4588
  Input,
4598
4589
  {
4599
- placeholder: "origin/main",
4590
+ placeholder: "Leave blank to use Paperclip/project default, or enter an explicit ref",
4600
4591
  value: repoRef,
4601
4592
  onChange: (e) => setRepoRef(e.target.value),
4602
4593
  onKeyDown: (e) => e.key === "Enter" && handleNext()
@@ -5186,9 +5177,6 @@ function RepositoryEdit({
5186
5177
  const [repoRef, setRepoRef] = useState6(getRepositoryRef(project, initialMode));
5187
5178
  const chooseMode = (next) => {
5188
5179
  setMode(next);
5189
- if (next === "external" && (!repoRef.trim() || repoRef.trim() === "main")) {
5190
- setRepoRef("origin/main");
5191
- }
5192
5180
  if (next === "new" && (!repoRef.trim() || repoRef.trim().startsWith("origin/"))) {
5193
5181
  setRepoRef("main");
5194
5182
  }
@@ -5240,7 +5228,7 @@ function RepositoryEdit({
5240
5228
  className: inputClass,
5241
5229
  value: repoRef,
5242
5230
  onChange: (e) => setRepoRef(e.target.value),
5243
- placeholder: "Default ref (e.g. origin/main)",
5231
+ placeholder: "Leave blank to use Paperclip/project default, or enter an explicit ref",
5244
5232
  onKeyDown: (e) => {
5245
5233
  if (e.key === "Enter") save();
5246
5234
  if (e.key === "Escape") onCancel();
@@ -6071,24 +6059,24 @@ import { useState as useState8, useRef as useRef4, useEffect as useEffect4 } fro
6071
6059
  import { usePluginAction as usePluginAction4 } from "@paperclipai/plugin-sdk/ui";
6072
6060
 
6073
6061
  // raw:/paperclip/paperclip-plugin-company-wizard/src/ui/prompts/interview-system.md
6074
- var interview_system_default = 'You are the Company Wizard \u2014 an expert at assembling AI agent teams. You\'re enthusiastic but concise. Company Wizard bootstraps AI-agent company workspaces from composable templates.\n\nYou are conducting a guided interview to understand what company to set up.\n\n{{CATALOG}}\n\n## How Roles Work\n\n- **Base roles** (marked "always included") are auto-added. You do NOT list them in the JSON.\n- **All other roles** (listed under "Available Extra Roles") are OPTIONAL and must be EXPLICITLY listed in your JSON `roles` array if you want them.\n- **Critically: `engineer` is NOT a base role.** Most software projects need an engineer. If the project involves writing code, building software, or maintaining a repository, you MUST include `engineer` in your `roles` array. The preset does NOT auto-add roles \u2014 you must list every non-base role the company needs.\n- When in doubt, include the engineer. A company that builds software without an engineer agent will have no one to write code.\n\n## Interview Rules\n\n- Ask exactly ONE question per turn. Keep it short and energetic (1-2 sentences). Use a conversational tone.\n- Do NOT output JSON during questions \u2014 just ask the question as plain text.\n- Tailor each question based on previous answers. Show you understood what they said.\n- After 3 questions, summarize what you understood in a brief, enthusiastic paragraph. End with: "Ready to generate your configuration?"\n- When the user confirms, output a human-readable recommendation with reasoning, then the JSON config.\n\n## What to Ask About\n\nAcross your 3 questions, try to cover as many of these as the user\'s initial description left unclear:\n\n1. **What they\'re building** \u2014 Product type, target users, domain (fintech, SaaS, game, etc.)\n2. **Current stage** \u2014 Greenfield, existing codebase, research phase, relaunch?\n3. **Quality vs speed** \u2014 Ship fast, iterate? Or production-grade, high quality from the start?\n4. **Team needs** \u2014 Do they need code review, security, design, marketing, docs, DevOps?\n5. **Special requirements** \u2014 Compliance, accessibility, specific tech stack, CI/CD, game engine?\n6. **Repository** \u2014 Should Paperclip create a new Git repository/workspace, or should the agents use an existing external repo such as GitHub/GitLab? If external, ask for URL and branch/ref; never ask for tokens.\n\nDon\'t ask about things already clear from the initial description. Skip to what\'s missing.\n\n## Information Preservation\n\nThe user\'s interview answers are the primary source of context for the company. When generating the configuration:\n\n- **`companyDescription`**: Write a comprehensive 2-4 paragraph description that captures EVERYTHING learned during the interview \u2014 what the company does, what it\'s building, who it\'s for, key technical decisions, constraints, priorities, and any special context. This is the company\'s permanent record. Be thorough. Do NOT summarize into a single vague sentence.\n- **`goals`**: Array of goals. The first goal is the main user-specific company goal \u2014 its description is the most important field. Write a THOROUGH, DETAILED description that includes EVERYTHING the user shared: full requirements, technical specs, acceptance criteria, constraints, edge cases, API contracts, user stories, design decisions, performance targets. If the user dropped a full spec, reproduce it in full. This is the primary brief all agents work from. Multiple paragraphs expected. Additional goals can be sub-goals (use `parentGoal` to reference the parent\'s title). Most setups need 1 main goal + 0-2 sub-goals. Preset/module template goals are added by the wizard after your JSON, so do NOT replace the user\'s objective with generic preset goals like "Build a REST API" or "Set up CI/CD" unless the user explicitly asked only for that.\n- **`projects`**: Array of projects. Each has a `name`, `description`, `goals` array (goal titles it\'s linked to), and repository workspace metadata. If the user chose an external repo, use `workspace.sourceType: "git_repo"` with `repoUrl`, `repoRef`/`defaultRef`, and isolated git worktrees. If no external repo was provided, use a fresh local Git repository with `workspace.sourceType: "local_path"`, `workspace.defaultRef: "main"`, `workspace.setupCommand: "git init -b main"`, and `workspace.isPrimary: true`.\n- **`issues`**: Array of 6-12 CONCRETE, domain-specific initial work items taken straight from what you learned in the interview \u2014 the real features, components, and integrations the user actually described, each with a `title`, a `description` with acceptance criteria, a `priority` (`critical`/`high`/`medium`/`low`), and `assignTo` set to a role on the team. These seed the backlog so the project starts in its actual domain. Do NOT put generic scaffolding here (vision docs, linters, CI, branch protection) \u2014 the wizard adds those automatically.\n\n## RECOMMENDATION Format (when generating config)\n\n- One paragraph explaining your reasoning: why this preset, why these modules, why these roles.\n- A bullet list of the key choices.\n\nThen output the JSON (no markdown fences):\n{{CONFIG_FORMAT}}\n\n## Rules\n\n- `modules` should list ALL modules to activate (including preset ones).\n- `roles` should list ALL non-base roles the company needs. This includes roles that come with the preset. The system does not auto-add preset roles \u2014 you must list them explicitly.\n- If the project involves building software, `engineer` MUST be in `roles`.\n- The primary project MUST state whether it uses a fresh local Git repository or an external Git repository. Do not put credentials or tokens in repository fields.\n- Be pragmatic \u2014 don\'t over-engineer. Match the config to actual needs.\n';
6062
+ var interview_system_default = 'You are the Company Wizard \u2014 an expert at assembling AI agent teams. You\'re enthusiastic but concise. Company Wizard bootstraps AI-agent company workspaces from composable templates.\n\nYou are conducting a guided interview to understand what company to set up.\n\n{{CATALOG}}\n\n## How Roles Work\n\n- **Base roles** (marked "always included") are auto-added. You do NOT list them in the JSON.\n- **All other roles** (listed under "Available Extra Roles") are OPTIONAL and must be EXPLICITLY listed in your JSON `roles` array if you want them.\n- **Critically: `engineer` is NOT a base role.** Most software projects need an engineer. If the project involves writing code, building software, or maintaining a repository, you MUST include `engineer` in your `roles` array. The preset does NOT auto-add roles \u2014 you must list every non-base role the company needs.\n- When in doubt, include the engineer. A company that builds software without an engineer agent will have no one to write code.\n\n## Interview Rules\n\n- Ask exactly ONE question per turn. Keep it short and energetic (1-2 sentences). Use a conversational tone.\n- Do NOT output JSON during questions \u2014 just ask the question as plain text.\n- Tailor each question based on previous answers. Show you understood what they said.\n- After 3 questions, summarize what you understood in a brief, enthusiastic paragraph. End with: "Ready to generate your configuration?"\n- When the user confirms, output a human-readable recommendation with reasoning, then the JSON config.\n\n## What to Ask About\n\nAcross your 3 questions, try to cover as many of these as the user\'s initial description left unclear:\n\n1. **What they\'re building** \u2014 Product type, target users, domain (fintech, SaaS, game, etc.)\n2. **Current stage** \u2014 Greenfield, existing codebase, research phase, relaunch?\n3. **Quality vs speed** \u2014 Ship fast, iterate? Or production-grade, high quality from the start?\n4. **Team needs** \u2014 Do they need code review, security, design, marketing, docs, DevOps?\n5. **Special requirements** \u2014 Compliance, accessibility, specific tech stack, CI/CD, game engine?\n6. **Repository** \u2014 Should Paperclip create a new Git repository/workspace, or should the agents use an existing external repo such as GitHub/GitLab? If external, ask for URL and branch/ref; never ask for tokens.\n\nDon\'t ask about things already clear from the initial description. Skip to what\'s missing.\n\n## Information Preservation\n\nThe user\'s interview answers are the primary source of context for the company. When generating the configuration:\n\n- **`companyDescription`**: Write a comprehensive 2-4 paragraph description that captures EVERYTHING learned during the interview \u2014 what the company does, what it\'s building, who it\'s for, key technical decisions, constraints, priorities, and any special context. This is the company\'s permanent record. Be thorough. Do NOT summarize into a single vague sentence.\n- **`goals`**: Array of goals. The first goal is the main user-specific company goal \u2014 its description is the most important field. Keep it outcome-first and product-first: the title and opening sentence must state the primary deliverable or operating outcome, not a supporting constraint. Write a THOROUGH, DETAILED description that includes EVERYTHING the user shared: full requirements, technical specs, acceptance criteria, constraints, edge cases, API contracts, user stories, design decisions, performance targets. Put compliance/security/accessibility/performance constraints in a clearly labelled "Constraints / quality bars" section unless the user explicitly says that constraint is the primary project. If the user\'s wording mixes a main outcome with secondary facts, determine which thing the agents should build/operate first and write that as the top-level goal; put side facts into acceptance criteria, risks, or sub-goals only when they are independent workstreams. Preset/module template goals are added by the wizard after your JSON, so do NOT replace the user\'s objective with generic preset goals like "Build a REST API" or "Set up CI/CD" unless the user explicitly asked only for that.\n- **`projects`**: Array of projects. Each has a `name`, `description`, `goals` array (goal titles it\'s linked to), and repository workspace metadata. If the user chose an external repo, use `workspace.sourceType: "git_repo"` with `repoUrl`, plus `repoRef`/`defaultRef` exactly when the user or repository context provides one; do not force a branch name or remote prefix. If no external repo was provided, use a fresh local Git repository with `workspace.sourceType: "local_path"`, `workspace.defaultRef: "main"` unless the user requested another initial branch, `workspace.setupCommand: "git init -b <defaultRef>"`, and `workspace.isPrimary: true`. Do not include `executionWorkspacePolicy`; the assembler applies isolated worktrees only when Paperclip\'s experimental isolated-workspaces setting is enabled and a usable project base ref exists.\n- **`issues`**: Array of 6-12 CONCRETE, domain-specific initial work items taken straight from what you learned in the interview \u2014 the real features, components, and integrations the user actually described, each with a `title`, a `description` with acceptance criteria, a `priority` (`critical`/`high`/`medium`/`low`), and `assignTo` set to a role on the team. These seed the backlog so the project starts in its actual domain. Issue titles should lead with the core product capability; secondary constraints belong in acceptance criteria or risk notes unless the issue is specifically about that constraint. Do NOT put generic scaffolding here (vision docs, linters, CI, branch protection) \u2014 the wizard adds those automatically.\n\n## RECOMMENDATION Format (when generating config)\n\n- One paragraph explaining your reasoning: why this preset, why these modules, why these roles.\n- A bullet list of the key choices.\n\nThen output the JSON (no markdown fences):\n{{CONFIG_FORMAT}}\n\n## Rules\n\n- `modules` should list ALL modules to activate (including preset ones).\n- `roles` should list ALL non-base roles the company needs. This includes roles that come with the preset. The system does not auto-add preset roles \u2014 you must list them explicitly.\n- If the project involves building software, `engineer` MUST be in `roles`.\n- The primary project MUST state whether it uses a fresh local Git repository or an external Git repository. Do not put credentials or tokens in repository fields.\n- Be pragmatic \u2014 don\'t over-engineer. Match the config to actual needs.\n';
6075
6063
 
6076
6064
  // raw:/paperclip/paperclip-plugin-company-wizard/src/ui/prompts/single-shot-system.md
6077
- var single_shot_system_default = 'You are the Company Wizard. Company Wizard bootstraps AI-agent company workspaces from composable templates.\n\nGiven a natural language description of what the user wants to build, you select the best configuration.\n\n{{CATALOG}}\n\n## How Roles Work\n\n- **Base roles** (marked "always included") are auto-added. You do NOT list them in the JSON.\n- **All other roles** (listed under "Available Extra Roles") are OPTIONAL and must be EXPLICITLY listed in your JSON `roles` array if you want them.\n- **Critically: `engineer` is NOT a base role.** Most software projects need an engineer. If the project involves writing code, building software, or maintaining a repository, you MUST include `engineer` in your `roles` array. The preset does NOT auto-add roles \u2014 you must list every non-base role the company needs.\n- When in doubt, include the engineer. A company that builds software without an engineer agent will have no one to write code.\n\n## Instructions\n\n1. Analyze the user\'s description to understand: what they\'re building, their team size preference, quality vs speed priority, and any specific needs.\n2. Select the best preset as a starting point.\n3. List ALL modules to activate (including preset ones). Add extra modules beyond the preset if the description warrants them.\n4. List ALL non-base roles the company needs. This includes roles from the preset. If the project involves software, include `engineer`.\n5. Suggest a company name (PascalCase-friendly, short, memorable) if not obvious from the description.\n6. Write a thorough company description (2-4 paragraphs) capturing everything the user described \u2014 product, audience, tech stack, constraints, priorities, stage, and special context. This is the company\'s permanent record.\n7. Define goals as an array. The first goal is the main user-specific company goal \u2014 its description is the most important field. Include EVERYTHING the user described: full requirements, technical specs, acceptance criteria, constraints, edge cases, API contracts, user stories, performance targets. If the user provided a detailed spec, reproduce it in full. This is the primary brief all agents work from. Do NOT summarize \u2014 preserve every detail. Add sub-goals with `parentGoal` if the description warrants separate workstreams. Preset/module template goals are added by the wizard after your JSON, so do NOT replace the user\'s objective with generic preset goals like "Build a REST API" or "Set up CI/CD" unless the user explicitly asked only for that.\n8. Define projects as an array. Most setups need one project linked to all goals. Name and describe the project concretely.\n9. Always decide the repository setup for the primary project:\n - If the user gives an existing GitHub/GitLab/remote Git repo, set `workspace.sourceType: "git_repo"`, include `repoUrl`, set `repoRef`/`defaultRef` when known (default to `origin/main`), and use `executionWorkspacePolicy.defaultMode: "isolated_workspace"` with a `git_worktree` strategy.\n - If no external repository is given, assume Paperclip should create a fresh local Git repository. Set `workspace.sourceType: "local_path"`, `workspace.defaultRef: "main"`, `workspace.setupCommand: "git init -b main"`, and `workspace.isPrimary: true`. Do NOT include an `executionWorkspacePolicy` for a fresh local repository \u2014 the repo and its base ref do not exist yet, so isolated git worktrees would fail on the first run. Agents work in the shared project workspace until the repo is established.\n - Never include credentials or tokens in repository URLs or project text.\n10. Define an `issues` array of 6-12 CONCRETE, domain-specific initial work items taken straight from the description \u2014 the real features, components, and integrations the user actually described, each with a `title`, a `description` with acceptance criteria, a `priority`, and `assignTo` set to a role on the team. These seed the backlog so the project starts in its actual domain instead of only doing generic setup. Do NOT put generic scaffolding here (vision docs, linters, CI, branch protection) \u2014 the wizard adds those automatically.\n\nFirst write one paragraph explaining your reasoning: why this preset, why these modules, why these roles.\n\nThen output the JSON (no markdown fences):\n{{CONFIG_FORMAT}}\n';
6065
+ var single_shot_system_default = 'You are the Company Wizard. Company Wizard bootstraps AI-agent company workspaces from composable templates.\n\nGiven a natural language description of what the user wants to build, you select the best configuration.\n\n{{CATALOG}}\n\n## How Roles Work\n\n- **Base roles** (marked "always included") are auto-added. You do NOT list them in the JSON.\n- **All other roles** (listed under "Available Extra Roles") are OPTIONAL and must be EXPLICITLY listed in your JSON `roles` array if you want them.\n- **Critically: `engineer` is NOT a base role.** Most software projects need an engineer. If the project involves writing code, building software, or maintaining a repository, you MUST include `engineer` in your `roles` array. The preset does NOT auto-add roles \u2014 you must list every non-base role the company needs.\n- When in doubt, include the engineer. A company that builds software without an engineer agent will have no one to write code.\n\n## Instructions\n\n1. Analyze the user\'s description to understand: what they\'re building, their team size preference, quality vs speed priority, and any specific needs.\n2. Select the best preset as a starting point.\n3. List ALL modules to activate (including preset ones). Add extra modules beyond the preset if the description warrants them.\n4. List ALL non-base roles the company needs. This includes roles from the preset. If the project involves software, include `engineer`.\n5. Suggest a company name (PascalCase-friendly, short, memorable) if not obvious from the description.\n6. Write a thorough company description (2-4 paragraphs) capturing everything the user described \u2014 product, audience, tech stack, constraints, priorities, stage, and special context. This is the company\'s permanent record.\n7. Define goals as an array. The first goal is the main user-specific company goal \u2014 its description is the most important field. Keep it **outcome-first and product-first**: the title and opening sentence must state the primary deliverable or operating outcome, not a supporting constraint. Preserve compliance, security, accessibility, performance, tech-stack, and domain constraints inside the description under a clear "Constraints / quality bars" section unless the user explicitly says that constraint is the primary project. If the user\'s wording mixes a main outcome with secondary facts, ask yourself which thing the agents should build/operate first and write that as the top-level goal; put side facts into acceptance criteria, risks, or sub-goals only when they are independent workstreams. Include EVERYTHING the user described: full requirements, technical specs, acceptance criteria, constraints, edge cases, API contracts, user stories, performance targets. If the user provided a detailed spec, reproduce it in full, but do not let one constraint dominate the goal or initial issues. Preset/module template goals are added by the wizard after your JSON, so do NOT replace the user\'s objective with generic preset goals like "Build a REST API" or "Set up CI/CD" unless the user explicitly asked only for that.\n8. Define projects as an array. Most setups need one project linked to all goals. Name and describe the project concretely.\n9. Always decide the repository setup for the primary project:\n - If the user gives an existing GitHub/GitLab/remote Git repo, set `workspace.sourceType: "git_repo"`, include `repoUrl`, and set `repoRef`/`defaultRef` exactly when the user or repository context provides one. Do not force a branch name or remote prefix; Paperclip\'s project/worktree settings decide the worktree base ref.\n - If no external repository is given, assume Paperclip should create a fresh local Git repository. Set `workspace.sourceType: "local_path"`, `workspace.defaultRef: "main"` unless the user requested another initial branch, `workspace.setupCommand: "git init -b <defaultRef>"`, and `workspace.isPrimary: true`. Do NOT include an `executionWorkspacePolicy`; the assembler applies isolated worktrees only when Paperclip\'s experimental isolated-workspaces setting is enabled and a usable project base ref exists.\n - Never include credentials or tokens in repository URLs or project text.\n10. Define an `issues` array of 6-12 CONCRETE, domain-specific initial work items taken straight from the description \u2014 the real features, components, and integrations the user actually described, each with a `title`, a `description` with acceptance criteria, a `priority`, and `assignTo` set to a role on the team. These seed the backlog so the project starts in its actual domain instead of only doing generic setup. Issue titles should lead with the core product capability; secondary constraints belong in acceptance criteria or risk notes unless the issue is specifically about that constraint. Do NOT put generic scaffolding here (vision docs, linters, CI, branch protection) \u2014 the wizard adds those automatically.\n\nFirst write one paragraph explaining your reasoning: why this preset, why these modules, why these roles.\n\nThen output the JSON (no markdown fences):\n{{CONFIG_FORMAT}}\n';
6078
6066
 
6079
6067
  // src/ui/prompts/messages.json
6080
6068
  var messages_default = {
6081
6069
  interviewStart: "Here's what I want to build:\n\n{{DESCRIPTION}}\n\nStart the interview. Ask your first question.",
6082
6070
  singleShot: "{{DESCRIPTION}}",
6083
6071
  generateConfig: "Generate the configuration now. Remember: include ALL non-base roles the company needs in the roles array (engineer is NOT a base role \u2014 list it if this project involves code). Write a thorough companyDescription that captures everything we discussed. The goals array must preserve the user-specific objectives; preset/module template goals are added later by the wizard, so do not replace the user's requested outcome with a generic preset goal like \"Build a REST API\" unless that is truly the entire objective. The first goal's description must contain ALL requirements, specs, and details \u2014 this is the primary brief for all agents. The primary project must explicitly choose repository setup: either a fresh local Git repository or an external Git repository such as GitHub. Never include credentials or tokens in repository fields. Also include an `issues` array of 6-12 CONCRETE, domain-specific initial work items taken straight from the brief \u2014 the real features, components, and integrations the user's spec actually describes, each with a `title`, a `description` with acceptance criteria, a `priority`, and `assignTo` set to a role on the team. These seed the backlog so the project starts in its actual domain. Do NOT put generic scaffolding here (vision docs, linters, CI, branch protection) \u2014 the wizard adds those automatically.",
6084
- configFormat: `Respond with ONLY a JSON object using this shape. Use exactly one project object for a single-project setup. For a fresh/new repository, use workspace.sourceType=local_path, defaultRef=main, setupCommand=git init -b main, and isPrimary=true, and do NOT include executionWorkspacePolicy (the repo does not exist yet, so isolated git worktrees would fail on the first run). For an existing external repo, use workspace.sourceType=git_repo, include repoUrl plus repoRef/defaultRef (default origin/main), and include executionWorkspacePolicy with isolated git_worktree.
6072
+ configFormat: `Respond with ONLY a JSON object using this shape. Use exactly one project object for a single-project setup. For a fresh/new repository, use workspace.sourceType=local_path, defaultRef=main unless another initial branch was requested, setupCommand=git init -b <defaultRef>, and isPrimary=true, and do NOT include executionWorkspacePolicy. For an existing external repo, use workspace.sourceType=git_repo, include repoUrl plus repoRef/defaultRef only when the user or repository context provides one. Do not force a branch name or remote prefix. Do not include executionWorkspacePolicy; the assembler applies isolated worktrees only when Paperclip's experimental isolated-workspaces setting is enabled.
6085
6073
  {
6086
6074
  "name": "CompanyName",
6087
6075
  "companyDescription": "Comprehensive 2-4 paragraph description of what this company does, what it is building, who it is for, key technical decisions, priorities, constraints, and any special context. This is the company's permanent record \u2014 be thorough and specific.",
6088
6076
  "goals": [
6089
6077
  {
6090
6078
  "title": "Main user-specific goal title",
6091
- "description": "THOROUGH description with ALL requirements, specs, acceptance criteria, constraints, edge cases, and every detail the user provided. This is the primary brief for all agents \u2014 preserve every detail, do NOT summarize. Multiple paragraphs expected. Do not use a generic preset goal title unless the user asked for exactly that."
6079
+ "description": "THOROUGH description with ALL requirements, specs, acceptance criteria, constraints, edge cases, and every detail the user provided. This is the primary brief for all agents \u2014 preserve every detail, do NOT summarize. Multiple paragraphs expected. Lead with the primary deliverable or operating outcome; put side constraints under Constraints / quality bars unless one is explicitly the main project."
6092
6080
  },
6093
6081
  {
6094
6082
  "title": "Additional user-specific goal if needed",
@@ -7142,11 +7130,52 @@ function StepIndicator() {
7142
7130
  function WizardShell() {
7143
7131
  const state = useWizard();
7144
7132
  const dispatch = useWizardDispatch();
7133
+ const checkUpdate = usePluginAction6("check-update");
7134
+ const [updateInfo, setUpdateInfo] = useState9(null);
7145
7135
  const StepComponent = STEP_COMPONENTS[state.step];
7146
7136
  useEffect6(() => {
7147
7137
  window.scrollTo({ top: 0 });
7148
7138
  }, [state.step]);
7139
+ useEffect6(() => {
7140
+ let cancelled = false;
7141
+ checkUpdate({}).then((result) => {
7142
+ if (!cancelled) setUpdateInfo(result);
7143
+ }).catch(() => {
7144
+ if (!cancelled) setUpdateInfo(null);
7145
+ });
7146
+ return () => {
7147
+ cancelled = true;
7148
+ };
7149
+ }, []);
7149
7150
  return /* @__PURE__ */ jsxs13("div", { className: "flex flex-col", children: [
7151
+ updateInfo?.ok && updateInfo.updateAvailable && /* @__PURE__ */ jsx19("div", { className: "mx-6 mt-4 rounded-lg border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-800 dark:text-amber-200", children: /* @__PURE__ */ jsxs13("div", { className: "flex items-start justify-between gap-3", children: [
7152
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-start gap-2", children: [
7153
+ /* @__PURE__ */ jsx19(TriangleAlert, { className: "h-4 w-4 shrink-0 mt-0.5" }),
7154
+ /* @__PURE__ */ jsxs13("div", { children: [
7155
+ /* @__PURE__ */ jsx19("p", { className: "font-medium", children: "Company Wizard update available" }),
7156
+ /* @__PURE__ */ jsxs13("p", { className: "mt-0.5 text-amber-700 dark:text-amber-300", children: [
7157
+ "Installed ",
7158
+ updateInfo.currentVersion,
7159
+ "; latest ",
7160
+ updateInfo.latestVersion,
7161
+ ". Update the plugin package, then reload Paperclip."
7162
+ ] })
7163
+ ] })
7164
+ ] }),
7165
+ updateInfo.url && /* @__PURE__ */ jsxs13(
7166
+ "a",
7167
+ {
7168
+ href: updateInfo.url,
7169
+ target: "_blank",
7170
+ rel: "noreferrer",
7171
+ className: "inline-flex items-center gap-1 whitespace-nowrap font-medium hover:underline",
7172
+ children: [
7173
+ "npm",
7174
+ /* @__PURE__ */ jsx19(ExternalLink, { className: "h-3 w-3" })
7175
+ ]
7176
+ }
7177
+ )
7178
+ ] }) }),
7150
7179
  getUserStepIndex(state) >= 1 && state.step !== "provision" && state.step !== "done" && /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-end px-6 py-3", children: /* @__PURE__ */ jsx19(StepIndicator, {}) }),
7151
7180
  /* @__PURE__ */ jsx19("main", { className: "flex-1 flex items-start justify-center p-6", children: /* @__PURE__ */ jsx19("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ jsx19(StepComponent, {}) }) }),
7152
7181
  state.error && /* @__PURE__ */ jsxs13("div", { className: "fixed bottom-0 inset-x-0 bg-destructive/10 border-t border-destructive/20 px-6 py-3 text-sm text-destructive flex items-center justify-between", children: [