@penpair/web 0.3.0 → 0.3.1

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/README.md CHANGED
@@ -51,9 +51,14 @@ Install one command package: `@penpair/web`, or `@penpair/docker` for a local in
51
51
  | [penpair-setup](packages/core/skills/penpair-setup/SKILL.md) | Connect or repair project setup |
52
52
  | [penpair-design](packages/core/skills/penpair-design/SKILL.md) | Inspect and operate on a design file |
53
53
  | [penpair-recipes](packages/core/skills/penpair-recipes/SKILL.md) | Compose a page with reviewed recipes |
54
- | [penpair-handoff](packages/core/skills/penpair-handoff/SKILL.md) | Implement from design evidence and compare |
54
+ | [penpair-handoff](packages/core/skills/penpair-handoff/SKILL.md) | Map components and implement from design evidence |
55
+ | [penpair-verify](packages/core/skills/penpair-verify/SKILL.md) | Compare the real frontend, inspect images and recheck fixes |
55
56
  | [design-judgment](packages/core/skills/design-judgment/SKILL.md) | Assess page structure and hierarchy |
56
57
 
58
+ Check a consumer's Codex installation with `pnpm exec penpair skills check --json`.
59
+ [Discovery diagnostics and behavior trials](docs/skill-validation.md) explain what
60
+ that establishes and how to verify actual skill use.
61
+
57
62
  [Cookbook](docs/cookbook.md) · [MCP tools](docs/mcp.md) · [Format contracts](docs/formats.md) · [Compatibility](docs/compatibility.md) · [Recovery](docs/recovery.md) · [Living checklist](docs/improvements.md)
58
63
 
59
64
  See [CONTRIBUTING](CONTRIBUTING.md), [SECURITY](SECURITY.md), [release steps](docs/releasing.md), [CHANGELOG](CHANGELOG.md) and the [MIT licence](LICENSE). Comparison metrics supply evidence for review; they do not approve a design.
package/docs/adapters.md CHANGED
@@ -39,10 +39,11 @@ First check your installed command version:
39
39
  pnpm exec penpair --version
40
40
  ```
41
41
 
42
- For a project already on **0.2.0**, install the matching companion:
42
+ For example, a project whose command/core are **0.3.0** installs this matching
43
+ companion. Use the actual installed version when it differs:
43
44
 
44
45
  ```sh
45
- pnpm add -D -E @penpair/reflection-check@0.2.0
46
+ pnpm add -D -E @penpair/reflection-check@0.3.0
46
47
  ```
47
48
 
48
49
  Use the version printed above when it differs. In a pnpm workspace, use the existing dependency location (`-w` when installing at the workspace root). Upgrade directly installed Penpair packages together rather than mixing releases.
@@ -72,7 +73,13 @@ pnpm exec penpair reflection check --map design/implementation-cases.json --prov
72
73
 
73
74
  Use the [package reference](https://github.com/niklas-westman/penpair/blob/main/packages/reflection-check/README.md) for mapping/provider examples. Exit **0** means complete evidence within threshold, **2** means measured drift and **3** means missing/incomplete evidence. An install, a passing setup check or a stub provider is not a completed frontend comparison.
74
75
 
75
- The shared browser-provider starter is planned work. Until it ships, configure a real project provider or explicitly report that integration as pending. For simple legacy route/viewport checks, the existing generated `reflection-cases.json` and `visualSmoke` configuration remain available; richer cases require explicit setup and readback.
76
+ The browser-provider starter ships with the command package; supply real project
77
+ hooks or report integration as pending. The shipped
78
+ [penpair-verify skill](../packages/core/skills/penpair-verify/SKILL.md) guides
79
+ comparison, image inspection, implementation fixes and recapture. For simple
80
+ legacy route/viewport checks, the existing generated `reflection-cases.json` and
81
+ `visualSmoke` configuration remain available; richer cases require explicit setup
82
+ and readback.
76
83
 
77
84
  ## Why explicit companions?
78
85
 
@@ -1 +1 @@
1
- {"version":"3.2.4","results":[[":templates/conventions.test.ts",{"duration":5.28132800000003,"failed":false}]]}
1
+ {"version":"3.2.4","results":[[":templates/conventions.test.ts",{"duration":3.757374000000027,"failed":false}]]}
@@ -0,0 +1,178 @@
1
+ # Codex skill workflow readiness
2
+
3
+ Created and last updated: 2026-10-23. Branch: `codex/skill-workflow-readiness`.
4
+ Status: offline implementation complete. Current step: owner branch review and
5
+ the separately pending acceptance trials below.
6
+
7
+ ## Living document
8
+
9
+ Check an item only in the change that implements and verifies it. Commit each
10
+ completed step before proceeding. Add a completion entry stating what changed,
11
+ what it resolved, verification and remaining limits. Record newly discovered work
12
+ and keep live acceptance unchecked until it actually runs.
13
+
14
+ ## Objective and evidence
15
+
16
+ Make Penpair's skills easier for Codex to select and follow when working with
17
+ Penpot designs, approved references and frontend comparison. Tradient's 0.3.0
18
+ trial showed that skills were loaded but their design guidance was underapplied.
19
+ Discovery, visible selection, evidence quality and human acceptance are separate.
20
+
21
+ The installed skills are valid in `.agents/skills`; relative symlinks work.
22
+ Codex selects implicitly from descriptions; optional `agents/openai.yaml` is not
23
+ a prerequisite. Official reference: [Codex skills](https://developers.openai.com/codex/skills/).
24
+
25
+ ## Discovered project context
26
+
27
+ | Area | Existing implementation / validation |
28
+ | --- | --- |
29
+ | Workspace | pnpm 10.12.1, six packages under `packages/`, all at 0.3.0 |
30
+ | Skill sources | `packages/core/skills/` |
31
+ | Installation / instructions | `packages/core/src/skills.ts`, `skill-instructions.ts` |
32
+ | CLI | `packages/core/src/cli-main.ts`; versioned result envelopes |
33
+ | Tests | Vitest; `packages/core/test/skills.test.ts`, `skill-instructions.test.ts` |
34
+ | Style / full check | `pnpm format`, `pnpm check` |
35
+ | Packaging | `pnpm smoke:package`; installs real tarballs in empty projects |
36
+ | CI | `.github/workflows/ci.yml`, full check plus package smoke |
37
+
38
+ ## Boundaries
39
+
40
+ - Neutral core and shipped skills; project/library knowledge stays in adapters
41
+ and consumer-owned facts. Preserve public imports and approval schemas.
42
+ - Preserve owner instructions outside the installer-owned block, partial skill
43
+ installs, modified skill files and project-owned facts.
44
+ - Skill selection grants no extra write permission. Preserve pinned targets,
45
+ positive independent readback, immutable approved baselines and owner approval.
46
+ - Diagnostics are offline and read-only. They cannot prove what a Codex session
47
+ loaded, predict its selection, inspect credentials or certify design quality.
48
+ - No version bumps, publication, merge or live Penpot writes in this work. The
49
+ owner authorized pushing the completed branch and opening its PR on 2026-10-23.
50
+ - Writer-marker recovery, repeated archive flags, bounded state-variant runtime
51
+ operations and performance instrumentation remain separate feedback work.
52
+
53
+ ## Checklist and acceptance
54
+
55
+ - [x] **S1 · Route tasks from generated instructions (P1).** Add concise,
56
+ actionable task-to-skill routing inside the owned instruction block. Include
57
+ only installed/selected skills, preserve custom text and relative links, and
58
+ load the applicable skill before tool work. Verify partial installs, nested
59
+ destinations, dry-run, repeated updates and existing preservation tests.
60
+ - [x] **S2 · Improve skill selection descriptions (P1).** Use ordinary Penpot,
61
+ approved-design, state-variant and frontend requests with clear boundaries.
62
+ Validate frontmatter, names, packaged references and neutral content. Do not
63
+ claim that metadata validation proves model behavior.
64
+ - [x] **S3 · Ship a focused verification skill (P1).** Add `penpair-verify` for
65
+ real frontend comparison, screenshot inspection, bounded fixes and reruns.
66
+ Route from design/handoff and retain separate readiness/approval stages. Fix
67
+ contradictory starter guidance. Verify installation and package enumeration.
68
+ - [x] **S4 · Record comparative evidence before expansion (P1).** Add a reusable
69
+ project-owned checkpoint format and skill workflow for source evidence,
70
+ preserved/changed regions, a representative candidate, consequential findings,
71
+ next action and review status. Missing evidence must remain pending. Whole-page
72
+ pixel equality is unsuitable for intentionally different states. Verify the
73
+ example, reference paths and reuse through the installed skill pack.
74
+ - [x] **S5 · Diagnose discovery and exercise realistic requests (P2).** Add
75
+ read-only `skills check` diagnostics for discoverable files, metadata, links
76
+ and project routing, with explicit limits. Cover missing, malformed, dangling,
77
+ divergent and disabled implicit invocation cases. Supply a reproducible prompt
78
+ trial matrix and record actual results separately from unevaluated fresh-model
79
+ trials. Test CLI results and ensure no connection/adapter execution or writes.
80
+ - [x] **S6 · Make selected skills visible and finish review (P2).** Add useful
81
+ Codex display metadata/example prompts and a concise selection announcement.
82
+ Keep implicit invocation enabled. Validate metadata and installed copies; run
83
+ full checks and all package smoke installs. Record final results and limits.
84
+
85
+ ## Validation and failure protocol
86
+
87
+ For each step, run the relevant existing tests plus meaningful regressions for
88
+ changed runtime behavior. Run `pnpm format` and `pnpm check` before committing
89
+ implementation. Run package smoke for the new skill and final package boundary.
90
+ Docs/metadata checks validate syntax, resources and preservation; they do not
91
+ substitute for observing a model handling a real request.
92
+
93
+ If a check fails, repair that step before checking its box. If live evidence or
94
+ an owner decision is unavailable, preserve the pending item and continue only
95
+ independent authorized work. Do not weaken guards or simulate owner approval.
96
+
97
+ ## Live acceptance
98
+
99
+ - [ ] Fresh Codex sessions: ordinary requests select the appropriate installed
100
+ skill and produce the required artifacts; record the actual loaded files.
101
+ - [ ] A representative approved-reference variant is visually critiqued before
102
+ expansion; owner reviews the result in a disposable authorized Penpot file.
103
+ - [ ] A consumer's implemented route completes real Reflection comparison with
104
+ approved references and independently observed browser state.
105
+
106
+ Live trials remain pending by owner instruction. No extra agents or API-backed
107
+ evaluation will be started without the required authorization.
108
+
109
+ ## Completion reports
110
+
111
+ - **PR handoff authorized · 2026-10-23.** Owner requested the branch push after
112
+ the final readiness review. Local validation remains complete and main's SHA
113
+ matches the reviewed base. Remote CI and owner merge review remain pending;
114
+ no publication or live acceptance is implied by opening the PR.
115
+
116
+ - **S6 completed · 2026-10-23.** Added Codex names, concise UI descriptions and
117
+ explicit starting prompts for all six skills, retaining implicit invocation.
118
+ Generated instructions ask for a brief selection announcement without treating
119
+ it as verification. Metadata parsing and installation checks pass; final package
120
+ smoke proves that metadata, checkpoint assets and `skills check` work from real
121
+ installed tarballs. Reviewed scope, neutral boundaries, preservation, approval
122
+ rules, local-command guidance and release notes. Final `pnpm check` passes
123
+ **680 package tests + 3 convention tests**; all six package smoke installs,
124
+ whitespace and exact-base PR release-note checks pass. Changesets proposes a
125
+ patch for all six packages; every actual version remains **0.3.0**. No push,
126
+ version bump, merge, publication, consumer modification or live Penpot write
127
+ occurred. Fresh-model and live acceptance remain unchecked above.
128
+
129
+ - **S5 completed · 2026-10-23.** Added offline `skills check` with versioned CLI
130
+ results: valid project discovery/routing returns 0; incomplete readiness returns
131
+ 3. Fourteen regressions cover partial and nested installs, instruction symlinks,
132
+ missing/malformed/oversized inputs, dangling/external links, conflicting copies,
133
+ modified files, disabled policy, resources, stale routes, no writes/extension
134
+ execution and no raw link-content echo. Added a nine-request natural-language
135
+ trial matrix and retained observed baseline skill reads separately from pending
136
+ fresh-model trials. A read-only Tradient check correctly reports its older
137
+ catalog-only routing and absent verification skill; no consumer files changed.
138
+ Full checks pass (679 package tests + 3 convention tests). Session selection,
139
+ global configuration and live visual quality are explicitly outside diagnostics.
140
+
141
+ - **S4 completed · 2026-10-23.** Added a shared visual checkpoint template and
142
+ source/candidate review procedure, routed through design, recipes, handoff and
143
+ verification. It records preserved regions and intended changes, actual images,
144
+ consequential findings, readiness and next action. Missing evidence blocks
145
+ expansion in the skill workflow; no runtime command claims to measure taste or
146
+ attest that an image was seen. Full checks pass (665 package tests + 3 convention
147
+ tests), packaged links resolve, and a disposable install proved that a copied
148
+ project-owned checkpoint survives forced skill refresh. Live critique remains
149
+ pending.
150
+
151
+ - **S3 completed · 2026-10-23.** Shipped `penpair-verify` as the sixth consumer
152
+ skill, with ordinary parity/fix triggers and design/handoff routing. It records
153
+ actual browser readiness, inspects images and recaptures scoped fixes without
154
+ changing references or granting approval. Corrected both stale claims that the
155
+ browser starter was still planned. Full checks pass (665 package tests + 3
156
+ convention tests); all six package smoke installs pass and the installed Codex
157
+ link resolves the new skill. Consumer browser/owner acceptance remains pending.
158
+
159
+ - **S2 completed · 2026-10-23.** Front-loaded everyday task descriptions now
160
+ distinguish design operations, state construction, design judgment and frontend
161
+ implementation. Replaced the installer's line regex with bounded YAML data
162
+ parsing so quoted/folded descriptions work and malformed or mismatched metadata
163
+ fails clearly. Reused the workspace's pinned YAML version as a core dependency.
164
+ Full checks pass: 665 package tests plus 3 convention tests, including 9 metadata
165
+ and packaged-resource checks. No fresh-model selection claim is made.
166
+
167
+ - **S1 completed · 2026-10-23.** Generated instructions now route matching tasks
168
+ to selected skills before tool work instead of presenting only a directory.
169
+ Partial installs emit no routes to unselected skills; nested encoded links
170
+ resolve, repeat installation is unchanged and owner text is preserved. Full
171
+ `pnpm check` passes: 656 package tests plus 3 convention tests. Selection and
172
+ correct application by a fresh model remain live acceptance, not a claim of
173
+ the installer.
174
+
175
+ - **Plan prepared · 2026-10-23.** Created the branch from merged main and mapped
176
+ all six proposed improvements to acceptance criteria and verification. The
177
+ prior release cleanup is merged and its continuation workflow succeeded;
178
+ package versions remain 0.3.0. No skill implementation has been checked off.
@@ -11,6 +11,27 @@ Without `--agents`, exactly one existing AGENTS.md or CLAUDE.md is selected. If
11
11
 
12
12
  The installer appends a skills section when needed or replaces only the contents between `<!-- penpair:skills:start -->` and `<!-- penpair:skills:end -->`. Existing text outside the owned region, including line endings, is preserved. Duplicate, reversed or unmatched markers stop installation before any skill files are written. An instruction file edited after planning is preserved; retry after reviewing its current contents. A repeat run with identical content is a no-op. Existing file permissions are retained.
13
13
 
14
+ The owned block includes task-to-skill routing as well as a skill directory. It
15
+ instructs the agent to read the relevant skill before tool work, and follows the
16
+ selected skills when `--only` is used. Installation does not guarantee that a
17
+ particular model will select or correctly apply a skill, and selecting a skill
18
+ grants no additional write permission.
19
+
20
+ Run `penpair skills check --json` for read-only Codex discovery/routing diagnostics
21
+ after a reviewed installation. Use repeated `--only NAME` for a partial install
22
+ and `--agents PATH` for its selected instruction destination. See
23
+ [skill validation](skill-validation.md) for results, limits and realistic model
24
+ invocation trials. Filesystem readiness does not prove correct agent behavior.
25
+
26
+ Bundled `agents/openai.yaml` files provide readable skill names, descriptions and
27
+ explicit starting prompts for Codex. Implicit invocation remains enabled; the
28
+ metadata is optional for discovery. Generated project instructions ask the agent
29
+ to briefly name the selected skill and its purpose. This makes intended use
30
+ visible without claiming a host-specific badge or completed verification. If a
31
+ new skill is absent from the host's available-skill list, check discovery first;
32
+ Codex normally detects changes automatically, with a restart as a fallback when
33
+ an update does not appear. See [official skill documentation](https://developers.openai.com/codex/skills/).
34
+
14
35
  Local outputs must remain inside the project after resolving existing symlinks. An instruction link escaping the project or a dangling link is refused. The resolved destination is shown so a project wrapper or shared in-project target is visible. These operations do not edit global agent configuration. Entry-point/output checks do not sandbox arbitrary extensions.
15
36
 
16
37
  Skill files modified by the project are kept unless `--force` is explicit. Project facts remain project-owned even with force, and rename migration preserves the prior facts. All writes are planned before execution, published as complete files, and instructions are written after skill copies/links. This is not a multi-file transaction: a filesystem failure or a concurrent owner edit can leave skill installation partly applied while preserving the instruction file. Review the report and rerun; unchanged files are skipped.
@@ -0,0 +1,86 @@
1
+ # Validate skill discovery and behavior
2
+
3
+ Installation, selection, workflow application, browser evidence and owner
4
+ acceptance are separate checks. Codex can load a skill without showing the
5
+ selection in the way a person expects, and can read a skill but underapply it.
6
+
7
+ ## Offline discovery
8
+
9
+ ```sh
10
+ pnpm exec penpair skills check --json
11
+ pnpm exec penpair skills check --only penpair-verify --agents AGENTS.md --json
12
+ ```
13
+
14
+ Exit 0 means the selected bundled skills have valid discoverable entrypoints,
15
+ allowed implicit invocation, resolvable local entrypoint resources and matching
16
+ links in the installer-owned task routes. Exit 3 means readiness is incomplete;
17
+ exit 1 indicates invalid arguments or an execution/configuration error. `--only`
18
+ can be repeated. Default selection is all bundled skills; partial installs should
19
+ select their intended subset explicitly.
20
+
21
+ The report distinguishes entrypoints matching the bundle from valid local
22
+ customizations. Different independent installed copies require review. Missing
23
+ optional `agents/openai.yaml` means implicit invocation is allowed by default;
24
+ an explicit false policy leaves explicit invocation available. The check reads
25
+ bounded regular project files, follows in-project links and refuses escapes.
26
+ It does not load adapters/providers, connect to Penpot, read credentials, write
27
+ repairs or inspect global agent settings.
28
+
29
+ The instruction check recognizes Penpair's generated owned task routes. It does
30
+ not interpret arbitrary custom routing prose. Preview updates with
31
+ `skills install --agents AGENTS.md --dry-run`, preserve intentional customizations
32
+ and project-owned facts, then apply the reviewed refresh. Diagnostics do not
33
+ override owner choices or silently enable disabled skills.
34
+
35
+ ## Realistic invocation trials
36
+
37
+ Run these in fresh Codex sessions in an authorized disposable consumer project.
38
+ Do not append skill names to the natural request. Supply actual reference IDs,
39
+ images, approved scope and case files where the task needs them. For a negative
40
+ case, keep Penpot/provider work out of scope. Each trial uses the same fixture and
41
+ records the actual outcome, including missing skills or unavailable tools.
42
+
43
+ | Natural request | Expected primary skill | Observable result |
44
+ | --- | --- | --- |
45
+ | Connect this project to Penpot; doctor cannot reach the editor. | penpair-setup | Diagnose the failed check; preserve personal credentials. |
46
+ | Inspect this Penpot frame and export its current design. | penpair-design | Pinned target, complete inspection and actual export. |
47
+ | Create an empty state from this approved Penpot screen. | penpair-recipes | Source evidence, declared regions, representative candidate and critique before expansion. |
48
+ | Implement this approved Penpot design in the frontend. | penpair-handoff | Explicit component mapping/unknowns and routed verification readiness. |
49
+ | Compare this running route with its approved design and fix the visual mismatches. | penpair-verify | Actual case setup/readback, screenshots, findings, scoped fixes and rerun. |
50
+ | Critique this screen's density and hierarchy. | design-judgment | Consequential findings grounded in the supplied image; no implicit Penpot writes. |
51
+ | Fix a backend calculation with no UI change. | none of these | No Penpot or comparison work added. |
52
+ | Explain this repository's release workflow. | none required | No design/browser workflow started. |
53
+ | Explain what Reflection Check does; do not run anything. | none required | Explanation respects the requested scope; no provider execution. |
54
+
55
+ For each case retain: request/context, visible skill catalog if available, actual
56
+ SKILL.md reads, selection announcement, relevant output/checkpoint, command
57
+ results and missing evidence. Record correct selection and correct application
58
+ separately. A badge, a stated intention, a keyword match or valid YAML proves
59
+ neither. If natural selection fails, repeat with explicit `$skill-name` to
60
+ distinguish discovery/selection from problems following the workflow. Record the
61
+ installed skill version; compare before/after under the same conditions.
62
+
63
+ Do not run live writes just to measure invocation. A read-only plan can establish
64
+ selection; authorized scratch trials establish mutation and visual behavior.
65
+ Missing tools, design references, browser providers or owner approval remain
66
+ pending instead of simulated success.
67
+
68
+ ## Results retained for this branch
69
+
70
+ - Baseline evidence: the earlier consumer conversations **Investigate Coinbase
71
+ futures setup** and **Upgrade Penpair and run trial** contain actual reads of
72
+ design/recipe/handoff skills and selection announcements after ordinary user
73
+ requests. This establishes prior use, not correct application or new-version
74
+ performance. No raw private conversation logs are copied into the repository.
75
+ - Automated tests cover successful and partial discovery, nested links, absent
76
+ files, malformed/oversized metadata, dangling/external links, conflicting copies,
77
+ preserved customization, disabled policy, missing resources and stale routing.
78
+ CLI results retain versioned envelopes and extension code remains unexecuted.
79
+ - [ ] Fresh-session trials of the changed skill pack: pending.
80
+ - [ ] Authorized live variant critique and real consumer browser comparison:
81
+ pending by owner instruction.
82
+
83
+ The [living implementation checklist](plans/skill-workflow-readiness.md) records
84
+ completed implementation, commands and remaining acceptance work. See
85
+ [official Codex skill documentation](https://developers.openai.com/codex/skills/)
86
+ for supported discovery locations, implicit selection and optional metadata.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@penpair/web",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "The penpair command for Penpot on the web (design.penpot.app or your team's own): guided setup, a safe write protocol, skills for AI agents. Includes everything in @penpair/core.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -48,7 +48,7 @@
48
48
  "access": "public"
49
49
  },
50
50
  "dependencies": {
51
- "@penpair/core": "0.3.0"
51
+ "@penpair/core": "0.3.1"
52
52
  },
53
53
  "scripts": {
54
54
  "build": "tsc -p tsconfig.json",