@soleur/opencode 3.357.18 → 3.358.0

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.
@@ -83,6 +83,8 @@ Any other shape = **P1 finding**.
83
83
 
84
84
  **Tag-filtered alerts need the message path.** When a `sentry_alert` filters on the `feature`/`op` tags of a `reportSilentFallback` event, that call must pass `err = null`. With an `Error`, the pino mirror captures it first and the tagged capture is deduplicated away, so the rule never matches (#8629). For any "X pages" claim in the diff, also check that the rule exists and routes to a person. **Why:** #8505: a probe documented as paging emitted untagged events to a monitor that routes to no one.
85
85
 
86
+ **A static message belongs to exactly one `op`.** Sentry groups message events by message text; level and tags do not split a group. When a paged op and an unpaged op (a decorative warn) share a message literal, the unpaged one can create the group first and the paged op's later events join a group whose first event does not match the rule's `op in (...)` filter, so the page stays dark until someone resolves the group. Grep the diff's mirror calls for any message literal that appears under two ops, and require the op-contract test to assert it. **Why:** #11115: a card's warn and the page's paged fault shared two strings; an op-set comparison could not see it.
87
+
86
88
  ### Step 4: Inngest-middleware-coverage check
87
89
 
88
90
  Verify every new Inngest function file under `server/inngest/functions/` is registered in `app/api/inngest/route.ts`. The middleware applies automatically via `server/inngest/client.ts` — but a function not registered in route.ts is silently invisible (no run-id tags, no breadcrumbs, no error capture). Unregistered new function = **P0 finding**.
@@ -77,7 +77,7 @@ Use the **AskUserQuestion tool** to clarify the design scope:
77
77
  - **New-file exemption:** when `open_document` creates a brand-new document there is
78
78
  no pre-existing file to snapshot, and the collapse gate does not apply (a new doc
79
79
  legitimately starts at ~41-96 bytes). The gate fires only when opening a pre-existing
80
- non-empty `.pen`.
80
+ non-empty `.pen`. The `open_document` PreToolUse hook still refuses an **untracked** path, so for a brand-new `.pen` first `Write` a skeleton (`{"version":"2.18","variables":{...tokens...},"children":[]}`), `git add` and commit it, then `open_document`; the adapter rewrites it on the first `batch_design`. Stray `get_screenshot` captures land in `screenshots/` as `<nodeId>-<timestamp>.png` — delete them before committing.
81
81
  4. Iterative design loop:
82
82
  - Use `batch_design` to build frames, components, and content
83
83
  - Use `get_screenshot` to check visual output
@@ -89,7 +89,7 @@ Use the **AskUserQuestion tool** to clarify the design scope:
89
89
  1. Save the .pen file to `knowledge-base/product/design/{domain}/{descriptive-name}.pen` (e.g., `design/brand/landing-page.pen`, `design/onboarding/signup-flow.pen`). **The `product/` segment is mandatory — the pre-#566 top-level design directory was removed in the domain restructure and writing there produces a placeholder that no automated audit catches.**
90
90
  2. **Post-save size verification (HARD GATE).** Before announcing completion, `stat -c %s <saved-file>` and assert the result is larger than 128 bytes (a 96-byte file is an empty `{"children": []}` document, which `> 0` wrongly accepts). The headless adapter's `open_document` also reports `N top-level node(s) loaded`; after reopening, `N` must be at least 1 (a new, untracked `.pen` cannot be reopened under this repo's `pencil-open-guard.sh`: commit it first, or verify with `batch_get()` plus `stat` instead). The adapter refuses (`REFUSED save:`) to write an empty document over a file that holds nodes: surface that text verbatim. If the file is 0 bytes, the preceding Pencil MCP calls silently dropped (typically an auth or schema error the adapter returned as `isError: true`). **Read the actual adapter error text and surface it verbatim — do NOT fabricate a "headless stub" or "dropped ops" narrative.** The adapter has no stub code path; a 0-byte file always corresponds to a real `isError` response the caller can inspect. See the "Silent-drop diagnosis" Sharp Edge (`ex-cq-pencil-mcp-silent-drop-diagnosis-checklist`) in `plugins/soleur/skills/pencil-setup/SKILL.md` and the learning `knowledge-base/project/learnings/bug-fixes/2026-04-19-ux-design-lead-headless-stub-fabrication.md`.
91
91
  3. **Export high-resolution screenshots.** Use `export_nodes` with `scale: 3` and `format: "png"` to export all top-level frames as **direct children** of the `screenshots/` subdirectory next to the .pen file (e.g., `knowledge-base/product/design/billing/screenshots/`). **Do NOT create a nested per-feature subfolder** — `.gitignore` rule `!knowledge-base/product/design/**/screenshots/*.png` only unignores PNGs that are direct children of `screenshots/`; nested paths like `screenshots/<feature>/05-foo.png` stay gitignored and silently fail to commit. Verify with `git check-ignore -v <png>` before announcing completion. Do NOT use `get_screenshot` for final deliverables — it produces low-resolution 512px images. `export_nodes` with `scale: 3` produces ~4K images suitable for review.
92
- 4. **Rename screenshots to human-readable names.** `export_nodes` saves files as `{nodeId}.png`. After export, rename each file to a feature-prefixed kebab-case name continuing the existing `NN-` numbering already in the `screenshots/` folder (e.g., if `01-04` exist, the new feature starts at `05-`; rename `bBxvQ.png` → `05-upgrade-modal-at-capacity-solo.png`). Then remove the raw `{nodeId}.png` exports left behind by `export_nodes` so they don't appear as untracked siblings.
92
+ 4. **Rename screenshots to human-readable names.** `export_nodes` saves files as `{nodeId}.png` (the headless adapter names them after the frame's `name` instead — `ls` the output dir before renaming). After export, rename each file to a feature-prefixed kebab-case name continuing the existing `NN-` numbering already in the `screenshots/` folder (e.g., if `01-04` exist, the new feature starts at `05-`; rename `bBxvQ.png` → `05-upgrade-modal-at-capacity-solo.png`). Then remove the raw `{nodeId}.png` exports left behind by `export_nodes` so they don't appear as untracked siblings.
93
93
  5. **Open the screenshots folder** for founder review: `xdg-open <screenshots-directory>`. This step is not optional — the founder must visually review wireframes before proceeding. The interactive **approve / request-changes** pause lives in the *orchestrator* (brainstorm Phase 3.55b / plan Phase 2.5 step 4b), NOT in this agent — a Task subagent cannot pause for operator input (`2026-05-12-task-subagent-prompt-text-only.md`), so this agent's job ends at opening the folder and returning. Do not re-add an `AskUserQuestion` pause here.
94
94
  6. Announce the file location and list all renamed screenshot files.
95
95
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleur/opencode",
3
- "version": "3.357.18",
3
+ "version": "3.358.0",
4
4
  "description": "Soleur AI organization plugin for OpenCode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -330,3 +330,5 @@ NEVER CODE! Just research and write the plan.
330
330
  - **A causal attribution in a plan ("since #N, X happens", "PR #N introduced the capture") names what #N CONTAINS, not what it CHANGED — verify it with `git log -S <mechanism>` and read what the commit removed or moved before it is written, because the sentence then propagates into headers, ADRs and test comments.** The fix for an observation-channel loss is only as good as the date the channel changed: #10786 credited #8763 with introducing a per-suite capture that dates from #7423; #8763 only moved the rehearsal suite out of its own workflow step into that already-capturing runner. A sweep of the corrected claim must grep its PARAPHRASES across the touched files, not the one phrasing. **Why:** #10786 — six artifacts carried the wrong attribution until the history seat falsified it. See `knowledge-base/project/learnings/2026-10-22-a-probe-went-blind-when-its-suite-moved-into-the-capturing-runner-not-when-capture-began.md`.
331
331
  - **A canary plan names the OTHER jobs that will be red on its PR shape before it claims a run-level result.** A throwaway DRAFT PR carries the draft-light `test` leg, which concludes RED on every draft by design (ADR-276 Option R), so it can show how one job renders but never what the run concludes; either design the canary so nothing else is red, or state the claim at the level the canary can read. Verify the canary fixture trips the real check locally before pushing it. **Why:** #10851 — the `affected-index-ratchet` canary measured the job-level `failure` but its run conclusion was confounded, after four sites had asserted "continue-on-error keeps the run green" unmeasured. See `knowledge-base/project/learnings/2026-10-23-an-advisory-job-claimed-to-keep-the-run-green-before-anyone-measured-it-and-the-canary-could-not-isolate-it.md`.
332
332
  - **A guard, envelope or sanitizer on a field protects only the paths where something WRITES that field — grep for the PRODUCER before planning the consumer, and enumerate the channel set from the tool/prompt definitions, not from the issue's list.** A plan that wraps `scrubbedContent` (or any field a template reads) can pass its own tests, a reviewer panel and an ADR while no production code ever sets the field; a consumer-side test that fixtures the field by hand cannot reveal it. Run `git grep -n '<field>' -- <server dirs>` and confirm a non-test, non-template writer exists; if none, say the guard is latent in the plan, not live. For a "frame every channel that carries X" feature, list the channels with a grep over the tool and prompt definitions for the data class (e.g. every MCP tool whose result includes issue/PR text), because an issue's own surface list is the author's memory. **Why:** #10194 — the leader-prompt envelope had no feeder (five review seats found it) and `workstream_issues_list`, which returns issue titles and descriptions to the agent, was missing from the issue, the plan and the first-pass panel. See `knowledge-base/project/learnings/2026-10-25-a-framing-guard-for-a-channel-nobody-feeds-ships-green-and-inert.md`.
333
+
334
+ - **A "next free" migration or ADR ordinal is a claim about every pushed branch, not `origin/main`.** Probe all remote refs (`for r in $(git for-each-ref --format='%(refname)' refs/remotes/origin); do git ls-tree --name-only $r apps/web-platform/supabase/migrations/; done | grep -oE '/[0-9]{3}_' | sort -u | tail -3`) before the plan names a number, and have the plan choose it at the last rebase. **Why:** #9545 PR2 — `origin/main` stopped at 163 and the plan said "164 is free", while open draft PRs held 164 and another branch held 165-173; caught only by the sharp-edges pass.
@@ -7,3 +7,5 @@ Extracted verbatim from the Defect Classes list in SKILL.md (byte-ceiling move,
7
7
  - **Stale plan-time RLS-policy enumeration drift** — when a PR sweeps RLS policies across "all" tenant tables based on a plan-time grep, the table list decays as sibling PRs land between plan-write and PR-merge. Multi-agent review reliably catches this when the spawn prompt for `soleur:engineering:review:data-integrity-guardian` AND `soleur:engineering:review:security-sentinel` instructs: "Re-derive the canonical authenticated-policied table list at review time via `grep -rnE 'POLICY.*ON public\.[a-z_]+ .*TO authenticated' apps/web-platform/supabase/migrations/*.sql` and assert every match has the new RESTRICTIVE policy." PR #4418 — both agents independently caught 2 missed tables (`organizations`, `workspace_member_removals`) the plan's enumerated "19 tables" list missed; verify sentinel widened to per-table intersection. See `knowledge-base/project/learnings/2026-05-25-multi-agent-review-catches-stale-precedent-grep-and-unreachable-ux-toast.md`.
8
8
 
9
9
  - **RLS-policy-expression edit breaks exact-string verify/ sentinels AND aborts on dev/prod policy divergence** — when a migration edits an RLS policy's DEPARSED expression (an `auth_rls_initplan` wrap `auth.uid()` → `(select auth.uid())`, a predicate rewrite, a role/qual edit), it has two blast radii beyond the policy itself that pass tsc + the vitest suite + migration-shape lints and only fail POST-MERGE (verify-migrations against prod, tenant-integration against dev). The spawn prompt for `soleur:engineering:review:data-integrity-guardian` AND `soleur:engineering:review:security-sentinel` MUST instruct: (a) `git grep -l "<policyname>" apps/web-platform/supabase/verify/` for every touched policy name and update each stale exact-string sentinel (`ILIKE '%...auth.uid()%'`) in the SAME PR — or make it wrap-tolerant (`~* 'user_id = \(? *(select +)?auth\.uid\(\)'`, preserving the anti-false-green prefix), verified against live prod `bad=0`; and (b) require each `ALTER POLICY` to be guarded by a `pg_policies` existence check (`DO $do$ BEGIN IF EXISTS (SELECT 1 FROM pg_policies WHERE schemaname='public' AND tablename=... AND policyname=...) THEN ALTER POLICY ...; END IF; END $do$;`) because `ALTER POLICY` has no `IF EXISTS` and a policy name sourced from ONE project's live catalog is not guaranteed present on the other (`hr-dev-prd-distinct-supabase-projects`) — a single absent policy aborts the whole migration. **Why:** PR #6663 — an initplan wrap (migration 134) broke `verify/129`'s exact string-match (hotfix #6671) and aborted the dev apply on `conversations_owner_delete` (absent on dev). See `knowledge-base/project/learnings/2026-07-18-rls-initplan-wrap-breaks-verify-sentinels-and-dev-prod-policy-divergence.md`.
10
+
11
+ - **Editing a migration that CI has already applied to the shared dev project fails the dev-ledger parity guard, even for a comment — check before the fix round, then use the sanctioned route.** `tenant-integration` applies a PR's migrations to dev, and a ledgered filename is never re-applied, so an in-place edit leaves tests running against the OLD body. Before editing a migration during review, check whether `tenant-integration` has run on the PR (`gh pr checks`). If it has: restore the applied body and add a NEW migration, or, when the branch carries the paired `.down.sql`, dispatch `dev-ledger-reconcile.yml` from main as a dry run and then with `execute=true` (dev only; compare-and-set under the dev mutex), so the next CI run applies the edited body fresh. Both seats on #11115 (architecture, data-integrity) flagged it only after the edit; the guard's own text names both routes. **Why:** #11115 edited migration 177 after a green `tenant-integration`; documented before as `2026-09-24-editing-an-already-applied-migration-during-review-breaks-the-dev-ledger.md` (#8650) but not in a review reference, so the class recurred.