create-prisma-php-app 5.0.0-alpha.30 → 5.0.0-alpha.32
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/.github/copilot-instructions.md +12 -1
- package/dist/AGENTS.md +46 -12
- package/package.json +1 -1
|
@@ -2,12 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
## Source Of Truth
|
|
4
4
|
|
|
5
|
+
- Use `./prisma-php.json` as the single source of truth for which optional Prisma PHP features are enabled in the current app and which framework-managed scaffolds should exist.
|
|
5
6
|
- For Prisma PHP applications, treat `node_modules/prisma-php/dist/docs/index.md` as the entry point for the installed framework version.
|
|
7
|
+
- Treat `node_modules/prisma-php/dist/docs` as framework reference docs that teach AI how Prisma PHP works. The presence of a page in that docs folder does not mean the current workspace has that feature enabled.
|
|
6
8
|
- Read the matching doc in `node_modules/prisma-php/dist/docs` before generating or editing framework-specific Prisma PHP code.
|
|
7
9
|
- Expect `AGENTS.md` in the project root and keep it aligned with the installed Prisma PHP docs contract.
|
|
8
|
-
- In the Prisma PHP package source repo, keep `AGENTS.md`, `.github/copilot-instructions.md`, and `dist/docs` aligned so the published docs remain correct after install.
|
|
10
|
+
- In the Prisma PHP package source repo, keep `AGENTS.md`, `.github/copilot-instructions.md`, any `.github/instructions/**/*.instructions.md`, and `dist/docs` aligned so the published docs remain correct after install.
|
|
9
11
|
- Do not assume installed consumer apps also ship a root `.github/copilot-instructions.md` unless the generator explicitly creates one.
|
|
12
|
+
- If `.github/instructions/**/*.instructions.md` exists, treat those files as workspace-local task instructions for third-party libraries, component systems, icon packs, and other implementation-specific rules.
|
|
13
|
+
- Before generating or editing code, inspect `.github/instructions/` and read any `*.instructions.md` files that match the current task, named library, target files, or implementation surface.
|
|
10
14
|
- Keep every `dist/docs/*.md` page AI-discoverable on its own: the frontmatter description and opening section should clearly say when agents should read that file and which adjacent docs to consult next.
|
|
15
|
+
- When a task maps to an optional feature such as `backendOnly`, `swaggerDocs`, `typescript`, `websocket`, or `mcp`, inspect `./prisma-php.json` first, then read the matching docs page to learn the implementation contract.
|
|
16
|
+
|
|
17
|
+
## Workspace Task Instructions
|
|
18
|
+
|
|
19
|
+
- Treat `.github/instructions/**/*.instructions.md` as an optional task-specific extension of the Prisma PHP docs contract.
|
|
20
|
+
- Use those instruction files when the task mentions a library, pattern, or file surface they cover, such as a PHPXUI component library, `ppicons`, or another workspace-specific integration.
|
|
21
|
+
- Keep `./prisma-php.json` as the source of truth for Prisma PHP feature flags and generated scaffolds; use `.github/instructions/**/*.instructions.md` to refine task-specific implementation details and prefer the most specific matching instruction when more than one applies.
|
|
11
22
|
|
|
12
23
|
## Project Structure Recommendations
|
|
13
24
|
|
package/dist/AGENTS.md
CHANGED
|
@@ -6,26 +6,36 @@ This AGENTS.md belongs in the root of a Prisma PHP application.
|
|
|
6
6
|
|
|
7
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
|
+
Treat the installed docs as framework knowledge. They explain what Prisma PHP can do and how to do it. Do not treat the presence of a page in `./node_modules/prisma-php/dist/docs` as proof that the current app has that feature enabled.
|
|
10
|
+
|
|
9
11
|
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
12
|
|
|
13
|
+
If `.github/instructions/**/*.instructions.md` exists, treat those files as workspace-local task instructions. Inspect `.github/instructions/` before deciding how to implement the task, then read any instruction files whose name, described scope, target files, or library focus matches the current work, such as PHPXUI or `ppicons`.
|
|
14
|
+
|
|
11
15
|
## Documentation source of truth
|
|
12
16
|
|
|
13
17
|
For Prisma PHP projects, use this order first:
|
|
14
18
|
|
|
15
19
|
1. the user's explicit request
|
|
16
20
|
2. `./prisma-php.json`
|
|
17
|
-
3. the relevant
|
|
18
|
-
4. `./
|
|
19
|
-
5.
|
|
20
|
-
6.
|
|
21
|
-
7.
|
|
21
|
+
3. the relevant `.github/instructions/**/*.instructions.md` files for the current task, library, or target files
|
|
22
|
+
4. the relevant installed document in `./node_modules/prisma-php/dist/docs`
|
|
23
|
+
5. `./AGENTS.md`
|
|
24
|
+
6. project-local conventions and existing app files
|
|
25
|
+
7. Prisma PHP core internals in `vendor/tsnc/prisma-php/src` only when the docs still leave a gap
|
|
26
|
+
8. general framework knowledge as the last fallback
|
|
22
27
|
|
|
23
28
|
Important rules:
|
|
24
29
|
|
|
30
|
+
- use `./prisma-php.json` as the single source of truth for current-project feature flags and framework-managed scaffolds
|
|
31
|
+
- if `.github/instructions/**/*.instructions.md` exists, inspect `.github/instructions/` and read the files that match the current task, named library, or target files before generating code
|
|
32
|
+
- treat `.github/instructions/**/*.instructions.md` as workspace-local guidance for third-party libraries, design systems, icon packs, and other implementation-specific rules
|
|
25
33
|
- treat `./node_modules/prisma-php/dist/docs` as the single documentation source of truth for the installed Prisma PHP version
|
|
34
|
+
- treat the docs inventory as a framework reference set for AI routing, not as a statement that every optional Prisma PHP feature is enabled in the current app
|
|
26
35
|
- expect `./AGENTS.md` at the project root
|
|
27
36
|
- when the installed docs and a habit from another framework conflict, follow Prisma PHP
|
|
28
|
-
- when
|
|
37
|
+
- when a workspace instruction file and the general Prisma PHP docs both apply, follow both; keep `./prisma-php.json` as the source of truth for feature enablement and prefer the most specific matching instruction for library- or file-scoped implementation details
|
|
38
|
+
- when updating Prisma PHP package/docs sources, keep `AGENTS.md` and `dist/docs` aligned for consumer apps; if the Prisma PHP package source repo also maintains `.github/copilot-instructions.md` or `.github/instructions/**/*.instructions.md`, keep those source-repo files aligned there too
|
|
29
39
|
|
|
30
40
|
## Installed docs location
|
|
31
41
|
|
|
@@ -47,10 +57,29 @@ The project root should also include:
|
|
|
47
57
|
AGENTS.md
|
|
48
58
|
```
|
|
49
59
|
|
|
60
|
+
When present, task-scoped workspace instructions live in:
|
|
61
|
+
|
|
62
|
+
```txt
|
|
63
|
+
.github/instructions
|
|
64
|
+
```
|
|
65
|
+
|
|
50
66
|
## Required doc-routing map
|
|
51
67
|
|
|
52
68
|
Before generating code, examples, instructions, or reviews, choose the documentation file based on the task.
|
|
53
69
|
|
|
70
|
+
Use the docs router to learn how Prisma PHP implements a task. Use `./prisma-php.json` to decide whether the current app enables the relevant optional feature. When `.github/instructions/` exists, inspect that directory first and read any `*.instructions.md` files that match the task before routing into the Prisma PHP docs.
|
|
71
|
+
|
|
72
|
+
### Read workspace instruction files first for these tasks
|
|
73
|
+
|
|
74
|
+
- **Third-party UI, icon, component, or design-system work such as PHPXUI, `ppicons`, or similar workspace-specific integrations**
|
|
75
|
+
Read the matching `.github/instructions/**/*.instructions.md` file first
|
|
76
|
+
|
|
77
|
+
- **Tasks that target files, folders, or conventions covered by a workspace instruction file**
|
|
78
|
+
Read the most specific matching `.github/instructions/**/*.instructions.md` file first
|
|
79
|
+
|
|
80
|
+
- **Library-specific refactors, reviews, or implementations where the workspace provides a dedicated instruction file**
|
|
81
|
+
Read that instruction file first, then read the matching Prisma PHP docs page for framework behavior
|
|
82
|
+
|
|
54
83
|
### Read these docs first for these tasks
|
|
55
84
|
|
|
56
85
|
- **Framework orientation, repo-wide guidance, or the high-level AI quick start**
|
|
@@ -131,7 +160,7 @@ Before generating code, examples, instructions, or reviews, choose the documenta
|
|
|
131
160
|
- **First-time project installation or app creation flow**
|
|
132
161
|
Read `installation.md`
|
|
133
162
|
|
|
134
|
-
##
|
|
163
|
+
## Framework docs inventory in this repo
|
|
135
164
|
|
|
136
165
|
The current Prisma PHP docs shipped here include:
|
|
137
166
|
|
|
@@ -162,6 +191,10 @@ The current Prisma PHP docs shipped here include:
|
|
|
162
191
|
- `validator.md`
|
|
163
192
|
- `websocket.md`
|
|
164
193
|
|
|
194
|
+
This inventory exists to help AI find the right Prisma PHP guidance quickly. It is not a feature inventory for the current app.
|
|
195
|
+
|
|
196
|
+
When a task depends on optional capabilities such as `backendOnly`, `swaggerDocs`, `typescript`, `websocket`, or `mcp`, inspect `./prisma-php.json` before assuming the generated scaffold exists.
|
|
197
|
+
|
|
165
198
|
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`.
|
|
166
199
|
|
|
167
200
|
## Framework-generated files
|
|
@@ -394,12 +427,13 @@ In a consumer app, also verify `backendOnly` in `prisma-php.json`:
|
|
|
394
427
|
Use this workflow unless the user asks for something narrower.
|
|
395
428
|
|
|
396
429
|
1. read `./prisma-php.json`
|
|
397
|
-
2. read
|
|
398
|
-
3.
|
|
399
|
-
4. inspect
|
|
400
|
-
5. inspect
|
|
430
|
+
2. inspect `.github/instructions/` and read any relevant `*.instructions.md` files when that directory exists
|
|
431
|
+
3. read the relevant installed doc from `./node_modules/prisma-php/dist/docs`
|
|
432
|
+
4. inspect `./AGENTS.md` for project-level Prisma PHP guidance
|
|
433
|
+
5. inspect nearby project files that match the route, feature, or component being changed
|
|
434
|
+
6. inspect `vendor/tsnc/prisma-php/src` only if the docs and matching workspace instructions do not answer the task
|
|
401
435
|
|
|
402
|
-
Do not jump directly into framework internals if the current docs already answer the task.
|
|
436
|
+
Do not jump directly into framework internals if the current docs and matching workspace instruction files already answer the task.
|
|
403
437
|
|
|
404
438
|
## Authentication rules
|
|
405
439
|
|