@penpair/core 0.3.0 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/cli-main.js +36 -3
  2. package/dist/skill-check-entry.d.ts +19 -0
  3. package/dist/skill-check-entry.js +107 -0
  4. package/dist/skill-check-instructions.d.ts +7 -0
  5. package/dist/skill-check-instructions.js +39 -0
  6. package/dist/skill-check.d.ts +18 -0
  7. package/dist/skill-check.js +58 -0
  8. package/dist/skill-file.d.ts +2 -0
  9. package/dist/skill-file.js +31 -0
  10. package/dist/skill-hosts.d.ts +16 -0
  11. package/dist/skill-hosts.js +20 -0
  12. package/dist/skill-instructions.d.ts +4 -0
  13. package/dist/skill-instructions.js +6 -0
  14. package/dist/skill-metadata.d.ts +8 -0
  15. package/dist/skill-metadata.js +52 -0
  16. package/dist/skill-routing.d.ts +2 -0
  17. package/dist/skill-routing.js +36 -0
  18. package/dist/skills.d.ts +1 -1
  19. package/dist/skills.js +38 -10
  20. package/dist/version.d.ts +1 -1
  21. package/dist/version.js +1 -1
  22. package/package.json +3 -2
  23. package/skills/design-judgment/SKILL.md +1 -1
  24. package/skills/design-judgment/agents/openai.yaml +6 -0
  25. package/skills/penpair-design/SKILL.md +11 -1
  26. package/skills/penpair-design/agents/openai.yaml +6 -0
  27. package/skills/penpair-handoff/SKILL.md +12 -1
  28. package/skills/penpair-handoff/agents/openai.yaml +6 -0
  29. package/skills/penpair-handoff/references/comparison-companion.md +4 -1
  30. package/skills/penpair-recipes/SKILL.md +8 -1
  31. package/skills/penpair-recipes/agents/openai.yaml +6 -0
  32. package/skills/penpair-recipes/assets/visual-checkpoint.md +48 -0
  33. package/skills/penpair-recipes/references/visual-checkpoint.md +37 -0
  34. package/skills/penpair-setup/SKILL.md +258 -36
  35. package/skills/penpair-setup/agents/openai.yaml +6 -0
  36. package/skills/penpair-verify/SKILL.md +49 -0
  37. package/skills/penpair-verify/agents/openai.yaml +6 -0
  38. package/skills/penpair-verify/references/browser-evidence.md +33 -0
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: penpair-verify
3
+ description: Verify a frontend against an approved Penpot design using Penpair Reflection Check. Use to check visual parity, investigate design mismatches or recheck an implementation after fixes with real browser screenshots and observed application state.
4
+ ---
5
+
6
+ # Frontend verification
7
+
8
+ Compare the real implementation with the exact approved design case. Use the
9
+ project's configured browser provider and component library. A captured design,
10
+ an installed adapter and a passing build each establish different facts.
11
+
12
+ Continue the project's existing comparative checkpoint, or create a project-owned
13
+ case report outside installed skill folders. Retain source/candidate identities,
14
+ preserved and changed regions, actual image paths, observed setup, consequential
15
+ findings and the next action. If `penpair-recipes` is installed, its
16
+ `references/visual-checkpoint.md` and template supply the common format.
17
+
18
+ 1. **Establish readiness.** Inspect the installed command and adapter versions,
19
+ the project's existing verification scripts, approved reference and explicit
20
+ case mapping. Use the local command (`pnpm exec penpair` in pnpm projects).
21
+ Report installed, registered, references approved, cases mapped, provider
22
+ configured, browser verified and owner reviewed separately. Keep unavailable
23
+ stages pending; do not invent approval or replace an unimplemented setup.
24
+ 2. **Plan the case.** Run `penpair reflection plan --map FILE`. Confirm the
25
+ reference identity/hash and intended route, viewport, theme, state, fixture and
26
+ fonts. Start with one representative case before expanding the matrix. For
27
+ browser evidence requirements, read [browser-evidence.md](references/browser-evidence.md).
28
+ 3. **Run the real browser.** Start or reuse the authorized local application and
29
+ run `penpair reflection check --map FILE --provider FILE`. The project module
30
+ must activate and independently observe the requested application state.
31
+ Exit 0 means complete evidence within thresholds; 2 means measured drift;
32
+ 3 means incomplete evidence. An execution error establishes no comparison.
33
+ 4. **Inspect and repair.** Look at the approved image and actual browser image;
34
+ inspect a diff image when the checker produces one. Record consequential
35
+ findings as location, impact, evidence, proposed fix and rerun case. Fix
36
+ implementation mismatches within scope, then recapture affected cases. Do
37
+ not overwrite approved references, change case intent or loosen thresholds
38
+ merely to pass. A design change goes back through design review and approval.
39
+ 5. **Checkpoint and report.** If repeated failures or substantial tooling work
40
+ prevent a representative visual result, report the evidence and revised
41
+ approach before expanding tools or cases. Retain case IDs, image paths,
42
+ findings and the next action so another agent can continue. Report **Changed**,
43
+ **Validated**, **Risks**, separating comparison, visual critique, accessibility
44
+ checks and owner approval. A low pixel ratio does not establish any of the last
45
+ three.
46
+
47
+ For a new implementation or missing component mapping, use `penpair-handoff` when
48
+ installed. For Penpot changes, use `penpair-design` when installed and retain the
49
+ project's write protocol. Reading a skill never authorizes an extra live write.
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "Penpair Verify"
3
+ short_description: "Compare browser UI with approved designs"
4
+ default_prompt: "Use $penpair-verify to compare this running frontend with its approved design, inspect the images and recheck scoped fixes."
5
+ policy:
6
+ allow_implicit_invocation: true
@@ -0,0 +1,33 @@
1
+ # Real browser evidence
2
+
3
+ The optional `@penpair/reflection-check` adapter connects approved design cases to
4
+ a trusted project module exporting `async runCase(test)`. Match its version to
5
+ the installed command/core and preserve existing adapter entries. Read the
6
+ [adapter guide](https://github.com/niklas-westman/penpair/blob/main/docs/adapters.md#check-the-frontend-against-the-design)
7
+ for installation and the current provider contract.
8
+
9
+ The command package ships `examples/reflection-browser/`: for a web installation,
10
+ start at `node_modules/@penpair/web/examples/reflection-browser/README.md`. The
11
+ starter supplies browser capture and pixel comparison plumbing. Project hooks
12
+ still own the actual route, state setup, fixture, theme observation, capture root
13
+ and expected fonts. The standalone Reflection application is optional; a pinned
14
+ browser dependency and working provider are still required in the project.
15
+
16
+ Before claiming a comparison, retain the case ID, approved reference/hash, setup
17
+ name, provider identity/version and actual browser observation. Check viewport,
18
+ theme, state, fixture, loaded fonts, PNG dimensions and scale. Missing state
19
+ hooks, placeholder routes or echoed test inputs leave verification pending.
20
+ Inspect pointer/hover, scroll/sticky behavior, occlusion and capture-root bounds
21
+ when they can explain a mismatch. Do not hide them by changing the reference.
22
+
23
+ Use the project's existing verification command or pass its explicit mapping and
24
+ provider to the installed `penpair reflection` command. Providers execute trusted
25
+ project code, not sandboxed data. Preserve approved baseline bytes before and
26
+ after running them. Browser state and screenshots must be independently observed;
27
+ an adapter accepts an evidence contract but cannot attest that a provider is
28
+ honest.
29
+
30
+ Keep the result and screenshots in a project-owned report. Distinguish measured
31
+ drift, a visual finding, behavior/accessibility checks and owner acceptance.
32
+ Design-to-design state variants need a source/candidate critique, not an
33
+ implementation parity score against intentionally different content.