create-prisma-php-app 5.0.0-alpha.18 → 5.0.0-alpha.19

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.
Files changed (2) hide show
  1. package/dist/AGENTS.md +34 -56
  2. package/package.json +1 -1
package/dist/AGENTS.md CHANGED
@@ -2,67 +2,51 @@
2
2
 
3
3
  # Prisma PHP AI Agent Rules
4
4
 
5
- This repository is the Prisma PHP package and docs workspace, not a generated Prisma PHP application.
5
+ This AGENTS.md belongs in the root of a Prisma PHP application.
6
6
 
7
- Treat `dist/docs/index.md` as the entry point for Prisma PHP guidance in this repo, then read the matching document in `dist/docs` before generating, editing, reviewing, or documenting framework-specific behavior.
7
+ Treat `./node_modules/prisma-php/dist/docs/index.md` as the entry point for Prisma PHP guidance, then read the matching document in `./node_modules/prisma-php/dist/docs` before generating, editing, reviewing, or documenting framework-specific behavior.
8
8
 
9
- Do not guess framework behavior from Laravel, Next.js, React, Vue, Livewire, Alpine, Symfony, Socket.IO, or generic PHP habits. Prisma PHP's local docs and the current repository context are the source of truth.
9
+ Do not guess framework behavior from Laravel, Next.js, React, Vue, Livewire, Alpine, Symfony, Socket.IO, or generic PHP habits. Prisma PHP's installed docs in `./node_modules/prisma-php/dist/docs` and the current project files are the source of truth.
10
10
 
11
- ## Repository mode vs app mode
11
+ ## Documentation source of truth
12
12
 
13
- There are two valid Prisma PHP contexts, and AI must not mix them up.
14
-
15
- ### 1. Package/docs repo mode
16
-
17
- This workspace is package/docs repo mode.
18
-
19
- In this repo, use this order first:
13
+ For Prisma PHP projects, use this order first:
20
14
 
21
15
  1. the user's explicit request
22
- 2. `dist/docs/index.md`
23
- 3. the relevant document in `dist/docs`
24
- 4. `.github/copilot-instructions.md`
25
- 5. `package.json` and nearby repo files
26
- 6. Prisma PHP core internals only when the docs still leave a gap
16
+ 2. `./prisma-php.json`
17
+ 3. the relevant installed document in `./node_modules/prisma-php/dist/docs`
18
+ 4. `./AGENTS.md`
19
+ 5. project-local conventions and existing app files
20
+ 6. Prisma PHP core internals in `vendor/tsnc/prisma-php/src` only when the docs still leave a gap
27
21
  7. general framework knowledge as the last fallback
28
22
 
29
- Important repo-mode rules:
30
-
31
- - do not assume `./prisma-php.json` exists in this repository
32
- - do not assume `node_modules/prisma-php/dist/docs` is the active docs location for this workspace
33
- - do not assume `vendor/tsnc/prisma-php/src` exists locally in this workspace unless the task explicitly provides or references it
34
- - when editing or improving Prisma PHP guidance in this repo, keep `AGENTS.md`, `.github/copilot-instructions.md`, and `dist/docs` aligned with each other
35
- - keep each `dist/docs/*.md` page AI-discoverable on its own by making the frontmatter description and opening guidance explicit about when agents should read that file and which nearby docs to consult next
36
-
37
- ### 2. Consumer app mode
23
+ Important rules:
38
24
 
39
- When a task is about a generated Prisma PHP application rather than this package repo, use this app-mode order:
25
+ - treat `./node_modules/prisma-php/dist/docs` as the single documentation source of truth for the installed Prisma PHP version
26
+ - expect `./AGENTS.md` at the project root
27
+ - when the installed docs and a habit from another framework conflict, follow Prisma PHP
28
+ - when updating Prisma PHP package/docs sources, keep `AGENTS.md`, `.github/copilot-instructions.md`, and `dist/docs` aligned so the published docs stay correct after install
40
29
 
41
- 1. the user's explicit request
42
- 2. `./prisma-php.json`
43
- 3. installed Prisma PHP docs in `node_modules/prisma-php/dist/docs`
44
- 4. project-local conventions and existing app files
45
- 5. Prisma PHP core internals in `vendor/tsnc/prisma-php/src`
46
- 6. general framework knowledge
30
+ ## Installed docs location
47
31
 
48
- If a documented Prisma PHP rule conflicts with a habit from another framework, follow Prisma PHP.
32
+ In Prisma PHP applications, the installed docs live in:
49
33
 
50
- ## Source of truth in this repo
34
+ ```txt
35
+ node_modules/prisma-php/dist/docs
36
+ ```
51
37
 
52
- The Prisma PHP docs shipped in this repository live in:
38
+ The current docs entry point for the installed version is:
53
39
 
54
40
  ```txt
55
- dist/docs
41
+ node_modules/prisma-php/dist/docs/index.md
56
42
  ```
57
43
 
58
- The current docs entry point in this repository is:
44
+ The project root should also include:
59
45
 
60
46
  ```txt
61
- dist/docs/index.md
47
+ AGENTS.md
62
48
  ```
63
49
 
64
- When updating AI guidance for Prisma PHP itself, treat `dist/docs` as the authoritative local documentation surface for this workspace.
65
-
66
50
  ## Required doc-routing map
67
51
 
68
52
  Before generating code, examples, instructions, or reviews, choose the documentation file based on the task.
@@ -87,6 +71,9 @@ Before generating code, examples, instructions, or reviews, choose the documenta
87
71
  - **Creating, editing, composing, or reviewing PHPX components, props, children, fragments, icons, buttons, accordions, or component file placement**
88
72
  Read `components.md`
89
73
 
74
+ - **TypeScript frontend tooling, the `typescript` feature flag, the root `ts/` directory, `ts/main.ts`, npm packages, or registered browser helpers used from template expressions and PulsePoint scripts**
75
+ Read `typescript.md`, then use `pulsepoint.md`, `layouts-and-pages.md`, or `components.md` for the affected component boundary
76
+
90
77
  - **Loading data, calling backend logic from the frontend, `pp.fetchFunction(...)`, `#[Exposed]`, route-local mutations, streaming responses, or interactive backend validation**
91
78
  Read `fetching-data.md`
92
79
 
@@ -166,11 +153,12 @@ The current Prisma PHP docs shipped here include:
166
153
  - `pulsepoint.md`
167
154
  - `route-handlers.md`
168
155
  - `swagger-docs.md`
156
+ - `typescript.md`
169
157
  - `upgrading.md`
170
158
  - `validator.md`
171
159
  - `websocket.md`
172
160
 
173
- When adding or reviewing AI guidance, do not stop at older docs only. Make sure the guidance also covers `backend-only.md`, `email.md`, `env.md`, `get-started-ia.md`, `mcp.md`, `swagger-docs.md`, and `websocket.md`, plus newer behavior documented in `fetching-data.md` and `metadata-and-og-images.md`.
161
+ When adding or reviewing AI guidance, do not stop at older docs only. Make sure the guidance also covers `backend-only.md`, `email.md`, `env.md`, `get-started-ia.md`, `mcp.md`, `swagger-docs.md`, `typescript.md`, and `websocket.md`, plus newer behavior documented in `fetching-data.md` and `metadata-and-og-images.md`.
174
162
 
175
163
  ## Framework-generated files
176
164
 
@@ -270,7 +258,6 @@ Use this pattern:
270
258
  1. PHP first
271
259
  2. exactly one parent root element
272
260
  3. keep any component-local `<script>` inside that root element
273
- 4. let Prisma PHP inject `pp-component` for that boundary automatically
274
261
 
275
262
  Example:
276
263
 
@@ -281,7 +268,7 @@ Example:
281
268
 
282
269
  ?>
283
270
 
284
- <div>
271
+ <div pp-component="search-box">
285
272
  <h2>Search</h2>
286
273
  <input value="{query}" />
287
274
  <script>
@@ -361,20 +348,11 @@ In a consumer app, also verify `backendOnly` in `prisma-php.json`:
361
348
 
362
349
  Use this workflow unless the user asks for something narrower.
363
350
 
364
- ### For this repository
365
-
366
- 1. read `dist/docs/index.md`
367
- 2. read the relevant document in `dist/docs`
368
- 3. inspect nearby docs, examples, and guidance files in this repo
369
- 4. keep `AGENTS.md` and `.github/copilot-instructions.md` aligned with the documented behavior
370
- 5. inspect framework internals only when the docs still leave a real gap
371
-
372
- ### For consumer app examples or generated-app tasks
373
-
374
351
  1. read `./prisma-php.json`
375
- 2. read the relevant installed doc from `node_modules/prisma-php/dist/docs`
376
- 3. inspect nearby project files that match the route, feature, or component being changed
377
- 4. inspect `vendor/tsnc/prisma-php/src` only if the docs do not answer the task
352
+ 2. read the relevant installed doc from `./node_modules/prisma-php/dist/docs`
353
+ 3. inspect `./AGENTS.md` for project-level Prisma PHP guidance
354
+ 4. inspect nearby project files that match the route, feature, or component being changed
355
+ 5. inspect `vendor/tsnc/prisma-php/src` only if the docs do not answer the task
378
356
 
379
357
  Do not jump directly into framework internals if the current docs already answer the task.
380
358
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-prisma-php-app",
3
- "version": "5.0.0-alpha.18",
3
+ "version": "5.0.0-alpha.19",
4
4
  "description": "Prisma-PHP: A Revolutionary Library Bridging PHP with Prisma ORM",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",