Plugin Package Shipping Validation
Design Log #154 — Plugin Package Shipping Validation
Written for AI agents. See Log Methodology Note below for details.
Background
Plugins ship NPM packages with package.json controlling what files are included. The plugin-validator already checks that contracts appear in exports, but doesn't verify that agent-kit/ directories are included in the files array. This caused the design-system-validator plugin's agent-kit/designer/design-system.md to be silently excluded from the published package.
Related: #39 (Plugin package), #73 (validate command), #85 (agent-kit), #124 (contract consistency), #125 (plugin agent-kit).
Problem
A plugin can have an agent-kit/ directory with designer/developer guidance files, but if it's not listed in package.json files, those files won't be in the npm tarball. There's no validation catching this.
Concrete example: design-system-validator
// package.json — agent-kit/ NOT listed
"files": ["dist", "plugin.yaml"]
agent-kit/
designer/
design-system.md ← not shipped
Design
Add a check in validatePackageJson() (in plugin-validator):
- If
agent-kit/directory exists in the plugin root - Check that
"agent-kit"appears inpackageJson.files - If missing → emit warning with suggestion
Warning (not error) because the plugin still functions without agent-kit — it's a documentation/discoverability issue.
Implementation Plan
- Add check in
validatePackageJson()after existing exports checks - Add tests for the three cases (missing, present, no agent-kit dir)
- Fix
design-system-validatorpackage.json
Verification
- Plugin-validator tests pass
yarn validateindesign-system-validatorproduces no warnings about agent-kit
Log Methodology Note
Note: These design logs are written primarily for AI agents as part of the Design Log methodology and made accessible here for human readers. The language and structure are optimized for machine consumption — expect precise, specification-style prose rather than narrative documentation.