@donotdev/cli 0.0.9 → 0.0.11
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/dependencies-matrix.json +24 -7
- package/dist/bin/commands/build.js +2 -2
- package/dist/bin/commands/bump.js +578 -94
- package/dist/bin/commands/cacheout.js +2 -2
- package/dist/bin/commands/create-app.js +3 -3
- package/dist/bin/commands/create-project.js +3 -3
- package/dist/bin/commands/deploy.js +3 -3
- package/dist/bin/commands/dev.js +2 -2
- package/dist/bin/commands/emu.js +2 -2
- package/dist/bin/commands/format.js +2 -2
- package/dist/bin/commands/lint.js +2 -2
- package/dist/bin/commands/preview.js +2 -2
- package/dist/bin/commands/sync-secrets.js +2 -2
- package/dist/index.js +3 -3
- package/package.json +2 -2
- package/templates/root-consumer/.claude/agents/architect.md.example +313 -0
- package/templates/root-consumer/.claude/agents/builder.md.example +329 -0
- package/templates/root-consumer/.claude/agents/coder.md.example +87 -0
- package/templates/root-consumer/.claude/agents/extractor.md.example +235 -0
- package/templates/root-consumer/.claude/agents/polisher.md.example +359 -0
- package/templates/root-consumer/.claude/agents/prompt-engineer.md.example +85 -0
- package/templates/root-consumer/.claude/commands/brainstorm.md.example +133 -0
- package/templates/root-consumer/.claude/commands/build.md.example +109 -0
- package/templates/root-consumer/.claude/commands/design.md.example +136 -0
- package/templates/root-consumer/.claude/commands/polish.md.example +145 -0
- package/templates/root-consumer/.cursor/mcp.json.example +8 -0
- package/templates/root-consumer/.mcp.json.example +8 -0
- package/templates/root-consumer/CLAUDE.md.example +146 -0
- package/templates/root-consumer/guides/dndev/AGENT_START_HERE.md.example +15 -12
- package/templates/root-consumer/guides/dndev/COMPONENT_API.md.example +195 -0
- package/templates/root-consumer/guides/dndev/INDEX.md.example +3 -1
- package/templates/root-consumer/guides/dndev/SETUP_CRUD.md.example +157 -1
|
@@ -163,7 +163,7 @@ var require_picocolors = __commonJS({
|
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
-
// node_modules/.bun/@clack+
|
|
166
|
+
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
|
|
167
167
|
import { stdin as j, stdout as M } from "node:process";
|
|
168
168
|
import { Writable as X } from "node:stream";
|
|
169
169
|
function DD({ onlyFirst: e2 = false } = {}) {
|
|
@@ -204,7 +204,7 @@ function rD() {
|
|
|
204
204
|
}
|
|
205
205
|
var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, nD, _, xD, B, AD, A;
|
|
206
206
|
var init_dist = __esm({
|
|
207
|
-
"node_modules/.bun/@clack+
|
|
207
|
+
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
|
|
208
208
|
init_utils();
|
|
209
209
|
import_sisteransi = __toESM(require_src(), 1);
|
|
210
210
|
uD = DD();
|
|
@@ -167,7 +167,7 @@ var require_picocolors = __commonJS({
|
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
169
|
|
|
170
|
-
// node_modules/.bun/@clack+
|
|
170
|
+
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
|
|
171
171
|
import { stdin as j, stdout as M } from "node:process";
|
|
172
172
|
import * as g from "node:readline";
|
|
173
173
|
import O from "node:readline";
|
|
@@ -283,7 +283,7 @@ function fD({ input: e2 = j, output: u2 = M, overwrite: t = true, hideCursor: F2
|
|
|
283
283
|
}
|
|
284
284
|
var import_sisteransi, import_picocolors, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, dD, A, OD, PD, J, LD, RD;
|
|
285
285
|
var init_dist = __esm({
|
|
286
|
-
"node_modules/.bun/@clack+
|
|
286
|
+
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
|
|
287
287
|
init_utils();
|
|
288
288
|
import_sisteransi = __toESM(require_src(), 1);
|
|
289
289
|
import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -8267,7 +8267,7 @@ async function askForInput(message, defaultValue = "") {
|
|
|
8267
8267
|
const result = await he({
|
|
8268
8268
|
message,
|
|
8269
8269
|
placeholder: defaultValue || void 0,
|
|
8270
|
-
|
|
8270
|
+
initialValue: defaultValue || void 0
|
|
8271
8271
|
});
|
|
8272
8272
|
if (pD(result)) {
|
|
8273
8273
|
xe("Operation cancelled.");
|
|
@@ -167,7 +167,7 @@ var require_picocolors = __commonJS({
|
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
169
|
|
|
170
|
-
// node_modules/.bun/@clack+
|
|
170
|
+
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
|
|
171
171
|
import { stdin as j, stdout as M } from "node:process";
|
|
172
172
|
import * as g from "node:readline";
|
|
173
173
|
import O from "node:readline";
|
|
@@ -283,7 +283,7 @@ function fD({ input: e2 = j, output: u2 = M, overwrite: t = true, hideCursor: F2
|
|
|
283
283
|
}
|
|
284
284
|
var import_sisteransi, import_picocolors, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, dD, A, OD, PD, J, LD, RD;
|
|
285
285
|
var init_dist = __esm({
|
|
286
|
-
"node_modules/.bun/@clack+
|
|
286
|
+
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
|
|
287
287
|
init_utils();
|
|
288
288
|
import_sisteransi = __toESM(require_src(), 1);
|
|
289
289
|
import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -8267,7 +8267,7 @@ async function askForInput(message, defaultValue = "") {
|
|
|
8267
8267
|
const result = await he({
|
|
8268
8268
|
message,
|
|
8269
8269
|
placeholder: defaultValue || void 0,
|
|
8270
|
-
|
|
8270
|
+
initialValue: defaultValue || void 0
|
|
8271
8271
|
});
|
|
8272
8272
|
if (pD(result)) {
|
|
8273
8273
|
xe("Operation cancelled.");
|
|
@@ -163,7 +163,7 @@ var require_picocolors = __commonJS({
|
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
-
// node_modules/.bun/@clack+
|
|
166
|
+
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
|
|
167
167
|
import { stdin as j, stdout as M } from "node:process";
|
|
168
168
|
import * as g from "node:readline";
|
|
169
169
|
import O from "node:readline";
|
|
@@ -279,7 +279,7 @@ function fD({ input: e2 = j, output: u2 = M, overwrite: t = true, hideCursor: F2
|
|
|
279
279
|
}
|
|
280
280
|
var import_sisteransi, import_picocolors, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, dD, A, OD, PD, J, LD, RD;
|
|
281
281
|
var init_dist = __esm({
|
|
282
|
-
"node_modules/.bun/@clack+
|
|
282
|
+
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
|
|
283
283
|
init_utils();
|
|
284
284
|
import_sisteransi = __toESM(require_src(), 1);
|
|
285
285
|
import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -7880,7 +7880,7 @@ async function askForInput(message, defaultValue = "") {
|
|
|
7880
7880
|
const result = await he({
|
|
7881
7881
|
message,
|
|
7882
7882
|
placeholder: defaultValue || void 0,
|
|
7883
|
-
|
|
7883
|
+
initialValue: defaultValue || void 0
|
|
7884
7884
|
});
|
|
7885
7885
|
if (pD(result)) {
|
|
7886
7886
|
xe("Operation cancelled.");
|
package/dist/bin/commands/dev.js
CHANGED
|
@@ -163,7 +163,7 @@ var require_picocolors = __commonJS({
|
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
-
// node_modules/.bun/@clack+
|
|
166
|
+
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
|
|
167
167
|
import { stdin as j, stdout as M } from "node:process";
|
|
168
168
|
import O from "node:readline";
|
|
169
169
|
import { Writable as X } from "node:stream";
|
|
@@ -254,7 +254,7 @@ function m(e2, u2) {
|
|
|
254
254
|
}
|
|
255
255
|
var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, A, OD, PD, J, LD;
|
|
256
256
|
var init_dist = __esm({
|
|
257
|
-
"node_modules/.bun/@clack+
|
|
257
|
+
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
|
|
258
258
|
init_utils();
|
|
259
259
|
import_sisteransi = __toESM(require_src(), 1);
|
|
260
260
|
uD = DD();
|
package/dist/bin/commands/emu.js
CHANGED
|
@@ -163,7 +163,7 @@ var require_picocolors = __commonJS({
|
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
-
// node_modules/.bun/@clack+
|
|
166
|
+
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
|
|
167
167
|
import { stdin as j, stdout as M } from "node:process";
|
|
168
168
|
import O from "node:readline";
|
|
169
169
|
import { Writable as X } from "node:stream";
|
|
@@ -257,7 +257,7 @@ function m(e2, u2) {
|
|
|
257
257
|
}
|
|
258
258
|
var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, A, kD, $D, H, SD, OD, PD, J, LD;
|
|
259
259
|
var init_dist = __esm({
|
|
260
|
-
"node_modules/.bun/@clack+
|
|
260
|
+
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
|
|
261
261
|
init_utils();
|
|
262
262
|
import_sisteransi = __toESM(require_src(), 1);
|
|
263
263
|
uD = DD();
|
|
@@ -163,7 +163,7 @@ var require_picocolors = __commonJS({
|
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
-
// node_modules/.bun/@clack+
|
|
166
|
+
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
|
|
167
167
|
import { stdin as j, stdout as M } from "node:process";
|
|
168
168
|
import { Writable as X } from "node:stream";
|
|
169
169
|
function DD({ onlyFirst: e2 = false } = {}) {
|
|
@@ -204,7 +204,7 @@ function rD() {
|
|
|
204
204
|
}
|
|
205
205
|
var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, nD, _, xD, B, AD, A;
|
|
206
206
|
var init_dist = __esm({
|
|
207
|
-
"node_modules/.bun/@clack+
|
|
207
|
+
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
|
|
208
208
|
init_utils();
|
|
209
209
|
import_sisteransi = __toESM(require_src(), 1);
|
|
210
210
|
uD = DD();
|
|
@@ -163,7 +163,7 @@ var require_picocolors = __commonJS({
|
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
-
// node_modules/.bun/@clack+
|
|
166
|
+
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
|
|
167
167
|
import { stdin as j, stdout as M } from "node:process";
|
|
168
168
|
import { Writable as X } from "node:stream";
|
|
169
169
|
function DD({ onlyFirst: e2 = false } = {}) {
|
|
@@ -204,7 +204,7 @@ function rD() {
|
|
|
204
204
|
}
|
|
205
205
|
var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, nD, _, xD, B, AD, A;
|
|
206
206
|
var init_dist = __esm({
|
|
207
|
-
"node_modules/.bun/@clack+
|
|
207
|
+
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
|
|
208
208
|
init_utils();
|
|
209
209
|
import_sisteransi = __toESM(require_src(), 1);
|
|
210
210
|
uD = DD();
|
|
@@ -163,7 +163,7 @@ var require_picocolors = __commonJS({
|
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
-
// node_modules/.bun/@clack+
|
|
166
|
+
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
|
|
167
167
|
import { stdin as j, stdout as M } from "node:process";
|
|
168
168
|
import O from "node:readline";
|
|
169
169
|
import { Writable as X } from "node:stream";
|
|
@@ -254,7 +254,7 @@ function m(e2, u2) {
|
|
|
254
254
|
}
|
|
255
255
|
var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, A, OD, PD, J, LD;
|
|
256
256
|
var init_dist = __esm({
|
|
257
|
-
"node_modules/.bun/@clack+
|
|
257
|
+
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
|
|
258
258
|
init_utils();
|
|
259
259
|
import_sisteransi = __toESM(require_src(), 1);
|
|
260
260
|
uD = DD();
|
|
@@ -163,7 +163,7 @@ var require_picocolors = __commonJS({
|
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
|
|
166
|
-
// node_modules/.bun/@clack+
|
|
166
|
+
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
|
|
167
167
|
import { stdin as j, stdout as M } from "node:process";
|
|
168
168
|
import O from "node:readline";
|
|
169
169
|
import { Writable as X } from "node:stream";
|
|
@@ -257,7 +257,7 @@ function m(e2, u2) {
|
|
|
257
257
|
}
|
|
258
258
|
var import_sisteransi, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, A, OD, PD, J, LD;
|
|
259
259
|
var init_dist = __esm({
|
|
260
|
-
"node_modules/.bun/@clack+
|
|
260
|
+
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
|
|
261
261
|
init_utils();
|
|
262
262
|
import_sisteransi = __toESM(require_src(), 1);
|
|
263
263
|
uD = DD();
|
package/dist/index.js
CHANGED
|
@@ -167,7 +167,7 @@ var require_picocolors = __commonJS({
|
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
169
|
|
|
170
|
-
// node_modules/.bun/@clack+
|
|
170
|
+
// node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs
|
|
171
171
|
import { stdin as j, stdout as M } from "node:process";
|
|
172
172
|
import * as g from "node:readline";
|
|
173
173
|
import O from "node:readline";
|
|
@@ -283,7 +283,7 @@ function fD({ input: e2 = j, output: u2 = M, overwrite: t = true, hideCursor: F2
|
|
|
283
283
|
}
|
|
284
284
|
var import_sisteransi, import_picocolors, uD, W, tD, eD, FD, sD, w, N, I, R, r, iD, CD, ED, d, oD, y, V, nD, G, _, z, K, aD, k, hD, lD, xD, B, AD, S, gD, vD, h, x, dD, A, kD, $D, H, SD, OD, PD, J, LD, RD;
|
|
285
285
|
var init_dist = __esm({
|
|
286
|
-
"node_modules/.bun/@clack+
|
|
286
|
+
"node_modules/.bun/@clack+prompts@0.11.0/node_modules/@clack/prompts/node_modules/@clack/core/dist/index.mjs"() {
|
|
287
287
|
init_utils();
|
|
288
288
|
import_sisteransi = __toESM(require_src(), 1);
|
|
289
289
|
import_picocolors = __toESM(require_picocolors(), 1);
|
|
@@ -8468,7 +8468,7 @@ async function askForInput(message, defaultValue = "") {
|
|
|
8468
8468
|
const result = await he({
|
|
8469
8469
|
message,
|
|
8470
8470
|
placeholder: defaultValue || void 0,
|
|
8471
|
-
|
|
8471
|
+
initialValue: defaultValue || void 0
|
|
8472
8472
|
});
|
|
8473
8473
|
if (pD(result)) {
|
|
8474
8474
|
xe("Operation cancelled.");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@donotdev/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Command-line interface for DoNotDev Framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"type-check": "tsc --noEmit"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@clack/prompts": "^0.
|
|
36
|
+
"@clack/prompts": "^1.0.0",
|
|
37
37
|
"commander": "^14.0.3",
|
|
38
38
|
"fast-glob": "^3.3.3"
|
|
39
39
|
},
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: BMAD PRINTER persona - Transform HLD into technical specifications (Step 2: Review/Design)
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<persona>
|
|
6
|
+
You are PRINTER — a Framework Architect who transforms HLD documents into technical specifications.
|
|
7
|
+
|
|
8
|
+
Your personality:
|
|
9
|
+
- PRECISE: You generate exact code, not descriptions
|
|
10
|
+
- FRAMEWORK-NATIVE: You know DoNotDev inside-out and map everything to it
|
|
11
|
+
- VIGILANT: You catch inconsistencies and flag them
|
|
12
|
+
- MINIMAL: You include only what's in the HLD
|
|
13
|
+
|
|
14
|
+
You focus on:
|
|
15
|
+
- Generating schemas and configuration code, not implementing app features
|
|
16
|
+
- Including only features specified in the HLD
|
|
17
|
+
- Flagging every issue you find for human review
|
|
18
|
+
- Letting code speak for itself, keeping explanations concise
|
|
19
|
+
</persona>
|
|
20
|
+
|
|
21
|
+
<mission>
|
|
22
|
+
Transform the HLD into technical artifacts (LLD - Low-Level Design):
|
|
23
|
+
1. Entity Schemas — defineEntity() code for each entity
|
|
24
|
+
2. Navigation Config — route definitions
|
|
25
|
+
3. Feature Mapping — what framework packages implement what
|
|
26
|
+
4. Custom Component Specs — detailed specs for custom components (if any)
|
|
27
|
+
|
|
28
|
+
You succeed when artifacts are complete and valid.
|
|
29
|
+
You fail if you generate invalid code or miss HLD items.
|
|
30
|
+
</mission>
|
|
31
|
+
|
|
32
|
+
<input_context>
|
|
33
|
+
You are receiving an HLD document from Step 1 (Brainstorm) or `/brainstorm` command.
|
|
34
|
+
The HLD contains: Vision, Users, Entities, Features, Pages, Constraints, Native vs Custom.
|
|
35
|
+
Your job is to translate this into DoNotDev framework code and implementation plan.
|
|
36
|
+
</input_context>
|
|
37
|
+
|
|
38
|
+
<framework_knowledge>
|
|
39
|
+
DoNotDev Entity System:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { defineEntity } from '@donotdev/core';
|
|
43
|
+
|
|
44
|
+
export const exampleEntity = defineEntity({
|
|
45
|
+
name: 'Example', // Display name
|
|
46
|
+
collection: 'examples', // Firestore collection (plural, lowercase)
|
|
47
|
+
fields: {
|
|
48
|
+
fieldName: {
|
|
49
|
+
type: 'text', // Field type
|
|
50
|
+
visibility: 'user', // guest | user | admin | technical | hidden
|
|
51
|
+
validation: { // Optional
|
|
52
|
+
required: true,
|
|
53
|
+
minLength: 3
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Field Types:
|
|
61
|
+
text, email, number, textarea, select, date, checkbox, dropdown,
|
|
62
|
+
multiDropdown, file, image, radio, range, phone, geopoint, map,
|
|
63
|
+
timestamp, reference, password, address, avatar, hidden
|
|
64
|
+
|
|
65
|
+
Technical Fields (auto-added by defineEntity, no need to add manually):
|
|
66
|
+
- id, createdAt, updatedAt, createdById, updatedById
|
|
67
|
+
- All have visibility: 'technical' (shown as read-only in edit forms, hidden in create forms)
|
|
68
|
+
|
|
69
|
+
Reference Format:
|
|
70
|
+
- type: 'reference'
|
|
71
|
+
- ref: 'collectionName' (the target collection, plural lowercase)
|
|
72
|
+
|
|
73
|
+
Select Format:
|
|
74
|
+
- type: 'select'
|
|
75
|
+
- options: ['option1', 'option2']
|
|
76
|
+
|
|
77
|
+
Validation Options:
|
|
78
|
+
- required: boolean
|
|
79
|
+
- minLength / maxLength: number
|
|
80
|
+
- min / max: number
|
|
81
|
+
- nullable: boolean
|
|
82
|
+
</framework_knowledge>
|
|
83
|
+
|
|
84
|
+
<framework_packages>
|
|
85
|
+
Available packages for feature mapping:
|
|
86
|
+
|
|
87
|
+
| Package | Purpose |
|
|
88
|
+
|---------|---------|
|
|
89
|
+
| @donotdev/core | defineEntity, utilities |
|
|
90
|
+
| @donotdev/features/auth | Email/password auth, AuthForm |
|
|
91
|
+
| @donotdev/features/oauth | OAuth providers (Google, GitHub) |
|
|
92
|
+
| @donotdev/crud | useCrud hook, EntityFormRenderer, EntityList |
|
|
93
|
+
| @donotdev/features/billing | Stripe integration |
|
|
94
|
+
| @donotdev/components | UI: Section, Card, Hero, Button, etc. |
|
|
95
|
+
| @donotdev/ui | Layouts, navigation, theme |
|
|
96
|
+
</framework_packages>
|
|
97
|
+
|
|
98
|
+
<mcp_usage>
|
|
99
|
+
Before generating code, use MCP to verify component capabilities:
|
|
100
|
+
|
|
101
|
+
1. For each component mentioned in HLD:
|
|
102
|
+
- Call `lookup_component({ component: "ComponentName" })`
|
|
103
|
+
- Verify props match requirements
|
|
104
|
+
- Document any limitations
|
|
105
|
+
|
|
106
|
+
2. For custom components identified in HLD:
|
|
107
|
+
- Use `list_components` to check if similar component exists
|
|
108
|
+
- If not, create detailed spec for custom component
|
|
109
|
+
|
|
110
|
+
3. Document MCP findings in "Custom Component Specs" section
|
|
111
|
+
</mcp_usage>
|
|
112
|
+
|
|
113
|
+
<output_format>
|
|
114
|
+
Generate EXACTLY this structure:
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 1. Entity Schemas
|
|
119
|
+
|
|
120
|
+
### entities/[name].ts
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
import { defineEntity } from '@donotdev/core';
|
|
124
|
+
|
|
125
|
+
export const [name]Entity = defineEntity({
|
|
126
|
+
name: '[Name]',
|
|
127
|
+
collection: '[names]',
|
|
128
|
+
fields: {
|
|
129
|
+
// Technical fields (id, createdAt, updatedAt, createdById, updatedById)
|
|
130
|
+
// are automatically added by defineEntity - no need to add them manually
|
|
131
|
+
// ... all fields from HLD
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
(Generate one block per entity)
|
|
137
|
+
|
|
138
|
+
### entities/index.ts
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
export { [name]Entity } from './[name]';
|
|
142
|
+
// ... export all
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 2. Navigation Config
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
export const routes = [
|
|
151
|
+
{
|
|
152
|
+
path: '/path',
|
|
153
|
+
name: 'PageName',
|
|
154
|
+
access: 'public' | 'protected' | 'admin',
|
|
155
|
+
layout: 'marketing' | 'app' | 'auth' | 'admin',
|
|
156
|
+
components: ['ComponentName']
|
|
157
|
+
}
|
|
158
|
+
];
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## 3. Feature Mapping
|
|
164
|
+
|
|
165
|
+
| HLD Feature | Implementation | Package |
|
|
166
|
+
|-------------|----------------|---------|
|
|
167
|
+
| [Feature from HLD] | [How to implement] | [@donotdev/...] |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## 4. Custom Component Specs
|
|
172
|
+
|
|
173
|
+
For each custom component identified in HLD "Native vs Custom" section:
|
|
174
|
+
|
|
175
|
+
### [ComponentName]
|
|
176
|
+
|
|
177
|
+
**Purpose:** [What it does]
|
|
178
|
+
|
|
179
|
+
**Props:**
|
|
180
|
+
```typescript
|
|
181
|
+
interface [ComponentName]Props {
|
|
182
|
+
// ... props definition
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Behavior:** [How it works]
|
|
187
|
+
|
|
188
|
+
**Integration:** [How it integrates with framework]
|
|
189
|
+
|
|
190
|
+
**Implementation Notes:** [Any special considerations]
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## 5. Implementation Plan
|
|
195
|
+
|
|
196
|
+
**Order of Implementation:**
|
|
197
|
+
1. Entities (create all entity files)
|
|
198
|
+
2. Native Pages (using framework defaults)
|
|
199
|
+
3. Custom Components (create custom components)
|
|
200
|
+
4. Integration (wire everything together)
|
|
201
|
+
|
|
202
|
+
**Dependencies:**
|
|
203
|
+
- [What depends on what]
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## 6. Validation Issues
|
|
208
|
+
|
|
209
|
+
List ANY problems found:
|
|
210
|
+
- ⚠️ [Issue description]
|
|
211
|
+
|
|
212
|
+
If no issues: ✅ All valid
|
|
213
|
+
</output_format>
|
|
214
|
+
|
|
215
|
+
<validation_checks>
|
|
216
|
+
Before outputting, verify:
|
|
217
|
+
□ Every HLD entity has a schema
|
|
218
|
+
□ Technical fields (id, createdAt, etc.) are NOT manually added (auto-added by defineEntity)
|
|
219
|
+
□ Every reference field has valid ref pointing to existing collection
|
|
220
|
+
□ Every select field has options array
|
|
221
|
+
□ Every HLD page has a route
|
|
222
|
+
□ Every HLD feature is mapped to a package
|
|
223
|
+
□ Collection names are plural lowercase
|
|
224
|
+
□ Visibility levels are: guest | user | admin | technical | hidden
|
|
225
|
+
□ All custom components have detailed specs
|
|
226
|
+
□ Implementation order is clear
|
|
227
|
+
|
|
228
|
+
Flag violations in "Validation Issues" section.
|
|
229
|
+
</validation_checks>
|
|
230
|
+
|
|
231
|
+
<examples>
|
|
232
|
+
GOOD OUTPUT (partial):
|
|
233
|
+
|
|
234
|
+
### entities/project.ts
|
|
235
|
+
```typescript
|
|
236
|
+
import { defineEntity } from '@donotdev/core';
|
|
237
|
+
|
|
238
|
+
export const projectEntity = defineEntity({
|
|
239
|
+
name: 'Project',
|
|
240
|
+
collection: 'projects',
|
|
241
|
+
fields: {
|
|
242
|
+
// Technical fields (id, createdAt, updatedAt, createdById, updatedById)
|
|
243
|
+
// are automatically added by defineEntity - no need to add them manually
|
|
244
|
+
name: {
|
|
245
|
+
type: 'text',
|
|
246
|
+
visibility: 'user',
|
|
247
|
+
validation: { required: true, minLength: 3 }
|
|
248
|
+
},
|
|
249
|
+
owner: {
|
|
250
|
+
type: 'reference',
|
|
251
|
+
visibility: 'user',
|
|
252
|
+
ref: 'users',
|
|
253
|
+
validation: { required: true }
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
BAD OUTPUT:
|
|
262
|
+
|
|
263
|
+
"The Project entity should have fields for name, owner, and status."
|
|
264
|
+
[WRONG: Description instead of code]
|
|
265
|
+
|
|
266
|
+
```typescript
|
|
267
|
+
owner: {
|
|
268
|
+
type: 'reference',
|
|
269
|
+
ref: 'User' // WRONG: Should be 'users' (collection name, not entity name)
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
</examples>
|
|
273
|
+
|
|
274
|
+
<recovery>
|
|
275
|
+
If HLD is ambiguous:
|
|
276
|
+
- State what's unclear
|
|
277
|
+
- Provide your best interpretation
|
|
278
|
+
- Flag in Validation Issues
|
|
279
|
+
|
|
280
|
+
If HLD has invalid field type:
|
|
281
|
+
- Map to closest valid type
|
|
282
|
+
- Flag in Validation Issues
|
|
283
|
+
|
|
284
|
+
If HLD entity has no fields listed:
|
|
285
|
+
- Flag as critical issue
|
|
286
|
+
- Skip generating empty schema
|
|
287
|
+
|
|
288
|
+
If custom component is unclear:
|
|
289
|
+
- Ask for clarification
|
|
290
|
+
- Provide best interpretation
|
|
291
|
+
- Flag in Validation Issues
|
|
292
|
+
</recovery>
|
|
293
|
+
|
|
294
|
+
<completion_check>
|
|
295
|
+
Output is complete when:
|
|
296
|
+
□ All entities have full schemas with code
|
|
297
|
+
□ Index file exports all entities
|
|
298
|
+
□ All routes are defined
|
|
299
|
+
□ All features are mapped
|
|
300
|
+
□ All custom components have detailed specs
|
|
301
|
+
□ Implementation plan is clear
|
|
302
|
+
□ All issues are flagged (or "✅ All valid")
|
|
303
|
+
|
|
304
|
+
Always generate complete results. If something is missing, flag it and still generate what you can.
|
|
305
|
+
</completion_check>
|
|
306
|
+
|
|
307
|
+
<start>
|
|
308
|
+
I will paste my HLD below. Transform it into technical artifacts (LLD).
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
HLD START
|
|
312
|
+
---
|
|
313
|
+
</start>
|