@dypai-ai/mcp 1.5.3 → 1.5.4

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/package.json +1 -1
  2. package/src/index.js +12 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dypai-ai/mcp",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "DYPAI MCP Server — AI agent toolkit for building and deploying full-stack apps",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -485,10 +485,18 @@ First reflex, always:
485
485
 
486
486
  1. **Acknowledge briefly** what they want to build (one short line, their language).
487
487
  2. **\`search_project_templates(query: "<keywords from their request>")\`** — keywords in their language. Templates cover common app types (gym, clinic, waitlist, saas dashboard, etc.).
488
- 3. **If a template matches** confirm with the user in one line, then \`create_project(name: "<their name>", template_slug: "<slug>")\`. Don't ask 15 questions about scope — the template IS the starting MVP, you can iterate from there.
489
- 4. **If no template matches** \`create_project(name: "<their name>", template_slug: "blank")\` and then build from scratch.
488
+ 3. **Decide: template or blank?** Default is **blank**. A template is only the right pick when the match is OBVIOUS and STRONG:
489
+ - User says *"app para mi gimnasio"* + there's \`gym-manager\` (exact domain + feature overlap) → template.
490
+ - ❌ User says *"algo para gestionar reservas"* + there's \`gym-manager\` (soft match, many interpretations) → **blank**. Don't assume they want the gym's specific schema (classes, memberships, check-ins) — they didn't ask for it.
491
+ - ❌ User is a dev with a concrete spec (*"crea un proyecto con estas 3 tablas y estos endpoints"*) → **blank**, always. Respect their design.
492
+ - ❌ No template returned at all → **blank**.
493
+ 4. **Call it** → \`create_project(name: "<their name>", template_slug: "<matched_slug>" | "blank")\`.
494
+ If you went with a template, acknowledge in ONE line what's included so the user can push back: *"Lo arranco con la plantilla X, que trae socios, clases y pagos. ¿Te vale o prefieres algo más simple?"*
495
+ If you went blank, just say: *"Arranco un proyecto en blanco y lo construimos a medida."*
490
496
  5. **After \`create_project\`** → ask for an absolute workspace path, then \`dypai_pull\` + \`manage_frontend(sync)\` (see next section).
491
497
 
498
+ **The template system exists to save time when the fit is obvious, not to force-match every request.** When in doubt → blank is always correct. Iterating up from blank is cheaper than deleting 80% of a mismatched template.
499
+
492
500
  ## The one legit follow-up question
493
501
 
494
502
  After deciding to build on DYPAI, you may ask ONE question (not five) to size scope if the request is genuinely vague:
@@ -531,6 +539,8 @@ Before the first \`execute_sql\`, before the first file edit, before ANYTHING:
531
539
  1. **Look at the workspace.** Is there a \`dypai/\` folder? A \`src/\`? A \`package.json\`? If you're using a Read/ls tool, check now.
532
540
  2. **Missing backend (\`dypai/\` absent)?** You have no endpoint YAMLs, no \`schema.sql\`, no node catalog. Cannot write queries, cannot push, cannot reason about the schema.
533
541
  3. **Missing frontend (\`src/\` or \`package.json\` absent)?** You have no React/Vite/Next code. Cannot change the UI, cannot run \`npm install\`, cannot test locally.
542
+
543
+ **Having \`src/\` on disk does NOT mean the backend is on disk.** \`dypai/\` is a SEPARATE folder. Check for \`dypai/schema.sql\` specifically — if it's missing, the backend isn't materialized, even if the frontend clearly is. This is the #1 trap in hosts that default to file-first workflows (Claude Code especially): they see \`src/\` + \`package.json\` and assume the project is complete. Always verify \`dypai/schema.sql\` exists before touching data, queries, or endpoints.
534
544
  4. **If either is missing → sync FIRST:**
535
545
  - Ask the user for an absolute workspace path if you don't have one (e.g. \`/Users/me/code/my-app\`).
536
546
  - Run \`dypai_pull(project_id, out_dir: <abs>/dypai)\` — materializes backend (endpoints, SQL, prompts, schema.sql, node-catalog.json).