create-jay 0.25.2 → 0.25.4

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/dist/index.js CHANGED
@@ -265,10 +265,6 @@ async function scaffoldProject(projectDir, name, selectedPlugins) {
265
265
  writeFile(projectDir, "vite.config.ts", readTemplate("vite.config.ts"));
266
266
  writeFile(projectDir, "tsconfig.json", readTemplate("tsconfig.json"));
267
267
  writeFile(projectDir, "CLAUDE.md", readTemplate("CLAUDE.md"));
268
- const jaySkillPath = path.join(templatesDir(), "jay-skill.md");
269
- if (fs.existsSync(jaySkillPath)) {
270
- writeFile(projectDir, "jay-skill.md", fs.readFileSync(jaySkillPath, "utf-8"));
271
- }
272
268
  const hasDesignValidator = selectedPlugins.some(
273
269
  (p) => p.name === "@jay-framework/design-system-validator"
274
270
  );
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "create-jay",
3
- "version": "0.25.2",
3
+ "version": "0.25.4",
4
4
  "type": "module",
5
5
  "description": "Create a new Jay Stack project",
6
6
  "license": "Apache-2.0",
7
7
  "bin": "./dist/index.js",
8
8
  "files": [
9
9
  "dist",
10
- "templates"
10
+ "templates",
11
+ "skills"
11
12
  ],
12
13
  "scripts": {
13
14
  "build": "tsup",
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: jay
3
+ description: Create a new Jay Stack project from scratch — the preconditions to check first and the scaffolding command that generates a working project. Hands off to the in-project CLAUDE.md and agent-kit for actually building pages, components, and plugins.
4
+ ---
5
+
6
+ # Create a new Jay project
7
+
8
+ A short, ordered playbook for scaffolding a brand-new Jay Stack project. Use it when there is **no Jay
9
+ project yet** and you need to bootstrap one.
10
+
11
+ **Scope — bootstrapping only.** This skill gets a project onto disk and running. It does **not** teach
12
+ how to build pages, components, contracts, or plugins — that guidance ships _inside_ the scaffolded
13
+ project as `CLAUDE.md` plus the generated `agent-kit/` (designer / developer / plugin / devops role
14
+ guides). After scaffolding, read those.
15
+
16
+ ## 0 · Preconditions (check before scaffolding)
17
+
18
+ - **Node ≥ 20** — `node --version`. The scaffolder and CLI require it.
19
+ - **A package manager** — npm (bundled with Node) or Yarn. `npm create jay` auto-detects which one
20
+ invoked it and uses it for install.
21
+ - **For the AIditor (visual AI editor, included by default): Claude Code installed locally + an API
22
+ key.** The project ships with `@jay-framework/aiditor`, whose `/aiditor` route runs an agent
23
+ server-side via the Claude Agent SDK. Its authentication matches Claude Code: install the `claude`
24
+ CLI, then either set `ANTHROPIC_API_KEY` in the environment **or** run `claude login`. Without this
25
+ the project still scaffolds, builds, and runs — only the `/aiditor` route's agent won't run.
26
+
27
+ ## 1 · Scaffold the project
28
+
29
+ **Interactive** (prompts for a project name and a plugin selection):
30
+
31
+ ```bash
32
+ npm create jay@latest
33
+ # or: yarn create jay
34
+ # or: npx create-jay
35
+ ```
36
+
37
+ - **Project name** — lowercase letters, numbers, and hyphens; must start and end with a letter or
38
+ number; at least 3 characters (e.g. `my-store`).
39
+ - **Plugins** — a checklist (UI Kit, validators, Wix Stores/Members/Media/Data, etc.). Defaults are
40
+ pre-checked; accept them or adjust.
41
+
42
+ **Non-interactive** (CI / scripted — pass a name and an explicit, possibly empty, plugin list):
43
+
44
+ ```bash
45
+ # a few plugins by package name (comma-separated):
46
+ npm create jay@latest -- --name my-store --plugins "@jay-framework/ui-kit,@jay-framework/wix-stores"
47
+
48
+ # no optional plugins:
49
+ npm create jay@latest -- --name my-site --plugins ""
50
+ ```
51
+
52
+ The scaffolder then, in order: creates `./<name>/`, installs dependencies, generates the agent-kit
53
+ (`npx jay-stack-cli agent-kit`), and runs plugin setup (`npx jay-stack-cli setup`). A step that can't
54
+ complete non-interactively (e.g. a plugin needing credentials) is skipped with a note and can be re-run
55
+ later with `yarn setup`.
56
+
57
+ ## 2 · What you get
58
+
59
+ ```
60
+ my-store/
61
+ src/
62
+ pages/ # file-system routing — starts with a home page
63
+ page.jay-html
64
+ page.ts
65
+ page.jay-contract
66
+ styles/theme.css
67
+ .jay # project + plugin configuration
68
+ CLAUDE.md # in-project agent guidance — read this next
69
+ agent-kit/ # generated role guides + contract/plugin references
70
+ package.json # scripts: dev, setup, agent-kit, validate, build, serve
71
+ ```
72
+
73
+ ## 3 · First run
74
+
75
+ ```bash
76
+ cd my-store
77
+ yarn dev # or: npm run dev → dev server (and the /aiditor route)
78
+ ```
79
+
80
+ If plugin setup was skipped (missing credentials) run `yarn setup` to configure API keys, then
81
+ `yarn agent-kit` to refresh generated references.
82
+
83
+ ## 4 · Hand-off — build inside the project
84
+
85
+ Scaffolding is done. To actually build the site, switch to the in-project guidance:
86
+
87
+ 1. Read `CLAUDE.md` at the project root.
88
+ 2. Read `agent-kit/plugins-index.yaml` to see what plugins and contracts are available.
89
+ 3. Read the role guide that matches your task under `agent-kit/` — `designer/` (jay-html pages,
90
+ styling), `developer/` (`page.ts`, services, routing), `plugin/` (headless components, actions),
91
+ `devops/` (build, deploy, serve).
92
+
93
+ Run `yarn validate` after changes.
@@ -6,8 +6,15 @@ This is a Jay Stack project.
6
6
 
7
7
  Run `yarn setup` then `yarn agent-kit` to generate the agent kit.
8
8
 
9
- Read `agent-kit/` for contracts, plugin references, and role guides. See the `/jay` skill for full details on the agent kit structure, CLI commands, and project organization.
9
+ Read `agent-kit/` for contracts, plugin references, and role guides — this is the authoritative
10
+ guidance for the agent kit structure, CLI commands, and project organization.
10
11
 
11
12
  Before making changes, read `agent-kit/plugins-index.yaml` and the relevant role guide (`agent-kit/designer/`, `agent-kit/developer/`, etc.).
12
13
 
13
14
  Run `yarn validate` after changes.
15
+
16
+ ## Visual editing (AIditor)
17
+
18
+ This project includes the AIditor — a visual AI editor at the `/aiditor` route (`yarn dev`). It runs
19
+ an agent server-side via the Claude Agent SDK, so it **requires Claude Code installed locally with an
20
+ API key**: install the `claude` CLI, then either set `ANTHROPIC_API_KEY` or run `claude login`.
@@ -1,123 +0,0 @@
1
- ---
2
- name: jay
3
- description: Getting started with Jay Stack projects. Covers plugin setup, agent-kit generation, the four roles (designer, developer, plugin, devops), and key CLI commands.
4
- ---
5
-
6
- # Jay Stack — Agent Skill
7
-
8
- Jay Stack is a full-stack framework. Plugins provide headless components (data + logic, no UI). Designers build UI in jay-html templates that bind to plugin contracts. Developers write page logic and services.
9
-
10
- ## Getting Started with a Jay Project
11
-
12
- ### Step 1: Setup plugins
13
-
14
- ```bash
15
- yarn jay-stack-cli setup
16
- ```
17
-
18
- This configures plugins interactively — prompts for API keys and credentials, creates config files, validates services. Run this once when starting a new project or after adding a plugin. Use `--no-interactive` in CI/scripts to create config templates without prompting.
19
-
20
- ### Step 2: Generate the agent kit
21
-
22
- ```bash
23
- yarn jay-stack-cli agent-kit
24
- ```
25
-
26
- This materializes contracts, generates reference data, and copies role guides into `agent-kit/`. Run this after setup, or any time you need fresh contract data.
27
-
28
- ### Step 3: Read the agent kit
29
-
30
- The agent kit is your entry point. Start here:
31
-
32
- **`agent-kit/plugins-index.yaml`** — lists every plugin and what it provides:
33
-
34
- ```yaml
35
- plugins:
36
- - name: wix-stores
37
- contracts:
38
- - name: product-page
39
- description: Product detail page with SSR
40
- actions:
41
- - name: searchProducts
42
- description: Search the product catalog
43
- services:
44
- - name: products-db
45
- description: Product catalog API
46
- commands:
47
- - name: sync-catalog
48
- description: Sync product catalog from CMS
49
- ```
50
-
51
- Use this file to discover what's available before writing any code.
52
-
53
- **`agent-kit/materialized-contracts/`** — the actual `.jay-contract` files. Read these to understand the data shapes, rendering phases, and refs for each component.
54
-
55
- **`agent-kit/references/<plugin>/`** — pre-generated discovery data (product catalogs, collection schemas, etc.). Check here before running CLI commands — it's faster.
56
-
57
- ## The Four Roles
58
-
59
- The agent kit contains guides organized by role. Read the role that matches your task:
60
-
61
- | Folder | Role | When to read |
62
- | ---------------------- | ---------------- | ----------------------------------------------------------------- |
63
- | `agent-kit/designer/` | Designer | Creating or editing `.jay-html` pages, styling, template syntax |
64
- | `agent-kit/developer/` | Developer | Writing `page.ts` components, services, state management, routing |
65
- | `agent-kit/plugin/` | Plugin Developer | Creating headless components, contracts, actions, CLI commands |
66
- | `agent-kit/devops/` | DevOps | Building, deploying, serving in production, invalidation |
67
-
68
- Each folder has an `INSTRUCTIONS.md` that lists all available guides. Start there.
69
-
70
- ## Key CLI Commands
71
-
72
- ```bash
73
- # Development
74
- yarn jay-stack-cli dev # Start dev server
75
- yarn jay-stack-cli dev -v # Verbose mode
76
-
77
- # Validation
78
- yarn jay-stack-cli validate # Validate all jay-html, contracts, actions
79
-
80
- # Discovery
81
- yarn jay-stack-cli agent-kit --list # List available contracts
82
- yarn jay-stack-cli params <plugin>/<contract> # Discover URL params for a contract
83
- yarn jay-stack-cli action <plugin>/<action> --input '{}' # Run a plugin action
84
-
85
- # Plugin commands (admin/batch operations)
86
- yarn jay-stack-cli run --list # List available plugin commands
87
- yarn jay-stack-cli run <plugin>/<command> # Run a plugin command
88
-
89
- # Production
90
- yarn jay-stack-cli build # Build production artifacts
91
- yarn jay-stack-cli serve # Start production server
92
- ```
93
-
94
- ## Project Structure
95
-
96
- ```
97
- src/
98
- pages/ # File-system routing
99
- page.jay-html # Root page (/)
100
- products/
101
- page.jay-html # /products
102
- [slug]/
103
- page.jay-html # /products/:slug
104
- page.ts # Page component (optional)
105
- plugins/ # Local plugins
106
- components/ # Headfull components
107
- init.ts # Project service initialization
108
- agent-kit/ # Generated by jay-stack agent-kit
109
- plugins-index.yaml # Discovery index
110
- designer/ # Designer role guides
111
- developer/ # Developer role guides
112
- plugin/ # Plugin developer guides
113
- devops/ # DevOps guides
114
- materialized-contracts/
115
- references/
116
- ```
117
-
118
- ## Before Writing Code
119
-
120
- 1. Read `agent-kit/plugins-index.yaml` to see what plugins and contracts exist
121
- 2. Read the relevant contract file to understand the data shape
122
- 3. Read the role guide that matches your task (designer/developer/plugin/devops)
123
- 4. Check `agent-kit/references/<plugin>/` for pre-generated data before using CLI commands