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

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 ADDED
@@ -0,0 +1,566 @@
1
+ # Changelog
2
+
3
+ All notable changes to the Company Wizard plugin are documented here.
4
+
5
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
+
7
+ ---
8
+ ## [0.3.24] - 2026-06-15
9
+
10
+ ### Changed
11
+
12
+ - **PR review is now substantive instead of ceremonial.** The `pr-review` module previously gated merges on a `code-reviewer` reading a diff and recording a verdict — effectively self-approval, since all agents share one model and one GitHub account. The merge gate is now **executed verification**: when the `ci-cd` module is active, CI (lint/test/build) must be green before the Engineer merges; otherwise the Engineer must run the test suite/build and paste the real output into the merge-gate verdict. The hard gate sits on the Engineer's final merge-gate stage and holds regardless of which reviewers are present.
13
+ - **QA is the substantive review stage; the Code Reviewer is advisory.** The `pr-review` `reviewGate` reviewers changed from `["code-reviewer"]` to `["qa"]`. QA's skill (`qa-review.md`) was rewritten with two explicit modes (CI present vs. no CI) and a hard evidence requirement — a verdict that does not cite executed verification is invalid. The Code Reviewer's skill (`code-review.md`) and base role files (`roles/code-reviewer/AGENTS.md`, `HEARTBEAT.md`) were reframed as advisory, non-blocking; they no longer instruct GitHub-native `gh pr review --approve`/`--request-changes` (which cannot work with a shared GitHub account) and now post advisory feedback via `gh pr comment --body-file`.
14
+ - **`renderReviewGate` / BOOTSTRAP guardrail are CI-aware.** The generated `executionPolicy` sketch and the BOOTSTRAP PR-review guardrail now render the CI-green precondition (or the run-the-tests-and-paste-output fallback) on the merge-gate stage, plus an evidence-required note that rejects "looks good" verdicts (`assemble.js`).
15
+
16
+ ### Added
17
+
18
+ - **PR-scoped security review.** `security-engineer` is now in `pr-review`'s `activatesWithRoles`, and a new skill `templates/modules/pr-review/agents/security-engineer/skills/pr-security-review.md` reviews a specific PR's diff for security-relevant changes (auth, secrets, input boundaries, crypto, dependencies, infra exposure). The stage is conditional — the Engineer adds it only when the change is security-relevant. Named `pr-security-review.md` (not `security-review.md`) to avoid clobbering the `security-audit` module's capability skill of the same name. `pr-conventions.md` (Review Workflow, Review Roles, Merge Rules) was rewritten to match the new model.
19
+
20
+ ## [0.3.23] - 2026-06-10
21
+
22
+ ### Changed
23
+
24
+ - **`CHANGELOG.md` and `CONTRIBUTING.md` are now included in the published npm package** (added to the `files` allowlist). Previously only `dist/`, `templates/`, plus the npm defaults (`README.md`, `LICENSE`, `package.json`) shipped, so the changelog and contributor guide were missing from the tarball.
25
+
26
+ ## [0.3.22] - 2026-06-10
27
+
28
+ ### Fixed
29
+
30
+ - **Wizard-created routines are now linked to the main project.** The wizard creates routines with board authority at provisioning time, but it created them without a `projectId`. Projects are created later by the CEO during bootstrap, and the CEO can only edit routines assigned to itself — so routines owned by other agents (e.g. the Product Owner) stayed project-less forever. The worker now pre-creates the main project before the routines and passes its id to every `createRoutine`; `BOOTSTRAP.md` marks the main project as already created (gated on there being routines) so the CEO links goals/issues to it instead of recreating it. Best-effort — if project creation fails, routines are still created (project-less) rather than blocking provisioning. (`worker.ts`, `assemble.js`.)
31
+ - **PR bodies and review comments now render as Markdown.** Agents posted GitHub PR bodies and review comments with inline `gh pr … --body "<inline>"`. A double-quoted shell argument does not turn `\n` into a real newline, so multi-line Markdown rendered on GitHub as literal `text\ntext\ntext`. All PR-review guidance (engineer `pr-workflow`, the six reviewer skills, the `code-reviewer` role, and `pr-conventions.md`) now writes the Markdown to a file and uses `--body-file`, with a verdict-heading comment template (`## ✅ Approved` / `## 🔄 Changes requested`).
32
+
33
+ ## [0.3.21] - 2026-06-10
34
+
35
+ ### Added
36
+
37
+ - **Deferred-isolation guidance for fresh local repos.** When the instance has isolated worktrees enabled but a project starts as a fresh local repository, the isolated `executionWorkspacePolicy` is (correctly) omitted at provisioning — worktrees need an existing base ref and would fail on the first run. Previously this left the operator thinking the setting did nothing, so they flipped it by hand mid-run and stranded early work in the shared workspace. The project's BOOTSTRAP block now renders an explicit note: as the final step of "Prepare GitHub repository", once the initial commit is on `main`, switch the project to isolated worktrees (Project settings → isolated workspaces, or set `executionWorkspacePolicy` to `isolated_workspace`/`git_worktree` with `baseRef: main`). Rendered by `renderDeferredIsolationNote` in `assemble.js`; only appears when isolation is enabled and the repo is fresh-local.
38
+
39
+ ### Fixed
40
+
41
+ - **PR merge gate — approved PRs now actually get merged.** The `pr-review` execution-policy chain previously ended with the **Product Owner**'s `approval` stage. Because clearing the final stage auto-closes the issue to `done`, the Product Owner (not the engineer) was the last actor, so the engineer was never woken to merge — approved, mergeable PRs stayed open on GitHub while their issues showed `done`. The chain now ends with a final `approval` stage owned by the **Engineer** (the merge gate): the engineer is woken last, merges the PR, then records the verdict that closes the issue. Adds a `mergeGate` field to the `pr-review` `reviewGate`, renders the merge-gate stage in the BOOTSTRAP `executionPolicy` sketch (`resolveReviewGate`/`renderReviewGate` in `assemble.js`), and updates the engineer `pr-workflow` skill, `pr-conventions.md`, and the bootstrap PR-review guardrail.
42
+ - **Repository setup now ignores `.paperclip/`.** The `Prepare GitHub repository` foundation issue and `docs/git-workflow.md` now instruct adding a `.paperclip/` entry to `.gitignore` before the first commit (creating `.gitignore` if missing). Paperclip keeps per-issue git worktrees and workspace metadata under `.paperclip/` inside the repo; without the ignore, that transient state can be committed and isolated worktrees can nest inside the repo, producing confusing git state for every agent.
43
+
44
+ ## [0.3.20] - 2026-06-09
45
+
46
+ ### Added
47
+
48
+ - **Opt-in agent persona enrichment** (`enableEnrichedPersonas` plugin setting, default `false`). When enabled, assembly appends enrichment fragments into generated agent files; the lean baseline is unchanged when off.
49
+ - **Domain lenses** (`roles/<role>/LENSES.md` → `SOUL.md`) — named mental models an agent cites in comments. Lens-heavy: `security-engineer` (STRIDE, OWASP Web/API/LLM, least privilege, blast radius…), `ux-researcher` (Nielsen's 10, Jakob's/Hick's/Fitts's Law, Kano, JTBD…), `ui-designer` (Gestalt, visual hierarchy, design tokens…). Focused: `product-owner` (RICE/ICE, MoSCoW, WSJF…), `code-reviewer` (correctness-first, blast radius, smallest-diff…), `devops` (error budgets, MTTR, rollback-first…). Operational roles (`engineer`, `qa`) intentionally have none.
50
+ - **Output/review bars** (`modules/<module>/skills/<skill>.bar.md` → primary skill) — concrete "what good/finished work looks like" with negative examples, across 14 module skills (tech-stack, architecture-plan, design-system, api-design, codebase-audit, user-testing, accessibility-audit, threat-model, security-review, market-analysis, brand-identity, backlog-health, ci-cd, monitoring).
51
+ - **Done-criteria** (`roles/<role>/DONE.md` → `HEARTBEAT.md`) — explicit "verify before done" + "always comment before exiting a heartbeat" rule, for all 8 enriched roles.
52
+ - Enrichment fragments are filtered from every copy path (`isEnrichmentFragment`) so they never ship as standalone files; injection mirrors the existing module heartbeat-section pattern and is threaded `manifest.ts → worker.ts → assembleCompany`.
53
+
54
+ ## [0.3.19] - 2026-06-09
55
+
56
+ ### Changed
57
+
58
+ - **Rebranded all leftover "Clipper" references to "Company Wizard"** — AI wizard prompts (`interview-system.md`, `single-shot-system.md` in both `templates/ai-wizard/` and `src/ui/prompts/`), module doc footers (`_Generated by Company Wizard._`), the `template-check-use-case` command, CONTRIBUTING clone instructions, and internal identifiers (`company-wizard-preview-` temp dir, `.company-wizard-plugin-root` CSS class, `sync-plugin.sh` `PLUGIN_DIR`, the `resolveRole` parameter, and the plugin test suite name).
59
+ - **Authorship and license updated** — copyright assigned to Sascha Pietrowski; Yesterday AI credited in `LICENSE`, `package.json` contributors, and the README fork note for the original `@yesterday-ai/paperclip-plugin-company-wizard` (template system, assembly logic, API client).
60
+
61
+ ### Fixed
62
+
63
+ - **README role documentation corrected** — only the CEO is a base role (the "How It Works" assembly step no longer claims Engineer is base); the Software Engineer role was added to the roles table and details (now 16 optional roles, matching `CLAUDE.md`/`AGENTS.md` and the template library); the orphaned CFO role-detail block was removed.
64
+ - **`pnpm-workspace.yaml` supply-chain excludes corrected** — `minimumReleaseAgeExclude` referenced non-existent `@starlein/*` packages instead of the real `@paperclipai/plugin-sdk` and `@paperclipai/shared` dependencies.
65
+
66
+ ### Added
67
+
68
+ - **README "Why Company Wizard?" highlights** — a concise feature summary near the top of the README.
69
+ - **ROADMAP refreshed** — post-fork plugin-migration work moved to Done; new backlog items for re-provisioning, dry-run preview, per-role model tuning, and a routine pattern library.
70
+
71
+ ### Removed
72
+
73
+ - Stale `docs/superpowers/` planning artifacts (pr-review-execution-policy plan + spec, already merged).
74
+
75
+ ## [0.3.18] - 2026-06-09
76
+
77
+ ### Fixed
78
+
79
+ - **Removed optional provisioning telemetry support.**
80
+ - **Repository bootstrap wording for existing repos is now accurate** — the github-repo foundation task is now `Prepare GitHub repository` and explicitly distinguishes fresh-repository setup from verification of an existing repository state.
81
+ - **Isolated-worktree execution policy now normalizes `baseRef` consistently** (`main` → `origin/main`) and keeps local fresh repository setups on shared workspaces until the repo exists.
82
+
83
+ ## [0.3.15] - 2026-06-08
84
+
85
+ ### Fixed
86
+
87
+ - **PR review bootstrap issue is now a foundation task.** `Set up Paperclip PR review workflow` is explicitly marked as `bootstrapPhase: "foundation"` so it no longer gets scheduled after generic module tasks in the backlog.
88
+ - **Regression coverage added for bootstrap issue ordering.** Added an integration assertion so PR review setup remains ahead of backlog work when both setup tasks are present.
89
+
90
+ ## [0.3.14] - 2026-06-08
91
+
92
+ ### Fixed
93
+
94
+ - **Review-step repository edits now fully replace source mode metadata.** The summary/review editor now writes a canonical `workspaceSourceType` (`git_repo` or `local_path`) alongside `workspace`, preventing stale legacy `workspaceSourceType` values from blocking mode switches between new and existing repos.
95
+
96
+ ## [0.3.13] - 2026-06-08
97
+
98
+ ### Fixed
99
+
100
+ - **Review-step repository editing now stays in sync.** The summary/review repository editor now handles legacy `workspaceSourceType` values consistently, so editing fresh-vs-existing repository settings in the Review step keeps the rendered preview aligned and always uses the selected mode during provisioning.
101
+
102
+ ---
103
+ ## [0.3.12] - 2026-06-08
104
+
105
+ ### Changed
106
+
107
+ - **Workspace isolation is now read from Paperclip instance settings** — the plugin no longer exposes an `enableIsolatedWorktrees` plugin option. `executionWorkspacePolicy` for `git_repo` projects now follows `enableIsolatedWorkspaces` from Paperclip instance experimental settings (`/api/instance/settings/experimental`). Fresh local repos continue to skip isolated worktrees during bootstrap.
108
+
109
+ ---
110
+ ## [0.3.11] - 2026-06-08
111
+
112
+ ### Fixed
113
+
114
+ - **CEO bootstrap no longer reverse-engineers the Paperclip API from server source.** During bootstrap the CEO was reading/grepping `server/src/routes/*` and `packages/shared/src/validators/*` to recover exact create-payload schemas, because BOOTSTRAP.md listed *what* to create but not the create endpoints or valid enum values for goals and projects. The first create pass then failed on a project status enum (`active` is a goal status, not a project status). `templates/bootstrap-instructions.md` now documents the `POST /api/companies/{companyId}/goals` and `…/projects` endpoints, the valid `level`/`status` enums for goals and projects (explicitly noting `active` is goal-only), and instructs the agent not to inspect server source to recover schemas. Also reiterates that fresh local repos must not attach an `executionWorkspacePolicy`.
115
+
116
+ ### Changed
117
+
118
+ - **Repository setting on the review/summary step is now an obvious clickable control.** Previously the only way to edit it was a hover-only pencil icon shared by every row, which was hard to discover. The repository value is now a button with a visible "Change" / "Change — use an existing repository" affordance that opens the inline new-vs-existing editor (both manual and AI paths).
119
+
120
+ ---
121
+ ## [0.3.10] - 2026-06-08
122
+
123
+ ### Fixed
124
+
125
+ - **Fresh local repositories no longer bootstrap with isolated git worktrees.** The wizard was provisioning `executionWorkspacePolicy: { defaultMode: "isolated_workspace", workspaceStrategy: { type: "git_worktree", baseRef: "main" } }` on brand-new `local_path` projects. Worker agents then tried to create a worktree off `main` before the repo (and its base ref) existed, so every early run failed and agents flipped to `error`. The isolated policy is now suppressed for fresh local repos — agents work in the shared project workspace during bootstrap — while existing external repos (`sourceType: "git_repo"`) keep the isolated `git_worktree` policy. Guarded centrally in `assemble.js` (so both manual and AI-generated configs are covered) and removed at the source in `StepRepository` and the AI wizard prompts (`messages.json`, `single-shot-system.md`).
126
+ - **Spurious React "unique key" warnings in the plugin UI.** The UI bundle was compiled against the production JSX runtime (`react/jsx-runtime`), but the Paperclip host loads a development build of react-dom, which then warned about missing keys for every component returning multiple static children (`PathCard`, `StepOnboarding`, `ConfigReview`). The UI now builds with the development JSX runtime (`jsxDEV`) by default so elements carry the static-children flag; published packages still use the production runtime via `pnpm build:prod` / `prepublishOnly`.
127
+
128
+ ### Added
129
+
130
+ - **Inline repository editor on the review/summary step** (`ConfigReview`). The Repository row is now editable in both the manual and AI paths: toggle between "New repository" (initial branch) and "Existing repository" (repo URL + default ref). Selecting an existing repository opens a URL field and applies the external-repo workspace + isolated `git_worktree` policy; switching back to a new repository clears it.
131
+
132
+ ### Changed
133
+
134
+ - **Repository setup logic extracted to `src/ui/lib/repository.ts`** (`repositoryProjectFields`, `getRepositoryMode`, `getRepositoryRef`, `getRepositoryUrl`, `normalizeNewRepoBranch`) and shared by `StepRepository` and the new inline editor, so the new-vs-external workspace + execution-policy rules stay consistent across both entry points.
135
+
136
+ ---
137
+ ## [0.3.9] - 2026-06-08
138
+
139
+ ### Changed
140
+
141
+ - **PR reviews now use the issue's native `executionPolicy` instead of separate child review issues.** The Engineer sets an ordered stage chain on the originating issue — a `review` stage for the Code Reviewer, optional `review` stages for relevant domain reviewers (UI/UX/QA/DevOps), and a final `approval` stage for the Product Owner — and merges once all stages clear. Reviewer skills record `approved` / `changes_requested` on their stage (the verdict-submit path is agent-runtime logic, so the skills stay mechanism-neutral). This surfaces reviewer/approver in the native UI and removes 2–6 review issues per PR. Touches the `pr-review` engineer + six reviewer skills, `pr-conventions.md`, the module metadata, and the BOOTSTRAP guardrail.
142
+
143
+ ### Added
144
+
145
+ - **`reviewGate` field on declared module/preset issues** (`{ reviewers: [...], approver: "..." }`). Assembly resolves the roles present in the team (dropping absent ones) and renders an ordered executionPolicy sketch into BOOTSTRAP.md; the CEO resolves roles → agentIds when creating the issue. `client.createIssue` already forwards `executionPolicy`, so no client change was needed. The `pr-review` setup issue ships a `reviewGate` as the first real example.
146
+
147
+ ---
148
+ ## [0.3.8] - 2026-06-08
149
+
150
+ ### Changed
151
+
152
+ - **`anthropicApiKey` and `paperclipPassword` plugin settings are now plain string fields** instead of `secret-ref`. The Paperclip host rejects saving any `secret-ref` field until company-scoped plugin config ships (error: "Plugin secret references are disabled until company-scoped plugin config lands"), which blocked saving the plugin settings entirely. `resolveAnthropicApiKey` now uses a directly entered key (`sk-ant-...`) as-is and only falls back to host secret resolution for legacy installs that still store a secret reference. Trade-off: the Anthropic key is now stored in plain plugin config until the host secret store is available.
153
+
154
+ ---
155
+ ## [0.3.7] - 2026-06-08
156
+
157
+ ### Fixed
158
+
159
+ - **Agent filter bug in the `auto-assign` module.** Corrected the agent-matching filter used in the CEO/Product Owner heartbeat sections and the primary + fallback `auto-assign` skills.
160
+
161
+ ---
162
+ ## [0.3.6] - 2026-06-07
163
+
164
+ ### Fixed
165
+
166
+ - **Bootstrap ordering hardened** in `assemble.js`, with added integration coverage.
167
+ - **PR review workflow tightened.** Review skills across all reviewing roles (code reviewer, devops, engineer, product owner, QA, UI designer, UX researcher) and the `pr-conventions` doc were updated for consistent, role-appropriate review scope; `github-repo` and `pr-review` module metadata adjusted.
168
+
169
+ ---
170
+ ## [0.3.5] - 2026-06-07
171
+
172
+ ### Changed
173
+
174
+ - **Worker agents no longer run always-on heartbeats.** Since the plugin now provisions the whole team (0.3.2) plus all routines (0.3.4), enabling a heartbeat on every agent produced a burst of concurrent and queued runs that overloaded the dev server (frequent crashes/restarts, cascading `process_lost` failures). Paperclip wakes an agent when work is assigned to it, and routines drive scheduled work, so only the CEO (coordinator) keeps an always-on heartbeat; all other agents are now created with the heartbeat disabled and woken on assignment. This sharply reduces baseline concurrency.
175
+
176
+ ---
177
+ ## [0.3.4] - 2026-06-07
178
+
179
+ ### Fixed
180
+
181
+ - **Bootstrap no longer blocks on routine creation.** Paperclip only lets an agent create routines assigned to itself, so the CEO following the bootstrap could not create routines owned by other agents (backlog grooming and auto-assign belong to the Product Owner) — it had to delegate them to a separate issue and block the bootstrap. The plugin now creates all routines directly during provisioning (with board authority, each assigned to its owning agent, with cron triggers), the same way it already creates the agents. BOOTSTRAP.md tells the CEO the routines already exist. New companies only; existing-company runs leave routines untouched.
182
+
183
+ ---
184
+ ## [0.3.3] - 2026-06-07
185
+
186
+ ### Changed
187
+
188
+ - **Shared docs are now scoped per role.** Each agent's AGENTS.md previously listed every doc in `docs/`, so e.g. a Code Reviewer was told to read the marketing and vision templates. Docs are now referenced only by the roles of the module that ships them (the CEO, as coordinator, still sees all); a module with no role association stays company-wide.
189
+ - **Doc references use relative paths.** They were absolute paths that baked in the (possibly collision-suffixed) company directory name; they are now `docs/<file>` relative to the agent home, which stays valid if the company directory is renamed.
190
+
191
+ ---
192
+ ## [0.3.2] - 2026-06-07
193
+
194
+ ### Fixed
195
+
196
+ - **Agents are created with complete instructions.** The plugin now provisions the entire team directly — every non-CEO agent (engineer, code reviewer, etc.) is created with its full `instructionsBundle` (AGENTS.md + HEARTBEAT/SOUL/TOOLS + skills), the same proven path already used for the CEO. Previously the CEO created these agents during bootstrap with only an `instructionsFilePath`, so the host materialized a bundle from a single entry file and each agent ended up with a bare AGENTS.md that referenced its real skills/docs via fragile external absolute paths. BOOTSTRAP.md now tells the CEO the agents already exist (reuse by `metadata.templateRole`, do not duplicate).
197
+ - **Isolated workspaces no longer fail on first run.** Fresh local projects used `setupCommand: "git init -b main"`, which leaves an unborn `main` (no commits); the `isolated_workspace` / `git_worktree` policy then failed `git worktree add … main` until an agent happened to make the first commit, so the earliest issues started as "failed" with a workspace error. The default now seeds an initial empty commit (`git init -b main && git … commit --allow-empty …`) so `main` is a valid base ref immediately. A real custom `setupCommand` is left untouched; a missing one is seeded.
198
+
199
+ ---
200
+ ## [0.3.1] - 2026-06-07
201
+
202
+ ### Added
203
+
204
+ - **Domain-specific initial issues.** The AI wizard now generates an `issues` array of concrete, project-specific first work items taken straight from the brief. These lead the bootstrap backlog ahead of the generic preset/module setup issues, so the project starts rolling in its actual domain instead of only doing generic scaffolding. Plumbed end-to-end (prompt → wizard state → assembly → BOOTSTRAP.md) with assignee resolution (falls back to CEO when the target role is absent) and deduplication against module issues.
205
+
206
+ ### Changed
207
+
208
+ - AI wizard config generation now uses Claude Opus (`claude-opus-4-8`), with `max_tokens` raised to 32768 so a full-spec config is never truncated mid-JSON.
209
+ - `sync-plugin.sh` now also syncs the `~/.paperclip/plugin-templates` cache. The worker resolves templates from that cache first, so a stale cache silently masked every local template change; the sync script keeps it current.
210
+
211
+ ### Fixed
212
+
213
+ - AI wizard config generation no longer fails with `RPC call "performAction" timed out after 30000ms`. All Anthropic calls run as background jobs in the worker (start + poll), so no single `performAction` RPC blocks past the host's hard 30s timeout — even for long Opus generations.
214
+
215
+ ---
216
+ ## [0.3.0] - 2026-06-06
217
+
218
+ ### Fixed
219
+
220
+ - Secret reference handling for plugin settings now works with the current Paperclip host secret flow.
221
+
222
+ ---
223
+ ## [0.2.7] — 2026-06-06
224
+
225
+ ### Added
226
+
227
+ - Two new `game-design` capabilities: `level-design` (owners: level-designer → game-designer → engineer) and `audio-design` (owners: audio-designer → game-designer → engineer), each with a shared primary skill and role fallback — so the Level Designer and Audio Designer roles now own real module work instead of shipping empty.
228
+ - `level-designer` added to the `build-game` preset; its "Design all levels and progression" issue reassigned to the specialist.
229
+ - Preset coverage: `monitoring` added to `secure` and `full`; `user-testing` added to `gtm`, `content`, and `launch-pack`; `devops` role added to `repo-maintenance`, `qa` to `quality`, `ux-researcher` to `gtm` and `content`. Every module and role is now referenced by at least one preset.
230
+ - `src/logic/load-templates.d.ts` — type declarations for the plain-JS loader (restores a clean `tsc --noEmit`).
231
+ - Tests: `loadModules` description-precedence cases and an integration test asserting all `$AGENT_HOME` references resolve to absolute paths.
232
+
233
+ ### Changed
234
+
235
+ - **Routines now run every few hours, around the clock** (previously weekly or business-hours only): auto-assign every 2h, stall-detection every 3h, backlog grooming every 4h, CI pipeline health every 6h, broken-link check every 6h. `concurrencyPolicy: skip_if_active` added to the frequent routines (including the `*/15` API health check) so runs never pile up. Periodic audits (dependency/security scan, Core Web Vitals) stay weekly.
236
+ - **Initial backlog**: the `backlog` module's bootstrap issue now seeds an initial backlog of 15-20 actionable issues so the team has immediate, parallelizable work; grooming keeps at least 8 actionable issues ready (was 3).
237
+ - `security-engineer` now maps to the dedicated Paperclip `security` role (was `general`).
238
+ - `@paperclipai/plugin-sdk` and `@paperclipai/shared` are declared as `peerDependencies` with the minimum required version `>=2026.529.0` — the host provides the SDK at runtime (it is externalized from the bundle).
239
+ - `loadModules()` description precedence: `module.meta.json` `description` wins; the README first line is only a fallback (removes a redundant file read).
240
+ - `ux-review` skill now guards its `docs/USER-TESTING.md` reference with an explicit "if exists" condition, matching the other review skills.
241
+
242
+ ### Fixed
243
+
244
+ - **Broken agent file links**: skill, shared-doc, and role-file references used `$AGENT_HOME/...` (or relative `docs/...`), but Paperclip sets `AGENT_HOME` to a separate per-agent workspace dir (`<instanceRoot>/workspaces/<agentId>`) that does not contain the provisioned files. Assembly now rewrites every `$AGENT_HOME` reference and the shared-doc references to absolute paths under `companyDir/agents/<role>/` and `companyDir/docs/`, so HEARTBEAT/SOUL/TOOLS/skills/docs resolve regardless of the agent's runtime cwd.
245
+ - **Duplicate bootstrap issues**: a module issue sharing a title with a curated preset issue (e.g. `build-game`'s "Create Game Design Document") was emitted twice. Assembly now de-duplicates issues by title, with the preset issue winning.
246
+ - `tsc --noEmit` failure (TS7016) on the `load-templates.js` import, via the new declaration file.
247
+
248
+ ### Removed
249
+
250
+ - `cfo` role — it was orphaned (in no preset, owned no capability, never activated). Documentation and role counts updated. The `cfo` value remains a valid Paperclip `paperclipRole` enum entry.
251
+
252
+ ---
253
+ ## [0.2.6] — 2026-05-06
254
+
255
+ ### Added
256
+
257
+ - **Repository workspace step** — new `StepRepository` wizard step in the manual path lets users choose between creating a fresh local Git repo or connecting an existing external repository (GitHub, GitLab, etc.)
258
+ - `ProjectWorkspaceConfig` and `ProjectExecutionWorkspacePolicy` TypeScript interfaces in `WizardContext`
259
+ - `resolveEffectiveModules()` — expands transitive module `requires` dependencies; ensures the full module graph is activated
260
+ - `collectPresetBootstrapData()` — extracts `issues[]`, `routines[]`, and `labels[]` defined at the preset level so they are included in BOOTSTRAP.md
261
+ - `normalizeProjectWorkspace()` / `renderWorkspaceMetaFields()` / `formatWorkspaceObject()` helpers — flexible rendering of `local_path` and `git_repo` workspace types in BOOTSTRAP.md
262
+ - `executionWorkspacePolicy` support in project metadata (defaultMode, workspaceStrategy with git_worktree)
263
+ - `goalId` field support on issues in BOOTSTRAP.md
264
+ - Repository row in `ConfigReview` summary with edit link back to the repository step
265
+ - `redactSecrets()` pass on all durable bootstrap text — strips tokens, API keys, and common secret patterns before writing
266
+ - Secrets guardrail and PR review workflow guardrail in `templates/bootstrap-instructions.md`
267
+ - `presetIssues`, `presetRoutines`, `presetLabels` params to `assembleCompany()`
268
+ - `explicitBootstrapLabels` pipeline — preset/module-level labels are registered before issue-derived labels
269
+
270
+ ### Changed
271
+
272
+ - AI wizard (`StepAiWizard`) now normalizes `workspace` and `executionWorkspacePolicy` from AI-generated project configs
273
+ - All AI prompts (single-shot, interview, config-format, messages) updated to ask about and encode repository setup — fresh local repo vs. external Git repo; never request credentials
274
+ - `start-provision` and `preview-files` worker actions use `resolveEffectiveModules()` and pass preset bootstrap data to assembly
275
+ - `WizardProject` extended with `workspace`, `workspaceSourceType`, `repoUrl`, `repoRef`, `defaultRef`, `executionWorkspacePolicy`
276
+ - `repository` added as a step in the manual wizard flow (`MANUAL_STEPS`)
277
+ - `WizardShell` maps the `repository` step to `StepRepository`
278
+ - `companyDescription` now passed through `escapeBody()` (which includes secret redaction)
279
+ - `buildBootstrapLabels()` accepts explicit labels; existing label names are not overwritten by issue-derived ones
280
+ - `pr-review` module activates an extra BOOTSTRAP.md note about PR review child issues
281
+ - Version bumped to 0.2.6; switched to public npm registry (`--access restricted`)
282
+ CEO default adapter is Codex Local with `gpt-5.5` and high reasoning (`modelReasoningEffort`/`thinkingLevel`).
283
+
284
+ ### Fixed
285
+
286
+ - CEO provisioning now sends the role description as Paperclip `capabilities` and mirrors it into agent metadata so newly created CEOs are not saved with empty summaries.
287
+ - CEO default runtime now caps heartbeat concurrency at one run (`maxConcurrentRuns: 1`).
288
+
289
+ ---
290
+
291
+ ## [0.1.16] — 2026-04-22
292
+
293
+ ### Added
294
+
295
+ - **Existing-company provisioning** — the wizard can target an existing Paperclip company instead of creating a new one. New `existingCompanyId` state field and `SET_EXISTING_COMPANY_ID` action in `WizardContext`, a "Target" row in `ConfigReview` with inline edit for pasting a company ID, and a summary button label that adapts ("Provision into Existing Company" vs "Create Company")
296
+ - **Approval-aware agent hiring** — `PaperclipClient.createAgent()` now detects when direct creation requires board approval, falls back to `POST /api/companies/{id}/agent-hires`, and auto-approves via `/api/approvals/{id}/approve`. If auto-approve fails, the pending approval ID and error are surfaced in the provisioning log so the board can approve it manually
297
+ - **`disableBoardApprovalOnNewCompanies` plugin setting** (boolean, default `false`) — when enabled, new companies are PATCHed to `requireBoardApprovalForNewAgents=false` during provisioning for legacy fully-autonomous bootstrap behavior. Leave off to preserve approval-gated hiring policies
298
+ - **`PaperclipClient` methods** — `updateCompany`, `getCompany`, `listAgents`, `getAgent` to support existing-company flows
299
+
300
+ ### Changed
301
+
302
+ - **CEO resolution for existing companies** — when `existingCompanyId` is set, `start-provision` reuses an active CEO agent if one exists on the company; otherwise it hires a new CEO through the approval-aware path. The bootstrap task title now uses the resolved company name
303
+ - **Partial-failure cleanup** — provisioning only deletes companies that were created in the same run. Existing companies are never deleted on error; the log explicitly notes the skipped cleanup
304
+ - **`StepDone` messaging** adapts to existing-company mode ("Workspace has been assembled and bootstrap tasks were added to the existing Paperclip company")
305
+
306
+ ---
307
+
308
+ ## [0.1.15] — 2026-04-05
309
+
310
+ ### Added
311
+
312
+ - **`check-ai-config` worker action** — lightweight pre-check that verifies the Anthropic API key is configured. Called on AI wizard mount to show a warning banner with a link to plugin settings before the user starts typing
313
+ - **API key warning banner** in the AI wizard describe phase — amber alert with "Plugin Settings" button when `anthropicApiKey` is missing
314
+
315
+ ### Changed
316
+
317
+ - **Graceful error handling across all worker actions** — `ai-chat`, `start-provision`, `preview-files`, and `refresh-templates` now return `{ error }` instead of throwing. This prevents the plugin host from swallowing error messages in generic 502 responses (fixes [#5](https://github.com/Yesterday-AI/paperclip-plugin-company-wizard/issues/5))
318
+ - **`PaperclipClient.connect()`** — wraps the initial fetch in try/catch to surface network errors (wrong port, connection refused) with actionable messages mentioning `paperclipUrl` in plugin settings
319
+ - **`PaperclipClient._fetch()`** — same network-error handling for all API calls during a session
320
+ - **All error messages** now reference plugin settings fields instead of CLI flags (legacy from the standalone CLI)
321
+ - UI components (`StepProvision`, `ConfigReview`, `StepOnboarding`) updated to handle graceful error returns from worker actions
322
+
323
+ ### Fixed
324
+
325
+ - AI wizard 502 error after first step — error messages from the worker (missing API key, Anthropic API errors, network failures) were lost when the plugin host converted thrown errors to generic 502 responses. Now returned as structured data that flows through to the UI error bar
326
+ - "fetch failed" on non-default ports — `PaperclipClient` now catches `TypeError` from `fetch()` and surfaces the configured URL in the error message
327
+ - `start-provision` compensation logic preserved — inner try/catch still deletes partially created companies, outer try/catch returns the error gracefully with full provisioning logs
328
+
329
+ ---
330
+
331
+ ## [0.1.14] — 2026-03-30
332
+
333
+ ### Fixed
334
+
335
+ - `ai-chat` action: `max_tokens` reduced from 16384 to 8192 — 16K caused Paperclip's 30s RPC timeout to trigger before Sonnet could finish generating
336
+
337
+ ---
338
+
339
+ ## [0.1.13] — 2026-03-30
340
+
341
+ ### Changed
342
+
343
+ - CEO agent default model: `claude-opus-4-6` (was: no default, Paperclip fallback)
344
+ - CEO agent heartbeat interval: 3600s / 1 hour (was: Paperclip default 300s / 5 min)
345
+ - `createAgent()` API client now accepts `runtimeConfig` (used for `heartbeat.intervalSec`)
346
+
347
+ ---
348
+
349
+ ## [0.1.12] — 2026-03-30
350
+
351
+ ### Added
352
+
353
+ - Label creation instructions in bootstrap — CEO creates labels before issues, attaches `labelIds`, maintains labels in heartbeat
354
+ - `assigneeUserId: → board user` for human-assigned issues (was incorrectly using `assigneeAgentId: → "user"`)
355
+
356
+ ### Changed
357
+
358
+ - Bootstrap instructions expanded: "How to read the metadata" section explains direct values vs `→` references, documents `assigneeUserId` for board user assignment
359
+
360
+ ---
361
+
362
+ ## [0.1.11] — 2026-03-29
363
+
364
+ ### Added
365
+
366
+ - Bootstrap instructions loaded from `templates/bootstrap-instructions.md` — editable without code changes
367
+
368
+ ### Changed
369
+
370
+ - BOOTSTRAP.md field names now match Paperclip API exactly: `parentId` (was `parentGoal`), `assigneeAgentId` (was `assignee`), `projectId` (was `project`), `goalIds` (was `goals`)
371
+ - References use `→ "name"` syntax to signal the CEO must resolve names to UUIDs
372
+ - Company description rendered under `## Company` heading
373
+
374
+ ### Fixed
375
+
376
+ - BOOTSTRAP.md metadata switched from `<!-- -->` HTML comments to visible `- **key**: value` bullet lists — HTML comments were stripped by Paperclip's markdown renderer
377
+
378
+ ---
379
+
380
+ ## [0.1.9] — 2026-03-29
381
+
382
+ ### Added
383
+
384
+ - **Routines** — new `routines[]` field in module/preset meta.json for recurring scheduled agent work. Modules `stall-detection`, `auto-assign`, `backlog`, `ci-cd`, `build-api`, and `website-relaunch` now define routines with cron schedules
385
+ - `## Routines` section in BOOTSTRAP.md with `<!-- assignee, schedule, concurrencyPolicy -->` frontmatter per routine
386
+ - `createRoutine()` and `createRoutineTrigger()` methods in API client
387
+ - Subgoal expansion — `goal.subgoals[]` are expanded into the goal hierarchy as nested goals with `level: "team"` and `parentGoal`
388
+ - Robust JSON parser — string-aware brace tracking, trailing comma cleanup, markdown code fence fallback, `console.error` debug logging on parse failure
389
+ - ConfigReview file grouping — agent files grouped by `agents/<role>/` instead of flat `agents/`
390
+ - "Update templates" button on onboarding screen — `refresh-templates` worker action deletes cached templates and re-downloads from GitHub
391
+
392
+ ### Changed
393
+
394
+ - **Template schema harmonized with Paperclip API** — `milestones[]` → `subgoals[]` (with `id`, `title`, `level`, `description`); `goal.issues[]` removed (issues belong to projects, not goals); `tasks[]` → `issues[]` everywhere
395
+ - BOOTSTRAP.md uses `<!-- -->` HTML-comment frontmatter instead of code fences (safe when descriptions contain code blocks)
396
+ - BOOTSTRAP.md issue frontmatter: only `assignee` + `project` (removed `milestone`)
397
+ - BOOTSTRAP.md provisioning steps show correct goal `level` (not hardcoded to `company`)
398
+ - `assembleCompany()` returns `initialIssues` + `initialRoutines` (was `initialTasks`)
399
+ - `createGoal()` API client now accepts `status` and `ownerAgentId` fields
400
+ - `ai-chat` action: `max_tokens` increased from 1024 to 16384
401
+
402
+ ### Removed
403
+
404
+ - `GoalMilestone` typedef, `GoalIssue` typedef, `modulesWithActiveGoals()` export
405
+ - `milestone` field on template issues
406
+ - `completionCriteria` field on milestones (folded into subgoal `description`)
407
+ - `generateBootstrapDescription()` — bootstrap issue uses BOOTSTRAP.md directly
408
+ - `skipTaskModules` logic — goals no longer contain issues, so no skip needed
409
+
410
+ ---
411
+
412
+ ## [0.1.7] — 2026-03-29
413
+
414
+ ### Changed
415
+
416
+ - `ai-chat` action: `max_tokens` increased from 1024 to 16384 — prevents truncated JSON when AI generates thorough goal descriptions with the new `goals[]`/`projects[]` format
417
+
418
+ ### Fixed
419
+
420
+ - JSON parser in `tryExtractConfig` now string-aware: brace-depth tracker skips `{`/`}` inside quoted strings, preventing false matches on text like `"Build API with {userId}"`
421
+ - JSON parser handles trailing commas, line comments, unescaped newlines/tabs in AI-generated JSON
422
+ - JSON parser falls back to markdown code fence extraction (`\`\`\`json ... \`\`\``) when brace tracking finds no valid config
423
+ - Added `console.error` debug logging when config parsing fails — raw AI response is now visible in browser devtools
424
+
425
+ ---
426
+
427
+ ## [0.1.6] — 2026-03-29
428
+
429
+ ### Changed
430
+
431
+ - Bootstrap issue now uses BOOTSTRAP.md content directly as its description — the CEO gets the full company spec, goals, projects, agents, issues, and provisioning steps instead of a generic "set up workspace" message
432
+
433
+ ### Removed
434
+
435
+ - `generateBootstrapDescription()` — redundant; BOOTSTRAP.md IS the bootstrap issue
436
+
437
+ ---
438
+
439
+ ## [0.1.5] — 2026-03-29
440
+
441
+ ### Added
442
+
443
+ - **Multi-goal support** — `goals[]` array replaces singular `goal` field; AI wizard generates hierarchical goals with `parentGoal` for sub-goals
444
+ - **Multi-project support** — `projects[]` array replaces singular `project` field; projects linked to goals via `goals[]` array (matches Paperclip API `goalIds`)
445
+ - `WizardProject` interface (`name`, `description`, `goals[]`) and `Goal.parentGoal` field
446
+ - `companyDescription` rendered in BOOTSTRAP.md (was previously only sent to the API)
447
+ - Full issue details in BOOTSTRAP.md: descriptions, `[priority]` annotations, `_(milestone: id)_` references
448
+ - Full milestone details in BOOTSTRAP.md: descriptions and `_Done when:_` completion criteria
449
+ - Preset roles shown in AI wizard catalog — `buildCatalog()` now includes `roles: engineer, ...` for each preset so the AI knows what selecting a preset implies
450
+
451
+ ### Changed
452
+
453
+ - **BOOTSTRAP.md structure** — unified hierarchy: Goals (### top-level, #### sub-goals) → Projects (with workspace + goal links) → Agents (instructionsFilePath only) → Issues (grouped by goal, annotated with target project) → Provisioning Steps (explicit API creation order)
454
+ - **AI wizard config format** — `goal`/`goalDescription`/`project`/`projectDescription` (flat) → `goals: [{title, description, parentGoal?}]` + `projects: [{name, description, goals[]}]` (backward compatible with old format)
455
+ - **AI wizard prompts** — `goalDescription` instructions now demand thorough, spec-level detail; system prompts explain `goals[]`/`projects[]` format
456
+ - `assembleCompany()` signature — `goal`/`project`/`goals` → `userGoals`/`userProjects`/`inlineGoals`; module inline goals auto-linked as sub-goals of the main user goal
457
+ - Agent listings in BOOTSTRAP.md show `instructionsFilePath` only (removed legacy `cwd` field)
458
+ - Issues in BOOTSTRAP.md are grouped by goal with `_Project: "name"_` annotation instead of `goalId →` references (issues link to projects, not goals)
459
+ - Ungrouped module tasks rendered under "Initial tasks" heading (not under main goal title)
460
+
461
+ ### Fixed
462
+
463
+ - AI wizard silently dropped preset modules — only roles were merged with AI-selected ones; now both modules and roles are defensively merged from the preset definition
464
+ - AI wizard rarely selected engineer — `buildCatalog()` listed presets with modules but not roles, so the AI didn't see that selecting a preset doesn't auto-add its roles
465
+ - BOOTSTRAP.md had two confusing issue sections ("Goal: ..." with issues and separate "Initial Tasks") — now unified under single `## Issues`
466
+ - `project` and `projectDescription` from AI wizard config were silently ignored — never reached `assembleCompany` or BOOTSTRAP.md
467
+
468
+ ---
469
+
470
+ ## [0.1.4] — 2026-03-28
471
+
472
+ ### Added
473
+
474
+ - `companyDescription` field — AI wizard now generates a comprehensive 2-4 paragraph company description that's stored in `WizardContext` and passed to the Paperclip API when creating the company
475
+ - Preset role merging — AI wizard merges preset roles with AI-selected roles so preset roles aren't lost when the AI omits them
476
+ - Interview guidance — interview system prompt now covers what to ask about (stage, quality vs speed, team needs, repo details) and skips questions already answered
477
+ - Information preservation section — prompts instruct the AI to write thorough `companyDescription`, `goalDescription`, and `projectDescription` fields as the company's permanent record
478
+ - `launch-pack` preset — full executive team launch with CTO + CMO: strategy, tech, and marketing from day one
479
+ - 4 new modules: `codebase-onboarding` (audit existing codebases), `triage` (classify inbound GitHub issues), `dependency-management` (CVE scanning, safe patching), `release-management` (semver, changelogs, tagging)
480
+ - `repo-maintenance` preset — custodial maintenance for existing repos using the new modules
481
+
482
+ ### Changed
483
+
484
+ - AI wizard config format: `extraModules`/`extraRoles` → `modules`/`roles` (all-inclusive lists that include preset defaults)
485
+ - AI wizard prompts now explicitly document that `engineer` is NOT a base role and must be listed for software projects
486
+ - Interview start message now includes the user's initial description (`{{DESCRIPTION}}`) so the AI has context from turn one
487
+ - Generate-config message reminds the AI to include all non-base roles and write thorough descriptions
488
+ - Single-shot system prompt restructured with numbered steps, "How Roles Work" section, and information preservation guidelines
489
+ - Template counts: 15 presets, 26 modules, 17 optional roles
490
+
491
+ ### Fixed
492
+
493
+ - AI wizard no longer silently drops preset roles — `StepAiWizard` merges preset and AI-selected role arrays before dispatching
494
+ - Interview-mode template now passes `{{DESCRIPTION}}` in the start message (was previously blank, losing user context)
495
+
496
+ ## [0.1.3] — 2026-03-28
497
+
498
+ ### Added
499
+
500
+ - `publish:npm` and `prepublishOnly` scripts in `package.json` for streamlined npm publishing
501
+ - `files` whitelist in `package.json` to control published package contents
502
+
503
+ ## [0.1.2] — 2026-03-25
504
+
505
+ ### Changed
506
+
507
+ - Updated plugin references and repository links to point to the new repo
508
+ - Updated favicon path and added new favicon SVG
509
+ - Updated author name in manifest
510
+
511
+ ## [0.1.1] — 2026-03-22
512
+
513
+ ### Changed
514
+
515
+ - Version bump and manifest updates
516
+
517
+ ---
518
+
519
+ ## [0.1.0] — 2026-03-18
520
+
521
+ Initial release of the plugin. Replaces the standalone Ink-based CLI with a native Paperclip plugin.
522
+
523
+ ### Added
524
+
525
+ - Interactive wizard UI (manual and AI-powered paths) for bootstrapping agent companies
526
+ - Preset, module, and role selection with hover-card detail previews and inline editing
527
+ - **Preview generated files** — collapsible file browser in the review step; each `.md` file can be expanded and edited before provisioning
528
+ - `preview-files` worker action: assembles to a temp dir and returns file contents without writing to disk
529
+ - `fileOverrides` support in `start-provision`: edits made in the UI are applied to assembled files before the API calls
530
+ - CEO adapter configuration (adapter type, working directory, model) in the wizard
531
+ - Real-time provisioning log streamed from the worker
532
+ - `check-auth` action for surfacing credential issues early (used by the summary step)
533
+ - Self-contained: templates, assembly logic, and API client are all bundled inside the plugin
534
+ - CI workflow (GitHub Actions) with pnpm, build, vitest, and node:test logic suite
535
+ - Pre-commit hook running prettier via lint-staged
536
+
537
+ ### Template system
538
+
539
+ - 14 presets (fast, quality, rad, startup, research, full, secure, gtm, content, launch-mvp, build-api, website-relaunch, repo-maintenance, build-game)
540
+ - 22 modules across strategy, maintenance, and engineering workflow categories
541
+ - 17 optional roles (CEO is the only base role; Engineer is optional but included in most presets)
542
+ - All 22 modules now have `description` fields (previously only presets and roles had them)
543
+ - Engineer moved from base role to optional; added to 13 presets and to `pr-review`'s `activatesWithRoles`; task `assignTo` falls back to CEO if the named role is absent
544
+ - Gracefully optimistic capability resolution: responsibilities shift automatically as roles are added
545
+ - Inline goals with milestones and issues (from presets and modules)
546
+ - Heartbeat section injection into assembled `HEARTBEAT.md` files
547
+
548
+ ### Configuration
549
+
550
+ - New `companiesDir` plugin setting — where assembled company workspaces are written. Defaults to `~/.paperclip/instances/default/companies`
551
+ - New `templatesRepoUrl` plugin setting — GitHub tree URL for auto-downloading templates. Defaults to the Yesterday-AI/paperclip-plugin-company-wizard repo
552
+ - `templatesPath` now defaults to `~/.paperclip/plugin-templates`, auto-downloaded from `templatesRepoUrl` if missing; falls back to bundled templates
553
+ - `sync-plugin.sh` added — syncs built artifacts and updates `manifest_json` in the Paperclip DB so schema changes are picked up on restart
554
+
555
+ ### Bug fixes
556
+
557
+ - Bootstrap issue is now set to `todo` immediately after creation (was `backlog`, which the CEO agent inbox endpoint doesn't return)
558
+ - `issues.update` capability added to manifest to support the status update
559
+ - Generated files are now written directly to `companiesDir` — removes the container/host path split and fixes incorrect paths in the bootstrap issue description
560
+ - Improved loading screen: spinner + explanation that templates may be downloaded on first load
561
+
562
+ ---
563
+
564
+ ## Prior art
565
+
566
+ This plugin is derived from [`@yesterday-ai/paperclip-plugin-company-wizard`](https://github.com/Yesterday-AI/paperclip-plugin-company-wizard), the standalone Ink-based CLI. See that project's changelog for history prior to this plugin.