Skip to content

Commit d8403e7

Browse files
committed
feat: harden AI prompts and inject strict v4 guidelines into LLM context files
1 parent cf6b185 commit d8403e7

5 files changed

Lines changed: 36 additions & 16 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,15 @@ export default defineConfig({
124124
items: [
125125
{
126126
text: "✦ Perplexity (Best)",
127-
link: `https://www.perplexity.ai/?q=Act+as+a+Senior+Expert+on+Create+Express+Forge+v4.+Read+https://code-y02.github.io/express-cli/llms-full.txt+and+answer+my+question+STRICTLY+following+v4+standards+(Biome,+Zod-to-OpenAPI,+ESM,+Functional+Helpers).+Ignore+legacy+v3+patterns.`,
127+
link: `https://www.perplexity.ai/?q=Act+as+a+Senior+Architect+for+Create+Express+Forge+v4.+You+MUST+read+https://code-y02.github.io/express-cli/llms-full.txt+and+answer+STRICTLY+based+on+it.+RULES:+Use+Biome+for+linting,+Zod-to-OpenAPI+for+docs,+and+Functional+Helpers+for+responses.+Ignore+v3+patterns.`,
128128
},
129129
{
130130
text: "Ask Claude",
131-
link: `https://claude.ai/new?q=Please+read+the+full+v4+documentation+for+Create+Express+Forge+at+https://code-y02.github.io/express-cli/llms-full.txt.+I+need+help+with+a+v4+project.+STRICT+REQUIREMENT:+Use+Biome+for+linting+and+Zod-to-OpenAPI+for+docs.+Do+not+suggest+ESLint+or+JSDoc.`,
131+
link: `https://claude.ai/new?q=Please+read+the+Create+Express+Forge+v4+documentation+at+https://code-y02.github.io/express-cli/llms-full.txt.+You+are+an+expert+on+this+framework.+STRICTLY+follow+v4+standards:+Biome,+Zod-to-OpenAPI,+and+ESM.+Do+not+suggest+legacy+v3+code.`,
132132
},
133133
{
134134
text: "Ask ChatGPT",
135-
link: `https://chatgpt.com/?q=You+are+the+official+AI+assistant+for+Create+Express+Forge+v4.+Context:+https://code-y02.github.io/express-cli/llms-full.txt.+Answer+my+question+using+v4+patterns+ONLY+(Functional+ApiResponse,+Biome,+Zod-to-OpenAPI).`,
135+
link: `https://chatgpt.com/?q=You+are+the+Senior+Architect+for+Create+Express+Forge+v4.+Context:+https://code-y02.github.io/express-cli/llms-full.txt.+Answer+my+question+using+v4+patterns+ONLY+(Functional+ApiResponse,+Biome,+Zod-to-OpenAPI).+Never+suggest+ESLint.`,
136136
},
137137
{
138138
text: "📄 Raw AI Context (llms-full.txt)",

docs/guide/ai-integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ A machine-readable manifest that describes the project's features, available com
5757
You can customize the AI behavior by modifying the `ai.json` file in your project root or by updating the MCP server settings.
5858

5959
::: tip PRO TIP
60-
If you are using Cursor, add `https://expressforge.com/llms.txt` to your `@docs` to give the AI agent full knowledge of the framework!
60+
If you are using Cursor, add `https://code-y02.github.io/express-cli/llms.txt` to your `@docs` to give the AI agent full knowledge of the framework!
6161
:::

docs/public/ai.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@
2424
"guide/troubleshooting",
2525
"reference/cli-options",
2626
"reference/config"
27-
]
27+
],
28+
"rules": {
29+
"linting": "biome",
30+
"formatting": "biome",
31+
"apiDocumentation": "zod-to-openapi",
32+
"moduleSystem": "esm",
33+
"packageManager": "pnpm"
34+
}
2835
},
2936
"v3": {
3037
"status": "lts",

docs/public/llms-full.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Create Express Forge v4.x (Latest) - Full Documentation
22

33
> [!IMPORTANT]
4-
> STRICT v4 GUIDELINES:
5-
> - Linter: Biome (NOT ESLint/Prettier)
6-
> - API Docs: Zod-to-OpenAPI (NOT JSDoc/@openapi)
7-
> - Architecture: Functional Helpers (NOT Classes for ApiResponse)
8-
> - Modules: ESM (NOT CommonJS)
4+
> YOU ARE A DOCUMENTATION-STRICT ASSISTANT.
5+
> - DOCUMENTATION SOURCE: https://code-y02.github.io/express-cli/llms-full.txt
6+
> - VERSION: v4.x (Latest)
7+
> - LINTER: Biome (Suggesting ESLint/Prettier is a FAILURE)
8+
> - API DOCS: Zod-to-OpenAPI (Suggesting JSDoc/@openapi is a FAILURE)
9+
> - RESPONSES: Functional Helpers (Suggesting ApiResponse Class is a FAILURE)
10+
> - MODULES: ESM (Suggesting CommonJS is a FAILURE)
11+
> - RULE: If info is missing, say "I don't know" and refer to docs. DO NOT HALUCINATE.
912

1013

1114

docs/scripts/generate-llms-docs.ts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,14 @@ async function generate() {
3030

3131
if (versionName.includes('v4')) {
3232
fullDocs += `> [!IMPORTANT]\n`;
33-
fullDocs += `> STRICT v4 GUIDELINES:\n`;
34-
fullDocs += `> - Linter: Biome (NOT ESLint/Prettier)\n`;
35-
fullDocs += `> - API Docs: Zod-to-OpenAPI (NOT JSDoc/@openapi)\n`;
36-
fullDocs += `> - Architecture: Functional Helpers (NOT Classes for ApiResponse)\n`;
37-
fullDocs += `> - Modules: ESM (NOT CommonJS)\n\n`;
33+
fullDocs += `> YOU ARE A DOCUMENTATION-STRICT ASSISTANT.\n`;
34+
fullDocs += `> - DOCUMENTATION SOURCE: https://code-y02.github.io/express-cli/llms-full.txt\n`;
35+
fullDocs += `> - VERSION: v4.x (Latest)\n`;
36+
fullDocs += `> - LINTER: Biome (Suggesting ESLint/Prettier is a FAILURE)\n`;
37+
fullDocs += `> - API DOCS: Zod-to-OpenAPI (Suggesting JSDoc/@openapi is a FAILURE)\n`;
38+
fullDocs += `> - RESPONSES: Functional Helpers (Suggesting ApiResponse Class is a FAILURE)\n`;
39+
fullDocs += `> - MODULES: ESM (Suggesting CommonJS is a FAILURE)\n`;
40+
fullDocs += `> - RULE: If info is missing, say "I don't know" and refer to docs. DO NOT HALUCINATE.\n\n`;
3841
}
3942

4043
for (const file of allFiles) {
@@ -93,7 +96,14 @@ npx create-express-forge@3.3.2 my-api
9396
v4: {
9497
status: "latest",
9598
fullDocs: "https://code-y02.github.io/express-cli/llms-full.txt",
96-
slugs: v4Slugs
99+
slugs: v4Slugs,
100+
rules: {
101+
linting: "biome",
102+
formatting: "biome",
103+
apiDocumentation: "zod-to-openapi",
104+
moduleSystem: "esm",
105+
packageManager: "pnpm",
106+
}
97107
},
98108
v3: {
99109
status: "lts",

0 commit comments

Comments
 (0)