dms-ai-code-mode
Runs the dms-ai Code-mode loop for changing a DMS page in code while the user watches it in the dashboard overlay, with the list_pages, navigate_to_page, find_pages_using, typecheck and query_logs host tools. Use when the dms-ai generation mode is Code and a change touches a rendered page, or when the user allows Code mode after a Builder tool answered opaque_target or unsupported.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- icon
- i-ph-code
- name
- dms-ai-code-mode
- tags
- [ "Pages", "CodeMode", "DMS" ]
- category
- Builder
- description
- Runs the dms-ai Code-mode loop for changing a DMS page in code while the user watches it in the dashboard overlay, with the list_pages, navigate_to_page, find_pages_using, typecheck and query_logs host tools. Use when the dms-ai generation mode is Code and a change touches a rendered page, or when the user allows Code mode after a Builder tool answered opaque_target or unsupported.
02 资源文件 1
- 参考文档cases.json1.3 KB
03 SKILL.md 正文
Code mode in dms-ai
What a page is made of and how to write it belongs to the core skills: dms-best-practices
(blocks described backend-side, custom only for the missing block, .meta() on it, design
fidelity) and dms-pages (PageController, blocks, the routes that feed them). This skill adds
what dms-ai changes: its host tools and the live overlay the user is watching. Without the
navigate_to_page tool you are not inside dms-ai, and this skill does not apply.
Before writing any custom block, run the path Before any custom block of dms-best-practices.
The loop, one page at a time
- Map the edit. Call
find_pages_usingon every file you intend to edit to get the pages that render it, and group your edits by page. - Show the page. Look its route up with
list_pages(thepathfield: routes come from the category chain and the/modulesprefix, never from the file name) and callnavigate_to_pagewith it. Prefer the page the user is on, reported each turn in the host-context block. For a new page, register the emptyPageController, calllist_pageswithrefresh: true, navigate to it, and only then add blocks, so the user watches it fill in. - Edit. The overlay hot-reloads the page and highlights the nodes that changed.
- Typecheck. Run
typecheckon the module after every source edit and fix every error: a non-compiling edit makes the host reload fail and the page 404. - Verify. If the page still looks wrong after the reload, read
query_logs. Then take the next page from step 2.
The change is done when every impacted page shows it and typecheck reports no error.
Builder tools in Code mode
When @antelopejs/dms-builder is loaded, the builder_* tools stay available in Code mode.
Prefer them for what they cover: every operation is atomic and typecheck-gated. For a computed number over a builder-managed resource (a KpiCard count or sum),
builder_query_templates then builder_add_query generate the route to pass as fetchUrl.
The Builder recognizes a query by its shape alone: a scalar route over a resource model calling a
this.table… chain. A hand-written route in that shape becomes editable by the Builder like a
generated one. To keep a hand-written aggregate out of its reach, compute it outside the chain
(an intermediate variable or a helper) and it reads back as opaque.
Leave the servers running
dms-ai runs inside the DMS backend, so stopping or restarting the dev servers stops the assistant. Rely on hot reload; when a change needs a full restart (a new module or dependency, a config edit), ask the user to run it.
04 同仓库更多 Skills
dms-page-design
Designs DMS pages that show data, through the Builder tools. Use when building or changing an analytics, stats or dashboard page or a table page, choosing a chart or a KPI for some data, picking a page's period, naming a page and its icon, or deciding how a table displays (badges, prices, relation labels, status tabs, saved views, kanban, cards, footer totals, KPI cards above the table).
dms-external-database
Connects a DMS project to a client's existing database, runs the Builder's analysis of it, settles what the analysis could not decide from the catalog and aggregates, generates TableViews through the Builder, names them and gives each the table features its data supports, and always builds an analytics dashboard first in the menu. Use when the user wants pages over a database the project does not own, PostgreSQL, MongoDB or RethinkDB ("plug in our client's Postgres", "map their Mongo database", "generate the admin for this database", "finish the mapping the Builder proposed").
dms-builder-safe
Builds or modifies AntelopeJS DMS admin pages through the Builder MCP tools instead of raw code edits. Use when the generation mode is "safe", or when the user wants predictable, typechecked page edits (add/configure/move/remove blocks, create pages and categories).
dms-ai
Sets up and troubleshoots @antelopejs/dms-ai, the AI development assistant of the AntelopeJS DMS (chat panel, sidecar running Claude Code or Codex, change sets with undo, audit log and skills pages under /modules/ai). Use when installing or configuring dms-ai (backendUrl, DMS_AI, providers, Codex), when the assistant is offline, or when a module must ship skills to it through antelopeJs.skills.
page-builder
Create and modify DMS pages. Use when the user wants to add or edit a page.
verify-dms-ai
Drive the AntelopeJS dms-ai module (the AI assistant: its sidecar, Overview, Changes, Activity, Skills and Settings pages, the Codex sign-in banner and the owner-only routes) the way the platform owner does, inside a DMS with free ports and its own MongoDB database, and report a verdict with evidence. Use to prove a change to AntelopeJS/dms-ai works before merge, or to verify a PR. A turn with Claude Code or Codex needs credentials a run never holds: that part is NOT VERIFIED, so a verdict is never a plain PASS.