@plasmickit/cli 0.1.4 → 0.1.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmickit/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Plasmic skill bootstrap and NAS workflow resource manager",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -5,31 +5,15 @@ description: Inspect self-hosted Plasmic pages and templates, create or revise e
5
5
 
6
6
  # Plasmic
7
7
 
8
- This skill owns core constraints. Detailed workflows, component selection and usage guidance, and verification scripts live in a versioned resource bundle on the NAS, outside this installed skill.
8
+ This is the entrypoint for resolving current resources and selecting a workflow. Component rules, design conventions and acceptance procedures are maintained in the resolved references; read the relevant documents before acting.
9
9
 
10
- ## Client implementation boundary
11
-
12
- Use the published CLI, documented Desktop MCP tools and resolved skill resources with the task's requirements and design files. Do not unpack, extract or decompile the Plasmic App, or read its internal Desktop/Studio implementation, packaged dependencies, extracted/copied artifacts or equivalent client repository source. This prohibition applies to the acting agent, delegated agents and their tool scripts, including troubleshooting and contract or validator discovery.
13
-
14
- If public tool contracts or skill documents are insufficient, retain the exact call and error, stop dependent work and report the missing contract or documentation. Do not inspect client internals or reverse-engineer private interfaces to continue. Codegen may inspect and edit the target application's source within the user's task; this does not authorize reading the Plasmic client implementation.
15
-
16
- ## Component priority for prototype design
17
-
18
- Choose components before markup for every prototype creation or edit. Discover reusable business components/templates and library registrations through Desktop MCP by the required role, then read candidate contracts. Prefer an existing business component or matching template, then registered library components, then compositions of those components. Preserve the user's library choices and the target project's actual APIs; a template must fit the requirement. Do not install another library or add a Card merely to satisfy this preference.
19
-
20
- Use real Props, Slots, states and events for functional widgets, including actions, controls, navigation, repeated information, pagination, feedback and overlays. Do not redraw available components with HTML/CSS; visual similarity is not component reuse. Plain semantic text, necessary root/Slot/layout containers, genuine navigation anchors, read-only code and content graphics remain valid native elements; do not turn every text node or wrapper into a component or surface.
21
-
22
- Use a custom element widget only when verified current components and their supported compositions cannot express the required behavior. Before writing it, record the exact named node, checked candidates/contracts, concrete gap and requirement source in the task plan. An unread contract, absent import, rendering error, styling convenience or missing binding is not a capability gap. Correct usage or report the blocker; ordinary design work does not create a new component library. A fallback cannot override a required native identity, Form ownership or another acceptance gate.
23
-
24
- After resolving resources, use `references/libraries/index.md` for library/API matching and role-specific selection, and `references/requirement-alignment.md` for native-component inventories and the `elementFallbacks` format.
10
+ ## Resolve the workflow
25
11
 
26
- ## Prototype execution boundary
12
+ Choose `inspect` for read-only explanation/review, `prototype` for editable design creation or revision, or `codegen` for native application implementation.
27
13
 
28
- Keep generation plans, progress, pending cases and acceptance records in the agent's working directory. Use Desktop MCP for individual design/read/Preview operations, with their target, permission and context checks. Verification scripts read explicit evidence and write local reports; they do not register workflows, persist project bindings or restrict project navigation.
14
+ If this skill contains `local-source.json`, read its absolute `resolver` path and run `node RESOLVER_PATH --mode MODE`. This selects current local development resources. A missing resolver/resource is an error; do not fall back to published or cached resources.
29
15
 
30
- ## Task workflow
31
-
32
- Choose the task mode before work: `inspect` for read-only page/template explanation or design review, `prototype` for selecting/creating the design project and design edits, or `codegen` for native React implementation and updates. Run the matching command:
16
+ Otherwise run the matching published command:
33
17
 
34
18
  ```sh
35
19
  npx -y @plasmickit/cli@latest context resolve --mode inspect
@@ -37,14 +21,24 @@ npx -y @plasmickit/cli@latest context resolve --mode prototype
37
21
  npx -y @plasmickit/cli@latest context resolve --mode codegen
38
22
  ```
39
23
 
40
- Inspect uses accessible Desktop MCP reads and does not require edit permission or save/change designs. Prototype mutations require edit permission. Codegen reads models/contracts through MCP and writes code in the target architecture; it does not use `export_code` or official Plasmic sync. For explicitly requested official `@plasmicapp/cli` integration, resolve inspect and follow the guide's official-CLI reference instead of replacing that request with native coding.
24
+ Read every returned `mustRead` file, starting with `referencePath`. Resolve linked documents from the returned `resourceRoot`; follow the workflow's scenario-specific reading and evidence requirements. Resource readiness does not mean the documents have been read. For a task spanning modes, resolve and read each workflow before its work begins.
25
+
26
+ The published resolver checks the NAS release manifest and verifies resource hashes. Stop dependent work on failure; do not silently use stale references. If it requires a newer CLI before npm has that version, install its returned `cliUrl` and rerun. Relay meaningful preparation progress from stderr; stdout contains the result. Report local versus published resources accurately.
27
+
28
+ ## Prototype principles
29
+
30
+ Select components before composing markup. Discover existing business components and matching templates, prefer them and registered library components, and read their current Props, Slots and event contracts. Do not redraw available functional components with HTML/CSS. Follow `references/libraries/index.md` for selection and verified contract gaps.
41
31
 
42
- The command checks the NAS release manifest every time, downloads changed resources and verifies their hashes before returning absolute paths. Read all returned `mustRead` files, starting with `referencePath`; resolve subsequent links relative to the reference file. Use the returned `resourceRoot` for verification scripts and follow the guide's conditional section-reading/evidence rules. For a task spanning multiple modes, resolve and read each mode before its work begins.
32
+ For admin prototypes, read `references/admin-templates.md` and its catalog, inspect applicable live templates, then adapt the selected composition to the requirement. Read the relevant component and composition references before using them. A template or component must fit the current requirement and the project's actual library.
43
33
 
44
- Follow the resolved workflow for project selection, component discovery and acceptance; load detailed rules only for the affected scope. Switching from inspection to editing requires the corresponding user request and prototype workflow.
34
+ Use the selected workflow for source interpretation, project selection, editing and verification. Keep plans and acceptance evidence outside the business UI. Inspect is read-only; prototype mutations require edit permission. Codegen uses the target application's architecture and codegen workflow; an explicit official Plasmic CLI request follows the guide's official-CLI reference.
45
35
 
46
- The CLI streams preparation progress to stderr and returns JSON on stdout. Relay meaningful version/download/verification changes; use incremental output for a long-running command. Report waiting honestly when output is buffered. Resource readiness means files are available, not that they have been read or their workflow completed.
36
+ For prototype work, follow the workflow's execution-stage table. Derive observable acceptance cases from the current requirements before generation, prepare the current Page's detailed inputs, and retain actual gate/runtime results at each stage. Use existing preparation and verification commands; declarations, tool success and screenshots alone do not establish business acceptance.
37
+
38
+ Use the workflow's review-mode rules to prefer an independent subagent when available, otherwise perform the same checks in the current conversation and disclose the fallback.
39
+
40
+ ## Client implementation boundary
47
41
 
48
- The runner uses the latest published `@plasmickit/cli`, distinct from official `@plasmicapp/cli`. Later commands can use `npx -y @plasmickit/cli@<cliVersion>` from the result to keep the task on that CLI version, or the global `plasmickit` after checking `plasmickit version check`.
42
+ Use documented Desktop MCP tools and resolved skill resources. Do not unpack, decompile or inspect Plasmic App/Desktop/Studio internals, packaged dependencies, copied artifacts or equivalent client repository source, including through delegated agents or scripts. Codegen may inspect the target application's source within the user's scope.
49
43
 
50
- If the command fails, stop dependent work and report the error. Do not silently use cached references. If it requires a newer CLI before npm has that version, install the returned `cliUrl` with `npm install -g <cliUrl>` and rerun. Do not copy the resource bundle into this skill or treat an old transcript as the current component contract.
44
+ When public contracts or references are insufficient, retain the exact call/error, stop dependent work and report the missing contract. Do not reverse-engineer private interfaces to continue.