@herbertgao/pi-extensions 2026.11.15 → 2026.11.17
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 +24 -0
- package/README.md +4 -4
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/node_modules/@herbertgao/pi-agency/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-agency/README.md +3 -1
- package/node_modules/@herbertgao/pi-agency/package.json +1 -1
- package/node_modules/@herbertgao/pi-agency/src/index.ts +151 -9
- package/node_modules/@herbertgao/pi-cc-extensions/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-cc-extensions/extensions/renderer/tool/names.ts +7 -2
- package/node_modules/@herbertgao/pi-cc-extensions/package.json +1 -1
- package/node_modules/@herbertgao/pi-impeccable/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-impeccable/README.md +2 -2
- package/node_modules/@herbertgao/pi-impeccable/package.json +4 -4
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/SKILL.md +5 -5
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.md +8 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/audit.native.md +8 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/craft-floor.md +3 -3
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/critique.md +8 -6
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/degraded/finish-reviewer.md +2 -2
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/doctor.md +5 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/init.md +2 -0
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/live.md +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/new-work.md +8 -9
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/reference/polish.md +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/VERSION +1 -1
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt +5 -5
- package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/live-browser.js +55 -32
- package/node_modules/@herbertgao/pi-subagents/CHANGELOG.md +6 -0
- package/node_modules/@herbertgao/pi-subagents/docs/rpc.md +7 -1
- package/node_modules/@herbertgao/pi-subagents/package.json +1 -1
- package/node_modules/@herbertgao/pi-subagents/src/agent-color.ts +6 -2
- package/node_modules/@herbertgao/pi-subagents/src/agent-types.ts +82 -1
- package/node_modules/@herbertgao/pi-subagents/src/cross-extension-rpc.ts +107 -2
- package/node_modules/@herbertgao/pi-subagents/src/index.ts +9 -2
- package/node_modules/pi-provider-qoder/dist/index.js +50 -10
- package/node_modules/pi-provider-qoder/package.json +1 -1
- package/package.json +9 -9
|
@@ -41,6 +41,8 @@ Sub-agent gate (all harnesses):
|
|
|
41
41
|
- If and only if sub-agents are unavailable, fall back sequentially: read [critique-rubric.md](critique-rubric.md) now, finish and record Assessment A, then run Assessment B, then synthesize, and emit the degraded banner.
|
|
42
42
|
- Whichever path you take, declare it in the report header (see Report header provenance). Skipping sub-agents without the banner is the most common failure of this command.
|
|
43
43
|
|
|
44
|
+
**Read-only or delegated run.** When this critique runs where it cannot spawn agents, write inside the reviewed repository, or ask anyone (a delegated subagent, CI, a headless call), run it this way rather than improvising (native platforms keep their own path above, which has no banner): read [critique-rubric.md](critique-rubric.md), then Assessment A inline, led by `⚠️ DEGRADED: single-context (delegated read-only run)`; Assessment B as `detect --json` on the sources plus `detect --json <url> --viewport <WxH>` at each target viewport (390x844 for phone), with no live-server or overlay; no Persist the Snapshot, said in Run Notes; and `Questions skipped: delegated run` in place of Ask the User.
|
|
45
|
+
|
|
44
46
|
If browser automation is available, each assessment creates its own new tab. Never reuse an existing tab, even if it is already at the right URL. Desktop apps are the exception (see **Desktop apps** under Assessment B).
|
|
45
47
|
|
|
46
48
|
### Assessment A: Design Review
|
|
@@ -72,7 +74,7 @@ CLI scan:
|
|
|
72
74
|
- Pass markup files/directories as `[target]`; do not pass CSS-only files.
|
|
73
75
|
- For URLs, skip CLI scan and use browser visualization.
|
|
74
76
|
- For very large trees (500+ scannable files), narrow scope or ask.
|
|
75
|
-
- Exit code 0 =
|
|
77
|
+
- Exit code 0 = no findings; 2 = findings. Report an empty result with what was scanned (files, URLs, viewports), never as clean: the detector does not judge layout.
|
|
76
78
|
- If the detector entrypoint is missing or fails to load, report deterministic scan unavailable and continue with browser/manual review.
|
|
77
79
|
|
|
78
80
|
Browser visualization is required for a viewable target when browser automation is available. Use a localhost dev/static URL for local files; avoid `file://` unless the available browser explicitly supports this workflow. Overlay flow:
|
|
@@ -203,7 +205,7 @@ Persistence is not the end of the run. After it, the response continues with the
|
|
|
203
205
|
|
|
204
206
|
Once the report above is finalized, write it to `.impeccable/critique/` so the user can refer back, and so `/impeccable polish` can pick up the priority issues without a copy-paste.
|
|
205
207
|
|
|
206
|
-
Skip this step if the Setup slug was null (vague or root-level target).
|
|
208
|
+
Skip this step if the Setup slug was null (vague or root-level target), and say why in one line of the close: "Not saved: critique one page, component or file to keep its history."
|
|
207
209
|
|
|
208
210
|
1. **Write the body to a temp file** so you can pipe it to the helper. Use the full critique report (heuristic table, design-specificity verdict, priority issues, persona red flags, minor observations, and questions), but stop before the "Ask the User" / "Recommended Actions" sections that come later.
|
|
209
211
|
|
|
@@ -214,7 +216,7 @@ Skip this step if the Setup slug was null (vague or root-level target).
|
|
|
214
216
|
IMPECCABLE_CRITIQUE_META='{"target":"<user phrasing>","total_score":<n>,"max_score":<n>,"na_heuristics":"<comma-separated numbers, or empty>","p0_count":<n>,"p1_count":<n>}' \
|
|
215
217
|
.pi/skills/impeccable/scripts/impeccable critique-storage write "<resolved target>" <body-file>
|
|
216
218
|
```
|
|
217
|
-
`max_score` is the applicable maximum from the heuristic table (40 when every heuristic applied), so a later run can tell a renormalized total from a full one. For a local file target, the helper also records an exact content fingerprint so polish can distinguish the assessed bytes from later edits without relying on Git state or timestamps. The helper prints the absolute path it wrote. Leave that file on disk. Polish closes it; this run does not. `REPORTS OFF:` instead means the project opted out of saved reports: skip the trend read and carry on.
|
|
219
|
+
`max_score` is the applicable maximum from the heuristic table (40 when every heuristic applied), so a later run can tell a renormalized total from a full one. For a local file target, the helper also records an exact content fingerprint so polish can distinguish the assessed bytes from later edits without relying on Git state or timestamps. The helper prints the absolute path it wrote, and sometimes one more line (`Saved to Impeccable: <link>`, `Not saved to Impeccable: <reason>` or `Keep this critique's history: impeccable login`); put that line in the close word for word. Leave that file on disk. Polish closes it; this run does not. `REPORTS OFF:` instead means the project opted out of saved reports: skip the trend read and carry on.
|
|
218
220
|
|
|
219
221
|
3. **Delete the temp body file** after the write attempt completes, whether the write succeeded or failed. If deletion fails, mention `temp-file cleanup failed: <reason>` briefly in the final output, but do not block the critique.
|
|
220
222
|
|
|
@@ -235,7 +237,7 @@ Skip this step if the Setup slug was null (vague or root-level target).
|
|
|
235
237
|
|
|
236
238
|
6. **Close the run.** Go to Ask the User below and emit the questions, or the `Questions skipped: <reason>` line when the count allows it. The run is not complete until you do. Persistence is bookkeeping and cleanup is not an ending; stopping here leaves the user with a report and no way forward, and leaves `/impeccable polish` with no priorities to inherit.
|
|
237
239
|
|
|
238
|
-
This is fire-and-forget. Do not show the user the helper's JSON output; only the human-readable trend line and the
|
|
240
|
+
This is fire-and-forget. Do not show the user the helper's JSON output; only the human-readable trend line, the written path, and the helper's Impeccable line. Failures here should not block the rest of the flow; print the error and move on.
|
|
239
241
|
|
|
240
242
|
### Ask the User
|
|
241
243
|
|
|
@@ -257,9 +259,9 @@ Ask questions along these lines (adapt to the specific findings; do not ask gene
|
|
|
257
259
|
- Every question must reference specific findings from the report. Never ask generic "who is your audience?" questions.
|
|
258
260
|
- Keep it to 2-4 questions maximum. Respect the user's time.
|
|
259
261
|
- Offer concrete options, not open-ended prompts.
|
|
260
|
-
- Skipping is allowed only when the report listed **fewer than 3 Priority Issues
|
|
262
|
+
- Skipping is allowed only when the report listed **fewer than 3 Priority Issues**, or on a read-only or delegated run. Count them; do not judge the findings "straightforward" by feel. At 3 or more on an interactive run, the questions are required.
|
|
261
263
|
|
|
262
|
-
**Final-question gate.** The user-visible response must either include the targeted questions or carry the literal line `Questions skipped: <reason>` naming the count that permitted the skip. Each question must include 2-3 concrete answer options tied to the actual critique findings. Do not end with only open-ended questions, and do not end with neither: stopping after the report, having asked nothing and printed no skip line, is the most common way this command fails.
|
|
264
|
+
**Final-question gate.** The user-visible response must either include the targeted questions or carry the literal line `Questions skipped: <reason>` naming the count or the delegated run that permitted the skip. Each question must include 2-3 concrete answer options tied to the actual critique findings. Do not end with only open-ended questions, and do not end with neither: stopping after the report, having asked nothing and printed no skip line, is the most common way this command fails.
|
|
263
265
|
|
|
264
266
|
### Recommended Actions
|
|
265
267
|
|
|
@@ -17,7 +17,7 @@ Expect: the original request; the confirmed user answers; the artifact path(s);
|
|
|
17
17
|
|
|
18
18
|
0. **Evidence.** Before any other check, verify the required captures exist and every capture is valid. Required: the platform's full viewport set (web: `desktop.png` and `mobile.png`; native: one capture per shipped device class), plus every capture the calling brief names as required, a reported user viewport (`user-<width>.png`) included. Valid: no black or blank regions, content matching what the filename claims (a visit capture showing the About section is invalid), the document top visible where the file claims a full page, dimensions that make sense for the named viewport. A required capture that is absent fails exactly like one that is malformed: a viewport nobody captured is a viewport nobody inspected, and it cannot ship. When any capture fails, the whole review changes shape: return `disposition: recapture` as the first line, then one section, `recapture`, listing each missing or invalid file and what a valid capture of it shows, and stop. Never build a matrix on malformed evidence; a verdict derived from a broken capture launders the breakage into an approval, and the parent owes you a full re-review on valid captures, not a scoring round.
|
|
19
19
|
1. **Persistence.** PRODUCT.md exists. On a comp-led build, `.impeccable/build/state.json` exists and every phase before `review` is `closed` or explicitly `skipped`; an open or failed phase is a material finding. A comp-led config with no state file, or a state whose `comps` phase is neither `closed` nor `skipped`, means the comp round was skipped and the build ran from a world description alone, a material finding that outranks craft; a phase closed with a `forced` record is disclosed as a material finding unless the user downgraded the comp in words the packet quotes; a state file whose `hero.gate.score` sits under 0.72, or a missing state file, means the reproduction ran unproven, a material finding, and `.impeccable/review/hero-repro.png` must exist either way. When DESIGN.md predates this build (an extension or redesign), it matches the built world; on a new world it is written after this review by the documenter, so its absence here is not a finding. When comp-round comps exist under `.impeccable/mocks/`, an approval record exists too: the surface brief naming the approved comp, or an `approved` flag in its sidecar. Comp-round comps with no recorded pick mean the approval point was skipped, a material finding. Files under `.impeccable/mocks/decision/` are exempt: they are the direction round's dealt hand, produced before any comp round, and imply no approval whatever the build path; a code-led build has no comp round at all.
|
|
20
|
-
2. **Fidelity.** Start from the measurement, then judge what it cannot: read `.impeccable/review/diff/final/report.json` (and hero) first; every region scored `missing` or `contradicted` is a matrix row in that state unless the paired crop under `regions/` shows the score is wrong, and you say why; a region scored `match` still gets your eye for lettering character and material, which the numbers do not measure. Then, against your own element inventory of the approved comp, never against the contract's summary of it: topology, reading order, focal scale, overlaps and z-order, density, signature geometry, the primary action's treatment (a CTA the comp physically works, dissolves, or stamps is a signature element; its plain-rectangle rendition is contradicted), navigation items and icons, headline levels and scale relationships. Classify every salient element: match, acceptable adaptation, missing, contradicted, or added without approval. Three rows are mandatory in every matrix. TYPE: the display lettering's character, compression, width, weight, contrast, terminals, against the comp's; a face of a different character is contradicted however the layout matches. MATERIAL: an element rendered as flat CSS or clean vector where the comp shows painted, textured, dimensional, or photographic material is contradicted regardless of placement; medium is part of the promise. GROUND: the page field's value and temperature against the comp's, sampled from pixels on both sides when tooling allows rather than judged from memory, and read as the net on-screen result where a texture or tile paints over the base color; a ground warmer or cooler than the comp's is contradicted however faithfully the layout matches, and drift toward the rendition prior (warm cream on light grounds, blue-black slate on dark) is the direction to hunt. With no approved comp, TYPE and MATERIAL do not lapse: judge them against the contract's OWN-WORLD and the world's real materials, and treat faked physicality (CSS bevels, embossing, stamped-metal or chalk effects imitating a material the page never renders) as contradicted on its face; imitation material is the single most reliable mark of machine-made design. GROUND narrows rather than lapses: with no comp to sample, a color OWN-WORLD names is the target and the same warmer-or-cooler judgment applies; when OWN-WORLD names none, there is no GROUND authority, and the review says so in place of a verdict, because a target the reviewer invents turns the check into taste. A critique-reference comp on such a build is provocation, not spec: no element matrix, no adaptation citations, no asset obligations; its one contribution is what the image dared that the build did not, and dares worth adopting enter material_fixes as ordinary ordered fixes. An adaptation counts as intentional only when it cites the user answer, surface brief, accessibility need, or product truth that forced it; an uncited deviation is a defect. A missing signature element, a changed topology, or content added without approval fails fidelity and outranks every craft point in material_fixes. When MATERIAL is contradicted on the focal element, or contradiction is the page rather than the exception, stop ordering repairs: make the first material fix a rebuild directive naming the comp regions to re-derive and the assets to produce; a list of patches against a rejected page launders the rejection into an approval. A fix that requires producing an asset says so explicitly ("produce: <region> as a raster asset"), never phrased as a style adjustment the parent will answer with CSS. The comp is the spec for composition, topology, element inventory, density, lettering character, and material; it is not a pixel spec for semantics, accessibility, or responsive reflow, and that allowance covers translation, never replacement.
|
|
20
|
+
2. **Fidelity.** Start from the measurement, then judge what it cannot: read `.impeccable/review/diff/final/report.json` (and hero) first; every region scored `missing` or `contradicted` is a matrix row in that state unless the paired crop under `regions/` shows the score is wrong, and you say why; a region scored `match` still gets your eye for lettering character and material, which the numbers do not measure. Then, against your own element inventory of the approved comp, never against the contract's summary of it: topology, reading order, focal scale, overlaps and z-order, density, signature geometry, the primary action's treatment (a CTA the comp physically works, dissolves, or stamps is a signature element; its plain-rectangle rendition is contradicted), navigation items and icons, headline levels and scale relationships. Classify every salient element: match, acceptable adaptation, missing, contradicted, or added without approval. Three rows are mandatory in every matrix. TYPE: the display lettering's character, compression, width, weight, contrast, terminals, against the comp's; a face of a different character is contradicted however the layout matches. MATERIAL: an element rendered as flat CSS or clean vector where the comp shows painted, textured, dimensional, or photographic material is contradicted regardless of placement; medium is part of the promise. GROUND: the page field's value and temperature against the comp's, sampled from pixels on both sides when tooling allows rather than judged from memory, and read as the net on-screen result where a texture or tile paints over the base color; a ground warmer or cooler than the comp's is contradicted however faithfully the layout matches, and drift toward the rendition prior (warm cream on light grounds, blue-black slate on dark) is the direction to hunt. With no approved comp, TYPE and MATERIAL do not lapse: judge them against the contract's OWN-WORLD and the world's real materials, and treat faked physicality (CSS bevels, embossing, stamped-metal or chalk effects imitating a material the page never renders) as contradicted on its face; imitation material is the single most reliable mark of machine-made design. GROUND narrows rather than lapses: with no comp to sample, a color OWN-WORLD names is the target and the same warmer-or-cooler judgment applies; when OWN-WORLD names none, there is no GROUND authority, and the review says so in place of a verdict, because a target the reviewer invents turns the check into taste. A critique-reference comp on such a build is provocation, not spec: no element matrix, no adaptation citations, no asset obligations; its one contribution is what the image dared that the build did not, and dares worth adopting enter material_fixes as ordinary ordered fixes. An adaptation counts as intentional only when it cites the user answer, surface brief, accessibility need, or product truth that forced it; an uncited deviation is a defect. A missing signature element, a changed topology, or content added without approval fails fidelity and outranks every craft point in material_fixes. When MATERIAL is contradicted on the focal element, or contradiction is the page rather than the exception, stop ordering repairs: make the first material fix a rebuild directive naming the comp regions to re-derive and the assets to produce; a list of patches against a rejected page launders the rejection into an approval. A fix that requires producing an asset says so explicitly ("produce: <region> as a raster asset"), never phrased as a style adjustment the parent will answer with CSS. On a code-led build with no image generation (the packet says which), a gap only a raster can close (an engraving's tonal depth, a photograph, a painted surface, measured against the world card) is never a rebuild: the same code path would draw it again and miss again. Name it once under `ceiling` as "produce: <region> as a raster asset when image generation exists", judge the drawing as code, and order only the fixes code can reach. The comp is the spec for composition, topology, element inventory, density, lettering character, and material; it is not a pixel spec for semantics, accessibility, or responsive reflow, and that allowance covers translation, never replacement.
|
|
21
21
|
3. **Ceiling.** Against the QUALITY BAR card: name the world's native devices the build left unused, frame, depth, lettering treatment, ornament density, motion. The card governs commitment and finish, never composition.
|
|
22
22
|
4. **Contract, promise by promise.** First verify FORM carries the seed reference the concept roll printed (`seed:` and 16 hex), corroborated against the roll output the parent saw or with `impeccable concept-seed --check-seed <reference>` (exit 0 means this machine rolled it). A raw seed key in FORM is itself a material fix: the brief is committed, and the key must not be. `seed: none (unavailable)` stands only when the roll printed SEED REFERENCE unavailable, which `--check-seed none` confirms with exit 0. `seed: none (pinned)` stands only when the original request or the confirmed user answers pin both the direction's world and its first-surface experience, in the words FORM quotes; never judge it with `--check-seed`, which cannot see a pin and reports `none` as a skipped roll. A picture or metaphor alone pins neither. Any other contract with no reference, or one neither source corroborates, means the roll was skipped, a material fix ahead of any craft point. Then, for each of the five blocks: does the render keep the promise? Apply the memory test to the first viewport.
|
|
23
23
|
5. **Truth.** Demonstration data authored and labeled synthetic; no invented commercial claims; unanswered claims present as marked placeholders, not omissions. Every raster region of the spec shipped as its plate (the spec names the file; the page references it; the region's diff row is not `missing`), not a gradient, an inline SVG, or a many-vertex `clip-path` standing in for it, and every produced asset visibly present in the screenshots; an asset applied at near-zero opacity or buried behind a wash is a compliance token, not a shipped material, and the detector's `buried-raster` and `organic-clip-path` findings in the packet are material fixes.
|
|
@@ -27,7 +27,7 @@ Do not run a second detector pass; mechanical findings belong to the parent's ho
|
|
|
27
27
|
|
|
28
28
|
## Disposition
|
|
29
29
|
|
|
30
|
-
The first line of your return is `disposition: recapture`, `disposition: rebuild`, `disposition: fix`, or `disposition: ship`. These four words are the whole vocabulary; never invent another. The word is derived, never felt: recapture when the evidence check failed, rebuild when the rebuild-directive condition fired, fix when material_fixes is non-empty, ship only when material_fixes is empty and the matrix holds no contradicted or missing row. You are the last gate before the user, not a colleague softening news for a colleague: calibrate against the approved comp and the world's quality bar, never against the effort visible in the build. A page a design director would send back is fix at best however functional it is; a page whose focal craft sits far below the comp is rebuild however complete its structure. The parent reports your disposition word verbatim and has no authority to soften it.
|
|
30
|
+
The first line of your return is `disposition: recapture`, `disposition: rebuild`, `disposition: fix`, or `disposition: ship`. These four words are the whole vocabulary; never invent another. The word is derived, never felt: recapture when the evidence check failed, rebuild when the rebuild-directive condition fired, fix when material_fixes is non-empty, ship only when material_fixes is empty and the matrix holds no contradicted or missing row. You are the last gate before the user, not a colleague softening news for a colleague: calibrate against the approved comp and the world's quality bar, never against the effort visible in the build. A page a design director would send back is fix at best however functional it is; a page whose focal craft sits far below the comp is rebuild however complete its structure, except for a raster-only gap on a code-led build without image generation (check 2), which stays a ceiling note. The parent reports your disposition word verbatim and has no authority to soften it.
|
|
31
31
|
|
|
32
32
|
## Output Contract
|
|
33
33
|
|
|
@@ -38,10 +38,14 @@ A finding that reports a deprecated field (`## Register` is the current one) is
|
|
|
38
38
|
|
|
39
39
|
## Step 4: Do not overclaim on truth drift
|
|
40
40
|
|
|
41
|
-
`design-md-
|
|
41
|
+
`design-md-dead-path` and `design-md-color-drift` are contradictions, not suspicions: a file DESIGN.md names is gone, or a colour it declares is in none of the token files it names. Report exactly what they name. Fixing them is `document`'s job, or the code's; don't rewrite DESIGN.md as a side effect. Whether the rest of DESIGN.md still describes the product is a separate question: answer it only when asked, by reading DESIGN.md against the current tokens and components.
|
|
42
42
|
|
|
43
43
|
The same restraint applies to `workspace-context-inherited`. Inheritance is a designed behavior. Whether one product record truthfully describes several apps is a question for the user, not a defect to fix.
|
|
44
44
|
|
|
45
|
+
## Step 5: Compact DESIGN.md only with consent
|
|
46
|
+
|
|
47
|
+
On `design-md-sprawl`, run `.pi/skills/impeccable/scripts/impeccable design-compact` (with Step 1's `--target`) and show the person its proposal and saving. Add `--write` only once they agree here; the original moves to `.impeccable/design-full.md`. Never compact as a side effect.
|
|
48
|
+
|
|
45
49
|
## Monorepo notes
|
|
46
50
|
|
|
47
51
|
- `workspace-platform-native-evidence` is the finding that matters most here: a workspace carrying native build files while inheriting a root record that resolves to web gets web guidance for its whole life and never loads [ios.md](ios.md) or [android.md](android.md). The repair is a child PRODUCT.md in that workspace, because one inherited record cannot hold two platforms.
|
|
@@ -24,6 +24,8 @@ Form a platform hypothesis: `web`, `ios`, `android`, or `adaptive` (one product
|
|
|
24
24
|
|
|
25
25
|
## Step 3: Interview for product truth
|
|
26
26
|
|
|
27
|
+
**Your first message opens with the sign-in when it's missing.** If `impeccable context` printed `ACCOUNT: not signed in` (or printed no `ACCOUNT:` line and `.pi/skills/impeccable/scripts/impeccable whoami` prints `Not signed in`), the first line of your first message to the person, before any question, structured or plain-chat, is: "Run `npx impeccable login` to keep your critiques and audits in your Impeccable account. It's free, and creates the account if you're new." Say it once per init. Signed in, say nothing about it.
|
|
28
|
+
|
|
27
29
|
Ask the user directly to clarify what you cannot infer. Ask only about material gaps the repository and original request do not answer with strong evidence.
|
|
28
30
|
|
|
29
31
|
Use the structured question tool when available; otherwise ask and wait. Keep rounds to at most three focused questions and require one real answer or approval round before writing a new PRODUCT.md. Confirm inferences.
|
|
@@ -326,7 +326,7 @@ After source edits finish, reply exactly once with `.pi/skills/impeccable/script
|
|
|
326
326
|
|
|
327
327
|
## Exit
|
|
328
328
|
|
|
329
|
-
The user stops live mode by saying so in chat, closing the tab (SSE drops; poll returns `exit`
|
|
329
|
+
The user stops live mode by saying so in chat, closing the tab (SSE drops; poll returns `exit` a minute later unless a tab reconnects), or the browser's exit button. On `exit`, kill any still-running background poll, then clean up.
|
|
330
330
|
|
|
331
331
|
## Cleanup
|
|
332
332
|
|
|
@@ -87,15 +87,12 @@ Build the assigned direction, not a safer interpretation of it. The form supplie
|
|
|
87
87
|
|
|
88
88
|
On a comp-led build, read [new-work-comp.md](new-work-comp.md) before writing the spec or any code, and follow it: the measured contract, the spec, and the build-phase gates live there.
|
|
89
89
|
|
|
90
|
-
### Code-led
|
|
91
|
-
|
|
92
|
-
No comp and no apology for it: the ambition lives in the direction contract's FIRST VIEWPORT block and the named signature interaction, and the finish reviewer audits those promises in behavior. The chosen decision comp rides to the finish review as the critique reference.
|
|
93
|
-
|
|
94
90
|
### Both paths
|
|
95
91
|
|
|
96
92
|
- **The first viewport is a thesis, not a header.** Demonstrate the mechanism immediately, at the scale the form has in life; do not trap the concept inside a standard hero or card shell. The memory test: if someone left after one viewport, what would they describe an hour later? If the honest answer is a mood, the concept has not committed yet.
|
|
97
93
|
- **Prove, don't claim.** Show the subject doing its job: the interface at work, the mechanism dramatized, specifics a competitor could not copy-paste. Demonstration data is design material: author it at full fidelity and label it synthetic; claims stay uninventable.
|
|
98
94
|
- **Author the assets; never substitute chrome.** Great surfaces live on carefully made content: names, entries, copy, covers, thumbnails, textures. In greenfield work every blank the ask round left open is yours to author at production fidelity; content is authorable, claims are labelable, no section is omittable. Gradients, glass, generic icon tiles, and many-vertex `clip-path` polygons where an authored asset belongs are the gap wearing chrome; the detector flags the last two.
|
|
95
|
+
- **Draw a print material in its own technique.** On a code-led build, a world whose illustration is engraved, etched, or pen-and-ink is drawn as line: strokes carry the form, hatching (SVG patterns clipped to each shape) carries the tone, and colour sits inside the lines as a translucent wash. Flat fills under a thin outline read as clip-art, which the finish reviewer sends back for a rebuild. Use the world's own assets or one drawn subject per plate; never write a drawing engine.
|
|
99
96
|
- **Build the form's web leverage.** When the chosen world names a technique (canvas, WebGL, view transitions, generative motion), build the technique itself, not a static imitation of it.
|
|
100
97
|
- **Pace the scroll like a studio.** Vary density, scale, image, motion, and quiet inside one grammar; a dense passage earns a quiet one, and the page ends anchored by a real close. One spacing rhythm throughout, with more space above a heading than below it.
|
|
101
98
|
- **Use real, verified imagery when the brief implies it.** Search for the subject's physical object rather than the category; one decisive photo beats five mediocre ones. Verify stock URLs resolve.
|
|
@@ -105,20 +102,22 @@ Preserve semantics, accessibility, performance, responsiveness, project conventi
|
|
|
105
102
|
|
|
106
103
|
## 7. Inspect and finish
|
|
107
104
|
|
|
108
|
-
Inspect the surface's target sizes in one
|
|
105
|
+
Inspect the surface's target sizes in one capture pass per breakpoint. On the web, `.pi/skills/impeccable/scripts/impeccable first-viewport <page> --thesis <FIRST VIEWPORT's selector> --action <primary action's selector> --capture .impeccable/review` is that pass: it writes `desktop.png` and `mobile.png` and checks the fold, gaps, sample labels (`--figures-supplied` for figures the user gave) and a dead action; build no screenshot harness of your own. On a native platform (`ios` / `android` / `adaptive`), the shipped device classes per OS, captured from the simulator or emulator the way the platform reference's Verifying the build section describes. When the harness reports the user's actual viewport (an in-app browser's size, a named resolution), add that width to the set: the width that breaks is the one the user sees first. On anything interactive, one more pass drives every interaction and reachable state (open, closed, hover, focus, error, empty, overlong content) and checks each for overlap and clipping, not only the resting screen. Critique the render against the user's request, then walk the direction contract over the captures, as the finish reviewer will: first-viewport passes; every action STORY promises has a working element; every subject drawn in code reads at a glance, at its shipped size, as what it depicts. Fix material gaps in one batch, then confirm once: rerun first-viewport on the web, recapture once on native; no per-tweak captures. No inspection limit closes an open build-phase gate: it stays open until it passes or the route it names is taken. On a comp-led build, run `.pi/skills/impeccable/scripts/impeccable comp-diff --comp <approved comp> --build .impeccable/review/desktop.png --spec .impeccable/build/spec.json --out-dir .impeccable/review/diff/final` and read its region rows and paired crops as the critique: a region it scores missing or contradicted is a fix whatever the page looks like from memory. Never judge fidelity from one full-page thumbnail; it hides exactly the failures that matter. On a Persuade surface, verify the mode did its job: a first-time visitor should know what this is, why it matters, and what to do within seconds, in the form's own vocabulary.
|
|
109
106
|
|
|
110
107
|
A capture is evidence only when it is valid, and you validate before you send. Settle or disable entrance motion first: an element hidden by animation timing reads as a missing element and gets fixed into a regression. Capture full-page shots from the document top. Capture the comp comparison at the comp's own pixel dimensions. Then open every file once and confirm it shows what its name claims: no black or blank regions, no wrong section behind a right filename, no half-loaded state. A malformed capture sent onward costs the whole round; the reviewer answers it with `disposition: recapture` and nothing it reviewed binds.
|
|
111
108
|
|
|
112
|
-
After
|
|
109
|
+
After that confirmation the build thread's polishing is over: no further defect hunts, micro-edit scripts, or rebuilds here (an open build-phase gate is not a defect hunt; it closes as above); whatever remains ships through the handoffs, where a fresh context does the finding better and cheaper. On the web, where this harness runs no design hook, run `.pi/skills/impeccable/scripts/impeccable detect --json` on the changed targets once here, fix what is mechanical, and pass the remaining findings to the reviewer; a hookless web build that skips this ships every tell the hook exists to catch. A native platform skips the detector entirely: it reads HTML and CSS and has no verdict on native code, so the reviewer's floor check is the only slop gate and the input packet says so. Capture the screenshots into `.impeccable/review/`, one file per captured viewport (on the web, `desktop.png` and `mobile.png`, plus `user-<width>.png` whenever the user's viewport joined the inspected set; on native, one per device class, such as `phone.png` and `tablet.png`, suffixed per OS on adaptive), creating that directory when the harness does not; the paths you pass the reviewer are its spec, every viewport you inspected is named required in the packet, and that directory is where it looks when a passed path is missing.
|
|
113
110
|
|
|
114
|
-
Then spawn the shipped finish reviewer, `impeccable-finish-reviewer` (`impeccable_finish_reviewer` in codex; `/impeccable-finish-reviewer` in Cursor; on GitHub Copilot say "Use the impeccable-finish-reviewer agent"), with the original request, confirmed answers, the artifact path, the screenshot paths, the direction contract, existing hook findings, the QUALITY BAR card and approved comp paths (a code-led build has no approved comp; the chosen decision comp rides in that slot as the critique reference, named as such), on a comp-led build the build state (`.impeccable/build/state.json`), the spec, and the diff directories (`.impeccable/review/diff/hero/` and `.impeccable/review/diff/final/`, whose side-by-side, heatmap, region pairs, and `report.json` are the fidelity evidence), the craft-floor reference path, and on a native platform the platform reference path(s), [ios.md](ios.md) / [android.md](android.md), both on adaptive, plus one line saying no detector ran, so the reviewer judges in the platform's conventions rather than the web's. The reviewer has no browser; screenshots you fail to pass are checks it cannot run. Never read the shipped agents' definition files before spawning; the harness loads them at spawn, and you owe only the input packet. Wait on any agent with one long timeout rather than a loop of short polls, and spend the wait on the next independent step. Verify the return carries the five contract sections (a recapture return carries one, its recapture list); on an empty or thrashed return, respawn once with the same inputs. This review never runs inside the build thread and never inherits it: spawn the reviewer fresh, with no forked conversation history (`fork_turns: 0` in codex); a reviewer that inherits your transcript inherits your framing, your optimism, and your abstractions, and everything it needs travels in the inputs above. Only a harness with no subagent capability at all substitutes a fresh in-thread pass after stepping fully out of the build context, run from [degraded/finish-reviewer.md](degraded/finish-reviewer.md), and a substituted or failed-and-replaced review is disclosed in one line at finish, never silently.
|
|
111
|
+
Then spawn the shipped finish reviewer, `impeccable-finish-reviewer` (`impeccable_finish_reviewer` in codex; `/impeccable-finish-reviewer` in Cursor; on GitHub Copilot say "Use the impeccable-finish-reviewer agent"), with the original request, confirmed answers, the artifact path, the screenshot paths, the direction contract, existing hook findings, the QUALITY BAR card and approved comp paths (a code-led build has no approved comp; the chosen decision comp rides in that slot as the critique reference, named as such), on a comp-led build the build state (`.impeccable/build/state.json`), the spec, and the diff directories (`.impeccable/review/diff/hero/` and `.impeccable/review/diff/final/`, whose side-by-side, heatmap, region pairs, and `report.json` are the fidelity evidence), the craft-floor reference path, one line saying whether the build was code-led and whether image generation existed, and on a native platform the platform reference path(s), [ios.md](ios.md) / [android.md](android.md), both on adaptive, plus one line saying no detector ran, so the reviewer judges in the platform's conventions rather than the web's. The reviewer has no browser; screenshots you fail to pass are checks it cannot run. Never read the shipped agents' definition files before spawning; the harness loads them at spawn, and you owe only the input packet. Wait on any agent with one long timeout rather than a loop of short polls, and spend the wait on the next independent step. Verify the return carries the five contract sections (a recapture return carries one, its recapture list); on an empty or thrashed return, respawn once with the same inputs. This review never runs inside the build thread and never inherits it: spawn the reviewer fresh, with no forked conversation history (`fork_turns: 0` in codex); a reviewer that inherits your transcript inherits your framing, your optimism, and your abstractions, and everything it needs travels in the inputs above. Only a harness with no subagent capability at all substitutes a fresh in-thread pass after stepping fully out of the build context, run from [degraded/finish-reviewer.md](degraded/finish-reviewer.md), and a substituted or failed-and-replaced review is disclosed in one line at finish, never silently.
|
|
115
112
|
|
|
116
|
-
Act on the disposition word; there are exactly four. **recapture**: the evidence failed, not the build. Recapture what the return names under the capture-validity rules, then run a full review over the new evidence. A review conducted on invalid evidence binds nothing, and a verdict pass may never follow it. **rebuild**: fidelity failed wholesale, not in patches. Skip the fix batch and execute the rebuild immediately: re-derive the named regions, produce the named assets, and send the result back for a fresh full review, never a verdict pass; a rebuild replaces regions wholesale, so the whole matrix runs again over the recaptures. Tell the user what is happening rather than asking permission to fix a failure. Consult the user only on a second rebuild directive, both verdicts on the table, or when rebuilding would discard content the user approved. **ship**: nothing is owed; report the verdict at its scope and continue to the documenter. **fix**: apply the material fixes in one batch, rebuild once, and recapture the same viewports over the same files. On a comp-led build the batch keeps its gates passing: while a phase is open, rerun `.pi/skills/impeccable/scripts/impeccable build-phase advance` after it. Once all are closed, the final `finish --disposition ship`, recorded only on the reviewer's ship verdict, rechecks the page and reopens responsive when it no longer holds. A recapture measures positions, loading, and overflow; it cannot measure whether a fix reached the quality the finding named, so send the recaptured screenshots back to the same reviewer for a verdict scoring every material fix resolved, partial, or unresolved (through the harness's agent continuation; without one, run the scoring fresh from [degraded/finish-reviewer.md](degraded/finish-reviewer.md)'s Verdict Pass).
|
|
113
|
+
Act on the disposition word; there are exactly four. **recapture**: the evidence failed, not the build. Recapture what the return names under the capture-validity rules, then run a full review over the new evidence. A review conducted on invalid evidence binds nothing, and a verdict pass may never follow it. **rebuild**: fidelity failed wholesale, not in patches. Skip the fix batch and execute the rebuild immediately: re-derive the named regions, produce the named assets, and send the result back for a fresh full review, never a verdict pass; a rebuild replaces regions wholesale, so the whole matrix runs again over the recaptures. Tell the user what is happening rather than asking permission to fix a failure. Consult the user only on a second rebuild directive, both verdicts on the table, or when rebuilding would discard content the user approved. **ship**: nothing is owed; report the verdict at its scope and continue to the documenter. **fix**: apply the material fixes in one batch, rebuild once, and recapture the same viewports over the same files. On a comp-led build the batch keeps its gates passing: while a phase is open, rerun `.pi/skills/impeccable/scripts/impeccable build-phase advance` after it. Once all are closed, the final `finish --disposition ship`, recorded only on the reviewer's ship verdict, rechecks the page and reopens responsive when it no longer holds. A recapture measures positions, loading, and overflow; it cannot measure whether a fix reached the quality the finding named, so send the recaptured screenshots back to the same reviewer for a verdict scoring every material fix resolved, partial, or unresolved (through the harness's agent continuation; without one, run the scoring fresh from [degraded/finish-reviewer.md](degraded/finish-reviewer.md)'s Verdict Pass). An unattended run (headless, or no question tool, so nobody can fund another round) gets one correction round, a fix batch or a rebuild, and the review that follows it is final whatever its word, a second rebuild included: report what the verdict leaves open instead of starting a second round: a verdict scoring fixes partial ends the run as surely as a ship. In an attended session the ceiling belongs to the user: fixes scored partial or unresolved get another batch, recapture, and verdict, and when the second verdict still lists open items, put the table in front of them and let them choose between shipping as it stands and funding another round. Whoever decides, stop the moment a round resolves nothing, and the reviewer's findings are the only list you work from, never your own re-opened hunt. Do not run a second detector.
|
|
117
114
|
|
|
118
115
|
A rebuild and a fix round share one asset rule: a raster either round creates or replaces is still asset work under [visualize.md](visualize.md)'s Produce section and keeps its **provenance** like every build raster, and a raster the round abandons is deleted in the same batch. Before either round's result goes back for review or verdict, run `.pi/skills/impeccable/scripts/impeccable embed-prompt --scan <asset-dir...>` over the directories the artifact's rasters ship from and clear every file it reports by embedding what it is missing: the exact generation prompt for a produced raster, the origin for a sourced, stock, or pre-existing one. The scan only reads; deletion is reserved for rasters the round abandoned, never for a file the scan flagged.
|
|
119
116
|
|
|
120
117
|
Report the final verdict under the reviewer's own disposition word and at its actual scope. A verdict pass scores the listed fixes and nothing else: "the reviewer scored all three fixes resolved" is a claim it supports, "no material issues remain" is not. A table with open material findings is never announced as a pass, never softened, and never dressed as whole-surface approval when only a fix list was scored. When the user answers a ship with evidence against it, their own screenshot, a named mismatch with the comp, that evidence outranks every capture you made: put their material in the packet and spawn a fresh reviewer for a new full review. Patching inline and self-certifying is how a rejected page ships twice.
|
|
121
118
|
|
|
122
|
-
After the last correction, on a new or replacement world or an approved system change where a DESIGN.md already exists at the write boundary, collect the choice [document.md](document.md) requires: show the user the existing file. Ask the user directly to clarify what you cannot infer. Offer refresh, overwrite, or merge. A seeded world's first build asks nothing: a seed exists to be replaced by the system the build resolved, so the choice is refresh, keeping the frontmatter's `world:` line and the `seededFrom` key in the sidecar. Then spawn the shipped documenter, `impeccable-documenter` (`impeccable_documenter` in codex), with the project root, artifact path, direction contract, PRODUCT.md, [document.md](document.md), write boundary, and that choice; the documenter cannot ask and writes nothing over an existing DESIGN.md without it. Without subagents, load [degraded/documenter.md](degraded/documenter.md) and [document.md](document.md) before writing. Verify the outcome: new worlds, a seeded world's first build, and approved system changes require token-bearing DESIGN.md **and** `.impeccable/design.json`, not prose alone. Ordinary extensions compare the finished build against the incumbent system, preserve its files, and report the evidence checked; report pre-existing drift without repairing it unasked. Recheck after later edits. Finish only when review and documentation are complete.
|
|
119
|
+
After the last correction, on a new or replacement world or an approved system change where a DESIGN.md already exists at the write boundary, collect the choice [document.md](document.md) requires: show the user the existing file. Ask the user directly to clarify what you cannot infer. Offer refresh, overwrite, or merge. A seeded world's first build asks nothing: a seed exists to be replaced by the system the build resolved, so the choice is refresh, keeping the frontmatter's `world:` line and the `seededFrom` key in the sidecar. Then spawn the shipped documenter, `impeccable-documenter` (`impeccable_documenter` in codex); spawn it in the same message as the verdict or full-review request that follows the correction round rather than waiting for that return (if the request already went out alone, spawn it at once), and spawn it again after any later correction batch, once the earlier documenter has returned so its write never lands last, with the project root, artifact path, direction contract, PRODUCT.md, [document.md](document.md), write boundary, and that choice; the documenter cannot ask and writes nothing over an existing DESIGN.md without it. Without subagents, load [degraded/documenter.md](degraded/documenter.md) and [document.md](document.md) before writing. Verify the outcome: new worlds, a seeded world's first build, and approved system changes require token-bearing DESIGN.md **and** `.impeccable/design.json`, not prose alone. Ordinary extensions compare the finished build against the incumbent system, preserve its files, and report the evidence checked; report pre-existing drift without repairing it unasked. Recheck after later edits. Finish only when review and documentation are complete.
|
|
123
120
|
|
|
124
121
|
On a comp-led build, record the final review disposition with `.pi/skills/impeccable/scripts/impeccable build-phase finish --disposition <ship|fix|rebuild|recapture>` before the final response. A refused `ship` is an unfinished build; report the outstanding phase with the verdict. Any edit after the last captured gate, a fix for a hook finding after `ship` included, voids that capture: run `finish --disposition ship` again before you stop, which rechecks the current files against the gate and names any recapture it needs. Never record `fix` to end a run over an open gate: take the route the gate names, and when the user leaves it open, report that phase as open.
|
|
122
|
+
|
|
123
|
+
The final response opens with the result, not the process: when the build finished, one line saying the page is ready and exactly how to open it (the running dev server's URL, else the command that serves it, else the file path), then the verdict at its scope; when it did not, that line says what is left and still how to open what exists. Report only findings on files that ship; comps, mocks and snapshots under `.impeccable/` are working material and never carry findings.
|
|
@@ -19,7 +19,7 @@ Fix the cause at the narrowest correct level. Ask when a binding system principl
|
|
|
19
19
|
|
|
20
20
|
## 2. Gather the evidence
|
|
21
21
|
|
|
22
|
-
Use the feature yourself at the surface's representative sizes: desktop and mobile on the web; on a native platform (`ios` / `android` / `adaptive`), the shipped device classes on the simulator, emulator, or hardware, captured per the platform reference's Verifying the build section. Determine:
|
|
22
|
+
Use the feature yourself at the surface's representative sizes: desktop and mobile on the web (`.pi/skills/impeccable/scripts/impeccable shot <page or url>` captures both); on a native platform (`ios` / `android` / `adaptive`), the shipped device classes on the simulator, emulator, or hardware, captured per the platform reference's Verifying the build section. Determine:
|
|
23
23
|
|
|
24
24
|
- whether the path is functionally complete;
|
|
25
25
|
- the intended quality bar and time available;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.27
|
package/node_modules/@herbertgao/pi-impeccable/skills/impeccable/scripts/engine-checksums.txt
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
# The launchers, the npm shim, `impeccable install` and scripts/fetch-engine.mjs verify
|
|
3
3
|
# every engine download against this file. Written by
|
|
4
4
|
# `node scripts/check-engine-release.mjs --record` after each engine release.
|
|
5
|
-
0.1.
|
|
6
|
-
0.1.
|
|
7
|
-
0.1.
|
|
8
|
-
0.1.
|
|
9
|
-
0.1.
|
|
5
|
+
0.1.27 impeccable-darwin-arm64 e33578341212fe6ebeed273850b3af0a7f54bbdc5e9fdf03e760aae23482975b
|
|
6
|
+
0.1.27 impeccable-darwin-x64 3ecf11185ad7ea05cfc693ef969eb75ee7aef63f45472bf884e9b9f896a8d052
|
|
7
|
+
0.1.27 impeccable-linux-x64 41d66e945bcdfc560005b61ad0b6b2312b124890039262f2e63322ef2709ccfd
|
|
8
|
+
0.1.27 impeccable-linux-arm64 6ceb6188c80adb4b4fcc0721e677e2124d795b8e243599ad0d7bea33369b2c9c
|
|
9
|
+
0.1.27 impeccable-windows-x64.exe ba9627d4552bca5666020624d8e994aea8b8b44c46b995e18b5babad0f431fc8
|
|
@@ -30,6 +30,17 @@
|
|
|
30
30
|
window.__IMPECCABLE_LIVE_INIT__ = false; // reset so the real load can init
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
|
+
// The user just exited this helper's session: a reload in the next minute,
|
|
34
|
+
// before the agent removes the script tag (a carbonize edit reloads the
|
|
35
|
+
// page), must not bring Live back.
|
|
36
|
+
const EXITED_KEY = 'impeccable-live-exited';
|
|
37
|
+
try {
|
|
38
|
+
const [t, at] = (sessionStorage.getItem(EXITED_KEY) || '').split(' ');
|
|
39
|
+
if (t === TOKEN && Date.now() - Number(at) < 60_000) {
|
|
40
|
+
window.__IMPECCABLE_LIVE_INIT__ = false; // reset so a later inject can init
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
} catch { /* storage blocked */ }
|
|
33
44
|
|
|
34
45
|
//
|
|
35
46
|
// Design tokens
|
|
@@ -2715,7 +2726,7 @@
|
|
|
2715
2726
|
return el('div', { display: 'none' });
|
|
2716
2727
|
}
|
|
2717
2728
|
const row = el('div', {
|
|
2718
|
-
display: 'flex', alignItems: 'center', gap: '6px',
|
|
2729
|
+
display: 'flex', alignItems: 'center', gap: touchPrimary() ? '2px' : '6px',
|
|
2719
2730
|
padding: '1px 2px',
|
|
2720
2731
|
});
|
|
2721
2732
|
|
|
@@ -2830,6 +2841,7 @@
|
|
|
2830
2841
|
cursor: 'pointer', transition: 'filter 0.12s ease, transform 0.1s ease',
|
|
2831
2842
|
whiteSpace: 'nowrap',
|
|
2832
2843
|
});
|
|
2844
|
+
touchTarget(accept);
|
|
2833
2845
|
accept.textContent = '\u2713 Accept';
|
|
2834
2846
|
accept.addEventListener('mouseenter', () => accept.style.filter = 'brightness(1.08)');
|
|
2835
2847
|
accept.addEventListener('mouseleave', () => accept.style.filter = 'none');
|
|
@@ -2850,6 +2862,7 @@
|
|
|
2850
2862
|
fontFamily: FONT, fontSize: '11px', color: BP.textDim,
|
|
2851
2863
|
cursor: 'pointer', transition: 'color 0.12s ease, border-color 0.12s ease',
|
|
2852
2864
|
});
|
|
2865
|
+
touchTarget(discard);
|
|
2853
2866
|
discard.textContent = '\u2715';
|
|
2854
2867
|
discard.title = 'Discard all variants';
|
|
2855
2868
|
discard.addEventListener('mouseenter', () => { discard.style.color = BP.text; discard.style.borderColor = BP.text; });
|
|
@@ -2950,6 +2963,12 @@
|
|
|
2950
2963
|
return container;
|
|
2951
2964
|
}
|
|
2952
2965
|
|
|
2966
|
+
/** A finger needs 44px; a mouse keeps the compact bar. */
|
|
2967
|
+
function touchTarget(b) {
|
|
2968
|
+
if (touchPrimary()) Object.assign(b.style, { minWidth: '44px', minHeight: '44px' });
|
|
2969
|
+
return b;
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2953
2972
|
function navBtn(text) {
|
|
2954
2973
|
const b = el('button', {
|
|
2955
2974
|
width: '26px', height: '26px', borderRadius: '5px',
|
|
@@ -2962,7 +2981,7 @@
|
|
|
2962
2981
|
b.textContent = text;
|
|
2963
2982
|
b.addEventListener('mouseenter', () => { b.style.borderColor = BP.text; });
|
|
2964
2983
|
b.addEventListener('mouseleave', () => { b.style.borderColor = BP.hairline; });
|
|
2965
|
-
return b;
|
|
2984
|
+
return touchTarget(b);
|
|
2966
2985
|
}
|
|
2967
2986
|
|
|
2968
2987
|
function actionLabel() {
|
|
@@ -7849,7 +7868,7 @@
|
|
|
7849
7868
|
saveInteractionPrefs();
|
|
7850
7869
|
updateGlobalBarState();
|
|
7851
7870
|
showToast('Click anything on the page to restyle it.', 8000);
|
|
7852
|
-
} else if (!hasProjectContext && !liveBarHiddenByHelper) showToast(`No PRODUCT.md found. Variants will be brand-agnostic. Run ${IMPECCABLE_COMMAND} init to generate one.`, 7000);
|
|
7871
|
+
} else if (!hasProjectContext && !liveBarHiddenByHelper && takeContextNotice()) showToast(`No PRODUCT.md found. Variants will be brand-agnostic. Run ${IMPECCABLE_COMMAND} init to generate one.`, 7000);
|
|
7853
7872
|
console.log('[impeccable] Live mode connected.');
|
|
7854
7873
|
syncAgentPollingUi(!!msg.agentPolling);
|
|
7855
7874
|
startAgentStatusPoll();
|
|
@@ -10580,6 +10599,20 @@ void main() {
|
|
|
10580
10599
|
return { pickActive: false, insertActive: false, firstRun: true };
|
|
10581
10600
|
}
|
|
10582
10601
|
|
|
10602
|
+
// The missing-PRODUCT.md notice shows once per browser: a reconnect, a
|
|
10603
|
+
// reload or the variants arriving would otherwise bring it back each time.
|
|
10604
|
+
const CONTEXT_NOTICE_KEY = 'impeccable-live-context-notice';
|
|
10605
|
+
let contextNoticeShown = false;
|
|
10606
|
+
function takeContextNotice() {
|
|
10607
|
+
if (contextNoticeShown) return false;
|
|
10608
|
+
contextNoticeShown = true;
|
|
10609
|
+
try {
|
|
10610
|
+
if (localStorage.getItem(CONTEXT_NOTICE_KEY)) return false;
|
|
10611
|
+
localStorage.setItem(CONTEXT_NOTICE_KEY, '1');
|
|
10612
|
+
} catch { /* ignore */ }
|
|
10613
|
+
return true;
|
|
10614
|
+
}
|
|
10615
|
+
|
|
10583
10616
|
function saveInteractionPrefs() {
|
|
10584
10617
|
try {
|
|
10585
10618
|
localStorage.setItem(INTERACTION_PREFS_KEY, JSON.stringify({ pickActive, insertActive }));
|
|
@@ -10761,13 +10794,11 @@ void main() {
|
|
|
10761
10794
|
});
|
|
10762
10795
|
}
|
|
10763
10796
|
|
|
10764
|
-
|
|
10765
|
-
|
|
10766
|
-
|
|
10767
|
-
|
|
10768
|
-
|
|
10769
|
-
applyGlobalBarLabelState(false);
|
|
10770
|
-
}
|
|
10797
|
+
// Only active modes show their label. Hover never widens the bar: it sits
|
|
10798
|
+
// centred, so growing labels slid the icons out from under the pointer and a
|
|
10799
|
+
// click meant for Pick landed on Insert. The title tooltip names the rest.
|
|
10800
|
+
function syncGlobalBarExpandedLabels() {
|
|
10801
|
+
applyGlobalBarLabelState(false, pageChatExpanded);
|
|
10771
10802
|
}
|
|
10772
10803
|
|
|
10773
10804
|
function pageChatCollapsedWidthPx() {
|
|
@@ -11173,7 +11204,7 @@ void main() {
|
|
|
11173
11204
|
if (!pageChatEl || !pageChatInput) return false;
|
|
11174
11205
|
pageChatExpanded = true;
|
|
11175
11206
|
pageChatEl.dataset.expanded = 'true';
|
|
11176
|
-
syncGlobalBarExpandedLabels(
|
|
11207
|
+
syncGlobalBarExpandedLabels();
|
|
11177
11208
|
pageChatEl.style.width = pageChatExpandedWidth();
|
|
11178
11209
|
pageChatEl.style.cursor = steerLocked ? 'default' : 'text';
|
|
11179
11210
|
pageChatInput.placeholder = PAGE_CHAT_PLACEHOLDER_EXPANDED;
|
|
@@ -11316,6 +11347,7 @@ void main() {
|
|
|
11316
11347
|
}
|
|
11317
11348
|
steerPendingMessage = keepExpanded ? restoreMessage : '';
|
|
11318
11349
|
steerInputWasFocused = false;
|
|
11350
|
+
syncGlobalBarExpandedLabels();
|
|
11319
11351
|
syncPageChatChrome();
|
|
11320
11352
|
syncPageChatFocusRing();
|
|
11321
11353
|
if (opts?.error) showToast(String(opts.error), 5000);
|
|
@@ -11608,7 +11640,7 @@ void main() {
|
|
|
11608
11640
|
pageChatEl.dataset.expanded = 'false';
|
|
11609
11641
|
pageChatEl.style.width = PAGE_CHAT_COLLAPSED_W;
|
|
11610
11642
|
pageChatEl.style.cursor = 'pointer';
|
|
11611
|
-
syncGlobalBarExpandedLabels(
|
|
11643
|
+
syncGlobalBarExpandedLabels();
|
|
11612
11644
|
if (blur) {
|
|
11613
11645
|
pageChatInput.blur();
|
|
11614
11646
|
pageChatInput.style.pointerEvents = 'none';
|
|
@@ -12054,7 +12086,7 @@ void main() {
|
|
|
12054
12086
|
inner.id = PREFIX + '-global-bar-inner';
|
|
12055
12087
|
globalBarEl.appendChild(inner);
|
|
12056
12088
|
|
|
12057
|
-
// Button factory: icon-only at rest, label slides in
|
|
12089
|
+
// Button factory: icon-only at rest, label slides in while active.
|
|
12058
12090
|
function makeIconBtn({ id, svg, label, ariaLabel, labelFont, onClick }) {
|
|
12059
12091
|
const b = el('button', {
|
|
12060
12092
|
position: 'relative',
|
|
@@ -12084,10 +12116,8 @@ void main() {
|
|
|
12084
12116
|
if (!labelEl || (!force && b.dataset.active === 'true')) return;
|
|
12085
12117
|
labelEl.style.maxWidth = '0'; labelEl.style.opacity = '0'; labelEl.style.marginLeft = '0'; labelEl.style.transform = 'translateX(-4px)';
|
|
12086
12118
|
};
|
|
12087
|
-
//
|
|
12088
|
-
//
|
|
12089
|
-
// the mouse between adjacent buttons doesn't trigger per-button width
|
|
12090
|
-
// thrashing - the whole bar grows once and shrinks once.
|
|
12119
|
+
// Hover only changes color, never layout: the label shows while the
|
|
12120
|
+
// mode is active (see syncGlobalBarExpandedLabels).
|
|
12091
12121
|
b.addEventListener('mouseenter', () => { if (b.dataset.active !== 'true') b.style.color = P.text; });
|
|
12092
12122
|
b.addEventListener('mouseleave', () => { if (b.dataset.active !== 'true') b.style.color = P.textDim; });
|
|
12093
12123
|
b.addEventListener('click', onClick);
|
|
@@ -12354,27 +12384,20 @@ void main() {
|
|
|
12354
12384
|
color: P.textDim, fontFamily: FONT, fontSize: '0', lineHeight: '0',
|
|
12355
12385
|
cursor: 'pointer', transition: 'color 0.12s ease, background 0.12s ease',
|
|
12356
12386
|
});
|
|
12387
|
+
touchTarget(exitBtn);
|
|
12357
12388
|
exitBtn.id = PREFIX + '-exit';
|
|
12358
12389
|
exitBtn.innerHTML = '<svg width="14" height="14" viewBox="0 0 14 14" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><line x1="3" y1="3" x2="11" y2="11"/><line x1="11" y1="3" x2="3" y2="11"/></svg>';
|
|
12359
12390
|
exitBtn.title = 'Exit live mode';
|
|
12360
12391
|
exitBtn.addEventListener('mouseenter', () => { exitBtn.style.color = 'oklch(58% 0.15 35)'; exitBtn.style.background = P.exitHover; });
|
|
12361
12392
|
exitBtn.addEventListener('mouseleave', () => { exitBtn.style.color = P.textDim; exitBtn.style.background = 'transparent'; });
|
|
12362
|
-
|
|
12393
|
+
// source: 'user' keeps a reconnect (the reload a carbonize edit triggers) from cancelling it.
|
|
12394
|
+
exitBtn.addEventListener('click', () => {
|
|
12395
|
+
try { sessionStorage.setItem(EXITED_KEY, TOKEN + ' ' + Date.now()); } catch { /* storage blocked */ }
|
|
12396
|
+
sendEvent({ type: 'exit', source: 'user' });
|
|
12397
|
+
teardown();
|
|
12398
|
+
});
|
|
12363
12399
|
inner.appendChild(exitBtn);
|
|
12364
12400
|
|
|
12365
|
-
// Bar-level hover: expand mode labels unless Steer is using the space.
|
|
12366
|
-
// Buttons with dataset.active="true" ignore collapse (their label stays).
|
|
12367
|
-
globalBarEl.addEventListener('mouseenter', () => {
|
|
12368
|
-
syncGlobalBarExpandedLabels(true);
|
|
12369
|
-
syncPageChatExpandedWidth();
|
|
12370
|
-
schedulePendingDockPosition();
|
|
12371
|
-
setTimeout(schedulePendingDockPosition, 260);
|
|
12372
|
-
});
|
|
12373
|
-
globalBarEl.addEventListener('mouseleave', () => {
|
|
12374
|
-
syncGlobalBarExpandedLabels(false);
|
|
12375
|
-
schedulePendingDockPosition();
|
|
12376
|
-
setTimeout(schedulePendingDockPosition, 260);
|
|
12377
|
-
});
|
|
12378
12401
|
globalBarEl.addEventListener('pointerdown', () => {
|
|
12379
12402
|
try { window.focus(); } catch { /* in-app preview may block */ }
|
|
12380
12403
|
}, true);
|
|
@@ -12439,7 +12462,7 @@ void main() {
|
|
|
12439
12462
|
// If the bar is currently under the cursor, keep all labels expanded -
|
|
12440
12463
|
// otherwise clicking a toggle that deactivates (e.g. closing DESIGN.md)
|
|
12441
12464
|
// would collapse its label while the user's mouse is still on the bar.
|
|
12442
|
-
syncGlobalBarExpandedLabels(
|
|
12465
|
+
syncGlobalBarExpandedLabels();
|
|
12443
12466
|
|
|
12444
12467
|
if (detectBadge) {
|
|
12445
12468
|
detectBadge.style.display = (detectActive && detectCount > 0) ? 'inline' : 'none';
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.26.1-local.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#397](https://github.com/HerbertGao/pi-extensions/pull/397) [`42647d1`](https://github.com/HerbertGao/pi-extensions/commit/42647d16b171f766da6135fc937bd087e005a161) Thanks [@HerbertGao](https://github.com/HerbertGao)! - Label an `Agent` run by identity: a registered type (Code Reviewer) keeps its type name while a named generic run shows its own `name`, in both the ccstyle transcript row and the pi-subagents badges. The `name` parameter accepts any characters — labels show it as given, `@handles` are slugged. `agency_register` seats catalog personas as session-scoped agent types over the new `subagents:rpc:register-agents` bus channels: the persona body becomes the system prompt, the card name and color become the label and badge, and the types vanish at the next session start without ever shadowing file-loaded agents.
|
|
8
|
+
|
|
3
9
|
## 0.26.1-local.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Driving subagents from another extension
|
|
2
2
|
|
|
3
|
-
Another pi extension can spawn a subagent, listen for subagent completion, read the result, steer and stop the run — all over the `pi.events` bus, without importing this package directly.
|
|
3
|
+
Another pi extension can spawn a subagent, listen for subagent completion, read the result, steer and stop the run — all over the `pi.events` bus, without importing this package directly. Seven request/reply channels (`subagents:rpc:ping`, `subagents:rpc:spawn`, `subagents:rpc:stop`, `subagents:rpc:consume`, `subagents:rpc:steer`, `subagents:rpc:register-agents`, `subagents:rpc:unregister-agents`), the lifecycle events in README's [event table](../README.md#events), one per-message usage event (`subagents:usage`), one terminal `subagents:disposed`, and one in-process registry at `Symbol.for("pi-subagents:manager")`.
|
|
4
4
|
|
|
5
5
|
The thing worth understanding up front is that **the bus is in-process.** Every "RPC" call here is a synchronous `pi.events.emit` into the same event loop, and every reply comes back the same way. That single fact explains most of what follows: why `signal` and the `on*` callbacks work on a spawn payload at all, why a `consume` fired inside a `subagents:completed` handler lands _before_ the notification decision has been made, and why none of this survives a real process boundary.
|
|
6
6
|
|
|
@@ -138,6 +138,12 @@ One related thing that lives nowhere else: on every top-level settle, pi-subagen
|
|
|
138
138
|
|
|
139
139
|
It takes an id only, enforces the same top-level ownership guard as stop, and answers `Agent is not running` for a record that has settled. A message queued before the agent's session exists is flushed when the session is created, exactly as the tool's steer is. A successful steer emits `subagents:steered` `{ id, message }`, as every steer path does. Like `consume`, it is outside the `ping` version handshake: an older build has no handler and the request times out on your side, so give it a timeout and treat expiry as "not available here".
|
|
140
140
|
|
|
141
|
+
## Registering session-scoped agent types
|
|
142
|
+
|
|
143
|
+
`subagents:rpc:register-agents` `{ requestId, agents: [{ name, description, systemPrompt, color? }], tools?: "none" | "builtin" }` registers ephemeral agent types — spawnable immediately as `subagent_type`, surviving every agent-file reload, and cleared on the next `session_start`. The payload is deliberately narrow: the system prompt is applied in replace mode, extension and skill access is refused, and the only tool choice is none or the built-ins. A file-loaded agent with the same name (case-insensitively) wins — the overlay never shadows the user's own agents. `subagents:rpc:unregister-agents` `{ requestId, names }` removes types by name; file-backed types are untouched.
|
|
144
|
+
|
|
145
|
+
Like `consume` and `steer`, both channels are outside the `ping` version handshake: an older build has no handler and never replies, so give the call a timeout and treat expiry as "not available here". The intended caller is `@herbertgao/pi-agency`, which seats an Agency Agents catalog persona this way — the persona body as system prompt, the card name as the agent's label, the card color as its badge.
|
|
146
|
+
|
|
141
147
|
## The manager registry
|
|
142
148
|
|
|
143
149
|
`globalThis[Symbol.for("pi-subagents:manager")]` (`MANAGER_KEY` and `registryEntry`, `src/index.ts`) is a second integration surface — the standard Node cross-package singleton pattern, no bus involved:
|
|
@@ -192,15 +192,19 @@ export function renderAgentName(
|
|
|
192
192
|
type: string | undefined,
|
|
193
193
|
theme: AgentNameTheme,
|
|
194
194
|
style: AgentNameStyle = {},
|
|
195
|
-
/** A run's own name
|
|
195
|
+
/** A run's own name. It outranks only the generic default type; a real type
|
|
196
|
+
* (Code Reviewer) is itself the identity and keeps its own label. */
|
|
196
197
|
label?: string,
|
|
197
198
|
): string {
|
|
198
199
|
if (!type) {
|
|
199
200
|
return renderAgentNameLabel(label ?? "Agent", undefined, theme, style)
|
|
200
201
|
}
|
|
201
202
|
const config = getConfig(type)
|
|
203
|
+
// general-purpose is the identity-less default: a run's name is the better
|
|
204
|
+
// label there. Any other type is itself the identity and wins over the name.
|
|
205
|
+
const generic = type.toLowerCase() === "general-purpose"
|
|
202
206
|
return renderAgentNameLabel(
|
|
203
|
-
label ?? config.displayName,
|
|
207
|
+
generic ? (label ?? config.displayName) : config.displayName,
|
|
204
208
|
config.color,
|
|
205
209
|
theme,
|
|
206
210
|
style,
|