@lovrabet/rabetbase-cli 2.3.16-beta.7 → 2.4.1

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 (435) hide show
  1. package/README.md +4 -10
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/kb/create.js +1 -1
  102. package/lib/commands/kb/delete.js +1 -1
  103. package/lib/commands/kb/detail.js +1 -1
  104. package/lib/commands/kb/index.js +1 -1
  105. package/lib/commands/kb/list.js +1 -1
  106. package/lib/commands/kb/shared.js +1 -1
  107. package/lib/commands/kb/update.js +1 -1
  108. package/lib/commands/logs/index.js +1 -1
  109. package/lib/commands/menu/asset-update.js +1 -1
  110. package/lib/commands/menu/delete.js +1 -1
  111. package/lib/commands/menu/external-link-create.js +1 -1
  112. package/lib/commands/menu/external-link-update.js +1 -1
  113. package/lib/commands/menu/group-create.js +1 -1
  114. package/lib/commands/menu/group-update.js +1 -1
  115. package/lib/commands/menu/index.js +1 -1
  116. package/lib/commands/menu/list.js +1 -1
  117. package/lib/commands/menu/move.js +1 -1
  118. package/lib/commands/menu/regroup-start.js +1 -1
  119. package/lib/commands/menu/rename.js +1 -1
  120. package/lib/commands/menu/shared/compare-table.js +1 -1
  121. package/lib/commands/menu/shared/delete-plan.js +1 -1
  122. package/lib/commands/menu/shared/facts.js +1 -1
  123. package/lib/commands/menu/shared/index.js +1 -1
  124. package/lib/commands/menu/shared/inquirer.js +1 -1
  125. package/lib/commands/menu/shared/local-pages.js +1 -1
  126. package/lib/commands/menu/shared/logic.js +1 -1
  127. package/lib/commands/menu/shared/mutations.js +1 -1
  128. package/lib/commands/menu/shared/service.js +1 -1
  129. package/lib/commands/menu/shared/sync-core.js +1 -1
  130. package/lib/commands/menu/shared/update-core.js +1 -1
  131. package/lib/commands/menu/shared/valid-url.js +1 -1
  132. package/lib/commands/menu/sync.js +1 -1
  133. package/lib/commands/notification/config-list.js +1 -1
  134. package/lib/commands/notification/index.js +1 -1
  135. package/lib/commands/ocr/index.js +1 -1
  136. package/lib/commands/page/generate-start.js +1 -1
  137. package/lib/commands/page/generate-status.js +1 -1
  138. package/lib/commands/page/index.js +1 -1
  139. package/lib/commands/page/pull.js +1 -1
  140. package/lib/commands/page/push.js +1 -1
  141. package/lib/commands/page/react/create.d.ts +2 -0
  142. package/lib/commands/page/react/create.js +1 -0
  143. package/lib/commands/page/react/detail.d.ts +2 -0
  144. package/lib/commands/page/react/detail.js +1 -0
  145. package/lib/commands/page/react/list.d.ts +2 -0
  146. package/lib/commands/page/react/list.js +1 -0
  147. package/lib/commands/page/react/publish.d.ts +2 -0
  148. package/lib/commands/page/react/publish.js +1 -0
  149. package/lib/commands/page/react/shared.d.ts +78 -0
  150. package/lib/commands/page/react/shared.js +1 -0
  151. package/lib/commands/page/react/syntax.d.ts +18 -0
  152. package/lib/commands/page/react/syntax.js +1 -0
  153. package/lib/commands/page/react/template.d.ts +8 -0
  154. package/lib/commands/page/react/template.js +1 -0
  155. package/lib/commands/page/react/update.d.ts +2 -0
  156. package/lib/commands/page/react/update.js +1 -0
  157. package/lib/commands/page/relation-audit.js +1 -1
  158. package/lib/commands/page/restore.js +1 -1
  159. package/lib/commands/page/shared.d.ts +1 -0
  160. package/lib/commands/page/shared.js +1 -1
  161. package/lib/commands/page/standard-page-status.js +1 -1
  162. package/lib/commands/page/sync.js +1 -1
  163. package/lib/commands/permit/index.js +1 -1
  164. package/lib/commands/permit/page-get.js +1 -1
  165. package/lib/commands/permit/page-set.js +1 -1
  166. package/lib/commands/permit/role-apis-set.js +1 -1
  167. package/lib/commands/permit/role-menus-set.js +1 -1
  168. package/lib/commands/permit/role-menus.js +1 -1
  169. package/lib/commands/permit/shared.js +1 -1
  170. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  171. package/lib/commands/project/create/format-elapsed.js +1 -1
  172. package/lib/commands/project/create/main.js +1 -1
  173. package/lib/commands/project/create/non-interactive.js +1 -1
  174. package/lib/commands/project/create/project-template-path.js +1 -1
  175. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  176. package/lib/commands/project/create/use-format-code.js +1 -1
  177. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  178. package/lib/commands/project/index.js +1 -1
  179. package/lib/commands/project/upgrade.js +1 -1
  180. package/lib/commands/registry.js +1 -1
  181. package/lib/commands/role/create.js +1 -1
  182. package/lib/commands/role/delete.js +1 -1
  183. package/lib/commands/role/detail.js +1 -1
  184. package/lib/commands/role/index.js +1 -1
  185. package/lib/commands/role/list.js +1 -1
  186. package/lib/commands/role/shared.js +1 -1
  187. package/lib/commands/role/update.js +1 -1
  188. package/lib/commands/role/user-add.js +1 -1
  189. package/lib/commands/role/user-remove.js +1 -1
  190. package/lib/commands/role/user-resolve.js +1 -1
  191. package/lib/commands/run/index.js +1 -1
  192. package/lib/commands/schema.js +1 -1
  193. package/lib/commands/sql/create.js +1 -1
  194. package/lib/commands/sql/delete.js +1 -1
  195. package/lib/commands/sql/detail.js +1 -1
  196. package/lib/commands/sql/exec.js +1 -1
  197. package/lib/commands/sql/index.js +1 -1
  198. package/lib/commands/sql/list.js +1 -1
  199. package/lib/commands/sql/pull.js +1 -1
  200. package/lib/commands/sql/push.js +1 -1
  201. package/lib/commands/sql/shared.js +1 -1
  202. package/lib/commands/sql/status.js +1 -1
  203. package/lib/commands/sql/validate.js +1 -1
  204. package/lib/commands/task/index.js +1 -1
  205. package/lib/commands/task/status.js +1 -1
  206. package/lib/commands/tenant/index.js +1 -1
  207. package/lib/commands/tenant/members-list.js +1 -1
  208. package/lib/commands/tenant/shared.js +1 -1
  209. package/lib/commands/user-account/dingding-sandbox-bind.d.ts +2 -0
  210. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -0
  211. package/lib/commands/user-account/index.d.ts +2 -0
  212. package/lib/commands/user-account/index.js +1 -0
  213. package/lib/commands/workspace/add.js +1 -1
  214. package/lib/commands/workspace/index.js +1 -1
  215. package/lib/commands/workspace/remove.js +1 -1
  216. package/lib/config/schema.js +1 -1
  217. package/lib/constant/cdn.js +1 -1
  218. package/lib/constant/cli.js +1 -1
  219. package/lib/constant/defaults.js +1 -1
  220. package/lib/constant/domain.js +1 -1
  221. package/lib/constant/env.js +1 -1
  222. package/lib/constant/output.js +1 -1
  223. package/lib/constant/paths.js +1 -1
  224. package/lib/constant/risk.js +1 -1
  225. package/lib/context/app-resolver.js +1 -1
  226. package/lib/context/auth-resolver.js +1 -1
  227. package/lib/context/config-loader.js +1 -1
  228. package/lib/context.js +1 -1
  229. package/lib/core/alias-resolver.js +1 -1
  230. package/lib/core/api-client.d.ts +117 -0
  231. package/lib/core/api-client.js +1 -1
  232. package/lib/core/bff/config.js +1 -1
  233. package/lib/core/bff/file-system.js +1 -1
  234. package/lib/core/bff/hash.js +1 -1
  235. package/lib/core/bff/lock.js +1 -1
  236. package/lib/core/bff/utils.js +1 -1
  237. package/lib/core/db-resolver.js +1 -1
  238. package/lib/core/page/file-system.js +1 -1
  239. package/lib/core/page/hash.js +1 -1
  240. package/lib/core/page/lock.js +1 -1
  241. package/lib/core/sql-index-auditor.js +1 -1
  242. package/lib/core/sql-sync/config.js +1 -1
  243. package/lib/core/sql-sync/file-system.js +1 -1
  244. package/lib/core/sql-sync/hash.js +1 -1
  245. package/lib/core/sql-sync/lock.js +1 -1
  246. package/lib/core/sql-sync/utils.js +1 -1
  247. package/lib/core/sql-validator.js +1 -1
  248. package/lib/errors.js +1 -1
  249. package/lib/framework/build-all-flags.js +1 -1
  250. package/lib/framework/error-output.js +1 -1
  251. package/lib/framework/explicit-yes.js +1 -1
  252. package/lib/framework/flags.js +1 -1
  253. package/lib/framework/help.js +1 -1
  254. package/lib/framework/index.js +1 -1
  255. package/lib/framework/output.js +1 -1
  256. package/lib/framework/response.js +1 -1
  257. package/lib/framework/runner-alias.js +1 -1
  258. package/lib/framework/runner.js +1 -1
  259. package/lib/framework/schema-export.js +1 -1
  260. package/lib/framework/types.js +1 -1
  261. package/lib/generated/build-info.d.ts +4 -4
  262. package/lib/generated/build-info.js +1 -1
  263. package/lib/help.js +1 -1
  264. package/lib/postinstall.d.ts +3 -0
  265. package/lib/postinstall.js +1 -0
  266. package/lib/runtime/confirmation.js +1 -1
  267. package/lib/runtime/event.js +1 -1
  268. package/lib/runtime/index.js +1 -1
  269. package/lib/runtime/queue.js +1 -1
  270. package/lib/runtime/resolve.js +1 -1
  271. package/lib/skills/builtin-skill.d.ts +37 -0
  272. package/lib/skills/builtin-skill.js +1 -0
  273. package/lib/skills/main.js +1 -1
  274. package/lib/skills/npx-skills-add.d.ts +4 -2
  275. package/lib/skills/npx-skills-add.js +1 -1
  276. package/lib/skills/skill-presence.js +1 -1
  277. package/lib/telemetry/cli-command-trace.js +1 -1
  278. package/lib/telemetry/cli-help-trace.js +1 -1
  279. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  280. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  281. package/lib/telemetry/send-cli-trace-log.js +1 -1
  282. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  283. package/lib/utils/ai_config.js +1 -1
  284. package/lib/utils/apply-jq-filter.js +1 -1
  285. package/lib/utils/cdn-config.js +1 -1
  286. package/lib/utils/check-sdk-version.js +1 -1
  287. package/lib/utils/cli-version-check.js +1 -1
  288. package/lib/utils/cli-version-policy.js +1 -1
  289. package/lib/utils/config.js +1 -1
  290. package/lib/utils/copy-directory.js +1 -1
  291. package/lib/utils/entity-with-id.js +1 -1
  292. package/lib/utils/file-utils.js +1 -1
  293. package/lib/utils/guides-cdn.js +1 -1
  294. package/lib/utils/http-client.js +1 -1
  295. package/lib/utils/is-non-interactive.js +1 -1
  296. package/lib/utils/logger.js +1 -1
  297. package/lib/utils/params.js +1 -1
  298. package/lib/utils/platform.js +1 -1
  299. package/lib/utils/rules-cdn.js +1 -1
  300. package/lib/utils/sleep.js +1 -1
  301. package/lib/utils/template-replacer.js +1 -1
  302. package/lib/utils/update-notice.js +1 -1
  303. package/lib/utils/version.js +1 -1
  304. package/lib/utils/with-active-cookie.js +1 -1
  305. package/lib/utils/write-cli-side-channel.js +1 -1
  306. package/package.json +9 -3
  307. package/scripts/postinstall.mjs +24 -0
  308. package/skills/rabetbase/SKILL.md +493 -0
  309. package/skills/rabetbase/guides/backend-function.md +835 -0
  310. package/skills/rabetbase/guides/best-practices.md +137 -0
  311. package/skills/rabetbase/guides/bff-creation-workflow.md +148 -0
  312. package/skills/rabetbase/guides/conflict-detection.md +119 -0
  313. package/skills/rabetbase/guides/data-api-guidelines.md +414 -0
  314. package/skills/rabetbase/guides/database-connection-workflow.md +169 -0
  315. package/skills/rabetbase/guides/frontend-development.md +179 -0
  316. package/skills/rabetbase/guides/legacy-application-blueprint-workflow.md +495 -0
  317. package/skills/rabetbase/guides/menu-anomaly-manual-cleanup.md +137 -0
  318. package/skills/rabetbase/guides/page-development-workflow.md +187 -0
  319. package/skills/rabetbase/guides/react-custom-page-workflow.md +184 -0
  320. package/skills/rabetbase/guides/role-permit-workflow.md +127 -0
  321. package/skills/rabetbase/guides/sql-creation-workflow.md +173 -0
  322. package/skills/rabetbase/guides/sql-mybatis.md +126 -0
  323. package/skills/rabetbase/guides/troubleshooting.md +67 -0
  324. package/skills/rabetbase/guides/typescript-sdk.md +227 -0
  325. package/skills/rabetbase/knowledge/page-schema/LrSmartCreate.md +367 -0
  326. package/skills/rabetbase/knowledge/page-schema/LrSmartDetail.md +153 -0
  327. package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +291 -0
  328. package/skills/rabetbase/knowledge/page-schema/LrSmartFilter.md +478 -0
  329. package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +119 -0
  330. package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +223 -0
  331. package/skills/rabetbase/knowledge/page-schema/LrSmartTable.md +632 -0
  332. package/skills/rabetbase/knowledge/page-schema/YtPage.md +172 -0
  333. package/skills/rabetbase/knowledge/page-schema/dataset-relations.md +126 -0
  334. package/skills/rabetbase/knowledge/page-schema/external-resources-usage.md +232 -0
  335. package/skills/rabetbase/knowledge/page-schema/field-components.md +312 -0
  336. package/skills/rabetbase/knowledge/page-schema/syntax-reference.md +278 -0
  337. package/skills/rabetbase/knowledge/react-page/components.md +225 -0
  338. package/skills/rabetbase/knowledge/react-page/generation-standards.md +385 -0
  339. package/skills/rabetbase/references/rabetbase-api-list.md +58 -0
  340. package/skills/rabetbase/references/rabetbase-api-pull.md +82 -0
  341. package/skills/rabetbase/references/rabetbase-app-config.md +95 -0
  342. package/skills/rabetbase/references/rabetbase-app-list.md +79 -0
  343. package/skills/rabetbase/references/rabetbase-app-members-list.md +64 -0
  344. package/skills/rabetbase/references/rabetbase-auth-login.md +53 -0
  345. package/skills/rabetbase/references/rabetbase-auth-logout.md +29 -0
  346. package/skills/rabetbase/references/rabetbase-bff-create.md +59 -0
  347. package/skills/rabetbase/references/rabetbase-bff-delete.md +42 -0
  348. package/skills/rabetbase/references/rabetbase-bff-detail.md +38 -0
  349. package/skills/rabetbase/references/rabetbase-bff-list.md +61 -0
  350. package/skills/rabetbase/references/rabetbase-bff-pull.md +42 -0
  351. package/skills/rabetbase/references/rabetbase-bff-push.md +65 -0
  352. package/skills/rabetbase/references/rabetbase-bff-save.md +63 -0
  353. package/skills/rabetbase/references/rabetbase-bff-status.md +37 -0
  354. package/skills/rabetbase/references/rabetbase-cli-skill-install.md +42 -0
  355. package/skills/rabetbase/references/rabetbase-codegen-sdk.md +35 -0
  356. package/skills/rabetbase/references/rabetbase-codegen-sql.md +33 -0
  357. package/skills/rabetbase/references/rabetbase-config.md +296 -0
  358. package/skills/rabetbase/references/rabetbase-dataset-business-group-update.md +84 -0
  359. package/skills/rabetbase/references/rabetbase-dataset-delete.md +54 -0
  360. package/skills/rabetbase/references/rabetbase-dataset-detail.md +106 -0
  361. package/skills/rabetbase/references/rabetbase-dataset-extend-update.md +70 -0
  362. package/skills/rabetbase/references/rabetbase-dataset-field-update.md +117 -0
  363. package/skills/rabetbase/references/rabetbase-dataset-generate.md +206 -0
  364. package/skills/rabetbase/references/rabetbase-dataset-list.md +42 -0
  365. package/skills/rabetbase/references/rabetbase-dataset-operations.md +34 -0
  366. package/skills/rabetbase/references/rabetbase-dataset-relation-audit.md +63 -0
  367. package/skills/rabetbase/references/rabetbase-dataset-relation-mutations.md +141 -0
  368. package/skills/rabetbase/references/rabetbase-dataset-relations.md +71 -0
  369. package/skills/rabetbase/references/rabetbase-dataset-rename.md +107 -0
  370. package/skills/rabetbase/references/rabetbase-dataset-restore.md +54 -0
  371. package/skills/rabetbase/references/rabetbase-db-analyze.md +135 -0
  372. package/skills/rabetbase/references/rabetbase-db-create.md +54 -0
  373. package/skills/rabetbase/references/rabetbase-db-delete.md +26 -0
  374. package/skills/rabetbase/references/rabetbase-db-detail.md +27 -0
  375. package/skills/rabetbase/references/rabetbase-db-diff.md +57 -0
  376. package/skills/rabetbase/references/rabetbase-db-list.md +37 -0
  377. package/skills/rabetbase/references/rabetbase-db-tables.md +25 -0
  378. package/skills/rabetbase/references/rabetbase-db-test.md +29 -0
  379. package/skills/rabetbase/references/rabetbase-db-update.md +29 -0
  380. package/skills/rabetbase/references/rabetbase-doctor.md +62 -0
  381. package/skills/rabetbase/references/rabetbase-file.md +35 -0
  382. package/skills/rabetbase/references/rabetbase-init.md +70 -0
  383. package/skills/rabetbase/references/rabetbase-issue-report.md +132 -0
  384. package/skills/rabetbase/references/rabetbase-kb.md +62 -0
  385. package/skills/rabetbase/references/rabetbase-menu-asset-update.md +135 -0
  386. package/skills/rabetbase/references/rabetbase-menu-delete.md +54 -0
  387. package/skills/rabetbase/references/rabetbase-menu-external-link-create.md +63 -0
  388. package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +74 -0
  389. package/skills/rabetbase/references/rabetbase-menu-group-create.md +33 -0
  390. package/skills/rabetbase/references/rabetbase-menu-group-update.md +38 -0
  391. package/skills/rabetbase/references/rabetbase-menu-list.md +144 -0
  392. package/skills/rabetbase/references/rabetbase-menu-move.md +54 -0
  393. package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +45 -0
  394. package/skills/rabetbase/references/rabetbase-menu-rename.md +48 -0
  395. package/skills/rabetbase/references/rabetbase-menu-sync.md +60 -0
  396. package/skills/rabetbase/references/rabetbase-notification-config-list.md +80 -0
  397. package/skills/rabetbase/references/rabetbase-ocr.md +86 -0
  398. package/skills/rabetbase/references/rabetbase-page-generate-start.md +32 -0
  399. package/skills/rabetbase/references/rabetbase-page-generate-status.md +32 -0
  400. package/skills/rabetbase/references/rabetbase-page-pull.md +47 -0
  401. package/skills/rabetbase/references/rabetbase-page-push.md +45 -0
  402. package/skills/rabetbase/references/rabetbase-page-react-create.md +29 -0
  403. package/skills/rabetbase/references/rabetbase-page-react-detail.md +26 -0
  404. package/skills/rabetbase/references/rabetbase-page-react-list.md +23 -0
  405. package/skills/rabetbase/references/rabetbase-page-react-publish.md +23 -0
  406. package/skills/rabetbase/references/rabetbase-page-react-update.md +24 -0
  407. package/skills/rabetbase/references/rabetbase-page-relation-binding.md +72 -0
  408. package/skills/rabetbase/references/rabetbase-page-restore.md +45 -0
  409. package/skills/rabetbase/references/rabetbase-page-sync.md +36 -0
  410. package/skills/rabetbase/references/rabetbase-permit-page-set.md +69 -0
  411. package/skills/rabetbase/references/rabetbase-permit-role-apis-set.md +53 -0
  412. package/skills/rabetbase/references/rabetbase-permit-role-menus-set.md +57 -0
  413. package/skills/rabetbase/references/rabetbase-project-create.md +46 -0
  414. package/skills/rabetbase/references/rabetbase-project-upgrade.md +57 -0
  415. package/skills/rabetbase/references/rabetbase-role-list.md +68 -0
  416. package/skills/rabetbase/references/rabetbase-role-user-add.md +54 -0
  417. package/skills/rabetbase/references/rabetbase-role-user-resolve.md +27 -0
  418. package/skills/rabetbase/references/rabetbase-run.md +53 -0
  419. package/skills/rabetbase/references/rabetbase-schema.md +22 -0
  420. package/skills/rabetbase/references/rabetbase-sql-create.md +41 -0
  421. package/skills/rabetbase/references/rabetbase-sql-delete.md +37 -0
  422. package/skills/rabetbase/references/rabetbase-sql-detail.md +32 -0
  423. package/skills/rabetbase/references/rabetbase-sql-exec.md +34 -0
  424. package/skills/rabetbase/references/rabetbase-sql-list.md +54 -0
  425. package/skills/rabetbase/references/rabetbase-sql-pull.md +54 -0
  426. package/skills/rabetbase/references/rabetbase-sql-push.md +46 -0
  427. package/skills/rabetbase/references/rabetbase-sql-status.md +39 -0
  428. package/skills/rabetbase/references/rabetbase-sql-validate.md +73 -0
  429. package/skills/rabetbase/references/rabetbase-standard-page-status.md +31 -0
  430. package/skills/rabetbase/references/rabetbase-task-status.md +40 -0
  431. package/skills/rabetbase/references/rabetbase-tenant-members-list.md +69 -0
  432. package/skills/rabetbase/references/rabetbase-update.md +56 -0
  433. package/skills/rabetbase/references/rabetbase-user-account.md +45 -0
  434. package/skills/rabetbase/references/rabetbase-workspace.md +60 -0
  435. package/skills/rabetbase.manifest.json +137 -0
@@ -0,0 +1,179 @@
1
+ # 前端页面开发补充约束
2
+
3
+ > 目标:只约束 Lovrabet 前端页面开发中的特有要求,不重复讲 React、Ant Design 或通用前端基础。
4
+ >
5
+ > 前置阅读:`data-api-guidelines.md`
6
+
7
+ ## 何时使用
8
+
9
+ 当任务满足任一条件时,必须阅读并遵守本指南:
10
+
11
+ * 新建 Lovrabet 前端页面
12
+ * 修改现有页面的数据集接入方式
13
+ * 处理页面中的下拉、枚举、外键字段
14
+ * 检查页面是否符合 Lovrabet CLI 和 UI 约束
15
+
16
+ ## 核心原则
17
+
18
+ * 前端页面写代码前,必须先获取数据集详情
19
+ * 字段名、外键关系、枚举选项都不得凭空猜测
20
+ * 页面数据优先使用真实接口,不使用 mock 代替正式接入
21
+ * 性能优化、批量查询、多表关系分析统一遵守 `data-api-guidelines.md`
22
+ * 本文只保留 Lovrabet 特有要求,不承担 React 教程职能
23
+
24
+ ## 页面文件规范
25
+
26
+ ### 页面顶部注释
27
+
28
+ 所有页面必须保留 CLI 生成注释:
29
+
30
+ ```tsx
31
+ /**
32
+ * Generated by Lovrabet CLI v{CliVersion}
33
+ * Created: {CreatedAt}
34
+ * Page: {PageName}
35
+ */
36
+ ```
37
+
38
+ 规则:
39
+
40
+ * 不要删除原始注释
41
+ * 不要改写原始生成信息
42
+ * 若需要记录后续修改,只追加 `@modified`
43
+
44
+ ```tsx
45
+ /**
46
+ * Generated by Lovrabet CLI v1.2.5-beta.2
47
+ * Created: 01-18-2026, 21:33:08
48
+ * Page: user-profile
49
+ *
50
+ * @modified 2025-01-20 添加批量删除功能
51
+ */
52
+ ```
53
+
54
+ ### `displayName`
55
+
56
+ 所有页面组件导出时必须设置 `displayName`:
57
+
58
+ ```tsx
59
+ export default function UserProfile() {
60
+ return null;
61
+ }
62
+
63
+ UserProfile.displayName = "用户详情";
64
+ ```
65
+
66
+ 规则:
67
+
68
+ * 使用简洁业务名称
69
+ * 推荐 2 到 4 个字
70
+ * 不要省略
71
+
72
+ ## 数据集接入规则
73
+
74
+ 写页面前,必须先执行 `rabetbase dataset detail --code xxx --format json`。
75
+
76
+ 至少确认:
77
+
78
+ * 字段名
79
+ * 字段类型
80
+ * 是否必填
81
+ * 是否为枚举字段
82
+ * 是否存在主外键关系
83
+
84
+ 禁止行为:
85
+
86
+ * 未看数据集详情就直接写字段
87
+ * 直接猜测 `status`、`name`、`customer_id` 之类字段
88
+ * 把别的页面或别的项目中的字段名直接复制过来
89
+
90
+ ## 外键与枚举字段
91
+
92
+ 规则:
93
+
94
+ * 外键字段的下拉数据,来自关联数据集接口
95
+ * 枚举字段的选项,来自字段定义中的 `options`
96
+ * 级联字段按父字段变化重新加载,不要硬编码
97
+
98
+ 不要做的事:
99
+
100
+ * 用固定数组伪造正式下拉数据
101
+ * 在未确认关系时直接把字段当外键处理
102
+
103
+ ## 前端 SDK 约束
104
+
105
+ 前端列表查询优先使用 `filter()`,单条主键查询使用 `getOne({ id })`。
106
+
107
+ 示例:
108
+
109
+ ```tsx
110
+ const result = await client.models.customers.filter({
111
+ where: { status: { $eq: "active" } },
112
+ select: ["id", "customer_name"],
113
+ });
114
+
115
+ const customer = await client.models.customers.getOne({ id: customerId });
116
+ ```
117
+
118
+ 规则:
119
+
120
+ * 使用 `filter()` 进行列表和条件查询
121
+ * 不要在页面里写循环单条请求
122
+ * 批量查询和性能优化统一参考 `data-api-guidelines.md`
123
+
124
+ ## 禁止 Mock 替代正式数据
125
+
126
+ 页面正式开发时:
127
+
128
+ * 不要用 mock 数据替代真实接口
129
+ * 不要把演示数据当成生产页面接入方案
130
+ * 若页面仍未接通真实接口,应明确标记为占位或演示状态
131
+
132
+ ## UI 文案与风格约束
133
+
134
+ 只保留 Lovrabet 项目特有要求:
135
+
136
+ * 不要使用 emoji
137
+ * 不要使用 AI 味道文案
138
+ * 不要在按钮和标题中使用感叹号
139
+ * 图标使用 `@ant-design/icons`
140
+ * 文案保持简洁、专业、中性
141
+
142
+ 示例:
143
+
144
+ ```tsx
145
+ message.success("操作成功");
146
+ message.error("操作失败,请重试");
147
+ ```
148
+
149
+ 不要写成:
150
+
151
+ ```tsx
152
+ message.success("太棒了!操作成功!");
153
+ ```
154
+
155
+ ## 禁止事项
156
+
157
+ * 不要删除页面顶部生成注释
158
+ * 不要省略 `displayName`
159
+ * 不要未读数据集详情就写字段
160
+ * 不要用 mock 数据替代正式接口
161
+ * 不要在页面中做 N+1 查询
162
+ * 不要使用 emoji、感叹号、AI 味道文案
163
+
164
+ ## 自检清单
165
+
166
+ * [ ] 页面顶部生成注释仍然存在
167
+ * [ ] 如有手工修改,使用了 `@modified`
168
+ * [ ] 页面组件已设置 `displayName`
169
+ * [ ] 已执行 `rabetbase dataset detail` 获取字段与关系
170
+ * [ ] 外键字段的数据来源已确认
171
+ * [ ] 枚举字段的选项来源已确认
172
+ * [ ] 未使用 mock 数据替代正式接口
173
+ * [ ] 无循环单条查询
174
+ * [ ] 文案简洁专业,无 emoji、无感叹号
175
+
176
+ ## 相关指南
177
+
178
+ * `backend-function.md`
179
+ * `data-api-guidelines.md`
@@ -0,0 +1,495 @@
1
+ # Legacy Application Blueprint Workflow
2
+
3
+ Use this workflow when modernizing a legacy application into the Lovrabet architecture, especially when the developer has limited project knowledge, the handoff is incomplete, or the application was received from an external vendor.
4
+
5
+ The goal is not to rewrite code immediately. The goal is to produce a reviewable **Lovrabet Application Blueprint** that connects legacy code behavior with Lovrabet datasets, dataset relations, Instant API, Custom SQL, Backend Functions, Hooks, Common Functions, and optional Enterprise Java Services.
6
+
7
+ ## Core Principle
8
+
9
+ Do not ask the developer to explain the legacy system first. In many real projects, the developer is also new to the codebase.
10
+
11
+ Instead:
12
+
13
+ 1. Collect evidence from code, SQL, configuration, tests, documentation, and git history.
14
+ 2. Collect platform facts from `rabetbase dataset detail`, `dataset relations`, `db tables`, `db diff`, `sql list/detail`, and `bff list/detail`.
15
+ 3. Bind legacy code artifacts to Lovrabet datasets and relations.
16
+ 4. Generate an Application Blueprint as Markdown.
17
+ 5. Ask humans only for high-impact uncertainties that cannot be resolved from evidence.
18
+
19
+ ## Primary Output
20
+
21
+ The primary output is Markdown:
22
+
23
+ ```text
24
+ .rabetbase/blueprint/<appCode>/application-blueprint.md
25
+ ```
26
+
27
+ For larger projects, split the output into:
28
+
29
+ ```text
30
+ .rabetbase/blueprint/<appCode>/
31
+ application-blueprint.md
32
+ migration-backlog.md
33
+ manual-confirmation.md
34
+ application-blueprint.json
35
+ ```
36
+
37
+ If the analysis covers multiple legacy repositories for one Lovrabet app, add a source name:
38
+
39
+ ```text
40
+ .rabetbase/blueprint/<appCode>/<sourceName>/
41
+ application-blueprint.md
42
+ migration-backlog.md
43
+ manual-confirmation.md
44
+ application-blueprint.json
45
+ ```
46
+
47
+ Markdown is the source of review and handoff. JSON is optional and only for later automation by agents or CLI commands.
48
+
49
+ ## Why This Is Not Just Code Mapping
50
+
51
+ Generic code analysis tools can inspect routes, services, repositories, and SQL, but they do not know the Lovrabet data model.
52
+
53
+ Lovrabet analysis must combine:
54
+
55
+ ```text
56
+ Legacy Logic Graph + Dataset Graph + rabetbase CLI Facts = Application Blueprint
57
+ ```
58
+
59
+ Use platform facts to reduce guesswork:
60
+
61
+ - `rabetbase dataset detail --code <datasetCode> --format compress`
62
+ - `rabetbase dataset relations --format compress`
63
+ - `rabetbase db tables --format compress`
64
+ - `rabetbase db diff --format compress`
65
+ - `rabetbase sql list/detail --format compress`
66
+ - `rabetbase bff list/detail --format compress`
67
+
68
+ Do not infer field names, enum values, or relationships from legacy naming alone when Lovrabet dataset metadata is available.
69
+
70
+ ## Blueprint Entity Model
71
+
72
+ ### 1. Codebase Snapshot
73
+
74
+ The analysis baseline.
75
+
76
+ Record:
77
+
78
+ - Repository or local path
79
+ - Branch and commit
80
+ - Analysis time
81
+ - Scanned directories
82
+ - Excluded or inaccessible directories
83
+ - Detected frameworks, build tools, ORM, SQL style, jobs, queues, and integrations
84
+ - Known limitations of this analysis pass
85
+
86
+ ### 2. Logic Graph
87
+
88
+ The legacy code behavior graph.
89
+
90
+ Node types:
91
+
92
+ - `EntryPoint`: route, controller, handler, job, consumer, webhook, CLI
93
+ - `BusinessAction`: create order, submit approval, import customer, cancel payment
94
+ - `ServiceMethod`: legacy service or domain method
95
+ - `RepositoryMethod`: mapper, DAO, repository method
96
+ - `SqlStatement`: SQL, XML mapper, ORM query
97
+ - `StateTransition`: status fields and transitions
98
+ - `PermissionRule`: auth, role, tenant, department, owner filtering
99
+ - `SideEffect`: external API, MQ, cache, audit log, file, message
100
+ - `SharedFunction`: validators, calculators, ID generators, converters
101
+ - `ExternalDependency`: third-party platform, gateway, retained worker
102
+
103
+ ### 3. Dataset Binding
104
+
105
+ The Lovrabet-specific bridge between legacy logic and platform truth.
106
+
107
+ It answers:
108
+
109
+ - Which legacy table maps to which Dataset?
110
+ - Which legacy field maps to which Dataset field?
111
+ - Which legacy enum or status field maps to Dataset options?
112
+ - Which legacy SQL joins map to Dataset Relations?
113
+ - Which repository writes affect which Datasets?
114
+ - Which business action affects which Dataset group?
115
+ - Which Dataset or Relation is missing and should become a model adjustment?
116
+
117
+ ### 4. Capability Mapping
118
+
119
+ The mapping from legacy behavior to Lovrabet capability:
120
+
121
+ - Instant API
122
+ - Custom SQL
123
+ - Backend Function
124
+ - Hooks Function
125
+ - Common Function
126
+ - Enterprise Java Service
127
+ - External Retained System
128
+
129
+ ### 5. Migration Asset
130
+
131
+ The reviewable migration inventory:
132
+
133
+ - Dataset adjustment candidates
134
+ - Instant API candidates
135
+ - Custom SQL candidates
136
+ - Backend Function candidates
137
+ - Hook candidates
138
+ - Common Function candidates
139
+ - Java Service candidates
140
+ - External retained systems
141
+ - Manual confirmation items
142
+
143
+ ### 6. Implementation Draft
144
+
145
+ Optional implementation sketches after blueprint review:
146
+
147
+ - `.rabetbase/sql/...` Custom SQL draft
148
+ - `.rabetbase/bff/...` Backend Function draft
149
+ - Hook draft
150
+ - Common Function draft
151
+ - Java Service interface draft
152
+ - Validation commands
153
+ - Runtime smoke checklist
154
+
155
+ Do not treat drafts as finished code. Do not push SQL or BFF until the relevant reference docs have been read and dry-run validation has passed.
156
+
157
+ ## Evidence Collection
158
+
159
+ ### Code Evidence
160
+
161
+ Search for:
162
+
163
+ - HTTP routes, controllers, handlers, resolvers
164
+ - CLI commands, cron jobs, schedulers, MQ consumers, webhooks
165
+ - Services, domains, managers, processors, workflows, use cases
166
+ - Repositories, DAOs, mappers, entities, models, schemas, migrations
167
+ - SQL files, XML mappers, ORM queries
168
+ - Middleware, interceptors, guards, filters, permission checks
169
+ - HTTP clients, RPC clients, MQ producers, cache, mail, SMS, IM, file storage, audit logs
170
+ - Tests, fixtures, seed data, README, API docs, deployment docs
171
+ - Git history: high-churn files, files often changed together, hotfix commits, commit messages that introduced major modules
172
+
173
+ ### Platform Evidence
174
+
175
+ Use Lovrabet platform facts to calibrate code inference:
176
+
177
+ - `dataset detail`: fields, field types, required flags, enum options, display names
178
+ - `dataset relations`: relationship facts, join candidates, parent-child or reference relationships
179
+ - `db tables` and `db diff`: physical table facts and Dataset mismatch checks
180
+ - `sql list/detail`: existing Custom SQL that should not be duplicated
181
+ - `bff list/detail`: existing BFF, Hook, and Common scripts that should not be overwritten
182
+
183
+ ### Evidence Record Format
184
+
185
+ Every important claim should be recorded in this shape:
186
+
187
+ ```markdown
188
+ ### Claim: <short conclusion>
189
+
190
+ - Type: fact | inference
191
+ - Confidence: high | medium | low
192
+ - Code evidence:
193
+ - `<path>`: <symbol or behavior>
194
+ - Platform evidence:
195
+ - Dataset: `<datasetCode>` / `<datasetName>`
196
+ - Field: `<fieldName>` / `<type>` / `<options>`
197
+ - Relation: `<fromDataset> -> <toDataset>`
198
+ - Assumption: <only if needed>
199
+ - Risk if wrong: <migration impact>
200
+ ```
201
+
202
+ ## Required Blueprint Sections
203
+
204
+ ### 1. Executive Summary
205
+
206
+ Include:
207
+
208
+ - Legacy technology stack
209
+ - Key business domains detected
210
+ - Dataset and Dataset Relation coverage
211
+ - Recommended migration path
212
+ - Highest-risk areas
213
+ - Number of manual confirmation items
214
+ - Whether implementation drafts are included
215
+
216
+ ### 2. Codebase Snapshot
217
+
218
+ Recommended table:
219
+
220
+ ```markdown
221
+ | Item | Value |
222
+ | --- | --- |
223
+ | Repository | |
224
+ | Branch / commit | |
225
+ | AppCode | |
226
+ | Analysis time | |
227
+ | Scanned directories | |
228
+ | Excluded directories | |
229
+ | Detected stack | |
230
+ | Known limitations | |
231
+ ```
232
+
233
+ ### 3. Logic Graph Summary
234
+
235
+ Recommended table:
236
+
237
+ ```markdown
238
+ | Node | Type | Evidence | Downstream | Confidence |
239
+ | --- | --- | --- | --- | --- |
240
+ ```
241
+
242
+ For key business actions, include the call chain:
243
+
244
+ ```markdown
245
+ ### Business Action: <name>
246
+
247
+ - Entry point:
248
+ - Main chain:
249
+ - Data reads:
250
+ - Data writes:
251
+ - State transitions:
252
+ - Permission checks:
253
+ - Side effects:
254
+ - Evidence:
255
+ - Confidence:
256
+ ```
257
+
258
+ ### 4. Dataset Binding Report
259
+
260
+ Recommended table:
261
+
262
+ ```markdown
263
+ | Legacy artifact | Code evidence | Dataset | Field mapping | Relations | Confidence | Risk |
264
+ | --- | --- | --- | --- | --- | --- | --- |
265
+ ```
266
+
267
+ Rules:
268
+
269
+ - Name similarity alone is weak evidence.
270
+ - Dataset field type and enum values come from `dataset detail`.
271
+ - Relationships come from `dataset relations` when available.
272
+ - Missing relations should become Dataset adjustment candidates or manual confirmation items.
273
+ - If the legacy model conflicts with Dataset metadata, do not generate implementation drafts yet.
274
+
275
+ ### 5. Lovrabet Capability Mapping
276
+
277
+ Recommended table:
278
+
279
+ ```markdown
280
+ | Business action / query | Code evidence | Dataset facts | Recommended capability | Why | Not recommended | Risk | Confidence |
281
+ | --- | --- | --- | --- | --- | --- | --- | --- |
282
+ ```
283
+
284
+ Default to Instant API only when the action is simple single-dataset CRUD with clear permissions and no significant transaction, state machine, or side effect.
285
+
286
+ ### 6. Migration Backlog
287
+
288
+ Create a staged backlog ordered by risk:
289
+
290
+ 1. Dataset adjustments
291
+ 2. Instant API replacements
292
+ 3. Custom SQL
293
+ 4. Backend Functions
294
+ 5. Hooks Functions
295
+ 6. Common Functions
296
+ 7. Enterprise Java Services
297
+ 8. External retained integrations
298
+
299
+ Recommended table:
300
+
301
+ ```markdown
302
+ | Stage | Task | Goal | Evidence | Lovrabet capability | Dependencies | Acceptance criteria | Risk | Confidence |
303
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- |
304
+ ```
305
+
306
+ ### 7. Manual Confirmation Items
307
+
308
+ Only ask humans to confirm high-impact uncertainties that cannot be resolved from code or platform facts.
309
+
310
+ Use evidence-based options, not open-ended questions:
311
+
312
+ ```markdown
313
+ ### Question: Should order cancellation succeed when refund fails?
314
+
315
+ - Impact: Defines transaction behavior for the future Backend Function.
316
+ - Code evidence:
317
+ - `src/services/orderService.ts` updates order status before refund.
318
+ - `src/integrations/payment.ts` catches refund errors and logs them.
319
+ - No retry queue or compensation job was found.
320
+ - Dataset / Relations evidence:
321
+ - `order_xxx` contains `orderStatus`.
322
+ - `refund_log_xxx` is linked to `order_xxx`.
323
+ - Options:
324
+ 1. Order cancellation succeeds and refund is compensated asynchronously.
325
+ 2. Refund failure makes order cancellation fail.
326
+ 3. Current behavior is a legacy bug and should be corrected during migration.
327
+ - AI default: Option 1.
328
+ - Risk if unresolved: The migration may change transaction semantics.
329
+ ```
330
+
331
+ ### 8. Implementation Draft
332
+
333
+ Include this section only after the blueprint is reviewed or when the user explicitly asks for implementation planning.
334
+
335
+ Recommended subsections:
336
+
337
+ - Custom SQL drafts
338
+ - Backend Function drafts
339
+ - Hook drafts
340
+ - Common Function drafts
341
+ - Enterprise Java Service interface drafts
342
+ - Validation commands
343
+ - Runtime smoke checks
344
+
345
+ ## Capability Decision Matrix
346
+
347
+ | Question | If yes | Recommended capability |
348
+ | --- | --- | --- |
349
+ | Is it simple single-Dataset CRUD? | Yes | Instant API |
350
+ | Is it simple filtering, pagination, or sorting? | Yes | Instant API |
351
+ | Does it need joins, aggregation, reports, dashboards, or exports? | Yes | Custom SQL |
352
+ | Does it write multiple Datasets together? | Yes | Backend Function |
353
+ | Does it require a transaction boundary? | Yes | Backend Function or Java Service |
354
+ | Does it contain state transitions? | Yes | Backend Function or Hook |
355
+ | Is it automatically triggered by Dataset create/update/delete? | Yes | Hooks Function |
356
+ | Does it call third-party systems or use server-side secrets? | Yes | Backend Function or external worker |
357
+ | Is the logic reused by multiple BFF/Hook scripts? | Yes | Common Function |
358
+ | Is it heavy domain logic or existing Java service logic? | Yes | Enterprise Java Service |
359
+ | Can it only run in a retained legacy system? | Yes | External Retained System |
360
+
361
+ Do not map these directly to Instant API:
362
+
363
+ - An endpoint that looks like `updateStatus` but performs approval, audit logging, notifications, and rollback.
364
+ - A list endpoint with complex role, organization, tenant, or owner filtering.
365
+ - A save endpoint that writes child tables, audit logs, and external systems.
366
+ - A delete endpoint that performs soft delete, cascade, inventory rollback, and messaging.
367
+ - A bulk import endpoint with de-duplication, validation, transaction handling, and compensation.
368
+
369
+ ## Recommended Agent Flow
370
+
371
+ 1. Resolve app context with `.rabetbase.json`, `rabetbase app list`, or explicit `--appcode`.
372
+ 2. Collect Dataset facts with `dataset detail` and `dataset relations`.
373
+ 3. Check existing platform assets with `sql list/detail` and `bff list/detail` when relevant.
374
+ 4. Inspect legacy code and build the Logic Graph.
375
+ 5. Bind legacy code artifacts to Datasets and Relations.
376
+ 6. Produce `.rabetbase/blueprint/<appCode>/application-blueprint.md`.
377
+ 7. Split backlog and manual confirmation items if the file becomes too large.
378
+ 8. Wait for review before generating implementation drafts.
379
+
380
+ ## Prompt Blocks
381
+
382
+ ### Full Blueprint Prompt
383
+
384
+ ```markdown
385
+ You are a Staff Engineer modernizing an unowned legacy application into the Lovrabet architecture.
386
+
387
+ Do not rely on the developer to provide business context. Recover the system behavior from code, SQL, configuration, tests, documentation, git history, and Lovrabet platform facts.
388
+
389
+ Produce a Lovrabet Application Blueprint. Do not modify code.
390
+
391
+ Required output:
392
+ 1. Executive Summary
393
+ 2. Codebase Snapshot
394
+ 3. Logic Graph Summary
395
+ 4. Dataset Binding Report
396
+ 5. Lovrabet Capability Mapping
397
+ 6. Migration Backlog
398
+ 7. Manual Confirmation Items
399
+ 8. Optional Implementation Draft
400
+
401
+ Lovrabet capabilities:
402
+ - Dataset
403
+ - Instant API
404
+ - Custom SQL
405
+ - Backend Function
406
+ - Hooks Function
407
+ - Common Function
408
+ - Enterprise Java Service
409
+ - External Retained System
410
+
411
+ Rules:
412
+ - Every important conclusion must include code evidence.
413
+ - Every Dataset-related conclusion must include platform evidence from dataset detail, dataset relations, db tables/diff, or existing SQL/BFF facts when available.
414
+ - Mark confidence as high, medium, or low.
415
+ - Ask humans only for high-impact uncertainties that cannot be resolved from evidence.
416
+ - Do not map all legacy APIs to Instant API. Upgrade to SQL, BFF, Hook, Common Function, or Java Service when transaction, state machine, permission, side effect, or external integration complexity requires it.
417
+ - Write the primary output to `.rabetbase/blueprint/<appCode>/application-blueprint.md`.
418
+ ```
419
+
420
+ ### Dataset Binding Prompt
421
+
422
+ ```markdown
423
+ Generate a Dataset Binding report by connecting legacy entities, tables, repository methods, and SQL statements to Lovrabet Datasets and Dataset Relations.
424
+
425
+ Use:
426
+ - `rabetbase dataset detail --code <datasetCode> --format compress`
427
+ - `rabetbase dataset relations --format compress`
428
+ - `rabetbase db tables --format compress`
429
+ - `rabetbase db diff --format compress`
430
+
431
+ Output:
432
+ - Legacy artifact
433
+ - Code evidence
434
+ - Matched Dataset
435
+ - Field mapping
436
+ - Enum/status mapping
437
+ - Dataset Relations
438
+ - Missing or conflicting model facts
439
+ - Dataset adjustment candidates
440
+ - Confidence
441
+ - Risk
442
+
443
+ Do not use name similarity alone as high-confidence evidence.
444
+ ```
445
+
446
+ ### Backlog Prompt
447
+
448
+ ```markdown
449
+ Based on the Application Blueprint, generate a staged Lovrabet migration backlog.
450
+
451
+ Stages:
452
+ 1. Dataset adjustments
453
+ 2. Instant API replacements
454
+ 3. Custom SQL
455
+ 4. Backend Functions
456
+ 5. Hooks Functions
457
+ 6. Common Functions
458
+ 7. Enterprise Java Services
459
+ 8. External retained integrations
460
+
461
+ Each task must include:
462
+ - Goal
463
+ - Code evidence
464
+ - Dataset / Relations evidence
465
+ - Recommended Lovrabet capability
466
+ - Dependencies
467
+ - Acceptance criteria
468
+ - Risk
469
+ - Confidence
470
+ - Manual confirmation requirement
471
+
472
+ Do not propose implementation before unresolved high-risk confirmation items are listed.
473
+ ```
474
+
475
+ ## Validation Gates
476
+
477
+ Before claiming the blueprint is complete, verify:
478
+
479
+ - The output file path is under `.rabetbase/blueprint/<appCode>/`.
480
+ - The blueprint has an Executive Summary.
481
+ - It has both code evidence and platform evidence for key conclusions.
482
+ - Dataset Binding is present.
483
+ - Capability Mapping does not blindly map all endpoints to Instant API.
484
+ - Manual Confirmation Items are evidence-based and option-based.
485
+ - Implementation drafts, if included, are clearly marked as drafts.
486
+ - No SQL or BFF was pushed as part of blueprint generation.
487
+
488
+ ## Common Mistakes
489
+
490
+ - Asking the developer to explain the legacy system before doing code and platform evidence collection.
491
+ - Treating the blueprint as complete without Dataset Binding.
492
+ - Mapping every legacy CRUD-like endpoint to Instant API without checking state machines and side effects.
493
+ - Guessing Dataset field names or enum values from legacy names.
494
+ - Writing BFF or SQL directly into arbitrary project folders instead of `.rabetbase/bff` or `.rabetbase/sql`.
495
+ - Mixing blueprint artifacts with pushable implementation assets. Blueprint files belong under `.rabetbase/blueprint`, while SQL and BFF sources belong under their existing `.rabetbase/sql` and `.rabetbase/bff` directories.