Register the penpot tests in npm test, complete the extension README, and roll out #217
Labels
No labels
bug
chore
documentation
enhancement
feature
ready
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
david/pi-extensions-and-skills#217
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Register the penpot unit tests in the root
npm testscript, completeextensions/penpot/README.md(tool reference, environment variables, safety model), and roll the whole feature out perAGENTS.md: full suite green,install:localpreflight passing,/reloadshowing the tools and the skill, then the tracking issue → branch → commits → PR with a per-file summary.Background
Depends on: #213, #215, #206, #196
This is the last step and the only one that touches the package as a whole. Three loose ends converge here:
node --testfiles, butpackage.json'stestscript only runsscripts/local-install.test.mjsandextensions/learn-repo/*.test.ts. A test that is not in the script does not exist as far as CI and reviewers are concerned. The globs must be added only for directories that actually contain test files, because a glob matching nothing makesnode --testfail.AGENTS.md, this feature is issue-driven: tracking issue,feature/issue-<N>/<kebab-slug>branch, commitsissue-<N>: <summary>, PR titledissue-<N>: …withCloses #<N>and a per-file summary. Merging is the repo owner's decision, not the agent's — open the PR and ask; never merge on your own initiative, and in a non-interactive run (pi --print) stop at the PR rather than asking. An unanswered or ambiguous prompt is not consent.Documentation Required
A separate process downloads these into the listed folders before this issue is implemented. Check the folders for the actual reference material before starting.
docs/reference/pi-coding-agent/pi.extensions,pi.skills) and how npm scripts interact with a pi package, so thetestscript edit and the README claims stay accurate./reload)./skillsverification step.docs/reference/nodejs/node --testfile/glob arguments, and the failure mode when a glob matches nothing. This is why the added globs must correspond to real directories.docs/reference/penpot-api/Implementation Details
1. Register the tests
List what actually exists:
ls extensions/penpot/src/*.test.ts extensions/penpot/src/tools/*.test.ts 2>/dev/null.Append the surviving globs to
scripts.testin the rootpackage.json, e.g.:Add a directory's glob only when that directory contains at least one
*.test.ts; otherwise the runner fails on the empty match.Run
npm testand fix anything it uncovers. A test that fails here is a real defect: fix the code, not the assertion, unless the assertion itself is wrong — in which case say so explicitly in the PR body.2. Complete
extensions/penpot/README.mdPENPOT_URL(base URL, no/apisuffix; a trailing/apiis normalised away),PENPOT_TOKEN(personal access token, presented asAuthorization: Token <token>), where the token is created, that writes need project edit rights, and that the vendored reference is pinned to a specific Penpot version (skills/penpot/docs/VERSION).penpot_*tool with a one-line purpose and its key parameters. Generate the list from the code (grep -n 'name: "penpot_' extensions/penpot/src/tools/*.ts) rather than from memory, so the README cannot drift.penpot_commitas a singleupdate-filecall (one screen = one revision);revnis tracked by the extension because lagged writes are accepted by the server;penpot_discardclears staged work; success is confirmed by re-reading the file.penpot_authorize_target; refusals happen before any request; media uploads and library imports are immediate HTTP calls and say so.svg-rawfallback, single-level component instancing, noadd-componentover the API, no native design tokens, and font substitution when the instance lacks a family. Cross-referencefindings.mdfor the validated behaviour.3. Verify the package
npm test— green.npm run install:local— preflight still passes (it may warn about missingfj/rg/tokens; warnings are fine, failures are not)./reload, then confirm the penpot tools are callable and/skillslistspenpotwith its description.skills/penpot/(includingdocs/andassets/) is packaged.4. Roll out
Follow
AGENTS.mdfor thefeatureflow: create (or reuse) the tracking issue for this feature, branchfeature/issue-<N>/penpot-skill-extension, commit in coherent units withissue-<N>: <summary>messages, push, and open the PR titledissue-<N>: …whose body hasCloses #<N>and a per-file summary of the change..envmust never be committed andPENPOT_TOKENmust not appear in any committed file — checkgit diff --cachedbefore committing. Then ask the user whether to merge; skip the prompt only if merging was already requested explicitly, and in a non-interactive run stop at the PR.Acceptance Criteria
package.json'stestscript includes globs for exactly the penpot test directories that exist, andnpm testpasses.npm run install:localcompletes without a hard failure.extensions/penpot/README.mddocuments configuration, the full tool table, the staged-commit write model, the designated-target safety model, and the known limitations.penpot_*tool and no tool that does not exist (verified by grepping the code)./reload, the penpot tools are callable and/skillslistspenpot.git diff --cachedand the repo contain noPENPOT_TOKENvalue or.envfile.Closes #<N>, anissue-<N>: …title and a per-file summary in the body.Test Plan
Then in pi:
pi-loop opened and merged a pull request for this issue: #249