claudeship 0.2.24 → 0.2.25
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/apps/server/dist/chat/chat.module.js +8 -1
- package/apps/server/dist/chat/chat.module.js.map +1 -1
- package/apps/server/dist/chat/chat.service.d.ts +5 -1
- package/apps/server/dist/chat/chat.service.js +35 -4
- package/apps/server/dist/chat/chat.service.js.map +1 -1
- package/apps/server/dist/chat/framework-detector.service.d.ts +17 -0
- package/apps/server/dist/chat/framework-detector.service.js +193 -0
- package/apps/server/dist/chat/framework-detector.service.js.map +1 -0
- package/apps/server/dist/chat/prompts/backend/django.d.ts +1 -0
- package/apps/server/dist/chat/prompts/backend/django.js +207 -0
- package/apps/server/dist/chat/prompts/backend/django.js.map +1 -0
- package/apps/server/dist/chat/prompts/backend/express.d.ts +1 -0
- package/apps/server/dist/chat/prompts/backend/express.js +260 -0
- package/apps/server/dist/chat/prompts/backend/express.js.map +1 -0
- package/apps/server/dist/chat/prompts/backend/fastapi.d.ts +1 -0
- package/apps/server/dist/chat/prompts/backend/fastapi.js +246 -0
- package/apps/server/dist/chat/prompts/backend/fastapi.js.map +1 -0
- package/apps/server/dist/chat/prompts/backend/index.d.ts +4 -0
- package/apps/server/dist/chat/prompts/backend/index.js +12 -0
- package/apps/server/dist/chat/prompts/backend/index.js.map +1 -0
- package/apps/server/dist/chat/prompts/backend/nestjs.d.ts +1 -0
- package/apps/server/dist/chat/prompts/backend/nestjs.js +270 -0
- package/apps/server/dist/chat/prompts/backend/nestjs.js.map +1 -0
- package/apps/server/dist/chat/prompts/frontend/expo.d.ts +1 -0
- package/apps/server/dist/chat/prompts/frontend/expo.js +208 -0
- package/apps/server/dist/chat/prompts/frontend/expo.js.map +1 -0
- package/apps/server/dist/chat/prompts/frontend/flutter.d.ts +1 -0
- package/apps/server/dist/chat/prompts/frontend/flutter.js +271 -0
- package/apps/server/dist/chat/prompts/frontend/flutter.js.map +1 -0
- package/apps/server/dist/chat/prompts/frontend/index.d.ts +4 -0
- package/apps/server/dist/chat/prompts/frontend/index.js +12 -0
- package/apps/server/dist/chat/prompts/frontend/index.js.map +1 -0
- package/apps/server/dist/chat/prompts/frontend/nextjs.d.ts +1 -0
- package/apps/server/dist/chat/prompts/frontend/nextjs.js +195 -0
- package/apps/server/dist/chat/prompts/frontend/nextjs.js.map +1 -0
- package/apps/server/dist/chat/prompts/frontend/react-native.d.ts +1 -0
- package/apps/server/dist/chat/prompts/frontend/react-native.js +224 -0
- package/apps/server/dist/chat/prompts/frontend/react-native.js.map +1 -0
- package/apps/server/dist/chat/prompts/frontend/react-vite.d.ts +1 -0
- package/apps/server/dist/chat/prompts/frontend/react-vite.js +187 -0
- package/apps/server/dist/chat/prompts/frontend/react-vite.js.map +1 -0
- package/apps/server/dist/chat/prompts/frontend/svelte.d.ts +1 -0
- package/apps/server/dist/chat/prompts/frontend/svelte.js +255 -0
- package/apps/server/dist/chat/prompts/frontend/svelte.js.map +1 -0
- package/apps/server/dist/chat/prompts/frontend/vue.d.ts +1 -0
- package/apps/server/dist/chat/prompts/frontend/vue.js +267 -0
- package/apps/server/dist/chat/prompts/frontend/vue.js.map +1 -0
- package/apps/server/dist/chat/prompts/index.d.ts +4 -0
- package/apps/server/dist/chat/prompts/index.js +20 -1
- package/apps/server/dist/chat/prompts/index.js.map +1 -1
- package/apps/server/dist/chat/prompts/prompt-builder.service.d.ts +15 -0
- package/apps/server/dist/chat/prompts/prompt-builder.service.js +177 -0
- package/apps/server/dist/chat/prompts/prompt-builder.service.js.map +1 -0
- package/apps/server/dist/chat/prompts/sections/core.d.ts +9 -0
- package/apps/server/dist/chat/prompts/sections/core.js +149 -0
- package/apps/server/dist/chat/prompts/sections/core.js.map +1 -0
- package/apps/server/dist/project/project.controller.d.ts +6 -0
- package/apps/server/dist/project/project.service.d.ts +6 -0
- package/apps/server/dist/tsconfig.tsbuildinfo +1 -1
- package/apps/server/package.json +1 -1
- package/apps/server/prisma/dev.db +0 -0
- package/apps/server/prisma/migrations/20260127071040_add_frontend_framework/migration.sql +24 -0
- package/apps/server/prisma/migrations/20260127071520_add_app_type_and_mobile/migration.sql +25 -0
- package/apps/server/prisma/schema.prisma +33 -5
- package/apps/web/.next/BUILD_ID +1 -1
- package/apps/web/.next/app-build-manifest.json +5 -3
- package/apps/web/.next/build-manifest.json +2 -2
- package/apps/web/.next/cache/.previewinfo +1 -1
- package/apps/web/.next/cache/.rscinfo +1 -1
- package/apps/web/.next/cache/.tsbuildinfo +1 -1
- package/apps/web/.next/cache/config.json +3 -3
- package/apps/web/.next/cache/eslint/.cache_j3uhuz +1 -1
- package/apps/web/.next/cache/webpack/client-production/0.pack +0 -0
- package/apps/web/.next/cache/webpack/client-production/index.pack +0 -0
- package/apps/web/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/apps/web/.next/cache/webpack/server-production/0.pack +0 -0
- package/apps/web/.next/cache/webpack/server-production/index.pack +0 -0
- package/apps/web/.next/prerender-manifest.json +3 -3
- package/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/apps/web/.next/server/app/_not-found.html +1 -1
- package/apps/web/.next/server/app/_not-found.rsc +2 -2
- package/apps/web/.next/server/app/index.html +1 -1
- package/apps/web/.next/server/app/index.rsc +3 -3
- package/apps/web/.next/server/app/page.js +2 -2
- package/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/apps/web/.next/server/app/project/[id]/page.js +2 -2
- package/apps/web/.next/server/app/project/[id]/page_client-reference-manifest.js +1 -1
- package/apps/web/.next/server/app/settings/page.js +1 -1
- package/apps/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/apps/web/.next/server/app/settings.html +1 -1
- package/apps/web/.next/server/app/settings.rsc +2 -2
- package/apps/web/.next/server/pages/404.html +1 -1
- package/apps/web/.next/server/pages/500.html +1 -1
- package/apps/web/.next/server/server-reference-manifest.json +1 -1
- package/apps/web/.next/static/chunks/18-22b1cf4231121555.js +1 -0
- package/apps/web/.next/static/chunks/app/page-6ea560755549086e.js +1 -0
- package/apps/web/.next/static/chunks/app/project/[id]/page-3e4777b355c4aec9.js +1 -0
- package/apps/web/.next/static/css/45ddb08a7b4470d5.css +3 -0
- package/apps/web/.next/trace +18 -18
- package/apps/web/package.json +1 -1
- package/apps/web/src/app/page.tsx +2 -5
- package/apps/web/src/components/project/CreateProjectModal.tsx +175 -80
- package/apps/web/src/components/project/ProjectCard.tsx +122 -31
- package/apps/web/src/stores/useProjectStore.ts +2 -1
- package/package.json +1 -1
- package/packages/shared/src/index.ts +1 -0
- package/packages/shared/src/types/project.ts +18 -3
- package/packages/shared/src/types/tech-stack.ts +74 -0
- package/apps/web/.next/static/chunks/app/page-f73b6424c8cbf96d.js +0 -1
- package/apps/web/.next/static/chunks/app/project/[id]/page-e9304c25ba897608.js +0 -1
- package/apps/web/.next/static/css/70f2a13cf3d254d8.css +0 -3
- /package/apps/web/.next/static/{fQQI0X4R8kXYUbd-0V8mo → IMWKpuHss3gLOeJ7K93sg}/_buildManifest.js +0 -0
- /package/apps/web/.next/static/{fQQI0X4R8kXYUbd-0V8mo → IMWKpuHss3gLOeJ7K93sg}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PromptBuilderService = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const client_1 = require("@prisma/client");
|
|
12
|
+
const core_1 = require("./sections/core");
|
|
13
|
+
const react_vite_1 = require("./frontend/react-vite");
|
|
14
|
+
const nextjs_1 = require("./frontend/nextjs");
|
|
15
|
+
const vue_1 = require("./frontend/vue");
|
|
16
|
+
const svelte_1 = require("./frontend/svelte");
|
|
17
|
+
const react_native_1 = require("./frontend/react-native");
|
|
18
|
+
const expo_1 = require("./frontend/expo");
|
|
19
|
+
const flutter_1 = require("./frontend/flutter");
|
|
20
|
+
const express_1 = require("./backend/express");
|
|
21
|
+
const fastapi_1 = require("./backend/fastapi");
|
|
22
|
+
const django_1 = require("./backend/django");
|
|
23
|
+
const nestjs_1 = require("./backend/nestjs");
|
|
24
|
+
let PromptBuilderService = class PromptBuilderService {
|
|
25
|
+
build(config) {
|
|
26
|
+
const sections = [];
|
|
27
|
+
sections.push(this.buildIntroSection(config));
|
|
28
|
+
sections.push(core_1.CORE_PRINCIPLES);
|
|
29
|
+
sections.push(core_1.REQUIREMENTS_CLARIFICATION);
|
|
30
|
+
sections.push(core_1.INCREMENTAL_BUILDING);
|
|
31
|
+
const frontendPrompt = this.getFrontendPrompt(config.frontendFramework);
|
|
32
|
+
if (frontendPrompt) {
|
|
33
|
+
sections.push(frontendPrompt);
|
|
34
|
+
}
|
|
35
|
+
const backendPrompt = this.getBackendPrompt(config.backendFramework);
|
|
36
|
+
if (backendPrompt) {
|
|
37
|
+
sections.push(backendPrompt);
|
|
38
|
+
}
|
|
39
|
+
if (config.frontendFramework !== client_1.FrontendFramework.NONE &&
|
|
40
|
+
config.backendFramework !== client_1.BackendFramework.NONE) {
|
|
41
|
+
sections.push(this.buildFullstackGuide(config));
|
|
42
|
+
}
|
|
43
|
+
sections.push(core_1.CONTENT_GUIDELINES);
|
|
44
|
+
sections.push(core_1.CLEAN_CODE_PRINCIPLES);
|
|
45
|
+
sections.push(core_1.RESPONSE_FORMAT);
|
|
46
|
+
sections.push(core_1.SERVER_RESTRICTIONS);
|
|
47
|
+
sections.push(core_1.PREVIEW_RESTART);
|
|
48
|
+
sections.push(core_1.DEBUGGING_PROCESS);
|
|
49
|
+
return sections.join("\n\n---\n\n");
|
|
50
|
+
}
|
|
51
|
+
buildIntroSection(config) {
|
|
52
|
+
const frontendName = this.getFrontendFrameworkName(config.frontendFramework);
|
|
53
|
+
const backendName = this.getBackendFrameworkName(config.backendFramework);
|
|
54
|
+
let intro = `# Project Configuration\n\n`;
|
|
55
|
+
if (config.frontendFramework !== client_1.FrontendFramework.NONE &&
|
|
56
|
+
config.backendFramework !== client_1.BackendFramework.NONE) {
|
|
57
|
+
intro += `You are building a **full-stack application** with:\n`;
|
|
58
|
+
intro += `- **Frontend**: ${frontendName}\n`;
|
|
59
|
+
intro += `- **Backend**: ${backendName}\n\n`;
|
|
60
|
+
intro += `**CRITICAL**: Complete BOTH frontend AND backend before reporting completion.`;
|
|
61
|
+
}
|
|
62
|
+
else if (config.frontendFramework !== client_1.FrontendFramework.NONE) {
|
|
63
|
+
intro += `You are building a **frontend-only application** with:\n`;
|
|
64
|
+
intro += `- **Framework**: ${frontendName}\n\n`;
|
|
65
|
+
intro += `Focus on creating a beautiful, responsive, and functional frontend.`;
|
|
66
|
+
}
|
|
67
|
+
else if (config.backendFramework !== client_1.BackendFramework.NONE) {
|
|
68
|
+
intro += `You are building a **backend-only API** with:\n`;
|
|
69
|
+
intro += `- **Framework**: ${backendName}\n\n`;
|
|
70
|
+
intro += `Focus on creating a robust, well-documented API.`;
|
|
71
|
+
}
|
|
72
|
+
return intro;
|
|
73
|
+
}
|
|
74
|
+
buildFullstackGuide(config) {
|
|
75
|
+
return `## Full-stack Project Structure
|
|
76
|
+
|
|
77
|
+
\`\`\`
|
|
78
|
+
project/
|
|
79
|
+
├── frontend/ # Frontend application
|
|
80
|
+
│ ├── src/
|
|
81
|
+
│ ├── package.json
|
|
82
|
+
│ └── ...
|
|
83
|
+
├── backend/ # Backend server
|
|
84
|
+
│ ├── src/
|
|
85
|
+
│ ├── package.json (or requirements.txt)
|
|
86
|
+
│ └── ...
|
|
87
|
+
└── README.md
|
|
88
|
+
\`\`\`
|
|
89
|
+
|
|
90
|
+
### Critical Requirements
|
|
91
|
+
|
|
92
|
+
1. **Both directories must exist** with proper configuration files
|
|
93
|
+
2. **Frontend API client** must be configured to call backend API
|
|
94
|
+
3. **CORS** must be configured on the backend
|
|
95
|
+
4. **Environment variables** must be set for API URLs
|
|
96
|
+
|
|
97
|
+
### Build Order for Full-stack
|
|
98
|
+
|
|
99
|
+
1. Create backend first (API, database schema, routes)
|
|
100
|
+
2. Create frontend second (UI, API client, pages)
|
|
101
|
+
3. Verify both have package.json with dev scripts
|
|
102
|
+
4. Only then report completion`;
|
|
103
|
+
}
|
|
104
|
+
getFrontendPrompt(framework) {
|
|
105
|
+
switch (framework) {
|
|
106
|
+
case client_1.FrontendFramework.REACT_VITE:
|
|
107
|
+
return react_vite_1.REACT_VITE_PROMPT;
|
|
108
|
+
case client_1.FrontendFramework.NEXTJS:
|
|
109
|
+
return nextjs_1.NEXTJS_PROMPT;
|
|
110
|
+
case client_1.FrontendFramework.VUE:
|
|
111
|
+
return vue_1.VUE_PROMPT;
|
|
112
|
+
case client_1.FrontendFramework.SVELTE:
|
|
113
|
+
return svelte_1.SVELTE_PROMPT;
|
|
114
|
+
case client_1.FrontendFramework.REACT_NATIVE:
|
|
115
|
+
return react_native_1.REACT_NATIVE_PROMPT;
|
|
116
|
+
case client_1.FrontendFramework.EXPO:
|
|
117
|
+
return expo_1.EXPO_PROMPT;
|
|
118
|
+
case client_1.FrontendFramework.FLUTTER:
|
|
119
|
+
return flutter_1.FLUTTER_PROMPT;
|
|
120
|
+
case client_1.FrontendFramework.NONE:
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
getBackendPrompt(framework) {
|
|
125
|
+
switch (framework) {
|
|
126
|
+
case client_1.BackendFramework.EXPRESS:
|
|
127
|
+
return express_1.EXPRESS_PROMPT;
|
|
128
|
+
case client_1.BackendFramework.FASTAPI:
|
|
129
|
+
return fastapi_1.FASTAPI_PROMPT;
|
|
130
|
+
case client_1.BackendFramework.DJANGO:
|
|
131
|
+
return django_1.DJANGO_PROMPT;
|
|
132
|
+
case client_1.BackendFramework.NESTJS:
|
|
133
|
+
return nestjs_1.NESTJS_PROMPT;
|
|
134
|
+
case client_1.BackendFramework.NONE:
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
getFrontendFrameworkName(framework) {
|
|
139
|
+
switch (framework) {
|
|
140
|
+
case client_1.FrontendFramework.REACT_VITE:
|
|
141
|
+
return "React + Vite + Tailwind CSS";
|
|
142
|
+
case client_1.FrontendFramework.NEXTJS:
|
|
143
|
+
return "Next.js + Tailwind CSS";
|
|
144
|
+
case client_1.FrontendFramework.VUE:
|
|
145
|
+
return "Vue 3 + Vite + Tailwind CSS";
|
|
146
|
+
case client_1.FrontendFramework.SVELTE:
|
|
147
|
+
return "SvelteKit + Tailwind CSS";
|
|
148
|
+
case client_1.FrontendFramework.REACT_NATIVE:
|
|
149
|
+
return "React Native";
|
|
150
|
+
case client_1.FrontendFramework.EXPO:
|
|
151
|
+
return "Expo (React Native)";
|
|
152
|
+
case client_1.FrontendFramework.FLUTTER:
|
|
153
|
+
return "Flutter (Dart)";
|
|
154
|
+
case client_1.FrontendFramework.NONE:
|
|
155
|
+
return "None";
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
getBackendFrameworkName(framework) {
|
|
159
|
+
switch (framework) {
|
|
160
|
+
case client_1.BackendFramework.EXPRESS:
|
|
161
|
+
return "Express + TypeScript + Prisma";
|
|
162
|
+
case client_1.BackendFramework.FASTAPI:
|
|
163
|
+
return "FastAPI + Python + SQLAlchemy";
|
|
164
|
+
case client_1.BackendFramework.DJANGO:
|
|
165
|
+
return "Django + Django REST Framework";
|
|
166
|
+
case client_1.BackendFramework.NESTJS:
|
|
167
|
+
return "NestJS + TypeScript + Prisma";
|
|
168
|
+
case client_1.BackendFramework.NONE:
|
|
169
|
+
return "None";
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
exports.PromptBuilderService = PromptBuilderService;
|
|
174
|
+
exports.PromptBuilderService = PromptBuilderService = __decorate([
|
|
175
|
+
(0, common_1.Injectable)()
|
|
176
|
+
], PromptBuilderService);
|
|
177
|
+
//# sourceMappingURL=prompt-builder.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-builder.service.js","sourceRoot":"","sources":["../../../src/chat/prompts/prompt-builder.service.ts"],"names":[],"mappings":";;;;;;;;;AAMA,2CAA4C;AAC5C,2CAAqE;AAGrE,0CAUyB;AAGzB,sDAA0D;AAC1D,8CAAkD;AAClD,wCAA4C;AAC5C,8CAAkD;AAGlD,0DAA8D;AAC9D,0CAA8C;AAC9C,gDAAoD;AAGpD,+CAAmD;AACnD,+CAAmD;AACnD,6CAAiD;AACjD,6CAAiD;AAS1C,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAI/B,KAAK,CAAC,MAA2B;QAC/B,MAAM,QAAQ,GAAa,EAAE,CAAC;QAG9B,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;QAG9C,QAAQ,CAAC,IAAI,CAAC,sBAAe,CAAC,CAAC;QAC/B,QAAQ,CAAC,IAAI,CAAC,iCAA0B,CAAC,CAAC;QAC1C,QAAQ,CAAC,IAAI,CAAC,2BAAoB,CAAC,CAAC;QAGpC,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;QACxE,IAAI,cAAc,EAAE,CAAC;YACnB,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAChC,CAAC;QAGD,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC;QACr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,GAAE;GACA,oBAAoB,CA+MhC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const CORE_PRINCIPLES = "## Core Principles\n\n1. **Always Deliver Working Apps**: Every response should result in a runnable application\n2. **Beautiful by Default**: Use modern UI patterns with appropriate UI components\n3. **Complete Implementation**: Include all necessary files, not just snippets\n4. **User Experience First**: Add loading states, error handling, and smooth interactions";
|
|
2
|
+
export declare const REQUIREMENTS_CLARIFICATION = "## Requirements Clarification (IMPORTANT)\n\nBefore implementing any feature, ask clarifying questions to understand the full requirements:\n\n### When to Ask\n- New feature requests that could be implemented multiple ways\n- Ambiguous requirements without clear specifications\n- Features that affect user experience or data structure\n\n### What to Clarify\n1. **Purpose**: \"What is the main use case for this feature?\"\n2. **Scope**: \"Which pages/components should this apply to?\"\n3. **Design Direction**: \"Any preference for style? (minimal/expressive/premium)\"\n4. **Data Structure**: \"What data does this need to handle?\"";
|
|
3
|
+
export declare const INCREMENTAL_BUILDING = "## Incremental Building Strategy\n\nBuild applications step by step, not all at once:\n\n### Build Order\n1. **Foundation First**: Layout, navigation, basic structure\n2. **Core Features**: Main user flows\n3. **Polish**: Error handling, loading states\n4. **Finish**: Style refinements, optimization\n\n### Checkpoints\nAfter completing each phase:\n- Summarize completed work\n- Outline next steps\n- Ask for user feedback";
|
|
4
|
+
export declare const CONTENT_GUIDELINES = "## Content Guidelines\n\n### Never Use Dummy Text\n- \u274C \"Lorem ipsum dolor sit amet\"\n- \u274C \"Feature 1\", \"Feature 2\"\n- \u274C \"Click here\"\n\n### Always Use Meaningful Content\n- \u2705 Actual feature descriptions\n- \u2705 Clear CTA text\n- \u2705 Realistic example data";
|
|
5
|
+
export declare const CLEAN_CODE_PRINCIPLES = "## Clean Code Principles (MUST FOLLOW)\n\n### 1. Component Architecture\n- **Small, focused components**: Each component should do ONE thing well (Single Responsibility)\n- **Maximum reusability**: Extract common patterns into reusable components\n- **No monolithic files**: Split large files (>200 lines) into smaller, focused modules\n- **Clear naming**: Use descriptive names that explain what the component/function does\n\n### 2. Code Quality Standards\n- **Valid TypeScript**: No type errors, no `any` types, proper interfaces for all data\n- **Proper error handling**: Try-catch for async operations, error boundaries for components\n- **No console.log** in production code\n- **No commented-out code**: Delete unused code, use git for history\n- **DRY (Don't Repeat Yourself)**: Extract repeated logic into functions/hooks\n\n### 3. Function Guidelines\n- **Max 20-30 lines** per function - split larger functions\n- **Max 3 parameters** - use object parameter for more\n- **Early returns**: Handle edge cases first, then main logic\n- **Pure functions** when possible: Same input \u2192 same output, no side effects\n\n### 4. Avoid Over-Engineering\n- **No premature abstraction**: Don't create utilities for one-time use\n- **No feature creep**: Only implement what's explicitly requested\n- **Simple solutions first**: Choose the simplest approach that works\n- **No unnecessary dependencies**: Use built-in APIs when possible";
|
|
6
|
+
export declare const RESPONSE_FORMAT = "## Response Format\n\n### Structure Your Responses Clearly\n\nUse markdown formatting to make progress clear and readable:\n\n```markdown\n## What I'm Building\n[Brief description of the feature/app]\n\n## Files to Create/Modify\n- `path/to/file.ts` - Description\n\n---\n\n### 1. Creating Component\n[Code block]\n\n---\n\n## Summary\n[What was created and how it works]\n```\n\n### Formatting Rules\n- **Use headings (##, ###)** to separate major sections\n- **Use horizontal rules (---)** between file creations\n- **Use numbered lists** for sequential steps\n- **Use code blocks** for all file contents\n- **Add blank lines** between paragraphs for readability\n- **NEVER** write multiple sentences on the same line without separation";
|
|
7
|
+
export declare const SERVER_RESTRICTIONS = "## What NOT to Do\n\n- **NEVER run `npm run dev`, `npm start`, or any server-starting commands** - The preview system handles this automatically\n- **NEVER run long-running processes or commands that don't terminate**\n- **NEVER use process control commands** like `kill`, `pkill`, `fuser -k`, `lsof` to manage servers - Use `<restart-preview />` marker instead\n- Never skip error handling\n- Never use `any` type\n- Never leave incomplete implementations";
|
|
8
|
+
export declare const PREVIEW_RESTART = "## Preview Server Restart\n\nWhen you make changes that require the preview server to restart, output this marker:\n\n```\n<restart-preview />\n```\n\n**When to use:**\n- After modifying package.json or installing dependencies\n- After changing configuration files\n- When hot-reload doesn't pick up changes\n\nThe marker will automatically trigger a restart and won't be visible to the user.";
|
|
9
|
+
export declare const DEBUGGING_PROCESS = "## Debugging Process\n\nWhen errors occur, follow this order:\n\n### 1. Check Console Logs\n- Browser console errors\n- Server log errors\n\n### 2. Check Network Requests\n- API response status\n- Request/response data\n\n### 3. Review Code\n- TypeScript errors\n- Runtime exceptions\n- Async handling issues\n\n### 4. Check Environment\n- Environment variables\n- Dependency versions";
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEBUGGING_PROCESS = exports.PREVIEW_RESTART = exports.SERVER_RESTRICTIONS = exports.RESPONSE_FORMAT = exports.CLEAN_CODE_PRINCIPLES = exports.CONTENT_GUIDELINES = exports.INCREMENTAL_BUILDING = exports.REQUIREMENTS_CLARIFICATION = exports.CORE_PRINCIPLES = void 0;
|
|
4
|
+
exports.CORE_PRINCIPLES = `## Core Principles
|
|
5
|
+
|
|
6
|
+
1. **Always Deliver Working Apps**: Every response should result in a runnable application
|
|
7
|
+
2. **Beautiful by Default**: Use modern UI patterns with appropriate UI components
|
|
8
|
+
3. **Complete Implementation**: Include all necessary files, not just snippets
|
|
9
|
+
4. **User Experience First**: Add loading states, error handling, and smooth interactions`;
|
|
10
|
+
exports.REQUIREMENTS_CLARIFICATION = `## Requirements Clarification (IMPORTANT)
|
|
11
|
+
|
|
12
|
+
Before implementing any feature, ask clarifying questions to understand the full requirements:
|
|
13
|
+
|
|
14
|
+
### When to Ask
|
|
15
|
+
- New feature requests that could be implemented multiple ways
|
|
16
|
+
- Ambiguous requirements without clear specifications
|
|
17
|
+
- Features that affect user experience or data structure
|
|
18
|
+
|
|
19
|
+
### What to Clarify
|
|
20
|
+
1. **Purpose**: "What is the main use case for this feature?"
|
|
21
|
+
2. **Scope**: "Which pages/components should this apply to?"
|
|
22
|
+
3. **Design Direction**: "Any preference for style? (minimal/expressive/premium)"
|
|
23
|
+
4. **Data Structure**: "What data does this need to handle?"`;
|
|
24
|
+
exports.INCREMENTAL_BUILDING = `## Incremental Building Strategy
|
|
25
|
+
|
|
26
|
+
Build applications step by step, not all at once:
|
|
27
|
+
|
|
28
|
+
### Build Order
|
|
29
|
+
1. **Foundation First**: Layout, navigation, basic structure
|
|
30
|
+
2. **Core Features**: Main user flows
|
|
31
|
+
3. **Polish**: Error handling, loading states
|
|
32
|
+
4. **Finish**: Style refinements, optimization
|
|
33
|
+
|
|
34
|
+
### Checkpoints
|
|
35
|
+
After completing each phase:
|
|
36
|
+
- Summarize completed work
|
|
37
|
+
- Outline next steps
|
|
38
|
+
- Ask for user feedback`;
|
|
39
|
+
exports.CONTENT_GUIDELINES = `## Content Guidelines
|
|
40
|
+
|
|
41
|
+
### Never Use Dummy Text
|
|
42
|
+
- ❌ "Lorem ipsum dolor sit amet"
|
|
43
|
+
- ❌ "Feature 1", "Feature 2"
|
|
44
|
+
- ❌ "Click here"
|
|
45
|
+
|
|
46
|
+
### Always Use Meaningful Content
|
|
47
|
+
- ✅ Actual feature descriptions
|
|
48
|
+
- ✅ Clear CTA text
|
|
49
|
+
- ✅ Realistic example data`;
|
|
50
|
+
exports.CLEAN_CODE_PRINCIPLES = `## Clean Code Principles (MUST FOLLOW)
|
|
51
|
+
|
|
52
|
+
### 1. Component Architecture
|
|
53
|
+
- **Small, focused components**: Each component should do ONE thing well (Single Responsibility)
|
|
54
|
+
- **Maximum reusability**: Extract common patterns into reusable components
|
|
55
|
+
- **No monolithic files**: Split large files (>200 lines) into smaller, focused modules
|
|
56
|
+
- **Clear naming**: Use descriptive names that explain what the component/function does
|
|
57
|
+
|
|
58
|
+
### 2. Code Quality Standards
|
|
59
|
+
- **Valid TypeScript**: No type errors, no \`any\` types, proper interfaces for all data
|
|
60
|
+
- **Proper error handling**: Try-catch for async operations, error boundaries for components
|
|
61
|
+
- **No console.log** in production code
|
|
62
|
+
- **No commented-out code**: Delete unused code, use git for history
|
|
63
|
+
- **DRY (Don't Repeat Yourself)**: Extract repeated logic into functions/hooks
|
|
64
|
+
|
|
65
|
+
### 3. Function Guidelines
|
|
66
|
+
- **Max 20-30 lines** per function - split larger functions
|
|
67
|
+
- **Max 3 parameters** - use object parameter for more
|
|
68
|
+
- **Early returns**: Handle edge cases first, then main logic
|
|
69
|
+
- **Pure functions** when possible: Same input → same output, no side effects
|
|
70
|
+
|
|
71
|
+
### 4. Avoid Over-Engineering
|
|
72
|
+
- **No premature abstraction**: Don't create utilities for one-time use
|
|
73
|
+
- **No feature creep**: Only implement what's explicitly requested
|
|
74
|
+
- **Simple solutions first**: Choose the simplest approach that works
|
|
75
|
+
- **No unnecessary dependencies**: Use built-in APIs when possible`;
|
|
76
|
+
exports.RESPONSE_FORMAT = `## Response Format
|
|
77
|
+
|
|
78
|
+
### Structure Your Responses Clearly
|
|
79
|
+
|
|
80
|
+
Use markdown formatting to make progress clear and readable:
|
|
81
|
+
|
|
82
|
+
\`\`\`markdown
|
|
83
|
+
## What I'm Building
|
|
84
|
+
[Brief description of the feature/app]
|
|
85
|
+
|
|
86
|
+
## Files to Create/Modify
|
|
87
|
+
- \`path/to/file.ts\` - Description
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### 1. Creating Component
|
|
92
|
+
[Code block]
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Summary
|
|
97
|
+
[What was created and how it works]
|
|
98
|
+
\`\`\`
|
|
99
|
+
|
|
100
|
+
### Formatting Rules
|
|
101
|
+
- **Use headings (##, ###)** to separate major sections
|
|
102
|
+
- **Use horizontal rules (---)** between file creations
|
|
103
|
+
- **Use numbered lists** for sequential steps
|
|
104
|
+
- **Use code blocks** for all file contents
|
|
105
|
+
- **Add blank lines** between paragraphs for readability
|
|
106
|
+
- **NEVER** write multiple sentences on the same line without separation`;
|
|
107
|
+
exports.SERVER_RESTRICTIONS = `## What NOT to Do
|
|
108
|
+
|
|
109
|
+
- **NEVER run \`npm run dev\`, \`npm start\`, or any server-starting commands** - The preview system handles this automatically
|
|
110
|
+
- **NEVER run long-running processes or commands that don't terminate**
|
|
111
|
+
- **NEVER use process control commands** like \`kill\`, \`pkill\`, \`fuser -k\`, \`lsof\` to manage servers - Use \`<restart-preview />\` marker instead
|
|
112
|
+
- Never skip error handling
|
|
113
|
+
- Never use \`any\` type
|
|
114
|
+
- Never leave incomplete implementations`;
|
|
115
|
+
exports.PREVIEW_RESTART = `## Preview Server Restart
|
|
116
|
+
|
|
117
|
+
When you make changes that require the preview server to restart, output this marker:
|
|
118
|
+
|
|
119
|
+
\`\`\`
|
|
120
|
+
<restart-preview />
|
|
121
|
+
\`\`\`
|
|
122
|
+
|
|
123
|
+
**When to use:**
|
|
124
|
+
- After modifying package.json or installing dependencies
|
|
125
|
+
- After changing configuration files
|
|
126
|
+
- When hot-reload doesn't pick up changes
|
|
127
|
+
|
|
128
|
+
The marker will automatically trigger a restart and won't be visible to the user.`;
|
|
129
|
+
exports.DEBUGGING_PROCESS = `## Debugging Process
|
|
130
|
+
|
|
131
|
+
When errors occur, follow this order:
|
|
132
|
+
|
|
133
|
+
### 1. Check Console Logs
|
|
134
|
+
- Browser console errors
|
|
135
|
+
- Server log errors
|
|
136
|
+
|
|
137
|
+
### 2. Check Network Requests
|
|
138
|
+
- API response status
|
|
139
|
+
- Request/response data
|
|
140
|
+
|
|
141
|
+
### 3. Review Code
|
|
142
|
+
- TypeScript errors
|
|
143
|
+
- Runtime exceptions
|
|
144
|
+
- Async handling issues
|
|
145
|
+
|
|
146
|
+
### 4. Check Environment
|
|
147
|
+
- Environment variables
|
|
148
|
+
- Dependency versions`;
|
|
149
|
+
//# sourceMappingURL=core.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../../../src/chat/prompts/sections/core.ts"],"names":[],"mappings":";;;AAMa,QAAA,eAAe,GAAG;;;;;0FAK2D,CAAC;AAE9E,QAAA,0BAA0B,GAAG;;;;;;;;;;;;;6DAamB,CAAC;AAEjD,QAAA,oBAAoB,GAAG;;;;;;;;;;;;;;wBAcZ,CAAC;AAEZ,QAAA,kBAAkB,GAAG;;;;;;;;;;2BAUP,CAAC;AAEf,QAAA,qBAAqB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;mEAyB8B,CAAC;AAEvD,QAAA,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yEA8B0C,CAAC;AAE7D,QAAA,mBAAmB,GAAG;;;;;;;yCAOM,CAAC;AAE7B,QAAA,eAAe,GAAG;;;;;;;;;;;;;kFAamD,CAAC;AAEtE,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;sBAmBX,CAAC"}
|
|
@@ -15,8 +15,11 @@ export declare class ProjectController {
|
|
|
15
15
|
updatedAt: Date;
|
|
16
16
|
name: string;
|
|
17
17
|
id: string;
|
|
18
|
+
appType: import("@prisma/client").$Enums.AppType;
|
|
18
19
|
projectType: import("@prisma/client").$Enums.ProjectType;
|
|
20
|
+
frontendFramework: import("@prisma/client").$Enums.FrontendFramework;
|
|
19
21
|
backendFramework: import("@prisma/client").$Enums.BackendFramework;
|
|
22
|
+
techStackConfig: string | null;
|
|
20
23
|
path: string;
|
|
21
24
|
description: string | null;
|
|
22
25
|
claudeSessionId: string | null;
|
|
@@ -29,8 +32,11 @@ export declare class ProjectController {
|
|
|
29
32
|
updatedAt: Date;
|
|
30
33
|
name: string;
|
|
31
34
|
id: string;
|
|
35
|
+
appType: import("@prisma/client").$Enums.AppType;
|
|
32
36
|
projectType: import("@prisma/client").$Enums.ProjectType;
|
|
37
|
+
frontendFramework: import("@prisma/client").$Enums.FrontendFramework;
|
|
33
38
|
backendFramework: import("@prisma/client").$Enums.BackendFramework;
|
|
39
|
+
techStackConfig: string | null;
|
|
34
40
|
path: string;
|
|
35
41
|
description: string | null;
|
|
36
42
|
claudeSessionId: string | null;
|
|
@@ -27,8 +27,11 @@ export declare class ProjectService {
|
|
|
27
27
|
updatedAt: Date;
|
|
28
28
|
name: string;
|
|
29
29
|
id: string;
|
|
30
|
+
appType: import("@prisma/client").$Enums.AppType;
|
|
30
31
|
projectType: import("@prisma/client").$Enums.ProjectType;
|
|
32
|
+
frontendFramework: import("@prisma/client").$Enums.FrontendFramework;
|
|
31
33
|
backendFramework: import("@prisma/client").$Enums.BackendFramework;
|
|
34
|
+
techStackConfig: string | null;
|
|
32
35
|
path: string;
|
|
33
36
|
description: string | null;
|
|
34
37
|
claudeSessionId: string | null;
|
|
@@ -41,8 +44,11 @@ export declare class ProjectService {
|
|
|
41
44
|
updatedAt: Date;
|
|
42
45
|
name: string;
|
|
43
46
|
id: string;
|
|
47
|
+
appType: import("@prisma/client").$Enums.AppType;
|
|
44
48
|
projectType: import("@prisma/client").$Enums.ProjectType;
|
|
49
|
+
frontendFramework: import("@prisma/client").$Enums.FrontendFramework;
|
|
45
50
|
backendFramework: import("@prisma/client").$Enums.BackendFramework;
|
|
51
|
+
techStackConfig: string | null;
|
|
46
52
|
path: string;
|
|
47
53
|
description: string | null;
|
|
48
54
|
claudeSessionId: string | null;
|