@relipa/ai-flow-kit 0.0.3 → 0.0.4-beta.2
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/AIFLOW.md +27 -1
- package/QUICK_START.md +20 -6
- package/README.md +27 -0
- package/bin/aiflow.js +5 -0
- package/custom/templates/laravel.md +15 -90
- package/custom/templates/nestjs.md +72 -0
- package/custom/templates/nextjs.md +14 -89
- package/custom/templates/nodejs-express.md +73 -0
- package/custom/templates/python-django.md +71 -0
- package/custom/templates/python-fastapi.md +54 -0
- package/custom/templates/reactjs.md +492 -567
- package/custom/templates/shared/gate-workflow.md +75 -0
- package/custom/templates/spring-boot.md +523 -598
- package/custom/templates/tools/copilot.md +8 -0
- package/custom/templates/tools/cursor.md +8 -0
- package/custom/templates/tools/gemini.md +8 -0
- package/custom/templates/tools/generic.md +12 -0
- package/custom/templates/vue-nuxt.md +14 -89
- package/docs/ai-integration.md +53 -0
- package/docs/developer-overview.md +126 -0
- package/package.json +1 -1
- package/scripts/hooks/session-start.js +2 -1
- package/scripts/init.js +460 -453
- package/scripts/prompt.js +12 -2
- package/scripts/use.js +594 -570
package/scripts/prompt.js
CHANGED
|
@@ -278,7 +278,8 @@ module.exports = async function generatePrompt(type, options = {}) {
|
|
|
278
278
|
const template = PROMPT_TEMPLATES[resolvedType];
|
|
279
279
|
const rules = await loadRules();
|
|
280
280
|
|
|
281
|
-
const
|
|
281
|
+
const env = options.env || 'claude';
|
|
282
|
+
const prompt = buildPrompt(template, ctx, rules, options, env);
|
|
282
283
|
|
|
283
284
|
if (options.output) {
|
|
284
285
|
await fs.writeFile(options.output, prompt, 'utf-8');
|
|
@@ -309,7 +310,7 @@ async function loadRules() {
|
|
|
309
310
|
return parts.join('\n\n');
|
|
310
311
|
}
|
|
311
312
|
|
|
312
|
-
function buildPrompt(template, ctx, rules, options) {
|
|
313
|
+
function buildPrompt(template, ctx, rules, options, env = 'claude') {
|
|
313
314
|
const lang = options.lang || 'english';
|
|
314
315
|
const detail = options.detail || 'standard';
|
|
315
316
|
|
|
@@ -388,5 +389,14 @@ function buildPrompt(template, ctx, rules, options) {
|
|
|
388
389
|
lines.push('');
|
|
389
390
|
}
|
|
390
391
|
|
|
392
|
+
// ── Tool-specific instructions ───────────────────────────────
|
|
393
|
+
if (env === 'cursor') {
|
|
394
|
+
lines.push('---');
|
|
395
|
+
lines.push('> **Cursor Tip:** You can use `@Codebase` to search for more context if needed.');
|
|
396
|
+
} else if (env === 'gemini') {
|
|
397
|
+
lines.push('---');
|
|
398
|
+
lines.push('> **Gemini Tip:** Use the "Upload Files" or "Attach File" feature to provide source code context.');
|
|
399
|
+
}
|
|
400
|
+
|
|
391
401
|
return lines.join('\n');
|
|
392
402
|
}
|